]>
Commit | Line | Data |
---|---|---|
f2c2d395 MW |
1 | dnl configure.in for linux strongSwan |
2 | dnl Copyright (C) 2006 Martin Willi | |
3 | dnl Hochschule fuer Technik Rapperswil | |
4 | dnl | |
5 | dnl This program is free software; you can redistribute it and/or modify it | |
6 | dnl under the terms of the GNU General Public License as published by the | |
7 | dnl Free Software Foundation; either version 2 of the License, or (at your | |
8 | dnl option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>. | |
9 | dnl | |
10 | dnl This program is distributed in the hope that it will be useful, but | |
11 | dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | |
12 | dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
13 | dnl for more details. | |
14 | ||
15 | dnl =========================== | |
16 | dnl initialize & set some vars | |
17 | dnl =========================== | |
18 | ||
7c0c0aac | 19 | AC_INIT(strongSwan,4.2.2) |
5e5f0bd4 | 20 | AM_INIT_AUTOMAKE(tar-ustar) |
f2c2d395 | 21 | AC_C_BIGENDIAN |
f2c2d395 | 22 | AC_SUBST(confdir, '${sysconfdir}') |
a47486b5 | 23 | PKG_PROG_PKG_CONFIG |
f2c2d395 | 24 | |
db26d00e MW |
25 | dnl ================================= |
26 | dnl check --enable-xxx & --with-xxx | |
27 | dnl ================================= | |
28 | ||
29 | ||
30 | AC_ARG_WITH( | |
6b9290ff MW |
31 | [default-pkcs11], |
32 | AS_HELP_STRING([--with-default-pkcs11=lib],[set the default PKCS11 library other than "/usr/lib/opensc-pkcs11.so"]), | |
33 | [AC_DEFINE_UNQUOTED(PKCS11_DEFAULT_LIB, "$withval")], | |
34 | [AC_DEFINE_UNQUOTED(PKCS11_DEFAULT_LIB, "/usr/lib/opensc-pkcs11.so")] | |
db26d00e MW |
35 | ) |
36 | ||
195307b5 | 37 | AC_ARG_WITH( |
6b9290ff MW |
38 | [xauth-module], |
39 | AS_HELP_STRING([--with-xauth-module=lib],[set the path to the XAUTH module]), | |
40 | [AC_DEFINE_UNQUOTED(XAUTH_DEFAULT_LIB, "$withval")], | |
195307b5 AS |
41 | ) |
42 | ||
db26d00e | 43 | AC_ARG_WITH( |
6b9290ff MW |
44 | [random-device], |
45 | AS_HELP_STRING([--with-random-device=dev],[set the device for real random data other than "/dev/random"]), | |
46 | [AC_DEFINE_UNQUOTED(DEV_RANDOM, "$withval")], | |
47 | [AC_DEFINE_UNQUOTED(DEV_RANDOM, "/dev/random")] | |
db26d00e | 48 | ) |
c60c7694 | 49 | AC_ARG_WITH( |
6b9290ff MW |
50 | [resolv-conf], |
51 | AS_HELP_STRING([--with-resolv-conf=file],[set the file to store DNS server information other than "sysconfdir/resolv.conf"]), | |
52 | [AC_DEFINE_UNQUOTED(RESOLV_CONF, "$withval")], | |
53 | [AC_DEFINE_UNQUOTED(RESOLV_CONF, "${sysconfdir}/resolv.conf")] | |
c60c7694 | 54 | ) |
db26d00e | 55 | |
ff867d06 MW |
56 | AC_ARG_WITH( |
57 | [strongswan-conf], | |
58 | AS_HELP_STRING([--with-strongswan-conf=file],[strongswan.conf file other than "sysconfdir/strongswan.conf"]), | |
59 | [AC_DEFINE_UNQUOTED(STRONGSWAN_CONF, "$withval")], | |
60 | [AC_DEFINE_UNQUOTED(STRONGSWAN_CONF, "${sysconfdir}/strongswan.conf")] | |
61 | ) | |
62 | ||
db26d00e | 63 | AC_ARG_WITH( |
6b9290ff MW |
64 | [urandom-device], |
65 | AS_HELP_STRING([--with-urandom-device=dev],[set the device for pseudo random data other than "/dev/urandom"]), | |
66 | [AC_DEFINE_UNQUOTED(DEV_URANDOM, "$withval")], | |
67 | [AC_DEFINE_UNQUOTED(DEV_URANDOM, "/dev/urandom")] | |
db26d00e | 68 | ) |
f2c2d395 | 69 | |
dfc14c84 | 70 | AC_ARG_WITH( |
6b9290ff MW |
71 | [piddir], |
72 | AS_HELP_STRING([--with-piddir=dir],[path for PID and UNIX socket files other than "/var/run"]), | |
73 | [AC_SUBST(piddir, "$withval")], | |
74 | [AC_SUBST(piddir, "/var/run")] | |
dfc14c84 AS |
75 | ) |
76 | ||
f27f6296 | 77 | AC_ARG_WITH( |
6b9290ff MW |
78 | [ipsecdir], |
79 | AS_HELP_STRING([--with-ipsecdir=dir],[installation path for ipsec tools other than "libexecdir/ipsec"]), | |
80 | [AC_SUBST(ipsecdir, "$withval")], | |
81 | [AC_SUBST(ipsecdir, "${libexecdir}/ipsec")] | |
f27f6296 | 82 | ) |
552cc11b | 83 | AC_SUBST(plugindir, "${ipsecdir}/plugins") |
f27f6296 MW |
84 | |
85 | AC_ARG_WITH( | |
6b9290ff MW |
86 | [plugindir], |
87 | AS_HELP_STRING([--with-plugindir=dir],[installation path for plugins other than "ipsecdir/plugins"]), | |
88 | [AC_SUBST(plugindir, "$withval")], | |
89 | [AC_SUBST(plugindir, "${ipsecdir}/plugins")] | |
f27f6296 MW |
90 | ) |
91 | ||
d560c849 | 92 | AC_ARG_WITH( |
6b9290ff MW |
93 | [sim-reader], |
94 | AS_HELP_STRING([--with-sim-reader=library.so],[library containing the sim_run_alg()/sim_get_triplet() function for EAP-SIM]), | |
95 | [AC_SUBST(simreader, "$withval")], | |
96 | [AC_SUBST(simreader, "${plugindir}/libeapsim-file.so")] | |
d560c849 MW |
97 | ) |
98 | ||
04a7b6d8 | 99 | AC_ARG_WITH( |
6b9290ff MW |
100 | [linux-headers], |
101 | AS_HELP_STRING([--with-linux-headers=dir],[use the linux header files in dir instead of the supplied ones in "src/include"]), | |
102 | [AC_SUBST(linuxdir, "$withval")], [AC_SUBST(linuxdir, "../include")] | |
04a7b6d8 MW |
103 | ) |
104 | AC_SUBST(LINUX_HEADERS) | |
105 | ||
4e411c83 | 106 | AC_ARG_WITH( |
6b9290ff MW |
107 | [routing-table], |
108 | AS_HELP_STRING([--with-routing-table=num],[use routing table for IPsec routes (default: 220)]), | |
109 | [AC_DEFINE_UNQUOTED(IPSEC_ROUTING_TABLE, $withval) AC_SUBST(IPSEC_ROUTING_TABLE, "$withval")], | |
110 | [AC_DEFINE_UNQUOTED(IPSEC_ROUTING_TABLE, 220) AC_SUBST(IPSEC_ROUTING_TABLE, "220")] | |
0739cca9 MW |
111 | ) |
112 | ||
113 | AC_ARG_WITH( | |
6b9290ff MW |
114 | [routing-table-prio], |
115 | AS_HELP_STRING([--with-routing-table-prio=prio],[priority for IPsec routing table (default: 220)]), | |
116 | [AC_DEFINE_UNQUOTED(IPSEC_ROUTING_TABLE_PRIO, $withval) AC_SUBST(IPSEC_ROUTING_TABLE_PRIO, "$withval")], | |
117 | [AC_DEFINE_UNQUOTED(IPSEC_ROUTING_TABLE_PRIO, 220) AC_SUBST(IPSEC_ROUTING_TABLE_PRIO, "220")] | |
4e411c83 MW |
118 | ) |
119 | ||
6874bf69 | 120 | AC_ARG_WITH( |
6b9290ff MW |
121 | [uid], |
122 | AS_HELP_STRING([--with-uid=uid],[change user of the daemons to UID after startup (default is 0).]), | |
123 | [AC_DEFINE_UNQUOTED(IPSEC_UID, $withval) AC_SUBST(ipsecuid, "$withval")], | |
124 | [AC_DEFINE_UNQUOTED(IPSEC_UID, 0) AC_SUBST(ipsecuid, "0")] | |
6874bf69 MW |
125 | ) |
126 | ||
127 | AC_ARG_WITH( | |
6b9290ff MW |
128 | [gid], |
129 | AS_HELP_STRING([--with-gid=gid],[change group of the daemons to GID after startup (default is 0).]), | |
130 | [AC_DEFINE_UNQUOTED(IPSEC_GID, $withval) AC_SUBST(ipsecgid, "$withval")], | |
131 | [AC_DEFINE_UNQUOTED(IPSEC_GID, 0) AC_SUBST(ipsecgid, "0")] | |
6874bf69 MW |
132 | ) |
133 | ||
f2c2d395 | 134 | AC_ARG_ENABLE( |
6b9290ff MW |
135 | [curl], |
136 | AS_HELP_STRING([--enable-curl],[enable CURL fetcher plugin to fetch files via libcurl (default is NO). Requires libcurl.]), | |
137 | [if test x$enableval = xyes; then | |
138 | curl=true | |
139 | fi] | |
f2c2d395 | 140 | ) |
f2c2d395 MW |
141 | |
142 | AC_ARG_ENABLE( | |
6b9290ff MW |
143 | [ldap], |
144 | AS_HELP_STRING([--enable-ldap],[enable LDAP fetching plugin to fetch files via libldap (default is NO). Requires openLDAP.]), | |
145 | [if test x$enableval = xyes; then | |
146 | ldap=true | |
147 | fi] | |
f2c2d395 | 148 | ) |
552cc11b MW |
149 | |
150 | AC_ARG_ENABLE( | |
6b9290ff MW |
151 | [aes], |
152 | AS_HELP_STRING([--disable-aes],[disable own AES software implementation plugin. (default is NO).]), | |
153 | [if test x$enableval = xyes; then | |
154 | aes=true | |
155 | else | |
156 | aes=false | |
157 | fi], | |
158 | aes=true | |
552cc11b | 159 | ) |
552cc11b MW |
160 | |
161 | AC_ARG_ENABLE( | |
6b9290ff MW |
162 | [des], |
163 | AS_HELP_STRING([--disable-des],[disable own DES/3DES software implementation plugin. (default is NO).]), | |
164 | [if test x$enableval = xyes; then | |
165 | des=true | |
166 | else | |
167 | des=false | |
168 | fi], | |
169 | des=true | |
552cc11b | 170 | ) |
552cc11b MW |
171 | |
172 | AC_ARG_ENABLE( | |
6b9290ff MW |
173 | [md5], |
174 | AS_HELP_STRING([--disable-md5],[disable own MD5 software implementation plugin. (default is NO).]), | |
175 | [if test x$enableval = xyes; then | |
176 | md5=true | |
177 | else | |
178 | md5=false | |
179 | fi], | |
180 | md5=true | |
552cc11b | 181 | ) |
552cc11b MW |
182 | |
183 | AC_ARG_ENABLE( | |
6b9290ff MW |
184 | [sha1], |
185 | AS_HELP_STRING([--disable-sha1],[disable own SHA1 software implementation plugin. (default is NO).]), | |
186 | [if test x$enableval = xyes; then | |
187 | sha1=true | |
188 | else | |
189 | sha1=false | |
190 | fi], | |
191 | sha1=true | |
552cc11b | 192 | ) |
552cc11b MW |
193 | |
194 | AC_ARG_ENABLE( | |
6b9290ff MW |
195 | [sha2], |
196 | AS_HELP_STRING([--disable-sha2],[disable own SHA256/SHA384/SHA512 software implementation plugin. (default is NO).]), | |
197 | [if test x$enableval = xyes; then | |
198 | sha2=true | |
199 | else | |
200 | sha2=false | |
201 | fi], | |
202 | sha2=true | |
552cc11b | 203 | ) |
552cc11b MW |
204 | |
205 | AC_ARG_ENABLE( | |
6b9290ff MW |
206 | [fips-prf], |
207 | AS_HELP_STRING([--disable-fips-prf],[disable FIPS PRF software implementation plugin. (default is NO).]), | |
208 | [if test x$enableval = xyes; then | |
209 | fips_prf=true | |
210 | else | |
211 | fips_prf=false | |
212 | fi], | |
213 | fips_prf=true | |
552cc11b | 214 | ) |
552cc11b MW |
215 | |
216 | AC_ARG_ENABLE( | |
6b9290ff MW |
217 | [gmp], |
218 | AS_HELP_STRING([--disable-gmp],[disable own GNU MP (libgmp) based crypto implementation plugin. (default is NO).]), | |
219 | [if test x$enableval = xyes; then | |
220 | gmp=true | |
221 | else | |
222 | gmp=false | |
223 | fi], | |
224 | gmp=true | |
552cc11b | 225 | ) |
552cc11b | 226 | |
6a365f07 MW |
227 | AC_ARG_ENABLE( |
228 | [random], | |
229 | AS_HELP_STRING([--disable-random],[disable RNG implementation on top of /dev/(u)random. (default is NO).]), | |
230 | [if test x$enableval = xyes; then | |
231 | random=true | |
232 | else | |
233 | random=false | |
234 | fi], | |
235 | random=true | |
236 | ) | |
237 | ||
552cc11b | 238 | AC_ARG_ENABLE( |
6b9290ff MW |
239 | [x509], |
240 | AS_HELP_STRING([--disable-x509],[disable own X509 certificate implementation plugin. (default is NO).]), | |
241 | [if test x$enableval = xyes; then | |
242 | x509=true | |
243 | else | |
244 | x509=false | |
245 | fi], | |
246 | x509=true | |
552cc11b | 247 | ) |
552cc11b MW |
248 | |
249 | AC_ARG_ENABLE( | |
6b9290ff MW |
250 | [hmac], |
251 | AS_HELP_STRING([--disable-hmac],[disable HMAC crypto implementation plugin. (default is NO).]), | |
252 | [if test x$enableval = xyes; then | |
253 | hmac=true | |
254 | else | |
255 | hmac=false | |
256 | fi], | |
257 | hmac=true | |
552cc11b | 258 | ) |
552cc11b MW |
259 | |
260 | AC_ARG_ENABLE( | |
6b9290ff MW |
261 | [mysql], |
262 | AS_HELP_STRING([--enable-mysql],[enable MySQL database support (default is NO). Requires libmysqlclient_r.]), | |
263 | [if test x$enableval = xyes; then | |
264 | mysql=true | |
265 | fi] | |
552cc11b | 266 | ) |
552cc11b MW |
267 | |
268 | AC_ARG_ENABLE( | |
6b9290ff MW |
269 | [sqlite], |
270 | AS_HELP_STRING([--enable-sqlite],[enable SQLite database support (default is NO). Requires libsqlite3.]), | |
271 | [if test x$enableval = xyes; then | |
272 | sqlite=true | |
273 | fi] | |
552cc11b | 274 | ) |
f2c2d395 | 275 | |
cbfb2aff | 276 | AC_ARG_ENABLE( |
6b9290ff MW |
277 | [stroke], |
278 | AS_HELP_STRING([--disable-stroke],[disable charons stroke (pluto compatibility) configuration backend. (default is NO).]), | |
279 | [if test x$enableval = xyes; then | |
280 | stroke=true | |
281 | else | |
282 | stroke=false | |
283 | fi], | |
284 | stroke=true | |
cbfb2aff | 285 | ) |
cbfb2aff | 286 | |
552cc11b | 287 | AC_ARG_ENABLE( |
6b9290ff MW |
288 | [med-db], |
289 | AS_HELP_STRING([--enable-med-db],[enable MySQL mediation database plugin (default is NO).]), | |
290 | [if test x$enableval = xyes; then | |
291 | med_db=true | |
292 | fi] | |
552cc11b | 293 | ) |
552cc11b | 294 | |
a84fb01b | 295 | AC_ARG_ENABLE( |
6b9290ff MW |
296 | [smp], |
297 | AS_HELP_STRING([--enable-smp],[enable SMP configuration and control interface (default is NO). Requires libxml.]), | |
298 | [if test x$enableval = xyes; then | |
299 | smp=true | |
300 | fi] | |
a84fb01b | 301 | ) |
a84fb01b MW |
302 | |
303 | AC_ARG_ENABLE( | |
6b9290ff MW |
304 | [sql], |
305 | AS_HELP_STRING([--enable-sql],[enable SQL database configuration backend (default is NO).]), | |
306 | [if test x$enableval = xyes; then | |
307 | sql=true | |
308 | fi] | |
a84fb01b | 309 | ) |
a84fb01b | 310 | |
8f561d44 | 311 | AC_ARG_ENABLE( |
6b9290ff MW |
312 | [smartcard], |
313 | AS_HELP_STRING([--enable-smartcard],[enable smartcard support (default is NO).]), | |
314 | [if test x$enableval = xyes; then | |
315 | smartcard=true | |
316 | fi] | |
8f561d44 | 317 | ) |
8f561d44 | 318 | |
f2c2d395 | 319 | AC_ARG_ENABLE( |
6b9290ff MW |
320 | [cisco-quirks], |
321 | AS_HELP_STRING([--enable-cisco-quirks],[enable support of Cisco VPN client (default is NO).]), | |
322 | [if test x$enableval = xyes; then | |
323 | cisco_quirks=true | |
324 | fi] | |
f2c2d395 | 325 | ) |
f2c2d395 | 326 | |
2df45a73 | 327 | AC_ARG_ENABLE( |
6b9290ff MW |
328 | [leak-detective], |
329 | AS_HELP_STRING([--enable-leak-detective],[enable malloc hooks to find memory leaks (default is NO).]), | |
330 | [if test x$enableval = xyes; then | |
331 | leak_detective=true | |
332 | fi] | |
2df45a73 | 333 | ) |
2df45a73 | 334 | |
f2c2d395 | 335 | AC_ARG_ENABLE( |
6b9290ff MW |
336 | [unit-tests], |
337 | AS_HELP_STRING([--enable-unit-tests],[enable unit tests on IKEv2 daemon startup (default is NO).]), | |
338 | [if test x$enableval = xyes; then | |
339 | unittest=true | |
340 | fi] | |
f2c2d395 | 341 | ) |
f2c2d395 | 342 | |
552cc11b | 343 | AC_ARG_ENABLE( |
6b9290ff MW |
344 | [eap-sim], |
345 | AS_HELP_STRING([--enable-eap-sim],[build SIM authenication module for EAP (default is NO).]), | |
346 | [if test x$enableval = xyes; then | |
347 | eap_sim=true | |
348 | fi] | |
552cc11b | 349 | ) |
552cc11b | 350 | |
b0f24449 | 351 | AC_ARG_ENABLE( |
6b9290ff MW |
352 | [eap-identity], |
353 | AS_HELP_STRING([--enable-eap-identity],[build EAP module providing EAP-Identity helper (default is NO).]), | |
354 | [if test x$enableval = xyes; then | |
355 | eap_identity=true | |
356 | fi] | |
b0f24449 | 357 | ) |
cbfb2aff MW |
358 | |
359 | AC_ARG_ENABLE( | |
6b9290ff MW |
360 | [eap-md5], |
361 | AS_HELP_STRING([--enable-eap-md5],[build MD5 (CHAP) authenication module for EAP (default is NO).]), | |
362 | [if test x$enableval = xyes; then | |
363 | eap_md5=true | |
364 | fi] | |
cbfb2aff | 365 | ) |
26e24676 MW |
366 | |
367 | AC_ARG_ENABLE( | |
6b9290ff MW |
368 | [eap-aka], |
369 | AS_HELP_STRING([--enable-eap-aka],[build AKA authentication module for EAP (default is NO).]), | |
370 | [if test x$enableval = xyes; then | |
371 | eap_aka=true | |
372 | fi] | |
26e24676 | 373 | ) |
b0f24449 | 374 | |
7b0c588a | 375 | AC_ARG_ENABLE( |
6b9290ff MW |
376 | [nat-transport], |
377 | AS_HELP_STRING([--enable-nat-transport],[enable NAT traversal with IPsec transport mode (default is NO).]), | |
378 | [if test x$enableval = xyes; then | |
379 | nat_transport=true | |
380 | fi] | |
7b0c588a | 381 | ) |
7b0c588a AS |
382 | |
383 | AC_ARG_ENABLE( | |
6b9290ff MW |
384 | [vendor-id], |
385 | AS_HELP_STRING([--disable-vendor-id],[disable the sending of the strongSwan vendor ID (default is NO).]), | |
386 | [if test x$enableval = xyes; then | |
387 | vendor_id=true | |
388 | else | |
389 | vendor_id=false | |
390 | fi], | |
391 | vendor_id=true | |
7b0c588a | 392 | ) |
7b0c588a | 393 | |
0e307360 | 394 | AC_ARG_ENABLE( |
6b9290ff MW |
395 | [xauth-vid], |
396 | AS_HELP_STRING([--disable-xauth-vid],[disable the sending of the XAUTH vendor ID (default is NO).]), | |
397 | [if test x$enableval = xyes; then | |
398 | xauth_vid=true | |
399 | else | |
400 | xauth_vid=false | |
401 | fi], | |
402 | xauth_vid=true | |
0e307360 | 403 | ) |
0e307360 | 404 | |
fd4ded97 | 405 | AC_ARG_ENABLE( |
6b9290ff MW |
406 | [dumm], |
407 | AS_HELP_STRING([--enable-dumm],[build the DUMM UML test framework (default is NO).]), | |
408 | [if test x$enableval = xyes; then | |
409 | dumm=true | |
410 | fi] | |
fd4ded97 | 411 | ) |
fd4ded97 | 412 | |
552cc11b | 413 | AC_ARG_ENABLE( |
6b9290ff MW |
414 | [fast], |
415 | AS_HELP_STRING([--enable-fast],[build libfast (FastCGI Application Server w/ templates (default is NO).]), | |
416 | [if test x$enableval = xyes; then | |
417 | fast=true | |
418 | fi] | |
552cc11b | 419 | ) |
552cc11b | 420 | |
b8c7453a | 421 | AC_ARG_ENABLE( |
6b9290ff MW |
422 | [manager], |
423 | AS_HELP_STRING([--enable-manager],[build web management console (default is NO).]), | |
424 | [if test x$enableval = xyes; then | |
425 | manager=true | |
426 | xml=true | |
427 | fi] | |
b8c7453a | 428 | ) |
b8c7453a | 429 | |
d5cc1758 | 430 | AC_ARG_ENABLE( |
6b9290ff MW |
431 | [mediation], |
432 | AS_HELP_STRING([--enable-mediation],[enable IKEv2 Mediation Extension (default is NO).]), | |
433 | [if test x$enableval = xyes; then | |
434 | me=true | |
435 | fi] | |
d5cc1758 | 436 | ) |
d5cc1758 | 437 | |
9ee1111d | 438 | AC_ARG_ENABLE( |
6b9290ff MW |
439 | [integrity-test], |
440 | AS_HELP_STRING([--enable-integrity-test],[enable the integrity test of the crypto library (default is NO).]), | |
441 | [if test x$enableval = xyes; then | |
442 | integrity_test=true | |
443 | fi] | |
9ee1111d | 444 | ) |
9ee1111d AS |
445 | |
446 | AC_ARG_ENABLE( | |
6b9290ff MW |
447 | [self-test], |
448 | AS_HELP_STRING([--disable-self-test],[disable the self-test of the crypto library (default is NO).]), | |
449 | [if test x$enableval = xyes; then | |
450 | self_test=true | |
451 | else | |
452 | self_test=false | |
453 | fi], | |
454 | self_test=true | |
9ee1111d | 455 | ) |
9ee1111d | 456 | |
733f336a | 457 | AC_ARG_ENABLE( |
6b9290ff MW |
458 | [pluto], |
459 | AS_HELP_STRING([--disable-pluto],[disable the IKEv1 keying daemon pluto. (default is NO).]), | |
460 | [if test x$enableval = xyes; then | |
461 | pluto=true | |
462 | else | |
463 | pluto=false | |
464 | fi], | |
465 | pluto=true | |
cbfb2aff | 466 | ) |
cbfb2aff MW |
467 | |
468 | AC_ARG_ENABLE( | |
6b9290ff MW |
469 | [charon], |
470 | AS_HELP_STRING([--disable-charon],[disable the IKEv2 keying daemon charon. (default is NO).]), | |
471 | [if test x$enableval = xyes; then | |
472 | charon=true | |
473 | else | |
474 | charon=false | |
475 | fi], | |
476 | charon=true | |
cbfb2aff | 477 | ) |
cbfb2aff MW |
478 | |
479 | AC_ARG_ENABLE( | |
6b9290ff MW |
480 | [tools], |
481 | AS_HELP_STRING([--disable-tools],[disable additional utilities (openac and scepclient). (default is NO).]), | |
482 | [if test x$enableval = xyes; then | |
483 | tools=true | |
484 | else | |
485 | tools=false | |
486 | fi], | |
487 | tools=true | |
733f336a | 488 | ) |
733f336a | 489 | |
36d62fac MW |
490 | AC_ARG_ENABLE( |
491 | [padlock], | |
492 | AS_HELP_STRING([--enable-padlock],[enables VIA Padlock crypto plugin. (default is NO).]), | |
493 | [if test x$enableval = xyes; then | |
494 | padlock=true | |
495 | else | |
496 | padlock=false | |
497 | fi], | |
498 | ) | |
499 | ||
17353034 TB |
500 | AC_ARG_ENABLE( |
501 | [openssl], | |
502 | AS_HELP_STRING([--enable-openssl],[enables the OpenSSL crypto plugin. (default is NO).]), | |
503 | [if test x$enableval = xyes; then | |
504 | openssl=true | |
505 | else | |
506 | openssl=false | |
507 | fi], | |
508 | ) | |
509 | ||
f2c2d395 MW |
510 | dnl ========================= |
511 | dnl check required programs | |
512 | dnl ========================= | |
513 | ||
514 | AC_PROG_INSTALL | |
515 | AC_PROG_LIBTOOL | |
516 | AC_PROG_LEX | |
517 | AC_PROG_YACC | |
4986554f | 518 | AC_PROG_CC() |
298b06c2 MW |
519 | AC_PATH_PROG([GPERF], [gperf], [], [$PATH:/bin:/usr/bin:/usr/local/bin]) |
520 | AC_PATH_PROG([PERL], [perl], [], [$PATH:/bin:/usr/bin:/usr/local/bin]) | |
f2c2d395 | 521 | |
6b9290ff MW |
522 | dnl ========================= |
523 | dnl dependency calculation | |
524 | dnl ========================= | |
f2c2d395 | 525 | |
6b9290ff MW |
526 | if test x$pluto = xtrue; then |
527 | gmp=true; | |
528 | fi | |
529 | ||
530 | if test x$tools = xtrue; then | |
531 | gmp=true; | |
532 | fi | |
552cc11b | 533 | |
6b9290ff MW |
534 | if test x$smp = xtrue; then |
535 | xml=true | |
536 | fi | |
537 | ||
538 | if test x$manager = xtrue; then | |
539 | fast=true | |
540 | fi | |
541 | ||
542 | dnl ========================================== | |
543 | dnl check required libraries and header files | |
544 | dnl ========================================== | |
545 | ||
546 | AC_HAVE_LIBRARY(dl) | |
4986554f | 547 | AC_CHECK_FUNCS(backtrace) |
552cc11b | 548 | AC_CHECK_FUNCS(dladdr) |
e696757c | 549 | |
6b9290ff MW |
550 | AC_MSG_CHECKING([capset() definition]) |
551 | AC_TRY_COMPILE( | |
552 | [#include <linux/capset.h>], | |
553 | [ | |
554 | void *test = capset; | |
555 | ], | |
556 | [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); AC_DEFINE_UNQUOTED(NO_CAPSET_DEFINED, 1)] | |
557 | ) | |
558 | ||
559 | if test x$gmp = xtrue; then | |
560 | AC_HAVE_LIBRARY([gmp],[LIBS="$LIBS"],[AC_MSG_ERROR([GNU Multi Precision library gmp not found])]) | |
561 | AC_MSG_CHECKING([gmp.h version >= 4.1.4]) | |
562 | AC_TRY_COMPILE( | |
563 | [#include "gmp.h"], | |
564 | [ | |
565 | #if (__GNU_MP_VERSION*100 + __GNU_MP_VERSION_MINOR*10 + __GNU_MP_VERSION_PATCHLEVEL) < 414 | |
566 | #error bad gmp | |
567 | #endif | |
568 | ], | |
569 | [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); AC_MSG_ERROR([No usable gmp.h found!])] | |
570 | ) | |
f2c2d395 | 571 | fi |
6b9290ff MW |
572 | |
573 | if test x$ldap = xtrue; then | |
574 | AC_HAVE_LIBRARY([ldap],[LIBS="$LIBS"],[AC_MSG_ERROR([LDAP library ldap not found])]) | |
575 | AC_HAVE_LIBRARY([lber],[LIBS="$LIBS"],[AC_MSG_ERROR([LDAP library lber not found])]) | |
576 | AC_CHECK_HEADER([ldap.h],,[AC_MSG_ERROR([LDAP header ldap.h not found!])]) | |
f2c2d395 MW |
577 | fi |
578 | ||
6b9290ff MW |
579 | if test x$curl = xtrue; then |
580 | AC_HAVE_LIBRARY([curl],[LIBS="$LIBS"],[AC_MSG_ERROR([CURL library curl not found])]) | |
581 | AC_CHECK_HEADER([curl/curl.h],,[AC_MSG_ERROR([CURL header curl/curl.h not found!])]) | |
582 | fi | |
583 | ||
584 | if test x$xml = xtrue; then | |
a47486b5 | 585 | PKG_CHECK_MODULES(xml, [libxml-2.0]) |
f2d6355e MW |
586 | AC_SUBST(xml_CFLAGS) |
587 | AC_SUBST(xml_LIBS) | |
588 | fi | |
589 | ||
a47486b5 MW |
590 | if test x$dumm = xtrue; then |
591 | PKG_CHECK_MODULES(gtk, [gtk+-2.0 vte]) | |
592 | AC_SUBST(gtk_CFLAGS) | |
593 | AC_SUBST(gtk_LIBS) | |
594 | fi | |
595 | ||
6b9290ff MW |
596 | if test x$fast = xtrue; then |
597 | AC_HAVE_LIBRARY([neo_cgi],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver library neo_cgi not found!])]) | |
598 | AC_HAVE_LIBRARY([neo_utl],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver library neo_utl not found!])]) | |
599 | AC_HAVE_LIBRARY([z],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver dependency zlib not found!])]) | |
600 | dnl autoconf does not like CamelCase!? How to fix this? | |
601 | dnl AC_CHECK_HEADER([ClearSilver/ClearSilver.h],,[AC_MSG_ERROR([ClearSilver header file ClearSilver/ClearSilver.h not found!])]) | |
602 | ||
603 | AC_HAVE_LIBRARY([fcgi],[LIBS="$LIBS"],[AC_MSG_ERROR([FastCGI library fcgi not found!])]) | |
604 | AC_CHECK_HEADER([fcgiapp.h],,[AC_MSG_ERROR([FastCGI header file fcgiapp.h not found!])]) | |
a84fb01b MW |
605 | fi |
606 | ||
6b9290ff MW |
607 | if test x$mysql = xtrue; then |
608 | AC_HAVE_LIBRARY([mysqlclient_r],[LIBS="$LIBS"],[AC_MSG_ERROR([MySQL library mysqlclient_r not found])]) | |
609 | AC_CHECK_HEADER([mysql/mysql.h],,[AC_MSG_ERROR([MySQL header mysql/mysql.h not found!])]) | |
610 | fi | |
f2c2d395 | 611 | |
6b9290ff MW |
612 | if test x$mysql = xtrue; then |
613 | AC_HAVE_LIBRARY([sqlite3],[LIBS="$LIBS"],[AC_MSG_ERROR([SQLite library sqlite3 not found])]) | |
614 | AC_CHECK_HEADER([sqlite3.h],,[AC_MSG_ERROR([SQLite header sqlite3.h not found!])]) | |
615 | fi | |
f2c2d395 | 616 | |
17353034 TB |
617 | if test x$openssl = xtrue; then |
618 | AC_HAVE_LIBRARY([ssl],[LIBS="$LIBS"],[AC_MSG_ERROR([OpenSSL library ssl not found])]) | |
619 | AC_CHECK_HEADER([openssl/evp.h],,[AC_MSG_ERROR([OpenSSL header openssl/evp.h not found!])]) | |
620 | fi | |
621 | ||
6b9290ff MW |
622 | dnl ========================= |
623 | dnl set Makefile.am vars | |
624 | dnl ========================= | |
f2c2d395 | 625 | |
6b9290ff MW |
626 | AM_CONDITIONAL(USE_CURL, test x$curl = xtrue) |
627 | AM_CONDITIONAL(USE_LDAP, test x$ldap = xtrue) | |
628 | AM_CONDITIONAL(USE_AES, test x$aes = xtrue) | |
629 | AM_CONDITIONAL(USE_DES, test x$des = xtrue) | |
630 | AM_CONDITIONAL(USE_MD5, test x$md5 = xtrue) | |
631 | AM_CONDITIONAL(USE_SHA1, test x$sha1 = xtrue) | |
632 | AM_CONDITIONAL(USE_SHA2, test x$sha2 = xtrue) | |
633 | AM_CONDITIONAL(USE_FIPS_PRF, test x$fips_prf = xtrue) | |
634 | AM_CONDITIONAL(USE_GMP, test x$gmp = xtrue) | |
6a365f07 | 635 | AM_CONDITIONAL(USE_RANDOM, test x$random = xtrue) |
6b9290ff MW |
636 | AM_CONDITIONAL(USE_X509, test x$x509 = xtrue) |
637 | AM_CONDITIONAL(USE_HMAC, test x$hmac = xtrue) | |
638 | AM_CONDITIONAL(USE_MYSQL, test x$mysql = xtrue) | |
639 | AM_CONDITIONAL(USE_SQLITE, test x$sqlite = xtrue) | |
640 | AM_CONDITIONAL(USE_STROKE, test x$stroke = xtrue) | |
641 | AM_CONDITIONAL(USE_MED_DB, test x$med_db = xtrue) | |
642 | AM_CONDITIONAL(USE_SMP, test x$smp = xtrue) | |
643 | AM_CONDITIONAL(USE_SQL, test x$sql = xtrue) | |
644 | AM_CONDITIONAL(USE_SMARTCARD, test x$smartcard = xtrue) | |
645 | AM_CONDITIONAL(USE_CISCO_QUIRKS, test x$cisco_quirks = xtrue) | |
646 | AM_CONDITIONAL(USE_LEAK_DETECTIVE, test x$leak_detective = xtrue) | |
647 | AM_CONDITIONAL(USE_UNIT_TESTS, test x$unittest = xtrue) | |
648 | AM_CONDITIONAL(USE_EAP_SIM, test x$eap_sim = xtrue) | |
649 | AM_CONDITIONAL(USE_EAP_IDENTITY, test x$eap_identity = xtrue) | |
650 | AM_CONDITIONAL(USE_EAP_MD5, test x$eap_md5 = xtrue) | |
651 | AM_CONDITIONAL(USE_EAP_AKA, test x$eap_aka = xtrue) | |
652 | AM_CONDITIONAL(USE_NAT_TRANSPORT, test x$nat_transport = xtrue) | |
653 | AM_CONDITIONAL(USE_VENDORID, test x$vendor_id = xtrue) | |
654 | AM_CONDITIONAL(USE_XAUTH_VID, test x$xauth_vid = xtrue) | |
655 | AM_CONDITIONAL(USE_DUMM, test x$dumm = xtrue) | |
656 | AM_CONDITIONAL(USE_FAST, test x$fast = xtrue) | |
657 | AM_CONDITIONAL(USE_MANAGER, test x$manager = xtrue) | |
658 | AM_CONDITIONAL(USE_ME, test x$me = xtrue) | |
659 | AM_CONDITIONAL(USE_INTEGRITY_TEST, test x$integrity_test = xtrue) | |
660 | AM_CONDITIONAL(USE_SELF_TEST, test x$self_test = xtrue) | |
661 | AM_CONDITIONAL(USE_PLUTO, test x$pluto = xtrue) | |
662 | AM_CONDITIONAL(USE_CHARON, test x$charon = xtrue) | |
663 | AM_CONDITIONAL(USE_TOOLS, test x$tools = xtrue) | |
664 | AM_CONDITIONAL(USE_PLUTO_OR_CHARON, test x$pluto = xtrue -o x$charon = xtrue) | |
665 | AM_CONDITIONAL(USE_LIBSTRONGSWAN, test x$charon = xtrue -o x$tools = xtrue) | |
666 | AM_CONDITIONAL(USE_FILE_CONFIG, test x$pluto = xtrue -o x$stroke = xtrue) | |
36d62fac | 667 | AM_CONDITIONAL(USE_PADLOCK, test x$padlock = xtrue) |
17353034 | 668 | AM_CONDITIONAL(USE_OPENSSL, test x$openssl = xtrue) |
f2c2d395 | 669 | |
9e72d3bc MW |
670 | dnl ============================== |
671 | dnl set global definitions | |
672 | dnl ============================== | |
673 | ||
674 | if test x$me = xtrue; then | |
675 | AC_DEFINE(ME) | |
676 | fi | |
677 | ||
f2c2d395 MW |
678 | dnl ============================== |
679 | dnl build Makefiles | |
680 | dnl ============================== | |
681 | ||
682 | AC_OUTPUT( | |
683 | Makefile | |
684 | src/Makefile | |
04a7b6d8 | 685 | src/include/Makefile |
f2c2d395 | 686 | src/libstrongswan/Makefile |
552cc11b MW |
687 | src/libstrongswan/plugins/aes/Makefile |
688 | src/libstrongswan/plugins/des/Makefile | |
689 | src/libstrongswan/plugins/md5/Makefile | |
690 | src/libstrongswan/plugins/sha1/Makefile | |
691 | src/libstrongswan/plugins/sha2/Makefile | |
692 | src/libstrongswan/plugins/fips_prf/Makefile | |
693 | src/libstrongswan/plugins/gmp/Makefile | |
6a365f07 | 694 | src/libstrongswan/plugins/random/Makefile |
552cc11b MW |
695 | src/libstrongswan/plugins/hmac/Makefile |
696 | src/libstrongswan/plugins/x509/Makefile | |
697 | src/libstrongswan/plugins/curl/Makefile | |
698 | src/libstrongswan/plugins/ldap/Makefile | |
699 | src/libstrongswan/plugins/mysql/Makefile | |
700 | src/libstrongswan/plugins/sqlite/Makefile | |
36d62fac | 701 | src/libstrongswan/plugins/padlock/Makefile |
17353034 | 702 | src/libstrongswan/plugins/openssl/Makefile |
f2c2d395 MW |
703 | src/libcrypto/Makefile |
704 | src/libfreeswan/Makefile | |
705 | src/pluto/Makefile | |
706 | src/whack/Makefile | |
707 | src/charon/Makefile | |
552cc11b MW |
708 | src/charon/plugins/eap_aka/Makefile |
709 | src/charon/plugins/eap_identity/Makefile | |
710 | src/charon/plugins/eap_md5/Makefile | |
711 | src/charon/plugins/eap_sim/Makefile | |
6b9290ff | 712 | src/charon/plugins/smp/Makefile |
552cc11b MW |
713 | src/charon/plugins/sql/Makefile |
714 | src/charon/plugins/med_db/Makefile | |
715 | src/charon/plugins/stroke/Makefile | |
716 | src/charon/plugins/unit_tester/Makefile | |
f2c2d395 MW |
717 | src/stroke/Makefile |
718 | src/ipsec/Makefile | |
719 | src/starter/Makefile | |
720 | src/_updown/Makefile | |
721 | src/_updown_espmark/Makefile | |
722 | src/_copyright/Makefile | |
723 | src/openac/Makefile | |
724 | src/scepclient/Makefile | |
f2d6355e | 725 | src/dumm/Makefile |
552cc11b | 726 | src/libfast/Makefile |
b8c7453a | 727 | src/manager/Makefile |
9ee1111d | 728 | testing/Makefile |
f2c2d395 | 729 | ) |