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