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

Comparing gvpe/configure.ac (file contents):
Revision 1.2 by pcg, Wed Apr 2 21:38:18 2003 UTC vs.
Revision 1.14 by pcg, Wed Oct 15 01:35:45 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"
71 "tincd/linux"
72 "tincd/freebsd";
73 Untested combinations are:
74 "tincd/netbsd"
75 "tincd/darwin"
76 "tincd/solaris"
77 "tincd/openbsd";
78 Broken combinations are:
79 "tincd/cygwin";
80 The default is to autodetect.
81 ])],
82 [
83 IFTYPE=`echo $enableval | sed s%/.*%%`
84 IFSUBTYPE=`echo $enableval | sed s%.*/%%`
85 ]
86)
87
67dnl Check and set OS 88dnl Check and set OS
89AC_MSG_CHECKING(for kernel networking interface type)
68 90
91if test "x$IFTYPE" = "x"; then
69case $target_os in 92 case $target_os in
70 *linux*) 93 *linux*)
94 IFTYPE=native
95 IFSUBTYPE=linux
71 AC_DEFINE(HAVE_LINUX, 1, [Linux]) 96 AC_DEFINE(HAVE_LINUX, 1, [Linux])
72 [ rm -f src/device.c; ln -sf linux/device.c src/device.c ] 97 ;;
73 ;;
74 *freebsd*) 98 *freebsd*)
99 IFTYPE=tincd
100 IFSUBTYPE=freebsd
75 AC_DEFINE(HAVE_FREEBSD, 1, [FreeBSD]) 101 AC_DEFINE(HAVE_FREEBSD, 1, [FreeBSD])
76 [ rm -f src/device.c; ln -sf freebsd/device.c src/device.c ] 102 ;;
77 ;;
78 *darwin*) 103 *darwin*)
104 IFTYPE=tincd
105 IFSUBTYPE=darwin
79 AC_DEFINE(HAVE_DARWIN, 1, [Darwin (MacOS/X)]) 106 AC_DEFINE(HAVE_DARWIN, 1, [Darwin (MacOS/X)])
80 [ rm -f src/device.c; ln -sf darwin/device.c src/device.c ] 107 ;;
81 ;;
82 *solaris*) 108 *solaris*)
109 IFTYPE=tincd
110 IFSUBTYPE=solaris
83 AC_DEFINE(HAVE_SOLARIS, 1, [Solaris/SunOS]) 111 AC_DEFINE(HAVE_SOLARIS, 1, [Solaris/SunOS])
84 [ rm -f src/device.c; ln -sf solaris/device.c src/device.c ] 112 ;;
85 ;;
86 *openbsd*) 113 *openbsd*)
114 IFTYPE=tincd
115 IFSUBTYPE=openbsd
87 AC_DEFINE(HAVE_OPENBSD, 1, [OpenBSD]) 116 AC_DEFINE(HAVE_OPENBSD, 1, [OpenBSD])
88 [ rm -f src/device.c; ln -sf openbsd/device.c src/device.c ] 117 ;;
89 ;;
90 *netbsd*) 118 *netbsd*)
119 IFTYPE=tincd
120 IFSUBTYPE=netbsd
91 AC_DEFINE(HAVE_NETBSD, 1, [NetBSD]) 121 AC_DEFINE(HAVE_NETBSD, 1, [NetBSD])
92 [ rm -f src/device.c; ln -sf netbsd/device.c src/device.c ] 122 ;;
93 ;;
94 *cygwin*) 123 *cygwin*)
124 IFTYPE=tincd
125 IFSUBTYPE=cygwin
95 AC_DEFINE(HAVE_CYGWIN, 1, [Cygwin]) 126 AC_DEFINE(HAVE_CYGWIN, 1, [Cygwin])
96 [ rm -f src/device.c; ln -sf cygwin/device.c src/device.c ] 127 ;;
97 ;; 128 *)
98 *)
99 AC_MSG_ERROR("Unknown operating system.") 129 AC_MSG_ERROR("Unknown operating system.")
100 ;; 130 ;;
101esac 131 esac
102]) 132fi
133AC_MSG_RESULT($IFTYPE/$IFSUBTYPE)
134AC_SUBST(IFTYPE,$IFTYPE)
135AC_SUBST(IFSUBTYPE,$IFSUBTYPE)
103 136
104AC_CACHE_SAVE 137AC_CACHE_SAVE
105 138
106dnl Checks for libraries. 139dnl Checks for libraries.
107 140
108AC_LANG(C++) 141AC_LANG(C++)
109AC_CHECK_HEADERS(ext/hash_map) 142AC_CHECK_HEADERS(ext/hash_map)
110 143
111dnl Checks for header files. 144dnl Checks for header files.
112AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h malloc.h stdint.h strings.h syslog.h unistd.h \ 145AC_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]) 146 sys/file.h sys/ioctl.h sys/param.h sys/time.h netinet/in_systm.h sys/cygwin.h arpa/inet.h \
147 sys/poll.h sys/mman.h netinet/in.h])
114AC_CHECK_HEADERS([net/ethernet.h net/if.h netinet/ip.h netinet/tcp.h], [], [], 148AC_CHECK_HEADERS([net/ethernet.h net/if.h netinet/ip.h netinet/tcp.h netinet/in_systm.h], [], [],
149[
115 [#include <sys/types.h> 150#include <sys/types.h>
116 #include <sys/socket.h> 151#include <sys/socket.h>
152#ifdef HAVE_NETINET_IN_H
153# include <netinet/in.h>
154#endif
155#ifdef HAVE_ARPA_INET_H
156# include <arpa/inet.h>
157#endif
117 #ifdef HAVE_NETINET_IN_SYSTM_H 158#ifdef HAVE_NETINET_IN_SYSTM_H
118 #include <netinet/in_systm.h> 159# include <netinet/in_systm.h>
119 #endif]) 160#endif
161])
120 162
121dnl Checks for typedefs, structures, and compiler characteristics. 163dnl Checks for typedefs, structures, and compiler characteristics.
122AC_C_CONST 164AC_C_CONST
123AC_TYPE_PID_T 165AC_TYPE_PID_T
124AC_TYPE_SIZE_T 166AC_TYPE_SIZE_T
157 199
158AC_LANG_PUSH(C) 200AC_LANG_PUSH(C)
159 201
160AC_HEADER_STDC 202AC_HEADER_STDC
161 203
204dnl 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) 205AC_CHECK_FUNCS(asprintf daemon get_current_dir_name putenv select strerror strsignal strtol unsetenv mlockall poll)
163 206
164AC_FUNC_ALLOCA 207AC_FUNC_ALLOCA
165 208
166dnl Support for SunOS 209dnl Support for SunOS
167 210
179AC_CACHE_SAVE 222AC_CACHE_SAVE
180 223
181dnl These are defined in files in m4/ 224dnl These are defined in files in m4/
182tinc_TUNTAP 225tinc_TUNTAP
183tinc_OPENSSL 226tinc_OPENSSL
227CXXFLAGS="$CXXFLAGS -I$openssl_include"
184dnl tinc_ZLIB 228dnl tinc_ZLIB
185 229
230AC_ARG_ENABLE(rohc,
231 [AC_HELP_STRING(--enable-rohc, [enable robust header compression (rfc3095).])],
232 [
233 echo
234 echo "**********************************************************************"
235 echo "**********************************************************************"
236 echo "**** --enable-rohc not yet implemented *******************************"
237 echo "**********************************************************************"
238 echo "**** uuh sorry, I am such an ass, but I didn't find any rfc3095 (ROHC)"
239 echo "**** implementation to be used in GPL code on the web."
240 echo "**** so this option is just a fake. Please implement one and send it"
241 echo "**** to me ;)"
242 echo "**********************************************************************"
243 echo "**********************************************************************"
244 echo "**********************************************************************"
245 echo "**********************************************************************"
246 echo
247 ]
248)
249
250AC_ARG_ENABLE(icmp,
251 [AC_HELP_STRING(--enable-icmp, [enable icmp protocol support (default disabled).])],
252 AC_DEFINE_UNQUOTED(ENABLE_ICMP, 1, [ICMP protocol support.])
253)
254
186AC_ARG_ENABLE(tcp, 255AC_ARG_ENABLE(tcp,
187 [AC_HELP_STRING(--enable-tcp, [enable tcp protocol support.])], 256 [AC_HELP_STRING(--enable-tcp, [enable tcp protocol support (default disabled).])],
188 AC_DEFINE_UNQUOTED(ENABLE_TCP, 1, [TCP protocol support.]) 257 AC_DEFINE_UNQUOTED(ENABLE_TCP, 1, [TCP protocol support.])
189) 258)
190 259
260AC_ARG_ENABLE(http-proxy,
261 [AC_HELP_STRING(--enable-http-proxy, [enable http proxy connect support (default disabled).])],
262 AC_DEFINE_UNQUOTED(ENABLE_HTTP_PROXY, 1, [http proxy connect support.])
263)
264
191HMAC=16 dnl see also the AC_HELP_STRING 265HMAC=12 dnl see also the AC_HELP_STRING
192AC_ARG_ENABLE(hmac-length, 266AC_ARG_ENABLE(hmac-length,
193 [AC_HELP_STRING(--enable-hmac-length=BYTES, [use a hmac of length BYTES bytes (default 16). Allowed values are 4, 8, 12, 16.])], 267 [AC_HELP_STRING(--enable-hmac-length=BYTES, [use a hmac of length BYTES bytes (default 12). Allowed values are 4, 8, 12, 16.])],
194 HMAC=$enableval 268 HMAC=$enableval
195) 269)
196AC_DEFINE_UNQUOTED(HMACLENGTH, $HMAC, [Size of HMAC in each packet in bytes.]) 270AC_DEFINE_UNQUOTED(HMACLENGTH, $HMAC, [Size of HMAC in each packet in bytes.])
197 271
198RAND=8 dnl see also the AC_HELP_STRING 272RAND=8 dnl see also the AC_HELP_STRING
220 294
221CIPHER=bf_cbc 295CIPHER=bf_cbc
222AC_ARG_ENABLE(cipher, 296AC_ARG_ENABLE(cipher,
223 [AC_HELP_STRING(--enable-cipher, [ 297 [AC_HELP_STRING(--enable-cipher, [
224 Select the symmetric cipher (default "bf"). Must be one of 298 Select the symmetric cipher (default "bf"). Must be one of
225 "bf" (blowfish), "aes-128", "aes-192" or "aes-256".])], 299 "bf" (blowfish), "aes-128" (rijndael), "aes-192" or "aes-256".])],
226 if test "x$enableval" = xbf ; then CIPHER=bf_cbc ; fi 300 if test "x$enableval" = xbf ; then CIPHER=bf_cbc ; fi
227 if test "x$enableval" = xaes-128; then CIPHER=aes_128_cbc; fi 301 if test "x$enableval" = xaes-128; then CIPHER=aes_128_cbc; fi
228 if test "x$enableval" = xaes-192; then CIPHER=aes_192_cbc; fi 302 if test "x$enableval" = xaes-192; then CIPHER=aes_192_cbc; fi
229 if test "x$enableval" = xaes-256; then CIPHER=aes_256_cbc; fi 303 if test "x$enableval" = xaes-256; then CIPHER=aes_256_cbc; fi
230) 304)
232 306
233DIGEST=sha1 307DIGEST=sha1
234AC_ARG_ENABLE(digest, 308AC_ARG_ENABLE(digest,
235 [AC_HELP_STRING(--enable-digest, [ 309 [AC_HELP_STRING(--enable-digest, [
236 Select the digets algorithm to use (default "sha1"). Must be one of 310 Select the digets algorithm to use (default "sha1"). Must be one of
237 "sha1", "ripemd160", "md4" or "md5".])], 311 "sha1", "ripemd160", "md5" or "md4" (insecure).])],
238 if test "x$enableval" = xsha1 ; then DIGEST=sha1 ; fi 312 if test "x$enableval" = xsha1 ; then DIGEST=sha1 ; fi
239 if test "x$enableval" = xripemd160; then DIGEST=ripemd160; fi 313 if test "x$enableval" = xripemd160; then DIGEST=ripemd160; fi
314 if test "x$enableval" = xmd5 ; then DIGEST=md5 ; fi
240 if test "x$enableval" = xmd4 ; then DIGEST=md4 ; fi 315 if test "x$enableval" = xmd4 ; then DIGEST=md4 ; fi
241 if test "x$enableval" = xmd5 ; then DIGEST=md5 ; fi
242) 316)
243AC_DEFINE_UNQUOTED(ENABLE_DIGEST, EVP_${DIGEST}, [Select the digest algorithm to use.]) 317AC_DEFINE_UNQUOTED(ENABLE_DIGEST, EVP_${DIGEST}, [Select the digest algorithm to use.])
244
245TRUST=1
246m4_if([
247AC_ARG_ENABLE(trust,
248 [AC_HELP_STRING(--enable-trust, [
249 Make authentication faster but allow decoding by all hosts of a VPN.
250 Use this when the VPN hosts DO trust each other and you don't care
251 wether man-in-the-middle sniffing attacks are possible by admins
252 of other VPN hosts. On pentiums or similar machines this can cut down
253 the time for reconnects by 0.4 seconds or more.])],
254 if test "x$enableval" = xyes; then
255 TRUST=1
256 fi
257)
258])
259AC_DEFINE_UNQUOTED(ENABLE_TRUST, $TRUST, [Faster, but VPN hosts may sniff each others data.])
260 318
261if $CXX -v --help 2>&1 | grep -q fno-rtti; then 319if $CXX -v --help 2>&1 | grep -q fno-rtti; then
262 CXXFLAGS="$CXXFLAGS -fno-rtti" 320 CXXFLAGS="$CXXFLAGS -fno-rtti"
263fi 321fi
264 322
278 336
279echo 337echo
280echo "***" 338echo "***"
281echo "*** Configuration Summary" 339echo "*** Configuration Summary"
282echo "***" 340echo "***"
341echo "*** Kernel Iface: $IFTYPE/$IFSUBTYPE"
283echo "*** Cipher used: $CIPHER" 342echo "*** Cipher used: $CIPHER"
284echo "*** Digest used: $DIGEST" 343echo "*** Digest used: $DIGEST"
285echo "*** HMAC length: $HMAC" 344echo "*** HMAC length: $HMAC"
286echo "*** RAND used: $RAND" 345echo "*** RAND used: $RAND"
287echo "*** Max. MTU: $MTU" 346echo "*** Max. MTU: $MTU"
288echo "*** Compression: $COMPRESS" 347echo "*** Compression: $COMPRESS"
289dnl echo "*** Trusted Mode: $TRUST"
290echo "***" 348echo "***"
349
350if test "x$DIGEST" = xmd4; then
351echo "*** WARNING"
352echo "*** The digest you have chosen ($DIGEST) is known to be insecure"
353echo "***"
354fi
355
291echo 356echo
292 357
293]) 358])
294 359
295AC_SUBST(INCLUDES) 360AC_SUBST(INCLUDES)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines