--- gvpe/configure.ac 2003/10/14 19:45:35 1.11 +++ gvpe/configure.ac 2004/02/08 07:24:25 1.25 @@ -3,7 +3,7 @@ AC_PREREQ(2.57) AC_INIT(src/vped.C) AC_CANONICAL_TARGET -AM_INIT_AUTOMAKE(vpe, 1.2) +AM_INIT_AUTOMAKE(vpe, 1.5) AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE @@ -46,7 +46,10 @@ # Define this here, not in acconfig's @TOP@ section, since definitions # in the latter don't make it into the configure-time tests. AC_DEFINE([_GNU_SOURCE], 1, [Enable GNU extenstions]) -AC_DEFINE([__USE_BSD], 1, [Enable BSD extensions]) + +# do NOT define POSIX_SOURCE, sicne this clashes with many BSDs +dnl AC_DEFINE([_POSIX_SOURCE], 1, [Enable POSIX 1003.1 extensions]) +dnl AC_DEFINE([_XOPEN_SOURCE], 500, [Enable XOPEN extensions]) ALL_LINGUAS="" @@ -61,18 +64,22 @@ AC_PROG_MAKE_SET AC_PROG_RANLIB -AC_ISC_POSIX - AC_ARG_ENABLE(iftype, [AC_HELP_STRING(--enable-iftype[=TYPE/SUBTYPE], [ Use kernel/net device interface TYPE/SUBTYPE. Working combinations are: - "native/linux" "tincd/linux" "tincd/freebsd"; + "native/linux" + "tincd/linux" + "tincd/freebsd" + "tincd/openbsd" + "tincd/darwin" + "native/cygwin"; Untested combinations are: - "tincd/netbsd" "tincd/darwin" "tincd/solaris" - "tincd/openbsd" "tincd/cygwin"; + "tincd/netbsd" + "tincd/solaris" + "tincd/mingw"; Broken combinations are: - "native/cygwin"; + "tincd/cygwin"; The default is to autodetect. ])], [ @@ -117,7 +124,7 @@ AC_DEFINE(HAVE_NETBSD, 1, [NetBSD]) ;; *cygwin*) - IFTYPE=tincd + IFTYPE=native IFSUBTYPE=cygwin AC_DEFINE(HAVE_CYGWIN, 1, [Cygwin]) ;; @@ -129,6 +136,8 @@ AC_MSG_RESULT($IFTYPE/$IFSUBTYPE) AC_SUBST(IFTYPE,$IFTYPE) AC_SUBST(IFSUBTYPE,$IFSUBTYPE) +AC_DEFINE_UNQUOTED(IFTYPE,"$IFTYPE",[kernel interface type]) +AC_DEFINE_UNQUOTED(IFSUBTYPE,"$IFSUBTYPE",[kernel interface subtype]) AC_CACHE_SAVE @@ -139,9 +148,9 @@ dnl Checks for header files. AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h malloc.h stdint.h strings.h syslog.h unistd.h \ - sys/file.h sys/ioctl.h sys/param.h sys/time.h netinet/in_systm.h cygwin.h arpa/inet.h \ - sys/poll.h sys/mman.h netinet/in.h]) -AC_CHECK_HEADERS([net/ethernet.h net/if.h netinet/ip.h netinet/tcp.h netinet/in_systm.h], [], [], + sys/file.h sys/ioctl.h sys/param.h sys/time.h netinet/in_systm.h sys/cygwin.h \ + sys/mman.h netinet/in.h]) +AC_CHECK_HEADERS([arpa/inet.h net/ethernet.h net/if.h netinet/ip.h netinet/tcp.h netinet/in_systm.h], [], [], [ #include #include @@ -198,7 +207,7 @@ AC_HEADER_STDC dnl argl, could somebody catapult darwin into the 21st century??? -AC_CHECK_FUNCS(asprintf daemon get_current_dir_name putenv select strerror strsignal strtol unsetenv mlockall poll) +AC_CHECK_FUNCS(asprintf daemon get_current_dir_name putenv select strerror strsignal strtol unsetenv mlockall) AC_FUNC_ALLOCA @@ -219,7 +228,11 @@ dnl These are defined in files in m4/ tinc_TUNTAP + tinc_OPENSSL +if test "x$openssl_include" != x; then + CXXFLAGS="$CXXFLAGS -I$openssl_include" +fi dnl tinc_ZLIB AC_ARG_ENABLE(rohc, @@ -228,20 +241,17 @@ echo echo "**********************************************************************" echo "**********************************************************************" - echo "**** --enable-rohc not yet implemented *******************************" - echo "**********************************************************************" - echo "**** uuh sorry, I am such an ass, but I didn't find any rfc3095 (ROHC)" - echo "**** implementation to be used in GPL code on the web." - echo "**** so this option is just a fake. Please implement one and send it" - echo "**** to me ;)" - echo "**********************************************************************" - echo "**********************************************************************" + echo "**** --enable-rohc is highly experimental, do not use ****************" echo "**********************************************************************" echo "**********************************************************************" echo + rohc=true + AC_DEFINE_UNQUOTED(ENABLE_ROHC, 1, [ROHC support]) ] ) +AM_CONDITIONAL(ROHC, test x$rohc = xtrue) + AC_ARG_ENABLE(icmp, [AC_HELP_STRING(--enable-icmp, [enable icmp protocol support (default disabled).])], AC_DEFINE_UNQUOTED(ENABLE_ICMP, 1, [ICMP protocol support.]) @@ -257,7 +267,7 @@ AC_DEFINE_UNQUOTED(ENABLE_HTTP_PROXY, 1, [http proxy connect support.]) ) -HMAC=12 dnl see also the AC_HELP_STRING +HMAC=8 dnl see also the AC_HELP_STRING AC_ARG_ENABLE(hmac-length, [AC_HELP_STRING(--enable-hmac-length=BYTES, [use a hmac of length BYTES bytes (default 12). Allowed values are 4, 8, 12, 16.])], HMAC=$enableval @@ -319,13 +329,13 @@ CXXFLAGS="$CXXFLAGS -fno-exceptions" fi -if $CXX -v --help 2>&1 | grep -q ffunction-sections; then - CXXFLAGS="$CXXFLAGS -ffunction-sections" -fi - -if $LD -v --help 2>&1 | grep -q gc-sections; then - LDFLAGS="$LDFLAGS -Wl,--gc-sections" -fi +dnl if $CXX -v --help 2>&1 | grep -q ffunction-sections; then +dnl CXXFLAGS="$CXXFLAGS -ffunction-sections" +dnl fi +dnl +dnl if $LD -v --help 2>&1 | grep -q gc-sections; then +dnl LDFLAGS="$LDFLAGS -Wl,--gc-sections" +dnl fi AC_CONFIG_COMMANDS_POST([ @@ -340,14 +350,24 @@ echo "*** RAND used: $RAND" echo "*** Max. MTU: $MTU" echo "*** Compression: $COMPRESS" -echo "***" if test "x$DIGEST" = xmd4; then -echo "*** WARNING" -echo "*** The digest you have chosen ($DIGEST) is known to be insecure" echo "***" +echo "*** WARNING: The digest you have chosen ($DIGEST) is known to be insecure" +fi + +if test "$HMAC" -lt 12; then +echo "***" +echo "*** WARNING: The hmac length you have chosen ($HMAC) might be insecure" +fi + +if test "$RAND" -lt 8; then +echo "***" +echo "*** WARNING: The random prefix you have chosen ($RAND) might be insecure" fi +echo "***" + echo ]) @@ -356,6 +376,7 @@ AC_OUTPUT(Makefile po/Makefile.in src/Makefile +src/rohc/Makefile doc/Makefile lib/Makefile m4/Makefile