added a plugin providing crypto test vectors
[strongswan.git] / configure.in
1 dnl  configure.in for linux strongSwan
2 dnl  Copyright (C) 2006 Martin Willi
3 dnl  Hochschule fuer Technik Rapperswil
4 dnl 
5 dnl  This program is free software; you can redistribute it and/or modify it
6 dnl  under the terms of the GNU General Public License as published by the
7 dnl  Free Software Foundation; either version 2 of the License, or (at your
8 dnl  option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
9 dnl 
10 dnl  This program is distributed in the hope that it will be useful, but
11 dnl  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 dnl  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
13 dnl  for more details.
14
15 dnl ===========================
16 dnl  initialize & set some vars
17 dnl ===========================
18
19 AC_INIT(strongSwan,4.3.2)
20 AM_INIT_AUTOMAKE(tar-ustar)
21 AC_SUBST(confdir, '${sysconfdir}')
22 PKG_PROG_PKG_CONFIG
23
24 dnl =================================
25 dnl  check --enable-xxx & --with-xxx
26 dnl =================================
27
28 AC_ARG_WITH(
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")]
33 )
34
35 AC_ARG_WITH(
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")],
39 )
40
41 AC_ARG_WITH(
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")]
46 )
47 AC_ARG_WITH(
48         [resolv-conf],
49         AS_HELP_STRING([--with-resolv-conf=file],[set the file to use in DNS handler plugin other than "sysconfdir/resolv.conf"]),
50         [AC_SUBST(resolv_conf, "$withval")],
51         [AC_SUBST(resolv_conf, "${sysconfdir}/resolv.conf")]
52 )
53
54 AC_ARG_WITH(
55         [strongswan-conf],
56         AS_HELP_STRING([--with-strongswan-conf=file],[strongswan.conf file other than "sysconfdir/strongswan.conf"]),
57         [AC_SUBST(strongswan_conf, "$withval")],
58         [AC_SUBST(strongswan_conf, "${sysconfdir}/strongswan.conf")]
59 )
60
61 AC_ARG_WITH(
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")]
66 )
67
68 AC_ARG_WITH(
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")]
73 )
74
75 AC_ARG_WITH(
76         [ipsecdir],
77         AS_HELP_STRING([--with-ipsecdir=dir],[installation path for ipsec tools other than "libexecdir/ipsec"]),
78         [AC_SUBST(ipsecdir, "$withval")],
79         [AC_SUBST(ipsecdir, "${libexecdir%/}/ipsec")]
80 )
81 AC_SUBST(plugindir, "${ipsecdir%/}/plugins")
82
83 AC_ARG_WITH(
84         [plugindir],
85         AS_HELP_STRING([--with-plugindir=dir],[installation path for plugins other than "ipsecdir/plugins"]),
86         [AC_SUBST(plugindir, "$withval")],
87         [AC_SUBST(plugindir, "${ipsecdir%/}/plugins")]
88 )
89
90 AC_ARG_WITH(
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")],
94         [AC_SUBST(simreader, "${plugindir%/}/libeapsim-file.so")]
95 )
96
97 AC_ARG_WITH(
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"]),
100         [AC_SUBST(linuxdir, "$withval")], [AC_SUBST(linuxdir, "\${top_srcdir}/src/include")]
101 )
102 AC_SUBST(LINUX_HEADERS)
103
104 AC_ARG_WITH(
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")]
109 )
110
111 AC_ARG_WITH(
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")]
116 )
117
118 AC_ARG_WITH(
119         [uid],,[AC_MSG_ERROR([--with-uid is gone, use --with-user instead!])]
120 )
121
122 AC_ARG_WITH(
123         [gid],,[AC_MSG_ERROR([--with-gid is gone, use --with-group instead!])]
124 )
125
126 AC_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
133 AC_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")]
138 )
139
140 dnl Will be extended to --with-capabilities=libcap|libcap2
141 AC_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
148 AC_ARG_ENABLE(
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]
154 )
155
156 AC_ARG_ENABLE(
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]
162 )
163
164 AC_ARG_ENABLE(
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
173 )
174
175 AC_ARG_ENABLE(
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
184 )
185
186 AC_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
194 AC_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
202 AC_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
210 AC_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
218 AC_ARG_ENABLE(
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
227 )
228
229 AC_ARG_ENABLE(
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
238 )
239
240 AC_ARG_ENABLE(
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
249 )
250
251 AC_ARG_ENABLE(
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
260 )
261
262 AC_ARG_ENABLE(
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
271 )
272
273 AC_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
284 AC_ARG_ENABLE(
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
293 )
294
295 AC_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
306 AC_ARG_ENABLE(
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
315 )
316
317 AC_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
328 AC_ARG_ENABLE(
329         [test-vectors],
330         AS_HELP_STRING([--enable-test-vectprs],[enable plugin providing crypto test vectors (default is NO).]),
331         [if test x$enableval = xyes; then
332                 test_vectors=true
333         fi]
334 )
335
336 AC_ARG_ENABLE(
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]
342 )
343
344 AC_ARG_ENABLE(
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]
350 )
351
352 AC_ARG_ENABLE(
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
361 )
362
363 AC_ARG_ENABLE(
364         [medsrv],
365         AS_HELP_STRING([--enable-medsrv],[enable mediation server web frontend and daemon plugin (default is NO).]),
366         [if test x$enableval = xyes; then
367                 medsrv=true
368         fi]
369 )
370
371 AC_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
379 AC_ARG_ENABLE(
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]
385 )
386
387 AC_ARG_ENABLE(
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]
393 )
394
395 AC_ARG_ENABLE(
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]
401 )
402
403 AC_ARG_ENABLE(
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]
409 )
410
411 AC_ARG_ENABLE(
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]
417 )
418
419 AC_ARG_ENABLE(
420         [lock-profiler],
421         AS_HELP_STRING([--enable-lock-profiler],[enable lock/mutex profiling code (default is NO).]),
422         [if test x$enableval = xyes; then
423                 lock_profiler=true
424         fi]
425 )
426
427 AC_ARG_ENABLE(
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]
433 )
434
435 AC_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
443 AC_ARG_ENABLE(
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]
449 )
450
451 AC_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
459 AC_ARG_ENABLE(
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]
465 )
466
467 AC_ARG_ENABLE(
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]
473 )
474
475 AC_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
483 AC_ARG_ENABLE(
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]
489 )
490
491 AC_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
499 AC_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
507 AC_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
518 AC_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
526 AC_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
534 AC_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
542 AC_ARG_ENABLE(
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]
548 )
549
550 AC_ARG_ENABLE(
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
559 )
560
561 AC_ARG_ENABLE(
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
570 )
571
572 AC_ARG_ENABLE(
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]
578 )
579
580 AC_ARG_ENABLE(
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]
586 )
587
588 AC_ARG_ENABLE(
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]
595 )
596
597 AC_ARG_ENABLE(
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]
603 )
604
605 AC_ARG_ENABLE(
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]
611 )
612
613 AC_ARG_ENABLE(
614         [self-test],
615         AS_HELP_STRING([--disable-self-test],[disable the self-test of the crypto library (default is NO).]),
616         [if test x$enableval = xyes; then
617                 self_test=true
618          else
619                 self_test=false
620         fi],
621         self_test=true
622 )
623
624 AC_ARG_ENABLE(
625         [pluto],
626         AS_HELP_STRING([--disable-pluto],[disable the IKEv1 keying daemon pluto. (default is NO).]),
627         [if test x$enableval = xyes; then
628                 pluto=true
629          else
630                 pluto=false
631         fi],
632         pluto=true
633 )
634
635 AC_ARG_ENABLE(
636         [threads],
637         AS_HELP_STRING([--disable-threads],[disable the use of threads in pluto. Charon always uses threads. (default is NO).]),
638         [if test x$enableval = xyes; then
639                 threads=true
640          else
641                 threads=false
642         fi],
643         threads=true
644 )
645
646 AC_ARG_ENABLE(
647         [charon],
648         AS_HELP_STRING([--disable-charon],[disable the IKEv2 keying daemon charon. (default is NO).]),
649         [if test x$enableval = xyes; then
650                 charon=true
651          else
652                 charon=false
653         fi],
654         charon=true
655 )
656
657 AC_ARG_ENABLE(
658         [tools],
659         AS_HELP_STRING([--disable-tools],[disable additional utilities (openac and scepclient). (default is NO).]),
660         [if test x$enableval = xyes; then
661                 tools=true
662          else
663                 tools=false
664         fi],
665         tools=true
666 )
667
668 AC_ARG_ENABLE(
669         [updown],
670         AS_HELP_STRING([--disable-updown],[disable updown firewall script plugin. (default is NO).]),
671         [if test x$enableval = xyes; then
672                 updown=true
673          else
674                 updown=false
675         fi],
676         updown=true
677 )
678
679 AC_ARG_ENABLE(
680         [attr],
681         AS_HELP_STRING([--disable-attr],[disable strongswan.conf based configuration attribute plugin. (default is NO).]),
682         [if test x$enableval = xyes; then
683                 attr=true
684          else
685                 attr=false
686         fi],
687         attr=true
688 )
689
690 AC_ARG_ENABLE(
691         [resolv-conf],
692         AS_HELP_STRING([--disable-resolv-conf],[disable resolv.conf DNS handler plugin. (default is NO).]),
693         [if test x$enableval = xyes; then
694                 resolvconf=true
695          else
696                 resolvconf=false
697         fi],
698         resolvconf=true
699 )
700
701 AC_ARG_ENABLE(
702         [padlock],
703         AS_HELP_STRING([--enable-padlock],[enables VIA Padlock crypto plugin. (default is NO).]),
704         [if test x$enableval = xyes; then
705                 padlock=true
706          else
707                 padlock=false
708         fi],
709 )
710
711 AC_ARG_ENABLE(
712         [openssl],
713         AS_HELP_STRING([--enable-openssl],[enables the OpenSSL crypto plugin. (default is NO).]),
714         [if test x$enableval = xyes; then
715                 openssl=true
716          else
717                 openssl=false
718         fi],
719 )
720
721 AC_ARG_ENABLE(
722         [gcrypt],
723         AS_HELP_STRING([--enable-gcrypt],[enables the libgcrypt plugin. (default is NO).]),
724         [if test x$enableval = xyes; then
725                 gcrypt=true
726          else
727                 gcrypt=false
728         fi],
729 )
730
731 AC_ARG_ENABLE(
732         [agent],
733         AS_HELP_STRING([--enable-agent],[enables the ssh-agent signing plugin. (default is NO).]),
734         [if test x$enableval = xyes; then
735                 agent=true
736          else
737                 agent=false
738         fi],
739 )
740
741 AC_ARG_ENABLE(
742         [uci],
743         AS_HELP_STRING([--enable-uci],[enable OpenWRT UCI configuration plugin (default is NO).]),
744         [if test x$enableval = xyes; then
745                 uci=true
746         fi]
747 )
748
749 AC_ARG_ENABLE(
750         [nm],
751         AS_HELP_STRING([--enable-nm],[enable NetworkManager plugin (default is NO).]),
752         [if test x$enableval = xyes; then
753                 nm=true
754         fi]
755 )
756
757 AC_ARG_ENABLE(
758         [vstr],
759         AS_HELP_STRING([--enable-vstr],[enforce using the Vstr string library to replace glibc-like printf hooks (default is NO).]),
760         [if test x$enableval = xyes; then
761                 vstr=true
762         fi]
763 )
764
765 dnl =========================
766 dnl  set up compiler and flags
767 dnl =========================
768
769 if test -z "$CFLAGS"; then
770         AC_SUBST(CFLAGS, "-g -O2 -Wall -Wno-format -Wno-pointer-sign -Wno-strict-aliasing")
771 fi
772 AC_PROG_CC
773 AC_C_BIGENDIAN
774
775 dnl =========================
776 dnl  check required programs
777 dnl =========================
778
779 AC_PROG_INSTALL
780 AC_PROG_LIBTOOL
781 AC_PROG_LEX
782 AC_PROG_YACC
783 AC_PATH_PROG([GPERF], [gperf], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
784 AC_PATH_PROG([PERL], [perl], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
785
786 dnl =========================
787 dnl  dependency calculation
788 dnl =========================
789
790 if test x$pluto = xtrue; then
791         gmp=true;
792 fi
793
794 if test x$tools = xtrue; then
795         gmp=true;
796 fi
797
798 if test x$smp = xtrue; then
799         xml=true
800 fi
801
802 if test x$manager = xtrue; then
803         fast=true
804 fi
805
806 if test x$medsrv = xtrue; then
807         me=true
808         fast=true
809 fi
810
811 if test x$medcli = xtrue; then
812         me=true
813 fi
814
815 dnl ===========================================
816 dnl  check required libraries and header files
817 dnl ===========================================
818
819 AC_HEADER_STDBOOL
820
821 saved_LIBS=$LIBS
822 LIBS=""
823 AC_SEARCH_LIBS(dlopen, dl, [DLLIB=$LIBS])
824 LIBS=$saved_LIBS
825 AC_SUBST(DLLIB)
826
827 AC_MSG_CHECKING(for dladdr)
828 AC_TRY_COMPILE(
829         [#define _GNU_SOURCE
830          #include <dlfcn.h>],
831         [Dl_info* info = 0;
832          dladdr(0, info);],
833         [AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_DLADDR])],
834         [AC_MSG_RESULT([no])]
835 )
836
837 AC_CHECK_FUNCS(backtrace)
838 AC_CHECK_FUNCS(prctl)
839 AC_CHECK_FUNCS(gethostbyname_r)
840
841 AC_CHECK_HEADERS(net/pfkeyv2.h netipsec/ipsec.h netinet6/ipsec.h)
842
843 AC_CHECK_MEMBERS([struct sockaddr.sa_len], [], [],
844 [
845         #include <sys/types.h>
846         #include <sys/socket.h>
847 ])
848
849 AC_CHECK_MEMBERS([struct sadb_x_policy.sadb_x_policy_priority], [], [],
850 [
851         #include <sys/types.h>
852         #ifdef HAVE_NET_PFKEYV2_H
853         #include <net/pfkeyv2.h>
854         #else
855         #include <stdint.h>
856         #include <linux/pfkeyv2.h>
857         #endif
858 ])
859
860 AC_MSG_CHECKING([for IPSEC_MODE_BEET])
861 AC_TRY_COMPILE(
862         [#include <sys/types.h>
863         #ifdef HAVE_NETIPSEC_IPSEC_H
864         #include <netipsec/ipsec.h>
865         #elif defined(HAVE_NETINET6_IPSEC_H)
866         #include <netinet6/ipsec.h>
867         #else
868         #include <stdint.h>
869         #include <linux/ipsec.h>
870         #endif],
871         [int mode = IPSEC_MODE_BEET;
872          return mode;],
873         [AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_IPSEC_MODE_BEET])],
874         [AC_MSG_RESULT([no])]
875 )
876
877 AC_MSG_CHECKING([for IPSEC_DIR_FWD])
878 AC_TRY_COMPILE(
879         [#include <sys/types.h>
880         #ifdef HAVE_NETIPSEC_IPSEC_H
881         #include <netipsec/ipsec.h>
882         #elif defined(HAVE_NETINET6_IPSEC_H)
883         #include <netinet6/ipsec.h>
884         #else
885         #include <stdint.h>
886         #include <linux/ipsec.h>
887         #endif],
888         [int dir = IPSEC_DIR_FWD;
889          return dir;],
890         [AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_IPSEC_DIR_FWD])],
891         [AC_MSG_RESULT([no])]
892 )
893
894 AC_MSG_CHECKING([for gcc atomic operations])
895 AC_TRY_RUN(
896 [
897         int main() {
898                 volatile int ref = 1;
899                 __sync_fetch_and_add (&ref, 1);
900                 __sync_sub_and_fetch (&ref, 1);
901                 /* Make sure test fails if operations are not supported */
902                 __sync_val_compare_and_swap(&ref, 1, 0);
903                 return ref;
904         }
905 ],
906 [AC_MSG_RESULT([yes]); AC_DEFINE(HAVE_GCC_ATOMIC_OPERATIONS)],
907 [AC_MSG_RESULT([no])],
908 [AC_MSG_RESULT([no])])
909
910 AC_CHECK_FUNC(
911         [register_printf_function],
912         [AC_DEFINE(HAVE_PRINTF_HOOKS)],
913         [
914                 AC_MSG_NOTICE([printf does not support custom format specifiers!])
915                 vstr=true
916         ]
917 )
918
919 if test x$vstr = xtrue; then
920         AC_HAVE_LIBRARY([vstr],[LIBS="$LIBS"],[AC_MSG_ERROR([Vstr string library not found])])
921         AC_DEFINE(USE_VSTR)
922 fi
923
924 if test x$gmp = xtrue; then
925         AC_HAVE_LIBRARY([gmp],[LIBS="$LIBS"],[AC_MSG_ERROR([GNU Multi Precision library gmp not found])])
926         AC_MSG_CHECKING([gmp.h version >= 4.1.4])
927         AC_TRY_COMPILE(
928                 [#include "gmp.h"],
929                 [
930                         #if (__GNU_MP_VERSION*100 +  __GNU_MP_VERSION_MINOR*10 + __GNU_MP_VERSION_PATCHLEVEL) < 414
931                                 #error bad gmp
932                         #endif
933                 ], 
934                 [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); AC_MSG_ERROR([No usable gmp.h found!])]
935         )
936 fi
937
938 if test x$ldap = xtrue; then
939         AC_HAVE_LIBRARY([ldap],[LIBS="$LIBS"],[AC_MSG_ERROR([LDAP library ldap not found])])
940         AC_HAVE_LIBRARY([lber],[LIBS="$LIBS"],[AC_MSG_ERROR([LDAP library lber not found])])
941         AC_CHECK_HEADER([ldap.h],,[AC_MSG_ERROR([LDAP header ldap.h not found!])])
942 fi
943
944 if test x$curl = xtrue; then
945         AC_HAVE_LIBRARY([curl],[LIBS="$LIBS"],[AC_MSG_ERROR([CURL library curl not found])])
946         AC_CHECK_HEADER([curl/curl.h],,[AC_MSG_ERROR([CURL header curl/curl.h not found!])])
947 fi
948
949 if test x$xml = xtrue; then
950         PKG_CHECK_MODULES(xml, [libxml-2.0])
951         AC_SUBST(xml_CFLAGS)
952         AC_SUBST(xml_LIBS)
953 fi
954
955 if test x$dumm = xtrue; then
956         PKG_CHECK_MODULES(gtk, [gtk+-2.0 vte])
957         AC_SUBST(gtk_CFLAGS)
958         AC_SUBST(gtk_LIBS)
959         AC_CHECK_PROGS(RUBY, ruby)
960         AC_MSG_CHECKING([for Ruby header files])
961         if test -n "$RUBY"; then
962                 RUBYDIR=`($RUBY -rmkmf -e 'print Config::CONFIG[["archdir"]] || $archdir') 2>/dev/null`
963                 if test -n "$RUBYDIR"; then
964                         dirs="$RUBYDIR"
965                         RUBYINCLUDE=none
966                         for i in $dirs; do
967                                 if test -r $i/ruby.h; then
968                                         AC_MSG_RESULT([$i])
969                                         RUBYINCLUDE="-I$i"
970                                         break;
971                                 fi
972                         done
973                         if test x"$RUBYINCLUDE" = xnone; then
974                                 AC_MSG_ERROR([ruby.h not found])
975                         fi
976                         AC_SUBST(RUBYINCLUDE)
977                 else
978                         AC_MSG_ERROR([unable to determine ruby configuration])
979                 fi
980         else
981                 AC_MSG_ERROR([don't know how to run ruby])
982         fi
983 fi
984
985 if test x$fast = xtrue; then
986         AC_HAVE_LIBRARY([neo_cgi],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver library neo_cgi not found!])])
987         AC_HAVE_LIBRARY([neo_utl],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver library neo_utl not found!])])
988         AC_HAVE_LIBRARY([z],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver dependency zlib not found!])])
989 dnl autoconf does not like CamelCase!? How to fix this?
990 dnl     AC_CHECK_HEADER([ClearSilver/ClearSilver.h],,[AC_MSG_ERROR([ClearSilver header file ClearSilver/ClearSilver.h not found!])])
991         
992         AC_HAVE_LIBRARY([fcgi],[LIBS="$LIBS"],[AC_MSG_ERROR([FastCGI library fcgi not found!])])
993         AC_CHECK_HEADER([fcgiapp.h],,[AC_MSG_ERROR([FastCGI header file fcgiapp.h not found!])])
994 fi
995
996 if test x$mysql = xtrue; then
997         AC_HAVE_LIBRARY([mysqlclient_r],[LIBS="$LIBS"],[AC_MSG_ERROR([MySQL library mysqlclient_r not found])])
998         AC_CHECK_HEADER([mysql/mysql.h],,[AC_MSG_ERROR([MySQL header mysql/mysql.h not found!])])
999 fi
1000
1001 if test x$sqlite = xtrue; then
1002         AC_HAVE_LIBRARY([sqlite3],[LIBS="$LIBS"],[AC_MSG_ERROR([SQLite library sqlite3 not found])])
1003         AC_CHECK_HEADER([sqlite3.h],,[AC_MSG_ERROR([SQLite header sqlite3.h not found!])])
1004         AC_MSG_CHECKING([sqlite3_prepare_v2])
1005         AC_TRY_COMPILE(
1006                 [#include <sqlite3.h>],
1007                 [
1008                         void *test = sqlite3_prepare_v2;
1009                 ], 
1010                 [AC_MSG_RESULT([yes])]; AC_DEFINE_UNQUOTED(HAVE_SQLITE3_PREPARE_V2, 1), [AC_MSG_RESULT([no])])
1011         AC_MSG_CHECKING([sqlite3.h version >= 3.3.1])
1012         AC_TRY_COMPILE(
1013                 [#include <sqlite3.h>],
1014                 [
1015                         #if SQLITE_VERSION_NUMBER < 3003001
1016                                 #error bad sqlite
1017                         #endif
1018                 ], 
1019                 [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); AC_MSG_ERROR([SQLite version >= 3.3.1 required!])])
1020 fi
1021
1022 if test x$openssl = xtrue; then
1023         AC_HAVE_LIBRARY([crypto],[LIBS="$LIBS"],[AC_MSG_ERROR([OpenSSL crypto library not found])])
1024         AC_CHECK_HEADER([openssl/evp.h],,[AC_MSG_ERROR([OpenSSL header openssl/evp.h not found!])])
1025 fi
1026
1027 if test x$gcrypt = xtrue; then
1028         AM_PATH_LIBGCRYPT(,,[AC_MSG_ERROR([libgcrypt not found!])])
1029 fi
1030
1031 if test x$uci = xtrue; then
1032         AC_HAVE_LIBRARY([uci],[LIBS="$LIBS"],[AC_MSG_ERROR([UCI library libuci not found])])
1033         AC_CHECK_HEADER([uci.h],,[AC_MSG_ERROR([UCI header uci.h not found!])])
1034 fi
1035
1036 if test x$nm = xtrue; then
1037         PKG_CHECK_MODULES(nm, [NetworkManager libnm_glib_vpn gthread-2.0])
1038         AC_SUBST(nm_CFLAGS)
1039         AC_SUBST(nm_LIBS)
1040 fi
1041
1042 if test x$eap_gtc = xtrue; then
1043         AC_HAVE_LIBRARY([pam],[LIBS="$LIBS"],[AC_MSG_ERROR([PAM library not found])])
1044         AC_CHECK_HEADER([security/pam_appl.h],,[AC_MSG_ERROR([PAM header security/pam_appl.h not found!])])
1045 fi
1046
1047 if test x$capabilities = xlibcap; then
1048         AC_HAVE_LIBRARY([cap],[LIBS="$LIBS"],[AC_MSG_ERROR([libcap library not found])])
1049         AC_CHECK_HEADER([sys/capability.h],,[AC_MSG_ERROR([libcap header sys/capability.h not found!])])
1050 fi
1051
1052 dnl ======================================
1053 dnl  collect all plugins for libstrongswan
1054 dnl ======================================
1055
1056 libstrongswan_plugins=
1057 pluto_plugins=
1058
1059 if test x$test_vectors = xtrue; then
1060         libstrongswan_plugins=${libstrongswan_plugins}" test-vectors"
1061         pluto_plugins=${pluto_plugins}" test-vectors"
1062 fi
1063 if test x$curl = xtrue; then
1064         libstrongswan_plugins=${libstrongswan_plugins}" curl"
1065         pluto_plugins=${pluto_plugins}" curl"
1066 fi
1067 if test x$ldap = xtrue; then
1068         libstrongswan_plugins=${libstrongswan_plugins}" ldap"
1069         pluto_plugins=${pluto_plugins}" ldap"
1070 fi
1071 if test x$aes = xtrue; then
1072         libstrongswan_plugins=${libstrongswan_plugins}" aes"
1073         pluto_plugins=${pluto_plugins}" aes"
1074 fi
1075 if test x$des = xtrue; then
1076         libstrongswan_plugins=${libstrongswan_plugins}" des"
1077         pluto_plugins=${pluto_plugins}" des"
1078 fi
1079 if test x$blowfish = xtrue; then
1080         libstrongswan_plugins=${libstrongswan_plugins}" blowfish"
1081         pluto_plugins=${pluto_plugins}" blowfish"
1082 fi
1083 if test x$serpent = xtrue; then
1084         pluto_plugins=${pluto_plugins}" serpent"
1085 fi
1086 if test x$twofish = xtrue; then
1087         pluto_plugins=${pluto_plugins}" twofish"
1088 fi
1089 if test x$sha1 = xtrue; then
1090         libstrongswan_plugins=${libstrongswan_plugins}" sha1"
1091         pluto_plugins=${pluto_plugins}" sha1"
1092 fi
1093 if test x$sha2 = xtrue; then
1094         libstrongswan_plugins=${libstrongswan_plugins}" sha2"
1095         pluto_plugins=${pluto_plugins}" sha2"
1096 fi
1097 if test x$md4 = xtrue; then
1098         libstrongswan_plugins=${libstrongswan_plugins}" md4"
1099 fi
1100 if test x$md5 = xtrue; then
1101         libstrongswan_plugins=${libstrongswan_plugins}" md5"
1102         pluto_plugins=${pluto_plugins}" md5"
1103 fi
1104 if test x$fips_prf = xtrue; then
1105         libstrongswan_plugins=${libstrongswan_plugins}" fips-prf"
1106 fi
1107 if test x$random = xtrue; then
1108         libstrongswan_plugins=${libstrongswan_plugins}" random"
1109         pluto_plugins=${pluto_plugins}" random"
1110 fi
1111 if test x$x509 = xtrue; then
1112         libstrongswan_plugins=${libstrongswan_plugins}" x509"
1113 fi
1114 if test x$pubkey = xtrue; then
1115         libstrongswan_plugins=${libstrongswan_plugins}" pubkey"
1116         pluto_plugins=${pluto_plugins}" pubkey"
1117 fi
1118 if test x$xcbc = xtrue; then
1119         libstrongswan_plugins=${libstrongswan_plugins}" xcbc"
1120 fi
1121 if test x$hmac = xtrue; then
1122         libstrongswan_plugins=${libstrongswan_plugins}" hmac"
1123         pluto_plugins=${pluto_plugins}" hmac"
1124 fi
1125 if test x$mysql = xtrue; then
1126         libstrongswan_plugins=${libstrongswan_plugins}" mysql"
1127 fi
1128 if test x$sqlite = xtrue; then
1129         libstrongswan_plugins=${libstrongswan_plugins}" sqlite"
1130 fi
1131 if test x$padlock = xtrue; then
1132         libstrongswan_plugins=${libstrongswan_plugins}" padlock"
1133 fi
1134 if test x$openssl = xtrue; then
1135         libstrongswan_plugins=${libstrongswan_plugins}" openssl"
1136         pluto_plugins=${pluto_plugins}" openssl"
1137 fi
1138 if test x$gcrypt = xtrue; then
1139         libstrongswan_plugins=${libstrongswan_plugins}" gcrypt"
1140         pluto_plugins=${pluto_plugins}" gcrypt"
1141 fi
1142 if test x$agent = xtrue; then
1143         libstrongswan_plugins=${libstrongswan_plugins}" agent"
1144 fi
1145 if test x$gmp = xtrue; then
1146         libstrongswan_plugins=${libstrongswan_plugins}" gmp"
1147         pluto_plugins=${pluto_plugins}" gmp"
1148 fi
1149
1150 AC_SUBST(libstrongswan_plugins)
1151 AC_SUBST(pluto_plugins)
1152
1153 dnl =========================
1154 dnl  set Makefile.am vars
1155 dnl =========================
1156
1157 dnl libstrongswan plugins
1158 dnl =====================
1159 AM_CONDITIONAL(USE_TEST_VECTORS, test x$test_vectors = xtrue)
1160 AM_CONDITIONAL(USE_CURL, test x$curl = xtrue)
1161 AM_CONDITIONAL(USE_LDAP, test x$ldap = xtrue)
1162 AM_CONDITIONAL(USE_AES, test x$aes = xtrue)
1163 AM_CONDITIONAL(USE_DES, test x$des = xtrue)
1164 AM_CONDITIONAL(USE_BLOWFISH, test x$blowfish = xtrue)
1165 AM_CONDITIONAL(USE_SERPENT, test x$serpent = xtrue)
1166 AM_CONDITIONAL(USE_TWOFISH, test x$twofish = xtrue)
1167 AM_CONDITIONAL(USE_MD4, test x$md4 = xtrue)
1168 AM_CONDITIONAL(USE_MD5, test x$md5 = xtrue)
1169 AM_CONDITIONAL(USE_SHA1, test x$sha1 = xtrue)
1170 AM_CONDITIONAL(USE_SHA2, test x$sha2 = xtrue)
1171 AM_CONDITIONAL(USE_FIPS_PRF, test x$fips_prf = xtrue)
1172 AM_CONDITIONAL(USE_GMP, test x$gmp = xtrue)
1173 AM_CONDITIONAL(USE_RANDOM, test x$random = xtrue)
1174 AM_CONDITIONAL(USE_X509, test x$x509 = xtrue)
1175 AM_CONDITIONAL(USE_PUBKEY, test x$pubkey = xtrue)
1176 AM_CONDITIONAL(USE_HMAC, test x$hmac = xtrue)
1177 AM_CONDITIONAL(USE_XCBC, test x$xcbc = xtrue)
1178 AM_CONDITIONAL(USE_MYSQL, test x$mysql = xtrue)
1179 AM_CONDITIONAL(USE_SQLITE, test x$sqlite = xtrue)
1180 AM_CONDITIONAL(USE_PADLOCK, test x$padlock = xtrue)
1181 AM_CONDITIONAL(USE_OPENSSL, test x$openssl = xtrue)
1182 AM_CONDITIONAL(USE_GCRYPT, test x$gcrypt = xtrue)
1183 AM_CONDITIONAL(USE_AGENT, test x$agent = xtrue)
1184
1185 dnl charon plugins
1186 dnl ==============
1187 AM_CONDITIONAL(USE_STROKE, test x$stroke = xtrue)
1188 AM_CONDITIONAL(USE_MEDSRV, test x$medsrv = xtrue)
1189 AM_CONDITIONAL(USE_MEDCLI, test x$medcli = xtrue)
1190 AM_CONDITIONAL(USE_NM, test x$nm = xtrue)
1191 AM_CONDITIONAL(USE_UCI, test x$uci = xtrue)
1192 AM_CONDITIONAL(USE_SMP, test x$smp = xtrue)
1193 AM_CONDITIONAL(USE_SQL, test x$sql = xtrue)
1194 AM_CONDITIONAL(USE_UPDOWN, test x$updown = xtrue)
1195 AM_CONDITIONAL(USE_ATTR, test x$attr = xtrue)
1196 AM_CONDITIONAL(USE_RESOLV_CONF, test x$resolvconf = xtrue)
1197 AM_CONDITIONAL(USE_UNIT_TESTS, test x$unittest = xtrue)
1198 AM_CONDITIONAL(USE_LOAD_TESTS, test x$loadtest = xtrue)
1199 AM_CONDITIONAL(USE_EAP_SIM, test x$eap_sim = xtrue)
1200 AM_CONDITIONAL(USE_EAP_SIM_FILE, test x$eap_sim_file = xtrue)
1201 AM_CONDITIONAL(USE_EAP_IDENTITY, test x$eap_identity = xtrue)
1202 AM_CONDITIONAL(USE_EAP_MD5, test x$eap_md5 = xtrue)
1203 AM_CONDITIONAL(USE_EAP_GTC, test x$eap_gtc = xtrue)
1204 AM_CONDITIONAL(USE_EAP_AKA, test x$eap_aka = xtrue)
1205 AM_CONDITIONAL(USE_EAP_MSCHAPV2, test x$eap_mschapv2 = xtrue)
1206 AM_CONDITIONAL(USE_EAP_RADIUS, test x$eap_radius = xtrue)
1207 AM_CONDITIONAL(USE_KERNEL_NETLINK, test x$kernel_netlink = xtrue)
1208 AM_CONDITIONAL(USE_KERNEL_PFKEY, test x$kernel_pfkey = xtrue)
1209 AM_CONDITIONAL(USE_KERNEL_PFROUTE, test x$kernel_pfroute = xtrue)
1210 AM_CONDITIONAL(USE_KERNEL_KLIPS, test x$kernel_klips = xtrue)
1211
1212 dnl other options
1213 dnl =============
1214 AM_CONDITIONAL(USE_SMARTCARD, test x$smartcard = xtrue)
1215 AM_CONDITIONAL(USE_CISCO_QUIRKS, test x$cisco_quirks = xtrue)
1216 AM_CONDITIONAL(USE_LEAK_DETECTIVE, test x$leak_detective = xtrue)
1217 AM_CONDITIONAL(USE_LOCK_PROFILER, test x$lock_profiler = xtrue)
1218 AM_CONDITIONAL(USE_NAT_TRANSPORT, test x$nat_transport = xtrue)
1219 AM_CONDITIONAL(USE_VENDORID, test x$vendor_id = xtrue)
1220 AM_CONDITIONAL(USE_XAUTH_VID, test x$xauth_vid = xtrue)
1221 AM_CONDITIONAL(USE_DUMM, test x$dumm = xtrue)
1222 AM_CONDITIONAL(USE_FAST, test x$fast = xtrue)
1223 AM_CONDITIONAL(USE_MANAGER, test x$manager = xtrue)
1224 AM_CONDITIONAL(USE_ME, test x$me = xtrue)
1225 AM_CONDITIONAL(USE_INTEGRITY_TEST, test x$integrity_test = xtrue)
1226 AM_CONDITIONAL(USE_SELF_TEST, test x$self_test = xtrue)
1227 AM_CONDITIONAL(USE_CAPABILITIES, test x$capabilities = xlibcap)
1228 AM_CONDITIONAL(USE_PLUTO, test x$pluto = xtrue)
1229 AM_CONDITIONAL(USE_THREADS, test x$threads = xtrue)
1230 AM_CONDITIONAL(USE_CHARON, test x$charon = xtrue)
1231 AM_CONDITIONAL(USE_TOOLS, test x$tools = xtrue)
1232 AM_CONDITIONAL(USE_LIBSTRONGSWAN, test x$charon = xtrue -o x$pluto = xtrue -o x$tools = xtrue)
1233 AM_CONDITIONAL(USE_FILE_CONFIG, test x$pluto = xtrue -o x$stroke = xtrue)
1234 AM_CONDITIONAL(USE_VSTR, test x$vstr = xtrue)
1235
1236 dnl ==============================
1237 dnl  set global definitions
1238 dnl ==============================
1239
1240 if test x$me = xtrue; then
1241         AC_DEFINE(ME)
1242 fi
1243 if test x$capabilities = xlibcap; then
1244         AC_DEFINE(CAPABILITIES)
1245 fi
1246
1247 dnl ==============================
1248 dnl  build Makefiles
1249 dnl ==============================
1250
1251 AC_OUTPUT(
1252         Makefile
1253         src/Makefile
1254         src/include/Makefile
1255         src/libstrongswan/Makefile
1256         src/libstrongswan/plugins/aes/Makefile
1257         src/libstrongswan/plugins/des/Makefile
1258         src/libstrongswan/plugins/blowfish/Makefile
1259         src/libstrongswan/plugins/serpent/Makefile
1260         src/libstrongswan/plugins/twofish/Makefile
1261         src/libstrongswan/plugins/md4/Makefile
1262         src/libstrongswan/plugins/md5/Makefile
1263         src/libstrongswan/plugins/sha1/Makefile
1264         src/libstrongswan/plugins/sha2/Makefile
1265         src/libstrongswan/plugins/fips_prf/Makefile
1266         src/libstrongswan/plugins/gmp/Makefile
1267         src/libstrongswan/plugins/random/Makefile
1268         src/libstrongswan/plugins/hmac/Makefile
1269         src/libstrongswan/plugins/xcbc/Makefile
1270         src/libstrongswan/plugins/x509/Makefile
1271         src/libstrongswan/plugins/pubkey/Makefile
1272         src/libstrongswan/plugins/curl/Makefile
1273         src/libstrongswan/plugins/ldap/Makefile
1274         src/libstrongswan/plugins/mysql/Makefile
1275         src/libstrongswan/plugins/sqlite/Makefile
1276         src/libstrongswan/plugins/padlock/Makefile
1277         src/libstrongswan/plugins/openssl/Makefile
1278         src/libstrongswan/plugins/gcrypt/Makefile
1279         src/libstrongswan/plugins/agent/Makefile
1280         src/libstrongswan/plugins/test_vectors/Makefile
1281         src/libstrongswan/fips/Makefile
1282         src/libfreeswan/Makefile
1283         src/pluto/Makefile
1284         src/whack/Makefile
1285         src/charon/Makefile
1286         src/charon/plugins/eap_aka/Makefile
1287         src/charon/plugins/eap_identity/Makefile
1288         src/charon/plugins/eap_md5/Makefile
1289         src/charon/plugins/eap_gtc/Makefile
1290         src/charon/plugins/eap_sim/Makefile
1291         src/charon/plugins/eap_sim_file/Makefile
1292         src/charon/plugins/eap_mschapv2/Makefile
1293         src/charon/plugins/eap_radius/Makefile
1294         src/charon/plugins/kernel_netlink/Makefile
1295         src/charon/plugins/kernel_pfkey/Makefile
1296         src/charon/plugins/kernel_pfroute/Makefile
1297         src/charon/plugins/kernel_klips/Makefile
1298         src/charon/plugins/smp/Makefile
1299         src/charon/plugins/sql/Makefile
1300         src/charon/plugins/medsrv/Makefile
1301         src/charon/plugins/medcli/Makefile
1302         src/charon/plugins/nm/Makefile
1303         src/charon/plugins/uci/Makefile
1304         src/charon/plugins/stroke/Makefile
1305         src/charon/plugins/updown/Makefile
1306         src/charon/plugins/attr/Makefile
1307         src/charon/plugins/resolv_conf/Makefile
1308         src/charon/plugins/unit_tester/Makefile
1309         src/charon/plugins/load_tester/Makefile
1310         src/stroke/Makefile
1311         src/ipsec/Makefile
1312         src/starter/Makefile
1313         src/_updown/Makefile
1314         src/_updown_espmark/Makefile
1315         src/_copyright/Makefile
1316         src/openac/Makefile
1317         src/scepclient/Makefile
1318         src/dumm/Makefile
1319         src/dumm/ext/extconf.rb
1320         src/libfast/Makefile
1321         src/manager/Makefile
1322         src/medsrv/Makefile
1323         scripts/Makefile
1324         testing/Makefile
1325 )