1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-08-29 01:49:22 +03:00

xml2-config.in: Output CFLAGS and LIBS on the same line

xml2-config currently outputs the results of '--cflags --libs' on two lines.
Printing this information on one line is far more useful.
This commit is contained in:
Hugh McMaster
2019-07-31 20:21:47 +10:00
committed by Nick Wellnhofer
parent 0c1b4fd2cf
commit 2f2bf4b2ca

View File

@ -29,9 +29,6 @@ if test $# -eq 0; then
usage 1 usage 1
fi fi
cflags=false
libs=false
while test $# -gt 0; do while test $# -gt 0; do
case "$1" in case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
@ -68,7 +65,7 @@ while test $# -gt 0; do
;; ;;
--cflags) --cflags)
echo @XML_INCLUDEDIR@ @XML_CFLAGS@ cflags="@XML_INCLUDEDIR@ @XML_CFLAGS@"
;; ;;
--libtool-libs) --libtool-libs)
@ -85,16 +82,16 @@ while test $# -gt 0; do
--libs) --libs)
if [ "$2" = "--dynamic" ]; then if [ "$2" = "--dynamic" ]; then
shift shift
LIBS="@XML_LIBS@" libs="@XML_LIBS@"
else else
LIBS="@XML_LIBS@ @XML_PRIVATE_LIBS@ @MODULE_PLATFORM_LIBS@" libs="@XML_LIBS@ @XML_PRIVATE_LIBS@ @MODULE_PLATFORM_LIBS@"
fi fi
if [ "@XML_LIBDIR@" != "-L/usr/lib" -a "@XML_LIBDIR@" != "-L/usr/lib64" ]; then if [ "@XML_LIBDIR@" != "-L/usr/lib" -a "@XML_LIBDIR@" != "-L/usr/lib64" ]; then
LIBS="@XML_LIBDIR@ $LIBS" libs="@XML_LIBDIR@ $libs"
fi fi
echo ${LIBS} @WIN32_EXTRA_LIBADD@ libs="$libs @WIN32_EXTRA_LIBADD@"
;; ;;
*) *)
@ -105,4 +102,8 @@ while test $# -gt 0; do
shift shift
done done
if test "$cflags" -o "$libs"; then
echo $cflags $libs
fi
exit 0 exit 0