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}')
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-random],[disable RNG implementation on top of /dev/(u)random. (default is NO).]),
229 [if test x$enableval = xyes; then
239 AS_HELP_STRING([--disable-x509],[disable own X509 certificate implementation plugin. (default is NO).]),
240 [if test x$enableval = xyes; then
250 AS_HELP_STRING([--disable-hmac],[disable HMAC crypto implementation plugin. (default is NO).]),
251 [if test x$enableval = xyes; then
261 AS_HELP_STRING([--enable-mysql],[enable MySQL database support (default is NO). Requires libmysqlclient_r.]),
262 [if test x$enableval = xyes; then
269 AS_HELP_STRING([--enable-sqlite],[enable SQLite database support (default is NO). Requires libsqlite3.]),
270 [if test x$enableval = xyes; then
277 AS_HELP_STRING([--disable-stroke],[disable charons stroke (pluto compatibility) configuration backend. (default is NO).]),
278 [if test x$enableval = xyes; then
288 AS_HELP_STRING([--enable-med-db],[enable MySQL mediation database plugin (default is NO).]),
289 [if test x$enableval = xyes; then
296 AS_HELP_STRING([--enable-smp],[enable SMP configuration and control interface (default is NO). Requires libxml.]),
297 [if test x$enableval = xyes; then
304 AS_HELP_STRING([--enable-sql],[enable SQL database configuration backend (default is NO).]),
305 [if test x$enableval = xyes; then
312 AS_HELP_STRING([--enable-smartcard],[enable smartcard support (default is NO).]),
313 [if test x$enableval = xyes; then
320 AS_HELP_STRING([--enable-cisco-quirks],[enable support of Cisco VPN client (default is NO).]),
321 [if test x$enableval = xyes; then
328 AS_HELP_STRING([--enable-leak-detective],[enable malloc hooks to find memory leaks (default is NO).]),
329 [if test x$enableval = xyes; then
336 AS_HELP_STRING([--enable-unit-tests],[enable unit tests on IKEv2 daemon startup (default is NO).]),
337 [if test x$enableval = xyes; then
344 AS_HELP_STRING([--enable-eap-sim],[build SIM authenication module for EAP (default is NO).]),
345 [if test x$enableval = xyes; then
352 AS_HELP_STRING([--enable-eap-identity],[build EAP module providing EAP-Identity helper (default is NO).]),
353 [if test x$enableval = xyes; then
360 AS_HELP_STRING([--enable-eap-md5],[build MD5 (CHAP) authenication module for EAP (default is NO).]),
361 [if test x$enableval = xyes; then
368 AS_HELP_STRING([--enable-eap-aka],[build AKA authentication module for EAP (default is NO).]),
369 [if test x$enableval = xyes; then
376 AS_HELP_STRING([--enable-nat-transport],[enable NAT traversal with IPsec transport mode (default is NO).]),
377 [if test x$enableval = xyes; then
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
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
406 AS_HELP_STRING([--enable-dumm],[build the DUMM UML test framework (default is NO).]),
407 [if test x$enableval = xyes; then
414 AS_HELP_STRING([--enable-fast],[build libfast (FastCGI Application Server w/ templates (default is NO).]),
415 [if test x$enableval = xyes; then
422 AS_HELP_STRING([--enable-manager],[build web management console (default is NO).]),
423 [if test x$enableval = xyes; then
431 AS_HELP_STRING([--enable-mediation],[enable IKEv2 Mediation Extension (default is NO).]),
432 [if test x$enableval = xyes; then
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
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
458 AS_HELP_STRING([--disable-pluto],[disable the IKEv1 keying daemon pluto. (default is NO).]),
459 [if test x$enableval = xyes; then
469 AS_HELP_STRING([--disable-charon],[disable the IKEv2 keying daemon charon. (default is NO).]),
470 [if test x$enableval = xyes; then
480 AS_HELP_STRING([--disable-tools],[disable additional utilities (openac and scepclient). (default is NO).]),
481 [if test x$enableval = xyes; then
489 dnl =========================
490 dnl check required programs
491 dnl =========================
498 AC_PATH_PROG([GPERF], [gperf], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
499 AC_PATH_PROG([PERL], [perl], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
501 dnl =========================
502 dnl dependency calculation
503 dnl =========================
505 if test x$pluto = xtrue; then
509 if test x$tools = xtrue; then
513 if test x$smp = xtrue; then
517 if test x$manager = xtrue; then
521 dnl ==========================================
522 dnl check required libraries and header files
523 dnl ==========================================
526 AC_CHECK_FUNCS(backtrace)
527 AC_CHECK_FUNCS(dladdr)
529 AC_MSG_CHECKING([capset() definition])
531 [#include <linux/capset.h>],
535 [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); AC_DEFINE_UNQUOTED(NO_CAPSET_DEFINED, 1)]
538 if test x$gmp = xtrue; then
539 AC_HAVE_LIBRARY([gmp],[LIBS="$LIBS"],[AC_MSG_ERROR([GNU Multi Precision library gmp not found])])
540 AC_MSG_CHECKING([gmp.h version >= 4.1.4])
544 #if (__GNU_MP_VERSION*100 + __GNU_MP_VERSION_MINOR*10 + __GNU_MP_VERSION_PATCHLEVEL) < 414
548 [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); AC_MSG_ERROR([No usable gmp.h found!])]
552 if test x$ldap = xtrue; then
553 AC_HAVE_LIBRARY([ldap],[LIBS="$LIBS"],[AC_MSG_ERROR([LDAP library ldap not found])])
554 AC_HAVE_LIBRARY([lber],[LIBS="$LIBS"],[AC_MSG_ERROR([LDAP library lber not found])])
555 AC_CHECK_HEADER([ldap.h],,[AC_MSG_ERROR([LDAP header ldap.h not found!])])
558 if test x$curl = xtrue; then
559 AC_HAVE_LIBRARY([curl],[LIBS="$LIBS"],[AC_MSG_ERROR([CURL library curl not found])])
560 AC_CHECK_HEADER([curl/curl.h],,[AC_MSG_ERROR([CURL header curl/curl.h not found!])])
563 if test x$xml = xtrue; then
564 PKG_CHECK_MODULES(xml, [libxml-2.0],, AC_MSG_ERROR([No libxml2 package information found]))
569 if test x$fast = xtrue; then
570 AC_HAVE_LIBRARY([neo_cgi],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver library neo_cgi not found!])])
571 AC_HAVE_LIBRARY([neo_utl],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver library neo_utl not found!])])
572 AC_HAVE_LIBRARY([z],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver dependency zlib not found!])])
573 dnl autoconf does not like CamelCase!? How to fix this?
574 dnl AC_CHECK_HEADER([ClearSilver/ClearSilver.h],,[AC_MSG_ERROR([ClearSilver header file ClearSilver/ClearSilver.h not found!])])
576 AC_HAVE_LIBRARY([fcgi],[LIBS="$LIBS"],[AC_MSG_ERROR([FastCGI library fcgi not found!])])
577 AC_CHECK_HEADER([fcgiapp.h],,[AC_MSG_ERROR([FastCGI header file fcgiapp.h not found!])])
580 if test x$mysql = xtrue; then
581 AC_HAVE_LIBRARY([mysqlclient_r],[LIBS="$LIBS"],[AC_MSG_ERROR([MySQL library mysqlclient_r not found])])
582 AC_CHECK_HEADER([mysql/mysql.h],,[AC_MSG_ERROR([MySQL header mysql/mysql.h not found!])])
585 if test x$mysql = xtrue; then
586 AC_HAVE_LIBRARY([sqlite3],[LIBS="$LIBS"],[AC_MSG_ERROR([SQLite library sqlite3 not found])])
587 AC_CHECK_HEADER([sqlite3.h],,[AC_MSG_ERROR([SQLite header sqlite3.h not found!])])
590 dnl =========================
591 dnl set Makefile.am vars
592 dnl =========================
594 AM_CONDITIONAL(USE_CURL, test x$curl = xtrue)
595 AM_CONDITIONAL(USE_LDAP, test x$ldap = xtrue)
596 AM_CONDITIONAL(USE_AES, test x$aes = xtrue)
597 AM_CONDITIONAL(USE_DES, test x$des = xtrue)
598 AM_CONDITIONAL(USE_MD5, test x$md5 = xtrue)
599 AM_CONDITIONAL(USE_SHA1, test x$sha1 = xtrue)
600 AM_CONDITIONAL(USE_SHA2, test x$sha2 = xtrue)
601 AM_CONDITIONAL(USE_FIPS_PRF, test x$fips_prf = xtrue)
602 AM_CONDITIONAL(USE_GMP, test x$gmp = xtrue)
603 AM_CONDITIONAL(USE_RANDOM, test x$random = xtrue)
604 AM_CONDITIONAL(USE_X509, test x$x509 = xtrue)
605 AM_CONDITIONAL(USE_HMAC, test x$hmac = xtrue)
606 AM_CONDITIONAL(USE_MYSQL, test x$mysql = xtrue)
607 AM_CONDITIONAL(USE_SQLITE, test x$sqlite = xtrue)
608 AM_CONDITIONAL(USE_STROKE, test x$stroke = xtrue)
609 AM_CONDITIONAL(USE_MED_DB, test x$med_db = xtrue)
610 AM_CONDITIONAL(USE_SMP, test x$smp = xtrue)
611 AM_CONDITIONAL(USE_SQL, test x$sql = xtrue)
612 AM_CONDITIONAL(USE_SMARTCARD, test x$smartcard = xtrue)
613 AM_CONDITIONAL(USE_CISCO_QUIRKS, test x$cisco_quirks = xtrue)
614 AM_CONDITIONAL(USE_LEAK_DETECTIVE, test x$leak_detective = xtrue)
615 AM_CONDITIONAL(USE_UNIT_TESTS, test x$unittest = xtrue)
616 AM_CONDITIONAL(USE_EAP_SIM, test x$eap_sim = xtrue)
617 AM_CONDITIONAL(USE_EAP_IDENTITY, test x$eap_identity = xtrue)
618 AM_CONDITIONAL(USE_EAP_MD5, test x$eap_md5 = xtrue)
619 AM_CONDITIONAL(USE_EAP_AKA, test x$eap_aka = xtrue)
620 AM_CONDITIONAL(USE_NAT_TRANSPORT, test x$nat_transport = xtrue)
621 AM_CONDITIONAL(USE_VENDORID, test x$vendor_id = xtrue)
622 AM_CONDITIONAL(USE_XAUTH_VID, test x$xauth_vid = xtrue)
623 AM_CONDITIONAL(USE_DUMM, test x$dumm = xtrue)
624 AM_CONDITIONAL(USE_FAST, test x$fast = xtrue)
625 AM_CONDITIONAL(USE_MANAGER, test x$manager = xtrue)
626 AM_CONDITIONAL(USE_ME, test x$me = xtrue)
627 AM_CONDITIONAL(USE_INTEGRITY_TEST, test x$integrity_test = xtrue)
628 AM_CONDITIONAL(USE_SELF_TEST, test x$self_test = xtrue)
629 AM_CONDITIONAL(USE_PLUTO, test x$pluto = xtrue)
630 AM_CONDITIONAL(USE_CHARON, test x$charon = xtrue)
631 AM_CONDITIONAL(USE_TOOLS, test x$tools = xtrue)
632 AM_CONDITIONAL(USE_PLUTO_OR_CHARON, test x$pluto = xtrue -o x$charon = xtrue)
633 AM_CONDITIONAL(USE_LIBSTRONGSWAN, test x$charon = xtrue -o x$tools = xtrue)
634 AM_CONDITIONAL(USE_FILE_CONFIG, test x$pluto = xtrue -o x$stroke = xtrue)
636 dnl ==============================
637 dnl set global definitions
638 dnl ==============================
640 if test x$me = xtrue; then
644 dnl ==============================
646 dnl ==============================
652 src/libstrongswan/Makefile
653 src/libstrongswan/plugins/aes/Makefile
654 src/libstrongswan/plugins/des/Makefile
655 src/libstrongswan/plugins/md5/Makefile
656 src/libstrongswan/plugins/sha1/Makefile
657 src/libstrongswan/plugins/sha2/Makefile
658 src/libstrongswan/plugins/fips_prf/Makefile
659 src/libstrongswan/plugins/gmp/Makefile
660 src/libstrongswan/plugins/random/Makefile
661 src/libstrongswan/plugins/hmac/Makefile
662 src/libstrongswan/plugins/x509/Makefile
663 src/libstrongswan/plugins/curl/Makefile
664 src/libstrongswan/plugins/ldap/Makefile
665 src/libstrongswan/plugins/mysql/Makefile
666 src/libstrongswan/plugins/sqlite/Makefile
667 src/libcrypto/Makefile
668 src/libfreeswan/Makefile
672 src/charon/plugins/eap_aka/Makefile
673 src/charon/plugins/eap_identity/Makefile
674 src/charon/plugins/eap_md5/Makefile
675 src/charon/plugins/eap_sim/Makefile
676 src/charon/plugins/smp/Makefile
677 src/charon/plugins/sql/Makefile
678 src/charon/plugins/med_db/Makefile
679 src/charon/plugins/stroke/Makefile
680 src/charon/plugins/unit_tester/Makefile
685 src/_updown_espmark/Makefile
686 src/_copyright/Makefile
688 src/scepclient/Makefile