]> git.ipfire.org Git - people/ms/strongswan.git/blame - configure.in
added XAUTH client states
[people/ms/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
a0bf4274 19AC_INIT(strongSwan,4.0.6)
5e5f0bd4 20AM_INIT_AUTOMAKE(tar-ustar)
f2c2d395
MW
21AC_C_BIGENDIAN
22AC_SUBST(ipsecdir, '${libexecdir}/ipsec')
23AC_SUBST(confdir, '${sysconfdir}')
24AC_SUBST(piddir, '/var/run')
25
db26d00e
MW
26dnl =================================
27dnl check --enable-xxx & --with-xxx
28dnl =================================
29
30
31AC_ARG_WITH(
32 [default-pkcs11],
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")]
36)
37
38AC_ARG_WITH(
39 [random-device],
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")]
43)
44
45AC_ARG_WITH(
46 [urandom-device],
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")]
50)
f2c2d395
MW
51
52AC_ARG_ENABLE(
53 [http],
54 AS_HELP_STRING([--enable-http],[enable OCSP and fetching of Certificates and CRLs over HTTP (default is NO). Requires libcurl.]),
55 http=true
56 AC_DEFINE(LIBCURL)
57)
58AM_CONDITIONAL(USE_LIBCURL, test x$http = xtrue)
59
60AC_ARG_ENABLE(
61 [ldap],
db26d00e 62 AS_HELP_STRING([--enable-ldap],[enable fetching of CRLs from LDAP (default is NO). Requires openLDAP.]),
f2c2d395 63 ldap=true
db26d00e 64 AC_DEFINE(LDAP_VER, 3)
f2c2d395
MW
65)
66AM_CONDITIONAL(USE_LDAP, test x$ldap = xtrue)
67
68AC_ARG_ENABLE(
db26d00e
MW
69 [smartcard],
70 AS_HELP_STRING([--enable-smartcard],[enable smartcard support (default is NO).]),
f2c2d395
MW
71 smartcard=true
72 AC_DEFINE(SMARTCARD)
f2c2d395
MW
73)
74AM_CONDITIONAL(USE_SMARTCARD, test x$smartcard = xtrue)
75
76AC_ARG_ENABLE(
77 [leak-detective],
78 AS_HELP_STRING([--enable-leak-detective],[enable malloc hooks to find memory leaks (default is NO).]),
79 leak_detective=true
f2c2d395
MW
80)
81AM_CONDITIONAL(USE_LEAK_DETECTIVE, test x$leak_detective = xtrue)
82
83dnl =========================
84dnl check required programs
85dnl =========================
86
87AC_PROG_INSTALL
88AC_PROG_LIBTOOL
89AC_PROG_LEX
90AC_PROG_YACC
91AC_PROG_CC(intel)
298b06c2
MW
92AC_PATH_PROG([GPERF], [gperf], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
93AC_PATH_PROG([PERL], [perl], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
f2c2d395
MW
94
95dnl ==========================
96dnl check required libraries
97dnl ==========================
98
e696757c
MW
99AC_CHECK_FUNCS(backtrace getifaddrs)
100
c09d8959 101AC_HAVE_LIBRARY([gmp],[LIBS="$LIBS"],[AC_MSG_ERROR([GNU Multi Precision library gmp not found])])
f2c2d395 102if test "$ldap" = "true"; then
c09d8959
AS
103 AC_HAVE_LIBRARY([ldap],[LIBS="$LIBS"],[AC_MSG_ERROR([LDAP enabled, but library ldap not found])])
104 AC_HAVE_LIBRARY([lber],[LIBS="$LIBS"],[AC_MSG_ERROR([LDAP enabled, but library lber not found])])
f2c2d395
MW
105fi
106if test "$http" = "true"; then
c09d8959 107 AC_HAVE_LIBRARY([curl],[LIBS="$LIBS"],[AC_MSG_ERROR([HTTP enabled, but library curl not found])])
f2c2d395
MW
108fi
109
110
111dnl =============================
112dnl check required header files
113dnl =============================
114
115
116AC_MSG_CHECKING([gmp.h version >= 4.1.4])
117AC_TRY_COMPILE(
118 [#include "gmp.h"],
119 [
120 #if (__GNU_MP_VERSION*100 + __GNU_MP_VERSION_MINOR*10 + __GNU_MP_VERSION_PATCHLEVEL) < 414
121 #error bad gmp
122 #endif
123 ],
124 [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); AC_MSG_ERROR([No usable gmp.h found!])]
125)
126if test "$ldap" = "true"; then
127 AC_CHECK_HEADER([ldap.h],,[AC_MSG_ERROR([LDAP enabled, but ldap.h not found!])])
128fi
129if test "$http" = "true"; then
130 AC_CHECK_HEADER([curl/curl.h],,[AC_MSG_ERROR([HTTP enabled, but curl.h not found!])])
131fi
132
133dnl ==============================
134dnl build Makefiles
135dnl ==============================
136
137AC_OUTPUT(
138 Makefile
139 src/Makefile
140 src/libstrongswan/Makefile
141 src/libcrypto/Makefile
142 src/libfreeswan/Makefile
143 src/pluto/Makefile
144 src/whack/Makefile
145 src/charon/Makefile
92ee45a0 146dnl src/charon/testing/Makefile
f2c2d395
MW
147 src/stroke/Makefile
148 src/ipsec/Makefile
149 src/starter/Makefile
150 src/_updown/Makefile
151 src/_updown_espmark/Makefile
152 src/_copyright/Makefile
153 src/openac/Makefile
154 src/scepclient/Makefile
155)