--- gvpe/configure.ac 2009/07/18 05:59:16 1.55 +++ gvpe/configure.ac 2013/07/13 04:10:29 1.61 @@ -1,10 +1,10 @@ dnl Process this file with autoconf to produce a configure script. -AC_PREREQ(2.59) +AC_PREREQ(2.69) AC_INIT AC_CONFIG_SRCDIR([src/gvpe.C]) AC_CANONICAL_TARGET -AM_INIT_AUTOMAKE(gvpe, 2.22) +AM_INIT_AUTOMAKE(gvpe, 2.24) AC_CONFIG_HEADERS([config.h]) AM_MAINTAINER_MODE @@ -48,9 +48,6 @@ #endif ]) -dnl Include the macros from the m4/ directory -AM_ACLOCAL_INCLUDE(m4) - AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT_VERSION(0.11.5) @@ -245,6 +242,22 @@ fi dnl tinc_ZLIB +AC_ARG_ENABLE(threads, + [AS_HELP_STRING(--enable-threads,try to use threads for long-running asynchronous operations (default enabled).)], + [try_threads=$enableval], + [try_threads=yes] +) + +if test "x$try_threads" = xyes; then + AC_CHECK_HEADER(pthread.h,[ + LIBS="$LIBS -lpthread" + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([#include ], [pthread_t id; pthread_create (&id, 0, 0, 0);])], + [AC_DEFINE_UNQUOTED(ENABLE_PTHREADS, 1, [POSIX thread support.])] + ) + ]) +fi + AC_ARG_ENABLE(static-daemon, [AS_HELP_STRING(--enable-static-daemon,enable statically linked daemon.)], [LDFLAGS_DAEMON=-static] @@ -333,11 +346,11 @@ AC_DEFINE_UNQUOTED(RAND_SIZE, $RAND, [Add this many bytes of randomness to each packet.]) MTU=1500 -AC_ARG_ENABLE(mtu, +AC_ARG_ENABLE(max-mtu, [AS_HELP_STRING(--enable-max-mtu=BYTES,enable mtu sizes upto BYTES bytes (default 1500). Use 9100 for jumbogram support.)], MTU=$enableval ) -AC_DEFINE_UNQUOTED(MAX_MTU, $MTU + 14, [Maximum MTU supported.]) +AC_DEFINE_UNQUOTED(MAX_MTU, ($MTU + 14), [Maximum MTU supported.]) COMPRESS=1 AC_ARG_ENABLE(compression, @@ -364,7 +377,7 @@ AC_ARG_ENABLE(digest, [AS_HELP_STRING(--enable-digest=CIPHER,[ Select the digest algorithm to use (default "ripemd160"). Must be one of - "sha512", "sha256", "sha1" (somewhat insecure), "ripemd160", "md5" (insecure) or "md4" (insecure).])], + "sha512", "sha256", "sha1" (legacy), "ripemd160", "md5" (insecure) or "md4" (insecure).])], if test "x$enableval" = xsha512 ; then DIGEST=sha512 ; fi if test "x$enableval" = xsha256 ; then DIGEST=sha256 ; fi if test "x$enableval" = xsha1 ; then DIGEST=sha1 ; fi @@ -422,9 +435,14 @@ echo "*** WARNING: The digest you have chosen ($DIGEST) is known to be insecure" fi +if test "x$DIGEST" = xmd5; then +echo "***" +echo "*** WARNING: The digest you have chosen ($DIGEST) is quite insecure" +fi + if test "$HMAC" -lt 12; then echo "***" -echo "*** WARNING: The hmac length you have chosen ($HMAC) is probably insecure" +echo "*** WARNING: The hmac length you have chosen ($HMAC) is quite insecure" fi if test "$RAND" -lt 8; then