usbmodeswitch: Updated to v.1.2.6 from shibby's branch.
[tomato.git] / release / src / router / pcre / pcre-config.in
blobac06a3325bc1906a16b22df046baea5692389911
1 #!/bin/sh
3 prefix=@prefix@
4 exec_prefix=@exec_prefix@
5 exec_prefix_set=no
7 cflags="[--cflags]"
9 if test @enable_cpp@ = yes ; then
10 libs="[--libs-cpp]"
11 else
12 libs=
15 if test @enable_pcre16@ = yes ; then
16 libs="[--libs16] $libs"
19 if test @enable_pcre32@ = yes ; then
20 libs="[--libs32] $libs"
23 if test @enable_pcre8@ = yes ; then
24 libs="[--libs] [--libs-posix] $libs"
25 cflags="$cflags [--cflags-posix]"
28 usage="Usage: pcre-config [--prefix] [--exec-prefix] [--version] $libs $cflags"
30 if test $# -eq 0; then
31 echo "${usage}" 1>&2
32 exit 1
35 libR=
36 case `uname -s` in
37 *SunOS*)
38 libR=" -R@libdir@"
40 *BSD*)
41 libR=" -Wl,-R@libdir@"
43 esac
45 libS=
46 if test @libdir@ != /usr/lib ; then
47 libS=-L@libdir@
50 while test $# -gt 0; do
51 case "$1" in
52 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
53 *) optarg= ;;
54 esac
56 case $1 in
57 --prefix=*)
58 prefix=$optarg
59 if test $exec_prefix_set = no ; then
60 exec_prefix=$optarg
63 --prefix)
64 echo $prefix
66 --exec-prefix=*)
67 exec_prefix=$optarg
68 exec_prefix_set=yes
70 --exec-prefix)
71 echo $exec_prefix
73 --version)
74 echo @PACKAGE_VERSION@
76 --cflags)
77 if test @includedir@ != /usr/include ; then
78 includes=-I@includedir@
80 echo $includes @PCRE_STATIC_CFLAG@
82 --cflags-posix)
83 if test @enable_pcre8@ = yes ; then
84 if test @includedir@ != /usr/include ; then
85 includes=-I@includedir@
87 echo $includes @PCRE_STATIC_CFLAG@
88 else
89 echo "${usage}" 1>&2
92 --libs-posix)
93 if test @enable_pcre8@ = yes ; then
94 echo $libS$libR -lpcreposix -lpcre
95 else
96 echo "${usage}" 1>&2
99 --libs)
100 if test @enable_pcre8@ = yes ; then
101 echo $libS$libR -lpcre
102 else
103 echo "${usage}" 1>&2
106 --libs16)
107 if test @enable_pcre16@ = yes ; then
108 echo $libS$libR -lpcre16
109 else
110 echo "${usage}" 1>&2
113 --libs32)
114 if test @enable_pcre32@ = yes ; then
115 echo $libS$libR -lpcre32
116 else
117 echo "${usage}" 1>&2
120 --libs-cpp)
121 if test @enable_cpp@ = yes ; then
122 echo $libS$libR -lpcrecpp -lpcre
123 else
124 echo "${usage}" 1>&2
128 echo "${usage}" 1>&2
129 exit 1
131 esac
132 shift
133 done