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