2001-02-23 20:55:21 +03:00
#! /bin/sh
prefix=@prefix@
exec_prefix=@exec_prefix@
includedir=@includedir@
2012-11-08 12:24:07 +04:00
libdir=@libdir@
2019-11-02 19:51:39 +03:00
cflags=
libs=
2001-02-23 20:55:21 +03:00
usage()
{
cat <<EOF
2002-05-03 11:29:38 +04:00
Usage: xml2-config [OPTION]
2001-02-23 20:55:21 +03:00
Known values for OPTION are:
--prefix=DIR change libxml prefix [default $prefix]
2004-01-04 04:01:14 +03:00
--exec-prefix=DIR change libxml exec prefix [default $exec_prefix]
2001-02-23 20:55:21 +03:00
--libs print library linking information
2019-07-01 15:22:14 +03:00
add --dynamic to print only shared libraries
2001-02-23 20:55:21 +03:00
--cflags print pre-processor and compiler flags
2005-01-04 18:10:22 +03:00
--modules module support enabled
2001-02-23 20:55:21 +03:00
--help display this help and exit
--version output version information
EOF
exit $1
}
if test $# -eq 0; then
usage 1
fi
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case "$1" in
--prefix=*)
prefix=$optarg
2002-05-03 11:29:38 +04:00
includedir=$prefix/include
libdir=$prefix/lib
2001-02-23 20:55:21 +03:00
;;
--prefix)
echo $prefix
;;
2004-01-04 04:01:14 +03:00
--exec-prefix=*)
exec_prefix=$optarg
libdir=$exec_prefix/lib
;;
--exec-prefix)
echo $exec_prefix
;;
2001-02-23 20:55:21 +03:00
--version)
echo @VERSION@
exit 0
;;
--help)
usage 0
;;
--cflags)
2019-07-31 13:21:47 +03:00
cflags="@XML_INCLUDEDIR@ @XML_CFLAGS@"
2001-02-23 20:55:21 +03:00
;;
2003-09-02 00:33:14 +04:00
--libtool-libs)
2006-03-07 12:00:20 +03:00
if [ -r ${libdir}/@XML_LIBTOOLLIBS@ ]
then
echo ${libdir}/@XML_LIBTOOLLIBS@
fi
2003-09-02 00:33:14 +04:00
;;
2005-01-04 18:10:22 +03:00
--modules)
echo @WITH_MODULES@
;;
2001-02-23 20:55:21 +03:00
--libs)
2019-07-01 15:22:14 +03:00
if [ "$2" = "--dynamic" ]; then
shift
2019-07-31 13:21:47 +03:00
libs="@XML_LIBS@"
2019-07-01 15:22:14 +03:00
else
2019-07-31 13:21:47 +03:00
libs="@XML_LIBS@ @XML_PRIVATE_LIBS@ @MODULE_PLATFORM_LIBS@"
2019-07-01 15:22:14 +03:00
fi
if [ "@XML_LIBDIR@" != "-L/usr/lib" -a "@XML_LIBDIR@" != "-L/usr/lib64" ]; then
2019-07-31 13:21:47 +03:00
libs="@XML_LIBDIR@ $libs"
2019-07-01 15:22:14 +03:00
fi
;;
2001-02-23 20:55:21 +03:00
*)
2019-11-11 13:29:17 +03:00
usage 1
2001-02-23 20:55:21 +03:00
;;
esac
shift
done
2019-11-02 19:51:39 +03:00
if test -n "$cflags$libs"; then
2019-07-31 13:21:47 +03:00
echo $cflags $libs
fi
2001-02-23 20:55:21 +03:00
exit 0