2001-02-23 17:55:21 +00:00
#! /bin/sh
prefix=@prefix@
exec_prefix=@exec_prefix@
includedir=@includedir@
2012-11-08 16:24:07 +08:00
libdir=@libdir@
2019-11-02 17:51:39 +01:00
cflags=
libs=
2001-02-23 17:55:21 +00:00
usage()
{
cat <<EOF
2002-05-03 07:29:38 +00:00
Usage: xml2-config [OPTION]
2001-02-23 17:55:21 +00:00
Known values for OPTION are:
--prefix=DIR change libxml prefix [default $prefix]
2004-01-04 01:01:14 +00:00
--exec-prefix=DIR change libxml exec prefix [default $exec_prefix]
2001-02-23 17:55:21 +00:00
--libs print library linking information
2019-07-01 22:22:14 +10:00
add --dynamic to print only shared libraries
2001-02-23 17:55:21 +00:00
--cflags print pre-processor and compiler flags
2005-01-04 15:10:22 +00:00
--modules module support enabled
2001-02-23 17:55:21 +00: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 07:29:38 +00:00
includedir=$prefix/include
libdir=$prefix/lib
2001-02-23 17:55:21 +00:00
;;
--prefix)
echo $prefix
;;
2004-01-04 01:01:14 +00:00
--exec-prefix=*)
exec_prefix=$optarg
libdir=$exec_prefix/lib
;;
--exec-prefix)
echo $exec_prefix
;;
2001-02-23 17:55:21 +00:00
--version)
echo @VERSION@
exit 0
;;
--help)
usage 0
;;
--cflags)
2019-07-31 20:21:47 +10:00
cflags="@XML_INCLUDEDIR@ @XML_CFLAGS@"
2001-02-23 17:55:21 +00:00
;;
2003-09-01 20:33:14 +00:00
--libtool-libs)
2024-06-21 03:16:44 +02:00
if [ -r ${libdir}/libxml2.la ]
2006-03-07 09:00:20 +00:00
then
2024-06-21 03:16:44 +02:00
echo ${libdir}/libxml2.la
2006-03-07 09:00:20 +00:00
fi
2003-09-01 20:33:14 +00:00
;;
2005-01-04 15:10:22 +00:00
--modules)
echo @WITH_MODULES@
;;
2001-02-23 17:55:21 +00:00
--libs)
2019-07-01 22:22:14 +10:00
if [ "$2" = "--dynamic" ]; then
shift
2023-09-02 17:12:58 +01:00
libs="@XML_LIBS@ @XML_PRIVATE_LIBS_NO_SHARED@"
2019-07-01 22:22:14 +10:00
else
2024-06-21 03:26:54 +02:00
libs="@XML_LIBS@ @XML_PRIVATE_LIBS@ @LIBS@"
2019-07-01 22:22:14 +10:00
fi
2024-06-21 03:38:11 +02:00
if [ "@libdir@" != "/usr/lib" -a "@libdir@" != "/usr/lib64" ]; then
2019-07-31 20:21:47 +10:00
libs="@XML_LIBDIR@ $libs"
2019-07-01 22:22:14 +10:00
fi
;;
2001-02-23 17:55:21 +00:00
*)
2019-11-11 11:29:17 +01:00
usage 1
2001-02-23 17:55:21 +00:00
;;
esac
shift
done
2019-11-02 17:51:39 +01:00
if test -n "$cflags$libs"; then
2019-07-31 20:21:47 +10:00
echo $cflags $libs
fi
2001-02-23 17:55:21 +00:00
exit 0