]>
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 | 259 | |
27d04e05 MW |
260 | AC_ARG_ENABLE( |
261 | [xcbc], | |
262 | AS_HELP_STRING([--disable-xcbc],[disable xcbc crypto implementation plugin. (default is NO).]), | |
263 | [if test x$enableval = xyes; then | |
264 | xcbc=true | |
265 | else | |
266 | xcbc=false | |
267 | fi], | |
268 | xcbc=true | |
269 | ) | |
270 | ||
552cc11b | 271 | AC_ARG_ENABLE( |
6b9290ff MW |
272 | [mysql], |
273 | AS_HELP_STRING([--enable-mysql],[enable MySQL database support (default is NO). Requires libmysqlclient_r.]), | |
274 | [if test x$enableval = xyes; then | |
275 | mysql=true | |
276 | fi] | |
552cc11b | 277 | ) |
552cc11b MW |
278 | |
279 | AC_ARG_ENABLE( | |
6b9290ff MW |
280 | [sqlite], |
281 | AS_HELP_STRING([--enable-sqlite],[enable SQLite database support (default is NO). Requires libsqlite3.]), | |
282 | [if test x$enableval = xyes; then | |
283 | sqlite=true | |
284 | fi] | |
552cc11b | 285 | ) |
f2c2d395 | 286 | |
cbfb2aff | 287 | AC_ARG_ENABLE( |
6b9290ff MW |
288 | [stroke], |
289 | AS_HELP_STRING([--disable-stroke],[disable charons stroke (pluto compatibility) configuration backend. (default is NO).]), | |
290 | [if test x$enableval = xyes; then | |
291 | stroke=true | |
292 | else | |
293 | stroke=false | |
294 | fi], | |
295 | stroke=true | |
cbfb2aff | 296 | ) |
cbfb2aff | 297 | |
552cc11b | 298 | AC_ARG_ENABLE( |
6b9290ff MW |
299 | [med-db], |
300 | AS_HELP_STRING([--enable-med-db],[enable MySQL mediation database plugin (default is NO).]), | |
301 | [if test x$enableval = xyes; then | |
302 | med_db=true | |
303 | fi] | |
552cc11b | 304 | ) |
552cc11b | 305 | |
a84fb01b | 306 | AC_ARG_ENABLE( |
6b9290ff MW |
307 | [smp], |
308 | AS_HELP_STRING([--enable-smp],[enable SMP configuration and control interface (default is NO). Requires libxml.]), | |
309 | [if test x$enableval = xyes; then | |
310 | smp=true | |
311 | fi] | |
a84fb01b | 312 | ) |
a84fb01b MW |
313 | |
314 | AC_ARG_ENABLE( | |
6b9290ff MW |
315 | [sql], |
316 | AS_HELP_STRING([--enable-sql],[enable SQL database configuration backend (default is NO).]), | |
317 | [if test x$enableval = xyes; then | |
318 | sql=true | |
319 | fi] | |
a84fb01b | 320 | ) |
a84fb01b | 321 | |
8f561d44 | 322 | AC_ARG_ENABLE( |
6b9290ff MW |
323 | [smartcard], |
324 | AS_HELP_STRING([--enable-smartcard],[enable smartcard support (default is NO).]), | |
325 | [if test x$enableval = xyes; then | |
326 | smartcard=true | |
327 | fi] | |
8f561d44 | 328 | ) |
8f561d44 | 329 | |
f2c2d395 | 330 | AC_ARG_ENABLE( |
6b9290ff MW |
331 | [cisco-quirks], |
332 | AS_HELP_STRING([--enable-cisco-quirks],[enable support of Cisco VPN client (default is NO).]), | |
333 | [if test x$enableval = xyes; then | |
334 | cisco_quirks=true | |
335 | fi] | |
f2c2d395 | 336 | ) |
f2c2d395 | 337 | |
2df45a73 | 338 | AC_ARG_ENABLE( |
6b9290ff MW |
339 | [leak-detective], |
340 | AS_HELP_STRING([--enable-leak-detective],[enable malloc hooks to find memory leaks (default is NO).]), | |
341 | [if test x$enableval = xyes; then | |
342 | leak_detective=true | |
343 | fi] | |
2df45a73 | 344 | ) |
2df45a73 | 345 | |
f2c2d395 | 346 | AC_ARG_ENABLE( |
6b9290ff MW |
347 | [unit-tests], |
348 | AS_HELP_STRING([--enable-unit-tests],[enable unit tests on IKEv2 daemon startup (default is NO).]), | |
349 | [if test x$enableval = xyes; then | |
350 | unittest=true | |
351 | fi] | |
f2c2d395 | 352 | ) |
f2c2d395 | 353 | |
552cc11b | 354 | AC_ARG_ENABLE( |
6b9290ff MW |
355 | [eap-sim], |
356 | AS_HELP_STRING([--enable-eap-sim],[build SIM authenication module for EAP (default is NO).]), | |
357 | [if test x$enableval = xyes; then | |
358 | eap_sim=true | |
359 | fi] | |
552cc11b | 360 | ) |
552cc11b | 361 | |
b0f24449 | 362 | AC_ARG_ENABLE( |
6b9290ff MW |
363 | [eap-identity], |
364 | AS_HELP_STRING([--enable-eap-identity],[build EAP module providing EAP-Identity helper (default is NO).]), | |
365 | [if test x$enableval = xyes; then | |
366 | eap_identity=true | |
367 | fi] | |
b0f24449 | 368 | ) |
cbfb2aff MW |
369 | |
370 | AC_ARG_ENABLE( | |
6b9290ff MW |
371 | [eap-md5], |
372 | AS_HELP_STRING([--enable-eap-md5],[build MD5 (CHAP) authenication module for EAP (default is NO).]), | |
373 | [if test x$enableval = xyes; then | |
374 | eap_md5=true | |
375 | fi] | |
cbfb2aff | 376 | ) |
26e24676 MW |
377 | |
378 | AC_ARG_ENABLE( | |
6b9290ff MW |
379 | [eap-aka], |
380 | AS_HELP_STRING([--enable-eap-aka],[build AKA authentication module for EAP (default is NO).]), | |
381 | [if test x$enableval = xyes; then | |
382 | eap_aka=true | |
383 | fi] | |
26e24676 | 384 | ) |
b0f24449 | 385 | |
7b0c588a | 386 | AC_ARG_ENABLE( |
6b9290ff MW |
387 | [nat-transport], |
388 | AS_HELP_STRING([--enable-nat-transport],[enable NAT traversal with IPsec transport mode (default is NO).]), | |
389 | [if test x$enableval = xyes; then | |
390 | nat_transport=true | |
391 | fi] | |
7b0c588a | 392 | ) |
7b0c588a AS |
393 | |
394 | AC_ARG_ENABLE( | |
6b9290ff MW |
395 | [vendor-id], |
396 | AS_HELP_STRING([--disable-vendor-id],[disable the sending of the strongSwan vendor ID (default is NO).]), | |
397 | [if test x$enableval = xyes; then | |
398 | vendor_id=true | |
399 | else | |
400 | vendor_id=false | |
401 | fi], | |
402 | vendor_id=true | |
7b0c588a | 403 | ) |
7b0c588a | 404 | |
0e307360 | 405 | AC_ARG_ENABLE( |
6b9290ff MW |
406 | [xauth-vid], |
407 | AS_HELP_STRING([--disable-xauth-vid],[disable the sending of the XAUTH vendor ID (default is NO).]), | |
408 | [if test x$enableval = xyes; then | |
409 | xauth_vid=true | |
410 | else | |
411 | xauth_vid=false | |
412 | fi], | |
413 | xauth_vid=true | |
0e307360 | 414 | ) |
0e307360 | 415 | |
fd4ded97 | 416 | AC_ARG_ENABLE( |
6b9290ff MW |
417 | [dumm], |
418 | AS_HELP_STRING([--enable-dumm],[build the DUMM UML test framework (default is NO).]), | |
419 | [if test x$enableval = xyes; then | |
420 | dumm=true | |
421 | fi] | |
fd4ded97 | 422 | ) |
fd4ded97 | 423 | |
552cc11b | 424 | AC_ARG_ENABLE( |
6b9290ff MW |
425 | [fast], |
426 | AS_HELP_STRING([--enable-fast],[build libfast (FastCGI Application Server w/ templates (default is NO).]), | |
427 | [if test x$enableval = xyes; then | |
428 | fast=true | |
429 | fi] | |
552cc11b | 430 | ) |
552cc11b | 431 | |
b8c7453a | 432 | AC_ARG_ENABLE( |
6b9290ff MW |
433 | [manager], |
434 | AS_HELP_STRING([--enable-manager],[build web management console (default is NO).]), | |
435 | [if test x$enableval = xyes; then | |
436 | manager=true | |
437 | xml=true | |
438 | fi] | |
b8c7453a | 439 | ) |
b8c7453a | 440 | |
d5cc1758 | 441 | AC_ARG_ENABLE( |
6b9290ff MW |
442 | [mediation], |
443 | AS_HELP_STRING([--enable-mediation],[enable IKEv2 Mediation Extension (default is NO).]), | |
444 | [if test x$enableval = xyes; then | |
445 | me=true | |
446 | fi] | |
d5cc1758 | 447 | ) |
d5cc1758 | 448 | |
9ee1111d | 449 | AC_ARG_ENABLE( |
6b9290ff MW |
450 | [integrity-test], |
451 | AS_HELP_STRING([--enable-integrity-test],[enable the integrity test of the crypto library (default is NO).]), | |
452 | [if test x$enableval = xyes; then | |
453 | integrity_test=true | |
454 | fi] | |
9ee1111d | 455 | ) |
9ee1111d AS |
456 | |
457 | AC_ARG_ENABLE( | |
6b9290ff MW |
458 | [self-test], |
459 | AS_HELP_STRING([--disable-self-test],[disable the self-test of the crypto library (default is NO).]), | |
460 | [if test x$enableval = xyes; then | |
461 | self_test=true | |
462 | else | |
463 | self_test=false | |
464 | fi], | |
465 | self_test=true | |
9ee1111d | 466 | ) |
9ee1111d | 467 | |
733f336a | 468 | AC_ARG_ENABLE( |
6b9290ff MW |
469 | [pluto], |
470 | AS_HELP_STRING([--disable-pluto],[disable the IKEv1 keying daemon pluto. (default is NO).]), | |
471 | [if test x$enableval = xyes; then | |
472 | pluto=true | |
473 | else | |
474 | pluto=false | |
475 | fi], | |
476 | pluto=true | |
cbfb2aff | 477 | ) |
cbfb2aff MW |
478 | |
479 | AC_ARG_ENABLE( | |
6b9290ff MW |
480 | [charon], |
481 | AS_HELP_STRING([--disable-charon],[disable the IKEv2 keying daemon charon. (default is NO).]), | |
482 | [if test x$enableval = xyes; then | |
483 | charon=true | |
484 | else | |
485 | charon=false | |
486 | fi], | |
487 | charon=true | |
cbfb2aff | 488 | ) |
cbfb2aff MW |
489 | |
490 | AC_ARG_ENABLE( | |
6b9290ff MW |
491 | [tools], |
492 | AS_HELP_STRING([--disable-tools],[disable additional utilities (openac and scepclient). (default is NO).]), | |
493 | [if test x$enableval = xyes; then | |
494 | tools=true | |
495 | else | |
496 | tools=false | |
497 | fi], | |
498 | tools=true | |
733f336a | 499 | ) |
733f336a | 500 | |
36d62fac MW |
501 | AC_ARG_ENABLE( |
502 | [padlock], | |
503 | AS_HELP_STRING([--enable-padlock],[enables VIA Padlock crypto plugin. (default is NO).]), | |
504 | [if test x$enableval = xyes; then | |
505 | padlock=true | |
506 | else | |
507 | padlock=false | |
508 | fi], | |
509 | ) | |
510 | ||
17353034 TB |
511 | AC_ARG_ENABLE( |
512 | [openssl], | |
513 | AS_HELP_STRING([--enable-openssl],[enables the OpenSSL crypto plugin. (default is NO).]), | |
514 | [if test x$enableval = xyes; then | |
515 | openssl=true | |
516 | else | |
517 | openssl=false | |
518 | fi], | |
519 | ) | |
520 | ||
f2c2d395 MW |
521 | dnl ========================= |
522 | dnl check required programs | |
523 | dnl ========================= | |
524 | ||
525 | AC_PROG_INSTALL | |
526 | AC_PROG_LIBTOOL | |
527 | AC_PROG_LEX | |
528 | AC_PROG_YACC | |
4986554f | 529 | AC_PROG_CC() |
298b06c2 MW |
530 | AC_PATH_PROG([GPERF], [gperf], [], [$PATH:/bin:/usr/bin:/usr/local/bin]) |
531 | AC_PATH_PROG([PERL], [perl], [], [$PATH:/bin:/usr/bin:/usr/local/bin]) | |
f2c2d395 | 532 | |
6b9290ff MW |
533 | dnl ========================= |
534 | dnl dependency calculation | |
535 | dnl ========================= | |
f2c2d395 | 536 | |
6b9290ff MW |
537 | if test x$pluto = xtrue; then |
538 | gmp=true; | |
539 | fi | |
540 | ||
541 | if test x$tools = xtrue; then | |
542 | gmp=true; | |
543 | fi | |
552cc11b | 544 | |
6b9290ff MW |
545 | if test x$smp = xtrue; then |
546 | xml=true | |
547 | fi | |
548 | ||
549 | if test x$manager = xtrue; then | |
550 | fast=true | |
551 | fi | |
552 | ||
553 | dnl ========================================== | |
554 | dnl check required libraries and header files | |
555 | dnl ========================================== | |
556 | ||
557 | AC_HAVE_LIBRARY(dl) | |
4986554f | 558 | AC_CHECK_FUNCS(backtrace) |
552cc11b | 559 | AC_CHECK_FUNCS(dladdr) |
e696757c | 560 | |
6b9290ff MW |
561 | AC_MSG_CHECKING([capset() definition]) |
562 | AC_TRY_COMPILE( | |
563 | [#include <linux/capset.h>], | |
564 | [ | |
565 | void *test = capset; | |
566 | ], | |
567 | [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); AC_DEFINE_UNQUOTED(NO_CAPSET_DEFINED, 1)] | |
568 | ) | |
569 | ||
570 | if test x$gmp = xtrue; then | |
571 | AC_HAVE_LIBRARY([gmp],[LIBS="$LIBS"],[AC_MSG_ERROR([GNU Multi Precision library gmp not found])]) | |
572 | AC_MSG_CHECKING([gmp.h version >= 4.1.4]) | |
573 | AC_TRY_COMPILE( | |
574 | [#include "gmp.h"], | |
575 | [ | |
576 | #if (__GNU_MP_VERSION*100 + __GNU_MP_VERSION_MINOR*10 + __GNU_MP_VERSION_PATCHLEVEL) < 414 | |
577 | #error bad gmp | |
578 | #endif | |
579 | ], | |
580 | [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); AC_MSG_ERROR([No usable gmp.h found!])] | |
581 | ) | |
f2c2d395 | 582 | fi |
6b9290ff MW |
583 | |
584 | if test x$ldap = xtrue; then | |
585 | AC_HAVE_LIBRARY([ldap],[LIBS="$LIBS"],[AC_MSG_ERROR([LDAP library ldap not found])]) | |
586 | AC_HAVE_LIBRARY([lber],[LIBS="$LIBS"],[AC_MSG_ERROR([LDAP library lber not found])]) | |
587 | AC_CHECK_HEADER([ldap.h],,[AC_MSG_ERROR([LDAP header ldap.h not found!])]) | |
f2c2d395 MW |
588 | fi |
589 | ||
6b9290ff MW |
590 | if test x$curl = xtrue; then |
591 | AC_HAVE_LIBRARY([curl],[LIBS="$LIBS"],[AC_MSG_ERROR([CURL library curl not found])]) | |
592 | AC_CHECK_HEADER([curl/curl.h],,[AC_MSG_ERROR([CURL header curl/curl.h not found!])]) | |
593 | fi | |
594 | ||
595 | if test x$xml = xtrue; then | |
a47486b5 | 596 | PKG_CHECK_MODULES(xml, [libxml-2.0]) |
f2d6355e MW |
597 | AC_SUBST(xml_CFLAGS) |
598 | AC_SUBST(xml_LIBS) | |
599 | fi | |
600 | ||
a47486b5 MW |
601 | if test x$dumm = xtrue; then |
602 | PKG_CHECK_MODULES(gtk, [gtk+-2.0 vte]) | |
603 | AC_SUBST(gtk_CFLAGS) | |
604 | AC_SUBST(gtk_LIBS) | |
605 | fi | |
606 | ||
6b9290ff MW |
607 | if test x$fast = xtrue; then |
608 | AC_HAVE_LIBRARY([neo_cgi],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver library neo_cgi not found!])]) | |
609 | AC_HAVE_LIBRARY([neo_utl],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver library neo_utl not found!])]) | |
610 | AC_HAVE_LIBRARY([z],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver dependency zlib not found!])]) | |
611 | dnl autoconf does not like CamelCase!? How to fix this? | |
612 | dnl AC_CHECK_HEADER([ClearSilver/ClearSilver.h],,[AC_MSG_ERROR([ClearSilver header file ClearSilver/ClearSilver.h not found!])]) | |
613 | ||
614 | AC_HAVE_LIBRARY([fcgi],[LIBS="$LIBS"],[AC_MSG_ERROR([FastCGI library fcgi not found!])]) | |
615 | AC_CHECK_HEADER([fcgiapp.h],,[AC_MSG_ERROR([FastCGI header file fcgiapp.h not found!])]) | |
a84fb01b MW |
616 | fi |
617 | ||
6b9290ff MW |
618 | if test x$mysql = xtrue; then |
619 | AC_HAVE_LIBRARY([mysqlclient_r],[LIBS="$LIBS"],[AC_MSG_ERROR([MySQL library mysqlclient_r not found])]) | |
620 | AC_CHECK_HEADER([mysql/mysql.h],,[AC_MSG_ERROR([MySQL header mysql/mysql.h not found!])]) | |
621 | fi | |
f2c2d395 | 622 | |
6b9290ff MW |
623 | if test x$mysql = xtrue; then |
624 | AC_HAVE_LIBRARY([sqlite3],[LIBS="$LIBS"],[AC_MSG_ERROR([SQLite library sqlite3 not found])]) | |
625 | AC_CHECK_HEADER([sqlite3.h],,[AC_MSG_ERROR([SQLite header sqlite3.h not found!])]) | |
626 | fi | |
f2c2d395 | 627 | |
17353034 TB |
628 | if test x$openssl = xtrue; then |
629 | AC_HAVE_LIBRARY([ssl],[LIBS="$LIBS"],[AC_MSG_ERROR([OpenSSL library ssl not found])]) | |
630 | AC_CHECK_HEADER([openssl/evp.h],,[AC_MSG_ERROR([OpenSSL header openssl/evp.h not found!])]) | |
631 | fi | |
632 | ||
6b9290ff MW |
633 | dnl ========================= |
634 | dnl set Makefile.am vars | |
635 | dnl ========================= | |
f2c2d395 | 636 | |
6b9290ff MW |
637 | AM_CONDITIONAL(USE_CURL, test x$curl = xtrue) |
638 | AM_CONDITIONAL(USE_LDAP, test x$ldap = xtrue) | |
639 | AM_CONDITIONAL(USE_AES, test x$aes = xtrue) | |
640 | AM_CONDITIONAL(USE_DES, test x$des = xtrue) | |
641 | AM_CONDITIONAL(USE_MD5, test x$md5 = xtrue) | |
642 | AM_CONDITIONAL(USE_SHA1, test x$sha1 = xtrue) | |
643 | AM_CONDITIONAL(USE_SHA2, test x$sha2 = xtrue) | |
644 | AM_CONDITIONAL(USE_FIPS_PRF, test x$fips_prf = xtrue) | |
645 | AM_CONDITIONAL(USE_GMP, test x$gmp = xtrue) | |
6a365f07 | 646 | AM_CONDITIONAL(USE_RANDOM, test x$random = xtrue) |
6b9290ff MW |
647 | AM_CONDITIONAL(USE_X509, test x$x509 = xtrue) |
648 | AM_CONDITIONAL(USE_HMAC, test x$hmac = xtrue) | |
27d04e05 | 649 | AM_CONDITIONAL(USE_XCBC, test x$xcbc = xtrue) |
6b9290ff MW |
650 | AM_CONDITIONAL(USE_MYSQL, test x$mysql = xtrue) |
651 | AM_CONDITIONAL(USE_SQLITE, test x$sqlite = xtrue) | |
652 | AM_CONDITIONAL(USE_STROKE, test x$stroke = xtrue) | |
653 | AM_CONDITIONAL(USE_MED_DB, test x$med_db = xtrue) | |
654 | AM_CONDITIONAL(USE_SMP, test x$smp = xtrue) | |
655 | AM_CONDITIONAL(USE_SQL, test x$sql = xtrue) | |
656 | AM_CONDITIONAL(USE_SMARTCARD, test x$smartcard = xtrue) | |
657 | AM_CONDITIONAL(USE_CISCO_QUIRKS, test x$cisco_quirks = xtrue) | |
658 | AM_CONDITIONAL(USE_LEAK_DETECTIVE, test x$leak_detective = xtrue) | |
659 | AM_CONDITIONAL(USE_UNIT_TESTS, test x$unittest = xtrue) | |
660 | AM_CONDITIONAL(USE_EAP_SIM, test x$eap_sim = xtrue) | |
661 | AM_CONDITIONAL(USE_EAP_IDENTITY, test x$eap_identity = xtrue) | |
662 | AM_CONDITIONAL(USE_EAP_MD5, test x$eap_md5 = xtrue) | |
663 | AM_CONDITIONAL(USE_EAP_AKA, test x$eap_aka = xtrue) | |
664 | AM_CONDITIONAL(USE_NAT_TRANSPORT, test x$nat_transport = xtrue) | |
665 | AM_CONDITIONAL(USE_VENDORID, test x$vendor_id = xtrue) | |
666 | AM_CONDITIONAL(USE_XAUTH_VID, test x$xauth_vid = xtrue) | |
667 | AM_CONDITIONAL(USE_DUMM, test x$dumm = xtrue) | |
668 | AM_CONDITIONAL(USE_FAST, test x$fast = xtrue) | |
669 | AM_CONDITIONAL(USE_MANAGER, test x$manager = xtrue) | |
670 | AM_CONDITIONAL(USE_ME, test x$me = xtrue) | |
671 | AM_CONDITIONAL(USE_INTEGRITY_TEST, test x$integrity_test = xtrue) | |
672 | AM_CONDITIONAL(USE_SELF_TEST, test x$self_test = xtrue) | |
673 | AM_CONDITIONAL(USE_PLUTO, test x$pluto = xtrue) | |
674 | AM_CONDITIONAL(USE_CHARON, test x$charon = xtrue) | |
675 | AM_CONDITIONAL(USE_TOOLS, test x$tools = xtrue) | |
676 | AM_CONDITIONAL(USE_PLUTO_OR_CHARON, test x$pluto = xtrue -o x$charon = xtrue) | |
677 | AM_CONDITIONAL(USE_LIBSTRONGSWAN, test x$charon = xtrue -o x$tools = xtrue) | |
678 | AM_CONDITIONAL(USE_FILE_CONFIG, test x$pluto = xtrue -o x$stroke = xtrue) | |
36d62fac | 679 | AM_CONDITIONAL(USE_PADLOCK, test x$padlock = xtrue) |
17353034 | 680 | AM_CONDITIONAL(USE_OPENSSL, test x$openssl = xtrue) |
f2c2d395 | 681 | |
9e72d3bc MW |
682 | dnl ============================== |
683 | dnl set global definitions | |
684 | dnl ============================== | |
685 | ||
686 | if test x$me = xtrue; then | |
687 | AC_DEFINE(ME) | |
688 | fi | |
689 | ||
f2c2d395 MW |
690 | dnl ============================== |
691 | dnl build Makefiles | |
692 | dnl ============================== | |
693 | ||
694 | AC_OUTPUT( | |
695 | Makefile | |
696 | src/Makefile | |
04a7b6d8 | 697 | src/include/Makefile |
f2c2d395 | 698 | src/libstrongswan/Makefile |
552cc11b MW |
699 | src/libstrongswan/plugins/aes/Makefile |
700 | src/libstrongswan/plugins/des/Makefile | |
701 | src/libstrongswan/plugins/md5/Makefile | |
702 | src/libstrongswan/plugins/sha1/Makefile | |
703 | src/libstrongswan/plugins/sha2/Makefile | |
704 | src/libstrongswan/plugins/fips_prf/Makefile | |
705 | src/libstrongswan/plugins/gmp/Makefile | |
6a365f07 | 706 | src/libstrongswan/plugins/random/Makefile |
552cc11b | 707 | src/libstrongswan/plugins/hmac/Makefile |
27d04e05 | 708 | src/libstrongswan/plugins/xcbc/Makefile |
552cc11b MW |
709 | src/libstrongswan/plugins/x509/Makefile |
710 | src/libstrongswan/plugins/curl/Makefile | |
711 | src/libstrongswan/plugins/ldap/Makefile | |
712 | src/libstrongswan/plugins/mysql/Makefile | |
713 | src/libstrongswan/plugins/sqlite/Makefile | |
36d62fac | 714 | src/libstrongswan/plugins/padlock/Makefile |
17353034 | 715 | src/libstrongswan/plugins/openssl/Makefile |
f2c2d395 MW |
716 | src/libcrypto/Makefile |
717 | src/libfreeswan/Makefile | |
718 | src/pluto/Makefile | |
719 | src/whack/Makefile | |
720 | src/charon/Makefile | |
552cc11b MW |
721 | src/charon/plugins/eap_aka/Makefile |
722 | src/charon/plugins/eap_identity/Makefile | |
723 | src/charon/plugins/eap_md5/Makefile | |
724 | src/charon/plugins/eap_sim/Makefile | |
6b9290ff | 725 | src/charon/plugins/smp/Makefile |
552cc11b MW |
726 | src/charon/plugins/sql/Makefile |
727 | src/charon/plugins/med_db/Makefile | |
728 | src/charon/plugins/stroke/Makefile | |
729 | src/charon/plugins/unit_tester/Makefile | |
f2c2d395 MW |
730 | src/stroke/Makefile |
731 | src/ipsec/Makefile | |
732 | src/starter/Makefile | |
733 | src/_updown/Makefile | |
734 | src/_updown_espmark/Makefile | |
735 | src/_copyright/Makefile | |
736 | src/openac/Makefile | |
737 | src/scepclient/Makefile | |
f2d6355e | 738 | src/dumm/Makefile |
552cc11b | 739 | src/libfast/Makefile |
b8c7453a | 740 | src/manager/Makefile |
9ee1111d | 741 | testing/Makefile |
f2c2d395 | 742 | ) |