]> git.ipfire.org Git - people/ms/strongswan.git/blame - configure.in
implemented IKE_SA uniqueness using ipsec.conf uniqueids paramater
[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
bc722433 19AC_INIT(strongSwan,4.2.1)
5e5f0bd4 20AM_INIT_AUTOMAKE(tar-ustar)
f2c2d395 21AC_C_BIGENDIAN
f2c2d395 22AC_SUBST(confdir, '${sysconfdir}')
f2c2d395 23
db26d00e
MW
24dnl =================================
25dnl check --enable-xxx & --with-xxx
26dnl =================================
27
28
29AC_ARG_WITH(
6b9290ff
MW
30 [default-pkcs11],
31 AS_HELP_STRING([--with-default-pkcs11=lib],[set the default PKCS11 library other than "/usr/lib/opensc-pkcs11.so"]),
32 [AC_DEFINE_UNQUOTED(PKCS11_DEFAULT_LIB, "$withval")],
33 [AC_DEFINE_UNQUOTED(PKCS11_DEFAULT_LIB, "/usr/lib/opensc-pkcs11.so")]
db26d00e
MW
34)
35
195307b5 36AC_ARG_WITH(
6b9290ff
MW
37 [xauth-module],
38 AS_HELP_STRING([--with-xauth-module=lib],[set the path to the XAUTH module]),
39 [AC_DEFINE_UNQUOTED(XAUTH_DEFAULT_LIB, "$withval")],
195307b5
AS
40)
41
db26d00e 42AC_ARG_WITH(
6b9290ff
MW
43 [random-device],
44 AS_HELP_STRING([--with-random-device=dev],[set the device for real random data other than "/dev/random"]),
45 [AC_DEFINE_UNQUOTED(DEV_RANDOM, "$withval")],
46 [AC_DEFINE_UNQUOTED(DEV_RANDOM, "/dev/random")]
db26d00e 47)
c60c7694 48AC_ARG_WITH(
6b9290ff
MW
49 [resolv-conf],
50 AS_HELP_STRING([--with-resolv-conf=file],[set the file to store DNS server information other than "sysconfdir/resolv.conf"]),
51 [AC_DEFINE_UNQUOTED(RESOLV_CONF, "$withval")],
52 [AC_DEFINE_UNQUOTED(RESOLV_CONF, "${sysconfdir}/resolv.conf")]
c60c7694 53)
db26d00e 54
ff867d06
MW
55AC_ARG_WITH(
56 [strongswan-conf],
57 AS_HELP_STRING([--with-strongswan-conf=file],[strongswan.conf file other than "sysconfdir/strongswan.conf"]),
58 [AC_DEFINE_UNQUOTED(STRONGSWAN_CONF, "$withval")],
59 [AC_DEFINE_UNQUOTED(STRONGSWAN_CONF, "${sysconfdir}/strongswan.conf")]
60)
61
db26d00e 62AC_ARG_WITH(
6b9290ff
MW
63 [urandom-device],
64 AS_HELP_STRING([--with-urandom-device=dev],[set the device for pseudo random data other than "/dev/urandom"]),
65 [AC_DEFINE_UNQUOTED(DEV_URANDOM, "$withval")],
66 [AC_DEFINE_UNQUOTED(DEV_URANDOM, "/dev/urandom")]
db26d00e 67)
f2c2d395 68
dfc14c84 69AC_ARG_WITH(
6b9290ff
MW
70 [piddir],
71 AS_HELP_STRING([--with-piddir=dir],[path for PID and UNIX socket files other than "/var/run"]),
72 [AC_SUBST(piddir, "$withval")],
73 [AC_SUBST(piddir, "/var/run")]
dfc14c84
AS
74)
75
f27f6296 76AC_ARG_WITH(
6b9290ff
MW
77 [ipsecdir],
78 AS_HELP_STRING([--with-ipsecdir=dir],[installation path for ipsec tools other than "libexecdir/ipsec"]),
79 [AC_SUBST(ipsecdir, "$withval")],
80 [AC_SUBST(ipsecdir, "${libexecdir}/ipsec")]
f27f6296 81)
552cc11b 82AC_SUBST(plugindir, "${ipsecdir}/plugins")
f27f6296
MW
83
84AC_ARG_WITH(
6b9290ff
MW
85 [plugindir],
86 AS_HELP_STRING([--with-plugindir=dir],[installation path for plugins other than "ipsecdir/plugins"]),
87 [AC_SUBST(plugindir, "$withval")],
88 [AC_SUBST(plugindir, "${ipsecdir}/plugins")]
f27f6296
MW
89)
90
d560c849 91AC_ARG_WITH(
6b9290ff
MW
92 [sim-reader],
93 AS_HELP_STRING([--with-sim-reader=library.so],[library containing the sim_run_alg()/sim_get_triplet() function for EAP-SIM]),
94 [AC_SUBST(simreader, "$withval")],
95 [AC_SUBST(simreader, "${plugindir}/libeapsim-file.so")]
d560c849
MW
96)
97
04a7b6d8 98AC_ARG_WITH(
6b9290ff
MW
99 [linux-headers],
100 AS_HELP_STRING([--with-linux-headers=dir],[use the linux header files in dir instead of the supplied ones in "src/include"]),
101 [AC_SUBST(linuxdir, "$withval")], [AC_SUBST(linuxdir, "../include")]
04a7b6d8
MW
102)
103AC_SUBST(LINUX_HEADERS)
104
4e411c83 105AC_ARG_WITH(
6b9290ff
MW
106 [routing-table],
107 AS_HELP_STRING([--with-routing-table=num],[use routing table for IPsec routes (default: 220)]),
108 [AC_DEFINE_UNQUOTED(IPSEC_ROUTING_TABLE, $withval) AC_SUBST(IPSEC_ROUTING_TABLE, "$withval")],
109 [AC_DEFINE_UNQUOTED(IPSEC_ROUTING_TABLE, 220) AC_SUBST(IPSEC_ROUTING_TABLE, "220")]
0739cca9
MW
110)
111
112AC_ARG_WITH(
6b9290ff
MW
113 [routing-table-prio],
114 AS_HELP_STRING([--with-routing-table-prio=prio],[priority for IPsec routing table (default: 220)]),
115 [AC_DEFINE_UNQUOTED(IPSEC_ROUTING_TABLE_PRIO, $withval) AC_SUBST(IPSEC_ROUTING_TABLE_PRIO, "$withval")],
116 [AC_DEFINE_UNQUOTED(IPSEC_ROUTING_TABLE_PRIO, 220) AC_SUBST(IPSEC_ROUTING_TABLE_PRIO, "220")]
4e411c83
MW
117)
118
6874bf69 119AC_ARG_WITH(
6b9290ff
MW
120 [uid],
121 AS_HELP_STRING([--with-uid=uid],[change user of the daemons to UID after startup (default is 0).]),
122 [AC_DEFINE_UNQUOTED(IPSEC_UID, $withval) AC_SUBST(ipsecuid, "$withval")],
123 [AC_DEFINE_UNQUOTED(IPSEC_UID, 0) AC_SUBST(ipsecuid, "0")]
6874bf69
MW
124)
125
126AC_ARG_WITH(
6b9290ff
MW
127 [gid],
128 AS_HELP_STRING([--with-gid=gid],[change group of the daemons to GID after startup (default is 0).]),
129 [AC_DEFINE_UNQUOTED(IPSEC_GID, $withval) AC_SUBST(ipsecgid, "$withval")],
130 [AC_DEFINE_UNQUOTED(IPSEC_GID, 0) AC_SUBST(ipsecgid, "0")]
6874bf69
MW
131)
132
f2c2d395 133AC_ARG_ENABLE(
6b9290ff
MW
134 [curl],
135 AS_HELP_STRING([--enable-curl],[enable CURL fetcher plugin to fetch files via libcurl (default is NO). Requires libcurl.]),
136 [if test x$enableval = xyes; then
137 curl=true
138 fi]
f2c2d395 139)
f2c2d395
MW
140
141AC_ARG_ENABLE(
6b9290ff
MW
142 [ldap],
143 AS_HELP_STRING([--enable-ldap],[enable LDAP fetching plugin to fetch files via libldap (default is NO). Requires openLDAP.]),
144 [if test x$enableval = xyes; then
145 ldap=true
146 fi]
f2c2d395 147)
552cc11b
MW
148
149AC_ARG_ENABLE(
6b9290ff
MW
150 [aes],
151 AS_HELP_STRING([--disable-aes],[disable own AES software implementation plugin. (default is NO).]),
152 [if test x$enableval = xyes; then
153 aes=true
154 else
155 aes=false
156 fi],
157 aes=true
552cc11b 158)
552cc11b
MW
159
160AC_ARG_ENABLE(
6b9290ff
MW
161 [des],
162 AS_HELP_STRING([--disable-des],[disable own DES/3DES software implementation plugin. (default is NO).]),
163 [if test x$enableval = xyes; then
164 des=true
165 else
166 des=false
167 fi],
168 des=true
552cc11b 169)
552cc11b
MW
170
171AC_ARG_ENABLE(
6b9290ff
MW
172 [md5],
173 AS_HELP_STRING([--disable-md5],[disable own MD5 software implementation plugin. (default is NO).]),
174 [if test x$enableval = xyes; then
175 md5=true
176 else
177 md5=false
178 fi],
179 md5=true
552cc11b 180)
552cc11b
MW
181
182AC_ARG_ENABLE(
6b9290ff
MW
183 [sha1],
184 AS_HELP_STRING([--disable-sha1],[disable own SHA1 software implementation plugin. (default is NO).]),
185 [if test x$enableval = xyes; then
186 sha1=true
187 else
188 sha1=false
189 fi],
190 sha1=true
552cc11b 191)
552cc11b
MW
192
193AC_ARG_ENABLE(
6b9290ff
MW
194 [sha2],
195 AS_HELP_STRING([--disable-sha2],[disable own SHA256/SHA384/SHA512 software implementation plugin. (default is NO).]),
196 [if test x$enableval = xyes; then
197 sha2=true
198 else
199 sha2=false
200 fi],
201 sha2=true
552cc11b 202)
552cc11b
MW
203
204AC_ARG_ENABLE(
6b9290ff
MW
205 [fips-prf],
206 AS_HELP_STRING([--disable-fips-prf],[disable FIPS PRF software implementation plugin. (default is NO).]),
207 [if test x$enableval = xyes; then
208 fips_prf=true
209 else
210 fips_prf=false
211 fi],
212 fips_prf=true
552cc11b 213)
552cc11b
MW
214
215AC_ARG_ENABLE(
6b9290ff
MW
216 [gmp],
217 AS_HELP_STRING([--disable-gmp],[disable own GNU MP (libgmp) based crypto implementation plugin. (default is NO).]),
218 [if test x$enableval = xyes; then
219 gmp=true
220 else
221 gmp=false
222 fi],
223 gmp=true
552cc11b 224)
552cc11b
MW
225
226AC_ARG_ENABLE(
6b9290ff
MW
227 [x509],
228 AS_HELP_STRING([--disable-x509],[disable own X509 certificate implementation plugin. (default is NO).]),
229 [if test x$enableval = xyes; then
230 x509=true
231 else
232 x509=false
233 fi],
234 x509=true
552cc11b 235)
552cc11b
MW
236
237AC_ARG_ENABLE(
6b9290ff
MW
238 [hmac],
239 AS_HELP_STRING([--disable-hmac],[disable HMAC crypto implementation plugin. (default is NO).]),
240 [if test x$enableval = xyes; then
241 hmac=true
242 else
243 hmac=false
244 fi],
245 hmac=true
552cc11b 246)
552cc11b
MW
247
248AC_ARG_ENABLE(
6b9290ff
MW
249 [mysql],
250 AS_HELP_STRING([--enable-mysql],[enable MySQL database support (default is NO). Requires libmysqlclient_r.]),
251 [if test x$enableval = xyes; then
252 mysql=true
253 fi]
552cc11b 254)
552cc11b
MW
255
256AC_ARG_ENABLE(
6b9290ff
MW
257 [sqlite],
258 AS_HELP_STRING([--enable-sqlite],[enable SQLite database support (default is NO). Requires libsqlite3.]),
259 [if test x$enableval = xyes; then
260 sqlite=true
261 fi]
552cc11b 262)
f2c2d395 263
cbfb2aff 264AC_ARG_ENABLE(
6b9290ff
MW
265 [stroke],
266 AS_HELP_STRING([--disable-stroke],[disable charons stroke (pluto compatibility) configuration backend. (default is NO).]),
267 [if test x$enableval = xyes; then
268 stroke=true
269 else
270 stroke=false
271 fi],
272 stroke=true
cbfb2aff 273)
cbfb2aff 274
552cc11b 275AC_ARG_ENABLE(
6b9290ff
MW
276 [med-db],
277 AS_HELP_STRING([--enable-med-db],[enable MySQL mediation database plugin (default is NO).]),
278 [if test x$enableval = xyes; then
279 med_db=true
280 fi]
552cc11b 281)
552cc11b 282
a84fb01b 283AC_ARG_ENABLE(
6b9290ff
MW
284 [smp],
285 AS_HELP_STRING([--enable-smp],[enable SMP configuration and control interface (default is NO). Requires libxml.]),
286 [if test x$enableval = xyes; then
287 smp=true
288 fi]
a84fb01b 289)
a84fb01b
MW
290
291AC_ARG_ENABLE(
6b9290ff
MW
292 [sql],
293 AS_HELP_STRING([--enable-sql],[enable SQL database configuration backend (default is NO).]),
294 [if test x$enableval = xyes; then
295 sql=true
296 fi]
a84fb01b 297)
a84fb01b 298
8f561d44 299AC_ARG_ENABLE(
6b9290ff
MW
300 [smartcard],
301 AS_HELP_STRING([--enable-smartcard],[enable smartcard support (default is NO).]),
302 [if test x$enableval = xyes; then
303 smartcard=true
304 fi]
8f561d44 305)
8f561d44 306
f2c2d395 307AC_ARG_ENABLE(
6b9290ff
MW
308 [cisco-quirks],
309 AS_HELP_STRING([--enable-cisco-quirks],[enable support of Cisco VPN client (default is NO).]),
310 [if test x$enableval = xyes; then
311 cisco_quirks=true
312 fi]
f2c2d395 313)
f2c2d395 314
2df45a73 315AC_ARG_ENABLE(
6b9290ff
MW
316 [leak-detective],
317 AS_HELP_STRING([--enable-leak-detective],[enable malloc hooks to find memory leaks (default is NO).]),
318 [if test x$enableval = xyes; then
319 leak_detective=true
320 fi]
2df45a73 321)
2df45a73 322
f2c2d395 323AC_ARG_ENABLE(
6b9290ff
MW
324 [unit-tests],
325 AS_HELP_STRING([--enable-unit-tests],[enable unit tests on IKEv2 daemon startup (default is NO).]),
326 [if test x$enableval = xyes; then
327 unittest=true
328 fi]
f2c2d395 329)
f2c2d395 330
552cc11b 331AC_ARG_ENABLE(
6b9290ff
MW
332 [eap-sim],
333 AS_HELP_STRING([--enable-eap-sim],[build SIM authenication module for EAP (default is NO).]),
334 [if test x$enableval = xyes; then
335 eap_sim=true
336 fi]
552cc11b 337)
552cc11b 338
b0f24449 339AC_ARG_ENABLE(
6b9290ff
MW
340 [eap-identity],
341 AS_HELP_STRING([--enable-eap-identity],[build EAP module providing EAP-Identity helper (default is NO).]),
342 [if test x$enableval = xyes; then
343 eap_identity=true
344 fi]
b0f24449 345)
cbfb2aff
MW
346
347AC_ARG_ENABLE(
6b9290ff
MW
348 [eap-md5],
349 AS_HELP_STRING([--enable-eap-md5],[build MD5 (CHAP) authenication module for EAP (default is NO).]),
350 [if test x$enableval = xyes; then
351 eap_md5=true
352 fi]
cbfb2aff 353)
26e24676
MW
354
355AC_ARG_ENABLE(
6b9290ff
MW
356 [eap-aka],
357 AS_HELP_STRING([--enable-eap-aka],[build AKA authentication module for EAP (default is NO).]),
358 [if test x$enableval = xyes; then
359 eap_aka=true
360 fi]
26e24676 361)
b0f24449 362
7b0c588a 363AC_ARG_ENABLE(
6b9290ff
MW
364 [nat-transport],
365 AS_HELP_STRING([--enable-nat-transport],[enable NAT traversal with IPsec transport mode (default is NO).]),
366 [if test x$enableval = xyes; then
367 nat_transport=true
368 fi]
7b0c588a 369)
7b0c588a
AS
370
371AC_ARG_ENABLE(
6b9290ff
MW
372 [vendor-id],
373 AS_HELP_STRING([--disable-vendor-id],[disable the sending of the strongSwan vendor ID (default is NO).]),
374 [if test x$enableval = xyes; then
375 vendor_id=true
376 else
377 vendor_id=false
378 fi],
379 vendor_id=true
7b0c588a 380)
7b0c588a 381
0e307360 382AC_ARG_ENABLE(
6b9290ff
MW
383 [xauth-vid],
384 AS_HELP_STRING([--disable-xauth-vid],[disable the sending of the XAUTH vendor ID (default is NO).]),
385 [if test x$enableval = xyes; then
386 xauth_vid=true
387 else
388 xauth_vid=false
389 fi],
390 xauth_vid=true
0e307360 391)
0e307360 392
fd4ded97 393AC_ARG_ENABLE(
6b9290ff
MW
394 [dumm],
395 AS_HELP_STRING([--enable-dumm],[build the DUMM UML test framework (default is NO).]),
396 [if test x$enableval = xyes; then
397 dumm=true
398 fi]
fd4ded97 399)
fd4ded97 400
552cc11b 401AC_ARG_ENABLE(
6b9290ff
MW
402 [fast],
403 AS_HELP_STRING([--enable-fast],[build libfast (FastCGI Application Server w/ templates (default is NO).]),
404 [if test x$enableval = xyes; then
405 fast=true
406 fi]
552cc11b 407)
552cc11b 408
b8c7453a 409AC_ARG_ENABLE(
6b9290ff
MW
410 [manager],
411 AS_HELP_STRING([--enable-manager],[build web management console (default is NO).]),
412 [if test x$enableval = xyes; then
413 manager=true
414 xml=true
415 fi]
b8c7453a 416)
b8c7453a 417
d5cc1758 418AC_ARG_ENABLE(
6b9290ff
MW
419 [mediation],
420 AS_HELP_STRING([--enable-mediation],[enable IKEv2 Mediation Extension (default is NO).]),
421 [if test x$enableval = xyes; then
422 me=true
423 fi]
d5cc1758 424)
d5cc1758 425
9ee1111d 426AC_ARG_ENABLE(
6b9290ff
MW
427 [integrity-test],
428 AS_HELP_STRING([--enable-integrity-test],[enable the integrity test of the crypto library (default is NO).]),
429 [if test x$enableval = xyes; then
430 integrity_test=true
431 fi]
9ee1111d 432)
9ee1111d
AS
433
434AC_ARG_ENABLE(
6b9290ff
MW
435 [self-test],
436 AS_HELP_STRING([--disable-self-test],[disable the self-test of the crypto library (default is NO).]),
437 [if test x$enableval = xyes; then
438 self_test=true
439 else
440 self_test=false
441 fi],
442 self_test=true
9ee1111d 443)
9ee1111d 444
733f336a 445AC_ARG_ENABLE(
6b9290ff
MW
446 [pluto],
447 AS_HELP_STRING([--disable-pluto],[disable the IKEv1 keying daemon pluto. (default is NO).]),
448 [if test x$enableval = xyes; then
449 pluto=true
450 else
451 pluto=false
452 fi],
453 pluto=true
cbfb2aff 454)
cbfb2aff
MW
455
456AC_ARG_ENABLE(
6b9290ff
MW
457 [charon],
458 AS_HELP_STRING([--disable-charon],[disable the IKEv2 keying daemon charon. (default is NO).]),
459 [if test x$enableval = xyes; then
460 charon=true
461 else
462 charon=false
463 fi],
464 charon=true
cbfb2aff 465)
cbfb2aff
MW
466
467AC_ARG_ENABLE(
6b9290ff
MW
468 [tools],
469 AS_HELP_STRING([--disable-tools],[disable additional utilities (openac and scepclient). (default is NO).]),
470 [if test x$enableval = xyes; then
471 tools=true
472 else
473 tools=false
474 fi],
475 tools=true
733f336a 476)
733f336a 477
f2c2d395
MW
478dnl =========================
479dnl check required programs
480dnl =========================
481
482AC_PROG_INSTALL
483AC_PROG_LIBTOOL
484AC_PROG_LEX
485AC_PROG_YACC
4986554f 486AC_PROG_CC()
298b06c2
MW
487AC_PATH_PROG([GPERF], [gperf], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
488AC_PATH_PROG([PERL], [perl], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
f2c2d395 489
6b9290ff
MW
490dnl =========================
491dnl dependency calculation
492dnl =========================
f2c2d395 493
6b9290ff
MW
494if test x$pluto = xtrue; then
495 gmp=true;
496fi
497
498if test x$tools = xtrue; then
499 gmp=true;
500fi
552cc11b 501
6b9290ff
MW
502if test x$smp = xtrue; then
503 xml=true
504fi
505
506if test x$manager = xtrue; then
507 fast=true
508fi
509
510dnl ==========================================
511dnl check required libraries and header files
512dnl ==========================================
513
514AC_HAVE_LIBRARY(dl)
4986554f 515AC_CHECK_FUNCS(backtrace)
552cc11b 516AC_CHECK_FUNCS(dladdr)
e696757c 517
6b9290ff
MW
518AC_MSG_CHECKING([capset() definition])
519AC_TRY_COMPILE(
520 [#include <linux/capset.h>],
521 [
522 void *test = capset;
523 ],
524 [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); AC_DEFINE_UNQUOTED(NO_CAPSET_DEFINED, 1)]
525)
526
527if test x$gmp = xtrue; then
528 AC_HAVE_LIBRARY([gmp],[LIBS="$LIBS"],[AC_MSG_ERROR([GNU Multi Precision library gmp not found])])
529 AC_MSG_CHECKING([gmp.h version >= 4.1.4])
530 AC_TRY_COMPILE(
531 [#include "gmp.h"],
532 [
533 #if (__GNU_MP_VERSION*100 + __GNU_MP_VERSION_MINOR*10 + __GNU_MP_VERSION_PATCHLEVEL) < 414
534 #error bad gmp
535 #endif
536 ],
537 [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); AC_MSG_ERROR([No usable gmp.h found!])]
538 )
f2c2d395 539fi
6b9290ff
MW
540
541if test x$ldap = xtrue; then
542 AC_HAVE_LIBRARY([ldap],[LIBS="$LIBS"],[AC_MSG_ERROR([LDAP library ldap not found])])
543 AC_HAVE_LIBRARY([lber],[LIBS="$LIBS"],[AC_MSG_ERROR([LDAP library lber not found])])
544 AC_CHECK_HEADER([ldap.h],,[AC_MSG_ERROR([LDAP header ldap.h not found!])])
f2c2d395
MW
545fi
546
6b9290ff
MW
547if test x$curl = xtrue; then
548 AC_HAVE_LIBRARY([curl],[LIBS="$LIBS"],[AC_MSG_ERROR([CURL library curl not found])])
549 AC_CHECK_HEADER([curl/curl.h],,[AC_MSG_ERROR([CURL header curl/curl.h not found!])])
550fi
551
552if test x$xml = xtrue; then
d7bf4e42 553 PKG_CHECK_MODULES(xml, [libxml-2.0],, AC_MSG_ERROR([No libxml2 package information found]))
f2d6355e
MW
554 AC_SUBST(xml_CFLAGS)
555 AC_SUBST(xml_LIBS)
556fi
557
6b9290ff
MW
558if test x$fast = xtrue; then
559 AC_HAVE_LIBRARY([neo_cgi],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver library neo_cgi not found!])])
560 AC_HAVE_LIBRARY([neo_utl],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver library neo_utl not found!])])
561 AC_HAVE_LIBRARY([z],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver dependency zlib not found!])])
562dnl autoconf does not like CamelCase!? How to fix this?
563dnl AC_CHECK_HEADER([ClearSilver/ClearSilver.h],,[AC_MSG_ERROR([ClearSilver header file ClearSilver/ClearSilver.h not found!])])
564
565 AC_HAVE_LIBRARY([fcgi],[LIBS="$LIBS"],[AC_MSG_ERROR([FastCGI library fcgi not found!])])
566 AC_CHECK_HEADER([fcgiapp.h],,[AC_MSG_ERROR([FastCGI header file fcgiapp.h not found!])])
a84fb01b
MW
567fi
568
6b9290ff
MW
569if test x$mysql = xtrue; then
570 AC_HAVE_LIBRARY([mysqlclient_r],[LIBS="$LIBS"],[AC_MSG_ERROR([MySQL library mysqlclient_r not found])])
571 AC_CHECK_HEADER([mysql/mysql.h],,[AC_MSG_ERROR([MySQL header mysql/mysql.h not found!])])
572fi
f2c2d395 573
6b9290ff
MW
574if test x$mysql = xtrue; then
575 AC_HAVE_LIBRARY([sqlite3],[LIBS="$LIBS"],[AC_MSG_ERROR([SQLite library sqlite3 not found])])
576 AC_CHECK_HEADER([sqlite3.h],,[AC_MSG_ERROR([SQLite header sqlite3.h not found!])])
577fi
f2c2d395 578
6b9290ff
MW
579dnl =========================
580dnl set Makefile.am vars
581dnl =========================
f2c2d395 582
6b9290ff
MW
583AM_CONDITIONAL(USE_CURL, test x$curl = xtrue)
584AM_CONDITIONAL(USE_LDAP, test x$ldap = xtrue)
585AM_CONDITIONAL(USE_AES, test x$aes = xtrue)
586AM_CONDITIONAL(USE_DES, test x$des = xtrue)
587AM_CONDITIONAL(USE_MD5, test x$md5 = xtrue)
588AM_CONDITIONAL(USE_SHA1, test x$sha1 = xtrue)
589AM_CONDITIONAL(USE_SHA2, test x$sha2 = xtrue)
590AM_CONDITIONAL(USE_FIPS_PRF, test x$fips_prf = xtrue)
591AM_CONDITIONAL(USE_GMP, test x$gmp = xtrue)
592AM_CONDITIONAL(USE_X509, test x$x509 = xtrue)
593AM_CONDITIONAL(USE_HMAC, test x$hmac = xtrue)
594AM_CONDITIONAL(USE_MYSQL, test x$mysql = xtrue)
595AM_CONDITIONAL(USE_SQLITE, test x$sqlite = xtrue)
596AM_CONDITIONAL(USE_STROKE, test x$stroke = xtrue)
597AM_CONDITIONAL(USE_MED_DB, test x$med_db = xtrue)
598AM_CONDITIONAL(USE_SMP, test x$smp = xtrue)
599AM_CONDITIONAL(USE_SQL, test x$sql = xtrue)
600AM_CONDITIONAL(USE_SMARTCARD, test x$smartcard = xtrue)
601AM_CONDITIONAL(USE_CISCO_QUIRKS, test x$cisco_quirks = xtrue)
602AM_CONDITIONAL(USE_LEAK_DETECTIVE, test x$leak_detective = xtrue)
603AM_CONDITIONAL(USE_UNIT_TESTS, test x$unittest = xtrue)
604AM_CONDITIONAL(USE_EAP_SIM, test x$eap_sim = xtrue)
605AM_CONDITIONAL(USE_EAP_IDENTITY, test x$eap_identity = xtrue)
606AM_CONDITIONAL(USE_EAP_MD5, test x$eap_md5 = xtrue)
607AM_CONDITIONAL(USE_EAP_AKA, test x$eap_aka = xtrue)
608AM_CONDITIONAL(USE_NAT_TRANSPORT, test x$nat_transport = xtrue)
609AM_CONDITIONAL(USE_VENDORID, test x$vendor_id = xtrue)
610AM_CONDITIONAL(USE_XAUTH_VID, test x$xauth_vid = xtrue)
611AM_CONDITIONAL(USE_DUMM, test x$dumm = xtrue)
612AM_CONDITIONAL(USE_FAST, test x$fast = xtrue)
613AM_CONDITIONAL(USE_MANAGER, test x$manager = xtrue)
614AM_CONDITIONAL(USE_ME, test x$me = xtrue)
615AM_CONDITIONAL(USE_INTEGRITY_TEST, test x$integrity_test = xtrue)
616AM_CONDITIONAL(USE_SELF_TEST, test x$self_test = xtrue)
617AM_CONDITIONAL(USE_PLUTO, test x$pluto = xtrue)
618AM_CONDITIONAL(USE_CHARON, test x$charon = xtrue)
619AM_CONDITIONAL(USE_TOOLS, test x$tools = xtrue)
620AM_CONDITIONAL(USE_PLUTO_OR_CHARON, test x$pluto = xtrue -o x$charon = xtrue)
621AM_CONDITIONAL(USE_LIBSTRONGSWAN, test x$charon = xtrue -o x$tools = xtrue)
622AM_CONDITIONAL(USE_FILE_CONFIG, test x$pluto = xtrue -o x$stroke = xtrue)
f2c2d395 623
9e72d3bc
MW
624dnl ==============================
625dnl set global definitions
626dnl ==============================
627
628if test x$me = xtrue; then
629 AC_DEFINE(ME)
630fi
631
f2c2d395
MW
632dnl ==============================
633dnl build Makefiles
634dnl ==============================
635
636AC_OUTPUT(
637 Makefile
638 src/Makefile
04a7b6d8 639 src/include/Makefile
f2c2d395 640 src/libstrongswan/Makefile
552cc11b
MW
641 src/libstrongswan/plugins/aes/Makefile
642 src/libstrongswan/plugins/des/Makefile
643 src/libstrongswan/plugins/md5/Makefile
644 src/libstrongswan/plugins/sha1/Makefile
645 src/libstrongswan/plugins/sha2/Makefile
646 src/libstrongswan/plugins/fips_prf/Makefile
647 src/libstrongswan/plugins/gmp/Makefile
648 src/libstrongswan/plugins/hmac/Makefile
649 src/libstrongswan/plugins/x509/Makefile
650 src/libstrongswan/plugins/curl/Makefile
651 src/libstrongswan/plugins/ldap/Makefile
652 src/libstrongswan/plugins/mysql/Makefile
653 src/libstrongswan/plugins/sqlite/Makefile
f2c2d395
MW
654 src/libcrypto/Makefile
655 src/libfreeswan/Makefile
656 src/pluto/Makefile
657 src/whack/Makefile
658 src/charon/Makefile
552cc11b
MW
659 src/charon/plugins/eap_aka/Makefile
660 src/charon/plugins/eap_identity/Makefile
661 src/charon/plugins/eap_md5/Makefile
662 src/charon/plugins/eap_sim/Makefile
6b9290ff 663 src/charon/plugins/smp/Makefile
552cc11b
MW
664 src/charon/plugins/sql/Makefile
665 src/charon/plugins/med_db/Makefile
666 src/charon/plugins/stroke/Makefile
667 src/charon/plugins/unit_tester/Makefile
f2c2d395
MW
668 src/stroke/Makefile
669 src/ipsec/Makefile
670 src/starter/Makefile
671 src/_updown/Makefile
672 src/_updown_espmark/Makefile
673 src/_copyright/Makefile
674 src/openac/Makefile
675 src/scepclient/Makefile
f2d6355e 676 src/dumm/Makefile
552cc11b 677 src/libfast/Makefile
b8c7453a 678 src/manager/Makefile
9ee1111d 679 testing/Makefile
f2c2d395 680)