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

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines