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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1055 - (hide annotations) (download)
Tue Oct 16 15:53:30 2012 UTC (8 months ago) by chpe
File size: 2470 byte(s)
pcre32: Add 32-bit library

Create libpcre32 that operates on 32-bit characters (UTF-32).

This turned out to be surprisingly simple after the UTF-16 support
was introduced; mostly just extra ifdefs and adjusting and adding
some tests.
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 chpe 1055 if test @enable_pcre32@ = yes ; then
20     libs="[--libs32] $libs"
21     fi
22    
23 ph10 843 if test @enable_pcre8@ = yes ; then
24     libs="[--libs] [--libs-posix] $libs"
25 ph10 903 cflags="$cflags [--cflags-posix]"
26 ph10 843 fi
27    
28     usage="Usage: pcre-config [--prefix] [--exec-prefix] [--version] $libs $cflags"
29    
30 nigel 43 if test $# -eq 0; then
31     echo "${usage}" 1>&2
32     exit 1
33     fi
34    
35 nigel 75 libR=
36     case `uname -s` in
37     *SunOS*)
38     libR=" -R@libdir@"
39     ;;
40 ph10 104 *BSD*)
41     libR=" -Wl,-R@libdir@"
42 ph10 111 ;;
43 nigel 75 esac
44    
45 ph10 753 libS=
46     if test @libdir@ != /usr/lib ; then
47     libS=-L@libdir@
48     fi
49    
50 nigel 43 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 ph10 97 echo @PACKAGE_VERSION@
75 nigel 43 ;;
76 ph10 843 --cflags)
77 nigel 43 if test @includedir@ != /usr/include ; then
78     includes=-I@includedir@
79     fi
80 ph10 430 echo $includes @PCRE_STATIC_CFLAG@
81 nigel 43 ;;
82 ph10 843 --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     ;;
92 nigel 43 --libs-posix)
93 ph10 843 if test @enable_pcre8@ = yes ; then
94     echo $libS$libR -lpcreposix -lpcre
95     else
96     echo "${usage}" 1>&2
97     fi
98 nigel 43 ;;
99     --libs)
100 ph10 843 if test @enable_pcre8@ = yes ; then
101     echo $libS$libR -lpcre
102     else
103     echo "${usage}" 1>&2
104     fi
105 nigel 43 ;;
106 ph10 843 --libs16)
107     if test @enable_pcre16@ = yes ; then
108     echo $libS$libR -lpcre16
109     else
110     echo "${usage}" 1>&2
111     fi
112     ;;
113 chpe 1055 --libs32)
114     if test @enable_pcre32@ = yes ; then
115     echo $libS$libR -lpcre32
116     else
117     echo "${usage}" 1>&2
118     fi
119     ;;
120 ph10 492 --libs-cpp)
121     if test @enable_cpp@ = yes ; then
122 ph10 836 echo $libS$libR -lpcrecpp -lpcre
123 ph10 492 else
124     echo "${usage}" 1>&2
125     fi
126     ;;
127 nigel 43 *)
128     echo "${usage}" 1>&2
129     exit 1
130     ;;
131     esac
132     shift
133     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