new upstream release (3.3.0); modify package compatibility for Stretch
[ossec-hids.git] / src / external / pcre2-10.32 / pcre2-config.in
1 #!/bin/sh
2
3 prefix=@prefix@
4 exec_prefix=@exec_prefix@
5 exec_prefix_set=no
6
7 cflags="[--cflags]"
8 libs=
9
10 if test @enable_pcre2_16@ = yes ; then
11   libs="[--libs16] $libs"
12 fi
13
14 if test @enable_pcre2_32@ = yes ; then
15   libs="[--libs32] $libs"
16 fi
17
18 if test @enable_pcre2_8@ = yes ; then
19   libs="[--libs8] [--libs-posix] $libs"
20   cflags="$cflags [--cflags-posix]"
21 fi
22
23 usage="Usage: pcre2-config [--prefix] [--exec-prefix] [--version] $libs $cflags"
24
25 if test $# -eq 0; then
26       echo "${usage}" 1>&2
27       exit 1
28 fi
29
30 libR=
31 case `uname -s` in
32   *SunOS*)
33   libR=" -R@libdir@"
34   ;;
35   *BSD*)
36   libR=" -Wl,-R@libdir@"
37   ;;
38 esac
39
40 libS=
41 if test @libdir@ != /usr/lib ; then
42   libS=-L@libdir@
43 fi
44
45 while test $# -gt 0; do
46   case "$1" in
47   -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
48   *) optarg= ;;
49   esac
50
51   case $1 in
52     --prefix=*)
53       prefix=$optarg
54       if test $exec_prefix_set = no ; then
55         exec_prefix=$optarg
56       fi
57       ;;
58     --prefix)
59       echo $prefix
60       ;;
61     --exec-prefix=*)
62       exec_prefix=$optarg
63       exec_prefix_set=yes
64       ;;
65     --exec-prefix)
66       echo $exec_prefix
67       ;;
68     --version)
69       echo @PACKAGE_VERSION@
70       ;;
71     --cflags)
72       if test @includedir@ != /usr/include ; then
73         includes=-I@includedir@
74       fi
75       echo $includes @PCRE2_STATIC_CFLAG@
76       ;;
77     --cflags-posix)
78       if test @enable_pcre2_8@ = yes ; then
79         if test @includedir@ != /usr/include ; then
80           includes=-I@includedir@
81         fi
82         echo $includes @PCRE2_STATIC_CFLAG@
83       else
84         echo "${usage}" 1>&2
85       fi
86       ;;
87     --libs-posix)
88       if test @enable_pcre2_8@ = yes ; then
89         echo $libS$libR -lpcre2-posix -lpcre2-8
90       else
91         echo "${usage}" 1>&2
92       fi
93       ;;
94     --libs8)
95       if test @enable_pcre2_8@ = yes ; then
96         echo $libS$libR -lpcre2-8
97       else
98         echo "${usage}" 1>&2
99       fi
100       ;;
101     --libs16)
102       if test @enable_pcre2_16@ = yes ; then
103         echo $libS$libR -lpcre2-16
104       else
105         echo "${usage}" 1>&2
106       fi
107       ;;
108     --libs32)
109       if test @enable_pcre2_32@ = yes ; then
110         echo $libS$libR -lpcre2-32
111       else
112         echo "${usage}" 1>&2
113       fi
114       ;;
115     *)
116       echo "${usage}" 1>&2
117       exit 1
118       ;;
119   esac
120   shift
121 done