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

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines