]> git.ipfire.org Git - people/ms/strongswan.git/blame - configure.in
made some stuff static
[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
7c0c0aac 19AC_INIT(strongSwan,4.2.2)
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 225
6a365f07
MW
226AC_ARG_ENABLE(
227 [random],
228 AS_HELP_STRING([--disable-random],[disable RNG implementation on top of /dev/(u)random. (default is NO).]),
229 [if test x$enableval = xyes; then
230 random=true
231 else
232 random=false
233 fi],
234 random=true
235)
236
552cc11b 237AC_ARG_ENABLE(
6b9290ff
MW
238 [x509],
239 AS_HELP_STRING([--disable-x509],[disable own X509 certificate implementation plugin. (default is NO).]),
240 [if test x$enableval = xyes; then
241 x509=true
242 else
243 x509=false
244 fi],
245 x509=true
552cc11b 246)
552cc11b
MW
247
248AC_ARG_ENABLE(
6b9290ff
MW
249 [hmac],
250 AS_HELP_STRING([--disable-hmac],[disable HMAC crypto implementation plugin. (default is NO).]),
251 [if test x$enableval = xyes; then
252 hmac=true
253 else
254 hmac=false
255 fi],
256 hmac=true
552cc11b 257)
552cc11b
MW
258
259AC_ARG_ENABLE(
6b9290ff
MW
260 [mysql],
261 AS_HELP_STRING([--enable-mysql],[enable MySQL database support (default is NO). Requires libmysqlclient_r.]),
262 [if test x$enableval = xyes; then
263 mysql=true
264 fi]
552cc11b 265)
552cc11b
MW
266
267AC_ARG_ENABLE(
6b9290ff
MW
268 [sqlite],
269 AS_HELP_STRING([--enable-sqlite],[enable SQLite database support (default is NO). Requires libsqlite3.]),
270 [if test x$enableval = xyes; then
271 sqlite=true
272 fi]
552cc11b 273)
f2c2d395 274
cbfb2aff 275AC_ARG_ENABLE(
6b9290ff
MW
276 [stroke],
277 AS_HELP_STRING([--disable-stroke],[disable charons stroke (pluto compatibility) configuration backend. (default is NO).]),
278 [if test x$enableval = xyes; then
279 stroke=true
280 else
281 stroke=false
282 fi],
283 stroke=true
cbfb2aff 284)
cbfb2aff 285
552cc11b 286AC_ARG_ENABLE(
6b9290ff
MW
287 [med-db],
288 AS_HELP_STRING([--enable-med-db],[enable MySQL mediation database plugin (default is NO).]),
289 [if test x$enableval = xyes; then
290 med_db=true
291 fi]
552cc11b 292)
552cc11b 293
a84fb01b 294AC_ARG_ENABLE(
6b9290ff
MW
295 [smp],
296 AS_HELP_STRING([--enable-smp],[enable SMP configuration and control interface (default is NO). Requires libxml.]),
297 [if test x$enableval = xyes; then
298 smp=true
299 fi]
a84fb01b 300)
a84fb01b
MW
301
302AC_ARG_ENABLE(
6b9290ff
MW
303 [sql],
304 AS_HELP_STRING([--enable-sql],[enable SQL database configuration backend (default is NO).]),
305 [if test x$enableval = xyes; then
306 sql=true
307 fi]
a84fb01b 308)
a84fb01b 309
8f561d44 310AC_ARG_ENABLE(
6b9290ff
MW
311 [smartcard],
312 AS_HELP_STRING([--enable-smartcard],[enable smartcard support (default is NO).]),
313 [if test x$enableval = xyes; then
314 smartcard=true
315 fi]
8f561d44 316)
8f561d44 317
f2c2d395 318AC_ARG_ENABLE(
6b9290ff
MW
319 [cisco-quirks],
320 AS_HELP_STRING([--enable-cisco-quirks],[enable support of Cisco VPN client (default is NO).]),
321 [if test x$enableval = xyes; then
322 cisco_quirks=true
323 fi]
f2c2d395 324)
f2c2d395 325
2df45a73 326AC_ARG_ENABLE(
6b9290ff
MW
327 [leak-detective],
328 AS_HELP_STRING([--enable-leak-detective],[enable malloc hooks to find memory leaks (default is NO).]),
329 [if test x$enableval = xyes; then
330 leak_detective=true
331 fi]
2df45a73 332)
2df45a73 333
f2c2d395 334AC_ARG_ENABLE(
6b9290ff
MW
335 [unit-tests],
336 AS_HELP_STRING([--enable-unit-tests],[enable unit tests on IKEv2 daemon startup (default is NO).]),
337 [if test x$enableval = xyes; then
338 unittest=true
339 fi]
f2c2d395 340)
f2c2d395 341
552cc11b 342AC_ARG_ENABLE(
6b9290ff
MW
343 [eap-sim],
344 AS_HELP_STRING([--enable-eap-sim],[build SIM authenication module for EAP (default is NO).]),
345 [if test x$enableval = xyes; then
346 eap_sim=true
347 fi]
552cc11b 348)
552cc11b 349
b0f24449 350AC_ARG_ENABLE(
6b9290ff
MW
351 [eap-identity],
352 AS_HELP_STRING([--enable-eap-identity],[build EAP module providing EAP-Identity helper (default is NO).]),
353 [if test x$enableval = xyes; then
354 eap_identity=true
355 fi]
b0f24449 356)
cbfb2aff
MW
357
358AC_ARG_ENABLE(
6b9290ff
MW
359 [eap-md5],
360 AS_HELP_STRING([--enable-eap-md5],[build MD5 (CHAP) authenication module for EAP (default is NO).]),
361 [if test x$enableval = xyes; then
362 eap_md5=true
363 fi]
cbfb2aff 364)
26e24676
MW
365
366AC_ARG_ENABLE(
6b9290ff
MW
367 [eap-aka],
368 AS_HELP_STRING([--enable-eap-aka],[build AKA authentication module for EAP (default is NO).]),
369 [if test x$enableval = xyes; then
370 eap_aka=true
371 fi]
26e24676 372)
b0f24449 373
7b0c588a 374AC_ARG_ENABLE(
6b9290ff
MW
375 [nat-transport],
376 AS_HELP_STRING([--enable-nat-transport],[enable NAT traversal with IPsec transport mode (default is NO).]),
377 [if test x$enableval = xyes; then
378 nat_transport=true
379 fi]
7b0c588a 380)
7b0c588a
AS
381
382AC_ARG_ENABLE(
6b9290ff
MW
383 [vendor-id],
384 AS_HELP_STRING([--disable-vendor-id],[disable the sending of the strongSwan vendor ID (default is NO).]),
385 [if test x$enableval = xyes; then
386 vendor_id=true
387 else
388 vendor_id=false
389 fi],
390 vendor_id=true
7b0c588a 391)
7b0c588a 392
0e307360 393AC_ARG_ENABLE(
6b9290ff
MW
394 [xauth-vid],
395 AS_HELP_STRING([--disable-xauth-vid],[disable the sending of the XAUTH vendor ID (default is NO).]),
396 [if test x$enableval = xyes; then
397 xauth_vid=true
398 else
399 xauth_vid=false
400 fi],
401 xauth_vid=true
0e307360 402)
0e307360 403
fd4ded97 404AC_ARG_ENABLE(
6b9290ff
MW
405 [dumm],
406 AS_HELP_STRING([--enable-dumm],[build the DUMM UML test framework (default is NO).]),
407 [if test x$enableval = xyes; then
408 dumm=true
409 fi]
fd4ded97 410)
fd4ded97 411
552cc11b 412AC_ARG_ENABLE(
6b9290ff
MW
413 [fast],
414 AS_HELP_STRING([--enable-fast],[build libfast (FastCGI Application Server w/ templates (default is NO).]),
415 [if test x$enableval = xyes; then
416 fast=true
417 fi]
552cc11b 418)
552cc11b 419
b8c7453a 420AC_ARG_ENABLE(
6b9290ff
MW
421 [manager],
422 AS_HELP_STRING([--enable-manager],[build web management console (default is NO).]),
423 [if test x$enableval = xyes; then
424 manager=true
425 xml=true
426 fi]
b8c7453a 427)
b8c7453a 428
d5cc1758 429AC_ARG_ENABLE(
6b9290ff
MW
430 [mediation],
431 AS_HELP_STRING([--enable-mediation],[enable IKEv2 Mediation Extension (default is NO).]),
432 [if test x$enableval = xyes; then
433 me=true
434 fi]
d5cc1758 435)
d5cc1758 436
9ee1111d 437AC_ARG_ENABLE(
6b9290ff
MW
438 [integrity-test],
439 AS_HELP_STRING([--enable-integrity-test],[enable the integrity test of the crypto library (default is NO).]),
440 [if test x$enableval = xyes; then
441 integrity_test=true
442 fi]
9ee1111d 443)
9ee1111d
AS
444
445AC_ARG_ENABLE(
6b9290ff
MW
446 [self-test],
447 AS_HELP_STRING([--disable-self-test],[disable the self-test of the crypto library (default is NO).]),
448 [if test x$enableval = xyes; then
449 self_test=true
450 else
451 self_test=false
452 fi],
453 self_test=true
9ee1111d 454)
9ee1111d 455
733f336a 456AC_ARG_ENABLE(
6b9290ff
MW
457 [pluto],
458 AS_HELP_STRING([--disable-pluto],[disable the IKEv1 keying daemon pluto. (default is NO).]),
459 [if test x$enableval = xyes; then
460 pluto=true
461 else
462 pluto=false
463 fi],
464 pluto=true
cbfb2aff 465)
cbfb2aff
MW
466
467AC_ARG_ENABLE(
6b9290ff
MW
468 [charon],
469 AS_HELP_STRING([--disable-charon],[disable the IKEv2 keying daemon charon. (default is NO).]),
470 [if test x$enableval = xyes; then
471 charon=true
472 else
473 charon=false
474 fi],
475 charon=true
cbfb2aff 476)
cbfb2aff
MW
477
478AC_ARG_ENABLE(
6b9290ff
MW
479 [tools],
480 AS_HELP_STRING([--disable-tools],[disable additional utilities (openac and scepclient). (default is NO).]),
481 [if test x$enableval = xyes; then
482 tools=true
483 else
484 tools=false
485 fi],
486 tools=true
733f336a 487)
733f336a 488
36d62fac
MW
489AC_ARG_ENABLE(
490 [padlock],
491 AS_HELP_STRING([--enable-padlock],[enables VIA Padlock crypto plugin. (default is NO).]),
492 [if test x$enableval = xyes; then
493 padlock=true
494 else
495 padlock=false
496 fi],
497)
498
f2c2d395
MW
499dnl =========================
500dnl check required programs
501dnl =========================
502
503AC_PROG_INSTALL
504AC_PROG_LIBTOOL
505AC_PROG_LEX
506AC_PROG_YACC
4986554f 507AC_PROG_CC()
298b06c2
MW
508AC_PATH_PROG([GPERF], [gperf], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
509AC_PATH_PROG([PERL], [perl], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
f2c2d395 510
6b9290ff
MW
511dnl =========================
512dnl dependency calculation
513dnl =========================
f2c2d395 514
6b9290ff
MW
515if test x$pluto = xtrue; then
516 gmp=true;
517fi
518
519if test x$tools = xtrue; then
520 gmp=true;
521fi
552cc11b 522
6b9290ff
MW
523if test x$smp = xtrue; then
524 xml=true
525fi
526
527if test x$manager = xtrue; then
528 fast=true
529fi
530
531dnl ==========================================
532dnl check required libraries and header files
533dnl ==========================================
534
535AC_HAVE_LIBRARY(dl)
4986554f 536AC_CHECK_FUNCS(backtrace)
552cc11b 537AC_CHECK_FUNCS(dladdr)
e696757c 538
6b9290ff
MW
539AC_MSG_CHECKING([capset() definition])
540AC_TRY_COMPILE(
541 [#include <linux/capset.h>],
542 [
543 void *test = capset;
544 ],
545 [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); AC_DEFINE_UNQUOTED(NO_CAPSET_DEFINED, 1)]
546)
547
548if test x$gmp = xtrue; then
549 AC_HAVE_LIBRARY([gmp],[LIBS="$LIBS"],[AC_MSG_ERROR([GNU Multi Precision library gmp not found])])
550 AC_MSG_CHECKING([gmp.h version >= 4.1.4])
551 AC_TRY_COMPILE(
552 [#include "gmp.h"],
553 [
554 #if (__GNU_MP_VERSION*100 + __GNU_MP_VERSION_MINOR*10 + __GNU_MP_VERSION_PATCHLEVEL) < 414
555 #error bad gmp
556 #endif
557 ],
558 [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); AC_MSG_ERROR([No usable gmp.h found!])]
559 )
f2c2d395 560fi
6b9290ff
MW
561
562if test x$ldap = xtrue; then
563 AC_HAVE_LIBRARY([ldap],[LIBS="$LIBS"],[AC_MSG_ERROR([LDAP library ldap not found])])
564 AC_HAVE_LIBRARY([lber],[LIBS="$LIBS"],[AC_MSG_ERROR([LDAP library lber not found])])
565 AC_CHECK_HEADER([ldap.h],,[AC_MSG_ERROR([LDAP header ldap.h not found!])])
f2c2d395
MW
566fi
567
6b9290ff
MW
568if test x$curl = xtrue; then
569 AC_HAVE_LIBRARY([curl],[LIBS="$LIBS"],[AC_MSG_ERROR([CURL library curl not found])])
570 AC_CHECK_HEADER([curl/curl.h],,[AC_MSG_ERROR([CURL header curl/curl.h not found!])])
571fi
572
573if test x$xml = xtrue; then
d7bf4e42 574 PKG_CHECK_MODULES(xml, [libxml-2.0],, AC_MSG_ERROR([No libxml2 package information found]))
f2d6355e
MW
575 AC_SUBST(xml_CFLAGS)
576 AC_SUBST(xml_LIBS)
577fi
578
6b9290ff
MW
579if test x$fast = xtrue; then
580 AC_HAVE_LIBRARY([neo_cgi],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver library neo_cgi not found!])])
581 AC_HAVE_LIBRARY([neo_utl],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver library neo_utl not found!])])
582 AC_HAVE_LIBRARY([z],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver dependency zlib not found!])])
583dnl autoconf does not like CamelCase!? How to fix this?
584dnl AC_CHECK_HEADER([ClearSilver/ClearSilver.h],,[AC_MSG_ERROR([ClearSilver header file ClearSilver/ClearSilver.h not found!])])
585
586 AC_HAVE_LIBRARY([fcgi],[LIBS="$LIBS"],[AC_MSG_ERROR([FastCGI library fcgi not found!])])
587 AC_CHECK_HEADER([fcgiapp.h],,[AC_MSG_ERROR([FastCGI header file fcgiapp.h not found!])])
a84fb01b
MW
588fi
589
6b9290ff
MW
590if test x$mysql = xtrue; then
591 AC_HAVE_LIBRARY([mysqlclient_r],[LIBS="$LIBS"],[AC_MSG_ERROR([MySQL library mysqlclient_r not found])])
592 AC_CHECK_HEADER([mysql/mysql.h],,[AC_MSG_ERROR([MySQL header mysql/mysql.h not found!])])
593fi
f2c2d395 594
6b9290ff
MW
595if test x$mysql = xtrue; then
596 AC_HAVE_LIBRARY([sqlite3],[LIBS="$LIBS"],[AC_MSG_ERROR([SQLite library sqlite3 not found])])
597 AC_CHECK_HEADER([sqlite3.h],,[AC_MSG_ERROR([SQLite header sqlite3.h not found!])])
598fi
f2c2d395 599
6b9290ff
MW
600dnl =========================
601dnl set Makefile.am vars
602dnl =========================
f2c2d395 603
6b9290ff
MW
604AM_CONDITIONAL(USE_CURL, test x$curl = xtrue)
605AM_CONDITIONAL(USE_LDAP, test x$ldap = xtrue)
606AM_CONDITIONAL(USE_AES, test x$aes = xtrue)
607AM_CONDITIONAL(USE_DES, test x$des = xtrue)
608AM_CONDITIONAL(USE_MD5, test x$md5 = xtrue)
609AM_CONDITIONAL(USE_SHA1, test x$sha1 = xtrue)
610AM_CONDITIONAL(USE_SHA2, test x$sha2 = xtrue)
611AM_CONDITIONAL(USE_FIPS_PRF, test x$fips_prf = xtrue)
612AM_CONDITIONAL(USE_GMP, test x$gmp = xtrue)
6a365f07 613AM_CONDITIONAL(USE_RANDOM, test x$random = xtrue)
6b9290ff
MW
614AM_CONDITIONAL(USE_X509, test x$x509 = xtrue)
615AM_CONDITIONAL(USE_HMAC, test x$hmac = xtrue)
616AM_CONDITIONAL(USE_MYSQL, test x$mysql = xtrue)
617AM_CONDITIONAL(USE_SQLITE, test x$sqlite = xtrue)
618AM_CONDITIONAL(USE_STROKE, test x$stroke = xtrue)
619AM_CONDITIONAL(USE_MED_DB, test x$med_db = xtrue)
620AM_CONDITIONAL(USE_SMP, test x$smp = xtrue)
621AM_CONDITIONAL(USE_SQL, test x$sql = xtrue)
622AM_CONDITIONAL(USE_SMARTCARD, test x$smartcard = xtrue)
623AM_CONDITIONAL(USE_CISCO_QUIRKS, test x$cisco_quirks = xtrue)
624AM_CONDITIONAL(USE_LEAK_DETECTIVE, test x$leak_detective = xtrue)
625AM_CONDITIONAL(USE_UNIT_TESTS, test x$unittest = xtrue)
626AM_CONDITIONAL(USE_EAP_SIM, test x$eap_sim = xtrue)
627AM_CONDITIONAL(USE_EAP_IDENTITY, test x$eap_identity = xtrue)
628AM_CONDITIONAL(USE_EAP_MD5, test x$eap_md5 = xtrue)
629AM_CONDITIONAL(USE_EAP_AKA, test x$eap_aka = xtrue)
630AM_CONDITIONAL(USE_NAT_TRANSPORT, test x$nat_transport = xtrue)
631AM_CONDITIONAL(USE_VENDORID, test x$vendor_id = xtrue)
632AM_CONDITIONAL(USE_XAUTH_VID, test x$xauth_vid = xtrue)
633AM_CONDITIONAL(USE_DUMM, test x$dumm = xtrue)
634AM_CONDITIONAL(USE_FAST, test x$fast = xtrue)
635AM_CONDITIONAL(USE_MANAGER, test x$manager = xtrue)
636AM_CONDITIONAL(USE_ME, test x$me = xtrue)
637AM_CONDITIONAL(USE_INTEGRITY_TEST, test x$integrity_test = xtrue)
638AM_CONDITIONAL(USE_SELF_TEST, test x$self_test = xtrue)
639AM_CONDITIONAL(USE_PLUTO, test x$pluto = xtrue)
640AM_CONDITIONAL(USE_CHARON, test x$charon = xtrue)
641AM_CONDITIONAL(USE_TOOLS, test x$tools = xtrue)
642AM_CONDITIONAL(USE_PLUTO_OR_CHARON, test x$pluto = xtrue -o x$charon = xtrue)
643AM_CONDITIONAL(USE_LIBSTRONGSWAN, test x$charon = xtrue -o x$tools = xtrue)
644AM_CONDITIONAL(USE_FILE_CONFIG, test x$pluto = xtrue -o x$stroke = xtrue)
36d62fac 645AM_CONDITIONAL(USE_PADLOCK, test x$padlock = xtrue)
f2c2d395 646
9e72d3bc
MW
647dnl ==============================
648dnl set global definitions
649dnl ==============================
650
651if test x$me = xtrue; then
652 AC_DEFINE(ME)
653fi
654
f2c2d395
MW
655dnl ==============================
656dnl build Makefiles
657dnl ==============================
658
659AC_OUTPUT(
660 Makefile
661 src/Makefile
04a7b6d8 662 src/include/Makefile
f2c2d395 663 src/libstrongswan/Makefile
552cc11b
MW
664 src/libstrongswan/plugins/aes/Makefile
665 src/libstrongswan/plugins/des/Makefile
666 src/libstrongswan/plugins/md5/Makefile
667 src/libstrongswan/plugins/sha1/Makefile
668 src/libstrongswan/plugins/sha2/Makefile
669 src/libstrongswan/plugins/fips_prf/Makefile
670 src/libstrongswan/plugins/gmp/Makefile
6a365f07 671 src/libstrongswan/plugins/random/Makefile
552cc11b
MW
672 src/libstrongswan/plugins/hmac/Makefile
673 src/libstrongswan/plugins/x509/Makefile
674 src/libstrongswan/plugins/curl/Makefile
675 src/libstrongswan/plugins/ldap/Makefile
676 src/libstrongswan/plugins/mysql/Makefile
677 src/libstrongswan/plugins/sqlite/Makefile
36d62fac 678 src/libstrongswan/plugins/padlock/Makefile
f2c2d395
MW
679 src/libcrypto/Makefile
680 src/libfreeswan/Makefile
681 src/pluto/Makefile
682 src/whack/Makefile
683 src/charon/Makefile
552cc11b
MW
684 src/charon/plugins/eap_aka/Makefile
685 src/charon/plugins/eap_identity/Makefile
686 src/charon/plugins/eap_md5/Makefile
687 src/charon/plugins/eap_sim/Makefile
6b9290ff 688 src/charon/plugins/smp/Makefile
552cc11b
MW
689 src/charon/plugins/sql/Makefile
690 src/charon/plugins/med_db/Makefile
691 src/charon/plugins/stroke/Makefile
692 src/charon/plugins/unit_tester/Makefile
f2c2d395
MW
693 src/stroke/Makefile
694 src/ipsec/Makefile
695 src/starter/Makefile
696 src/_updown/Makefile
697 src/_updown_espmark/Makefile
698 src/_copyright/Makefile
699 src/openac/Makefile
700 src/scepclient/Makefile
f2d6355e 701 src/dumm/Makefile
552cc11b 702 src/libfast/Makefile
b8c7453a 703 src/manager/Makefile
9ee1111d 704 testing/Makefile
f2c2d395 705)