merge
[tamarin-stm.git] / pcre / pcre-config.in
blob3b52101b9b418241a51b55a8d9f8e6eeb11a22f5
1 #!/bin/sh
3 prefix=@prefix@
4 exec_prefix=@exec_prefix@
5 exec_prefix_set=no
7 usage="\
8 Usage: pcre-config [--prefix] [--exec-prefix] [--version] [--libs] [--libs-posix] [--cflags] [--cflags-posix]"
10 if test $# -eq 0; then
11 echo "${usage}" 1>&2
12 exit 1
15 libR=
16 case `uname -s` in
17 *SunOS*)
18 libR=" -R@libdir@"
20 *BSD*)
21 libR=" -Wl,-R@libdir@"
23 esac
25 while test $# -gt 0; do
26 case "$1" in
27 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
28 *) optarg= ;;
29 esac
31 case $1 in
32 --prefix=*)
33 prefix=$optarg
34 if test $exec_prefix_set = no ; then
35 exec_prefix=$optarg
38 --prefix)
39 echo $prefix
41 --exec-prefix=*)
42 exec_prefix=$optarg
43 exec_prefix_set=yes
45 --exec-prefix)
46 echo $exec_prefix
48 --version)
49 echo @PACKAGE_VERSION@
51 --cflags | --cflags-posix)
52 if test @includedir@ != /usr/include ; then
53 includes=-I@includedir@
55 echo $includes
57 --libs-posix)
58 echo -L@libdir@$libR -lpcreposix -lpcre
60 --libs)
61 echo -L@libdir@$libR -lpcre
64 echo "${usage}" 1>&2
65 exit 1
67 esac
68 shift
69 done