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

Comparing gvpe/configure.ac (file contents):
Revision 1.7 by pcg, Sat Oct 4 13:20:06 2003 UTC vs.
Revision 1.8 by pcg, Tue Oct 14 03:22:09 2003 UTC

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";
71 Untested combinations are:
72 "tincd/freebsd" "tincd/netbsd" "tincd/darwin" "tincd/solaris"
73 "tincd/openbsd" "tincd/netbsd" "tincd/cygwin";
74 Broken combinations are:
75 "native/cygwin";
76 The default is autodetected.
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 netinet/in.h])
114AC_CHECK_HEADERS([net/ethernet.h net/if.h netinet/ip.h netinet/tcp.h], [], [], 143AC_CHECK_HEADERS([net/ethernet.h net/if.h netinet/ip.h netinet/tcp.h netinet/in_systm.h], [], [],
144[
115 [#include <sys/types.h> 145#include <sys/types.h>
116 #include <sys/socket.h> 146#include <sys/socket.h>
147#ifdef HAVE_NETINET_IN_H
148# include <netinet/in.h>
149#endif
150#ifdef HAVE_ARPA_INET_H
151# include <arpa/inet.h>
152#endif
117 #ifdef HAVE_NETINET_IN_SYSTM_H 153#ifdef HAVE_NETINET_IN_SYSTM_H
118 #include <netinet/in_systm.h> 154# include <netinet/in_systm.h>
119 #endif]) 155#endif
156])
120 157
121dnl Checks for typedefs, structures, and compiler characteristics. 158dnl Checks for typedefs, structures, and compiler characteristics.
122AC_C_CONST 159AC_C_CONST
123AC_TYPE_PID_T 160AC_TYPE_PID_T
124AC_TYPE_SIZE_T 161AC_TYPE_SIZE_T
270 if test "x$enableval" = xmd4 ; then DIGEST=md4 ; fi 307 if test "x$enableval" = xmd4 ; then DIGEST=md4 ; fi
271 if test "x$enableval" = xmd5 ; then DIGEST=md5 ; fi 308 if test "x$enableval" = xmd5 ; then DIGEST=md5 ; fi
272) 309)
273AC_DEFINE_UNQUOTED(ENABLE_DIGEST, EVP_${DIGEST}, [Select the digest algorithm to use.]) 310AC_DEFINE_UNQUOTED(ENABLE_DIGEST, EVP_${DIGEST}, [Select the digest algorithm to use.])
274 311
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
291if $CXX -v --help 2>&1 | grep -q fno-rtti; then 312if $CXX -v --help 2>&1 | grep -q fno-rtti; then
292 CXXFLAGS="$CXXFLAGS -fno-rtti" 313 CXXFLAGS="$CXXFLAGS -fno-rtti"
293fi 314fi
294 315
295if $CXX -v --help 2>&1 | grep -q fexceptions; then 316if $CXX -v --help 2>&1 | grep -q fexceptions; then
308 329
309echo 330echo
310echo "***" 331echo "***"
311echo "*** Configuration Summary" 332echo "*** Configuration Summary"
312echo "***" 333echo "***"
334echo "*** Kernel Iface: $IFTYPE/$IFSUBTYPE"
313echo "*** Cipher used: $CIPHER" 335echo "*** Cipher used: $CIPHER"
314echo "*** Digest used: $DIGEST" 336echo "*** Digest used: $DIGEST"
315echo "*** HMAC length: $HMAC" 337echo "*** HMAC length: $HMAC"
316echo "*** RAND used: $RAND" 338echo "*** RAND used: $RAND"
317echo "*** Max. MTU: $MTU" 339echo "*** Max. MTU: $MTU"
318echo "*** Compression: $COMPRESS" 340echo "*** Compression: $COMPRESS"
319dnl echo "*** Trusted Mode: $TRUST"
320echo "***" 341echo "***"
342
343if test "x$DIGEST" = xmd4; then
344echo "*** WARNING"
345echo "*** The digest you have chosen ($DIGEST) is known to be insecure"
346echo "***"
347fi
348
321echo 349echo
322 350
323]) 351])
324 352
325AC_SUBST(INCLUDES) 353AC_SUBST(INCLUDES)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines