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