1 | dnl Process this file with autoconf to produce a configure script. |
1 | dnl Process this file with autoconf to produce a configure script. |
2 | |
2 | |
3 | AC_PREREQ(2.59) |
3 | AC_PREREQ(2.69) |
4 | AC_INIT |
4 | AC_INIT |
5 | AC_CONFIG_SRCDIR([src/gvpe.C]) |
5 | AC_CONFIG_SRCDIR([src/gvpe.C]) |
6 | AC_CANONICAL_TARGET |
6 | AC_CANONICAL_TARGET |
7 | AM_INIT_AUTOMAKE(gvpe, 2.24) |
7 | AM_INIT_AUTOMAKE(gvpe, 2.24) |
8 | AC_CONFIG_HEADERS([config.h]) |
8 | AC_CONFIG_HEADERS([config.h]) |
… | |
… | |
45 | # define CLOCALE <clocale> |
45 | # define CLOCALE <clocale> |
46 | #else |
46 | #else |
47 | # define CLOCALE <locale.h> |
47 | # define CLOCALE <locale.h> |
48 | #endif |
48 | #endif |
49 | ]) |
49 | ]) |
50 | |
|
|
51 | dnl Include the macros from the m4/ directory |
|
|
52 | AM_ACLOCAL_INCLUDE(m4) |
|
|
53 | |
50 | |
54 | AM_GNU_GETTEXT([external]) |
51 | AM_GNU_GETTEXT([external]) |
55 | AM_GNU_GETTEXT_VERSION(0.11.5) |
52 | AM_GNU_GETTEXT_VERSION(0.11.5) |
56 | |
53 | |
57 | # Enable GNU extensions. |
54 | # Enable GNU extensions. |
… | |
… | |
243 | if test "x$openssl_include" != x; then |
240 | if test "x$openssl_include" != x; then |
244 | CXXFLAGS="$CXXFLAGS -I$openssl_include" |
241 | CXXFLAGS="$CXXFLAGS -I$openssl_include" |
245 | fi |
242 | fi |
246 | dnl tinc_ZLIB |
243 | dnl tinc_ZLIB |
247 | |
244 | |
|
|
245 | AC_ARG_ENABLE(threads, |
|
|
246 | [AS_HELP_STRING(--enable-threads,try to use threads for long-running asynchronous operations (default enabled).)], |
|
|
247 | [try_threads=$enableval], |
|
|
248 | [try_threads=yes] |
|
|
249 | ) |
|
|
250 | |
|
|
251 | if test "x$try_threads" = xyes; then |
|
|
252 | AC_CHECK_HEADER(pthread.h,[ |
|
|
253 | LIBS="$LIBS -lpthread" |
|
|
254 | AC_COMPILE_IFELSE( |
|
|
255 | [AC_LANG_PROGRAM([#include <pthread.h>], [pthread_t id; pthread_create (&id, 0, 0, 0);])], |
|
|
256 | [AC_DEFINE_UNQUOTED(ENABLE_PTHREADS, 1, [POSIX thread support.])] |
|
|
257 | ) |
|
|
258 | ]) |
|
|
259 | fi |
|
|
260 | |
248 | AC_ARG_ENABLE(static-daemon, |
261 | AC_ARG_ENABLE(static-daemon, |
249 | [AS_HELP_STRING(--enable-static-daemon,enable statically linked daemon.)], |
262 | [AS_HELP_STRING(--enable-static-daemon,enable statically linked daemon.)], |
250 | [LDFLAGS_DAEMON=-static] |
263 | [LDFLAGS_DAEMON=-static] |
251 | ) |
264 | ) |
252 | AC_SUBST(LDFLAGS_DAEMON) |
265 | AC_SUBST(LDFLAGS_DAEMON) |
… | |
… | |
335 | MTU=1500 |
348 | MTU=1500 |
336 | AC_ARG_ENABLE(max-mtu, |
349 | AC_ARG_ENABLE(max-mtu, |
337 | [AS_HELP_STRING(--enable-max-mtu=BYTES,enable mtu sizes upto BYTES bytes (default 1500). Use 9100 for jumbogram support.)], |
350 | [AS_HELP_STRING(--enable-max-mtu=BYTES,enable mtu sizes upto BYTES bytes (default 1500). Use 9100 for jumbogram support.)], |
338 | MTU=$enableval |
351 | MTU=$enableval |
339 | ) |
352 | ) |
340 | AC_DEFINE_UNQUOTED(MAX_MTU, $MTU + 14, [Maximum MTU supported.]) |
353 | AC_DEFINE_UNQUOTED(MAX_MTU, ($MTU + 14), [Maximum MTU supported.]) |
341 | |
354 | |
342 | COMPRESS=1 |
355 | COMPRESS=1 |
343 | AC_ARG_ENABLE(compression, |
356 | AC_ARG_ENABLE(compression, |
344 | [AS_HELP_STRING(--disable-compression,Disable compression support.)], |
357 | [AS_HELP_STRING(--disable-compression,Disable compression support.)], |
345 | if test "x$enableval" = xno; then |
358 | if test "x$enableval" = xno; then |
… | |
… | |
420 | if test "x$DIGEST" = xmd4; then |
433 | if test "x$DIGEST" = xmd4; then |
421 | echo "***" |
434 | echo "***" |
422 | echo "*** WARNING: The digest you have chosen ($DIGEST) is known to be insecure" |
435 | echo "*** WARNING: The digest you have chosen ($DIGEST) is known to be insecure" |
423 | fi |
436 | fi |
424 | |
437 | |
|
|
438 | if test "x$DIGEST" = xmd5; then |
|
|
439 | echo "***" |
|
|
440 | echo "*** WARNING: The digest you have chosen ($DIGEST) is probably insecure" |
|
|
441 | fi |
|
|
442 | |
425 | if test "$HMAC" -lt 12; then |
443 | if test "$HMAC" -lt 12; then |
426 | echo "***" |
444 | echo "***" |
427 | echo "*** WARNING: The hmac length you have chosen ($HMAC) is probably insecure" |
445 | echo "*** WARNING: The hmac length you have chosen ($HMAC) is probably insecure" |
428 | fi |
446 | fi |
429 | |
447 | |