]> git.ipfire.org Git - thirdparty/strongswan.git/blame - configure.in
added PDF support for CHILD_SAs
[thirdparty/strongswan.git] / configure.in
CommitLineData
f2c2d395
MW
1dnl configure.in for linux strongSwan
2dnl Copyright (C) 2006 Martin Willi
3dnl Hochschule fuer Technik Rapperswil
4dnl
5dnl This program is free software; you can redistribute it and/or modify it
6dnl under the terms of the GNU General Public License as published by the
7dnl Free Software Foundation; either version 2 of the License, or (at your
8dnl option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9dnl
10dnl This program is distributed in the hope that it will be useful, but
11dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13dnl for more details.
14
15dnl ===========================
16dnl initialize & set some vars
17dnl ===========================
18
83e60eb2 19AC_INIT(strongSwan,4.1.2)
5e5f0bd4 20AM_INIT_AUTOMAKE(tar-ustar)
f2c2d395 21AC_C_BIGENDIAN
f2c2d395 22AC_SUBST(confdir, '${sysconfdir}')
f2c2d395 23
db26d00e
MW
24dnl =================================
25dnl check --enable-xxx & --with-xxx
26dnl =================================
27
28
29AC_ARG_WITH(
30 [default-pkcs11],
f27f6296 31 AS_HELP_STRING([--with-default-pkcs11=lib],[set the default PKCS11 library other than "/usr/lib/opensc-pkcs11.so"]),
db26d00e
MW
32 [AC_DEFINE_UNQUOTED(PKCS11_DEFAULT_LIB, "$withval")],
33 [AC_DEFINE_UNQUOTED(PKCS11_DEFAULT_LIB, "/usr/lib/opensc-pkcs11.so")]
34)
35
195307b5 36AC_ARG_WITH(
7b0c588a 37 [xauth-module],
195307b5
AS
38 AS_HELP_STRING([--with-xauth-module=lib],[set the path to the XAUTH module]),
39 [AC_DEFINE_UNQUOTED(XAUTH_DEFAULT_LIB, "$withval")],
40)
41
db26d00e
MW
42AC_ARG_WITH(
43 [random-device],
f27f6296 44 AS_HELP_STRING([--with-random-device=dev],[set the device for real random data other than "/dev/random"]),
db26d00e
MW
45 [AC_DEFINE_UNQUOTED(DEV_RANDOM, "$withval")],
46 [AC_DEFINE_UNQUOTED(DEV_RANDOM, "/dev/random")]
47)
c60c7694
MW
48AC_ARG_WITH(
49 [resolv-conf],
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")]
53)
db26d00e
MW
54
55AC_ARG_WITH(
56 [urandom-device],
f27f6296 57 AS_HELP_STRING([--with-urandom-device=dev],[set the device for pseudo random data other than "/dev/urandom"]),
db26d00e
MW
58 [AC_DEFINE_UNQUOTED(DEV_URANDOM, "$withval")],
59 [AC_DEFINE_UNQUOTED(DEV_URANDOM, "/dev/urandom")]
60)
f2c2d395 61
f27f6296
MW
62AC_ARG_WITH(
63 [ipsecdir],
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")]
67)
68
69AC_ARG_WITH(
70 [piddir],
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")]
74)
75
76AC_ARG_WITH(
77 [eapdir],
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")]
81)
82
d560c849
MW
83AC_ARG_WITH(
84 [sim-reader],
85 AS_HELP_STRING([--with-sim-reader=library.so],[library containing the sim_run_alg() function for EAP-SIM]),
86 [AC_DEFINE_UNQUOTED(SIM_READER_LIB, "$withval")]
87)
88
f2c2d395
MW
89AC_ARG_ENABLE(
90 [http],
91 AS_HELP_STRING([--enable-http],[enable OCSP and fetching of Certificates and CRLs over HTTP (default is NO). Requires libcurl.]),
7b0c588a
AS
92 [if test x$enableval = xyes; then
93 http=true
94 AC_DEFINE(LIBCURL)
95 fi]
f2c2d395
MW
96)
97AM_CONDITIONAL(USE_LIBCURL, test x$http = xtrue)
98
99AC_ARG_ENABLE(
100 [ldap],
db26d00e 101 AS_HELP_STRING([--enable-ldap],[enable fetching of CRLs from LDAP (default is NO). Requires openLDAP.]),
7b0c588a
AS
102 [if test x$enableval = xyes; then
103 ldap=true
2c0e0f4f 104 AC_DEFINE(LIBLDAP)
7b0c588a 105 fi]
f2c2d395 106)
2c0e0f4f 107AM_CONDITIONAL(USE_LIBLDAP, test x$ldap = xtrue)
f2c2d395
MW
108
109AC_ARG_ENABLE(
db26d00e
MW
110 [smartcard],
111 AS_HELP_STRING([--enable-smartcard],[enable smartcard support (default is NO).]),
7b0c588a
AS
112 [if test x$enableval = xyes; then
113 smartcard=true
114 AC_DEFINE(SMARTCARD)
115 fi]
f2c2d395
MW
116)
117AM_CONDITIONAL(USE_SMARTCARD, test x$smartcard = xtrue)
118
2df45a73 119AC_ARG_ENABLE(
7b0c588a 120 [cisco-quirks],
2df45a73 121 AS_HELP_STRING([--enable-cisco-quirks],[enable support of Cisco VPN client (default is NO).]),
7b0c588a
AS
122 [if test x$enableval = xyes; then
123 cisco_quirks=true
124 fi]
2df45a73
AS
125)
126AM_CONDITIONAL(USE_CISCO_QUIRKS, test x$cisco_quirks = xtrue)
127
f2c2d395
MW
128AC_ARG_ENABLE(
129 [leak-detective],
130 AS_HELP_STRING([--enable-leak-detective],[enable malloc hooks to find memory leaks (default is NO).]),
7b0c588a
AS
131 [if test x$enableval = xyes; then
132 leak_detective=true
133 fi]
f2c2d395
MW
134)
135AM_CONDITIONAL(USE_LEAK_DETECTIVE, test x$leak_detective = xtrue)
136
b0f24449
MW
137AC_ARG_ENABLE(
138 [eap-sim],
139 AS_HELP_STRING([--enable-eap-sim],[build SIM authenication module for EAP (default is NO).]),
7b0c588a
AS
140 [if test x$enableval = xyes; then
141 eap_sim=true
142 fi]
b0f24449
MW
143)
144AM_CONDITIONAL(BUILD_EAP_SIM, test x$eap_sim = xtrue)
145
7b0c588a
AS
146AC_ARG_ENABLE(
147 [nat-transport],
148 AS_HELP_STRING([--enable-nat-transport],[enable NAT traversal with IPsec transport mode (default is NO).]),
149 [if test x$enableval = xyes; then
150 nat_transport=true
151 fi]
152)
153AM_CONDITIONAL(USE_NAT_TRANSPORT, test x$nat_transport = xtrue)
154
155AC_ARG_ENABLE(
156 [vendor-id],
157 AS_HELP_STRING([--disable-vendor-id],[disable the sending of the strongSwan vendor ID (default is NO).]),
158 [if test x$enableval = xyes; then
159 vendor_id=true
160 else
161 vendor_id=false
162 fi],
163 vendor_id=true
164)
165AM_CONDITIONAL(USE_VENDORID, test x$vendor_id = xtrue)
166
f2c2d395
MW
167dnl =========================
168dnl check required programs
169dnl =========================
170
171AC_PROG_INSTALL
172AC_PROG_LIBTOOL
173AC_PROG_LEX
174AC_PROG_YACC
4986554f 175AC_PROG_CC()
298b06c2
MW
176AC_PATH_PROG([GPERF], [gperf], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
177AC_PATH_PROG([PERL], [perl], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
f2c2d395
MW
178
179dnl ==========================
180dnl check required libraries
181dnl ==========================
182
4986554f 183AC_CHECK_FUNCS(backtrace)
61dd20f9 184AC_CHECK_FUNCS(getifaddrs)
e696757c 185
c09d8959 186AC_HAVE_LIBRARY([gmp],[LIBS="$LIBS"],[AC_MSG_ERROR([GNU Multi Precision library gmp not found])])
f2c2d395 187if test "$ldap" = "true"; then
c09d8959
AS
188 AC_HAVE_LIBRARY([ldap],[LIBS="$LIBS"],[AC_MSG_ERROR([LDAP enabled, but library ldap not found])])
189 AC_HAVE_LIBRARY([lber],[LIBS="$LIBS"],[AC_MSG_ERROR([LDAP enabled, but library lber not found])])
f2c2d395
MW
190fi
191if test "$http" = "true"; then
c09d8959 192 AC_HAVE_LIBRARY([curl],[LIBS="$LIBS"],[AC_MSG_ERROR([HTTP enabled, but library curl not found])])
f2c2d395
MW
193fi
194
195
196dnl =============================
197dnl check required header files
198dnl =============================
199
200
201AC_MSG_CHECKING([gmp.h version >= 4.1.4])
202AC_TRY_COMPILE(
203 [#include "gmp.h"],
204 [
205 #if (__GNU_MP_VERSION*100 + __GNU_MP_VERSION_MINOR*10 + __GNU_MP_VERSION_PATCHLEVEL) < 414
206 #error bad gmp
207 #endif
208 ],
209 [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); AC_MSG_ERROR([No usable gmp.h found!])]
210)
211if test "$ldap" = "true"; then
212 AC_CHECK_HEADER([ldap.h],,[AC_MSG_ERROR([LDAP enabled, but ldap.h not found!])])
213fi
214if test "$http" = "true"; then
215 AC_CHECK_HEADER([curl/curl.h],,[AC_MSG_ERROR([HTTP enabled, but curl.h not found!])])
216fi
217
218dnl ==============================
219dnl build Makefiles
220dnl ==============================
221
222AC_OUTPUT(
223 Makefile
224 src/Makefile
225 src/libstrongswan/Makefile
226 src/libcrypto/Makefile
227 src/libfreeswan/Makefile
228 src/pluto/Makefile
229 src/whack/Makefile
230 src/charon/Makefile
92ee45a0 231dnl src/charon/testing/Makefile
f2c2d395
MW
232 src/stroke/Makefile
233 src/ipsec/Makefile
234 src/starter/Makefile
235 src/_updown/Makefile
236 src/_updown_espmark/Makefile
237 src/_copyright/Makefile
238 src/openac/Makefile
239 src/scepclient/Makefile
240)