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

Comparing gvpe/configure.ac (file contents):
Revision 1.8 by pcg, Tue Oct 14 03:22:09 2003 UTC vs.
Revision 1.26 by pcg, Mon May 10 18:57:07 2004 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, 1.0) 6AM_INIT_AUTOMAKE(vpe, 1.6)
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__
44 44
45# Enable GNU extensions. 45# Enable GNU extensions.
46# Define this here, not in acconfig's @TOP@ section, since definitions 46# Define this here, not in acconfig's @TOP@ section, since definitions
47# in the latter don't make it into the configure-time tests. 47# in the latter don't make it into the configure-time tests.
48AC_DEFINE([_GNU_SOURCE], 1, [Enable GNU extenstions]) 48AC_DEFINE([_GNU_SOURCE], 1, [Enable GNU extenstions])
49AC_DEFINE([__USE_BSD], 1, [Enable BSD extensions]) 49
50# do NOT define POSIX_SOURCE, sicne this clashes with many BSDs
51dnl AC_DEFINE([_POSIX_SOURCE], 1, [Enable POSIX 1003.1 extensions])
52dnl AC_DEFINE([_XOPEN_SOURCE], 500, [Enable XOPEN extensions])
50 53
51ALL_LINGUAS="" 54ALL_LINGUAS=""
52 55
53dnl Checks for programs. 56dnl Checks for programs.
54AC_PROG_CC 57AC_PROG_CC
59AC_PROG_INSTALL 62AC_PROG_INSTALL
60AC_PROG_LN_S 63AC_PROG_LN_S
61AC_PROG_MAKE_SET 64AC_PROG_MAKE_SET
62AC_PROG_RANLIB 65AC_PROG_RANLIB
63 66
64AC_ISC_POSIX
65
66AC_ARG_ENABLE(iftype, 67AC_ARG_ENABLE(iftype,
67 [AC_HELP_STRING(--enable-iftype[=TYPE/SUBTYPE], [ 68 [AC_HELP_STRING(--enable-iftype[=TYPE/SUBTYPE], [
68 Use kernel/net device interface TYPE/SUBTYPE. 69 Use kernel/net device interface TYPE/SUBTYPE.
69 Working combinations are: 70 Working combinations are:
70 "native/linux" "tincd/linux"; 71 "native/linux"
72 "tincd/linux"
73 "tincd/freebsd"
74 "tincd/openbsd"
75 "tincd/darwin"
76 "native/cygwin";
71 Untested combinations are: 77 Untested combinations are:
72 "tincd/freebsd" "tincd/netbsd" "tincd/darwin" "tincd/solaris" 78 "tincd/netbsd"
73 "tincd/openbsd" "tincd/netbsd" "tincd/cygwin"; 79 "tincd/solaris"
80 "tincd/mingw";
74 Broken combinations are: 81 Broken combinations are:
75 "native/cygwin"; 82 "tincd/cygwin";
76 The default is autodetected. 83 The default is to autodetect.
77 ])], 84 ])],
78 [ 85 [
79 IFTYPE=`echo $enableval | sed s%/.*%%` 86 IFTYPE=`echo $enableval | sed s%/.*%%`
80 IFSUBTYPE=`echo $enableval | sed s%.*/%%` 87 IFSUBTYPE=`echo $enableval | sed s%.*/%%`
81 ] 88 ]
115 IFTYPE=tincd 122 IFTYPE=tincd
116 IFSUBTYPE=netbsd 123 IFSUBTYPE=netbsd
117 AC_DEFINE(HAVE_NETBSD, 1, [NetBSD]) 124 AC_DEFINE(HAVE_NETBSD, 1, [NetBSD])
118 ;; 125 ;;
119 *cygwin*) 126 *cygwin*)
120 IFTYPE=tincd 127 IFTYPE=native
121 IFSUBTYPE=cygwin 128 IFSUBTYPE=cygwin
122 AC_DEFINE(HAVE_CYGWIN, 1, [Cygwin]) 129 AC_DEFINE(HAVE_CYGWIN, 1, [Cygwin])
123 ;; 130 ;;
124 *) 131 *)
125 AC_MSG_ERROR("Unknown operating system.") 132 AC_MSG_ERROR("Unknown operating system.")
127 esac 134 esac
128fi 135fi
129AC_MSG_RESULT($IFTYPE/$IFSUBTYPE) 136AC_MSG_RESULT($IFTYPE/$IFSUBTYPE)
130AC_SUBST(IFTYPE,$IFTYPE) 137AC_SUBST(IFTYPE,$IFTYPE)
131AC_SUBST(IFSUBTYPE,$IFSUBTYPE) 138AC_SUBST(IFSUBTYPE,$IFSUBTYPE)
139AC_DEFINE_UNQUOTED(IFTYPE,"$IFTYPE",[kernel interface type])
140AC_DEFINE_UNQUOTED(IFSUBTYPE,"$IFSUBTYPE",[kernel interface subtype])
132 141
133AC_CACHE_SAVE 142AC_CACHE_SAVE
134 143
135dnl Checks for libraries. 144dnl Checks for libraries.
136 145
137AC_LANG(C++) 146AC_LANG(C++)
138AC_CHECK_HEADERS(ext/hash_map) 147AC_CHECK_HEADERS(ext/hash_map)
139 148
140dnl Checks for header files. 149dnl Checks for header files.
141AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h malloc.h stdint.h strings.h syslog.h unistd.h \ 150AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h malloc.h stdint.h strings.h syslog.h unistd.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]) 151 sys/file.h sys/ioctl.h sys/param.h sys/time.h netinet/in_systm.h sys/cygwin.h \
152 sys/mman.h netinet/in.h])
143AC_CHECK_HEADERS([net/ethernet.h net/if.h netinet/ip.h netinet/tcp.h netinet/in_systm.h], [], [], 153AC_CHECK_HEADERS([arpa/inet.h net/ethernet.h net/if.h netinet/ip.h netinet/tcp.h netinet/in_systm.h], [], [],
144[ 154[
145#include <sys/types.h> 155#include <sys/types.h>
146#include <sys/socket.h> 156#include <sys/socket.h>
147#ifdef HAVE_NETINET_IN_H 157#ifdef HAVE_NETINET_IN_H
148# include <netinet/in.h> 158# include <netinet/in.h>
194 204
195AC_LANG_PUSH(C) 205AC_LANG_PUSH(C)
196 206
197AC_HEADER_STDC 207AC_HEADER_STDC
198 208
209dnl argl, could somebody catapult darwin into the 21st century???
199AC_CHECK_FUNCS(asprintf daemon get_current_dir_name putenv select strerror strsignal strtol unsetenv mlockall) 210AC_CHECK_FUNCS(asprintf daemon get_current_dir_name putenv select strerror strsignal strtol unsetenv mlockall)
200 211
201AC_FUNC_ALLOCA 212AC_FUNC_ALLOCA
202 213
203dnl Support for SunOS 214dnl Support for SunOS
215 226
216AC_CACHE_SAVE 227AC_CACHE_SAVE
217 228
218dnl These are defined in files in m4/ 229dnl These are defined in files in m4/
219tinc_TUNTAP 230tinc_TUNTAP
231
220tinc_OPENSSL 232tinc_OPENSSL
233if test "x$openssl_include" != x; then
234 CXXFLAGS="$CXXFLAGS -I$openssl_include"
235fi
221dnl tinc_ZLIB 236dnl tinc_ZLIB
222 237
223AC_ARG_ENABLE(rohc, 238AC_ARG_ENABLE(rohc,
224 [AC_HELP_STRING(--enable-rohc, [enable robust header compression (rfc3095).])], 239 [AC_HELP_STRING(--enable-rohc, [enable robust header compression (rfc3095).])],
225 [ 240 [
226 echo 241 echo
227 echo "**********************************************************************" 242 echo "**********************************************************************"
228 echo "**********************************************************************" 243 echo "**********************************************************************"
229 echo "**** --enable-rohc not yet implemented *******************************" 244 echo "**** --enable-rohc is highly experimental, do not use ****************"
230 echo "**********************************************************************"
231 echo "**** uuh sorry, I am such an ass, but I didn't find any rfc3095 (ROHC)"
232 echo "**** implementation to be used in GPL code on the web."
233 echo "**** so this option is just a fake. Please implement one and send it"
234 echo "**** to me ;)"
235 echo "**********************************************************************"
236 echo "**********************************************************************"
237 echo "**********************************************************************" 245 echo "**********************************************************************"
238 echo "**********************************************************************" 246 echo "**********************************************************************"
239 echo 247 echo
248 rohc=true
249 AC_DEFINE_UNQUOTED(ENABLE_ROHC, 1, [ROHC support])
240 ] 250 ]
241) 251)
242 252
253AM_CONDITIONAL(ROHC, test x$rohc = xtrue)
254
243AC_ARG_ENABLE(icmp, 255AC_ARG_ENABLE(icmp,
244 [AC_HELP_STRING(--enable-icmp, [enable icmp protocol support.])], 256 [AC_HELP_STRING(--enable-icmp, [enable icmp protocol support (default disabled).])],
245 AC_DEFINE_UNQUOTED(ENABLE_ICMP, 1, [ICMP protocol support.]) 257 AC_DEFINE_UNQUOTED(ENABLE_ICMP, 1, [ICMP protocol support.])
246) 258)
247 259
248AC_ARG_ENABLE(tcp, 260AC_ARG_ENABLE(tcp,
249 [AC_HELP_STRING(--enable-tcp, [enable tcp protocol support.])], 261 [AC_HELP_STRING(--enable-tcp, [enable tcp protocol support (default disabled).])],
250 AC_DEFINE_UNQUOTED(ENABLE_TCP, 1, [TCP protocol support.]) 262 AC_DEFINE_UNQUOTED(ENABLE_TCP, 1, [TCP protocol support.])
251) 263)
252 264
265AC_ARG_ENABLE(dns,
266 [AC_HELP_STRING(--enable-dns, [enable dns tunnel protocol support (DOES NOT WORK).])],
267 AC_DEFINE_UNQUOTED(ENABLE_DNS, 1, [DNS tunnel protocol support.])
268)
269
253AC_ARG_ENABLE(http-proxy, 270AC_ARG_ENABLE(http-proxy,
254 [AC_HELP_STRING(--enable-http-proxy, [enable http proxy connect support.])], 271 [AC_HELP_STRING(--enable-http-proxy, [enable http proxy connect support (default disabled).])],
255 AC_DEFINE_UNQUOTED(ENABLE_HTTP_PROXY, 1, [http proxy connect support.]) 272 AC_DEFINE_UNQUOTED(ENABLE_HTTP_PROXY, 1, [http proxy connect support.])
256) 273)
257 274
258HMAC=16 dnl see also the AC_HELP_STRING 275HMAC=12 dnl see also the AC_HELP_STRING
259AC_ARG_ENABLE(hmac-length, 276AC_ARG_ENABLE(hmac-length,
260 [AC_HELP_STRING(--enable-hmac-length=BYTES, [use a hmac of length BYTES bytes (default 16). Allowed values are 4, 8, 12, 16.])], 277 [AC_HELP_STRING(--enable-hmac-length=BYTES, [use a hmac of length BYTES bytes (default 12). Allowed values are 4, 8, 12, 16.])],
261 HMAC=$enableval 278 HMAC=$enableval
262) 279)
263AC_DEFINE_UNQUOTED(HMACLENGTH, $HMAC, [Size of HMAC in each packet in bytes.]) 280AC_DEFINE_UNQUOTED(HMACLENGTH, $HMAC, [Size of HMAC in each packet in bytes.])
264 281
265RAND=8 dnl see also the AC_HELP_STRING 282RAND=8 dnl see also the AC_HELP_STRING
287 304
288CIPHER=bf_cbc 305CIPHER=bf_cbc
289AC_ARG_ENABLE(cipher, 306AC_ARG_ENABLE(cipher,
290 [AC_HELP_STRING(--enable-cipher, [ 307 [AC_HELP_STRING(--enable-cipher, [
291 Select the symmetric cipher (default "bf"). Must be one of 308 Select the symmetric cipher (default "bf"). Must be one of
292 "bf" (blowfish), "aes-128", "aes-192" or "aes-256".])], 309 "bf" (blowfish), "aes-128" (rijndael), "aes-192" or "aes-256".])],
293 if test "x$enableval" = xbf ; then CIPHER=bf_cbc ; fi 310 if test "x$enableval" = xbf ; then CIPHER=bf_cbc ; fi
294 if test "x$enableval" = xaes-128; then CIPHER=aes_128_cbc; fi 311 if test "x$enableval" = xaes-128; then CIPHER=aes_128_cbc; fi
295 if test "x$enableval" = xaes-192; then CIPHER=aes_192_cbc; fi 312 if test "x$enableval" = xaes-192; then CIPHER=aes_192_cbc; fi
296 if test "x$enableval" = xaes-256; then CIPHER=aes_256_cbc; fi 313 if test "x$enableval" = xaes-256; then CIPHER=aes_256_cbc; fi
297) 314)
299 316
300DIGEST=sha1 317DIGEST=sha1
301AC_ARG_ENABLE(digest, 318AC_ARG_ENABLE(digest,
302 [AC_HELP_STRING(--enable-digest, [ 319 [AC_HELP_STRING(--enable-digest, [
303 Select the digets algorithm to use (default "sha1"). Must be one of 320 Select the digets algorithm to use (default "sha1"). Must be one of
304 "sha1", "ripemd160", "md4" or "md5".])], 321 "sha1", "ripemd160", "md5" or "md4" (insecure).])],
305 if test "x$enableval" = xsha1 ; then DIGEST=sha1 ; fi 322 if test "x$enableval" = xsha1 ; then DIGEST=sha1 ; fi
306 if test "x$enableval" = xripemd160; then DIGEST=ripemd160; fi 323 if test "x$enableval" = xripemd160; then DIGEST=ripemd160; fi
324 if test "x$enableval" = xmd5 ; then DIGEST=md5 ; fi
307 if test "x$enableval" = xmd4 ; then DIGEST=md4 ; fi 325 if test "x$enableval" = xmd4 ; then DIGEST=md4 ; fi
308 if test "x$enableval" = xmd5 ; then DIGEST=md5 ; fi
309) 326)
310AC_DEFINE_UNQUOTED(ENABLE_DIGEST, EVP_${DIGEST}, [Select the digest algorithm to use.]) 327AC_DEFINE_UNQUOTED(ENABLE_DIGEST, EVP_${DIGEST}, [Select the digest algorithm to use.])
311 328
312if $CXX -v --help 2>&1 | grep -q fno-rtti; then 329if $CXX -v --help 2>&1 | grep -q fno-rtti; then
313 CXXFLAGS="$CXXFLAGS -fno-rtti" 330 CXXFLAGS="$CXXFLAGS -fno-rtti"
315 332
316if $CXX -v --help 2>&1 | grep -q fexceptions; then 333if $CXX -v --help 2>&1 | grep -q fexceptions; then
317 CXXFLAGS="$CXXFLAGS -fno-exceptions" 334 CXXFLAGS="$CXXFLAGS -fno-exceptions"
318fi 335fi
319 336
320if $CXX -v --help 2>&1 | grep -q ffunction-sections; then 337dnl if $CXX -v --help 2>&1 | grep -q ffunction-sections; then
321 CXXFLAGS="$CXXFLAGS -ffunction-sections" 338dnl CXXFLAGS="$CXXFLAGS -ffunction-sections"
322fi 339dnl fi
323 340dnl
324if $LD -v --help 2>&1 | grep -q gc-sections; then 341dnl if $LD -v --help 2>&1 | grep -q gc-sections; then
325 LDFLAGS="$LDFLAGS -Wl,--gc-sections" 342dnl LDFLAGS="$LDFLAGS -Wl,--gc-sections"
326fi 343dnl fi
327 344
328AC_CONFIG_COMMANDS_POST([ 345AC_CONFIG_COMMANDS_POST([
329 346
330echo 347echo
331echo "***" 348echo "***"
336echo "*** Digest used: $DIGEST" 353echo "*** Digest used: $DIGEST"
337echo "*** HMAC length: $HMAC" 354echo "*** HMAC length: $HMAC"
338echo "*** RAND used: $RAND" 355echo "*** RAND used: $RAND"
339echo "*** Max. MTU: $MTU" 356echo "*** Max. MTU: $MTU"
340echo "*** Compression: $COMPRESS" 357echo "*** Compression: $COMPRESS"
341echo "***"
342 358
343if test "x$DIGEST" = xmd4; then 359if test "x$DIGEST" = xmd4; then
344echo "*** WARNING" 360echo "***"
345echo "*** The digest you have chosen ($DIGEST) is known to be insecure" 361echo "*** WARNING: The digest you have chosen ($DIGEST) is known to be insecure"
346echo "***"
347fi 362fi
363
364if test "$HMAC" -lt 12; then
365echo "***"
366echo "*** WARNING: The hmac length you have chosen ($HMAC) is probably insecure"
367fi
368
369if test "$RAND" -lt 8; then
370echo "***"
371echo "*** WARNING: The random prefix you have chosen ($RAND) is probably insecure"
372fi
373
374echo "***"
348 375
349echo 376echo
350 377
351]) 378])
352 379
353AC_SUBST(INCLUDES) 380AC_SUBST(INCLUDES)
354 381
355AC_OUTPUT(Makefile po/Makefile.in 382AC_OUTPUT(Makefile po/Makefile.in
356src/Makefile 383src/Makefile
384src/rohc/Makefile
357doc/Makefile 385doc/Makefile
358lib/Makefile 386lib/Makefile
359m4/Makefile 387m4/Makefile
360) 388)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines