1 dnl configure.in for linux strongSwan
2 dnl Copyright (C) 2006 Martin Willi
3 dnl Hochschule fuer Technik Rapperswil
5 dnl This program is free software; you can redistribute it and/or modify it
6 dnl under the terms of the GNU General Public License as published by the
7 dnl Free Software Foundation; either version 2 of the License, or (at your
8 dnl option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 dnl This program is distributed in the hope that it will be useful, but
11 dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 dnl ===========================
16 dnl initialize & set some vars
17 dnl ===========================
19 AC_INIT(strongSwan,4.2.1)
20 AM_INIT_AUTOMAKE(tar-ustar)
22 AC_SUBST(confdir, '${sysconfdir}')
24 dnl =================================
25 dnl check --enable-xxx & --with-xxx
26 dnl =================================
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")]
38 AS_HELP_STRING([--with-xauth-module=lib],[set the path to the XAUTH module]),
39 [AC_DEFINE_UNQUOTED(XAUTH_DEFAULT_LIB, "$withval")],
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")]
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")]
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")]
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")]
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")]
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")]
82 AC_SUBST(plugindir, "${ipsecdir}/plugins")
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")]
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")]
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")]
103 AC_SUBST(LINUX_HEADERS)
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")]
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")]
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")]
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")]
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
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
151 AS_HELP_STRING([--disable-aes],[disable own AES software implementation plugin. (default is NO).]),
152 [if test x$enableval = xyes; then
162 AS_HELP_STRING([--disable-des],[disable own DES/3DES software implementation plugin. (default is NO).]),
163 [if test x$enableval = xyes; then
173 AS_HELP_STRING([--disable-md5],[disable own MD5 software implementation plugin. (default is NO).]),
174 [if test x$enableval = xyes; then
184 AS_HELP_STRING([--disable-sha1],[disable own SHA1 software implementation plugin. (default is NO).]),
185 [if test x$enableval = xyes; then
195 AS_HELP_STRING([--disable-sha2],[disable own SHA256/SHA384/SHA512 software implementation plugin. (default is NO).]),
196 [if test x$enableval = xyes; then
206 AS_HELP_STRING([--disable-fips-prf],[disable FIPS PRF software implementation plugin. (default is NO).]),
207 [if test x$enableval = xyes; then
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
228 AS_HELP_STRING([--disable-x509],[disable own X509 certificate implementation plugin. (default is NO).]),
229 [if test x$enableval = xyes; then
239 AS_HELP_STRING([--disable-hmac],[disable HMAC crypto implementation plugin. (default is NO).]),
240 [if test x$enableval = xyes; then
250 AS_HELP_STRING([--enable-mysql],[enable MySQL database support (default is NO). Requires libmysqlclient_r.]),
251 [if test x$enableval = xyes; then
258 AS_HELP_STRING([--enable-sqlite],[enable SQLite database support (default is NO). Requires libsqlite3.]),
259 [if test x$enableval = xyes; then
266 AS_HELP_STRING([--disable-stroke],[disable charons stroke (pluto compatibility) configuration backend. (default is NO).]),
267 [if test x$enableval = xyes; then
277 AS_HELP_STRING([--enable-med-db],[enable MySQL mediation database plugin (default is NO).]),
278 [if test x$enableval = xyes; then
285 AS_HELP_STRING([--enable-smp],[enable SMP configuration and control interface (default is NO). Requires libxml.]),
286 [if test x$enableval = xyes; then
293 AS_HELP_STRING([--enable-sql],[enable SQL database configuration backend (default is NO).]),
294 [if test x$enableval = xyes; then
301 AS_HELP_STRING([--enable-smartcard],[enable smartcard support (default is NO).]),
302 [if test x$enableval = xyes; then
309 AS_HELP_STRING([--enable-cisco-quirks],[enable support of Cisco VPN client (default is NO).]),
310 [if test x$enableval = xyes; then
317 AS_HELP_STRING([--enable-leak-detective],[enable malloc hooks to find memory leaks (default is NO).]),
318 [if test x$enableval = xyes; then
325 AS_HELP_STRING([--enable-unit-tests],[enable unit tests on IKEv2 daemon startup (default is NO).]),
326 [if test x$enableval = xyes; then
333 AS_HELP_STRING([--enable-eap-sim],[build SIM authenication module for EAP (default is NO).]),
334 [if test x$enableval = xyes; then
341 AS_HELP_STRING([--enable-eap-identity],[build EAP module providing EAP-Identity helper (default is NO).]),
342 [if test x$enableval = xyes; then
349 AS_HELP_STRING([--enable-eap-md5],[build MD5 (CHAP) authenication module for EAP (default is NO).]),
350 [if test x$enableval = xyes; then
357 AS_HELP_STRING([--enable-eap-aka],[build AKA authentication module for EAP (default is NO).]),
358 [if test x$enableval = xyes; then
365 AS_HELP_STRING([--enable-nat-transport],[enable NAT traversal with IPsec transport mode (default is NO).]),
366 [if test x$enableval = xyes; then
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
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
395 AS_HELP_STRING([--enable-dumm],[build the DUMM UML test framework (default is NO).]),
396 [if test x$enableval = xyes; then
403 AS_HELP_STRING([--enable-fast],[build libfast (FastCGI Application Server w/ templates (default is NO).]),
404 [if test x$enableval = xyes; then
411 AS_HELP_STRING([--enable-manager],[build web management console (default is NO).]),
412 [if test x$enableval = xyes; then
420 AS_HELP_STRING([--enable-mediation],[enable IKEv2 Mediation Extension (default is NO).]),
421 [if test x$enableval = xyes; then
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
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
447 AS_HELP_STRING([--disable-pluto],[disable the IKEv1 keying daemon pluto. (default is NO).]),
448 [if test x$enableval = xyes; then
458 AS_HELP_STRING([--disable-charon],[disable the IKEv2 keying daemon charon. (default is NO).]),
459 [if test x$enableval = xyes; then
469 AS_HELP_STRING([--disable-tools],[disable additional utilities (openac and scepclient). (default is NO).]),
470 [if test x$enableval = xyes; then
478 dnl =========================
479 dnl check required programs
480 dnl =========================
487 AC_PATH_PROG([GPERF], [gperf], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
488 AC_PATH_PROG([PERL], [perl], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
490 dnl =========================
491 dnl dependency calculation
492 dnl =========================
494 if test x$pluto = xtrue; then
498 if test x$tools = xtrue; then
502 if test x$smp = xtrue; then
506 if test x$manager = xtrue; then
510 dnl ==========================================
511 dnl check required libraries and header files
512 dnl ==========================================
515 AC_CHECK_FUNCS(backtrace)
516 AC_CHECK_FUNCS(dladdr)
518 AC_MSG_CHECKING([capset() definition])
520 [#include <linux/capset.h>],
524 [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); AC_DEFINE_UNQUOTED(NO_CAPSET_DEFINED, 1)]
527 if 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])
533 #if (__GNU_MP_VERSION*100 + __GNU_MP_VERSION_MINOR*10 + __GNU_MP_VERSION_PATCHLEVEL) < 414
537 [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); AC_MSG_ERROR([No usable gmp.h found!])]
541 if 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!])])
547 if 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!])])
552 if test x$xml = xtrue; then
553 PKG_CHECK_MODULES(xml, [libxml-2.0],, AC_MSG_ERROR([No libxml2 package information found]))
558 if 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!])])
562 dnl autoconf does not like CamelCase!? How to fix this?
563 dnl AC_CHECK_HEADER([ClearSilver/ClearSilver.h],,[AC_MSG_ERROR([ClearSilver header file ClearSilver/ClearSilver.h not found!])])
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!])])
569 if 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!])])
574 if 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!])])
579 dnl =========================
580 dnl set Makefile.am vars
581 dnl =========================
583 AM_CONDITIONAL(USE_CURL, test x$curl = xtrue)
584 AM_CONDITIONAL(USE_LDAP, test x$ldap = xtrue)
585 AM_CONDITIONAL(USE_AES, test x$aes = xtrue)
586 AM_CONDITIONAL(USE_DES, test x$des = xtrue)
587 AM_CONDITIONAL(USE_MD5, test x$md5 = xtrue)
588 AM_CONDITIONAL(USE_SHA1, test x$sha1 = xtrue)
589 AM_CONDITIONAL(USE_SHA2, test x$sha2 = xtrue)
590 AM_CONDITIONAL(USE_FIPS_PRF, test x$fips_prf = xtrue)
591 AM_CONDITIONAL(USE_GMP, test x$gmp = xtrue)
592 AM_CONDITIONAL(USE_X509, test x$x509 = xtrue)
593 AM_CONDITIONAL(USE_HMAC, test x$hmac = xtrue)
594 AM_CONDITIONAL(USE_MYSQL, test x$mysql = xtrue)
595 AM_CONDITIONAL(USE_SQLITE, test x$sqlite = xtrue)
596 AM_CONDITIONAL(USE_STROKE, test x$stroke = xtrue)
597 AM_CONDITIONAL(USE_MED_DB, test x$med_db = xtrue)
598 AM_CONDITIONAL(USE_SMP, test x$smp = xtrue)
599 AM_CONDITIONAL(USE_SQL, test x$sql = xtrue)
600 AM_CONDITIONAL(USE_SMARTCARD, test x$smartcard = xtrue)
601 AM_CONDITIONAL(USE_CISCO_QUIRKS, test x$cisco_quirks = xtrue)
602 AM_CONDITIONAL(USE_LEAK_DETECTIVE, test x$leak_detective = xtrue)
603 AM_CONDITIONAL(USE_UNIT_TESTS, test x$unittest = xtrue)
604 AM_CONDITIONAL(USE_EAP_SIM, test x$eap_sim = xtrue)
605 AM_CONDITIONAL(USE_EAP_IDENTITY, test x$eap_identity = xtrue)
606 AM_CONDITIONAL(USE_EAP_MD5, test x$eap_md5 = xtrue)
607 AM_CONDITIONAL(USE_EAP_AKA, test x$eap_aka = xtrue)
608 AM_CONDITIONAL(USE_NAT_TRANSPORT, test x$nat_transport = xtrue)
609 AM_CONDITIONAL(USE_VENDORID, test x$vendor_id = xtrue)
610 AM_CONDITIONAL(USE_XAUTH_VID, test x$xauth_vid = xtrue)
611 AM_CONDITIONAL(USE_DUMM, test x$dumm = xtrue)
612 AM_CONDITIONAL(USE_FAST, test x$fast = xtrue)
613 AM_CONDITIONAL(USE_MANAGER, test x$manager = xtrue)
614 AM_CONDITIONAL(USE_ME, test x$me = xtrue)
615 AM_CONDITIONAL(USE_INTEGRITY_TEST, test x$integrity_test = xtrue)
616 AM_CONDITIONAL(USE_SELF_TEST, test x$self_test = xtrue)
617 AM_CONDITIONAL(USE_PLUTO, test x$pluto = xtrue)
618 AM_CONDITIONAL(USE_CHARON, test x$charon = xtrue)
619 AM_CONDITIONAL(USE_TOOLS, test x$tools = xtrue)
620 AM_CONDITIONAL(USE_PLUTO_OR_CHARON, test x$pluto = xtrue -o x$charon = xtrue)
621 AM_CONDITIONAL(USE_LIBSTRONGSWAN, test x$charon = xtrue -o x$tools = xtrue)
622 AM_CONDITIONAL(USE_FILE_CONFIG, test x$pluto = xtrue -o x$stroke = xtrue)
624 dnl ==============================
625 dnl set global definitions
626 dnl ==============================
628 if test x$me = xtrue; then
632 dnl ==============================
634 dnl ==============================
640 src/libstrongswan/Makefile
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
654 src/libcrypto/Makefile
655 src/libfreeswan/Makefile
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
663 src/charon/plugins/smp/Makefile
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
672 src/_updown_espmark/Makefile
673 src/_copyright/Makefile
675 src/scepclient/Makefile