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.3.2)
20 AM_INIT_AUTOMAKE(tar-ustar)
21 AC_SUBST(confdir, '${sysconfdir}')
24 dnl =================================
25 dnl check --enable-xxx & --with-xxx
26 dnl =================================
30 AS_HELP_STRING([--with-default-pkcs11=lib],[set the default PKCS11 library other than "/usr/lib/opensc-pkcs11.so"]),
31 [AC_DEFINE_UNQUOTED(PKCS11_DEFAULT_LIB, "$withval")],
32 [AC_DEFINE_UNQUOTED(PKCS11_DEFAULT_LIB, "/usr/lib/opensc-pkcs11.so")]
37 AS_HELP_STRING([--with-xauth-module=lib],[set the path to the XAUTH module]),
38 [AC_DEFINE_UNQUOTED(XAUTH_DEFAULT_LIB, "$withval")],
43 AS_HELP_STRING([--with-random-device=dev],[set the device for real random data other than "/dev/random"]),
44 [AC_DEFINE_UNQUOTED(DEV_RANDOM, "$withval")],
45 [AC_DEFINE_UNQUOTED(DEV_RANDOM, "/dev/random")]
49 AS_HELP_STRING([--with-resolv-conf=file],[set the file to use in DNS handler plugin other than "sysconfdir/resolv.conf"]),
50 [AC_SUBST(resolv_conf, "$withval")],
51 [AC_SUBST(resolv_conf, "${sysconfdir}/resolv.conf")]
56 AS_HELP_STRING([--with-strongswan-conf=file],[strongswan.conf file other than "sysconfdir/strongswan.conf"]),
57 [AC_SUBST(strongswan_conf, "$withval")],
58 [AC_SUBST(strongswan_conf, "${sysconfdir}/strongswan.conf")]
63 AS_HELP_STRING([--with-urandom-device=dev],[set the device for pseudo random data other than "/dev/urandom"]),
64 [AC_DEFINE_UNQUOTED(DEV_URANDOM, "$withval")],
65 [AC_DEFINE_UNQUOTED(DEV_URANDOM, "/dev/urandom")]
70 AS_HELP_STRING([--with-piddir=dir],[path for PID and UNIX socket files other than "/var/run"]),
71 [AC_SUBST(piddir, "$withval")],
72 [AC_SUBST(piddir, "/var/run")]
77 AS_HELP_STRING([--with-ipsecdir=dir],[installation path for ipsec tools other than "libexecdir/ipsec"]),
78 [AC_SUBST(ipsecdir, "$withval")],
79 [AC_SUBST(ipsecdir, "${libexecdir%/}/ipsec")]
81 AC_SUBST(plugindir, "${ipsecdir%/}/plugins")
85 AS_HELP_STRING([--with-plugindir=dir],[installation path for plugins other than "ipsecdir/plugins"]),
86 [AC_SUBST(plugindir, "$withval")],
87 [AC_SUBST(plugindir, "${ipsecdir%/}/plugins")]
92 AS_HELP_STRING([--with-sim-reader=library.so],[library containing the sim_run_alg()/sim_get_triplet() function for EAP-SIM]),
93 [AC_SUBST(simreader, "$withval")],
94 [AC_SUBST(simreader, "${plugindir%/}/libeapsim-file.so")]
99 AS_HELP_STRING([--with-linux-headers=dir],[use the linux header files in dir instead of the supplied ones in "src/include"]),
100 [AC_SUBST(linuxdir, "$withval")], [AC_SUBST(linuxdir, "\${top_srcdir}/src/include")]
102 AC_SUBST(LINUX_HEADERS)
106 AS_HELP_STRING([--with-routing-table=num],[use routing table for IPsec routes (default: 220)]),
107 [AC_DEFINE_UNQUOTED(IPSEC_ROUTING_TABLE, $withval) AC_SUBST(IPSEC_ROUTING_TABLE, "$withval")],
108 [AC_DEFINE_UNQUOTED(IPSEC_ROUTING_TABLE, 220) AC_SUBST(IPSEC_ROUTING_TABLE, "220")]
112 [routing-table-prio],
113 AS_HELP_STRING([--with-routing-table-prio=prio],[priority for IPsec routing table (default: 220)]),
114 [AC_DEFINE_UNQUOTED(IPSEC_ROUTING_TABLE_PRIO, $withval) AC_SUBST(IPSEC_ROUTING_TABLE_PRIO, "$withval")],
115 [AC_DEFINE_UNQUOTED(IPSEC_ROUTING_TABLE_PRIO, 220) AC_SUBST(IPSEC_ROUTING_TABLE_PRIO, "220")]
119 [uid],,[AC_MSG_ERROR([--with-uid is gone, use --with-user instead!])]
123 [gid],,[AC_MSG_ERROR([--with-gid is gone, use --with-group instead!])]
128 AS_HELP_STRING([--with-user=user],[change user of the daemons to "user" after startup (default is 0).]),
129 [AC_DEFINE_UNQUOTED(IPSEC_USER, "$withval") AC_SUBST(ipsecuser, "$withval")],
130 [AC_SUBST(ipsecuser, "root")]
135 AS_HELP_STRING([--with-group=group],[change group of the daemons to "group" after startup (default is 0).]),
136 [AC_DEFINE_UNQUOTED(IPSEC_GROUP, "$withval") AC_SUBST(ipsecgroup, "$withval")],
137 [AC_SUBST(ipsecgroup, "root")]
140 dnl Will be extended to --with-capabilities=libcap|libcap2
143 AS_HELP_STRING([--with-capabilities=libcap],[capability dropping using libcap. Currenlty only the value "libcap" is supported (default is NO).]),
144 [capabilities="$withval"],
150 AS_HELP_STRING([--enable-curl],[enable CURL fetcher plugin to fetch files via libcurl (default is NO). Requires libcurl.]),
151 [if test x$enableval = xyes; then
158 AS_HELP_STRING([--enable-ldap],[enable LDAP fetching plugin to fetch files via libldap (default is NO). Requires openLDAP.]),
159 [if test x$enableval = xyes; then
166 AS_HELP_STRING([--disable-aes],[disable own AES software implementation plugin. (default is NO).]),
167 [if test x$enableval = xyes; then
177 AS_HELP_STRING([--disable-des],[disable own DES/3DES software implementation plugin. (default is NO).]),
178 [if test x$enableval = xyes; then
188 AS_HELP_STRING([--enable-blowfish],[enable Blowfish software implementation plugin (default is NO).]),
189 [if test x$enableval = xyes; then
196 AS_HELP_STRING([--enable-serpent],[enable Serpent software implementation plugin (default is NO).]),
197 [if test x$enableval = xyes; then
204 AS_HELP_STRING([--enable-twofish],[enable Twofish software implementation plugin (default is NO).]),
205 [if test x$enableval = xyes; then
212 AS_HELP_STRING([--enable-md4],[enable MD4 software implementation plugin (default is NO).]),
213 [if test x$enableval = xyes; then
220 AS_HELP_STRING([--disable-md5],[disable own MD5 software implementation plugin. (default is NO).]),
221 [if test x$enableval = xyes; then
231 AS_HELP_STRING([--disable-sha1],[disable own SHA1 software implementation plugin. (default is NO).]),
232 [if test x$enableval = xyes; then
242 AS_HELP_STRING([--disable-sha2],[disable own SHA256/SHA384/SHA512 software implementation plugin. (default is NO).]),
243 [if test x$enableval = xyes; then
253 AS_HELP_STRING([--disable-fips-prf],[disable FIPS PRF software implementation plugin. (default is NO).]),
254 [if test x$enableval = xyes; then
264 AS_HELP_STRING([--disable-gmp],[disable own GNU MP (libgmp) based crypto implementation plugin. (default is NO).]),
265 [if test x$enableval = xyes; then
275 AS_HELP_STRING([--disable-random],[disable RNG implementation on top of /dev/(u)random. (default is NO).]),
276 [if test x$enableval = xyes; then
286 AS_HELP_STRING([--disable-x509],[disable own X509 certificate implementation plugin. (default is NO).]),
287 [if test x$enableval = xyes; then
297 AS_HELP_STRING([--disable-pubkey],[disable RAW public key support plugin. (default is NO).]),
298 [if test x$enableval = xyes; then
308 AS_HELP_STRING([--disable-hmac],[disable HMAC crypto implementation plugin. (default is NO).]),
309 [if test x$enableval = xyes; then
319 AS_HELP_STRING([--disable-xcbc],[disable xcbc crypto implementation plugin. (default is NO).]),
320 [if test x$enableval = xyes; then
330 AS_HELP_STRING([--enable-mysql],[enable MySQL database support (default is NO). Requires libmysqlclient_r.]),
331 [if test x$enableval = xyes; then
338 AS_HELP_STRING([--enable-sqlite],[enable SQLite database support (default is NO). Requires libsqlite3.]),
339 [if test x$enableval = xyes; then
346 AS_HELP_STRING([--disable-stroke],[disable charons stroke (pluto compatibility) configuration backend. (default is NO).]),
347 [if test x$enableval = xyes; then
357 AS_HELP_STRING([--enable-medsrv],[enable mediation server web frontend and daemon plugin (default is NO).]),
358 [if test x$enableval = xyes; then
365 AS_HELP_STRING([--enable-medcli],[enable mediation client configuration database plugin (default is NO).]),
366 [if test x$enableval = xyes; then
373 AS_HELP_STRING([--enable-smp],[enable SMP configuration and control interface (default is NO). Requires libxml.]),
374 [if test x$enableval = xyes; then
381 AS_HELP_STRING([--enable-sql],[enable SQL database configuration backend (default is NO).]),
382 [if test x$enableval = xyes; then
389 AS_HELP_STRING([--enable-smartcard],[enable smartcard support (default is NO).]),
390 [if test x$enableval = xyes; then
397 AS_HELP_STRING([--enable-cisco-quirks],[enable support of Cisco VPN client (default is NO).]),
398 [if test x$enableval = xyes; then
405 AS_HELP_STRING([--enable-leak-detective],[enable malloc hooks to find memory leaks (default is NO).]),
406 [if test x$enableval = xyes; then
413 AS_HELP_STRING([--enable-lock-profiler],[enable lock/mutex profiling code (default is NO).]),
414 [if test x$enableval = xyes; then
421 AS_HELP_STRING([--enable-unit-tests],[enable unit tests on IKEv2 daemon startup (default is NO).]),
422 [if test x$enableval = xyes; then
429 AS_HELP_STRING([--enable-load-tests],[enable load testing plugin for IKEv2 daemon (default is NO).]),
430 [if test x$enableval = xyes; then
437 AS_HELP_STRING([--enable-eap-sim],[build SIM authenication module for EAP (default is NO).]),
438 [if test x$enableval = xyes; then
445 AS_HELP_STRING([--enable-eap-sim-file],[build EAP-SIM backend based on a triplet file (default is NO).]),
446 [if test x$enableval = xyes; then
453 AS_HELP_STRING([--enable-eap-identity],[build EAP module providing EAP-Identity helper (default is NO).]),
454 [if test x$enableval = xyes; then
461 AS_HELP_STRING([--enable-eap-md5],[build MD5 (CHAP) authenication module for EAP (default is NO).]),
462 [if test x$enableval = xyes; then
469 AS_HELP_STRING([--enable-eap-gtc],[build PAM based GTC authenication module for EAP (default is NO).]),
470 [if test x$enableval = xyes; then
477 AS_HELP_STRING([--enable-eap-aka],[build AKA authentication module for EAP (default is NO).]),
478 [if test x$enableval = xyes; then
485 AS_HELP_STRING([--enable-eap-mschapv2],[build MS-CHAPv2 authenication module for EAP (default is NO).]),
486 [if test x$enableval = xyes; then
493 AS_HELP_STRING([--enable-eap-radius],[build RADIUS proxy authenication module for EAP (default is NO).]),
494 [if test x$enableval = xyes; then
501 AS_HELP_STRING([--disable-kernel-netlink],[disable the netlink kernel interface. (default is NO).]),
502 [if test x$enableval = xyes; then
512 AS_HELP_STRING([--enable-kernel-pfkey],[enable the PF_KEY kernel interface. (default is NO).]),
513 [if test x$enableval = xyes; then
520 AS_HELP_STRING([--enable-kernel-pfroute],[enable the PF_ROUTE kernel interface. (default is NO).]),
521 [if test x$enableval = xyes; then
528 AS_HELP_STRING([--enable-kernel-klips],[enable the KLIPS kernel interface. (default is NO).]),
529 [if test x$enableval = xyes; then
536 AS_HELP_STRING([--enable-nat-transport],[enable NAT traversal with IPsec transport mode (default is NO).]),
537 [if test x$enableval = xyes; then
544 AS_HELP_STRING([--disable-vendor-id],[disable the sending of the strongSwan vendor ID (default is NO).]),
545 [if test x$enableval = xyes; then
555 AS_HELP_STRING([--disable-xauth-vid],[disable the sending of the XAUTH vendor ID (default is NO).]),
556 [if test x$enableval = xyes; then
566 AS_HELP_STRING([--enable-dumm],[build the DUMM UML test framework (default is NO).]),
567 [if test x$enableval = xyes; then
574 AS_HELP_STRING([--enable-fast],[build libfast (FastCGI Application Server w/ templates (default is NO).]),
575 [if test x$enableval = xyes; then
582 AS_HELP_STRING([--enable-manager],[build web management console (default is NO).]),
583 [if test x$enableval = xyes; then
591 AS_HELP_STRING([--enable-mediation],[enable IKEv2 Mediation Extension (default is NO).]),
592 [if test x$enableval = xyes; then
599 AS_HELP_STRING([--enable-integrity-test],[enable the integrity test of the crypto library (default is NO).]),
600 [if test x$enableval = xyes; then
607 AS_HELP_STRING([--disable-self-test],[disable the self-test of the crypto library (default is NO).]),
608 [if test x$enableval = xyes; then
618 AS_HELP_STRING([--disable-pluto],[disable the IKEv1 keying daemon pluto. (default is NO).]),
619 [if test x$enableval = xyes; then
629 AS_HELP_STRING([--disable-threads],[disable the use of threads in pluto. Charon always uses threads. (default is NO).]),
630 [if test x$enableval = xyes; then
640 AS_HELP_STRING([--disable-charon],[disable the IKEv2 keying daemon charon. (default is NO).]),
641 [if test x$enableval = xyes; then
651 AS_HELP_STRING([--disable-tools],[disable additional utilities (openac and scepclient). (default is NO).]),
652 [if test x$enableval = xyes; then
662 AS_HELP_STRING([--disable-updown],[disable updown firewall script plugin. (default is NO).]),
663 [if test x$enableval = xyes; then
673 AS_HELP_STRING([--disable-attr],[disable strongswan.conf based configuration attribute plugin. (default is NO).]),
674 [if test x$enableval = xyes; then
684 AS_HELP_STRING([--disable-resolv-conf],[disable resolv.conf DNS handler plugin. (default is NO).]),
685 [if test x$enableval = xyes; then
695 AS_HELP_STRING([--enable-padlock],[enables VIA Padlock crypto plugin. (default is NO).]),
696 [if test x$enableval = xyes; then
705 AS_HELP_STRING([--enable-openssl],[enables the OpenSSL crypto plugin. (default is NO).]),
706 [if test x$enableval = xyes; then
715 AS_HELP_STRING([--enable-gcrypt],[enables the libgcrypt plugin. (default is NO).]),
716 [if test x$enableval = xyes; then
725 AS_HELP_STRING([--enable-agent],[enables the ssh-agent signing plugin. (default is NO).]),
726 [if test x$enableval = xyes; then
735 AS_HELP_STRING([--enable-uci],[enable OpenWRT UCI configuration plugin (default is NO).]),
736 [if test x$enableval = xyes; then
743 AS_HELP_STRING([--enable-nm],[enable NetworkManager plugin (default is NO).]),
744 [if test x$enableval = xyes; then
751 AS_HELP_STRING([--enable-vstr],[enforce using the Vstr string library to replace glibc-like printf hooks (default is NO).]),
752 [if test x$enableval = xyes; then
757 dnl =========================
758 dnl set up compiler and flags
759 dnl =========================
761 if test -z "$CFLAGS"; then
762 AC_SUBST(CFLAGS, "-g -O2 -Wall -Wno-format -Wno-pointer-sign -Wno-strict-aliasing")
767 dnl =========================
768 dnl check required programs
769 dnl =========================
775 AC_PATH_PROG([GPERF], [gperf], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
776 AC_PATH_PROG([PERL], [perl], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
778 dnl =========================
779 dnl dependency calculation
780 dnl =========================
782 if test x$pluto = xtrue; then
786 if test x$tools = xtrue; then
790 if test x$smp = xtrue; then
794 if test x$manager = xtrue; then
798 if test x$medsrv = xtrue; then
803 if test x$medcli = xtrue; then
807 dnl ===========================================
808 dnl check required libraries and header files
809 dnl ===========================================
815 AC_SEARCH_LIBS(dlopen, dl, [DLLIB=$LIBS])
819 AC_MSG_CHECKING(for dladdr)
825 [AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_DLADDR])],
826 [AC_MSG_RESULT([no])]
829 AC_CHECK_FUNCS(backtrace)
830 AC_CHECK_FUNCS(prctl)
831 AC_CHECK_FUNCS(gethostbyname_r)
833 AC_CHECK_HEADERS(net/pfkeyv2.h netipsec/ipsec.h netinet6/ipsec.h)
835 AC_CHECK_MEMBERS([struct sockaddr.sa_len], [], [],
837 #include <sys/types.h>
838 #include <sys/socket.h>
841 AC_CHECK_MEMBERS([struct sadb_x_policy.sadb_x_policy_priority], [], [],
843 #include <sys/types.h>
844 #ifdef HAVE_NET_PFKEYV2_H
845 #include <net/pfkeyv2.h>
848 #include <linux/pfkeyv2.h>
852 AC_MSG_CHECKING([for IPSEC_MODE_BEET])
854 [#include <sys/types.h>
855 #ifdef HAVE_NETIPSEC_IPSEC_H
856 #include <netipsec/ipsec.h>
857 #elif defined(HAVE_NETINET6_IPSEC_H)
858 #include <netinet6/ipsec.h>
861 #include <linux/ipsec.h>
863 [int mode = IPSEC_MODE_BEET;
865 [AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_IPSEC_MODE_BEET])],
866 [AC_MSG_RESULT([no])]
869 AC_MSG_CHECKING([for IPSEC_DIR_FWD])
871 [#include <sys/types.h>
872 #ifdef HAVE_NETIPSEC_IPSEC_H
873 #include <netipsec/ipsec.h>
874 #elif defined(HAVE_NETINET6_IPSEC_H)
875 #include <netinet6/ipsec.h>
878 #include <linux/ipsec.h>
880 [int dir = IPSEC_DIR_FWD;
882 [AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_IPSEC_DIR_FWD])],
883 [AC_MSG_RESULT([no])]
886 AC_MSG_CHECKING([for gcc atomic operations])
890 volatile int ref = 1;
891 __sync_fetch_and_add (&ref, 1);
892 __sync_sub_and_fetch (&ref, 1);
893 /* Make sure test fails if operations are not supported */
894 __sync_val_compare_and_swap(&ref, 1, 0);
898 [AC_MSG_RESULT([yes]); AC_DEFINE(HAVE_GCC_ATOMIC_OPERATIONS)],
899 [AC_MSG_RESULT([no])],
900 [AC_MSG_RESULT([no])])
903 [register_printf_function],
904 [AC_DEFINE(HAVE_PRINTF_HOOKS)],
906 AC_MSG_NOTICE([printf does not support custom format specifiers!])
911 if test x$vstr = xtrue; then
912 AC_HAVE_LIBRARY([vstr],[LIBS="$LIBS"],[AC_MSG_ERROR([Vstr string library not found])])
916 if test x$gmp = xtrue; then
917 AC_HAVE_LIBRARY([gmp],[LIBS="$LIBS"],[AC_MSG_ERROR([GNU Multi Precision library gmp not found])])
918 AC_MSG_CHECKING([gmp.h version >= 4.1.4])
922 #if (__GNU_MP_VERSION*100 + __GNU_MP_VERSION_MINOR*10 + __GNU_MP_VERSION_PATCHLEVEL) < 414
926 [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); AC_MSG_ERROR([No usable gmp.h found!])]
930 if test x$ldap = xtrue; then
931 AC_HAVE_LIBRARY([ldap],[LIBS="$LIBS"],[AC_MSG_ERROR([LDAP library ldap not found])])
932 AC_HAVE_LIBRARY([lber],[LIBS="$LIBS"],[AC_MSG_ERROR([LDAP library lber not found])])
933 AC_CHECK_HEADER([ldap.h],,[AC_MSG_ERROR([LDAP header ldap.h not found!])])
936 if test x$curl = xtrue; then
937 AC_HAVE_LIBRARY([curl],[LIBS="$LIBS"],[AC_MSG_ERROR([CURL library curl not found])])
938 AC_CHECK_HEADER([curl/curl.h],,[AC_MSG_ERROR([CURL header curl/curl.h not found!])])
941 if test x$xml = xtrue; then
942 PKG_CHECK_MODULES(xml, [libxml-2.0])
947 if test x$dumm = xtrue; then
948 PKG_CHECK_MODULES(gtk, [gtk+-2.0 vte])
951 AC_CHECK_PROGS(RUBY, ruby)
952 AC_MSG_CHECKING([for Ruby header files])
953 if test -n "$RUBY"; then
954 RUBYDIR=`($RUBY -rmkmf -e 'print Config::CONFIG[["archdir"]] || $archdir') 2>/dev/null`
955 if test -n "$RUBYDIR"; then
959 if test -r $i/ruby.h; then
965 if test x"$RUBYINCLUDE" = xnone; then
966 AC_MSG_ERROR([ruby.h not found])
968 AC_SUBST(RUBYINCLUDE)
970 AC_MSG_ERROR([unable to determine ruby configuration])
973 AC_MSG_ERROR([don't know how to run ruby])
977 if test x$fast = xtrue; then
978 AC_HAVE_LIBRARY([neo_cgi],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver library neo_cgi not found!])])
979 AC_HAVE_LIBRARY([neo_utl],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver library neo_utl not found!])])
980 AC_HAVE_LIBRARY([z],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver dependency zlib not found!])])
981 dnl autoconf does not like CamelCase!? How to fix this?
982 dnl AC_CHECK_HEADER([ClearSilver/ClearSilver.h],,[AC_MSG_ERROR([ClearSilver header file ClearSilver/ClearSilver.h not found!])])
984 AC_HAVE_LIBRARY([fcgi],[LIBS="$LIBS"],[AC_MSG_ERROR([FastCGI library fcgi not found!])])
985 AC_CHECK_HEADER([fcgiapp.h],,[AC_MSG_ERROR([FastCGI header file fcgiapp.h not found!])])
988 if test x$mysql = xtrue; then
989 AC_HAVE_LIBRARY([mysqlclient_r],[LIBS="$LIBS"],[AC_MSG_ERROR([MySQL library mysqlclient_r not found])])
990 AC_CHECK_HEADER([mysql/mysql.h],,[AC_MSG_ERROR([MySQL header mysql/mysql.h not found!])])
993 if test x$sqlite = xtrue; then
994 AC_HAVE_LIBRARY([sqlite3],[LIBS="$LIBS"],[AC_MSG_ERROR([SQLite library sqlite3 not found])])
995 AC_CHECK_HEADER([sqlite3.h],,[AC_MSG_ERROR([SQLite header sqlite3.h not found!])])
996 AC_MSG_CHECKING([sqlite3_prepare_v2])
998 [#include <sqlite3.h>],
1000 void *test = sqlite3_prepare_v2;
1002 [AC_MSG_RESULT([yes])]; AC_DEFINE_UNQUOTED(HAVE_SQLITE3_PREPARE_V2, 1), [AC_MSG_RESULT([no])])
1003 AC_MSG_CHECKING([sqlite3.h version >= 3.3.1])
1005 [#include <sqlite3.h>],
1007 #if SQLITE_VERSION_NUMBER < 3003001
1011 [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); AC_MSG_ERROR([SQLite version >= 3.3.1 required!])])
1014 if test x$openssl = xtrue; then
1015 AC_HAVE_LIBRARY([crypto],[LIBS="$LIBS"],[AC_MSG_ERROR([OpenSSL crypto library not found])])
1016 AC_CHECK_HEADER([openssl/evp.h],,[AC_MSG_ERROR([OpenSSL header openssl/evp.h not found!])])
1019 if test x$gcrypt = xtrue; then
1020 AM_PATH_LIBGCRYPT(,,[AC_MSG_ERROR([libgcrypt not found!])])
1023 if test x$uci = xtrue; then
1024 AC_HAVE_LIBRARY([uci],[LIBS="$LIBS"],[AC_MSG_ERROR([UCI library libuci not found])])
1025 AC_CHECK_HEADER([uci.h],,[AC_MSG_ERROR([UCI header uci.h not found!])])
1028 if test x$nm = xtrue; then
1029 PKG_CHECK_MODULES(nm, [NetworkManager libnm_glib_vpn gthread-2.0])
1034 if test x$eap_gtc = xtrue; then
1035 AC_HAVE_LIBRARY([pam],[LIBS="$LIBS"],[AC_MSG_ERROR([PAM library not found])])
1036 AC_CHECK_HEADER([security/pam_appl.h],,[AC_MSG_ERROR([PAM header security/pam_appl.h not found!])])
1039 if test x$capabilities = xlibcap; then
1040 AC_HAVE_LIBRARY([cap],[LIBS="$LIBS"],[AC_MSG_ERROR([libcap library not found])])
1041 AC_CHECK_HEADER([sys/capability.h],,[AC_MSG_ERROR([libcap header sys/capability.h not found!])])
1044 dnl ======================================
1045 dnl collect all plugins for libstrongswan
1046 dnl ======================================
1048 libstrongswan_plugins=
1051 if test x$curl = xtrue; then
1052 libstrongswan_plugins=${libstrongswan_plugins}" curl"
1053 pluto_plugins=${pluto_plugins}" curl"
1055 if test x$ldap = xtrue; then
1056 libstrongswan_plugins=${libstrongswan_plugins}" ldap"
1057 pluto_plugins=${pluto_plugins}" ldap"
1059 if test x$aes = xtrue; then
1060 libstrongswan_plugins=${libstrongswan_plugins}" aes"
1061 pluto_plugins=${pluto_plugins}" aes"
1063 if test x$des = xtrue; then
1064 libstrongswan_plugins=${libstrongswan_plugins}" des"
1065 pluto_plugins=${pluto_plugins}" des"
1067 if test x$blowfish = xtrue; then
1068 libstrongswan_plugins=${libstrongswan_plugins}" blowfish"
1069 pluto_plugins=${pluto_plugins}" blowfish"
1071 if test x$serpent = xtrue; then
1072 pluto_plugins=${pluto_plugins}" serpent"
1074 if test x$twofish = xtrue; then
1075 pluto_plugins=${pluto_plugins}" twofish"
1077 if test x$sha1 = xtrue; then
1078 libstrongswan_plugins=${libstrongswan_plugins}" sha1"
1079 pluto_plugins=${pluto_plugins}" sha1"
1081 if test x$sha2 = xtrue; then
1082 libstrongswan_plugins=${libstrongswan_plugins}" sha2"
1083 pluto_plugins=${pluto_plugins}" sha2"
1085 if test x$md4 = xtrue; then
1086 libstrongswan_plugins=${libstrongswan_plugins}" md4"
1088 if test x$md5 = xtrue; then
1089 libstrongswan_plugins=${libstrongswan_plugins}" md5"
1090 pluto_plugins=${pluto_plugins}" md5"
1092 if test x$fips_prf = xtrue; then
1093 libstrongswan_plugins=${libstrongswan_plugins}" fips-prf"
1095 if test x$random = xtrue; then
1096 libstrongswan_plugins=${libstrongswan_plugins}" random"
1097 pluto_plugins=${pluto_plugins}" random"
1099 if test x$x509 = xtrue; then
1100 libstrongswan_plugins=${libstrongswan_plugins}" x509"
1102 if test x$pubkey = xtrue; then
1103 libstrongswan_plugins=${libstrongswan_plugins}" pubkey"
1104 pluto_plugins=${pluto_plugins}" pubkey"
1106 if test x$xcbc = xtrue; then
1107 libstrongswan_plugins=${libstrongswan_plugins}" xcbc"
1109 if test x$hmac = xtrue; then
1110 libstrongswan_plugins=${libstrongswan_plugins}" hmac"
1111 pluto_plugins=${pluto_plugins}" hmac"
1113 if test x$mysql = xtrue; then
1114 libstrongswan_plugins=${libstrongswan_plugins}" mysql"
1116 if test x$sqlite = xtrue; then
1117 libstrongswan_plugins=${libstrongswan_plugins}" sqlite"
1119 if test x$padlock = xtrue; then
1120 libstrongswan_plugins=${libstrongswan_plugins}" padlock"
1122 if test x$openssl = xtrue; then
1123 libstrongswan_plugins=${libstrongswan_plugins}" openssl"
1124 pluto_plugins=${pluto_plugins}" openssl"
1126 if test x$gcrypt = xtrue; then
1127 libstrongswan_plugins=${libstrongswan_plugins}" gcrypt"
1128 pluto_plugins=${pluto_plugins}" gcrypt"
1130 if test x$agent = xtrue; then
1131 libstrongswan_plugins=${libstrongswan_plugins}" agent"
1133 if test x$gmp = xtrue; then
1134 libstrongswan_plugins=${libstrongswan_plugins}" gmp"
1135 pluto_plugins=${pluto_plugins}" gmp"
1138 AC_SUBST(libstrongswan_plugins)
1139 AC_SUBST(pluto_plugins)
1141 dnl =========================
1142 dnl set Makefile.am vars
1143 dnl =========================
1145 dnl libstrongswan plugins
1146 dnl =====================
1147 AM_CONDITIONAL(USE_CURL, test x$curl = xtrue)
1148 AM_CONDITIONAL(USE_LDAP, test x$ldap = xtrue)
1149 AM_CONDITIONAL(USE_AES, test x$aes = xtrue)
1150 AM_CONDITIONAL(USE_DES, test x$des = xtrue)
1151 AM_CONDITIONAL(USE_BLOWFISH, test x$blowfish = xtrue)
1152 AM_CONDITIONAL(USE_SERPENT, test x$serpent = xtrue)
1153 AM_CONDITIONAL(USE_TWOFISH, test x$twofish = xtrue)
1154 AM_CONDITIONAL(USE_MD4, test x$md4 = xtrue)
1155 AM_CONDITIONAL(USE_MD5, test x$md5 = xtrue)
1156 AM_CONDITIONAL(USE_SHA1, test x$sha1 = xtrue)
1157 AM_CONDITIONAL(USE_SHA2, test x$sha2 = xtrue)
1158 AM_CONDITIONAL(USE_FIPS_PRF, test x$fips_prf = xtrue)
1159 AM_CONDITIONAL(USE_GMP, test x$gmp = xtrue)
1160 AM_CONDITIONAL(USE_RANDOM, test x$random = xtrue)
1161 AM_CONDITIONAL(USE_X509, test x$x509 = xtrue)
1162 AM_CONDITIONAL(USE_PUBKEY, test x$pubkey = xtrue)
1163 AM_CONDITIONAL(USE_HMAC, test x$hmac = xtrue)
1164 AM_CONDITIONAL(USE_XCBC, test x$xcbc = xtrue)
1165 AM_CONDITIONAL(USE_MYSQL, test x$mysql = xtrue)
1166 AM_CONDITIONAL(USE_SQLITE, test x$sqlite = xtrue)
1167 AM_CONDITIONAL(USE_PADLOCK, test x$padlock = xtrue)
1168 AM_CONDITIONAL(USE_OPENSSL, test x$openssl = xtrue)
1169 AM_CONDITIONAL(USE_GCRYPT, test x$gcrypt = xtrue)
1170 AM_CONDITIONAL(USE_AGENT, test x$agent = xtrue)
1174 AM_CONDITIONAL(USE_STROKE, test x$stroke = xtrue)
1175 AM_CONDITIONAL(USE_MEDSRV, test x$medsrv = xtrue)
1176 AM_CONDITIONAL(USE_MEDCLI, test x$medcli = xtrue)
1177 AM_CONDITIONAL(USE_NM, test x$nm = xtrue)
1178 AM_CONDITIONAL(USE_UCI, test x$uci = xtrue)
1179 AM_CONDITIONAL(USE_SMP, test x$smp = xtrue)
1180 AM_CONDITIONAL(USE_SQL, test x$sql = xtrue)
1181 AM_CONDITIONAL(USE_UPDOWN, test x$updown = xtrue)
1182 AM_CONDITIONAL(USE_ATTR, test x$attr = xtrue)
1183 AM_CONDITIONAL(USE_RESOLV_CONF, test x$resolvconf = xtrue)
1184 AM_CONDITIONAL(USE_UNIT_TESTS, test x$unittest = xtrue)
1185 AM_CONDITIONAL(USE_LOAD_TESTS, test x$loadtest = xtrue)
1186 AM_CONDITIONAL(USE_EAP_SIM, test x$eap_sim = xtrue)
1187 AM_CONDITIONAL(USE_EAP_SIM_FILE, test x$eap_sim_file = xtrue)
1188 AM_CONDITIONAL(USE_EAP_IDENTITY, test x$eap_identity = xtrue)
1189 AM_CONDITIONAL(USE_EAP_MD5, test x$eap_md5 = xtrue)
1190 AM_CONDITIONAL(USE_EAP_GTC, test x$eap_gtc = xtrue)
1191 AM_CONDITIONAL(USE_EAP_AKA, test x$eap_aka = xtrue)
1192 AM_CONDITIONAL(USE_EAP_MSCHAPV2, test x$eap_mschapv2 = xtrue)
1193 AM_CONDITIONAL(USE_EAP_RADIUS, test x$eap_radius = xtrue)
1194 AM_CONDITIONAL(USE_KERNEL_NETLINK, test x$kernel_netlink = xtrue)
1195 AM_CONDITIONAL(USE_KERNEL_PFKEY, test x$kernel_pfkey = xtrue)
1196 AM_CONDITIONAL(USE_KERNEL_PFROUTE, test x$kernel_pfroute = xtrue)
1197 AM_CONDITIONAL(USE_KERNEL_KLIPS, test x$kernel_klips = xtrue)
1201 AM_CONDITIONAL(USE_SMARTCARD, test x$smartcard = xtrue)
1202 AM_CONDITIONAL(USE_CISCO_QUIRKS, test x$cisco_quirks = xtrue)
1203 AM_CONDITIONAL(USE_LEAK_DETECTIVE, test x$leak_detective = xtrue)
1204 AM_CONDITIONAL(USE_LOCK_PROFILER, test x$lock_profiler = xtrue)
1205 AM_CONDITIONAL(USE_NAT_TRANSPORT, test x$nat_transport = xtrue)
1206 AM_CONDITIONAL(USE_VENDORID, test x$vendor_id = xtrue)
1207 AM_CONDITIONAL(USE_XAUTH_VID, test x$xauth_vid = xtrue)
1208 AM_CONDITIONAL(USE_DUMM, test x$dumm = xtrue)
1209 AM_CONDITIONAL(USE_FAST, test x$fast = xtrue)
1210 AM_CONDITIONAL(USE_MANAGER, test x$manager = xtrue)
1211 AM_CONDITIONAL(USE_ME, test x$me = xtrue)
1212 AM_CONDITIONAL(USE_INTEGRITY_TEST, test x$integrity_test = xtrue)
1213 AM_CONDITIONAL(USE_SELF_TEST, test x$self_test = xtrue)
1214 AM_CONDITIONAL(USE_CAPABILITIES, test x$capabilities = xlibcap)
1215 AM_CONDITIONAL(USE_PLUTO, test x$pluto = xtrue)
1216 AM_CONDITIONAL(USE_THREADS, test x$threads = xtrue)
1217 AM_CONDITIONAL(USE_CHARON, test x$charon = xtrue)
1218 AM_CONDITIONAL(USE_TOOLS, test x$tools = xtrue)
1219 AM_CONDITIONAL(USE_LIBSTRONGSWAN, test x$charon = xtrue -o x$pluto = xtrue -o x$tools = xtrue)
1220 AM_CONDITIONAL(USE_FILE_CONFIG, test x$pluto = xtrue -o x$stroke = xtrue)
1221 AM_CONDITIONAL(USE_VSTR, test x$vstr = xtrue)
1223 dnl ==============================
1224 dnl set global definitions
1225 dnl ==============================
1227 if test x$me = xtrue; then
1230 if test x$capabilities = xlibcap; then
1231 AC_DEFINE(CAPABILITIES)
1234 dnl ==============================
1236 dnl ==============================
1241 src/include/Makefile
1242 src/libstrongswan/Makefile
1243 src/libstrongswan/plugins/aes/Makefile
1244 src/libstrongswan/plugins/des/Makefile
1245 src/libstrongswan/plugins/blowfish/Makefile
1246 src/libstrongswan/plugins/serpent/Makefile
1247 src/libstrongswan/plugins/twofish/Makefile
1248 src/libstrongswan/plugins/md4/Makefile
1249 src/libstrongswan/plugins/md5/Makefile
1250 src/libstrongswan/plugins/sha1/Makefile
1251 src/libstrongswan/plugins/sha2/Makefile
1252 src/libstrongswan/plugins/fips_prf/Makefile
1253 src/libstrongswan/plugins/gmp/Makefile
1254 src/libstrongswan/plugins/random/Makefile
1255 src/libstrongswan/plugins/hmac/Makefile
1256 src/libstrongswan/plugins/xcbc/Makefile
1257 src/libstrongswan/plugins/x509/Makefile
1258 src/libstrongswan/plugins/pubkey/Makefile
1259 src/libstrongswan/plugins/curl/Makefile
1260 src/libstrongswan/plugins/ldap/Makefile
1261 src/libstrongswan/plugins/mysql/Makefile
1262 src/libstrongswan/plugins/sqlite/Makefile
1263 src/libstrongswan/plugins/padlock/Makefile
1264 src/libstrongswan/plugins/openssl/Makefile
1265 src/libstrongswan/plugins/gcrypt/Makefile
1266 src/libstrongswan/plugins/agent/Makefile
1267 src/libstrongswan/fips/Makefile
1268 src/libfreeswan/Makefile
1272 src/charon/plugins/eap_aka/Makefile
1273 src/charon/plugins/eap_identity/Makefile
1274 src/charon/plugins/eap_md5/Makefile
1275 src/charon/plugins/eap_gtc/Makefile
1276 src/charon/plugins/eap_sim/Makefile
1277 src/charon/plugins/eap_sim_file/Makefile
1278 src/charon/plugins/eap_mschapv2/Makefile
1279 src/charon/plugins/eap_radius/Makefile
1280 src/charon/plugins/kernel_netlink/Makefile
1281 src/charon/plugins/kernel_pfkey/Makefile
1282 src/charon/plugins/kernel_pfroute/Makefile
1283 src/charon/plugins/kernel_klips/Makefile
1284 src/charon/plugins/smp/Makefile
1285 src/charon/plugins/sql/Makefile
1286 src/charon/plugins/medsrv/Makefile
1287 src/charon/plugins/medcli/Makefile
1288 src/charon/plugins/nm/Makefile
1289 src/charon/plugins/uci/Makefile
1290 src/charon/plugins/stroke/Makefile
1291 src/charon/plugins/updown/Makefile
1292 src/charon/plugins/attr/Makefile
1293 src/charon/plugins/resolv_conf/Makefile
1294 src/charon/plugins/unit_tester/Makefile
1295 src/charon/plugins/load_tester/Makefile
1298 src/starter/Makefile
1299 src/_updown/Makefile
1300 src/_updown_espmark/Makefile
1301 src/_copyright/Makefile
1303 src/scepclient/Makefile
1305 src/dumm/ext/extconf.rb
1306 src/libfast/Makefile
1307 src/manager/Makefile