]> git.ipfire.org Git - thirdparty/strongswan.git/blame - configure.in
build integrity_checker.c only if --enable-integrity-test set
[thirdparty/strongswan.git] / configure.in
CommitLineData
f2c2d395
MW
1dnl configure.in for linux strongSwan
2dnl Copyright (C) 2006 Martin Willi
3dnl Hochschule fuer Technik Rapperswil
4dnl
5dnl This program is free software; you can redistribute it and/or modify it
6dnl under the terms of the GNU General Public License as published by the
7dnl Free Software Foundation; either version 2 of the License, or (at your
8dnl option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9dnl
10dnl This program is distributed in the hope that it will be useful, but
11dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13dnl for more details.
14
15dnl ===========================
16dnl initialize & set some vars
17dnl ===========================
18
c4963c92 19AC_INIT(strongSwan,4.3.3)
5e5f0bd4 20AM_INIT_AUTOMAKE(tar-ustar)
f2c2d395 21AC_SUBST(confdir, '${sysconfdir}')
a47486b5 22PKG_PROG_PKG_CONFIG
f2c2d395 23
db26d00e
MW
24dnl =================================
25dnl check --enable-xxx & --with-xxx
26dnl =================================
27
db26d00e 28AC_ARG_WITH(
6b9290ff
MW
29 [default-pkcs11],
30 AS_HELP_STRING([--with-default-pkcs11=lib],[set the default PKCS11 library other than "/usr/lib/opensc-pkcs11.so"]),
31 [AC_DEFINE_UNQUOTED(PKCS11_DEFAULT_LIB, "$withval")],
32 [AC_DEFINE_UNQUOTED(PKCS11_DEFAULT_LIB, "/usr/lib/opensc-pkcs11.so")]
db26d00e
MW
33)
34
195307b5 35AC_ARG_WITH(
6b9290ff
MW
36 [xauth-module],
37 AS_HELP_STRING([--with-xauth-module=lib],[set the path to the XAUTH module]),
38 [AC_DEFINE_UNQUOTED(XAUTH_DEFAULT_LIB, "$withval")],
195307b5
AS
39)
40
db26d00e 41AC_ARG_WITH(
6b9290ff
MW
42 [random-device],
43 AS_HELP_STRING([--with-random-device=dev],[set the device for real random data other than "/dev/random"]),
44 [AC_DEFINE_UNQUOTED(DEV_RANDOM, "$withval")],
45 [AC_DEFINE_UNQUOTED(DEV_RANDOM, "/dev/random")]
db26d00e 46)
c60c7694 47AC_ARG_WITH(
6b9290ff 48 [resolv-conf],
adc25ec2 49 AS_HELP_STRING([--with-resolv-conf=file],[set the file to use in DNS handler plugin other than "sysconfdir/resolv.conf"]),
8cc16c9d
AS
50 [AC_SUBST(resolv_conf, "$withval")],
51 [AC_SUBST(resolv_conf, "${sysconfdir}/resolv.conf")]
c60c7694 52)
db26d00e 53
ff867d06
MW
54AC_ARG_WITH(
55 [strongswan-conf],
56 AS_HELP_STRING([--with-strongswan-conf=file],[strongswan.conf file other than "sysconfdir/strongswan.conf"]),
8cc16c9d
AS
57 [AC_SUBST(strongswan_conf, "$withval")],
58 [AC_SUBST(strongswan_conf, "${sysconfdir}/strongswan.conf")]
ff867d06
MW
59)
60
db26d00e 61AC_ARG_WITH(
6b9290ff
MW
62 [urandom-device],
63 AS_HELP_STRING([--with-urandom-device=dev],[set the device for pseudo random data other than "/dev/urandom"]),
64 [AC_DEFINE_UNQUOTED(DEV_URANDOM, "$withval")],
65 [AC_DEFINE_UNQUOTED(DEV_URANDOM, "/dev/urandom")]
db26d00e 66)
f2c2d395 67
dfc14c84 68AC_ARG_WITH(
6b9290ff
MW
69 [piddir],
70 AS_HELP_STRING([--with-piddir=dir],[path for PID and UNIX socket files other than "/var/run"]),
71 [AC_SUBST(piddir, "$withval")],
72 [AC_SUBST(piddir, "/var/run")]
dfc14c84
AS
73)
74
f27f6296 75AC_ARG_WITH(
6b9290ff
MW
76 [ipsecdir],
77 AS_HELP_STRING([--with-ipsecdir=dir],[installation path for ipsec tools other than "libexecdir/ipsec"]),
78 [AC_SUBST(ipsecdir, "$withval")],
c5ebb635 79 [AC_SUBST(ipsecdir, "${libexecdir%/}/ipsec")]
f27f6296 80)
c5ebb635 81AC_SUBST(plugindir, "${ipsecdir%/}/plugins")
f27f6296
MW
82
83AC_ARG_WITH(
6b9290ff
MW
84 [plugindir],
85 AS_HELP_STRING([--with-plugindir=dir],[installation path for plugins other than "ipsecdir/plugins"]),
86 [AC_SUBST(plugindir, "$withval")],
c5ebb635 87 [AC_SUBST(plugindir, "${ipsecdir%/}/plugins")]
f27f6296
MW
88)
89
d560c849 90AC_ARG_WITH(
6b9290ff
MW
91 [sim-reader],
92 AS_HELP_STRING([--with-sim-reader=library.so],[library containing the sim_run_alg()/sim_get_triplet() function for EAP-SIM]),
93 [AC_SUBST(simreader, "$withval")],
c5ebb635 94 [AC_SUBST(simreader, "${plugindir%/}/libeapsim-file.so")]
d560c849
MW
95)
96
04a7b6d8 97AC_ARG_WITH(
6b9290ff
MW
98 [linux-headers],
99 AS_HELP_STRING([--with-linux-headers=dir],[use the linux header files in dir instead of the supplied ones in "src/include"]),
507f26f6 100 [AC_SUBST(linuxdir, "$withval")], [AC_SUBST(linuxdir, "\${top_srcdir}/src/include")]
04a7b6d8
MW
101)
102AC_SUBST(LINUX_HEADERS)
103
4e411c83 104AC_ARG_WITH(
6b9290ff
MW
105 [routing-table],
106 AS_HELP_STRING([--with-routing-table=num],[use routing table for IPsec routes (default: 220)]),
107 [AC_DEFINE_UNQUOTED(IPSEC_ROUTING_TABLE, $withval) AC_SUBST(IPSEC_ROUTING_TABLE, "$withval")],
108 [AC_DEFINE_UNQUOTED(IPSEC_ROUTING_TABLE, 220) AC_SUBST(IPSEC_ROUTING_TABLE, "220")]
0739cca9
MW
109)
110
111AC_ARG_WITH(
6b9290ff
MW
112 [routing-table-prio],
113 AS_HELP_STRING([--with-routing-table-prio=prio],[priority for IPsec routing table (default: 220)]),
114 [AC_DEFINE_UNQUOTED(IPSEC_ROUTING_TABLE_PRIO, $withval) AC_SUBST(IPSEC_ROUTING_TABLE_PRIO, "$withval")],
115 [AC_DEFINE_UNQUOTED(IPSEC_ROUTING_TABLE_PRIO, 220) AC_SUBST(IPSEC_ROUTING_TABLE_PRIO, "220")]
4e411c83
MW
116)
117
6874bf69 118AC_ARG_WITH(
25b12c69 119 [uid],,[AC_MSG_ERROR([--with-uid is gone, use --with-user instead!])]
6874bf69
MW
120)
121
122AC_ARG_WITH(
25b12c69
MW
123 [gid],,[AC_MSG_ERROR([--with-gid is gone, use --with-group instead!])]
124)
125
126AC_ARG_WITH(
127 [user],
128 AS_HELP_STRING([--with-user=user],[change user of the daemons to "user" after startup (default is 0).]),
129 [AC_DEFINE_UNQUOTED(IPSEC_USER, "$withval") AC_SUBST(ipsecuser, "$withval")],
130 [AC_SUBST(ipsecuser, "root")]
131)
132
133AC_ARG_WITH(
134 [group],
135 AS_HELP_STRING([--with-group=group],[change group of the daemons to "group" after startup (default is 0).]),
136 [AC_DEFINE_UNQUOTED(IPSEC_GROUP, "$withval") AC_SUBST(ipsecgroup, "$withval")],
137 [AC_SUBST(ipsecgroup, "root")]
6874bf69
MW
138)
139
eb3e2705
MW
140dnl Will be extended to --with-capabilities=libcap|libcap2
141AC_ARG_WITH(
142 [capabilities],
143 AS_HELP_STRING([--with-capabilities=libcap],[capability dropping using libcap. Currenlty only the value "libcap" is supported (default is NO).]),
144 [capabilities="$withval"],
145 [capabilities=no]
146)
147
f2c2d395 148AC_ARG_ENABLE(
6b9290ff
MW
149 [curl],
150 AS_HELP_STRING([--enable-curl],[enable CURL fetcher plugin to fetch files via libcurl (default is NO). Requires libcurl.]),
151 [if test x$enableval = xyes; then
152 curl=true
153 fi]
f2c2d395 154)
f2c2d395
MW
155
156AC_ARG_ENABLE(
6b9290ff
MW
157 [ldap],
158 AS_HELP_STRING([--enable-ldap],[enable LDAP fetching plugin to fetch files via libldap (default is NO). Requires openLDAP.]),
159 [if test x$enableval = xyes; then
160 ldap=true
161 fi]
f2c2d395 162)
552cc11b
MW
163
164AC_ARG_ENABLE(
6b9290ff
MW
165 [aes],
166 AS_HELP_STRING([--disable-aes],[disable own AES software implementation plugin. (default is NO).]),
167 [if test x$enableval = xyes; then
168 aes=true
169 else
170 aes=false
171 fi],
172 aes=true
552cc11b 173)
552cc11b
MW
174
175AC_ARG_ENABLE(
6b9290ff
MW
176 [des],
177 AS_HELP_STRING([--disable-des],[disable own DES/3DES software implementation plugin. (default is NO).]),
178 [if test x$enableval = xyes; then
179 des=true
180 else
181 des=false
182 fi],
183 des=true
552cc11b 184)
552cc11b 185
d36ae9e3
AS
186AC_ARG_ENABLE(
187 [blowfish],
188 AS_HELP_STRING([--enable-blowfish],[enable Blowfish software implementation plugin (default is NO).]),
189 [if test x$enableval = xyes; then
190 blowfish=true
191 fi]
192)
193
1e0d1ae2
AS
194AC_ARG_ENABLE(
195 [md4],
196 AS_HELP_STRING([--enable-md4],[enable MD4 software implementation plugin (default is NO).]),
197 [if test x$enableval = xyes; then
198 md4=true
199 fi]
200)
201
552cc11b 202AC_ARG_ENABLE(
6b9290ff
MW
203 [md5],
204 AS_HELP_STRING([--disable-md5],[disable own MD5 software implementation plugin. (default is NO).]),
205 [if test x$enableval = xyes; then
206 md5=true
207 else
208 md5=false
209 fi],
210 md5=true
552cc11b 211)
552cc11b
MW
212
213AC_ARG_ENABLE(
6b9290ff
MW
214 [sha1],
215 AS_HELP_STRING([--disable-sha1],[disable own SHA1 software implementation plugin. (default is NO).]),
216 [if test x$enableval = xyes; then
217 sha1=true
218 else
219 sha1=false
220 fi],
221 sha1=true
552cc11b 222)
552cc11b
MW
223
224AC_ARG_ENABLE(
6b9290ff
MW
225 [sha2],
226 AS_HELP_STRING([--disable-sha2],[disable own SHA256/SHA384/SHA512 software implementation plugin. (default is NO).]),
227 [if test x$enableval = xyes; then
228 sha2=true
229 else
230 sha2=false
231 fi],
232 sha2=true
552cc11b 233)
552cc11b
MW
234
235AC_ARG_ENABLE(
6b9290ff
MW
236 [fips-prf],
237 AS_HELP_STRING([--disable-fips-prf],[disable FIPS PRF software implementation plugin. (default is NO).]),
238 [if test x$enableval = xyes; then
239 fips_prf=true
240 else
241 fips_prf=false
242 fi],
243 fips_prf=true
552cc11b 244)
552cc11b
MW
245
246AC_ARG_ENABLE(
6b9290ff
MW
247 [gmp],
248 AS_HELP_STRING([--disable-gmp],[disable own GNU MP (libgmp) based crypto implementation plugin. (default is NO).]),
249 [if test x$enableval = xyes; then
250 gmp=true
251 else
252 gmp=false
253 fi],
254 gmp=true
552cc11b 255)
552cc11b 256
6a365f07
MW
257AC_ARG_ENABLE(
258 [random],
259 AS_HELP_STRING([--disable-random],[disable RNG implementation on top of /dev/(u)random. (default is NO).]),
260 [if test x$enableval = xyes; then
261 random=true
262 else
263 random=false
264 fi],
265 random=true
266)
267
552cc11b 268AC_ARG_ENABLE(
6b9290ff
MW
269 [x509],
270 AS_HELP_STRING([--disable-x509],[disable own X509 certificate implementation plugin. (default is NO).]),
271 [if test x$enableval = xyes; then
272 x509=true
273 else
274 x509=false
275 fi],
276 x509=true
552cc11b 277)
552cc11b 278
affd7a90
MW
279AC_ARG_ENABLE(
280 [pubkey],
281 AS_HELP_STRING([--disable-pubkey],[disable RAW public key support plugin. (default is NO).]),
282 [if test x$enableval = xyes; then
283 pubkey=true
284 else
285 pubkey=false
286 fi],
287 pubkey=true
288)
289
552cc11b 290AC_ARG_ENABLE(
6b9290ff
MW
291 [hmac],
292 AS_HELP_STRING([--disable-hmac],[disable HMAC crypto implementation plugin. (default is NO).]),
293 [if test x$enableval = xyes; then
294 hmac=true
295 else
296 hmac=false
297 fi],
298 hmac=true
552cc11b 299)
552cc11b 300
27d04e05
MW
301AC_ARG_ENABLE(
302 [xcbc],
303 AS_HELP_STRING([--disable-xcbc],[disable xcbc crypto implementation plugin. (default is NO).]),
304 [if test x$enableval = xyes; then
305 xcbc=true
306 else
307 xcbc=false
308 fi],
309 xcbc=true
310)
311
81811a9d
MW
312AC_ARG_ENABLE(
313 [test-vectors],
272c8113 314 AS_HELP_STRING([--enable-test-vectors],[enable plugin providing crypto test vectors (default is NO).]),
81811a9d
MW
315 [if test x$enableval = xyes; then
316 test_vectors=true
317 fi]
318)
319
552cc11b 320AC_ARG_ENABLE(
6b9290ff
MW
321 [mysql],
322 AS_HELP_STRING([--enable-mysql],[enable MySQL database support (default is NO). Requires libmysqlclient_r.]),
323 [if test x$enableval = xyes; then
324 mysql=true
325 fi]
552cc11b 326)
552cc11b
MW
327
328AC_ARG_ENABLE(
6b9290ff
MW
329 [sqlite],
330 AS_HELP_STRING([--enable-sqlite],[enable SQLite database support (default is NO). Requires libsqlite3.]),
331 [if test x$enableval = xyes; then
332 sqlite=true
333 fi]
552cc11b 334)
f2c2d395 335
cbfb2aff 336AC_ARG_ENABLE(
6b9290ff
MW
337 [stroke],
338 AS_HELP_STRING([--disable-stroke],[disable charons stroke (pluto compatibility) configuration backend. (default is NO).]),
339 [if test x$enableval = xyes; then
340 stroke=true
341 else
342 stroke=false
343 fi],
344 stroke=true
cbfb2aff 345)
cbfb2aff 346
552cc11b 347AC_ARG_ENABLE(
5b7ec6d4 348 [medsrv],
9529fb68 349 AS_HELP_STRING([--enable-medsrv],[enable mediation server web frontend and daemon plugin (default is NO).]),
6b9290ff 350 [if test x$enableval = xyes; then
5b7ec6d4 351 medsrv=true
6b9290ff 352 fi]
552cc11b 353)
552cc11b 354
782db7ed
MW
355AC_ARG_ENABLE(
356 [medcli],
357 AS_HELP_STRING([--enable-medcli],[enable mediation client configuration database plugin (default is NO).]),
358 [if test x$enableval = xyes; then
359 medcli=true
360 fi]
361)
362
a84fb01b 363AC_ARG_ENABLE(
6b9290ff
MW
364 [smp],
365 AS_HELP_STRING([--enable-smp],[enable SMP configuration and control interface (default is NO). Requires libxml.]),
366 [if test x$enableval = xyes; then
367 smp=true
368 fi]
a84fb01b 369)
a84fb01b
MW
370
371AC_ARG_ENABLE(
6b9290ff
MW
372 [sql],
373 AS_HELP_STRING([--enable-sql],[enable SQL database configuration backend (default is NO).]),
374 [if test x$enableval = xyes; then
375 sql=true
376 fi]
a84fb01b 377)
a84fb01b 378
8f561d44 379AC_ARG_ENABLE(
6b9290ff
MW
380 [smartcard],
381 AS_HELP_STRING([--enable-smartcard],[enable smartcard support (default is NO).]),
382 [if test x$enableval = xyes; then
383 smartcard=true
384 fi]
8f561d44 385)
8f561d44 386
f2c2d395 387AC_ARG_ENABLE(
6b9290ff
MW
388 [cisco-quirks],
389 AS_HELP_STRING([--enable-cisco-quirks],[enable support of Cisco VPN client (default is NO).]),
390 [if test x$enableval = xyes; then
391 cisco_quirks=true
392 fi]
f2c2d395 393)
f2c2d395 394
2df45a73 395AC_ARG_ENABLE(
6b9290ff
MW
396 [leak-detective],
397 AS_HELP_STRING([--enable-leak-detective],[enable malloc hooks to find memory leaks (default is NO).]),
398 [if test x$enableval = xyes; then
399 leak_detective=true
400 fi]
2df45a73 401)
2df45a73 402
02140125
MW
403AC_ARG_ENABLE(
404 [lock-profiler],
fc3ef71f 405 AS_HELP_STRING([--enable-lock-profiler],[enable lock/mutex profiling code (default is NO).]),
02140125
MW
406 [if test x$enableval = xyes; then
407 lock_profiler=true
408 fi]
409)
410
f2c2d395 411AC_ARG_ENABLE(
6b9290ff
MW
412 [unit-tests],
413 AS_HELP_STRING([--enable-unit-tests],[enable unit tests on IKEv2 daemon startup (default is NO).]),
414 [if test x$enableval = xyes; then
415 unittest=true
416 fi]
f2c2d395 417)
f2c2d395 418
0fd6e955
MW
419AC_ARG_ENABLE(
420 [load-tests],
421 AS_HELP_STRING([--enable-load-tests],[enable load testing plugin for IKEv2 daemon (default is NO).]),
422 [if test x$enableval = xyes; then
423 loadtest=true
424 fi]
425)
426
552cc11b 427AC_ARG_ENABLE(
6b9290ff
MW
428 [eap-sim],
429 AS_HELP_STRING([--enable-eap-sim],[build SIM authenication module for EAP (default is NO).]),
430 [if test x$enableval = xyes; then
431 eap_sim=true
432 fi]
552cc11b 433)
552cc11b 434
79a87846
MW
435AC_ARG_ENABLE(
436 [eap-sim-file],
437 AS_HELP_STRING([--enable-eap-sim-file],[build EAP-SIM backend based on a triplet file (default is NO).]),
438 [if test x$enableval = xyes; then
439 eap_sim_file=true
440 fi]
441)
442
b0f24449 443AC_ARG_ENABLE(
6b9290ff
MW
444 [eap-identity],
445 AS_HELP_STRING([--enable-eap-identity],[build EAP module providing EAP-Identity helper (default is NO).]),
446 [if test x$enableval = xyes; then
447 eap_identity=true
448 fi]
b0f24449 449)
cbfb2aff
MW
450
451AC_ARG_ENABLE(
6b9290ff
MW
452 [eap-md5],
453 AS_HELP_STRING([--enable-eap-md5],[build MD5 (CHAP) authenication module for EAP (default is NO).]),
454 [if test x$enableval = xyes; then
455 eap_md5=true
456 fi]
cbfb2aff 457)
26e24676 458
1caa265c
MW
459AC_ARG_ENABLE(
460 [eap-gtc],
461 AS_HELP_STRING([--enable-eap-gtc],[build PAM based GTC authenication module for EAP (default is NO).]),
462 [if test x$enableval = xyes; then
463 eap_gtc=true
464 fi]
465)
466
26e24676 467AC_ARG_ENABLE(
6b9290ff
MW
468 [eap-aka],
469 AS_HELP_STRING([--enable-eap-aka],[build AKA authentication module for EAP (default is NO).]),
470 [if test x$enableval = xyes; then
471 eap_aka=true
472 fi]
26e24676 473)
b0f24449 474
f98cdf7a
TB
475AC_ARG_ENABLE(
476 [eap-mschapv2],
477 AS_HELP_STRING([--enable-eap-mschapv2],[build MS-CHAPv2 authenication module for EAP (default is NO).]),
478 [if test x$enableval = xyes; then
479 eap_mschapv2=true
480 fi]
481)
482
4a6b84a9
MW
483AC_ARG_ENABLE(
484 [eap-radius],
485 AS_HELP_STRING([--enable-eap-radius],[build RADIUS proxy authenication module for EAP (default is NO).]),
486 [if test x$enableval = xyes; then
487 eap_radius=true
488 fi]
489)
490
09d7ef26
AS
491AC_ARG_ENABLE(
492 [kernel-netlink],
493 AS_HELP_STRING([--disable-kernel-netlink],[disable the netlink kernel interface. (default is NO).]),
494 [if test x$enableval = xyes; then
495 kernel_netlink=true
496 else
497 kernel_netlink=false
498 fi],
499 kernel_netlink=true
500)
501
1adaa02b
TB
502AC_ARG_ENABLE(
503 [kernel-pfkey],
504 AS_HELP_STRING([--enable-kernel-pfkey],[enable the PF_KEY kernel interface. (default is NO).]),
505 [if test x$enableval = xyes; then
506 kernel_pfkey=true
507 fi]
508)
509
ea7e89c7
TB
510AC_ARG_ENABLE(
511 [kernel-pfroute],
512 AS_HELP_STRING([--enable-kernel-pfroute],[enable the PF_ROUTE kernel interface. (default is NO).]),
513 [if test x$enableval = xyes; then
514 kernel_pfroute=true
515 fi]
516)
517
ea625fab
TB
518AC_ARG_ENABLE(
519 [kernel-klips],
520 AS_HELP_STRING([--enable-kernel-klips],[enable the KLIPS kernel interface. (default is NO).]),
521 [if test x$enableval = xyes; then
522 kernel_klips=true
523 fi]
524)
525
7b0c588a 526AC_ARG_ENABLE(
6b9290ff
MW
527 [nat-transport],
528 AS_HELP_STRING([--enable-nat-transport],[enable NAT traversal with IPsec transport mode (default is NO).]),
529 [if test x$enableval = xyes; then
530 nat_transport=true
531 fi]
7b0c588a 532)
7b0c588a
AS
533
534AC_ARG_ENABLE(
6b9290ff
MW
535 [vendor-id],
536 AS_HELP_STRING([--disable-vendor-id],[disable the sending of the strongSwan vendor ID (default is NO).]),
537 [if test x$enableval = xyes; then
538 vendor_id=true
539 else
540 vendor_id=false
541 fi],
542 vendor_id=true
7b0c588a 543)
7b0c588a 544
0e307360 545AC_ARG_ENABLE(
6b9290ff
MW
546 [xauth-vid],
547 AS_HELP_STRING([--disable-xauth-vid],[disable the sending of the XAUTH vendor ID (default is NO).]),
548 [if test x$enableval = xyes; then
549 xauth_vid=true
550 else
551 xauth_vid=false
552 fi],
553 xauth_vid=true
0e307360 554)
0e307360 555
fd4ded97 556AC_ARG_ENABLE(
6b9290ff
MW
557 [dumm],
558 AS_HELP_STRING([--enable-dumm],[build the DUMM UML test framework (default is NO).]),
559 [if test x$enableval = xyes; then
560 dumm=true
561 fi]
fd4ded97 562)
fd4ded97 563
552cc11b 564AC_ARG_ENABLE(
6b9290ff
MW
565 [fast],
566 AS_HELP_STRING([--enable-fast],[build libfast (FastCGI Application Server w/ templates (default is NO).]),
567 [if test x$enableval = xyes; then
568 fast=true
569 fi]
552cc11b 570)
552cc11b 571
b8c7453a 572AC_ARG_ENABLE(
6b9290ff
MW
573 [manager],
574 AS_HELP_STRING([--enable-manager],[build web management console (default is NO).]),
575 [if test x$enableval = xyes; then
576 manager=true
577 xml=true
578 fi]
b8c7453a 579)
b8c7453a 580
d5cc1758 581AC_ARG_ENABLE(
6b9290ff
MW
582 [mediation],
583 AS_HELP_STRING([--enable-mediation],[enable IKEv2 Mediation Extension (default is NO).]),
584 [if test x$enableval = xyes; then
585 me=true
586 fi]
d5cc1758 587)
d5cc1758 588
9ee1111d 589AC_ARG_ENABLE(
6b9290ff 590 [integrity-test],
e3b7be91 591 AS_HELP_STRING([--enable-integrity-test],[enable integrity testing of libstrongswan and plugins (default is NO).]),
6b9290ff
MW
592 [if test x$enableval = xyes; then
593 integrity_test=true
594 fi]
9ee1111d 595)
9ee1111d 596
733f336a 597AC_ARG_ENABLE(
6b9290ff
MW
598 [pluto],
599 AS_HELP_STRING([--disable-pluto],[disable the IKEv1 keying daemon pluto. (default is NO).]),
600 [if test x$enableval = xyes; then
601 pluto=true
602 else
603 pluto=false
604 fi],
605 pluto=true
cbfb2aff 606)
cbfb2aff 607
6905f794
MW
608AC_ARG_ENABLE(
609 [threads],
610 AS_HELP_STRING([--disable-threads],[disable the use of threads in pluto. Charon always uses threads. (default is NO).]),
611 [if test x$enableval = xyes; then
612 threads=true
613 else
614 threads=false
615 fi],
616 threads=true
617)
618
cbfb2aff 619AC_ARG_ENABLE(
6b9290ff
MW
620 [charon],
621 AS_HELP_STRING([--disable-charon],[disable the IKEv2 keying daemon charon. (default is NO).]),
622 [if test x$enableval = xyes; then
623 charon=true
624 else
625 charon=false
626 fi],
627 charon=true
cbfb2aff 628)
cbfb2aff
MW
629
630AC_ARG_ENABLE(
6b9290ff
MW
631 [tools],
632 AS_HELP_STRING([--disable-tools],[disable additional utilities (openac and scepclient). (default is NO).]),
633 [if test x$enableval = xyes; then
634 tools=true
635 else
636 tools=false
637 fi],
638 tools=true
733f336a 639)
733f336a 640
1e9c46f1
MW
641AC_ARG_ENABLE(
642 [updown],
ad3af574 643 AS_HELP_STRING([--disable-updown],[disable updown firewall script plugin. (default is NO).]),
1e9c46f1
MW
644 [if test x$enableval = xyes; then
645 updown=true
646 else
647 updown=false
648 fi],
649 updown=true
650)
651
adc25ec2
MW
652AC_ARG_ENABLE(
653 [attr],
654 AS_HELP_STRING([--disable-attr],[disable strongswan.conf based configuration attribute plugin. (default is NO).]),
655 [if test x$enableval = xyes; then
656 attr=true
657 else
658 attr=false
659 fi],
660 attr=true
661)
662
663AC_ARG_ENABLE(
664 [resolv-conf],
665 AS_HELP_STRING([--disable-resolv-conf],[disable resolv.conf DNS handler plugin. (default is NO).]),
666 [if test x$enableval = xyes; then
667 resolvconf=true
668 else
669 resolvconf=false
670 fi],
671 resolvconf=true
672)
673
36d62fac
MW
674AC_ARG_ENABLE(
675 [padlock],
676 AS_HELP_STRING([--enable-padlock],[enables VIA Padlock crypto plugin. (default is NO).]),
677 [if test x$enableval = xyes; then
678 padlock=true
679 else
680 padlock=false
681 fi],
682)
683
17353034
TB
684AC_ARG_ENABLE(
685 [openssl],
686 AS_HELP_STRING([--enable-openssl],[enables the OpenSSL crypto plugin. (default is NO).]),
687 [if test x$enableval = xyes; then
688 openssl=true
689 else
690 openssl=false
691 fi],
692)
693
4977018c
MW
694AC_ARG_ENABLE(
695 [gcrypt],
696 AS_HELP_STRING([--enable-gcrypt],[enables the libgcrypt plugin. (default is NO).]),
697 [if test x$enableval = xyes; then
698 gcrypt=true
699 else
700 gcrypt=false
701 fi],
702)
703
21c95463
MW
704AC_ARG_ENABLE(
705 [agent],
706 AS_HELP_STRING([--enable-agent],[enables the ssh-agent signing plugin. (default is NO).]),
707 [if test x$enableval = xyes; then
708 agent=true
709 else
710 agent=false
711 fi],
712)
713
61c46386
MW
714AC_ARG_ENABLE(
715 [uci],
716 AS_HELP_STRING([--enable-uci],[enable OpenWRT UCI configuration plugin (default is NO).]),
717 [if test x$enableval = xyes; then
718 uci=true
719 fi]
720)
721
6dbce9c8
MW
722AC_ARG_ENABLE(
723 [nm],
724 AS_HELP_STRING([--enable-nm],[enable NetworkManager plugin (default is NO).]),
725 [if test x$enableval = xyes; then
726 nm=true
727 fi]
728)
729
bf45d6dd
TB
730AC_ARG_ENABLE(
731 [vstr],
732 AS_HELP_STRING([--enable-vstr],[enforce using the Vstr string library to replace glibc-like printf hooks (default is NO).]),
733 [if test x$enableval = xyes; then
734 vstr=true
735 fi]
736)
737
be0a03be
MW
738dnl =========================
739dnl set up compiler and flags
740dnl =========================
741
742if test -z "$CFLAGS"; then
743 AC_SUBST(CFLAGS, "-g -O2 -Wall -Wno-format -Wno-pointer-sign -Wno-strict-aliasing")
744fi
745AC_PROG_CC
746AC_C_BIGENDIAN
747
f2c2d395
MW
748dnl =========================
749dnl check required programs
750dnl =========================
751
752AC_PROG_INSTALL
753AC_PROG_LIBTOOL
754AC_PROG_LEX
755AC_PROG_YACC
298b06c2
MW
756AC_PATH_PROG([GPERF], [gperf], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
757AC_PATH_PROG([PERL], [perl], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
f2c2d395 758
6b9290ff
MW
759dnl =========================
760dnl dependency calculation
761dnl =========================
f2c2d395 762
a998276a
MW
763if test x$eap_aka = xtrue; then
764 gmp=true;
765 fips_prf=true;
766 sha1=true;
767fi
768
769if test x$eap_sim = xtrue; then
770 fips_prf=true;
771fi
772
773if test x$fips_prf = xtrue; then
774 sha1=true;
775fi
776
6b9290ff
MW
777if test x$tools = xtrue; then
778 gmp=true;
779fi
552cc11b 780
6b9290ff
MW
781if test x$smp = xtrue; then
782 xml=true
783fi
784
785if test x$manager = xtrue; then
786 fast=true
787fi
788
782db7ed
MW
789if test x$medsrv = xtrue; then
790 me=true
9529fb68 791 fast=true
782db7ed
MW
792fi
793
794if test x$medcli = xtrue; then
795 me=true
796fi
797
a9f56adb 798dnl ===========================================
6b9290ff 799dnl check required libraries and header files
a9f56adb
TB
800dnl ===========================================
801
802AC_HEADER_STDBOOL
6b9290ff 803
ea7e89c7
TB
804saved_LIBS=$LIBS
805LIBS=""
806AC_SEARCH_LIBS(dlopen, dl, [DLLIB=$LIBS])
807LIBS=$saved_LIBS
808AC_SUBST(DLLIB)
809
4f734a55
MW
810AC_MSG_CHECKING(for dladdr)
811AC_TRY_COMPILE(
812 [#define _GNU_SOURCE
813 #include <dlfcn.h>],
814 [Dl_info* info = 0;
815 dladdr(0, info);],
816 [AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_DLADDR])],
817 [AC_MSG_RESULT([no])]
818)
819
65ea37ab
TB
820AC_CHECK_FUNCS(backtrace)
821AC_CHECK_FUNCS(prctl)
822AC_CHECK_FUNCS(gethostbyname_r)
65ea37ab 823
9f090745 824AC_CHECK_HEADERS(net/pfkeyv2.h netipsec/ipsec.h netinet6/ipsec.h)
ea7e89c7
TB
825
826AC_CHECK_MEMBERS([struct sockaddr.sa_len], [], [],
827[
828 #include <sys/types.h>
829 #include <sys/socket.h>
830])
831
832AC_CHECK_MEMBERS([struct sadb_x_policy.sadb_x_policy_priority], [], [],
833[
834 #include <sys/types.h>
835 #ifdef HAVE_NET_PFKEYV2_H
836 #include <net/pfkeyv2.h>
837 #else
838 #include <stdint.h>
839 #include <linux/pfkeyv2.h>
840 #endif
841])
e696757c 842
617e59b7
TB
843AC_MSG_CHECKING([for IPSEC_MODE_BEET])
844AC_TRY_COMPILE(
a6ae2a14
TB
845 [#include <sys/types.h>
846 #ifdef HAVE_NETIPSEC_IPSEC_H
617e59b7
TB
847 #include <netipsec/ipsec.h>
848 #elif defined(HAVE_NETINET6_IPSEC_H)
849 #include <netinet6/ipsec.h>
850 #else
a6ae2a14 851 #include <stdint.h>
617e59b7
TB
852 #include <linux/ipsec.h>
853 #endif],
854 [int mode = IPSEC_MODE_BEET;
855 return mode;],
856 [AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_IPSEC_MODE_BEET])],
857 [AC_MSG_RESULT([no])]
858)
859
860AC_MSG_CHECKING([for IPSEC_DIR_FWD])
861AC_TRY_COMPILE(
a6ae2a14
TB
862 [#include <sys/types.h>
863 #ifdef HAVE_NETIPSEC_IPSEC_H
617e59b7
TB
864 #include <netipsec/ipsec.h>
865 #elif defined(HAVE_NETINET6_IPSEC_H)
866 #include <netinet6/ipsec.h>
867 #else
a6ae2a14 868 #include <stdint.h>
617e59b7
TB
869 #include <linux/ipsec.h>
870 #endif],
871 [int dir = IPSEC_DIR_FWD;
872 return dir;],
873 [AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_IPSEC_DIR_FWD])],
874 [AC_MSG_RESULT([no])]
875)
876
efd0fe21
MW
877AC_MSG_CHECKING([for gcc atomic operations])
878AC_TRY_RUN(
879[
880 int main() {
881 volatile int ref = 1;
882 __sync_fetch_and_add (&ref, 1);
883 __sync_sub_and_fetch (&ref, 1);
884 /* Make sure test fails if operations are not supported */
885 __sync_val_compare_and_swap(&ref, 1, 0);
886 return ref;
887 }
888],
889[AC_MSG_RESULT([yes]); AC_DEFINE(HAVE_GCC_ATOMIC_OPERATIONS)],
bb835afa 890[AC_MSG_RESULT([no])],
efd0fe21
MW
891[AC_MSG_RESULT([no])])
892
d25ce370
TB
893AC_CHECK_FUNC(
894 [register_printf_function],
895 [AC_DEFINE(HAVE_PRINTF_HOOKS)],
896 [
897 AC_MSG_NOTICE([printf does not support custom format specifiers!])
bf45d6dd
TB
898 vstr=true
899 ]
900)
901
902if test x$vstr = xtrue; then
903 AC_HAVE_LIBRARY([vstr],[LIBS="$LIBS"],[AC_MSG_ERROR([Vstr string library not found])])
904 AC_DEFINE(USE_VSTR)
905fi
d25ce370 906
6b9290ff 907if test x$gmp = xtrue; then
f8277a83 908 AC_HAVE_LIBRARY([gmp],[LIBS="$LIBS"],[AC_MSG_ERROR([GNU Multi Precision library gmp not found])])
6b9290ff
MW
909 AC_MSG_CHECKING([gmp.h version >= 4.1.4])
910 AC_TRY_COMPILE(
911 [#include "gmp.h"],
912 [
913 #if (__GNU_MP_VERSION*100 + __GNU_MP_VERSION_MINOR*10 + __GNU_MP_VERSION_PATCHLEVEL) < 414
914 #error bad gmp
915 #endif
916 ],
917 [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); AC_MSG_ERROR([No usable gmp.h found!])]
918 )
f2c2d395 919fi
6b9290ff
MW
920
921if test x$ldap = xtrue; then
922 AC_HAVE_LIBRARY([ldap],[LIBS="$LIBS"],[AC_MSG_ERROR([LDAP library ldap not found])])
923 AC_HAVE_LIBRARY([lber],[LIBS="$LIBS"],[AC_MSG_ERROR([LDAP library lber not found])])
924 AC_CHECK_HEADER([ldap.h],,[AC_MSG_ERROR([LDAP header ldap.h not found!])])
f2c2d395
MW
925fi
926
6b9290ff
MW
927if test x$curl = xtrue; then
928 AC_HAVE_LIBRARY([curl],[LIBS="$LIBS"],[AC_MSG_ERROR([CURL library curl not found])])
929 AC_CHECK_HEADER([curl/curl.h],,[AC_MSG_ERROR([CURL header curl/curl.h not found!])])
930fi
931
932if test x$xml = xtrue; then
a47486b5 933 PKG_CHECK_MODULES(xml, [libxml-2.0])
f2d6355e
MW
934 AC_SUBST(xml_CFLAGS)
935 AC_SUBST(xml_LIBS)
936fi
937
a47486b5
MW
938if test x$dumm = xtrue; then
939 PKG_CHECK_MODULES(gtk, [gtk+-2.0 vte])
940 AC_SUBST(gtk_CFLAGS)
941 AC_SUBST(gtk_LIBS)
d2e9cbc9
TB
942 AC_CHECK_PROGS(RUBY, ruby)
943 AC_MSG_CHECKING([for Ruby header files])
944 if test -n "$RUBY"; then
945 RUBYDIR=`($RUBY -rmkmf -e 'print Config::CONFIG[["archdir"]] || $archdir') 2>/dev/null`
946 if test -n "$RUBYDIR"; then
947 dirs="$RUBYDIR"
948 RUBYINCLUDE=none
949 for i in $dirs; do
950 if test -r $i/ruby.h; then
951 AC_MSG_RESULT([$i])
952 RUBYINCLUDE="-I$i"
953 break;
954 fi
955 done
956 if test x"$RUBYINCLUDE" = xnone; then
957 AC_MSG_ERROR([ruby.h not found])
958 fi
959 AC_SUBST(RUBYINCLUDE)
960 else
961 AC_MSG_ERROR([unable to determine ruby configuration])
962 fi
963 else
964 AC_MSG_ERROR([don't know how to run ruby])
965 fi
a47486b5
MW
966fi
967
6b9290ff
MW
968if test x$fast = xtrue; then
969 AC_HAVE_LIBRARY([neo_cgi],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver library neo_cgi not found!])])
970 AC_HAVE_LIBRARY([neo_utl],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver library neo_utl not found!])])
971 AC_HAVE_LIBRARY([z],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver dependency zlib not found!])])
972dnl autoconf does not like CamelCase!? How to fix this?
973dnl AC_CHECK_HEADER([ClearSilver/ClearSilver.h],,[AC_MSG_ERROR([ClearSilver header file ClearSilver/ClearSilver.h not found!])])
974
975 AC_HAVE_LIBRARY([fcgi],[LIBS="$LIBS"],[AC_MSG_ERROR([FastCGI library fcgi not found!])])
976 AC_CHECK_HEADER([fcgiapp.h],,[AC_MSG_ERROR([FastCGI header file fcgiapp.h not found!])])
a84fb01b
MW
977fi
978
6b9290ff
MW
979if test x$mysql = xtrue; then
980 AC_HAVE_LIBRARY([mysqlclient_r],[LIBS="$LIBS"],[AC_MSG_ERROR([MySQL library mysqlclient_r not found])])
981 AC_CHECK_HEADER([mysql/mysql.h],,[AC_MSG_ERROR([MySQL header mysql/mysql.h not found!])])
982fi
f2c2d395 983
f8277a83 984if test x$sqlite = xtrue; then
6b9290ff
MW
985 AC_HAVE_LIBRARY([sqlite3],[LIBS="$LIBS"],[AC_MSG_ERROR([SQLite library sqlite3 not found])])
986 AC_CHECK_HEADER([sqlite3.h],,[AC_MSG_ERROR([SQLite header sqlite3.h not found!])])
f8277a83
MW
987 AC_MSG_CHECKING([sqlite3_prepare_v2])
988 AC_TRY_COMPILE(
989 [#include <sqlite3.h>],
990 [
991 void *test = sqlite3_prepare_v2;
992 ],
993 [AC_MSG_RESULT([yes])]; AC_DEFINE_UNQUOTED(HAVE_SQLITE3_PREPARE_V2, 1), [AC_MSG_RESULT([no])])
7da767f7
MW
994 AC_MSG_CHECKING([sqlite3.h version >= 3.3.1])
995 AC_TRY_COMPILE(
996 [#include <sqlite3.h>],
997 [
998 #if SQLITE_VERSION_NUMBER < 3003001
999 #error bad sqlite
1000 #endif
1001 ],
1002 [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); AC_MSG_ERROR([SQLite version >= 3.3.1 required!])])
6b9290ff 1003fi
f2c2d395 1004
17353034 1005if test x$openssl = xtrue; then
e581a31d 1006 AC_HAVE_LIBRARY([crypto],[LIBS="$LIBS"],[AC_MSG_ERROR([OpenSSL crypto library not found])])
17353034
TB
1007 AC_CHECK_HEADER([openssl/evp.h],,[AC_MSG_ERROR([OpenSSL header openssl/evp.h not found!])])
1008fi
1009
4977018c 1010if test x$gcrypt = xtrue; then
ccd14645 1011 AM_PATH_LIBGCRYPT(,,[AC_MSG_ERROR([libgcrypt not found!])])
62d6da67
MW
1012 AC_MSG_CHECKING([gcrypt CAMELLIA cipher])
1013 AC_TRY_COMPILE(
1014 [#include <gcrypt.h>],
1015 [enum gcry_cipher_algos alg = GCRY_CIPHER_CAMELLIA128;],
1016 [AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_GCRY_CIPHER_CAMELLIA])],
1017 [AC_MSG_RESULT([no])]
1018 )
4977018c
MW
1019fi
1020
61c46386
MW
1021if test x$uci = xtrue; then
1022 AC_HAVE_LIBRARY([uci],[LIBS="$LIBS"],[AC_MSG_ERROR([UCI library libuci not found])])
1023 AC_CHECK_HEADER([uci.h],,[AC_MSG_ERROR([UCI header uci.h not found!])])
1024fi
1025
6dbce9c8
MW
1026if test x$nm = xtrue; then
1027 PKG_CHECK_MODULES(nm, [NetworkManager libnm_glib_vpn gthread-2.0])
1028 AC_SUBST(nm_CFLAGS)
1029 AC_SUBST(nm_LIBS)
1030fi
1031
1caa265c
MW
1032if test x$eap_gtc = xtrue; then
1033 AC_HAVE_LIBRARY([pam],[LIBS="$LIBS"],[AC_MSG_ERROR([PAM library not found])])
1034 AC_CHECK_HEADER([security/pam_appl.h],,[AC_MSG_ERROR([PAM header security/pam_appl.h not found!])])
1035fi
1036
eb3e2705
MW
1037if test x$capabilities = xlibcap; then
1038 AC_HAVE_LIBRARY([cap],[LIBS="$LIBS"],[AC_MSG_ERROR([libcap library not found])])
1039 AC_CHECK_HEADER([sys/capability.h],,[AC_MSG_ERROR([libcap header sys/capability.h not found!])])
1040fi
1041
1ba62b55
MW
1042dnl ======================================
1043dnl collect all plugins for libstrongswan
1044dnl ======================================
1045
1046libstrongswan_plugins=
de92b9e7 1047pluto_plugins=
1ba62b55 1048
81811a9d
MW
1049if test x$test_vectors = xtrue; then
1050 libstrongswan_plugins=${libstrongswan_plugins}" test-vectors"
1051 pluto_plugins=${pluto_plugins}" test-vectors"
1052fi
1ba62b55 1053if test x$curl = xtrue; then
29727a44 1054 libstrongswan_plugins=${libstrongswan_plugins}" curl"
de92b9e7 1055 pluto_plugins=${pluto_plugins}" curl"
1ba62b55
MW
1056fi
1057if test x$ldap = xtrue; then
29727a44 1058 libstrongswan_plugins=${libstrongswan_plugins}" ldap"
de92b9e7 1059 pluto_plugins=${pluto_plugins}" ldap"
1ba62b55
MW
1060fi
1061if test x$aes = xtrue; then
29727a44 1062 libstrongswan_plugins=${libstrongswan_plugins}" aes"
d36ae9e3 1063 pluto_plugins=${pluto_plugins}" aes"
1ba62b55
MW
1064fi
1065if test x$des = xtrue; then
29727a44 1066 libstrongswan_plugins=${libstrongswan_plugins}" des"
d36ae9e3
AS
1067 pluto_plugins=${pluto_plugins}" des"
1068fi
1069if test x$blowfish = xtrue; then
1070 libstrongswan_plugins=${libstrongswan_plugins}" blowfish"
1071 pluto_plugins=${pluto_plugins}" blowfish"
1072fi
1ba62b55 1073if test x$sha1 = xtrue; then
29727a44 1074 libstrongswan_plugins=${libstrongswan_plugins}" sha1"
d36ae9e3 1075 pluto_plugins=${pluto_plugins}" sha1"
1ba62b55
MW
1076fi
1077if test x$sha2 = xtrue; then
29727a44 1078 libstrongswan_plugins=${libstrongswan_plugins}" sha2"
d36ae9e3 1079 pluto_plugins=${pluto_plugins}" sha2"
1ba62b55 1080fi
1e0d1ae2
AS
1081if test x$md4 = xtrue; then
1082 libstrongswan_plugins=${libstrongswan_plugins}" md4"
1083fi
e577ad39
MW
1084if test x$md5 = xtrue; then
1085 libstrongswan_plugins=${libstrongswan_plugins}" md5"
d36ae9e3 1086 pluto_plugins=${pluto_plugins}" md5"
e577ad39 1087fi
1ba62b55 1088if test x$fips_prf = xtrue; then
29727a44 1089 libstrongswan_plugins=${libstrongswan_plugins}" fips-prf"
1ba62b55 1090fi
1ba62b55 1091if test x$random = xtrue; then
29727a44 1092 libstrongswan_plugins=${libstrongswan_plugins}" random"
bc2e33ca 1093 pluto_plugins=${pluto_plugins}" random"
1ba62b55
MW
1094fi
1095if test x$x509 = xtrue; then
29727a44 1096 libstrongswan_plugins=${libstrongswan_plugins}" x509"
1ba62b55
MW
1097fi
1098if test x$pubkey = xtrue; then
29727a44 1099 libstrongswan_plugins=${libstrongswan_plugins}" pubkey"
c146b2c8 1100 pluto_plugins=${pluto_plugins}" pubkey"
1ba62b55 1101fi
1ba62b55 1102if test x$mysql = xtrue; then
29727a44 1103 libstrongswan_plugins=${libstrongswan_plugins}" mysql"
1ba62b55
MW
1104fi
1105if test x$sqlite = xtrue; then
29727a44 1106 libstrongswan_plugins=${libstrongswan_plugins}" sqlite"
1ba62b55
MW
1107fi
1108if test x$padlock = xtrue; then
29727a44 1109 libstrongswan_plugins=${libstrongswan_plugins}" padlock"
1ba62b55
MW
1110fi
1111if test x$openssl = xtrue; then
29727a44 1112 libstrongswan_plugins=${libstrongswan_plugins}" openssl"
13e51a62 1113 pluto_plugins=${pluto_plugins}" openssl"
1ba62b55 1114fi
4977018c
MW
1115if test x$gcrypt = xtrue; then
1116 libstrongswan_plugins=${libstrongswan_plugins}" gcrypt"
1117 pluto_plugins=${pluto_plugins}" gcrypt"
1118fi
0c013ff3
MW
1119if test x$xcbc = xtrue; then
1120 libstrongswan_plugins=${libstrongswan_plugins}" xcbc"
1121fi
1122if test x$hmac = xtrue; then
1123 libstrongswan_plugins=${libstrongswan_plugins}" hmac"
1124 pluto_plugins=${pluto_plugins}" hmac"
1125fi
21c95463
MW
1126if test x$agent = xtrue; then
1127 libstrongswan_plugins=${libstrongswan_plugins}" agent"
1128fi
e577ad39
MW
1129if test x$gmp = xtrue; then
1130 libstrongswan_plugins=${libstrongswan_plugins}" gmp"
96d42f44 1131 pluto_plugins=${pluto_plugins}" gmp"
e577ad39 1132fi
1ba62b55
MW
1133
1134AC_SUBST(libstrongswan_plugins)
de92b9e7 1135AC_SUBST(pluto_plugins)
1ba62b55 1136
6b9290ff
MW
1137dnl =========================
1138dnl set Makefile.am vars
1139dnl =========================
f2c2d395 1140
1ba62b55
MW
1141dnl libstrongswan plugins
1142dnl =====================
81811a9d 1143AM_CONDITIONAL(USE_TEST_VECTORS, test x$test_vectors = xtrue)
6b9290ff
MW
1144AM_CONDITIONAL(USE_CURL, test x$curl = xtrue)
1145AM_CONDITIONAL(USE_LDAP, test x$ldap = xtrue)
1146AM_CONDITIONAL(USE_AES, test x$aes = xtrue)
1147AM_CONDITIONAL(USE_DES, test x$des = xtrue)
d36ae9e3 1148AM_CONDITIONAL(USE_BLOWFISH, test x$blowfish = xtrue)
1e0d1ae2 1149AM_CONDITIONAL(USE_MD4, test x$md4 = xtrue)
6b9290ff
MW
1150AM_CONDITIONAL(USE_MD5, test x$md5 = xtrue)
1151AM_CONDITIONAL(USE_SHA1, test x$sha1 = xtrue)
1152AM_CONDITIONAL(USE_SHA2, test x$sha2 = xtrue)
1153AM_CONDITIONAL(USE_FIPS_PRF, test x$fips_prf = xtrue)
1154AM_CONDITIONAL(USE_GMP, test x$gmp = xtrue)
6a365f07 1155AM_CONDITIONAL(USE_RANDOM, test x$random = xtrue)
6b9290ff 1156AM_CONDITIONAL(USE_X509, test x$x509 = xtrue)
affd7a90 1157AM_CONDITIONAL(USE_PUBKEY, test x$pubkey = xtrue)
6b9290ff 1158AM_CONDITIONAL(USE_HMAC, test x$hmac = xtrue)
27d04e05 1159AM_CONDITIONAL(USE_XCBC, test x$xcbc = xtrue)
6b9290ff
MW
1160AM_CONDITIONAL(USE_MYSQL, test x$mysql = xtrue)
1161AM_CONDITIONAL(USE_SQLITE, test x$sqlite = xtrue)
1ba62b55
MW
1162AM_CONDITIONAL(USE_PADLOCK, test x$padlock = xtrue)
1163AM_CONDITIONAL(USE_OPENSSL, test x$openssl = xtrue)
4977018c 1164AM_CONDITIONAL(USE_GCRYPT, test x$gcrypt = xtrue)
21c95463 1165AM_CONDITIONAL(USE_AGENT, test x$agent = xtrue)
1ba62b55
MW
1166
1167dnl charon plugins
1168dnl ==============
6b9290ff 1169AM_CONDITIONAL(USE_STROKE, test x$stroke = xtrue)
5b7ec6d4 1170AM_CONDITIONAL(USE_MEDSRV, test x$medsrv = xtrue)
782db7ed 1171AM_CONDITIONAL(USE_MEDCLI, test x$medcli = xtrue)
6dbce9c8 1172AM_CONDITIONAL(USE_NM, test x$nm = xtrue)
61c46386 1173AM_CONDITIONAL(USE_UCI, test x$uci = xtrue)
6b9290ff
MW
1174AM_CONDITIONAL(USE_SMP, test x$smp = xtrue)
1175AM_CONDITIONAL(USE_SQL, test x$sql = xtrue)
ad3af574 1176AM_CONDITIONAL(USE_UPDOWN, test x$updown = xtrue)
adc25ec2
MW
1177AM_CONDITIONAL(USE_ATTR, test x$attr = xtrue)
1178AM_CONDITIONAL(USE_RESOLV_CONF, test x$resolvconf = xtrue)
6b9290ff 1179AM_CONDITIONAL(USE_UNIT_TESTS, test x$unittest = xtrue)
0fd6e955 1180AM_CONDITIONAL(USE_LOAD_TESTS, test x$loadtest = xtrue)
6b9290ff 1181AM_CONDITIONAL(USE_EAP_SIM, test x$eap_sim = xtrue)
79a87846 1182AM_CONDITIONAL(USE_EAP_SIM_FILE, test x$eap_sim_file = xtrue)
6b9290ff
MW
1183AM_CONDITIONAL(USE_EAP_IDENTITY, test x$eap_identity = xtrue)
1184AM_CONDITIONAL(USE_EAP_MD5, test x$eap_md5 = xtrue)
1caa265c 1185AM_CONDITIONAL(USE_EAP_GTC, test x$eap_gtc = xtrue)
6b9290ff 1186AM_CONDITIONAL(USE_EAP_AKA, test x$eap_aka = xtrue)
f98cdf7a 1187AM_CONDITIONAL(USE_EAP_MSCHAPV2, test x$eap_mschapv2 = xtrue)
4a6b84a9 1188AM_CONDITIONAL(USE_EAP_RADIUS, test x$eap_radius = xtrue)
09d7ef26 1189AM_CONDITIONAL(USE_KERNEL_NETLINK, test x$kernel_netlink = xtrue)
1adaa02b 1190AM_CONDITIONAL(USE_KERNEL_PFKEY, test x$kernel_pfkey = xtrue)
ea7e89c7 1191AM_CONDITIONAL(USE_KERNEL_PFROUTE, test x$kernel_pfroute = xtrue)
ea625fab 1192AM_CONDITIONAL(USE_KERNEL_KLIPS, test x$kernel_klips = xtrue)
1ba62b55
MW
1193
1194dnl other options
1195dnl =============
1196AM_CONDITIONAL(USE_SMARTCARD, test x$smartcard = xtrue)
1197AM_CONDITIONAL(USE_CISCO_QUIRKS, test x$cisco_quirks = xtrue)
1198AM_CONDITIONAL(USE_LEAK_DETECTIVE, test x$leak_detective = xtrue)
02140125 1199AM_CONDITIONAL(USE_LOCK_PROFILER, test x$lock_profiler = xtrue)
6b9290ff
MW
1200AM_CONDITIONAL(USE_NAT_TRANSPORT, test x$nat_transport = xtrue)
1201AM_CONDITIONAL(USE_VENDORID, test x$vendor_id = xtrue)
1202AM_CONDITIONAL(USE_XAUTH_VID, test x$xauth_vid = xtrue)
1203AM_CONDITIONAL(USE_DUMM, test x$dumm = xtrue)
1204AM_CONDITIONAL(USE_FAST, test x$fast = xtrue)
1205AM_CONDITIONAL(USE_MANAGER, test x$manager = xtrue)
1206AM_CONDITIONAL(USE_ME, test x$me = xtrue)
1207AM_CONDITIONAL(USE_INTEGRITY_TEST, test x$integrity_test = xtrue)
eb3e2705 1208AM_CONDITIONAL(USE_CAPABILITIES, test x$capabilities = xlibcap)
6b9290ff 1209AM_CONDITIONAL(USE_PLUTO, test x$pluto = xtrue)
6905f794 1210AM_CONDITIONAL(USE_THREADS, test x$threads = xtrue)
6b9290ff
MW
1211AM_CONDITIONAL(USE_CHARON, test x$charon = xtrue)
1212AM_CONDITIONAL(USE_TOOLS, test x$tools = xtrue)
4985ad6e 1213AM_CONDITIONAL(USE_LIBSTRONGSWAN, test x$charon = xtrue -o x$pluto = xtrue -o x$tools = xtrue)
6b9290ff 1214AM_CONDITIONAL(USE_FILE_CONFIG, test x$pluto = xtrue -o x$stroke = xtrue)
d25ce370 1215AM_CONDITIONAL(USE_VSTR, test x$vstr = xtrue)
f2c2d395 1216
9e72d3bc
MW
1217dnl ==============================
1218dnl set global definitions
1219dnl ==============================
1220
1221if test x$me = xtrue; then
1222 AC_DEFINE(ME)
1223fi
eb3e2705
MW
1224if test x$capabilities = xlibcap; then
1225 AC_DEFINE(CAPABILITIES)
1226fi
9e72d3bc 1227
f2c2d395
MW
1228dnl ==============================
1229dnl build Makefiles
1230dnl ==============================
1231
1232AC_OUTPUT(
1233 Makefile
1234 src/Makefile
04a7b6d8 1235 src/include/Makefile
f2c2d395 1236 src/libstrongswan/Makefile
12c68f1b 1237 src/libstrongswan/checksum/Makefile
552cc11b
MW
1238 src/libstrongswan/plugins/aes/Makefile
1239 src/libstrongswan/plugins/des/Makefile
d36ae9e3 1240 src/libstrongswan/plugins/blowfish/Makefile
1e0d1ae2 1241 src/libstrongswan/plugins/md4/Makefile
552cc11b
MW
1242 src/libstrongswan/plugins/md5/Makefile
1243 src/libstrongswan/plugins/sha1/Makefile
1244 src/libstrongswan/plugins/sha2/Makefile
1245 src/libstrongswan/plugins/fips_prf/Makefile
1246 src/libstrongswan/plugins/gmp/Makefile
6a365f07 1247 src/libstrongswan/plugins/random/Makefile
552cc11b 1248 src/libstrongswan/plugins/hmac/Makefile
27d04e05 1249 src/libstrongswan/plugins/xcbc/Makefile
552cc11b 1250 src/libstrongswan/plugins/x509/Makefile
affd7a90 1251 src/libstrongswan/plugins/pubkey/Makefile
552cc11b
MW
1252 src/libstrongswan/plugins/curl/Makefile
1253 src/libstrongswan/plugins/ldap/Makefile
1254 src/libstrongswan/plugins/mysql/Makefile
1255 src/libstrongswan/plugins/sqlite/Makefile
36d62fac 1256 src/libstrongswan/plugins/padlock/Makefile
17353034 1257 src/libstrongswan/plugins/openssl/Makefile
4977018c 1258 src/libstrongswan/plugins/gcrypt/Makefile
21c95463 1259 src/libstrongswan/plugins/agent/Makefile
81811a9d 1260 src/libstrongswan/plugins/test_vectors/Makefile
f2c2d395
MW
1261 src/libfreeswan/Makefile
1262 src/pluto/Makefile
1263 src/whack/Makefile
1264 src/charon/Makefile
552cc11b
MW
1265 src/charon/plugins/eap_aka/Makefile
1266 src/charon/plugins/eap_identity/Makefile
1267 src/charon/plugins/eap_md5/Makefile
1caa265c 1268 src/charon/plugins/eap_gtc/Makefile
552cc11b 1269 src/charon/plugins/eap_sim/Makefile
79a87846 1270 src/charon/plugins/eap_sim_file/Makefile
f98cdf7a 1271 src/charon/plugins/eap_mschapv2/Makefile
4a6b84a9 1272 src/charon/plugins/eap_radius/Makefile
507f26f6 1273 src/charon/plugins/kernel_netlink/Makefile
1adaa02b 1274 src/charon/plugins/kernel_pfkey/Makefile
ea7e89c7 1275 src/charon/plugins/kernel_pfroute/Makefile
ea625fab 1276 src/charon/plugins/kernel_klips/Makefile
6b9290ff 1277 src/charon/plugins/smp/Makefile
552cc11b 1278 src/charon/plugins/sql/Makefile
5b7ec6d4 1279 src/charon/plugins/medsrv/Makefile
782db7ed 1280 src/charon/plugins/medcli/Makefile
6dbce9c8 1281 src/charon/plugins/nm/Makefile
61c46386 1282 src/charon/plugins/uci/Makefile
552cc11b 1283 src/charon/plugins/stroke/Makefile
ad3af574 1284 src/charon/plugins/updown/Makefile
adc25ec2
MW
1285 src/charon/plugins/attr/Makefile
1286 src/charon/plugins/resolv_conf/Makefile
552cc11b 1287 src/charon/plugins/unit_tester/Makefile
0fd6e955 1288 src/charon/plugins/load_tester/Makefile
f2c2d395
MW
1289 src/stroke/Makefile
1290 src/ipsec/Makefile
1291 src/starter/Makefile
1292 src/_updown/Makefile
1293 src/_updown_espmark/Makefile
1294 src/_copyright/Makefile
1295 src/openac/Makefile
1296 src/scepclient/Makefile
f2d6355e 1297 src/dumm/Makefile
2d9ce480 1298 src/dumm/ext/extconf.rb
552cc11b 1299 src/libfast/Makefile
b8c7453a 1300 src/manager/Makefile
9529fb68 1301 src/medsrv/Makefile
39b7780d 1302 scripts/Makefile
9ee1111d 1303 testing/Makefile
f2c2d395 1304)