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.2)
20 AM_INIT_AUTOMAKE(tar-ustar)
22 AC_SUBST(confdir, '${sysconfdir}')
25 dnl =================================
26 dnl check --enable-xxx & --with-xxx
27 dnl =================================
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")]
39 AS_HELP_STRING([--with-xauth-module=lib],[set the path to the XAUTH module]),
40 [AC_DEFINE_UNQUOTED(XAUTH_DEFAULT_LIB, "$withval")],
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")]
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")]
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")]
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")]
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")]
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")]
83 AC_SUBST(plugindir, "${ipsecdir}/plugins")
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")]
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")]
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")]
104 AC_SUBST(LINUX_HEADERS)
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")]
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")]
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")]
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")]
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
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
152 AS_HELP_STRING([--disable-aes],[disable own AES software implementation plugin. (default is NO).]),
153 [if test x$enableval = xyes; then
163 AS_HELP_STRING([--disable-des],[disable own DES/3DES software implementation plugin. (default is NO).]),
164 [if test x$enableval = xyes; then
174 AS_HELP_STRING([--disable-md5],[disable own MD5 software implementation plugin. (default is NO).]),
175 [if test x$enableval = xyes; then
185 AS_HELP_STRING([--disable-sha1],[disable own SHA1 software implementation plugin. (default is NO).]),
186 [if test x$enableval = xyes; then
196 AS_HELP_STRING([--disable-sha2],[disable own SHA256/SHA384/SHA512 software implementation plugin. (default is NO).]),
197 [if test x$enableval = xyes; then
207 AS_HELP_STRING([--disable-fips-prf],[disable FIPS PRF software implementation plugin. (default is NO).]),
208 [if test x$enableval = xyes; then
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
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
240 AS_HELP_STRING([--disable-x509],[disable own X509 certificate implementation plugin. (default is NO).]),
241 [if test x$enableval = xyes; then
251 AS_HELP_STRING([--disable-hmac],[disable HMAC crypto implementation plugin. (default is NO).]),
252 [if test x$enableval = xyes; then
262 AS_HELP_STRING([--disable-xcbc],[disable xcbc crypto implementation plugin. (default is NO).]),
263 [if test x$enableval = xyes; then
273 AS_HELP_STRING([--enable-mysql],[enable MySQL database support (default is NO). Requires libmysqlclient_r.]),
274 [if test x$enableval = xyes; then
281 AS_HELP_STRING([--enable-sqlite],[enable SQLite database support (default is NO). Requires libsqlite3.]),
282 [if test x$enableval = xyes; then
289 AS_HELP_STRING([--disable-stroke],[disable charons stroke (pluto compatibility) configuration backend. (default is NO).]),
290 [if test x$enableval = xyes; then
300 AS_HELP_STRING([--enable-med-db],[enable MySQL mediation database plugin (default is NO).]),
301 [if test x$enableval = xyes; then
308 AS_HELP_STRING([--enable-smp],[enable SMP configuration and control interface (default is NO). Requires libxml.]),
309 [if test x$enableval = xyes; then
316 AS_HELP_STRING([--enable-sql],[enable SQL database configuration backend (default is NO).]),
317 [if test x$enableval = xyes; then
324 AS_HELP_STRING([--enable-smartcard],[enable smartcard support (default is NO).]),
325 [if test x$enableval = xyes; then
332 AS_HELP_STRING([--enable-cisco-quirks],[enable support of Cisco VPN client (default is NO).]),
333 [if test x$enableval = xyes; then
340 AS_HELP_STRING([--enable-leak-detective],[enable malloc hooks to find memory leaks (default is NO).]),
341 [if test x$enableval = xyes; then
348 AS_HELP_STRING([--enable-unit-tests],[enable unit tests on IKEv2 daemon startup (default is NO).]),
349 [if test x$enableval = xyes; then
356 AS_HELP_STRING([--enable-eap-sim],[build SIM authenication module for EAP (default is NO).]),
357 [if test x$enableval = xyes; then
364 AS_HELP_STRING([--enable-eap-identity],[build EAP module providing EAP-Identity helper (default is NO).]),
365 [if test x$enableval = xyes; then
372 AS_HELP_STRING([--enable-eap-md5],[build MD5 (CHAP) authenication module for EAP (default is NO).]),
373 [if test x$enableval = xyes; then
380 AS_HELP_STRING([--enable-eap-aka],[build AKA authentication module for EAP (default is NO).]),
381 [if test x$enableval = xyes; then
388 AS_HELP_STRING([--enable-nat-transport],[enable NAT traversal with IPsec transport mode (default is NO).]),
389 [if test x$enableval = xyes; then
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
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
418 AS_HELP_STRING([--enable-dumm],[build the DUMM UML test framework (default is NO).]),
419 [if test x$enableval = xyes; then
426 AS_HELP_STRING([--enable-fast],[build libfast (FastCGI Application Server w/ templates (default is NO).]),
427 [if test x$enableval = xyes; then
434 AS_HELP_STRING([--enable-manager],[build web management console (default is NO).]),
435 [if test x$enableval = xyes; then
443 AS_HELP_STRING([--enable-mediation],[enable IKEv2 Mediation Extension (default is NO).]),
444 [if test x$enableval = xyes; then
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
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
470 AS_HELP_STRING([--disable-pluto],[disable the IKEv1 keying daemon pluto. (default is NO).]),
471 [if test x$enableval = xyes; then
481 AS_HELP_STRING([--disable-charon],[disable the IKEv2 keying daemon charon. (default is NO).]),
482 [if test x$enableval = xyes; then
492 AS_HELP_STRING([--disable-tools],[disable additional utilities (openac and scepclient). (default is NO).]),
493 [if test x$enableval = xyes; then
503 AS_HELP_STRING([--enable-padlock],[enables VIA Padlock crypto plugin. (default is NO).]),
504 [if test x$enableval = xyes; then
513 AS_HELP_STRING([--enable-openssl],[enables the OpenSSL crypto plugin. (default is NO).]),
514 [if test x$enableval = xyes; then
521 dnl =========================
522 dnl check required programs
523 dnl =========================
530 AC_PATH_PROG([GPERF], [gperf], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
531 AC_PATH_PROG([PERL], [perl], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
533 dnl =========================
534 dnl dependency calculation
535 dnl =========================
537 if test x$pluto = xtrue; then
541 if test x$tools = xtrue; then
545 if test x$smp = xtrue; then
549 if test x$manager = xtrue; then
553 dnl ==========================================
554 dnl check required libraries and header files
555 dnl ==========================================
558 AC_CHECK_FUNCS(backtrace)
559 AC_CHECK_FUNCS(dladdr)
561 AC_MSG_CHECKING([capset() definition])
563 [#include <linux/capset.h>],
567 [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); AC_DEFINE_UNQUOTED(NO_CAPSET_DEFINED, 1)]
570 if 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])
576 #if (__GNU_MP_VERSION*100 + __GNU_MP_VERSION_MINOR*10 + __GNU_MP_VERSION_PATCHLEVEL) < 414
580 [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); AC_MSG_ERROR([No usable gmp.h found!])]
584 if 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!])])
590 if 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!])])
595 if test x$xml = xtrue; then
596 PKG_CHECK_MODULES(xml, [libxml-2.0])
601 if test x$dumm = xtrue; then
602 PKG_CHECK_MODULES(gtk, [gtk+-2.0 vte])
607 if 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!])])
611 dnl autoconf does not like CamelCase!? How to fix this?
612 dnl AC_CHECK_HEADER([ClearSilver/ClearSilver.h],,[AC_MSG_ERROR([ClearSilver header file ClearSilver/ClearSilver.h not found!])])
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!])])
618 if 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!])])
623 if test x$sqlite = 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!])])
626 AC_MSG_CHECKING([sqlite3_prepare_v2])
628 [#include <sqlite3.h>],
630 void *test = sqlite3_prepare_v2;
632 [AC_MSG_RESULT([yes])]; AC_DEFINE_UNQUOTED(HAVE_SQLITE3_PREPARE_V2, 1), [AC_MSG_RESULT([no])])
635 if test x$openssl = xtrue; then
636 AC_HAVE_LIBRARY([ssl],[LIBS="$LIBS"],[AC_MSG_ERROR([OpenSSL library ssl not found])])
637 AC_CHECK_HEADER([openssl/evp.h],,[AC_MSG_ERROR([OpenSSL header openssl/evp.h not found!])])
640 dnl =========================
641 dnl set Makefile.am vars
642 dnl =========================
644 AM_CONDITIONAL(USE_CURL, test x$curl = xtrue)
645 AM_CONDITIONAL(USE_LDAP, test x$ldap = xtrue)
646 AM_CONDITIONAL(USE_AES, test x$aes = xtrue)
647 AM_CONDITIONAL(USE_DES, test x$des = xtrue)
648 AM_CONDITIONAL(USE_MD5, test x$md5 = xtrue)
649 AM_CONDITIONAL(USE_SHA1, test x$sha1 = xtrue)
650 AM_CONDITIONAL(USE_SHA2, test x$sha2 = xtrue)
651 AM_CONDITIONAL(USE_FIPS_PRF, test x$fips_prf = xtrue)
652 AM_CONDITIONAL(USE_GMP, test x$gmp = xtrue)
653 AM_CONDITIONAL(USE_RANDOM, test x$random = xtrue)
654 AM_CONDITIONAL(USE_X509, test x$x509 = xtrue)
655 AM_CONDITIONAL(USE_HMAC, test x$hmac = xtrue)
656 AM_CONDITIONAL(USE_XCBC, test x$xcbc = xtrue)
657 AM_CONDITIONAL(USE_MYSQL, test x$mysql = xtrue)
658 AM_CONDITIONAL(USE_SQLITE, test x$sqlite = xtrue)
659 AM_CONDITIONAL(USE_STROKE, test x$stroke = xtrue)
660 AM_CONDITIONAL(USE_MED_DB, test x$med_db = xtrue)
661 AM_CONDITIONAL(USE_SMP, test x$smp = xtrue)
662 AM_CONDITIONAL(USE_SQL, test x$sql = xtrue)
663 AM_CONDITIONAL(USE_SMARTCARD, test x$smartcard = xtrue)
664 AM_CONDITIONAL(USE_CISCO_QUIRKS, test x$cisco_quirks = xtrue)
665 AM_CONDITIONAL(USE_LEAK_DETECTIVE, test x$leak_detective = xtrue)
666 AM_CONDITIONAL(USE_UNIT_TESTS, test x$unittest = xtrue)
667 AM_CONDITIONAL(USE_EAP_SIM, test x$eap_sim = xtrue)
668 AM_CONDITIONAL(USE_EAP_IDENTITY, test x$eap_identity = xtrue)
669 AM_CONDITIONAL(USE_EAP_MD5, test x$eap_md5 = xtrue)
670 AM_CONDITIONAL(USE_EAP_AKA, test x$eap_aka = xtrue)
671 AM_CONDITIONAL(USE_NAT_TRANSPORT, test x$nat_transport = xtrue)
672 AM_CONDITIONAL(USE_VENDORID, test x$vendor_id = xtrue)
673 AM_CONDITIONAL(USE_XAUTH_VID, test x$xauth_vid = xtrue)
674 AM_CONDITIONAL(USE_DUMM, test x$dumm = xtrue)
675 AM_CONDITIONAL(USE_FAST, test x$fast = xtrue)
676 AM_CONDITIONAL(USE_MANAGER, test x$manager = xtrue)
677 AM_CONDITIONAL(USE_ME, test x$me = xtrue)
678 AM_CONDITIONAL(USE_INTEGRITY_TEST, test x$integrity_test = xtrue)
679 AM_CONDITIONAL(USE_SELF_TEST, test x$self_test = xtrue)
680 AM_CONDITIONAL(USE_PLUTO, test x$pluto = xtrue)
681 AM_CONDITIONAL(USE_CHARON, test x$charon = xtrue)
682 AM_CONDITIONAL(USE_TOOLS, test x$tools = xtrue)
683 AM_CONDITIONAL(USE_PLUTO_OR_CHARON, test x$pluto = xtrue -o x$charon = xtrue)
684 AM_CONDITIONAL(USE_LIBSTRONGSWAN, test x$charon = xtrue -o x$tools = xtrue)
685 AM_CONDITIONAL(USE_FILE_CONFIG, test x$pluto = xtrue -o x$stroke = xtrue)
686 AM_CONDITIONAL(USE_PADLOCK, test x$padlock = xtrue)
687 AM_CONDITIONAL(USE_OPENSSL, test x$openssl = xtrue)
689 dnl ==============================
690 dnl set global definitions
691 dnl ==============================
693 if test x$me = xtrue; then
697 dnl ==============================
699 dnl ==============================
705 src/libstrongswan/Makefile
706 src/libstrongswan/plugins/aes/Makefile
707 src/libstrongswan/plugins/des/Makefile
708 src/libstrongswan/plugins/md5/Makefile
709 src/libstrongswan/plugins/sha1/Makefile
710 src/libstrongswan/plugins/sha2/Makefile
711 src/libstrongswan/plugins/fips_prf/Makefile
712 src/libstrongswan/plugins/gmp/Makefile
713 src/libstrongswan/plugins/random/Makefile
714 src/libstrongswan/plugins/hmac/Makefile
715 src/libstrongswan/plugins/xcbc/Makefile
716 src/libstrongswan/plugins/x509/Makefile
717 src/libstrongswan/plugins/curl/Makefile
718 src/libstrongswan/plugins/ldap/Makefile
719 src/libstrongswan/plugins/mysql/Makefile
720 src/libstrongswan/plugins/sqlite/Makefile
721 src/libstrongswan/plugins/padlock/Makefile
722 src/libstrongswan/plugins/openssl/Makefile
723 src/libcrypto/Makefile
724 src/libfreeswan/Makefile
728 src/charon/plugins/eap_aka/Makefile
729 src/charon/plugins/eap_identity/Makefile
730 src/charon/plugins/eap_md5/Makefile
731 src/charon/plugins/eap_sim/Makefile
732 src/charon/plugins/smp/Makefile
733 src/charon/plugins/sql/Makefile
734 src/charon/plugins/med_db/Makefile
735 src/charon/plugins/stroke/Makefile
736 src/charon/plugins/unit_tester/Makefile
741 src/_updown_espmark/Makefile
742 src/_copyright/Makefile
744 src/scepclient/Makefile