]> git.ipfire.org Git - thirdparty/strongswan.git/blame - configure.in
Added an option to the configure script to disable building the scripts.
[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
cf00cffe
TB
641AC_ARG_ENABLE(
642 [scripts],
643 AS_HELP_STRING([--disable-scripts],[disable additional utilities (found in directory scripts). (default is NO).]),
644 [if test x$enableval = xyes; then
645 scripts=true
646 else
647 scripts=false
648 fi],
649 scripts=true
650)
651
1e9c46f1
MW
652AC_ARG_ENABLE(
653 [updown],
ad3af574 654 AS_HELP_STRING([--disable-updown],[disable updown firewall script plugin. (default is NO).]),
1e9c46f1
MW
655 [if test x$enableval = xyes; then
656 updown=true
657 else
658 updown=false
659 fi],
660 updown=true
661)
662
adc25ec2
MW
663AC_ARG_ENABLE(
664 [attr],
665 AS_HELP_STRING([--disable-attr],[disable strongswan.conf based configuration attribute plugin. (default is NO).]),
666 [if test x$enableval = xyes; then
667 attr=true
668 else
669 attr=false
670 fi],
671 attr=true
672)
673
674AC_ARG_ENABLE(
675 [resolv-conf],
676 AS_HELP_STRING([--disable-resolv-conf],[disable resolv.conf DNS handler plugin. (default is NO).]),
677 [if test x$enableval = xyes; then
678 resolvconf=true
679 else
680 resolvconf=false
681 fi],
682 resolvconf=true
683)
684
36d62fac
MW
685AC_ARG_ENABLE(
686 [padlock],
687 AS_HELP_STRING([--enable-padlock],[enables VIA Padlock crypto plugin. (default is NO).]),
688 [if test x$enableval = xyes; then
689 padlock=true
690 else
691 padlock=false
692 fi],
693)
694
17353034
TB
695AC_ARG_ENABLE(
696 [openssl],
697 AS_HELP_STRING([--enable-openssl],[enables the OpenSSL crypto plugin. (default is NO).]),
698 [if test x$enableval = xyes; then
699 openssl=true
700 else
701 openssl=false
702 fi],
703)
704
4977018c
MW
705AC_ARG_ENABLE(
706 [gcrypt],
707 AS_HELP_STRING([--enable-gcrypt],[enables the libgcrypt plugin. (default is NO).]),
708 [if test x$enableval = xyes; then
709 gcrypt=true
710 else
711 gcrypt=false
712 fi],
713)
714
21c95463
MW
715AC_ARG_ENABLE(
716 [agent],
717 AS_HELP_STRING([--enable-agent],[enables the ssh-agent signing plugin. (default is NO).]),
718 [if test x$enableval = xyes; then
719 agent=true
720 else
721 agent=false
722 fi],
723)
724
61c46386
MW
725AC_ARG_ENABLE(
726 [uci],
727 AS_HELP_STRING([--enable-uci],[enable OpenWRT UCI configuration plugin (default is NO).]),
728 [if test x$enableval = xyes; then
729 uci=true
730 fi]
731)
732
6dbce9c8
MW
733AC_ARG_ENABLE(
734 [nm],
735 AS_HELP_STRING([--enable-nm],[enable NetworkManager plugin (default is NO).]),
736 [if test x$enableval = xyes; then
737 nm=true
738 fi]
739)
740
bf45d6dd
TB
741AC_ARG_ENABLE(
742 [vstr],
743 AS_HELP_STRING([--enable-vstr],[enforce using the Vstr string library to replace glibc-like printf hooks (default is NO).]),
744 [if test x$enableval = xyes; then
745 vstr=true
746 fi]
747)
748
be0a03be
MW
749dnl =========================
750dnl set up compiler and flags
751dnl =========================
752
753if test -z "$CFLAGS"; then
f5410905 754 CFLAGS="-g -O2 -Wall -Wno-format -Wno-pointer-sign -Wno-strict-aliasing"
be0a03be
MW
755fi
756AC_PROG_CC
f5410905 757AC_LIB_PREFIX
be0a03be
MW
758AC_C_BIGENDIAN
759
f2c2d395
MW
760dnl =========================
761dnl check required programs
762dnl =========================
763
764AC_PROG_INSTALL
765AC_PROG_LIBTOOL
766AC_PROG_LEX
767AC_PROG_YACC
298b06c2
MW
768AC_PATH_PROG([GPERF], [gperf], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
769AC_PATH_PROG([PERL], [perl], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
f2c2d395 770
6b9290ff
MW
771dnl =========================
772dnl dependency calculation
773dnl =========================
f2c2d395 774
a998276a
MW
775if test x$eap_aka = xtrue; then
776 gmp=true;
777 fips_prf=true;
778 sha1=true;
779fi
780
781if test x$eap_sim = xtrue; then
782 fips_prf=true;
783fi
784
785if test x$fips_prf = xtrue; then
786 sha1=true;
787fi
788
6b9290ff
MW
789if test x$tools = xtrue; then
790 gmp=true;
791fi
552cc11b 792
6b9290ff
MW
793if test x$smp = xtrue; then
794 xml=true
795fi
796
797if test x$manager = xtrue; then
798 fast=true
799fi
800
782db7ed
MW
801if test x$medsrv = xtrue; then
802 me=true
9529fb68 803 fast=true
782db7ed
MW
804fi
805
806if test x$medcli = xtrue; then
807 me=true
808fi
809
a9f56adb 810dnl ===========================================
6b9290ff 811dnl check required libraries and header files
a9f56adb
TB
812dnl ===========================================
813
814AC_HEADER_STDBOOL
6b9290ff 815
ea7e89c7
TB
816saved_LIBS=$LIBS
817LIBS=""
818AC_SEARCH_LIBS(dlopen, dl, [DLLIB=$LIBS])
819LIBS=$saved_LIBS
820AC_SUBST(DLLIB)
821
4f734a55
MW
822AC_MSG_CHECKING(for dladdr)
823AC_TRY_COMPILE(
824 [#define _GNU_SOURCE
825 #include <dlfcn.h>],
826 [Dl_info* info = 0;
827 dladdr(0, info);],
828 [AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_DLADDR])],
829 [AC_MSG_RESULT([no])]
830)
831
65ea37ab
TB
832AC_CHECK_FUNCS(backtrace)
833AC_CHECK_FUNCS(prctl)
834AC_CHECK_FUNCS(gethostbyname_r)
65ea37ab 835
9f090745 836AC_CHECK_HEADERS(net/pfkeyv2.h netipsec/ipsec.h netinet6/ipsec.h)
ea7e89c7
TB
837
838AC_CHECK_MEMBERS([struct sockaddr.sa_len], [], [],
839[
840 #include <sys/types.h>
841 #include <sys/socket.h>
842])
843
844AC_CHECK_MEMBERS([struct sadb_x_policy.sadb_x_policy_priority], [], [],
845[
846 #include <sys/types.h>
847 #ifdef HAVE_NET_PFKEYV2_H
848 #include <net/pfkeyv2.h>
849 #else
850 #include <stdint.h>
851 #include <linux/pfkeyv2.h>
852 #endif
853])
e696757c 854
617e59b7
TB
855AC_MSG_CHECKING([for IPSEC_MODE_BEET])
856AC_TRY_COMPILE(
a6ae2a14
TB
857 [#include <sys/types.h>
858 #ifdef HAVE_NETIPSEC_IPSEC_H
617e59b7
TB
859 #include <netipsec/ipsec.h>
860 #elif defined(HAVE_NETINET6_IPSEC_H)
861 #include <netinet6/ipsec.h>
862 #else
a6ae2a14 863 #include <stdint.h>
617e59b7
TB
864 #include <linux/ipsec.h>
865 #endif],
866 [int mode = IPSEC_MODE_BEET;
867 return mode;],
868 [AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_IPSEC_MODE_BEET])],
869 [AC_MSG_RESULT([no])]
870)
871
872AC_MSG_CHECKING([for IPSEC_DIR_FWD])
873AC_TRY_COMPILE(
a6ae2a14
TB
874 [#include <sys/types.h>
875 #ifdef HAVE_NETIPSEC_IPSEC_H
617e59b7
TB
876 #include <netipsec/ipsec.h>
877 #elif defined(HAVE_NETINET6_IPSEC_H)
878 #include <netinet6/ipsec.h>
879 #else
a6ae2a14 880 #include <stdint.h>
617e59b7
TB
881 #include <linux/ipsec.h>
882 #endif],
883 [int dir = IPSEC_DIR_FWD;
884 return dir;],
885 [AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_IPSEC_DIR_FWD])],
886 [AC_MSG_RESULT([no])]
887)
888
efd0fe21
MW
889AC_MSG_CHECKING([for gcc atomic operations])
890AC_TRY_RUN(
891[
892 int main() {
893 volatile int ref = 1;
894 __sync_fetch_and_add (&ref, 1);
895 __sync_sub_and_fetch (&ref, 1);
896 /* Make sure test fails if operations are not supported */
897 __sync_val_compare_and_swap(&ref, 1, 0);
898 return ref;
899 }
900],
901[AC_MSG_RESULT([yes]); AC_DEFINE(HAVE_GCC_ATOMIC_OPERATIONS)],
bb835afa 902[AC_MSG_RESULT([no])],
efd0fe21
MW
903[AC_MSG_RESULT([no])])
904
d25ce370
TB
905AC_CHECK_FUNC(
906 [register_printf_function],
907 [AC_DEFINE(HAVE_PRINTF_HOOKS)],
908 [
909 AC_MSG_NOTICE([printf does not support custom format specifiers!])
bf45d6dd
TB
910 vstr=true
911 ]
912)
913
914if test x$vstr = xtrue; then
915 AC_HAVE_LIBRARY([vstr],[LIBS="$LIBS"],[AC_MSG_ERROR([Vstr string library not found])])
916 AC_DEFINE(USE_VSTR)
917fi
d25ce370 918
6b9290ff 919if test x$gmp = xtrue; then
f8277a83 920 AC_HAVE_LIBRARY([gmp],[LIBS="$LIBS"],[AC_MSG_ERROR([GNU Multi Precision library gmp not found])])
6b9290ff
MW
921 AC_MSG_CHECKING([gmp.h version >= 4.1.4])
922 AC_TRY_COMPILE(
923 [#include "gmp.h"],
924 [
925 #if (__GNU_MP_VERSION*100 + __GNU_MP_VERSION_MINOR*10 + __GNU_MP_VERSION_PATCHLEVEL) < 414
926 #error bad gmp
927 #endif
928 ],
929 [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); AC_MSG_ERROR([No usable gmp.h found!])]
930 )
f2c2d395 931fi
6b9290ff
MW
932
933if test x$ldap = xtrue; then
934 AC_HAVE_LIBRARY([ldap],[LIBS="$LIBS"],[AC_MSG_ERROR([LDAP library ldap not found])])
935 AC_HAVE_LIBRARY([lber],[LIBS="$LIBS"],[AC_MSG_ERROR([LDAP library lber not found])])
936 AC_CHECK_HEADER([ldap.h],,[AC_MSG_ERROR([LDAP header ldap.h not found!])])
f2c2d395
MW
937fi
938
6b9290ff
MW
939if test x$curl = xtrue; then
940 AC_HAVE_LIBRARY([curl],[LIBS="$LIBS"],[AC_MSG_ERROR([CURL library curl not found])])
941 AC_CHECK_HEADER([curl/curl.h],,[AC_MSG_ERROR([CURL header curl/curl.h not found!])])
942fi
943
944if test x$xml = xtrue; then
a47486b5 945 PKG_CHECK_MODULES(xml, [libxml-2.0])
f2d6355e
MW
946 AC_SUBST(xml_CFLAGS)
947 AC_SUBST(xml_LIBS)
948fi
949
a47486b5
MW
950if test x$dumm = xtrue; then
951 PKG_CHECK_MODULES(gtk, [gtk+-2.0 vte])
952 AC_SUBST(gtk_CFLAGS)
953 AC_SUBST(gtk_LIBS)
d2e9cbc9
TB
954 AC_CHECK_PROGS(RUBY, ruby)
955 AC_MSG_CHECKING([for Ruby header files])
956 if test -n "$RUBY"; then
957 RUBYDIR=`($RUBY -rmkmf -e 'print Config::CONFIG[["archdir"]] || $archdir') 2>/dev/null`
958 if test -n "$RUBYDIR"; then
959 dirs="$RUBYDIR"
960 RUBYINCLUDE=none
961 for i in $dirs; do
962 if test -r $i/ruby.h; then
963 AC_MSG_RESULT([$i])
964 RUBYINCLUDE="-I$i"
965 break;
966 fi
967 done
968 if test x"$RUBYINCLUDE" = xnone; then
969 AC_MSG_ERROR([ruby.h not found])
970 fi
971 AC_SUBST(RUBYINCLUDE)
972 else
973 AC_MSG_ERROR([unable to determine ruby configuration])
974 fi
975 else
976 AC_MSG_ERROR([don't know how to run ruby])
977 fi
a47486b5
MW
978fi
979
6b9290ff
MW
980if test x$fast = xtrue; then
981 AC_HAVE_LIBRARY([neo_cgi],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver library neo_cgi not found!])])
982 AC_HAVE_LIBRARY([neo_utl],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver library neo_utl not found!])])
983 AC_HAVE_LIBRARY([z],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver dependency zlib not found!])])
984dnl autoconf does not like CamelCase!? How to fix this?
985dnl AC_CHECK_HEADER([ClearSilver/ClearSilver.h],,[AC_MSG_ERROR([ClearSilver header file ClearSilver/ClearSilver.h not found!])])
986
987 AC_HAVE_LIBRARY([fcgi],[LIBS="$LIBS"],[AC_MSG_ERROR([FastCGI library fcgi not found!])])
988 AC_CHECK_HEADER([fcgiapp.h],,[AC_MSG_ERROR([FastCGI header file fcgiapp.h not found!])])
a84fb01b
MW
989fi
990
6b9290ff
MW
991if test x$mysql = xtrue; then
992 AC_HAVE_LIBRARY([mysqlclient_r],[LIBS="$LIBS"],[AC_MSG_ERROR([MySQL library mysqlclient_r not found])])
993 AC_CHECK_HEADER([mysql/mysql.h],,[AC_MSG_ERROR([MySQL header mysql/mysql.h not found!])])
994fi
f2c2d395 995
f8277a83 996if test x$sqlite = xtrue; then
6b9290ff
MW
997 AC_HAVE_LIBRARY([sqlite3],[LIBS="$LIBS"],[AC_MSG_ERROR([SQLite library sqlite3 not found])])
998 AC_CHECK_HEADER([sqlite3.h],,[AC_MSG_ERROR([SQLite header sqlite3.h not found!])])
f8277a83
MW
999 AC_MSG_CHECKING([sqlite3_prepare_v2])
1000 AC_TRY_COMPILE(
1001 [#include <sqlite3.h>],
1002 [
1003 void *test = sqlite3_prepare_v2;
1004 ],
1005 [AC_MSG_RESULT([yes])]; AC_DEFINE_UNQUOTED(HAVE_SQLITE3_PREPARE_V2, 1), [AC_MSG_RESULT([no])])
7da767f7
MW
1006 AC_MSG_CHECKING([sqlite3.h version >= 3.3.1])
1007 AC_TRY_COMPILE(
1008 [#include <sqlite3.h>],
1009 [
1010 #if SQLITE_VERSION_NUMBER < 3003001
1011 #error bad sqlite
1012 #endif
1013 ],
1014 [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); AC_MSG_ERROR([SQLite version >= 3.3.1 required!])])
6b9290ff 1015fi
f2c2d395 1016
17353034 1017if test x$openssl = xtrue; then
e581a31d 1018 AC_HAVE_LIBRARY([crypto],[LIBS="$LIBS"],[AC_MSG_ERROR([OpenSSL crypto library not found])])
17353034
TB
1019 AC_CHECK_HEADER([openssl/evp.h],,[AC_MSG_ERROR([OpenSSL header openssl/evp.h not found!])])
1020fi
1021
4977018c 1022if test x$gcrypt = xtrue; then
ccd14645 1023 AM_PATH_LIBGCRYPT(,,[AC_MSG_ERROR([libgcrypt not found!])])
62d6da67
MW
1024 AC_MSG_CHECKING([gcrypt CAMELLIA cipher])
1025 AC_TRY_COMPILE(
1026 [#include <gcrypt.h>],
1027 [enum gcry_cipher_algos alg = GCRY_CIPHER_CAMELLIA128;],
1028 [AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_GCRY_CIPHER_CAMELLIA])],
1029 [AC_MSG_RESULT([no])]
1030 )
4977018c
MW
1031fi
1032
61c46386
MW
1033if test x$uci = xtrue; then
1034 AC_HAVE_LIBRARY([uci],[LIBS="$LIBS"],[AC_MSG_ERROR([UCI library libuci not found])])
1035 AC_CHECK_HEADER([uci.h],,[AC_MSG_ERROR([UCI header uci.h not found!])])
1036fi
1037
6dbce9c8
MW
1038if test x$nm = xtrue; then
1039 PKG_CHECK_MODULES(nm, [NetworkManager libnm_glib_vpn gthread-2.0])
1040 AC_SUBST(nm_CFLAGS)
1041 AC_SUBST(nm_LIBS)
1042fi
1043
1caa265c
MW
1044if test x$eap_gtc = xtrue; then
1045 AC_HAVE_LIBRARY([pam],[LIBS="$LIBS"],[AC_MSG_ERROR([PAM library not found])])
1046 AC_CHECK_HEADER([security/pam_appl.h],,[AC_MSG_ERROR([PAM header security/pam_appl.h not found!])])
1047fi
1048
eb3e2705
MW
1049if test x$capabilities = xlibcap; then
1050 AC_HAVE_LIBRARY([cap],[LIBS="$LIBS"],[AC_MSG_ERROR([libcap library not found])])
1051 AC_CHECK_HEADER([sys/capability.h],,[AC_MSG_ERROR([libcap header sys/capability.h not found!])])
1052fi
1053
e4e6a77a
MW
1054if test x$integrity_test = xtrue; then
1055 AC_MSG_CHECKING([for dladdr()])
1056 AC_TRY_COMPILE(
1057 [#define _GNU_SOURCE
1058 #include <dlfcn.h>],
1059 [Dl_info info; dladdr(main, &info);],
1060 [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]);
1061 AC_MSG_ERROR([dladdr() not supported, required by integrity-test!])]
1062 )
1063 AC_MSG_CHECKING([for dl_iterate_phdr()])
1064 AC_TRY_COMPILE(
1065 [#define _GNU_SOURCE
1066 #include <link.h>],
1067 [dl_iterate_phdr((void*)0, (void*)0);],
1068 [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]);
1069 AC_MSG_ERROR([dl_iterate_phdr() not supported, required by integrity-test!])]
1070 )
1071fi
1072
1ba62b55
MW
1073dnl ======================================
1074dnl collect all plugins for libstrongswan
1075dnl ======================================
1076
1077libstrongswan_plugins=
de92b9e7 1078pluto_plugins=
1ba62b55 1079
81811a9d
MW
1080if test x$test_vectors = xtrue; then
1081 libstrongswan_plugins=${libstrongswan_plugins}" test-vectors"
1082 pluto_plugins=${pluto_plugins}" test-vectors"
1083fi
1ba62b55 1084if test x$curl = xtrue; then
29727a44 1085 libstrongswan_plugins=${libstrongswan_plugins}" curl"
de92b9e7 1086 pluto_plugins=${pluto_plugins}" curl"
1ba62b55
MW
1087fi
1088if test x$ldap = xtrue; then
29727a44 1089 libstrongswan_plugins=${libstrongswan_plugins}" ldap"
de92b9e7 1090 pluto_plugins=${pluto_plugins}" ldap"
1ba62b55
MW
1091fi
1092if test x$aes = xtrue; then
29727a44 1093 libstrongswan_plugins=${libstrongswan_plugins}" aes"
d36ae9e3 1094 pluto_plugins=${pluto_plugins}" aes"
1ba62b55
MW
1095fi
1096if test x$des = xtrue; then
29727a44 1097 libstrongswan_plugins=${libstrongswan_plugins}" des"
d36ae9e3
AS
1098 pluto_plugins=${pluto_plugins}" des"
1099fi
1100if test x$blowfish = xtrue; then
1101 libstrongswan_plugins=${libstrongswan_plugins}" blowfish"
1102 pluto_plugins=${pluto_plugins}" blowfish"
1103fi
1ba62b55 1104if test x$sha1 = xtrue; then
29727a44 1105 libstrongswan_plugins=${libstrongswan_plugins}" sha1"
d36ae9e3 1106 pluto_plugins=${pluto_plugins}" sha1"
1ba62b55
MW
1107fi
1108if test x$sha2 = xtrue; then
29727a44 1109 libstrongswan_plugins=${libstrongswan_plugins}" sha2"
d36ae9e3 1110 pluto_plugins=${pluto_plugins}" sha2"
1ba62b55 1111fi
1e0d1ae2
AS
1112if test x$md4 = xtrue; then
1113 libstrongswan_plugins=${libstrongswan_plugins}" md4"
1114fi
e577ad39
MW
1115if test x$md5 = xtrue; then
1116 libstrongswan_plugins=${libstrongswan_plugins}" md5"
d36ae9e3 1117 pluto_plugins=${pluto_plugins}" md5"
e577ad39 1118fi
1ba62b55 1119if test x$fips_prf = xtrue; then
29727a44 1120 libstrongswan_plugins=${libstrongswan_plugins}" fips-prf"
1ba62b55 1121fi
1ba62b55 1122if test x$random = xtrue; then
29727a44 1123 libstrongswan_plugins=${libstrongswan_plugins}" random"
bc2e33ca 1124 pluto_plugins=${pluto_plugins}" random"
1ba62b55
MW
1125fi
1126if test x$x509 = xtrue; then
29727a44 1127 libstrongswan_plugins=${libstrongswan_plugins}" x509"
1ba62b55
MW
1128fi
1129if test x$pubkey = xtrue; then
29727a44 1130 libstrongswan_plugins=${libstrongswan_plugins}" pubkey"
c146b2c8 1131 pluto_plugins=${pluto_plugins}" pubkey"
1ba62b55 1132fi
1ba62b55 1133if test x$mysql = xtrue; then
29727a44 1134 libstrongswan_plugins=${libstrongswan_plugins}" mysql"
1ba62b55
MW
1135fi
1136if test x$sqlite = xtrue; then
29727a44 1137 libstrongswan_plugins=${libstrongswan_plugins}" sqlite"
1ba62b55
MW
1138fi
1139if test x$padlock = xtrue; then
29727a44 1140 libstrongswan_plugins=${libstrongswan_plugins}" padlock"
1ba62b55
MW
1141fi
1142if test x$openssl = xtrue; then
29727a44 1143 libstrongswan_plugins=${libstrongswan_plugins}" openssl"
13e51a62 1144 pluto_plugins=${pluto_plugins}" openssl"
1ba62b55 1145fi
4977018c
MW
1146if test x$gcrypt = xtrue; then
1147 libstrongswan_plugins=${libstrongswan_plugins}" gcrypt"
1148 pluto_plugins=${pluto_plugins}" gcrypt"
1149fi
0c013ff3
MW
1150if test x$xcbc = xtrue; then
1151 libstrongswan_plugins=${libstrongswan_plugins}" xcbc"
1152fi
1153if test x$hmac = xtrue; then
1154 libstrongswan_plugins=${libstrongswan_plugins}" hmac"
1155 pluto_plugins=${pluto_plugins}" hmac"
1156fi
21c95463
MW
1157if test x$agent = xtrue; then
1158 libstrongswan_plugins=${libstrongswan_plugins}" agent"
1159fi
e577ad39
MW
1160if test x$gmp = xtrue; then
1161 libstrongswan_plugins=${libstrongswan_plugins}" gmp"
96d42f44 1162 pluto_plugins=${pluto_plugins}" gmp"
e577ad39 1163fi
1ba62b55
MW
1164
1165AC_SUBST(libstrongswan_plugins)
de92b9e7 1166AC_SUBST(pluto_plugins)
1ba62b55 1167
6b9290ff
MW
1168dnl =========================
1169dnl set Makefile.am vars
1170dnl =========================
f2c2d395 1171
1ba62b55
MW
1172dnl libstrongswan plugins
1173dnl =====================
81811a9d 1174AM_CONDITIONAL(USE_TEST_VECTORS, test x$test_vectors = xtrue)
6b9290ff
MW
1175AM_CONDITIONAL(USE_CURL, test x$curl = xtrue)
1176AM_CONDITIONAL(USE_LDAP, test x$ldap = xtrue)
1177AM_CONDITIONAL(USE_AES, test x$aes = xtrue)
1178AM_CONDITIONAL(USE_DES, test x$des = xtrue)
d36ae9e3 1179AM_CONDITIONAL(USE_BLOWFISH, test x$blowfish = xtrue)
1e0d1ae2 1180AM_CONDITIONAL(USE_MD4, test x$md4 = xtrue)
6b9290ff
MW
1181AM_CONDITIONAL(USE_MD5, test x$md5 = xtrue)
1182AM_CONDITIONAL(USE_SHA1, test x$sha1 = xtrue)
1183AM_CONDITIONAL(USE_SHA2, test x$sha2 = xtrue)
1184AM_CONDITIONAL(USE_FIPS_PRF, test x$fips_prf = xtrue)
1185AM_CONDITIONAL(USE_GMP, test x$gmp = xtrue)
6a365f07 1186AM_CONDITIONAL(USE_RANDOM, test x$random = xtrue)
6b9290ff 1187AM_CONDITIONAL(USE_X509, test x$x509 = xtrue)
affd7a90 1188AM_CONDITIONAL(USE_PUBKEY, test x$pubkey = xtrue)
6b9290ff 1189AM_CONDITIONAL(USE_HMAC, test x$hmac = xtrue)
27d04e05 1190AM_CONDITIONAL(USE_XCBC, test x$xcbc = xtrue)
6b9290ff
MW
1191AM_CONDITIONAL(USE_MYSQL, test x$mysql = xtrue)
1192AM_CONDITIONAL(USE_SQLITE, test x$sqlite = xtrue)
1ba62b55
MW
1193AM_CONDITIONAL(USE_PADLOCK, test x$padlock = xtrue)
1194AM_CONDITIONAL(USE_OPENSSL, test x$openssl = xtrue)
4977018c 1195AM_CONDITIONAL(USE_GCRYPT, test x$gcrypt = xtrue)
21c95463 1196AM_CONDITIONAL(USE_AGENT, test x$agent = xtrue)
1ba62b55
MW
1197
1198dnl charon plugins
1199dnl ==============
6b9290ff 1200AM_CONDITIONAL(USE_STROKE, test x$stroke = xtrue)
5b7ec6d4 1201AM_CONDITIONAL(USE_MEDSRV, test x$medsrv = xtrue)
782db7ed 1202AM_CONDITIONAL(USE_MEDCLI, test x$medcli = xtrue)
6dbce9c8 1203AM_CONDITIONAL(USE_NM, test x$nm = xtrue)
61c46386 1204AM_CONDITIONAL(USE_UCI, test x$uci = xtrue)
6b9290ff
MW
1205AM_CONDITIONAL(USE_SMP, test x$smp = xtrue)
1206AM_CONDITIONAL(USE_SQL, test x$sql = xtrue)
ad3af574 1207AM_CONDITIONAL(USE_UPDOWN, test x$updown = xtrue)
adc25ec2
MW
1208AM_CONDITIONAL(USE_ATTR, test x$attr = xtrue)
1209AM_CONDITIONAL(USE_RESOLV_CONF, test x$resolvconf = xtrue)
6b9290ff 1210AM_CONDITIONAL(USE_UNIT_TESTS, test x$unittest = xtrue)
0fd6e955 1211AM_CONDITIONAL(USE_LOAD_TESTS, test x$loadtest = xtrue)
6b9290ff 1212AM_CONDITIONAL(USE_EAP_SIM, test x$eap_sim = xtrue)
79a87846 1213AM_CONDITIONAL(USE_EAP_SIM_FILE, test x$eap_sim_file = xtrue)
6b9290ff
MW
1214AM_CONDITIONAL(USE_EAP_IDENTITY, test x$eap_identity = xtrue)
1215AM_CONDITIONAL(USE_EAP_MD5, test x$eap_md5 = xtrue)
1caa265c 1216AM_CONDITIONAL(USE_EAP_GTC, test x$eap_gtc = xtrue)
6b9290ff 1217AM_CONDITIONAL(USE_EAP_AKA, test x$eap_aka = xtrue)
f98cdf7a 1218AM_CONDITIONAL(USE_EAP_MSCHAPV2, test x$eap_mschapv2 = xtrue)
4a6b84a9 1219AM_CONDITIONAL(USE_EAP_RADIUS, test x$eap_radius = xtrue)
09d7ef26 1220AM_CONDITIONAL(USE_KERNEL_NETLINK, test x$kernel_netlink = xtrue)
1adaa02b 1221AM_CONDITIONAL(USE_KERNEL_PFKEY, test x$kernel_pfkey = xtrue)
ea7e89c7 1222AM_CONDITIONAL(USE_KERNEL_PFROUTE, test x$kernel_pfroute = xtrue)
ea625fab 1223AM_CONDITIONAL(USE_KERNEL_KLIPS, test x$kernel_klips = xtrue)
1ba62b55
MW
1224
1225dnl other options
1226dnl =============
1227AM_CONDITIONAL(USE_SMARTCARD, test x$smartcard = xtrue)
1228AM_CONDITIONAL(USE_CISCO_QUIRKS, test x$cisco_quirks = xtrue)
1229AM_CONDITIONAL(USE_LEAK_DETECTIVE, test x$leak_detective = xtrue)
02140125 1230AM_CONDITIONAL(USE_LOCK_PROFILER, test x$lock_profiler = xtrue)
6b9290ff
MW
1231AM_CONDITIONAL(USE_NAT_TRANSPORT, test x$nat_transport = xtrue)
1232AM_CONDITIONAL(USE_VENDORID, test x$vendor_id = xtrue)
1233AM_CONDITIONAL(USE_XAUTH_VID, test x$xauth_vid = xtrue)
1234AM_CONDITIONAL(USE_DUMM, test x$dumm = xtrue)
1235AM_CONDITIONAL(USE_FAST, test x$fast = xtrue)
1236AM_CONDITIONAL(USE_MANAGER, test x$manager = xtrue)
1237AM_CONDITIONAL(USE_ME, test x$me = xtrue)
1238AM_CONDITIONAL(USE_INTEGRITY_TEST, test x$integrity_test = xtrue)
eb3e2705 1239AM_CONDITIONAL(USE_CAPABILITIES, test x$capabilities = xlibcap)
6b9290ff 1240AM_CONDITIONAL(USE_PLUTO, test x$pluto = xtrue)
6905f794 1241AM_CONDITIONAL(USE_THREADS, test x$threads = xtrue)
6b9290ff
MW
1242AM_CONDITIONAL(USE_CHARON, test x$charon = xtrue)
1243AM_CONDITIONAL(USE_TOOLS, test x$tools = xtrue)
cf00cffe 1244AM_CONDITIONAL(USE_SCRIPTS, test x$scripts = xtrue)
4985ad6e 1245AM_CONDITIONAL(USE_LIBSTRONGSWAN, test x$charon = xtrue -o x$pluto = xtrue -o x$tools = xtrue)
6b9290ff 1246AM_CONDITIONAL(USE_FILE_CONFIG, test x$pluto = xtrue -o x$stroke = xtrue)
d25ce370 1247AM_CONDITIONAL(USE_VSTR, test x$vstr = xtrue)
f2c2d395 1248
9e72d3bc
MW
1249dnl ==============================
1250dnl set global definitions
1251dnl ==============================
1252
1253if test x$me = xtrue; then
1254 AC_DEFINE(ME)
1255fi
eb3e2705
MW
1256if test x$capabilities = xlibcap; then
1257 AC_DEFINE(CAPABILITIES)
1258fi
9e72d3bc 1259
f2c2d395
MW
1260dnl ==============================
1261dnl build Makefiles
1262dnl ==============================
1263
1264AC_OUTPUT(
1265 Makefile
1266 src/Makefile
04a7b6d8 1267 src/include/Makefile
f2c2d395 1268 src/libstrongswan/Makefile
552cc11b
MW
1269 src/libstrongswan/plugins/aes/Makefile
1270 src/libstrongswan/plugins/des/Makefile
d36ae9e3 1271 src/libstrongswan/plugins/blowfish/Makefile
1e0d1ae2 1272 src/libstrongswan/plugins/md4/Makefile
552cc11b
MW
1273 src/libstrongswan/plugins/md5/Makefile
1274 src/libstrongswan/plugins/sha1/Makefile
1275 src/libstrongswan/plugins/sha2/Makefile
1276 src/libstrongswan/plugins/fips_prf/Makefile
1277 src/libstrongswan/plugins/gmp/Makefile
6a365f07 1278 src/libstrongswan/plugins/random/Makefile
552cc11b 1279 src/libstrongswan/plugins/hmac/Makefile
27d04e05 1280 src/libstrongswan/plugins/xcbc/Makefile
552cc11b 1281 src/libstrongswan/plugins/x509/Makefile
affd7a90 1282 src/libstrongswan/plugins/pubkey/Makefile
552cc11b
MW
1283 src/libstrongswan/plugins/curl/Makefile
1284 src/libstrongswan/plugins/ldap/Makefile
1285 src/libstrongswan/plugins/mysql/Makefile
1286 src/libstrongswan/plugins/sqlite/Makefile
36d62fac 1287 src/libstrongswan/plugins/padlock/Makefile
17353034 1288 src/libstrongswan/plugins/openssl/Makefile
4977018c 1289 src/libstrongswan/plugins/gcrypt/Makefile
21c95463 1290 src/libstrongswan/plugins/agent/Makefile
81811a9d 1291 src/libstrongswan/plugins/test_vectors/Makefile
f2c2d395
MW
1292 src/libfreeswan/Makefile
1293 src/pluto/Makefile
1294 src/whack/Makefile
1295 src/charon/Makefile
552cc11b
MW
1296 src/charon/plugins/eap_aka/Makefile
1297 src/charon/plugins/eap_identity/Makefile
1298 src/charon/plugins/eap_md5/Makefile
1caa265c 1299 src/charon/plugins/eap_gtc/Makefile
552cc11b 1300 src/charon/plugins/eap_sim/Makefile
79a87846 1301 src/charon/plugins/eap_sim_file/Makefile
f98cdf7a 1302 src/charon/plugins/eap_mschapv2/Makefile
4a6b84a9 1303 src/charon/plugins/eap_radius/Makefile
507f26f6 1304 src/charon/plugins/kernel_netlink/Makefile
1adaa02b 1305 src/charon/plugins/kernel_pfkey/Makefile
ea7e89c7 1306 src/charon/plugins/kernel_pfroute/Makefile
ea625fab 1307 src/charon/plugins/kernel_klips/Makefile
6b9290ff 1308 src/charon/plugins/smp/Makefile
552cc11b 1309 src/charon/plugins/sql/Makefile
5b7ec6d4 1310 src/charon/plugins/medsrv/Makefile
782db7ed 1311 src/charon/plugins/medcli/Makefile
6dbce9c8 1312 src/charon/plugins/nm/Makefile
61c46386 1313 src/charon/plugins/uci/Makefile
552cc11b 1314 src/charon/plugins/stroke/Makefile
ad3af574 1315 src/charon/plugins/updown/Makefile
adc25ec2
MW
1316 src/charon/plugins/attr/Makefile
1317 src/charon/plugins/resolv_conf/Makefile
552cc11b 1318 src/charon/plugins/unit_tester/Makefile
0fd6e955 1319 src/charon/plugins/load_tester/Makefile
f2c2d395
MW
1320 src/stroke/Makefile
1321 src/ipsec/Makefile
1322 src/starter/Makefile
1323 src/_updown/Makefile
1324 src/_updown_espmark/Makefile
1325 src/_copyright/Makefile
1326 src/openac/Makefile
1327 src/scepclient/Makefile
f2d6355e 1328 src/dumm/Makefile
2d9ce480 1329 src/dumm/ext/extconf.rb
552cc11b 1330 src/libfast/Makefile
b8c7453a 1331 src/manager/Makefile
9529fb68 1332 src/medsrv/Makefile
67a7bb02 1333 src/checksum/Makefile
39b7780d 1334 scripts/Makefile
9ee1111d 1335 testing/Makefile
f2c2d395 1336)