2014-02-20 20:17:05 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
prefix=@prefix@
|
|
|
|
exec_prefix=@exec_prefix@
|
|
|
|
exec_prefix_set=no
|
|
|
|
|
|
|
|
cflags="[--cflags]"
|
|
|
|
libs=
|
|
|
|
|
2014-10-17 17:52:57 +02:00
|
|
|
if test @enable_pcre2_16@ = yes ; then
|
2014-02-20 20:17:05 +01:00
|
|
|
libs="[--libs16] $libs"
|
|
|
|
fi
|
|
|
|
|
2014-10-17 17:52:57 +02:00
|
|
|
if test @enable_pcre2_32@ = yes ; then
|
2014-02-20 20:17:05 +01:00
|
|
|
libs="[--libs32] $libs"
|
|
|
|
fi
|
|
|
|
|
2014-10-17 17:52:57 +02:00
|
|
|
if test @enable_pcre2_8@ = yes ; then
|
2014-02-20 20:17:05 +01:00
|
|
|
libs="[--libs8] [--libs-posix] $libs"
|
|
|
|
cflags="$cflags [--cflags-posix]"
|
|
|
|
fi
|
|
|
|
|
2014-10-17 17:52:57 +02:00
|
|
|
usage="Usage: pcre2-config [--prefix] [--exec-prefix] [--version] $libs $cflags"
|
2014-02-20 20:17:05 +01:00
|
|
|
|
|
|
|
if test $# -eq 0; then
|
|
|
|
echo "${usage}" 1>&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
libR=
|
|
|
|
case `uname -s` in
|
|
|
|
*SunOS*)
|
|
|
|
libR=" -R@libdir@"
|
|
|
|
;;
|
|
|
|
*BSD*)
|
|
|
|
libR=" -Wl,-R@libdir@"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
libS=
|
|
|
|
if test @libdir@ != /usr/lib ; then
|
|
|
|
libS=-L@libdir@
|
|
|
|
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
|
|
|
|
if test $exec_prefix_set = no ; then
|
|
|
|
exec_prefix=$optarg
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
--prefix)
|
|
|
|
echo $prefix
|
|
|
|
;;
|
|
|
|
--exec-prefix=*)
|
|
|
|
exec_prefix=$optarg
|
|
|
|
exec_prefix_set=yes
|
|
|
|
;;
|
|
|
|
--exec-prefix)
|
|
|
|
echo $exec_prefix
|
|
|
|
;;
|
|
|
|
--version)
|
|
|
|
echo @PACKAGE_VERSION@
|
|
|
|
;;
|
|
|
|
--cflags)
|
|
|
|
if test @includedir@ != /usr/include ; then
|
|
|
|
includes=-I@includedir@
|
|
|
|
fi
|
2014-10-17 17:52:57 +02:00
|
|
|
echo $includes @PCRE2_STATIC_CFLAG@
|
2014-02-20 20:17:05 +01:00
|
|
|
;;
|
|
|
|
--cflags-posix)
|
2014-10-17 17:52:57 +02:00
|
|
|
if test @enable_pcre2_8@ = yes ; then
|
2014-02-20 20:17:05 +01:00
|
|
|
if test @includedir@ != /usr/include ; then
|
|
|
|
includes=-I@includedir@
|
|
|
|
fi
|
2014-10-17 17:52:57 +02:00
|
|
|
echo $includes @PCRE2_STATIC_CFLAG@
|
2014-02-20 20:17:05 +01:00
|
|
|
else
|
|
|
|
echo "${usage}" 1>&2
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
--libs-posix)
|
2014-10-17 17:52:57 +02:00
|
|
|
if test @enable_pcre2_8@ = yes ; then
|
2016-11-22 11:18:08 +01:00
|
|
|
echo $libS$libR -lpcre2-posix -lpcre2-8
|
2014-02-20 20:17:05 +01:00
|
|
|
else
|
|
|
|
echo "${usage}" 1>&2
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
--libs8)
|
2014-10-17 17:52:57 +02:00
|
|
|
if test @enable_pcre2_8@ = yes ; then
|
2014-02-20 20:17:05 +01:00
|
|
|
echo $libS$libR -lpcre2-8
|
|
|
|
else
|
|
|
|
echo "${usage}" 1>&2
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
--libs16)
|
2014-10-17 17:52:57 +02:00
|
|
|
if test @enable_pcre2_16@ = yes ; then
|
2014-02-20 20:17:05 +01:00
|
|
|
echo $libS$libR -lpcre2-16
|
|
|
|
else
|
|
|
|
echo "${usage}" 1>&2
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
--libs32)
|
2014-10-17 17:52:57 +02:00
|
|
|
if test @enable_pcre2_32@ = yes ; then
|
2014-02-20 20:17:05 +01:00
|
|
|
echo $libS$libR -lpcre2-32
|
|
|
|
else
|
|
|
|
echo "${usage}" 1>&2
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "${usage}" 1>&2
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|