ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/configure.ac
(Generate patch)

Comparing gvpe/configure.ac (file contents):
Revision 1.5 by pcg, Sun Apr 13 15:19:36 2003 UTC vs.
Revision 1.12 by pcg, Tue Oct 14 20:02:35 2003 UTC

1dnl Process this file with autoconf to produce a configure script. 1dnl Process this file with autoconf to produce a configure script.
2 2
3AC_PREREQ(2.57) 3AC_PREREQ(2.57)
4AC_INIT(src/vped.C) 4AC_INIT(src/vped.C)
5AC_CANONICAL_TARGET 5AC_CANONICAL_TARGET
6AM_INIT_AUTOMAKE(vpe, 0.1) 6AM_INIT_AUTOMAKE(vpe, 1.2)
7AM_CONFIG_HEADER(config.h) 7AM_CONFIG_HEADER(config.h)
8AM_MAINTAINER_MODE 8AM_MAINTAINER_MODE
9 9
10AH_TOP([ 10AH_TOP([
11#ifndef CONFIG_H__ 11#ifndef CONFIG_H__
61AC_PROG_MAKE_SET 61AC_PROG_MAKE_SET
62AC_PROG_RANLIB 62AC_PROG_RANLIB
63 63
64AC_ISC_POSIX 64AC_ISC_POSIX
65 65
66m4_if([ 66AC_ARG_ENABLE(iftype,
67 [AC_HELP_STRING(--enable-iftype[=TYPE/SUBTYPE], [
68 Use kernel/net device interface TYPE/SUBTYPE.
69 Working combinations are:
70 "native/linux" "tincd/linux" "tincd/freebsd";
71 Untested combinations are:
72 "tincd/netbsd" "tincd/darwin" "tincd/solaris"
73 "tincd/openbsd" "tincd/cygwin";
74 Broken combinations are:
75 "native/cygwin";
76 The default is to autodetect.
77 ])],
78 [
79 IFTYPE=`echo $enableval | sed s%/.*%%`
80 IFSUBTYPE=`echo $enableval | sed s%.*/%%`
81 ]
82)
83
67dnl Check and set OS 84dnl Check and set OS
85AC_MSG_CHECKING(for kernel networking interface type)
68 86
87if test "x$IFTYPE" = "x"; then
69case $target_os in 88 case $target_os in
70 *linux*) 89 *linux*)
90 IFTYPE=native
91 IFSUBTYPE=linux
71 AC_DEFINE(HAVE_LINUX, 1, [Linux]) 92 AC_DEFINE(HAVE_LINUX, 1, [Linux])
72 [ rm -f src/device.c; ln -sf linux/device.c src/device.c ] 93 ;;
73 ;;
74 *freebsd*) 94 *freebsd*)
95 IFTYPE=tincd
96 IFSUBTYPE=freebsd
75 AC_DEFINE(HAVE_FREEBSD, 1, [FreeBSD]) 97 AC_DEFINE(HAVE_FREEBSD, 1, [FreeBSD])
76 [ rm -f src/device.c; ln -sf freebsd/device.c src/device.c ] 98 ;;
77 ;;
78 *darwin*) 99 *darwin*)
100 IFTYPE=tincd
101 IFSUBTYPE=darwin
79 AC_DEFINE(HAVE_DARWIN, 1, [Darwin (MacOS/X)]) 102 AC_DEFINE(HAVE_DARWIN, 1, [Darwin (MacOS/X)])
80 [ rm -f src/device.c; ln -sf darwin/device.c src/device.c ] 103 ;;
81 ;;
82 *solaris*) 104 *solaris*)
105 IFTYPE=tincd
106 IFSUBTYPE=solaris
83 AC_DEFINE(HAVE_SOLARIS, 1, [Solaris/SunOS]) 107 AC_DEFINE(HAVE_SOLARIS, 1, [Solaris/SunOS])
84 [ rm -f src/device.c; ln -sf solaris/device.c src/device.c ] 108 ;;
85 ;;
86 *openbsd*) 109 *openbsd*)
110 IFTYPE=tincd
111 IFSUBTYPE=openbsd
87 AC_DEFINE(HAVE_OPENBSD, 1, [OpenBSD]) 112 AC_DEFINE(HAVE_OPENBSD, 1, [OpenBSD])
88 [ rm -f src/device.c; ln -sf openbsd/device.c src/device.c ] 113 ;;
89 ;;
90 *netbsd*) 114 *netbsd*)
115 IFTYPE=tincd
116 IFSUBTYPE=netbsd
91 AC_DEFINE(HAVE_NETBSD, 1, [NetBSD]) 117 AC_DEFINE(HAVE_NETBSD, 1, [NetBSD])
92 [ rm -f src/device.c; ln -sf netbsd/device.c src/device.c ] 118 ;;
93 ;;
94 *cygwin*) 119 *cygwin*)
120 IFTYPE=tincd
121 IFSUBTYPE=cygwin
95 AC_DEFINE(HAVE_CYGWIN, 1, [Cygwin]) 122 AC_DEFINE(HAVE_CYGWIN, 1, [Cygwin])
96 [ rm -f src/device.c; ln -sf cygwin/device.c src/device.c ] 123 ;;
97 ;; 124 *)
98 *)
99 AC_MSG_ERROR("Unknown operating system.") 125 AC_MSG_ERROR("Unknown operating system.")
100 ;; 126 ;;
101esac 127 esac
102]) 128fi
129AC_MSG_RESULT($IFTYPE/$IFSUBTYPE)
130AC_SUBST(IFTYPE,$IFTYPE)
131AC_SUBST(IFSUBTYPE,$IFSUBTYPE)
103 132
104AC_CACHE_SAVE 133AC_CACHE_SAVE
105 134
106dnl Checks for libraries. 135dnl Checks for libraries.
107 136
108AC_LANG(C++) 137AC_LANG(C++)
109AC_CHECK_HEADERS(ext/hash_map) 138AC_CHECK_HEADERS(ext/hash_map)
110 139
111dnl Checks for header files. 140dnl Checks for header files.
112AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h malloc.h stdint.h strings.h syslog.h unistd.h \ 141AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h malloc.h stdint.h strings.h syslog.h unistd.h \
113 sys/file.h sys/ioctl.h sys/param.h sys/time.h netinet/in_systm.h cygwin.h]) 142 sys/file.h sys/ioctl.h sys/param.h sys/time.h netinet/in_systm.h cygwin.h arpa/inet.h \
143 sys/poll.h sys/mman.h netinet/in.h])
114AC_CHECK_HEADERS([net/ethernet.h net/if.h netinet/ip.h netinet/tcp.h], [], [], 144AC_CHECK_HEADERS([net/ethernet.h net/if.h netinet/ip.h netinet/tcp.h netinet/in_systm.h], [], [],
145[
115 [#include <sys/types.h> 146#include <sys/types.h>
116 #include <sys/socket.h> 147#include <sys/socket.h>
148#ifdef HAVE_NETINET_IN_H
149# include <netinet/in.h>
150#endif
151#ifdef HAVE_ARPA_INET_H
152# include <arpa/inet.h>
153#endif
117 #ifdef HAVE_NETINET_IN_SYSTM_H 154#ifdef HAVE_NETINET_IN_SYSTM_H
118 #include <netinet/in_systm.h> 155# include <netinet/in_systm.h>
119 #endif]) 156#endif
157])
120 158
121dnl Checks for typedefs, structures, and compiler characteristics. 159dnl Checks for typedefs, structures, and compiler characteristics.
122AC_C_CONST 160AC_C_CONST
123AC_TYPE_PID_T 161AC_TYPE_PID_T
124AC_TYPE_SIZE_T 162AC_TYPE_SIZE_T
157 195
158AC_LANG_PUSH(C) 196AC_LANG_PUSH(C)
159 197
160AC_HEADER_STDC 198AC_HEADER_STDC
161 199
200dnl argl, could somebody catapult darwin into the 21st century???
162AC_CHECK_FUNCS(asprintf daemon get_current_dir_name putenv select strerror strsignal strtol unsetenv mlockall) 201AC_CHECK_FUNCS(asprintf daemon get_current_dir_name putenv select strerror strsignal strtol unsetenv mlockall poll)
163 202
164AC_FUNC_ALLOCA 203AC_FUNC_ALLOCA
165 204
166dnl Support for SunOS 205dnl Support for SunOS
167 206
179AC_CACHE_SAVE 218AC_CACHE_SAVE
180 219
181dnl These are defined in files in m4/ 220dnl These are defined in files in m4/
182tinc_TUNTAP 221tinc_TUNTAP
183tinc_OPENSSL 222tinc_OPENSSL
223CXXFLAGS="-I$openssl_include"
184dnl tinc_ZLIB 224dnl tinc_ZLIB
185 225
186AC_ARG_ENABLE(rohc, 226AC_ARG_ENABLE(rohc,
187 [AC_HELP_STRING(--enable-rohc, [enable robust header compression (rfc3095).])], 227 [AC_HELP_STRING(--enable-rohc, [enable robust header compression (rfc3095).])],
188 [ 228 [
202 echo 242 echo
203 ] 243 ]
204) 244)
205 245
206AC_ARG_ENABLE(icmp, 246AC_ARG_ENABLE(icmp,
207 [AC_HELP_STRING(--enable-icmp, [enable icmp protocol support.])], 247 [AC_HELP_STRING(--enable-icmp, [enable icmp protocol support (default disabled).])],
208 AC_DEFINE_UNQUOTED(ENABLE_ICMP, 1, [ICMP protocol support.]) 248 AC_DEFINE_UNQUOTED(ENABLE_ICMP, 1, [ICMP protocol support.])
209) 249)
210 250
211AC_ARG_ENABLE(tcp, 251AC_ARG_ENABLE(tcp,
212 [AC_HELP_STRING(--enable-tcp, [enable tcp protocol support.])], 252 [AC_HELP_STRING(--enable-tcp, [enable tcp protocol support (default disabled).])],
213 AC_DEFINE_UNQUOTED(ENABLE_TCP, 1, [TCP protocol support.]) 253 AC_DEFINE_UNQUOTED(ENABLE_TCP, 1, [TCP protocol support.])
214) 254)
215 255
216AC_ARG_ENABLE(http-proxy, 256AC_ARG_ENABLE(http-proxy,
217 [AC_HELP_STRING(--enable-http-proxy, [enable http proxy connect support.])], 257 [AC_HELP_STRING(--enable-http-proxy, [enable http proxy connect support (default disabled).])],
218 AC_DEFINE_UNQUOTED(ENABLE_HTTP_PROXY, 1, [http proxy connect support.]) 258 AC_DEFINE_UNQUOTED(ENABLE_HTTP_PROXY, 1, [http proxy connect support.])
219) 259)
220 260
221HMAC=16 dnl see also the AC_HELP_STRING 261HMAC=12 dnl see also the AC_HELP_STRING
222AC_ARG_ENABLE(hmac-length, 262AC_ARG_ENABLE(hmac-length,
223 [AC_HELP_STRING(--enable-hmac-length=BYTES, [use a hmac of length BYTES bytes (default 16). Allowed values are 4, 8, 12, 16.])], 263 [AC_HELP_STRING(--enable-hmac-length=BYTES, [use a hmac of length BYTES bytes (default 12). Allowed values are 4, 8, 12, 16.])],
224 HMAC=$enableval 264 HMAC=$enableval
225) 265)
226AC_DEFINE_UNQUOTED(HMACLENGTH, $HMAC, [Size of HMAC in each packet in bytes.]) 266AC_DEFINE_UNQUOTED(HMACLENGTH, $HMAC, [Size of HMAC in each packet in bytes.])
227 267
228RAND=8 dnl see also the AC_HELP_STRING 268RAND=8 dnl see also the AC_HELP_STRING
250 290
251CIPHER=bf_cbc 291CIPHER=bf_cbc
252AC_ARG_ENABLE(cipher, 292AC_ARG_ENABLE(cipher,
253 [AC_HELP_STRING(--enable-cipher, [ 293 [AC_HELP_STRING(--enable-cipher, [
254 Select the symmetric cipher (default "bf"). Must be one of 294 Select the symmetric cipher (default "bf"). Must be one of
255 "bf" (blowfish), "aes-128", "aes-192" or "aes-256".])], 295 "bf" (blowfish), "aes-128" (rijndael), "aes-192" or "aes-256".])],
256 if test "x$enableval" = xbf ; then CIPHER=bf_cbc ; fi 296 if test "x$enableval" = xbf ; then CIPHER=bf_cbc ; fi
257 if test "x$enableval" = xaes-128; then CIPHER=aes_128_cbc; fi 297 if test "x$enableval" = xaes-128; then CIPHER=aes_128_cbc; fi
258 if test "x$enableval" = xaes-192; then CIPHER=aes_192_cbc; fi 298 if test "x$enableval" = xaes-192; then CIPHER=aes_192_cbc; fi
259 if test "x$enableval" = xaes-256; then CIPHER=aes_256_cbc; fi 299 if test "x$enableval" = xaes-256; then CIPHER=aes_256_cbc; fi
260) 300)
262 302
263DIGEST=sha1 303DIGEST=sha1
264AC_ARG_ENABLE(digest, 304AC_ARG_ENABLE(digest,
265 [AC_HELP_STRING(--enable-digest, [ 305 [AC_HELP_STRING(--enable-digest, [
266 Select the digets algorithm to use (default "sha1"). Must be one of 306 Select the digets algorithm to use (default "sha1"). Must be one of
267 "sha1", "ripemd160", "md4" or "md5".])], 307 "sha1", "ripemd160", "md5" or "md4" (insecure).])],
268 if test "x$enableval" = xsha1 ; then DIGEST=sha1 ; fi 308 if test "x$enableval" = xsha1 ; then DIGEST=sha1 ; fi
269 if test "x$enableval" = xripemd160; then DIGEST=ripemd160; fi 309 if test "x$enableval" = xripemd160; then DIGEST=ripemd160; fi
310 if test "x$enableval" = xmd5 ; then DIGEST=md5 ; fi
270 if test "x$enableval" = xmd4 ; then DIGEST=md4 ; fi 311 if test "x$enableval" = xmd4 ; then DIGEST=md4 ; fi
271 if test "x$enableval" = xmd5 ; then DIGEST=md5 ; fi
272) 312)
273AC_DEFINE_UNQUOTED(ENABLE_DIGEST, EVP_${DIGEST}, [Select the digest algorithm to use.]) 313AC_DEFINE_UNQUOTED(ENABLE_DIGEST, EVP_${DIGEST}, [Select the digest algorithm to use.])
274
275TRUST=1
276m4_if([
277AC_ARG_ENABLE(trust,
278 [AC_HELP_STRING(--enable-trust, [
279 Make authentication faster but allow decoding by all hosts of a VPN.
280 Use this when the VPN hosts DO trust each other and you don't care
281 wether man-in-the-middle sniffing attacks are possible by admins
282 of other VPN hosts. On pentiums or similar machines this can cut down
283 the time for reconnects by 0.4 seconds or more.])],
284 if test "x$enableval" = xyes; then
285 TRUST=1
286 fi
287)
288])
289AC_DEFINE_UNQUOTED(ENABLE_TRUST, $TRUST, [Faster, but VPN hosts may sniff each others data.])
290 314
291if $CXX -v --help 2>&1 | grep -q fno-rtti; then 315if $CXX -v --help 2>&1 | grep -q fno-rtti; then
292 CXXFLAGS="$CXXFLAGS -fno-rtti" 316 CXXFLAGS="$CXXFLAGS -fno-rtti"
293fi 317fi
294 318
308 332
309echo 333echo
310echo "***" 334echo "***"
311echo "*** Configuration Summary" 335echo "*** Configuration Summary"
312echo "***" 336echo "***"
337echo "*** Kernel Iface: $IFTYPE/$IFSUBTYPE"
313echo "*** Cipher used: $CIPHER" 338echo "*** Cipher used: $CIPHER"
314echo "*** Digest used: $DIGEST" 339echo "*** Digest used: $DIGEST"
315echo "*** HMAC length: $HMAC" 340echo "*** HMAC length: $HMAC"
316echo "*** RAND used: $RAND" 341echo "*** RAND used: $RAND"
317echo "*** Max. MTU: $MTU" 342echo "*** Max. MTU: $MTU"
318echo "*** Compression: $COMPRESS" 343echo "*** Compression: $COMPRESS"
319dnl echo "*** Trusted Mode: $TRUST"
320echo "***" 344echo "***"
345
346if test "x$DIGEST" = xmd4; then
347echo "*** WARNING"
348echo "*** The digest you have chosen ($DIGEST) is known to be insecure"
349echo "***"
350fi
351
321echo 352echo
322 353
323]) 354])
324 355
325AC_SUBST(INCLUDES) 356AC_SUBST(INCLUDES)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines