summaryrefslogtreecommitdiffabout
path: root/acinclude.m4
Unidiff
Diffstat (limited to 'acinclude.m4') (more/less context) (ignore whitespace changes)
-rw-r--r--acinclude.m46
1 files changed, 2 insertions, 4 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 349d3cf..532f978 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1,213 +1,211 @@
1dnl AC_WITH_PKGCONFIG([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]]) 1dnl AC_WITH_PKGCONFIG([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]])
2dnl Outputs: 2dnl Outputs:
3dnl AC_SUBST: PKGCONFIG_PKGCONFIG PKGCONFIG_DIR 3dnl AC_SUBST: PKGCONFIG_PKGCONFIG PKGCONFIG_DIR
4dnl AM_CONDTIONAL: HAVE_PKGCONFIG 4dnl AM_CONDTIONAL: HAVE_PKGCONFIG
5AC_DEFUN([AC_WITH_PKGCONFIG],[ 5AC_DEFUN([AC_WITH_PKGCONFIG],[
6 PKGCONFIG_PKGCONFIG="" 6 PKGCONFIG_PKGCONFIG=""
7 PKGCONFIG_DIR="" 7 PKGCONFIG_DIR=""
8 HAVE_PKGCONFIG="no" 8 HAVE_PKGCONFIG="no"
9 EXPLICIT_PKGCONFIGDIR="no" 9 EXPLICIT_PKGCONFIGDIR="no"
10 test -z "${WANT_PKGCONFIG}" && WANT_PKGCONFIG="" 10 test -z "${WANT_PKGCONFIG}" && WANT_PKGCONFIG=""
11 AC_PATH_PROG([PKGCONFIG_PKGCONFIG],[pkg-config],[false]) 11 AC_PATH_PROG([PKGCONFIG_PKGCONFIG],[pkg-config],[false])
12 if test "${PKGCONFIG_PKGCONFIG}" != "false" ; then 12 if test "${PKGCONFIG_PKGCONFIG}" != "false" ; then
13 AC_ARG_WITH([pkgconfigdir], 13 AC_ARG_WITH([pkgconfigdir],
14 AC_HELP_STRING([--with-pkgconfigdir=dir],[Specify pkgconfig directory]), 14 AC_HELP_STRING([--with-pkgconfigdir=dir],[Specify pkgconfig directory]),
15 [ 15 [
16 if test "${withval}" = "no" ; then 16 if test "${withval}" = "no" ; then
17 WANT_PKGCONFIG="no" 17 WANT_PKGCONFIG="no"
18 else 18 else
19 PKGCONFIG_DIR="${withval}" 19 PKGCONFIG_DIR="${withval}"
20 EXPLICIT_PKGCONFIGDIR="yes" 20 EXPLICIT_PKGCONFIGDIR="yes"
21 fi 21 fi
22 ],[ 22 ],[
23 AC_MSG_CHECKING([for pkgconfig directory]) 23 AC_MSG_CHECKING([for pkgconfig directory])
24 PKGCONFIG_DIR="`${PKGCONFIG_PKGCONFIG} --debug 2>&1 | grep '^Scanning'| head -n 1 | cut -d\' -f2-|cut -d\' -f1`" 24 PKGCONFIG_DIR="`${PKGCONFIG_PKGCONFIG} --debug 2>&1 | grep '^Scanning'| head -n 1 | cut -d\' -f2-|cut -d\' -f1`"
25 AC_MSG_RESULT([${PKGCONFIG_DIR}]) 25 AC_MSG_RESULT([${PKGCONFIG_DIR}])
26 ] 26 ]
27 ) 27 )
28 if test -d "${PKGCONFIG_DIR}" ; then 28 if test -d "${PKGCONFIG_DIR}" ; then
29 HAVE_PKGCONFIG=yes 29 HAVE_PKGCONFIG=yes
30 AC_SUBST([PKGCONFIG_PKGCONFIG]) 30 AC_SUBST([PKGCONFIG_PKGCONFIG])
31 AC_SUBST([PKGCONFIG_DIR]) 31 AC_SUBST([PKGCONFIG_DIR])
32 else 32 else
33 AC_MSG_NOTICE([unexistent pkgconfig directory: ${PKGCONFIG_DIR}]) 33 AC_MSG_NOTICE([unexistent pkgconfig directory: ${PKGCONFIG_DIR}])
34 if test "${EXPLICIT_PKGCONFIGDIR}" = "yes" ; then 34 if test "${EXPLICIT_PKGCONFIGDIR}" = "yes" ; then
35 HAVE_PKGCONFIG=yes 35 HAVE_PKGCONFIG=yes
36 AC_SUBST([PKGCONFIG_PKGCONFIG]) 36 AC_SUBST([PKGCONFIG_PKGCONFIG])
37 AC_SUBST([PKGCONFIG_DIR]) 37 AC_SUBST([PKGCONFIG_DIR])
38 else 38 else
39 ifelse([$2], , :, [$2]) 39 ifelse([$2], , :, [$2])
40 fi 40 fi
41 fi 41 fi
42 fi 42 fi
43 AM_CONDITIONAL([HAVE_PKGCONFIG],[test "${HAVE_PKGCONFIG}" = "yes"]) 43 AM_CONDITIONAL([HAVE_PKGCONFIG],[test "${HAVE_PKGCONFIG}" = "yes"])
44]) 44])
45 45
46dnl AC_WITH_DOXYGEN([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]]) 46dnl AC_WITH_DOXYGEN([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]])
47dnl Outputs: 47dnl Outputs:
48dnl AC_SUBST: DOXYGEN HAVE_DOXYGEN 48dnl AC_SUBST: DOXYGEN HAVE_DOXYGEN
49dnl AM_CONDTIONAL: HAVE_DOXYGEN 49dnl AM_CONDTIONAL: HAVE_DOXYGEN
50AC_DEFUN([AC_WITH_DOXYGEN],[ 50AC_DEFUN([AC_WITH_DOXYGEN],[
51 HAVE_DOXYGEN="no" 51 HAVE_DOXYGEN="no"
52 AC_PATH_PROG([DOXYGEN],[doxygen],[false]) 52 AC_PATH_PROG([DOXYGEN],[doxygen],[false])
53 if test "${DOXYGEN}" = "false" ; then 53 if test "${DOXYGEN}" = "false" ; then
54 ifelse([$2], , :, [$2]) 54 ifelse([$2], , :, [$2])
55 else 55 else
56 HAVE_DOXYGEN="yes" 56 HAVE_DOXYGEN="yes"
57 AC_SUBST([DOXYGEN]) 57 AC_SUBST([DOXYGEN])
58 $1 58 $1
59 fi 59 fi
60 AC_SUBST([HAVE_DOXYGEN]) 60 AC_SUBST([HAVE_DOXYGEN])
61 AM_CONDITIONAL([HAVE_DOXYGEN],[test "${HAVE_DOXYGEN}" = "yes"]) 61 AM_CONDITIONAL([HAVE_DOXYGEN],[test "${HAVE_DOXYGEN}" = "yes"])
62]) 62])
63 63
64dnl AC_WITH_DOT([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]]) 64dnl AC_WITH_DOT([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]])
65dnl Outputs: 65dnl Outputs:
66dnl AC_SUBST: DOT HAVE_DOT 66dnl AC_SUBST: DOT HAVE_DOT
67dnl AM_CONDITIONAL: HAVE_DOT 67dnl AM_CONDITIONAL: HAVE_DOT
68AC_DEFUN([AC_WITH_DOT],[ 68AC_DEFUN([AC_WITH_DOT],[
69 HAVE_DOT="no" 69 HAVE_DOT="no"
70 AC_PATH_PROG([DOT],[dot],[false]) 70 AC_PATH_PROG([DOT],[dot],[false])
71 if test "${DOT}" = "false" ; then 71 if test "${DOT}" = "false" ; then
72 ifelse([$2], , :, [$2]) 72 ifelse([$2], , :, [$2])
73 else 73 else
74 HAVE_DOT="yes" 74 HAVE_DOT="yes"
75 AC_SUBST([DOT]) 75 AC_SUBST([DOT])
76 $1 76 $1
77 fi 77 fi
78AC_SUBST([HAVE_DOT]) 78AC_SUBST([HAVE_DOT])
79 AM_CONDITIONAL([HAVE_DOT],[test "${HAVE_DOT}" = "yes"]) 79 AM_CONDITIONAL([HAVE_DOT],[test "${HAVE_DOT}" = "yes"])
80]) 80])
81 81
82dnl AC_WITH_PCRE([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]]) 82dnl AC_WITH_PCRE([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]])
83dnl Outputs: 83dnl Outputs:
84dnl AC_SUBST: PCRE_CONFIG PCRE_PREFIX PCRE_EXEC_PREFIX 84dnl AC_SUBST: PCRE_CONFIG PCRE_PREFIX PCRE_EXEC_PREFIX
85dnl PCRE_VERSION PCRE_CFLAGS PCRE_LIBS 85dnl PCRE_VERSION PCRE_CFLAGS PCRE_LIBS
86dnl PCRE_LIBS_POSIX PCRE_CFLAGS_POSIX 86dnl PCRE_LIBS_POSIX PCRE_CFLAGS_POSIX
87dnl AM_CONDITIONAL: HAVE_PCRE
88dnl AC_DEFINE: HAVE_PCRE PCRE_VERSION 87dnl AC_DEFINE: HAVE_PCRE PCRE_VERSION
88dnl env: HAVE_PCRE=yes|no
89AC_DEFUN([AC_WITH_PCRE],[ 89AC_DEFUN([AC_WITH_PCRE],[
90 HAVE_PCRE="no" 90 HAVE_PCRE="no"
91 PCRE_CONFIG="" 91 PCRE_CONFIG=""
92 PCRE_PREFIX="" 92 PCRE_PREFIX=""
93 PCRE_EXEC_PREFIX="" 93 PCRE_EXEC_PREFIX=""
94 PCRE_VERSION="" 94 PCRE_VERSION=""
95 PCRE_CFLAGS="" 95 PCRE_CFLAGS=""
96 PCRE_LIBS="" 96 PCRE_LIBS=""
97 PCRE_LOCATIONS="${PATH}:/usr/local/bin:/usr/bin" 97 PCRE_LOCATIONS="${PATH}:/usr/local/bin:/usr/bin"
98 test -z "$WANT_PCRE" && WANT_PCRE="" 98 test -z "$WANT_PCRE" && WANT_PCRE=""
99 AC_ARG_WITH([pcre], 99 AC_ARG_WITH([pcre],
100 AC_HELP_STRING([--with-pcre=location],[Look for pcre in specified locations]), 100 AC_HELP_STRING([--with-pcre=location],[Look for pcre in specified locations]),
101 [ 101 [
102 if test "${withval}" = "no" ; then 102 if test "${withval}" = "no" ; then
103 WANT_PCRE="no" 103 WANT_PCRE="no"
104 else 104 else
105 if test -x "${withval}" ; then 105 if test -x "${withval}" ; then
106 PCRE_CONFIG="${withval}" 106 PCRE_CONFIG="${withval}"
107 elif test -x "${withval}/pcre-config" ; then 107 elif test -x "${withval}/pcre-config" ; then
108 PCRE_CONFIG="${withval}/pcre-config" 108 PCRE_CONFIG="${withval}/pcre-config"
109 elif test -x "${withval}/bin/pcre-config" ; then 109 elif test -x "${withval}/bin/pcre-config" ; then
110 PCRE_CONFIG="${withval}/bin/pcre-config" 110 PCRE_CONFIG="${withval}/bin/pcre-config"
111 fi 111 fi
112 fi 112 fi
113 ] 113 ]
114 ) 114 )
115 if test "${WANT_PCRE}" = "no" ; then 115 if test "${WANT_PCRE}" = "no" ; then
116 ifelse([$2], , :, [$2]) 116 ifelse([$2], , :, [$2])
117 else 117 else
118 if test -z "${PCRE_CONFIG}" ; then 118 if test -z "${PCRE_CONFIG}" ; then
119 AC_PATH_PROG(PCRE_CONFIG,[pcre-config],false,[${PCRE_LOCATIONS}]) 119 AC_PATH_PROG(PCRE_CONFIG,[pcre-config],false,[${PCRE_LOCATIONS}])
120 if test "${PCRE_CONFIG}" = "false" ; then 120 if test "${PCRE_CONFIG}" = "false" ; then
121 ifelse([$2], , :, [$2]) 121 ifelse([$2], , :, [$2])
122 else 122 else
123 HAVE_PCRE="yes" 123 HAVE_PCRE="yes"
124 PCRE_PREFIX="`${PCRE_CONFIG} --prefix`" 124 PCRE_PREFIX="`${PCRE_CONFIG} --prefix`"
125 PCRE_EXEC_PREFIX="`${PCRE_CONFIG} --exec-prefix`" 125 PCRE_EXEC_PREFIX="`${PCRE_CONFIG} --exec-prefix`"
126 PCRE_VERSION="`${PCRE_CONFIG} --version`" 126 PCRE_VERSION="`${PCRE_CONFIG} --version`"
127 PCRE_CFLAGS="`${PCRE_CONFIG} --cflags`" 127 PCRE_CFLAGS="`${PCRE_CONFIG} --cflags`"
128 PCRE_LIBS="`${PCRE_CONFIG} --libs`" 128 PCRE_LIBS="`${PCRE_CONFIG} --libs`"
129 PCRE_CFLAGS_POSIX="`${PCRE_CONFIG} --cflags-posix`" 129 PCRE_CFLAGS_POSIX="`${PCRE_CONFIG} --cflags-posix`"
130 PCRE_LIBS_POSIX="`${PCRE_CONFIG} --libs-posix`" 130 PCRE_LIBS_POSIX="`${PCRE_CONFIG} --libs-posix`"
131 AC_SUBST([PCRE_CONFIG]) 131 AC_SUBST([PCRE_CONFIG])
132 AC_SUBST([PCRE_PREFIX]) 132 AC_SUBST([PCRE_PREFIX])
133 AC_SUBST([PCRE_EXEC_PREFIX]) 133 AC_SUBST([PCRE_EXEC_PREFIX])
134 AC_SUBST([PCRE_VERSION]) 134 AC_SUBST([PCRE_VERSION])
135 AC_SUBST([PCRE_CFLAGS]) 135 AC_SUBST([PCRE_CFLAGS])
136 AC_SUBST([PCRE_LIBS]) 136 AC_SUBST([PCRE_LIBS])
137 AC_SUBST([PCRE_CFLAGS_POSIX]) 137 AC_SUBST([PCRE_CFLAGS_POSIX])
138 AC_SUBST([PCRE_LIBS_POSIX]) 138 AC_SUBST([PCRE_LIBS_POSIX])
139 AC_DEFINE([HAVE_PCRE],,[pcre support]) 139 AC_DEFINE([HAVE_PCRE],,[pcre support])
140 AC_DEFINE_UNQUOTED([PCRE_VERSION],["${PCRE_VERSION}"],[pcre version]) 140 AC_DEFINE_UNQUOTED([PCRE_VERSION],["${PCRE_VERSION}"],[pcre version])
141 $1 141 $1
142 fi 142 fi
143 fi 143 fi
144 fi 144 fi
145 AM_CONDITIONAL([HAVE_PCRE],[test "${HAVE_PCRE}" = "yes"])
146]) 145])
147 146
148dnl AC_WITH_PCREPP([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]]) 147dnl AC_WITH_PCREPP([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]])
149dnl Outputs: 148dnl Outputs:
150dnl AC_SUBST: PCREPP_CONFIG PCREPP_PREFIX PCREPP_EXEC_PREFIX 149dnl AC_SUBST: PCREPP_CONFIG PCREPP_PREFIX PCREPP_EXEC_PREFIX
151dnl PCREPP_VERSION PCREPP_CFLAGS PCREPP_LIBS 150dnl PCREPP_VERSION PCREPP_CFLAGS PCREPP_LIBS
152dnl AM_CONDITIONAL: HAVE_PCREPP
153dnl AC_DEFINE: HAVE_PCREPP PCREPP_VERSION 151dnl AC_DEFINE: HAVE_PCREPP PCREPP_VERSION
152dnl env: HAVE_PCREPP=yes|no
154AC_DEFUN([AC_WITH_PCREPP],[ 153AC_DEFUN([AC_WITH_PCREPP],[
155 HAVE_PCREPP="no" 154 HAVE_PCREPP="no"
156 PCREPP_CONFIG="" 155 PCREPP_CONFIG=""
157 PCREPP_PREFIX="" 156 PCREPP_PREFIX=""
158 PCREPP_EXEC_PREFIX="" 157 PCREPP_EXEC_PREFIX=""
159 PCREPP_VERSION="" 158 PCREPP_VERSION=""
160 PCREPP_CFLAGS="" 159 PCREPP_CFLAGS=""
161 PCREPP_LIBS="" 160 PCREPP_LIBS=""
162 PCREPP_LOCATIONS="${PATH}:/usr/local/bin:/usr/bin" 161 PCREPP_LOCATIONS="${PATH}:/usr/local/bin:/usr/bin"
163 test -z "$WANT_PCREPP" && WANT_PCREPP="" 162 test -z "$WANT_PCREPP" && WANT_PCREPP=""
164 AC_ARG_WITH([pcrepp], 163 AC_ARG_WITH([pcrepp],
165 AC_HELP_STRING([--with-pcrepp=location],[Look for pcre++ in specified locations]), 164 AC_HELP_STRING([--with-pcrepp=location],[Look for pcre++ in specified locations]),
166 [ 165 [
167 if test "${withval}" = "no" ; then 166 if test "${withval}" = "no" ; then
168 WANT_PCREPP="no" 167 WANT_PCREPP="no"
169 else 168 else
170 if test -x "${withval}" ; then 169 if test -x "${withval}" ; then
171 PCREPP_CONFIG="${withval}" 170 PCREPP_CONFIG="${withval}"
172 elif test -x "${withval}/pcre++-config" ; then 171 elif test -x "${withval}/pcre++-config" ; then
173 PCREPP_CONFIG="${withval}/pcre++-config" 172 PCREPP_CONFIG="${withval}/pcre++-config"
174 elif test -x "${withval}/bin/pcre++-config" ; then 173 elif test -x "${withval}/bin/pcre++-config" ; then
175 PCREPP_CONFIG="${withval}/bin/pcre++-config" 174 PCREPP_CONFIG="${withval}/bin/pcre++-config"
176 fi 175 fi
177 fi 176 fi
178 ] 177 ]
179 ) 178 )
180 if test "${WANT_PCREPP}" = "no" ; then 179 if test "${WANT_PCREPP}" = "no" ; then
181 ifelse([$2], , :, [$2]) 180 ifelse([$2], , :, [$2])
182 else 181 else
183 if test "${HAVE_PCRE}" != "yes" ; then 182 if test "${HAVE_PCRE}" != "yes" ; then
184 ifelse([$2], , :, [$2]) 183 ifelse([$2], , :, [$2])
185 else 184 else
186 if test -z "${PCREPP_CONFIG}" ; then 185 if test -z "${PCREPP_CONFIG}" ; then
187 AC_PATH_PROG([PCREPP_CONFIG],[pcre++-config],false,[${PCREPP_LOCATIONS}]) 186 AC_PATH_PROG([PCREPP_CONFIG],[pcre++-config],false,[${PCREPP_LOCATIONS}])
188 if test "${PCREPP_CONFIG}" = "false" ; then 187 if test "${PCREPP_CONFIG}" = "false" ; then
189 ifelse([$2], , :, [$2]) 188 ifelse([$2], , :, [$2])
190 else 189 else
191 HAVE_PCREPP="yes" 190 HAVE_PCREPP="yes"
192 PCREPP_PREFIX="`${PCREPP_CONFIG} --prefix`" 191 PCREPP_PREFIX="`${PCREPP_CONFIG} --prefix`"
193 PCREPP_EXEC_PREFIX="`${PCREPP_CONFIG} --exec-prefix`" 192 PCREPP_EXEC_PREFIX="`${PCREPP_CONFIG} --exec-prefix`"
194 PCREPP_VERSION="`${PCREPP_CONFIG} --version`" 193 PCREPP_VERSION="`${PCREPP_CONFIG} --version`"
195 PCREPP_CFLAGS="`${PCREPP_CONFIG} --cflags` ${PCRE_CFLAGS}" 194 PCREPP_CFLAGS="`${PCREPP_CONFIG} --cflags` ${PCRE_CFLAGS}"
196 PCREPP_LIBS="`${PCREPP_CONFIG} --libs` ${PCRE_LIBS}" 195 PCREPP_LIBS="`${PCREPP_CONFIG} --libs` ${PCRE_LIBS}"
197 AC_SUBST([PCREPP_CONFIG]) 196 AC_SUBST([PCREPP_CONFIG])
198 AC_SUBST([PCREPP_PREFIX]) 197 AC_SUBST([PCREPP_PREFIX])
199 AC_SUBST([PCREPP_EXEC_PREFIX]) 198 AC_SUBST([PCREPP_EXEC_PREFIX])
200 AC_SUBST([PCREPP_VERSION]) 199 AC_SUBST([PCREPP_VERSION])
201 AC_SUBST([PCREPP_CFLAGS]) 200 AC_SUBST([PCREPP_CFLAGS])
202 AC_SUBST([PCREPP_LIBS]) 201 AC_SUBST([PCREPP_LIBS])
203 AC_DEFINE([HAVE_PCREPP],,[pcre++ support]) 202 AC_DEFINE([HAVE_PCREPP],,[pcre++ support])
204 AC_DEFINE_UNQUOTED([PCREPP_VERSION],["${PCREPP_VERSION}"],[pcre++ version]) 203 AC_DEFINE_UNQUOTED([PCREPP_VERSION],["${PCREPP_VERSION}"],[pcre++ version])
205 $1 204 $1
206 fi 205 fi
207 fi 206 fi
208 fi 207 fi
209 fi 208 fi
210 AM_CONDITIONAL([HAVE_PCREPP],[test "${HAVE_PCREPP}" = "yes"])
211]) 209])
212 210
213m4_include([acinclude.d/libcurl.m4]) 211m4_include([acinclude.d/libcurl.m4])