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.0)
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-urandom-device=dev],[set the device for pseudo random data other than "/dev/urandom"]),
58 [AC_DEFINE_UNQUOTED(DEV_URANDOM, "$withval")],
59 [AC_DEFINE_UNQUOTED(DEV_URANDOM, "/dev/urandom")]
64 AS_HELP_STRING([--with-piddir=dir],[path for PID and UNIX socket files other than "/var/run"]),
65 [AC_SUBST(piddir, "$withval")],
66 [AC_SUBST(piddir, "/var/run")]
71 AS_HELP_STRING([--with-ipsecdir=dir],[installation path for ipsec tools other than "libexecdir/ipsec"]),
72 [AC_SUBST(ipsecdir, "$withval")],
73 [AC_SUBST(ipsecdir, "${libexecdir}/ipsec")]
75 AC_SUBST(plugindir, "${ipsecdir}/plugins")
79 AS_HELP_STRING([--with-plugindir=dir],[installation path for plugins other than "ipsecdir/plugins"]),
80 [AC_SUBST(plugindir, "$withval")],
81 [AC_SUBST(plugindir, "${ipsecdir}/plugins")]
86 AS_HELP_STRING([--with-sim-reader=library.so],[library containing the sim_run_alg()/sim_get_triplet() function for EAP-SIM]),
87 [AC_SUBST(simreader, "$withval")],
88 [AC_SUBST(simreader, "${plugindir}/libeapsim-file.so")]
93 AS_HELP_STRING([--with-linux-headers=dir],[use the linux header files in dir instead of the supplied ones in "src/include"]),
94 [AC_SUBST(linuxdir, "$withval")], [AC_SUBST(linuxdir, "../include")]
96 AC_SUBST(LINUX_HEADERS)
100 AS_HELP_STRING([--with-routing-table=num],[use routing table for IPsec routes (default: 220)]),
101 [AC_DEFINE_UNQUOTED(IPSEC_ROUTING_TABLE, $withval) AC_SUBST(IPSEC_ROUTING_TABLE, "$withval")],
102 [AC_DEFINE_UNQUOTED(IPSEC_ROUTING_TABLE, 220) AC_SUBST(IPSEC_ROUTING_TABLE, "220")]
106 [routing-table-prio],
107 AS_HELP_STRING([--with-routing-table-prio=prio],[priority for IPsec routing table (default: 220)]),
108 [AC_DEFINE_UNQUOTED(IPSEC_ROUTING_TABLE_PRIO, $withval) AC_SUBST(IPSEC_ROUTING_TABLE_PRIO, "$withval")],
109 [AC_DEFINE_UNQUOTED(IPSEC_ROUTING_TABLE_PRIO, 220) AC_SUBST(IPSEC_ROUTING_TABLE_PRIO, "220")]
114 AS_HELP_STRING([--with-uid=uid],[change user of the daemons to UID after startup (default is 0).]),
115 [AC_DEFINE_UNQUOTED(IPSEC_UID, $withval) AC_SUBST(ipsecuid, "$withval")],
116 [AC_DEFINE_UNQUOTED(IPSEC_UID, 0) AC_SUBST(ipsecuid, "0")]
121 AS_HELP_STRING([--with-gid=gid],[change group of the daemons to GID after startup (default is 0).]),
122 [AC_DEFINE_UNQUOTED(IPSEC_GID, $withval) AC_SUBST(ipsecgid, "$withval")],
123 [AC_DEFINE_UNQUOTED(IPSEC_GID, 0) AC_SUBST(ipsecgid, "0")]
128 AS_HELP_STRING([--enable-curl],[enable CURL fetcher plugin to fetch files via libcurl (default is NO). Requires libcurl.]),
129 [if test x$enableval = xyes; then
136 AS_HELP_STRING([--enable-ldap],[enable LDAP fetching plugin to fetch files via libldap (default is NO). Requires openLDAP.]),
137 [if test x$enableval = xyes; then
144 AS_HELP_STRING([--disable-aes],[disable own AES software implementation plugin. (default is NO).]),
145 [if test x$enableval = xyes; then
155 AS_HELP_STRING([--disable-des],[disable own DES/3DES software implementation plugin. (default is NO).]),
156 [if test x$enableval = xyes; then
166 AS_HELP_STRING([--disable-md5],[disable own MD5 software implementation plugin. (default is NO).]),
167 [if test x$enableval = xyes; then
177 AS_HELP_STRING([--disable-sha1],[disable own SHA1 software implementation plugin. (default is NO).]),
178 [if test x$enableval = xyes; then
188 AS_HELP_STRING([--disable-sha2],[disable own SHA256/SHA384/SHA512 software implementation plugin. (default is NO).]),
189 [if test x$enableval = xyes; then
199 AS_HELP_STRING([--disable-fips-prf],[disable FIPS PRF software implementation plugin. (default is NO).]),
200 [if test x$enableval = xyes; then
210 AS_HELP_STRING([--disable-gmp],[disable own GNU MP (libgmp) based crypto implementation plugin. (default is NO).]),
211 [if test x$enableval = xyes; then
221 AS_HELP_STRING([--disable-x509],[disable own X509 certificate implementation plugin. (default is NO).]),
222 [if test x$enableval = xyes; then
232 AS_HELP_STRING([--disable-hmac],[disable HMAC crypto implementation plugin. (default is NO).]),
233 [if test x$enableval = xyes; then
243 AS_HELP_STRING([--enable-mysql],[enable MySQL database support (default is NO). Requires libmysqlclient_r.]),
244 [if test x$enableval = xyes; then
251 AS_HELP_STRING([--enable-sqlite],[enable SQLite database support (default is NO). Requires libsqlite3.]),
252 [if test x$enableval = xyes; then
259 AS_HELP_STRING([--disable-stroke],[disable charons stroke (pluto compatibility) configuration backend. (default is NO).]),
260 [if test x$enableval = xyes; then
270 AS_HELP_STRING([--enable-med-db],[enable MySQL mediation database plugin (default is NO).]),
271 [if test x$enableval = xyes; then
278 AS_HELP_STRING([--enable-smp],[enable SMP configuration and control interface (default is NO). Requires libxml.]),
279 [if test x$enableval = xyes; then
286 AS_HELP_STRING([--enable-sql],[enable SQL database configuration backend (default is NO).]),
287 [if test x$enableval = xyes; then
294 AS_HELP_STRING([--enable-smartcard],[enable smartcard support (default is NO).]),
295 [if test x$enableval = xyes; then
302 AS_HELP_STRING([--enable-cisco-quirks],[enable support of Cisco VPN client (default is NO).]),
303 [if test x$enableval = xyes; then
310 AS_HELP_STRING([--enable-leak-detective],[enable malloc hooks to find memory leaks (default is NO).]),
311 [if test x$enableval = xyes; then
318 AS_HELP_STRING([--enable-unit-tests],[enable unit tests on IKEv2 daemon startup (default is NO).]),
319 [if test x$enableval = xyes; then
326 AS_HELP_STRING([--enable-eap-sim],[build SIM authenication module for EAP (default is NO).]),
327 [if test x$enableval = xyes; then
334 AS_HELP_STRING([--enable-eap-identity],[build EAP module providing EAP-Identity helper (default is NO).]),
335 [if test x$enableval = xyes; then
342 AS_HELP_STRING([--enable-eap-md5],[build MD5 (CHAP) authenication module for EAP (default is NO).]),
343 [if test x$enableval = xyes; then
350 AS_HELP_STRING([--enable-eap-aka],[build AKA authentication module for EAP (default is NO).]),
351 [if test x$enableval = xyes; then
358 AS_HELP_STRING([--enable-nat-transport],[enable NAT traversal with IPsec transport mode (default is NO).]),
359 [if test x$enableval = xyes; then
366 AS_HELP_STRING([--disable-vendor-id],[disable the sending of the strongSwan vendor ID (default is NO).]),
367 [if test x$enableval = xyes; then
377 AS_HELP_STRING([--disable-xauth-vid],[disable the sending of the XAUTH vendor ID (default is NO).]),
378 [if test x$enableval = xyes; then
388 AS_HELP_STRING([--enable-dumm],[build the DUMM UML test framework (default is NO).]),
389 [if test x$enableval = xyes; then
396 AS_HELP_STRING([--enable-fast],[build libfast (FastCGI Application Server w/ templates (default is NO).]),
397 [if test x$enableval = xyes; then
404 AS_HELP_STRING([--enable-manager],[build web management console (default is NO).]),
405 [if test x$enableval = xyes; then
413 AS_HELP_STRING([--enable-mediation],[enable IKEv2 Mediation Extension (default is NO).]),
414 [if test x$enableval = xyes; then
421 AS_HELP_STRING([--enable-integrity-test],[enable the integrity test of the crypto library (default is NO).]),
422 [if test x$enableval = xyes; then
429 AS_HELP_STRING([--disable-self-test],[disable the self-test of the crypto library (default is NO).]),
430 [if test x$enableval = xyes; then
440 AS_HELP_STRING([--disable-pluto],[disable the IKEv1 keying daemon pluto. (default is NO).]),
441 [if test x$enableval = xyes; then
451 AS_HELP_STRING([--disable-charon],[disable the IKEv2 keying daemon charon. (default is NO).]),
452 [if test x$enableval = xyes; then
462 AS_HELP_STRING([--disable-tools],[disable additional utilities (openac and scepclient). (default is NO).]),
463 [if test x$enableval = xyes; then
471 dnl =========================
472 dnl check required programs
473 dnl =========================
480 AC_PATH_PROG([GPERF], [gperf], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
481 AC_PATH_PROG([PERL], [perl], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
483 dnl =========================
484 dnl dependency calculation
485 dnl =========================
487 if test x$pluto = xtrue; then
491 if test x$tools = xtrue; then
495 if test x$smp = xtrue; then
499 if test x$manager = xtrue; then
503 dnl ==========================================
504 dnl check required libraries and header files
505 dnl ==========================================
508 AC_CHECK_FUNCS(backtrace)
509 AC_CHECK_FUNCS(dladdr)
511 AC_MSG_CHECKING([capset() definition])
513 [#include <linux/capset.h>],
517 [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); AC_DEFINE_UNQUOTED(NO_CAPSET_DEFINED, 1)]
520 if test x$gmp = xtrue; then
521 AC_HAVE_LIBRARY([gmp],[LIBS="$LIBS"],[AC_MSG_ERROR([GNU Multi Precision library gmp not found])])
522 AC_MSG_CHECKING([gmp.h version >= 4.1.4])
526 #if (__GNU_MP_VERSION*100 + __GNU_MP_VERSION_MINOR*10 + __GNU_MP_VERSION_PATCHLEVEL) < 414
530 [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); AC_MSG_ERROR([No usable gmp.h found!])]
534 if test x$ldap = xtrue; then
535 AC_HAVE_LIBRARY([ldap],[LIBS="$LIBS"],[AC_MSG_ERROR([LDAP library ldap not found])])
536 AC_HAVE_LIBRARY([lber],[LIBS="$LIBS"],[AC_MSG_ERROR([LDAP library lber not found])])
537 AC_CHECK_HEADER([ldap.h],,[AC_MSG_ERROR([LDAP header ldap.h not found!])])
540 if test x$curl = xtrue; then
541 AC_HAVE_LIBRARY([curl],[LIBS="$LIBS"],[AC_MSG_ERROR([CURL library curl not found])])
542 AC_CHECK_HEADER([curl/curl.h],,[AC_MSG_ERROR([CURL header curl/curl.h not found!])])
545 if test x$xml = xtrue; then
546 PKG_CHECK_MODULES(xml, [libxml-2.0],, AC_MSG_ERROR([No libxml2 package information found]))
551 if test x$fast = xtrue; then
552 AC_HAVE_LIBRARY([neo_cgi],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver library neo_cgi not found!])])
553 AC_HAVE_LIBRARY([neo_utl],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver library neo_utl not found!])])
554 AC_HAVE_LIBRARY([z],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver dependency zlib not found!])])
555 dnl autoconf does not like CamelCase!? How to fix this?
556 dnl AC_CHECK_HEADER([ClearSilver/ClearSilver.h],,[AC_MSG_ERROR([ClearSilver header file ClearSilver/ClearSilver.h not found!])])
558 AC_HAVE_LIBRARY([fcgi],[LIBS="$LIBS"],[AC_MSG_ERROR([FastCGI library fcgi not found!])])
559 AC_CHECK_HEADER([fcgiapp.h],,[AC_MSG_ERROR([FastCGI header file fcgiapp.h not found!])])
562 if test x$mysql = xtrue; then
563 AC_HAVE_LIBRARY([mysqlclient_r],[LIBS="$LIBS"],[AC_MSG_ERROR([MySQL library mysqlclient_r not found])])
564 AC_CHECK_HEADER([mysql/mysql.h],,[AC_MSG_ERROR([MySQL header mysql/mysql.h not found!])])
567 if test x$mysql = xtrue; then
568 AC_HAVE_LIBRARY([sqlite3],[LIBS="$LIBS"],[AC_MSG_ERROR([SQLite library sqlite3 not found])])
569 AC_CHECK_HEADER([sqlite3.h],,[AC_MSG_ERROR([SQLite header sqlite3.h not found!])])
572 dnl =========================
573 dnl set Makefile.am vars
574 dnl =========================
576 AM_CONDITIONAL(USE_CURL, test x$curl = xtrue)
577 AM_CONDITIONAL(USE_LDAP, test x$ldap = xtrue)
578 AM_CONDITIONAL(USE_AES, test x$aes = xtrue)
579 AM_CONDITIONAL(USE_DES, test x$des = xtrue)
580 AM_CONDITIONAL(USE_MD5, test x$md5 = xtrue)
581 AM_CONDITIONAL(USE_SHA1, test x$sha1 = xtrue)
582 AM_CONDITIONAL(USE_SHA2, test x$sha2 = xtrue)
583 AM_CONDITIONAL(USE_FIPS_PRF, test x$fips_prf = xtrue)
584 AM_CONDITIONAL(USE_GMP, test x$gmp = xtrue)
585 AM_CONDITIONAL(USE_X509, test x$x509 = xtrue)
586 AM_CONDITIONAL(USE_HMAC, test x$hmac = xtrue)
587 AM_CONDITIONAL(USE_MYSQL, test x$mysql = xtrue)
588 AM_CONDITIONAL(USE_SQLITE, test x$sqlite = xtrue)
589 AM_CONDITIONAL(USE_STROKE, test x$stroke = xtrue)
590 AM_CONDITIONAL(USE_MED_DB, test x$med_db = xtrue)
591 AM_CONDITIONAL(USE_SMP, test x$smp = xtrue)
592 AM_CONDITIONAL(USE_SQL, test x$sql = xtrue)
593 AM_CONDITIONAL(USE_SMARTCARD, test x$smartcard = xtrue)
594 AM_CONDITIONAL(USE_CISCO_QUIRKS, test x$cisco_quirks = xtrue)
595 AM_CONDITIONAL(USE_LEAK_DETECTIVE, test x$leak_detective = xtrue)
596 AM_CONDITIONAL(USE_UNIT_TESTS, test x$unittest = xtrue)
597 AM_CONDITIONAL(USE_EAP_SIM, test x$eap_sim = xtrue)
598 AM_CONDITIONAL(USE_EAP_IDENTITY, test x$eap_identity = xtrue)
599 AM_CONDITIONAL(USE_EAP_MD5, test x$eap_md5 = xtrue)
600 AM_CONDITIONAL(USE_EAP_AKA, test x$eap_aka = xtrue)
601 AM_CONDITIONAL(USE_NAT_TRANSPORT, test x$nat_transport = xtrue)
602 AM_CONDITIONAL(USE_VENDORID, test x$vendor_id = xtrue)
603 AM_CONDITIONAL(USE_XAUTH_VID, test x$xauth_vid = xtrue)
604 AM_CONDITIONAL(USE_DUMM, test x$dumm = xtrue)
605 AM_CONDITIONAL(USE_FAST, test x$fast = xtrue)
606 AM_CONDITIONAL(USE_MANAGER, test x$manager = xtrue)
607 AM_CONDITIONAL(USE_ME, test x$me = xtrue)
608 AM_CONDITIONAL(USE_INTEGRITY_TEST, test x$integrity_test = xtrue)
609 AM_CONDITIONAL(USE_SELF_TEST, test x$self_test = xtrue)
610 AM_CONDITIONAL(USE_PLUTO, test x$pluto = xtrue)
611 AM_CONDITIONAL(USE_CHARON, test x$charon = xtrue)
612 AM_CONDITIONAL(USE_TOOLS, test x$tools = xtrue)
613 AM_CONDITIONAL(USE_PLUTO_OR_CHARON, test x$pluto = xtrue -o x$charon = xtrue)
614 AM_CONDITIONAL(USE_LIBSTRONGSWAN, test x$charon = xtrue -o x$tools = xtrue)
615 AM_CONDITIONAL(USE_FILE_CONFIG, test x$pluto = xtrue -o x$stroke = xtrue)
617 dnl ==============================
618 dnl set global definitions
619 dnl ==============================
621 if test x$me = xtrue; then
625 dnl ==============================
627 dnl ==============================
633 src/libstrongswan/Makefile
634 src/libstrongswan/plugins/aes/Makefile
635 src/libstrongswan/plugins/des/Makefile
636 src/libstrongswan/plugins/md5/Makefile
637 src/libstrongswan/plugins/sha1/Makefile
638 src/libstrongswan/plugins/sha2/Makefile
639 src/libstrongswan/plugins/fips_prf/Makefile
640 src/libstrongswan/plugins/gmp/Makefile
641 src/libstrongswan/plugins/hmac/Makefile
642 src/libstrongswan/plugins/x509/Makefile
643 src/libstrongswan/plugins/curl/Makefile
644 src/libstrongswan/plugins/ldap/Makefile
645 src/libstrongswan/plugins/mysql/Makefile
646 src/libstrongswan/plugins/sqlite/Makefile
647 src/libcrypto/Makefile
648 src/libfreeswan/Makefile
652 src/charon/plugins/eap_aka/Makefile
653 src/charon/plugins/eap_identity/Makefile
654 src/charon/plugins/eap_md5/Makefile
655 src/charon/plugins/eap_sim/Makefile
656 src/charon/plugins/smp/Makefile
657 src/charon/plugins/sql/Makefile
658 src/charon/plugins/med_db/Makefile
659 src/charon/plugins/stroke/Makefile
660 src/charon/plugins/unit_tester/Makefile
665 src/_updown_espmark/Makefile
666 src/_copyright/Makefile
668 src/scepclient/Makefile