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.5)
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 "root").]),
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 "root").]),
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-md4],[enable MD4 software implementation plugin (default is NO).]),
197 [if test x$enableval = xyes; then
204 AS_HELP_STRING([--disable-md5],[disable own MD5 software implementation plugin. (default is NO).]),
205 [if test x$enableval = xyes; then
215 AS_HELP_STRING([--disable-sha1],[disable own SHA1 software implementation plugin. (default is NO).]),
216 [if test x$enableval = xyes; then
226 AS_HELP_STRING([--disable-sha2],[disable own SHA256/SHA384/SHA512 software implementation plugin. (default is NO).]),
227 [if test x$enableval = xyes; then
237 AS_HELP_STRING([--disable-fips-prf],[disable FIPS PRF software implementation plugin. (default is NO).]),
238 [if test x$enableval = xyes; then
248 AS_HELP_STRING([--disable-gmp],[disable own GNU MP (libgmp) based crypto implementation plugin. (default is NO).]),
249 [if test x$enableval = xyes; then
259 AS_HELP_STRING([--disable-random],[disable RNG implementation on top of /dev/(u)random. (default is NO).]),
260 [if test x$enableval = xyes; then
270 AS_HELP_STRING([--disable-x509],[disable own X509 certificate implementation plugin. (default is NO).]),
271 [if test x$enableval = xyes; then
281 AS_HELP_STRING([--disable-pubkey],[disable RAW public key support plugin. (default is NO).]),
282 [if test x$enableval = xyes; then
292 AS_HELP_STRING([--disable-pkcs1],[disable PKCS1 key decoding plugin. (default is NO).]),
293 [if test x$enableval = xyes; then
303 AS_HELP_STRING([--disable-pgp],[disable PGP key decoding plugin. (default is NO).]),
304 [if test x$enableval = xyes; then
314 AS_HELP_STRING([--disable-dnskey],[disable DNS RR key decoding plugin. (default is NO).]),
315 [if test x$enableval = xyes; then
325 AS_HELP_STRING([--disable-pem],[disable PEM decoding plugin. (default is NO).]),
326 [if test x$enableval = xyes; then
336 AS_HELP_STRING([--disable-hmac],[disable HMAC crypto implementation plugin. (default is NO).]),
337 [if test x$enableval = xyes; then
347 AS_HELP_STRING([--disable-xcbc],[disable xcbc crypto implementation plugin. (default is NO).]),
348 [if test x$enableval = xyes; then
358 AS_HELP_STRING([--enable-test-vectors],[enable plugin providing crypto test vectors (default is NO).]),
359 [if test x$enableval = xyes; then
366 AS_HELP_STRING([--enable-mysql],[enable MySQL database support (default is NO). Requires libmysqlclient_r.]),
367 [if test x$enableval = xyes; then
374 AS_HELP_STRING([--enable-sqlite],[enable SQLite database support (default is NO). Requires libsqlite3.]),
375 [if test x$enableval = xyes; then
382 AS_HELP_STRING([--disable-stroke],[disable charons stroke (pluto compatibility) configuration backend. (default is NO).]),
383 [if test x$enableval = xyes; then
393 AS_HELP_STRING([--enable-medsrv],[enable mediation server web frontend and daemon plugin (default is NO).]),
394 [if test x$enableval = xyes; then
401 AS_HELP_STRING([--enable-medcli],[enable mediation client configuration database plugin (default is NO).]),
402 [if test x$enableval = xyes; then
409 AS_HELP_STRING([--enable-smp],[enable SMP configuration and control interface (default is NO). Requires libxml.]),
410 [if test x$enableval = xyes; then
417 AS_HELP_STRING([--enable-sql],[enable SQL database configuration backend (default is NO).]),
418 [if test x$enableval = xyes; then
425 AS_HELP_STRING([--enable-smartcard],[enable smartcard support (default is NO).]),
426 [if test x$enableval = xyes; then
433 AS_HELP_STRING([--enable-cisco-quirks],[enable support of Cisco VPN client (default is NO).]),
434 [if test x$enableval = xyes; then
441 AS_HELP_STRING([--enable-leak-detective],[enable malloc hooks to find memory leaks (default is NO).]),
442 [if test x$enableval = xyes; then
449 AS_HELP_STRING([--enable-lock-profiler],[enable lock/mutex profiling code (default is NO).]),
450 [if test x$enableval = xyes; then
457 AS_HELP_STRING([--enable-unit-tests],[enable unit tests on IKEv2 daemon startup (default is NO).]),
458 [if test x$enableval = xyes; then
465 AS_HELP_STRING([--enable-load-tests],[enable load testing plugin for IKEv2 daemon (default is NO).]),
466 [if test x$enableval = xyes; then
473 AS_HELP_STRING([--enable-eap-sim],[build SIM authenication module for EAP (default is NO).]),
474 [if test x$enableval = xyes; then
481 AS_HELP_STRING([--enable-eap-sim-file],[build EAP-SIM backend based on a triplet file (default is NO).]),
482 [if test x$enableval = xyes; then
489 AS_HELP_STRING([--enable-eap-identity],[build EAP module providing EAP-Identity helper (default is NO).]),
490 [if test x$enableval = xyes; then
497 AS_HELP_STRING([--enable-eap-md5],[build MD5 (CHAP) authenication module for EAP (default is NO).]),
498 [if test x$enableval = xyes; then
505 AS_HELP_STRING([--enable-eap-gtc],[build PAM based GTC authenication module for EAP (default is NO).]),
506 [if test x$enableval = xyes; then
513 AS_HELP_STRING([--enable-eap-aka],[build AKA authentication module for EAP (default is NO).]),
514 [if test x$enableval = xyes; then
521 AS_HELP_STRING([--enable-eap-mschapv2],[build MS-CHAPv2 authenication module for EAP (default is NO).]),
522 [if test x$enableval = xyes; then
529 AS_HELP_STRING([--enable-eap-radius],[build RADIUS proxy authenication module for EAP (default is NO).]),
530 [if test x$enableval = xyes; then
537 AS_HELP_STRING([--disable-kernel-netlink],[disable the netlink kernel interface. (default is NO).]),
538 [if test x$enableval = xyes; then
548 AS_HELP_STRING([--enable-kernel-pfkey],[enable the PF_KEY kernel interface. (default is NO).]),
549 [if test x$enableval = xyes; then
556 AS_HELP_STRING([--enable-kernel-pfroute],[enable the PF_ROUTE kernel interface. (default is NO).]),
557 [if test x$enableval = xyes; then
564 AS_HELP_STRING([--enable-kernel-klips],[enable the KLIPS kernel interface. (default is NO).]),
565 [if test x$enableval = xyes; then
572 AS_HELP_STRING([--enable-nat-transport],[enable NAT traversal with IPsec transport mode (default is NO).]),
573 [if test x$enableval = xyes; then
580 AS_HELP_STRING([--disable-vendor-id],[disable the sending of the strongSwan vendor ID (default is NO).]),
581 [if test x$enableval = xyes; then
591 AS_HELP_STRING([--disable-xauth-vid],[disable the sending of the XAUTH vendor ID (default is NO).]),
592 [if test x$enableval = xyes; then
602 AS_HELP_STRING([--enable-dumm],[build the DUMM UML test framework (default is NO).]),
603 [if test x$enableval = xyes; then
610 AS_HELP_STRING([--enable-fast],[build libfast (FastCGI Application Server w/ templates (default is NO).]),
611 [if test x$enableval = xyes; then
618 AS_HELP_STRING([--enable-manager],[build web management console (default is NO).]),
619 [if test x$enableval = xyes; then
627 AS_HELP_STRING([--enable-mediation],[enable IKEv2 Mediation Extension (default is NO).]),
628 [if test x$enableval = xyes; then
635 AS_HELP_STRING([--enable-integrity-test],[enable integrity testing of libstrongswan and plugins (default is NO).]),
636 [if test x$enableval = xyes; then
643 AS_HELP_STRING([--disable-pluto],[disable the IKEv1 keying daemon pluto. (default is NO).]),
644 [if test x$enableval = xyes; then
654 AS_HELP_STRING([--disable-threads],[disable the use of threads in pluto. Charon always uses threads. (default is NO).]),
655 [if test x$enableval = xyes; then
665 AS_HELP_STRING([--disable-charon],[disable the IKEv2 keying daemon charon. (default is NO).]),
666 [if test x$enableval = xyes; then
676 AS_HELP_STRING([--disable-tools],[disable additional utilities (openac, scepclient and pki). (default is NO).]),
677 [if test x$enableval = xyes; then
687 AS_HELP_STRING([--disable-scripts],[disable additional utilities (found in directory scripts). (default is NO).]),
688 [if test x$enableval = xyes; then
698 AS_HELP_STRING([--disable-updown],[disable updown firewall script plugin. (default is NO).]),
699 [if test x$enableval = xyes; then
709 AS_HELP_STRING([--disable-attr],[disable strongswan.conf based configuration attribute plugin. (default is NO).]),
710 [if test x$enableval = xyes; then
720 AS_HELP_STRING([--disable-resolv-conf],[disable resolv.conf DNS handler plugin. (default is NO).]),
721 [if test x$enableval = xyes; then
731 AS_HELP_STRING([--enable-padlock],[enables VIA Padlock crypto plugin. (default is NO).]),
732 [if test x$enableval = xyes; then
741 AS_HELP_STRING([--enable-openssl],[enables the OpenSSL crypto plugin. (default is NO).]),
742 [if test x$enableval = xyes; then
751 AS_HELP_STRING([--enable-gcrypt],[enables the libgcrypt plugin. (default is NO).]),
752 [if test x$enableval = xyes; then
761 AS_HELP_STRING([--enable-agent],[enables the ssh-agent signing plugin. (default is NO).]),
762 [if test x$enableval = xyes; then
771 AS_HELP_STRING([--enable-uci],[enable OpenWRT UCI configuration plugin (default is NO).]),
772 [if test x$enableval = xyes; then
779 AS_HELP_STRING([--enable-nm],[enable NetworkManager plugin (default is NO).]),
780 [if test x$enableval = xyes; then
787 AS_HELP_STRING([--enable-vstr],[enforce using the Vstr string library to replace glibc-like printf hooks (default is NO).]),
788 [if test x$enableval = xyes; then
793 dnl =========================
794 dnl set up compiler and flags
795 dnl =========================
797 if test -z "$CFLAGS"; then
798 CFLAGS="-g -O2 -Wall -Wno-format -Wno-pointer-sign -Wno-strict-aliasing"
804 dnl =========================
805 dnl check required programs
806 dnl =========================
814 AC_PATH_PROG([PERL], [perl], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
815 AC_PATH_PROG([GPERF], [gperf], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
817 dnl because gperf is not needed by end-users we just report it but do not abort on failure
818 AC_MSG_CHECKING([gperf version >= 3.0.0])
819 if test -x "$GPERF"; then
820 if test "`$GPERF --version | $AWK -F' ' '/^GNU gperf/ { print $3 }' | $AWK -F. '{ print $1 }'`" -ge "3"; then
826 AC_MSG_RESULT([not found])
829 dnl translate user/group to numercial ids
830 AC_MSG_CHECKING([for uid of user "$ipsecuser"])
831 ipsecuid=`id -u $ipsecuser 2>/dev/null`
832 if test -n "$ipsecuid"; then
833 AC_MSG_RESULT([$ipsecuid])
836 AC_MSG_ERROR([not found])
838 AC_MSG_CHECKING([for gid of group "$ipsecgroup"])
839 ipsecgid=`$EGREP "^$ipsecgroup:" /etc/group | $AWK -F: '{ print $3 }'`
840 if test -n "$ipsecgid"; then
841 AC_MSG_RESULT([$ipsecgid])
844 AC_MSG_ERROR([not found])
847 dnl =========================
848 dnl dependency calculation
849 dnl =========================
851 if test x$eap_aka = xtrue; then
857 if test x$eap_sim = xtrue; then
861 if test x$fips_prf = xtrue; then
865 if test x$smp = xtrue; then
869 if test x$manager = xtrue; then
873 if test x$medsrv = xtrue; then
878 if test x$medcli = xtrue; then
882 dnl ===========================================
883 dnl check required libraries and header files
884 dnl ===========================================
889 dnl libraries needed on some platforms but not on others
890 dnl ====================================================
893 dnl FreeBSD and Mac OS X have dlopen integrated in libc, Linux needs libdl
895 AC_SEARCH_LIBS(dlopen, dl, [DLLIB=$LIBS])
898 dnl glibc's backtrace() can be replicated on FreeBSD with libexecinfo
900 AC_SEARCH_LIBS(backtrace, execinfo, [BTLIB=$LIBS])
901 AC_CHECK_FUNCS(backtrace)
904 dnl OpenSolaris needs libsocket and libnsl for socket()
906 AC_SEARCH_LIBS(socket, socket, [SOCKLIB=$LIBS],
907 [AC_CHECK_LIB(nsl, socket, [SOCKLIB="-lsocket -lnsl"], [], [-lsocket])]
912 dnl ======================
914 AC_MSG_CHECKING(for dladdr)
920 [AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_DLADDR])],
921 [AC_MSG_RESULT([no])]
924 AC_CHECK_FUNCS(prctl)
926 AC_CHECK_HEADERS(sys/sockio.h)
927 AC_CHECK_HEADERS(net/pfkeyv2.h netipsec/ipsec.h netinet6/ipsec.h linux/udp.h)
929 AC_CHECK_MEMBERS([struct sockaddr.sa_len], [], [],
931 #include <sys/types.h>
932 #include <sys/socket.h>
935 AC_CHECK_MEMBERS([struct sadb_x_policy.sadb_x_policy_priority], [], [],
937 #include <sys/types.h>
938 #ifdef HAVE_NET_PFKEYV2_H
939 #include <net/pfkeyv2.h>
942 #include <linux/pfkeyv2.h>
946 AC_MSG_CHECKING([for IPSEC_MODE_BEET])
948 [#include <sys/types.h>
949 #ifdef HAVE_NETIPSEC_IPSEC_H
950 #include <netipsec/ipsec.h>
951 #elif defined(HAVE_NETINET6_IPSEC_H)
952 #include <netinet6/ipsec.h>
955 #include <linux/ipsec.h>
957 [int mode = IPSEC_MODE_BEET;
959 [AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_IPSEC_MODE_BEET])],
960 [AC_MSG_RESULT([no])]
963 AC_MSG_CHECKING([for IPSEC_DIR_FWD])
965 [#include <sys/types.h>
966 #ifdef HAVE_NETIPSEC_IPSEC_H
967 #include <netipsec/ipsec.h>
968 #elif defined(HAVE_NETINET6_IPSEC_H)
969 #include <netinet6/ipsec.h>
972 #include <linux/ipsec.h>
974 [int dir = IPSEC_DIR_FWD;
976 [AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_IPSEC_DIR_FWD])],
977 [AC_MSG_RESULT([no])]
980 AC_MSG_CHECKING([for gcc atomic operations])
984 volatile int ref = 1;
985 __sync_fetch_and_add (&ref, 1);
986 __sync_sub_and_fetch (&ref, 1);
987 /* Make sure test fails if operations are not supported */
988 __sync_val_compare_and_swap(&ref, 1, 0);
992 [AC_MSG_RESULT([yes]); AC_DEFINE(HAVE_GCC_ATOMIC_OPERATIONS)],
993 [AC_MSG_RESULT([no])],
994 [AC_MSG_RESULT([no])])
997 [register_printf_function],
998 [AC_DEFINE(HAVE_PRINTF_HOOKS)],
1000 AC_MSG_NOTICE([printf does not support custom format specifiers!])
1005 if test x$vstr = xtrue; then
1006 AC_HAVE_LIBRARY([vstr],[LIBS="$LIBS"],[AC_MSG_ERROR([Vstr string library not found])])
1010 if test x$gmp = xtrue; then
1011 AC_HAVE_LIBRARY([gmp],[LIBS="$LIBS"],[AC_MSG_ERROR([GNU Multi Precision library gmp not found])])
1012 AC_MSG_CHECKING([gmp.h version >= 4.1.4])
1016 #if (__GNU_MP_VERSION*100 + __GNU_MP_VERSION_MINOR*10 + __GNU_MP_VERSION_PATCHLEVEL) < 414
1020 [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); AC_MSG_ERROR([No usable gmp.h found!])]
1024 if test x$ldap = xtrue; then
1025 AC_HAVE_LIBRARY([ldap],[LIBS="$LIBS"],[AC_MSG_ERROR([LDAP library ldap not found])])
1026 AC_HAVE_LIBRARY([lber],[LIBS="$LIBS"],[AC_MSG_ERROR([LDAP library lber not found])])
1027 AC_CHECK_HEADER([ldap.h],,[AC_MSG_ERROR([LDAP header ldap.h not found!])])
1030 if test x$curl = xtrue; then
1031 AC_HAVE_LIBRARY([curl],[LIBS="$LIBS"],[AC_MSG_ERROR([CURL library curl not found])])
1032 AC_CHECK_HEADER([curl/curl.h],,[AC_MSG_ERROR([CURL header curl/curl.h not found!])])
1035 if test x$xml = xtrue; then
1036 PKG_CHECK_MODULES(xml, [libxml-2.0])
1037 AC_SUBST(xml_CFLAGS)
1041 if test x$dumm = xtrue; then
1042 PKG_CHECK_MODULES(gtk, [gtk+-2.0 vte])
1043 AC_SUBST(gtk_CFLAGS)
1045 AC_CHECK_PROGS(RUBY, ruby)
1046 AC_MSG_CHECKING([for Ruby header files])
1047 if test -n "$RUBY"; then
1048 RUBYDIR=`($RUBY -rmkmf -e 'print Config::CONFIG[["archdir"]] || $archdir') 2>/dev/null`
1049 if test -n "$RUBYDIR"; then
1053 if test -r $i/ruby.h; then
1059 if test x"$RUBYINCLUDE" = xnone; then
1060 AC_MSG_ERROR([ruby.h not found])
1062 AC_SUBST(RUBYINCLUDE)
1064 AC_MSG_ERROR([unable to determine ruby configuration])
1067 AC_MSG_ERROR([don't know how to run ruby])
1071 if test x$fast = xtrue; then
1072 AC_HAVE_LIBRARY([neo_cgi],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver library neo_cgi not found!])])
1073 AC_HAVE_LIBRARY([neo_utl],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver library neo_utl not found!])])
1074 AC_HAVE_LIBRARY([z],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver dependency zlib not found!])])
1075 dnl autoconf does not like CamelCase!? How to fix this?
1076 dnl AC_CHECK_HEADER([ClearSilver/ClearSilver.h],,[AC_MSG_ERROR([ClearSilver header file ClearSilver/ClearSilver.h not found!])])
1078 AC_HAVE_LIBRARY([fcgi],[LIBS="$LIBS"],[AC_MSG_ERROR([FastCGI library fcgi not found!])])
1079 AC_CHECK_HEADER([fcgiapp.h],,[AC_MSG_ERROR([FastCGI header file fcgiapp.h not found!])])
1082 if test x$mysql = xtrue; then
1083 AC_HAVE_LIBRARY([mysqlclient_r],[LIBS="$LIBS"],[AC_MSG_ERROR([MySQL library mysqlclient_r not found])])
1084 AC_CHECK_HEADER([mysql/mysql.h],,[AC_MSG_ERROR([MySQL header mysql/mysql.h not found!])])
1087 if test x$sqlite = xtrue; then
1088 AC_HAVE_LIBRARY([sqlite3],[LIBS="$LIBS"],[AC_MSG_ERROR([SQLite library sqlite3 not found])])
1089 AC_CHECK_HEADER([sqlite3.h],,[AC_MSG_ERROR([SQLite header sqlite3.h not found!])])
1090 AC_MSG_CHECKING([sqlite3_prepare_v2])
1092 [#include <sqlite3.h>],
1094 void *test = sqlite3_prepare_v2;
1096 [AC_MSG_RESULT([yes])]; AC_DEFINE_UNQUOTED(HAVE_SQLITE3_PREPARE_V2, 1), [AC_MSG_RESULT([no])])
1097 AC_MSG_CHECKING([sqlite3.h version >= 3.3.1])
1099 [#include <sqlite3.h>],
1101 #if SQLITE_VERSION_NUMBER < 3003001
1105 [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); AC_MSG_ERROR([SQLite version >= 3.3.1 required!])])
1108 if test x$openssl = xtrue; then
1109 AC_HAVE_LIBRARY([crypto],[LIBS="$LIBS"],[AC_MSG_ERROR([OpenSSL crypto library not found])])
1110 AC_CHECK_HEADER([openssl/evp.h],,[AC_MSG_ERROR([OpenSSL header openssl/evp.h not found!])])
1113 if test x$gcrypt = xtrue; then
1114 AM_PATH_LIBGCRYPT(,,[AC_MSG_ERROR([libgcrypt not found!])])
1115 AC_MSG_CHECKING([gcrypt CAMELLIA cipher])
1117 [#include <gcrypt.h>],
1118 [enum gcry_cipher_algos alg = GCRY_CIPHER_CAMELLIA128;],
1119 [AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_GCRY_CIPHER_CAMELLIA])],
1120 [AC_MSG_RESULT([no])]
1124 if test x$uci = xtrue; then
1125 AC_HAVE_LIBRARY([uci],[LIBS="$LIBS"],[AC_MSG_ERROR([UCI library libuci not found])])
1126 AC_CHECK_HEADER([uci.h],,[AC_MSG_ERROR([UCI header uci.h not found!])])
1129 if test x$nm = xtrue; then
1130 PKG_CHECK_MODULES(nm, [NetworkManager libnm_glib_vpn gthread-2.0])
1135 if test x$eap_gtc = xtrue; then
1136 AC_HAVE_LIBRARY([pam],[LIBS="$LIBS"],[AC_MSG_ERROR([PAM library not found])])
1137 AC_CHECK_HEADER([security/pam_appl.h],,[AC_MSG_ERROR([PAM header security/pam_appl.h not found!])])
1140 if test x$capabilities = xlibcap; then
1141 AC_HAVE_LIBRARY([cap],[LIBS="$LIBS"],[AC_MSG_ERROR([libcap library not found])])
1142 AC_CHECK_HEADER([sys/capability.h],,[AC_MSG_ERROR([libcap header sys/capability.h not found!])])
1145 if test x$integrity_test = xtrue; then
1146 AC_MSG_CHECKING([for dladdr()])
1148 [#define _GNU_SOURCE
1149 #include <dlfcn.h>],
1150 [Dl_info info; dladdr(main, &info);],
1151 [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]);
1152 AC_MSG_ERROR([dladdr() not supported, required by integrity-test!])]
1154 AC_MSG_CHECKING([for dl_iterate_phdr()])
1156 [#define _GNU_SOURCE
1158 [dl_iterate_phdr((void*)0, (void*)0);],
1159 [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]);
1160 AC_MSG_ERROR([dl_iterate_phdr() not supported, required by integrity-test!])]
1164 dnl ======================================
1165 dnl collect all plugins for libstrongswan
1166 dnl ======================================
1168 libstrongswan_plugins=
1171 if test x$test_vectors = xtrue; then
1172 libstrongswan_plugins=${libstrongswan_plugins}" test-vectors"
1173 pluto_plugins=${pluto_plugins}" test-vectors"
1175 if test x$curl = xtrue; then
1176 libstrongswan_plugins=${libstrongswan_plugins}" curl"
1177 pluto_plugins=${pluto_plugins}" curl"
1179 if test x$ldap = xtrue; then
1180 libstrongswan_plugins=${libstrongswan_plugins}" ldap"
1181 pluto_plugins=${pluto_plugins}" ldap"
1183 if test x$aes = xtrue; then
1184 libstrongswan_plugins=${libstrongswan_plugins}" aes"
1185 pluto_plugins=${pluto_plugins}" aes"
1187 if test x$des = xtrue; then
1188 libstrongswan_plugins=${libstrongswan_plugins}" des"
1189 pluto_plugins=${pluto_plugins}" des"
1191 if test x$blowfish = xtrue; then
1192 libstrongswan_plugins=${libstrongswan_plugins}" blowfish"
1193 pluto_plugins=${pluto_plugins}" blowfish"
1195 if test x$sha1 = xtrue; then
1196 libstrongswan_plugins=${libstrongswan_plugins}" sha1"
1197 pluto_plugins=${pluto_plugins}" sha1"
1199 if test x$sha2 = xtrue; then
1200 libstrongswan_plugins=${libstrongswan_plugins}" sha2"
1201 pluto_plugins=${pluto_plugins}" sha2"
1203 if test x$md4 = xtrue; then
1204 libstrongswan_plugins=${libstrongswan_plugins}" md4"
1206 if test x$md5 = xtrue; then
1207 libstrongswan_plugins=${libstrongswan_plugins}" md5"
1208 pluto_plugins=${pluto_plugins}" md5"
1210 if test x$fips_prf = xtrue; then
1211 libstrongswan_plugins=${libstrongswan_plugins}" fips-prf"
1213 if test x$random = xtrue; then
1214 libstrongswan_plugins=${libstrongswan_plugins}" random"
1215 pluto_plugins=${pluto_plugins}" random"
1217 if test x$x509 = xtrue; then
1218 libstrongswan_plugins=${libstrongswan_plugins}" x509"
1220 if test x$pubkey = xtrue; then
1221 libstrongswan_plugins=${libstrongswan_plugins}" pubkey"
1222 pluto_plugins=${pluto_plugins}" pubkey"
1224 if test x$pkcs1 = xtrue; then
1225 libstrongswan_plugins=${libstrongswan_plugins}" pkcs1"
1226 pluto_plugins=${pluto_plugins}" pkcs1"
1228 if test x$pgp = xtrue; then
1229 libstrongswan_plugins=${libstrongswan_plugins}" pgp"
1230 pluto_plugins=${pluto_plugins}" pgp"
1232 if test x$dnskey = xtrue; then
1233 libstrongswan_plugins=${libstrongswan_plugins}" dnskey"
1234 pluto_plugins=${pluto_plugins}" dnskey"
1236 if test x$pem = xtrue; then
1237 libstrongswan_plugins=${libstrongswan_plugins}" pem"
1238 pluto_plugins=${pluto_plugins}" pem"
1240 if test x$mysql = xtrue; then
1241 libstrongswan_plugins=${libstrongswan_plugins}" mysql"
1243 if test x$sqlite = xtrue; then
1244 libstrongswan_plugins=${libstrongswan_plugins}" sqlite"
1246 if test x$padlock = xtrue; then
1247 libstrongswan_plugins=${libstrongswan_plugins}" padlock"
1249 if test x$openssl = xtrue; then
1250 libstrongswan_plugins=${libstrongswan_plugins}" openssl"
1251 pluto_plugins=${pluto_plugins}" openssl"
1253 if test x$gcrypt = xtrue; then
1254 libstrongswan_plugins=${libstrongswan_plugins}" gcrypt"
1255 pluto_plugins=${pluto_plugins}" gcrypt"
1257 if test x$xcbc = xtrue; then
1258 libstrongswan_plugins=${libstrongswan_plugins}" xcbc"
1260 if test x$hmac = xtrue; then
1261 libstrongswan_plugins=${libstrongswan_plugins}" hmac"
1262 pluto_plugins=${pluto_plugins}" hmac"
1264 if test x$agent = xtrue; then
1265 libstrongswan_plugins=${libstrongswan_plugins}" agent"
1267 if test x$gmp = xtrue; then
1268 libstrongswan_plugins=${libstrongswan_plugins}" gmp"
1269 pluto_plugins=${pluto_plugins}" gmp"
1272 AC_SUBST(libstrongswan_plugins)
1273 AC_SUBST(pluto_plugins)
1275 dnl =========================
1276 dnl set Makefile.am vars
1277 dnl =========================
1279 dnl libstrongswan plugins
1280 dnl =====================
1281 AM_CONDITIONAL(USE_TEST_VECTORS, test x$test_vectors = xtrue)
1282 AM_CONDITIONAL(USE_CURL, test x$curl = xtrue)
1283 AM_CONDITIONAL(USE_LDAP, test x$ldap = xtrue)
1284 AM_CONDITIONAL(USE_AES, test x$aes = xtrue)
1285 AM_CONDITIONAL(USE_DES, test x$des = xtrue)
1286 AM_CONDITIONAL(USE_BLOWFISH, test x$blowfish = xtrue)
1287 AM_CONDITIONAL(USE_MD4, test x$md4 = xtrue)
1288 AM_CONDITIONAL(USE_MD5, test x$md5 = xtrue)
1289 AM_CONDITIONAL(USE_SHA1, test x$sha1 = xtrue)
1290 AM_CONDITIONAL(USE_SHA2, test x$sha2 = xtrue)
1291 AM_CONDITIONAL(USE_FIPS_PRF, test x$fips_prf = xtrue)
1292 AM_CONDITIONAL(USE_GMP, test x$gmp = xtrue)
1293 AM_CONDITIONAL(USE_RANDOM, test x$random = xtrue)
1294 AM_CONDITIONAL(USE_X509, test x$x509 = xtrue)
1295 AM_CONDITIONAL(USE_PUBKEY, test x$pubkey = xtrue)
1296 AM_CONDITIONAL(USE_PKCS1, test x$pkcs1 = xtrue)
1297 AM_CONDITIONAL(USE_PGP, test x$pgp = xtrue)
1298 AM_CONDITIONAL(USE_DNSKEY, test x$dnskey = xtrue)
1299 AM_CONDITIONAL(USE_PEM, test x$pem = xtrue)
1300 AM_CONDITIONAL(USE_HMAC, test x$hmac = xtrue)
1301 AM_CONDITIONAL(USE_XCBC, test x$xcbc = xtrue)
1302 AM_CONDITIONAL(USE_MYSQL, test x$mysql = xtrue)
1303 AM_CONDITIONAL(USE_SQLITE, test x$sqlite = xtrue)
1304 AM_CONDITIONAL(USE_PADLOCK, test x$padlock = xtrue)
1305 AM_CONDITIONAL(USE_OPENSSL, test x$openssl = xtrue)
1306 AM_CONDITIONAL(USE_GCRYPT, test x$gcrypt = xtrue)
1307 AM_CONDITIONAL(USE_AGENT, test x$agent = xtrue)
1311 AM_CONDITIONAL(USE_STROKE, test x$stroke = xtrue)
1312 AM_CONDITIONAL(USE_MEDSRV, test x$medsrv = xtrue)
1313 AM_CONDITIONAL(USE_MEDCLI, test x$medcli = xtrue)
1314 AM_CONDITIONAL(USE_NM, test x$nm = xtrue)
1315 AM_CONDITIONAL(USE_UCI, test x$uci = xtrue)
1316 AM_CONDITIONAL(USE_SMP, test x$smp = xtrue)
1317 AM_CONDITIONAL(USE_SQL, test x$sql = xtrue)
1318 AM_CONDITIONAL(USE_UPDOWN, test x$updown = xtrue)
1319 AM_CONDITIONAL(USE_ATTR, test x$attr = xtrue)
1320 AM_CONDITIONAL(USE_RESOLV_CONF, test x$resolvconf = xtrue)
1321 AM_CONDITIONAL(USE_UNIT_TESTS, test x$unittest = xtrue)
1322 AM_CONDITIONAL(USE_LOAD_TESTS, test x$loadtest = xtrue)
1323 AM_CONDITIONAL(USE_EAP_SIM, test x$eap_sim = xtrue)
1324 AM_CONDITIONAL(USE_EAP_SIM_FILE, test x$eap_sim_file = xtrue)
1325 AM_CONDITIONAL(USE_EAP_IDENTITY, test x$eap_identity = xtrue)
1326 AM_CONDITIONAL(USE_EAP_MD5, test x$eap_md5 = xtrue)
1327 AM_CONDITIONAL(USE_EAP_GTC, test x$eap_gtc = xtrue)
1328 AM_CONDITIONAL(USE_EAP_AKA, test x$eap_aka = xtrue)
1329 AM_CONDITIONAL(USE_EAP_MSCHAPV2, test x$eap_mschapv2 = xtrue)
1330 AM_CONDITIONAL(USE_EAP_RADIUS, test x$eap_radius = xtrue)
1331 AM_CONDITIONAL(USE_KERNEL_NETLINK, test x$kernel_netlink = xtrue)
1332 AM_CONDITIONAL(USE_KERNEL_PFKEY, test x$kernel_pfkey = xtrue)
1333 AM_CONDITIONAL(USE_KERNEL_PFROUTE, test x$kernel_pfroute = xtrue)
1334 AM_CONDITIONAL(USE_KERNEL_KLIPS, test x$kernel_klips = xtrue)
1338 AM_CONDITIONAL(USE_SMARTCARD, test x$smartcard = xtrue)
1339 AM_CONDITIONAL(USE_CISCO_QUIRKS, test x$cisco_quirks = xtrue)
1340 AM_CONDITIONAL(USE_LEAK_DETECTIVE, test x$leak_detective = xtrue)
1341 AM_CONDITIONAL(USE_LOCK_PROFILER, test x$lock_profiler = xtrue)
1342 AM_CONDITIONAL(USE_NAT_TRANSPORT, test x$nat_transport = xtrue)
1343 AM_CONDITIONAL(USE_VENDORID, test x$vendor_id = xtrue)
1344 AM_CONDITIONAL(USE_XAUTH_VID, test x$xauth_vid = xtrue)
1345 AM_CONDITIONAL(USE_DUMM, test x$dumm = xtrue)
1346 AM_CONDITIONAL(USE_FAST, test x$fast = xtrue)
1347 AM_CONDITIONAL(USE_MANAGER, test x$manager = xtrue)
1348 AM_CONDITIONAL(USE_ME, test x$me = xtrue)
1349 AM_CONDITIONAL(USE_INTEGRITY_TEST, test x$integrity_test = xtrue)
1350 AM_CONDITIONAL(USE_CAPABILITIES, test x$capabilities = xlibcap)
1351 AM_CONDITIONAL(USE_PLUTO, test x$pluto = xtrue)
1352 AM_CONDITIONAL(USE_THREADS, test x$threads = xtrue)
1353 AM_CONDITIONAL(USE_CHARON, test x$charon = xtrue)
1354 AM_CONDITIONAL(USE_TOOLS, test x$tools = xtrue)
1355 AM_CONDITIONAL(USE_SCRIPTS, test x$scripts = xtrue)
1356 AM_CONDITIONAL(USE_LIBSTRONGSWAN, test x$charon = xtrue -o x$pluto = xtrue -o x$tools = xtrue)
1357 AM_CONDITIONAL(USE_FILE_CONFIG, test x$pluto = xtrue -o x$stroke = xtrue)
1358 AM_CONDITIONAL(USE_VSTR, test x$vstr = xtrue)
1360 dnl ==============================
1361 dnl set global definitions
1362 dnl ==============================
1364 if test x$me = xtrue; then
1367 if test x$capabilities = xlibcap; then
1368 AC_DEFINE(CAPABILITIES)
1371 dnl ==============================
1373 dnl ==============================
1378 src/include/Makefile
1379 src/libstrongswan/Makefile
1380 src/libstrongswan/plugins/aes/Makefile
1381 src/libstrongswan/plugins/des/Makefile
1382 src/libstrongswan/plugins/blowfish/Makefile
1383 src/libstrongswan/plugins/md4/Makefile
1384 src/libstrongswan/plugins/md5/Makefile
1385 src/libstrongswan/plugins/sha1/Makefile
1386 src/libstrongswan/plugins/sha2/Makefile
1387 src/libstrongswan/plugins/fips_prf/Makefile
1388 src/libstrongswan/plugins/gmp/Makefile
1389 src/libstrongswan/plugins/random/Makefile
1390 src/libstrongswan/plugins/hmac/Makefile
1391 src/libstrongswan/plugins/xcbc/Makefile
1392 src/libstrongswan/plugins/x509/Makefile
1393 src/libstrongswan/plugins/pubkey/Makefile
1394 src/libstrongswan/plugins/pkcs1/Makefile
1395 src/libstrongswan/plugins/pgp/Makefile
1396 src/libstrongswan/plugins/dnskey/Makefile
1397 src/libstrongswan/plugins/pem/Makefile
1398 src/libstrongswan/plugins/curl/Makefile
1399 src/libstrongswan/plugins/ldap/Makefile
1400 src/libstrongswan/plugins/mysql/Makefile
1401 src/libstrongswan/plugins/sqlite/Makefile
1402 src/libstrongswan/plugins/padlock/Makefile
1403 src/libstrongswan/plugins/openssl/Makefile
1404 src/libstrongswan/plugins/gcrypt/Makefile
1405 src/libstrongswan/plugins/agent/Makefile
1406 src/libstrongswan/plugins/test_vectors/Makefile
1407 src/libfreeswan/Makefile
1411 src/charon/plugins/eap_aka/Makefile
1412 src/charon/plugins/eap_identity/Makefile
1413 src/charon/plugins/eap_md5/Makefile
1414 src/charon/plugins/eap_gtc/Makefile
1415 src/charon/plugins/eap_sim/Makefile
1416 src/charon/plugins/eap_sim_file/Makefile
1417 src/charon/plugins/eap_mschapv2/Makefile
1418 src/charon/plugins/eap_radius/Makefile
1419 src/charon/plugins/kernel_netlink/Makefile
1420 src/charon/plugins/kernel_pfkey/Makefile
1421 src/charon/plugins/kernel_pfroute/Makefile
1422 src/charon/plugins/kernel_klips/Makefile
1423 src/charon/plugins/smp/Makefile
1424 src/charon/plugins/sql/Makefile
1425 src/charon/plugins/medsrv/Makefile
1426 src/charon/plugins/medcli/Makefile
1427 src/charon/plugins/nm/Makefile
1428 src/charon/plugins/uci/Makefile
1429 src/charon/plugins/stroke/Makefile
1430 src/charon/plugins/updown/Makefile
1431 src/charon/plugins/attr/Makefile
1432 src/charon/plugins/resolv_conf/Makefile
1433 src/charon/plugins/unit_tester/Makefile
1434 src/charon/plugins/load_tester/Makefile
1437 src/starter/Makefile
1438 src/_updown/Makefile
1439 src/_updown_espmark/Makefile
1440 src/_copyright/Makefile
1442 src/scepclient/Makefile
1445 src/dumm/ext/extconf.rb
1446 src/libfast/Makefile
1447 src/manager/Makefile
1449 src/checksum/Makefile