Annotation of embedaddon/pcre/pcre-config.in, revision 1.1.1.3
1.1 misho 1: #!/bin/sh
2:
3: prefix=@prefix@
4: exec_prefix=@exec_prefix@
5: exec_prefix_set=no
6:
1.1.1.2 misho 7: cflags="[--cflags]"
8:
1.1 misho 9: if test @enable_cpp@ = yes ; then
1.1.1.2 misho 10: libs="[--libs-cpp]"
1.1 misho 11: else
1.1.1.2 misho 12: libs=
13: fi
14:
15: if test @enable_pcre16@ = yes ; then
16: libs="[--libs16] $libs"
17: fi
18:
1.1.1.3 ! misho 19: if test @enable_pcre32@ = yes ; then
! 20: libs="[--libs32] $libs"
! 21: fi
! 22:
1.1.1.2 misho 23: if test @enable_pcre8@ = yes ; then
24: libs="[--libs] [--libs-posix] $libs"
25: cflags="$cflags [--cflags-posix]"
1.1 misho 26: fi
27:
1.1.1.2 misho 28: usage="Usage: pcre-config [--prefix] [--exec-prefix] [--version] $libs $cflags"
29:
1.1 misho 30: if test $# -eq 0; then
31: echo "${usage}" 1>&2
32: exit 1
33: fi
34:
35: libR=
36: case `uname -s` in
37: *SunOS*)
38: libR=" -R@libdir@"
39: ;;
40: *BSD*)
41: libR=" -Wl,-R@libdir@"
42: ;;
43: esac
44:
45: libS=
46: if test @libdir@ != /usr/lib ; then
47: libS=-L@libdir@
48: fi
49:
50: while test $# -gt 0; do
51: case "$1" in
52: -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
53: *) optarg= ;;
54: esac
55:
56: case $1 in
57: --prefix=*)
58: prefix=$optarg
59: if test $exec_prefix_set = no ; then
60: exec_prefix=$optarg
61: fi
62: ;;
63: --prefix)
64: echo $prefix
65: ;;
66: --exec-prefix=*)
67: exec_prefix=$optarg
68: exec_prefix_set=yes
69: ;;
70: --exec-prefix)
71: echo $exec_prefix
72: ;;
73: --version)
74: echo @PACKAGE_VERSION@
75: ;;
1.1.1.2 misho 76: --cflags)
1.1 misho 77: if test @includedir@ != /usr/include ; then
78: includes=-I@includedir@
79: fi
80: echo $includes @PCRE_STATIC_CFLAG@
81: ;;
1.1.1.2 misho 82: --cflags-posix)
83: if test @enable_pcre8@ = yes ; then
84: if test @includedir@ != /usr/include ; then
85: includes=-I@includedir@
86: fi
87: echo $includes @PCRE_STATIC_CFLAG@
88: else
89: echo "${usage}" 1>&2
90: fi
91: ;;
1.1 misho 92: --libs-posix)
1.1.1.2 misho 93: if test @enable_pcre8@ = yes ; then
94: echo $libS$libR -lpcreposix -lpcre
95: else
96: echo "${usage}" 1>&2
97: fi
1.1 misho 98: ;;
99: --libs)
1.1.1.2 misho 100: if test @enable_pcre8@ = yes ; then
101: echo $libS$libR -lpcre
102: else
103: echo "${usage}" 1>&2
104: fi
105: ;;
106: --libs16)
107: if test @enable_pcre16@ = yes ; then
108: echo $libS$libR -lpcre16
109: else
110: echo "${usage}" 1>&2
111: fi
1.1 misho 112: ;;
1.1.1.3 ! misho 113: --libs32)
! 114: if test @enable_pcre32@ = yes ; then
! 115: echo $libS$libR -lpcre32
! 116: else
! 117: echo "${usage}" 1>&2
! 118: fi
! 119: ;;
1.1 misho 120: --libs-cpp)
121: if test @enable_cpp@ = yes ; then
122: echo $libS$libR -lpcrecpp -lpcre
123: else
124: echo "${usage}" 1>&2
125: fi
126: ;;
127: *)
128: echo "${usage}" 1>&2
129: exit 1
130: ;;
131: esac
132: shift
133: done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>