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