/[pcre]/code/trunk/pcre-config.in
ViewVC logotype

Contents of /code/trunk/pcre-config.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 903 - (hide annotations) (download)
Sat Jan 21 16:37:17 2012 UTC (16 months ago) by ph10
File size: 2255 byte(s)
Source file tidies for 8.30-RC1 release; fix Makefile.am bugs for building 
symbolic links to man pages.

1 nigel 43 #!/bin/sh
2    
3     prefix=@prefix@
4     exec_prefix=@exec_prefix@
5     exec_prefix_set=no
6    
7 ph10 843 cflags="[--cflags]"
8    
9 ph10 492 if test @enable_cpp@ = yes ; then
10 ph10 843 libs="[--libs-cpp]"
11 ph10 492 else
12 ph10 843 libs=
13 ph10 903 fi
14 ph10 843
15     if test @enable_pcre16@ = yes ; then
16     libs="[--libs16] $libs"
17 ph10 492 fi
18 nigel 43
19 ph10 843 if test @enable_pcre8@ = yes ; then
20     libs="[--libs] [--libs-posix] $libs"
21 ph10 903 cflags="$cflags [--cflags-posix]"
22 ph10 843 fi
23    
24     usage="Usage: pcre-config [--prefix] [--exec-prefix] [--version] $libs $cflags"
25    
26 nigel 43 if test $# -eq 0; then
27     echo "${usage}" 1>&2
28     exit 1
29     fi
30    
31 nigel 75 libR=
32     case `uname -s` in
33     *SunOS*)
34     libR=" -R@libdir@"
35     ;;
36 ph10 104 *BSD*)
37     libR=" -Wl,-R@libdir@"
38 ph10 111 ;;
39 nigel 75 esac
40    
41 ph10 753 libS=
42     if test @libdir@ != /usr/lib ; then
43     libS=-L@libdir@
44     fi
45    
46 nigel 43 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 ph10 97 echo @PACKAGE_VERSION@
71 nigel 43 ;;
72 ph10 843 --cflags)
73 nigel 43 if test @includedir@ != /usr/include ; then
74     includes=-I@includedir@
75     fi
76 ph10 430 echo $includes @PCRE_STATIC_CFLAG@
77 nigel 43 ;;
78 ph10 843 --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     ;;
88 nigel 43 --libs-posix)
89 ph10 843 if test @enable_pcre8@ = yes ; then
90     echo $libS$libR -lpcreposix -lpcre
91     else
92     echo "${usage}" 1>&2
93     fi
94 nigel 43 ;;
95     --libs)
96 ph10 843 if test @enable_pcre8@ = yes ; then
97     echo $libS$libR -lpcre
98     else
99     echo "${usage}" 1>&2
100     fi
101 nigel 43 ;;
102 ph10 843 --libs16)
103     if test @enable_pcre16@ = yes ; then
104     echo $libS$libR -lpcre16
105     else
106     echo "${usage}" 1>&2
107     fi
108     ;;
109 ph10 492 --libs-cpp)
110     if test @enable_cpp@ = yes ; then
111 ph10 836 echo $libS$libR -lpcrecpp -lpcre
112 ph10 492 else
113     echo "${usage}" 1>&2
114     fi
115     ;;
116 nigel 43 *)
117     echo "${usage}" 1>&2
118     exit 1
119     ;;
120     esac
121     shift
122     done

Properties

Name Value
svn:eol-style native
svn:keywords "Author Date Id Revision Url"

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12