| 1 |
#!/bin/sh
|
| 2 |
|
| 3 |
prefix=@prefix@
|
| 4 |
exec_prefix=@exec_prefix@
|
| 5 |
exec_prefix_set=no
|
| 6 |
|
| 7 |
if test @enable_cpp@ = yes ; then
|
| 8 |
usage="Usage: pcre-config [--prefix] [--exec-prefix] [--version] [--libs] [--libs-posix] [--libs-cpp] [--cflags] [--cflags-posix]"
|
| 9 |
else
|
| 10 |
usage="Usage: pcre-config [--prefix] [--exec-prefix] [--version] [--libs] [--libs-posix] [--cflags] [--cflags-posix]"
|
| 11 |
fi
|
| 12 |
|
| 13 |
if test $# -eq 0; then
|
| 14 |
echo "${usage}" 1>&2
|
| 15 |
exit 1
|
| 16 |
fi
|
| 17 |
|
| 18 |
libR=
|
| 19 |
case `uname -s` in
|
| 20 |
*SunOS*)
|
| 21 |
libR=" -R@libdir@"
|
| 22 |
;;
|
| 23 |
*BSD*)
|
| 24 |
libR=" -Wl,-R@libdir@"
|
| 25 |
;;
|
| 26 |
esac
|
| 27 |
|
| 28 |
libS=
|
| 29 |
if test @libdir@ != /usr/lib ; then
|
| 30 |
libS=-L@libdir@
|
| 31 |
fi
|
| 32 |
|
| 33 |
while test $# -gt 0; do
|
| 34 |
case "$1" in
|
| 35 |
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
|
| 36 |
*) optarg= ;;
|
| 37 |
esac
|
| 38 |
|
| 39 |
case $1 in
|
| 40 |
--prefix=*)
|
| 41 |
prefix=$optarg
|
| 42 |
if test $exec_prefix_set = no ; then
|
| 43 |
exec_prefix=$optarg
|
| 44 |
fi
|
| 45 |
;;
|
| 46 |
--prefix)
|
| 47 |
echo $prefix
|
| 48 |
;;
|
| 49 |
--exec-prefix=*)
|
| 50 |
exec_prefix=$optarg
|
| 51 |
exec_prefix_set=yes
|
| 52 |
;;
|
| 53 |
--exec-prefix)
|
| 54 |
echo $exec_prefix
|
| 55 |
;;
|
| 56 |
--version)
|
| 57 |
echo @PACKAGE_VERSION@
|
| 58 |
;;
|
| 59 |
--cflags | --cflags-posix)
|
| 60 |
if test @includedir@ != /usr/include ; then
|
| 61 |
includes=-I@includedir@
|
| 62 |
fi
|
| 63 |
echo $includes @PCRE_STATIC_CFLAG@
|
| 64 |
;;
|
| 65 |
--libs-posix)
|
| 66 |
echo $libS$libR -lpcreposix -lpcre
|
| 67 |
;;
|
| 68 |
--libs)
|
| 69 |
echo $libS$libR -lpcre
|
| 70 |
;;
|
| 71 |
--libs-cpp)
|
| 72 |
if test @enable_cpp@ = yes ; then
|
| 73 |
echo $libS$libR -lpcrecpp -lpcre
|
| 74 |
else
|
| 75 |
echo "${usage}" 1>&2
|
| 76 |
fi
|
| 77 |
;;
|
| 78 |
*)
|
| 79 |
echo "${usage}" 1>&2
|
| 80 |
exit 1
|
| 81 |
;;
|
| 82 |
esac
|
| 83 |
shift
|
| 84 |
done
|