Busybox: Upgrade to 1.21.1 (stable). lsof active.
[tomato.git] / release / src / router / pcre / pcre-config
blob75e635b75095728f6ea996b7f2af92916095817e
1 #!/bin/sh
3 prefix=/usr
4 exec_prefix=${prefix}
5 exec_prefix_set=no
7 cflags="[--cflags]"
9 if test no = yes ; then
10 libs="[--libs-cpp]"
11 else
12 libs=
15 if test no = yes ; then
16 libs="[--libs16] $libs"
19 if test no = yes ; then
20 libs="[--libs32] $libs"
23 if test yes = 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${exec_prefix}/lib"
40 *BSD*)
41 libR=" -Wl,-R${exec_prefix}/lib"
43 esac
45 libS=
46 if test ${exec_prefix}/lib != /usr/lib ; then
47 libS=-L${exec_prefix}/lib
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 8.32
76 --cflags)
77 if test ${prefix}/include != /usr/include ; then
78 includes=-I${prefix}/include
80 echo $includes
82 --cflags-posix)
83 if test yes = yes ; then
84 if test ${prefix}/include != /usr/include ; then
85 includes=-I${prefix}/include
87 echo $includes
88 else
89 echo "${usage}" 1>&2
92 --libs-posix)
93 if test yes = yes ; then
94 echo $libS$libR -lpcreposix -lpcre
95 else
96 echo "${usage}" 1>&2
99 --libs)
100 if test yes = yes ; then
101 echo $libS$libR -lpcre
102 else
103 echo "${usage}" 1>&2
106 --libs16)
107 if test no = yes ; then
108 echo $libS$libR -lpcre16
109 else
110 echo "${usage}" 1>&2
113 --libs32)
114 if test no = yes ; then
115 echo $libS$libR -lpcre32
116 else
117 echo "${usage}" 1>&2
120 --libs-cpp)
121 if test no = 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