| 1 |
nigel |
43 |
#!/bin/sh |
| 2 |
|
|
|
| 3 |
|
|
prefix=@prefix@ |
| 4 |
|
|
exec_prefix=@exec_prefix@ |
| 5 |
|
|
exec_prefix_set=no |
| 6 |
|
|
|
| 7 |
ph10 |
492 |
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 |
nigel |
43 |
|
| 13 |
|
|
if test $# -eq 0; then |
| 14 |
|
|
echo "${usage}" 1>&2 |
| 15 |
|
|
exit 1 |
| 16 |
|
|
fi |
| 17 |
|
|
|
| 18 |
nigel |
75 |
libR= |
| 19 |
|
|
case `uname -s` in |
| 20 |
|
|
*SunOS*) |
| 21 |
|
|
libR=" -R@libdir@" |
| 22 |
|
|
;; |
| 23 |
ph10 |
104 |
*BSD*) |
| 24 |
|
|
libR=" -Wl,-R@libdir@" |
| 25 |
ph10 |
111 |
;; |
| 26 |
nigel |
75 |
esac |
| 27 |
|
|
|
| 28 |
ph10 |
753 |
libS= |
| 29 |
|
|
if test @libdir@ != /usr/lib ; then |
| 30 |
|
|
libS=-L@libdir@ |
| 31 |
|
|
fi |
| 32 |
|
|
|
| 33 |
nigel |
43 |
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 |
ph10 |
97 |
echo @PACKAGE_VERSION@ |
| 58 |
nigel |
43 |
;; |
| 59 |
|
|
--cflags | --cflags-posix) |
| 60 |
|
|
if test @includedir@ != /usr/include ; then |
| 61 |
|
|
includes=-I@includedir@ |
| 62 |
|
|
fi |
| 63 |
ph10 |
430 |
echo $includes @PCRE_STATIC_CFLAG@ |
| 64 |
nigel |
43 |
;; |
| 65 |
|
|
--libs-posix) |
| 66 |
ph10 |
753 |
echo $libS$libR -lpcreposix -lpcre |
| 67 |
nigel |
43 |
;; |
| 68 |
|
|
--libs) |
| 69 |
ph10 |
753 |
echo $libS$libR -lpcre |
| 70 |
nigel |
43 |
;; |
| 71 |
ph10 |
492 |
--libs-cpp) |
| 72 |
|
|
if test @enable_cpp@ = yes ; then |
| 73 |
|
|
echo -L@libdir@$libR -lpcrecpp -lpcre |
| 74 |
|
|
else |
| 75 |
|
|
echo "${usage}" 1>&2 |
| 76 |
|
|
fi |
| 77 |
|
|
;; |
| 78 |
nigel |
43 |
*) |
| 79 |
|
|
echo "${usage}" 1>&2 |
| 80 |
|
|
exit 1 |
| 81 |
|
|
;; |
| 82 |
|
|
esac |
| 83 |
|
|
shift |
| 84 |
|
|
done |