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