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.1.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-ipsecdir=dir],[installation path for ipsec tools other than "libexecdir/ipsec"]),
65 [AC_SUBST(ipsecdir, "$withval")],
66 [AC_SUBST(ipsecdir, "${libexecdir}/ipsec")]
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-eapdir=dir],[path for pluggable EAP modules other than "ipsecdir/eap"]),
79 [AC_SUBST(eapdir, "$withval")],
80 [AC_SUBST(eapdir, "${ipsecdir}/eap")]
85 AS_HELP_STRING([--enable-http],[enable OCSP and fetching of Certificates and CRLs over HTTP (default is NO). Requires libcurl.]),
89 AM_CONDITIONAL(USE_LIBCURL, test x$http = xtrue)
93 AS_HELP_STRING([--enable-ldap],[enable fetching of CRLs from LDAP (default is NO). Requires openLDAP.]),
95 AC_DEFINE(LDAP_VER, 3)
97 AM_CONDITIONAL(USE_LDAP, test x$ldap = xtrue)
101 AS_HELP_STRING([--enable-smartcard],[enable smartcard support (default is NO).]),
105 AM_CONDITIONAL(USE_SMARTCARD, test x$smartcard = xtrue)
109 AS_HELP_STRING([--enable-cisco-quirks],[enable support of Cisco VPN client (default is NO).]),
111 AC_DEFINE(CISCO_QUIRKS)
113 AM_CONDITIONAL(USE_CISCO_QUIRKS, test x$cisco_quirks = xtrue)
117 AS_HELP_STRING([--enable-leak-detective],[enable malloc hooks to find memory leaks (default is NO).]),
120 AM_CONDITIONAL(USE_LEAK_DETECTIVE, test x$leak_detective = xtrue)
124 AS_HELP_STRING([--enable-eap-sim],[build SIM authenication module for EAP (default is NO).]),
127 AM_CONDITIONAL(BUILD_EAP_SIM, test x$eap_sim = xtrue)
129 dnl =========================
130 dnl check required programs
131 dnl =========================
138 AC_PATH_PROG([GPERF], [gperf], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
139 AC_PATH_PROG([PERL], [perl], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
141 dnl ==========================
142 dnl check required libraries
143 dnl ==========================
145 AC_CHECK_FUNCS(backtrace)
146 AC_CHECK_FUNCS(getifaddrs)
148 AC_HAVE_LIBRARY([gmp],[LIBS="$LIBS"],[AC_MSG_ERROR([GNU Multi Precision library gmp not found])])
149 if test "$ldap" = "true"; then
150 AC_HAVE_LIBRARY([ldap],[LIBS="$LIBS"],[AC_MSG_ERROR([LDAP enabled, but library ldap not found])])
151 AC_HAVE_LIBRARY([lber],[LIBS="$LIBS"],[AC_MSG_ERROR([LDAP enabled, but library lber not found])])
153 if test "$http" = "true"; then
154 AC_HAVE_LIBRARY([curl],[LIBS="$LIBS"],[AC_MSG_ERROR([HTTP enabled, but library curl not found])])
158 dnl =============================
159 dnl check required header files
160 dnl =============================
163 AC_MSG_CHECKING([gmp.h version >= 4.1.4])
167 #if (__GNU_MP_VERSION*100 + __GNU_MP_VERSION_MINOR*10 + __GNU_MP_VERSION_PATCHLEVEL) < 414
171 [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); AC_MSG_ERROR([No usable gmp.h found!])]
173 if test "$ldap" = "true"; then
174 AC_CHECK_HEADER([ldap.h],,[AC_MSG_ERROR([LDAP enabled, but ldap.h not found!])])
176 if test "$http" = "true"; then
177 AC_CHECK_HEADER([curl/curl.h],,[AC_MSG_ERROR([HTTP enabled, but curl.h not found!])])
180 dnl ==============================
182 dnl ==============================
187 src/libstrongswan/Makefile
188 src/libcrypto/Makefile
189 src/libfreeswan/Makefile
193 dnl src/charon/testing/Makefile
198 src/_updown_espmark/Makefile
199 src/_copyright/Makefile
201 src/scepclient/Makefile