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.0.0)
22 AC_SUBST(ipsecdir, '${libexecdir}/ipsec')
23 AC_SUBST(confdir, '${sysconfdir}')
24 AC_SUBST(piddir, '/var/run')
26 dnl =================================
27 dnl check --enable-xxx & --with-xxx
28 dnl =================================
33 AS_HELP_STRING([--with-default-pkcs11=lib],[set the default PKCS11 library other than /usr/lib/opensc-pkcs11.so]),
34 [AC_DEFINE_UNQUOTED(PKCS11_DEFAULT_LIB, "$withval")],
35 [AC_DEFINE_UNQUOTED(PKCS11_DEFAULT_LIB, "/usr/lib/opensc-pkcs11.so")]
40 AS_HELP_STRING([--with-random-device=dev],[set the device for real random data other than /dev/random]),
41 [AC_DEFINE_UNQUOTED(DEV_RANDOM, "$withval")],
42 [AC_DEFINE_UNQUOTED(DEV_RANDOM, "/dev/random")]
47 AS_HELP_STRING([--with-urandom-device=dev],[set the device for pseudo random data other than /dev/urandom]),
48 [AC_DEFINE_UNQUOTED(DEV_URANDOM, "$withval")],
49 [AC_DEFINE_UNQUOTED(DEV_URANDOM, "/dev/urandom")]
54 AS_HELP_STRING([--enable-http],[enable OCSP and fetching of Certificates and CRLs over HTTP (default is NO). Requires libcurl.]),
58 AM_CONDITIONAL(USE_LIBCURL, test x$http = xtrue)
62 AS_HELP_STRING([--enable-ldap],[enable fetching of CRLs from LDAP (default is NO). Requires openLDAP.]),
64 AC_DEFINE(LDAP_VER, 3)
66 AM_CONDITIONAL(USE_LDAP, test x$ldap = xtrue)
70 AS_HELP_STRING([--enable-smartcard],[enable smartcard support (default is NO).]),
74 AM_CONDITIONAL(USE_SMARTCARD, test x$smartcard = xtrue)
78 AS_HELP_STRING([--enable-leak-detective],[enable malloc hooks to find memory leaks (default is NO).]),
80 AC_DEFINE(LEAK_DETECTIVE)
82 AM_CONDITIONAL(USE_LEAK_DETECTIVE, test x$leak_detective = xtrue)
84 dnl =========================
85 dnl check required programs
86 dnl =========================
94 dnl ==========================
95 dnl check required libraries
96 dnl ==========================
98 AC_HAVE_LIBRARY([gmp],,[AC_MSG_ERROR([GNU Multi Precision library gmp not found])])
99 if test "$ldap" = "true"; then
100 AC_HAVE_LIBRARY([ldap],,[AC_MSG_ERROR([LDAP enabled, but library ldap not found])])
101 AC_HAVE_LIBRARY([lber],,[AC_MSG_ERROR([LDAP enabled, but library lber not found])])
103 if test "$http" = "true"; then
104 AC_HAVE_LIBRARY([curl],,[AC_MSG_ERROR([HTTP enabled, but library curl not found])])
108 dnl =============================
109 dnl check required header files
110 dnl =============================
113 AC_MSG_CHECKING([gmp.h version >= 4.1.4])
117 #if (__GNU_MP_VERSION*100 + __GNU_MP_VERSION_MINOR*10 + __GNU_MP_VERSION_PATCHLEVEL) < 414
121 [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); AC_MSG_ERROR([No usable gmp.h found!])]
123 if test "$ldap" = "true"; then
124 AC_CHECK_HEADER([ldap.h],,[AC_MSG_ERROR([LDAP enabled, but ldap.h not found!])])
126 if test "$http" = "true"; then
127 AC_CHECK_HEADER([curl/curl.h],,[AC_MSG_ERROR([HTTP enabled, but curl.h not found!])])
130 dnl ==============================
132 dnl ==============================
137 src/libstrongswan/Makefile
138 src/libcrypto/Makefile
139 src/libfreeswan/Makefile
147 src/_updown_espmark/Makefile
148 src/_copyright/Makefile
150 src/scepclient/Makefile