… | |
… | |
2 | |
2 | |
3 | AC_PREREQ(2.59) |
3 | AC_PREREQ(2.59) |
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, 1.9) |
7 | AM_INIT_AUTOMAKE(gvpe, 2.01) |
8 | AC_CONFIG_HEADERS([config.h]) |
8 | AC_CONFIG_HEADERS([config.h]) |
9 | AM_MAINTAINER_MODE |
9 | AM_MAINTAINER_MODE |
10 | |
10 | |
11 | AH_TOP([ |
11 | AH_TOP([ |
12 | #ifndef CONFIG_H__ |
12 | #ifndef CONFIG_H__ |
… | |
… | |
55 | AM_GNU_GETTEXT_VERSION(0.11.5) |
55 | AM_GNU_GETTEXT_VERSION(0.11.5) |
56 | |
56 | |
57 | # Enable GNU extensions. |
57 | # Enable GNU extensions. |
58 | # Define this here, not in acconfig's @TOP@ section, since definitions |
58 | # Define this here, not in acconfig's @TOP@ section, since definitions |
59 | # in the latter don't make it into the configure-time tests. |
59 | # in the latter don't make it into the configure-time tests. |
60 | AC_DEFINE([_GNU_SOURCE], 1, [Enable GNU extenstions]) |
60 | AC_DEFINE([_GNU_SOURCE], 1, [Enable GNU extensions]) |
61 | |
61 | |
62 | # do NOT define POSIX_SOURCE, sicne this clashes with many BSDs |
62 | # do NOT define POSIX_SOURCE, sicne this clashes with many BSDs |
63 | dnl AC_DEFINE([_POSIX_SOURCE], 1, [Enable POSIX 1003.1 extensions]) |
63 | dnl AC_DEFINE([_POSIX_SOURCE], 1, [Enable POSIX 1003.1 extensions]) |
64 | dnl AC_DEFINE([_XOPEN_SOURCE], 500, [Enable XOPEN extensions]) |
64 | dnl AC_DEFINE([_XOPEN_SOURCE], 500, [Enable XOPEN extensions]) |
65 | |
65 | |
… | |
… | |
87 | "tincd/openbsd" |
87 | "tincd/openbsd" |
88 | "native/darwin" |
88 | "native/darwin" |
89 | "tincd/darwin" |
89 | "tincd/darwin" |
90 | "native/cygwin"; |
90 | "native/cygwin"; |
91 | Untested combinations are: |
91 | Untested combinations are: |
|
|
92 | "tincd/bsd" |
92 | "tincd/solaris" |
93 | "tincd/solaris" |
93 | "tincd/mingw" |
94 | "tincd/mingw" |
94 | "tincd/raw_socket" |
95 | "tincd/raw_socket" |
95 | "tincd/uml_socket"; |
96 | "tincd/uml_socket"; |
96 | Broken combinations are: |
97 | Broken combinations are: |
… | |
… | |
157 | AC_CACHE_SAVE |
158 | AC_CACHE_SAVE |
158 | |
159 | |
159 | dnl Checks for libraries. |
160 | dnl Checks for libraries. |
160 | |
161 | |
161 | AC_LANG(C++) |
162 | AC_LANG(C++) |
162 | AC_CHECK_HEADERS(ext/hash_map clocale) |
163 | AC_CHECK_HEADERS(tr1/unordered_map ext/hash_map clocale) |
163 | |
164 | |
164 | dnl Checks for header files. |
165 | dnl Checks for header files. |
165 | AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h malloc.h stdint.h strings.h syslog.h unistd.h \ |
166 | AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h malloc.h stdint.h strings.h syslog.h unistd.h \ |
166 | sys/file.h sys/ioctl.h sys/param.h sys/time.h netinet/in_systm.h sys/cygwin.h \ |
167 | sys/file.h sys/ioctl.h sys/param.h sys/time.h netinet/in_systm.h sys/cygwin.h \ |
167 | sys/mman.h netinet/in.h]) |
168 | sys/mman.h netinet/in.h]) |
… | |
… | |
224 | AC_CHECK_LIB(socket, connect) |
225 | AC_CHECK_LIB(socket, connect) |
225 | ]) |
226 | ]) |
226 | AC_CHECK_FUNC(gethostbyname, [], [ |
227 | AC_CHECK_FUNC(gethostbyname, [], [ |
227 | AC_CHECK_LIB(nsl, gethostbyname) |
228 | AC_CHECK_LIB(nsl, gethostbyname) |
228 | ]) |
229 | ]) |
|
|
230 | |
|
|
231 | dnl libev support |
|
|
232 | m4_include([libev/libev.m4]) |
229 | |
233 | |
230 | AC_LANG_POP |
234 | AC_LANG_POP |
231 | |
235 | |
232 | dnl AC_CHECK_FUNCS([freeaddrinfo gai_strerror getaddrinfo getnameinfo]) |
236 | dnl AC_CHECK_FUNCS([freeaddrinfo gai_strerror getaddrinfo getnameinfo]) |
233 | |
237 | |
… | |
… | |
263 | ] |
267 | ] |
264 | ) |
268 | ) |
265 | |
269 | |
266 | AM_CONDITIONAL(ROHC, test x$rohc = xtrue) |
270 | AM_CONDITIONAL(ROHC, test x$rohc = xtrue) |
267 | |
271 | |
|
|
272 | dnl AC_ARG_ENABLE(bridging, |
|
|
273 | dnl [AS_HELP_STRING(--enable-bridging,enable bridging support (default disabled).)], |
|
|
274 | dnl AC_DEFINE_UNQUOTED(ENABLE_BRIDGING, 1, [bridging support.]) |
|
|
275 | dnl ) |
|
|
276 | |
268 | AC_ARG_ENABLE(icmp, |
277 | AC_ARG_ENABLE(icmp, |
269 | [AS_HELP_STRING(--enable-icmp,enable icmp protocol support (default disabled).)], |
278 | [AS_HELP_STRING(--enable-icmp,enable icmp protocol support (default disabled).)], |
270 | AC_DEFINE_UNQUOTED(ENABLE_ICMP, 1, [ICMP protocol support.]) |
279 | AC_DEFINE_UNQUOTED(ENABLE_ICMP, 1, [ICMP protocol support.]) |
271 | ) |
280 | ) |
272 | |
281 | |
… | |
… | |
320 | COMPRESS=0 |
329 | COMPRESS=0 |
321 | fi |
330 | fi |
322 | ) |
331 | ) |
323 | AC_DEFINE_UNQUOTED(ENABLE_COMPRESSION, $COMPRESS, [Enable compression support.]) |
332 | AC_DEFINE_UNQUOTED(ENABLE_COMPRESSION, $COMPRESS, [Enable compression support.]) |
324 | |
333 | |
325 | CIPHER=bf_cbc |
334 | CIPHER=aes_128_cbc |
326 | AC_ARG_ENABLE(cipher, |
335 | AC_ARG_ENABLE(cipher, |
327 | [AS_HELP_STRING(--enable-cipher,[ |
336 | [AS_HELP_STRING(--enable-cipher,[ |
328 | Select the symmetric cipher (default "bf"). |
337 | Select the symmetric cipher (default "aes-128"). |
329 | Must be one of "bf" (blowfish), "aes-128" (rijndael), "aes-192" or "aes-256".])], |
338 | Must be one of "bf" (blowfish), "aes-128" (rijndael), "aes-192" or "aes-256".])], |
330 | if test "x$enableval" = xbf ; then CIPHER=bf_cbc ; fi |
339 | if test "x$enableval" = xbf ; then CIPHER=bf_cbc ; fi |
331 | if test "x$enableval" = xaes-128; then CIPHER=aes_128_cbc; fi |
340 | if test "x$enableval" = xaes-128; then CIPHER=aes_128_cbc; fi |
332 | if test "x$enableval" = xaes-192; then CIPHER=aes_192_cbc; fi |
341 | if test "x$enableval" = xaes-192; then CIPHER=aes_192_cbc; fi |
333 | if test "x$enableval" = xaes-256; then CIPHER=aes_256_cbc; fi |
342 | if test "x$enableval" = xaes-256; then CIPHER=aes_256_cbc; fi |
334 | ) |
343 | ) |
335 | AC_DEFINE_UNQUOTED(ENABLE_CIPHER, EVP_${CIPHER}, [Select the symmetric cipher to use.]) |
344 | AC_DEFINE_UNQUOTED(ENABLE_CIPHER, EVP_${CIPHER}, [Select the symmetric cipher to use.]) |
336 | |
345 | |
337 | DIGEST=sha1 |
346 | DIGEST=ripemd160 |
338 | AC_ARG_ENABLE(digest, |
347 | AC_ARG_ENABLE(digest, |
339 | [AS_HELP_STRING(--enable-digest,[ |
348 | [AS_HELP_STRING(--enable-digest,[ |
340 | Select the digets algorithm to use (default "sha1"). Must be one of |
349 | Select the digest algorithm to use (default "ripemd160"). Must be one of |
341 | "sha1", "ripemd160", "md5" or "md4" (insecure).])], |
350 | "sha512", "sha256", "sha1", "ripemd160", "md5" or "md4" (insecure).])], |
|
|
351 | if test "x$enableval" = xsha512 ; then DIGEST=sha512 ; fi |
|
|
352 | if test "x$enableval" = xsha256 ; then DIGEST=sha256 ; fi |
342 | if test "x$enableval" = xsha1 ; then DIGEST=sha1 ; fi |
353 | if test "x$enableval" = xsha1 ; then DIGEST=sha1 ; fi |
343 | if test "x$enableval" = xripemd160; then DIGEST=ripemd160; fi |
354 | if test "x$enableval" = xripemd160; then DIGEST=ripemd160; fi |
344 | if test "x$enableval" = xmd5 ; then DIGEST=md5 ; fi |
355 | if test "x$enableval" = xmd5 ; then DIGEST=md5 ; fi |
345 | if test "x$enableval" = xmd4 ; then DIGEST=md4 ; fi |
356 | if test "x$enableval" = xmd4 ; then DIGEST=md4 ; fi |
346 | ) |
357 | ) |
… | |
… | |
351 | fi |
362 | fi |
352 | |
363 | |
353 | if $CXX -v --help 2>&1 | grep -q fexceptions; then |
364 | if $CXX -v --help 2>&1 | grep -q fexceptions; then |
354 | CXXFLAGS="$CXXFLAGS -fno-exceptions" |
365 | CXXFLAGS="$CXXFLAGS -fno-exceptions" |
355 | fi |
366 | fi |
|
|
367 | |
|
|
368 | LIBS="$EXTRA_LIBS $LIBS" |
356 | |
369 | |
357 | dnl if $CXX -v --help 2>&1 | grep -q ffunction-sections; then |
370 | dnl if $CXX -v --help 2>&1 | grep -q ffunction-sections; then |
358 | dnl CXXFLAGS="$CXXFLAGS -ffunction-sections" |
371 | dnl CXXFLAGS="$CXXFLAGS -ffunction-sections" |
359 | dnl fi |
372 | dnl fi |
360 | dnl |
373 | dnl |
361 | dnl if $LD -v --help 2>&1 | grep -q gc-sections; then |
374 | dnl if $LD -v --help 2>&1 | grep -q gc-sections; then |
362 | dnl LDFLAGS="$LDFLAGS -Wl,--gc-sections" |
375 | dnl LDFLAGS="$LDFLAGS -Wl,--gc-sections" |
363 | dnl fi |
376 | dnl fi |
364 | |
377 | |
365 | AC_CONFIG_COMMANDS_POST([ |
378 | AC_SUBST(INCLUDES) |
|
|
379 | |
|
|
380 | AC_CONFIG_FILES([Makefile po/Makefile.in |
|
|
381 | src/Makefile |
|
|
382 | doc/Makefile |
|
|
383 | lib/Makefile |
|
|
384 | m4/Makefile |
|
|
385 | ]) |
|
|
386 | AC_OUTPUT |
366 | |
387 | |
367 | echo |
388 | echo |
368 | echo "***" |
389 | echo "***" |
369 | echo "*** Configuration Summary" |
390 | echo "*** Configuration Summary" |
370 | echo "***" |
391 | echo "***" |
… | |
… | |
372 | echo "*** Cipher used: $CIPHER" |
393 | echo "*** Cipher used: $CIPHER" |
373 | echo "*** Digest used: $DIGEST" |
394 | echo "*** Digest used: $DIGEST" |
374 | echo "*** HMAC length: $HMAC" |
395 | echo "*** HMAC length: $HMAC" |
375 | echo "*** RAND used: $RAND" |
396 | echo "*** RAND used: $RAND" |
376 | echo "*** Max. MTU: $MTU" |
397 | echo "*** Max. MTU: $MTU" |
377 | echo "*** Compression: $COMPRESS" |
398 | |
|
|
399 | echo "***" |
|
|
400 | echo "*** Enable options:" |
|
|
401 | grep ENABLE_ config.h | sed -e 's/^/*** /' |
378 | |
402 | |
379 | if test "x$DIGEST" = xmd4; then |
403 | if test "x$DIGEST" = xmd4; then |
380 | echo "***" |
404 | echo "***" |
381 | echo "*** WARNING: The digest you have chosen ($DIGEST) is known to be insecure" |
405 | echo "*** WARNING: The digest you have chosen ($DIGEST) is known to be insecure" |
382 | fi |
406 | fi |
… | |
… | |
390 | echo "***" |
414 | echo "***" |
391 | echo "*** WARNING: The random prefix you have chosen ($RAND) is probably insecure" |
415 | echo "*** WARNING: The random prefix you have chosen ($RAND) is probably insecure" |
392 | fi |
416 | fi |
393 | |
417 | |
394 | echo "***" |
418 | echo "***" |
395 | |
|
|
396 | echo |
419 | echo |
397 | |
420 | |
398 | ]) |
|
|
399 | |
421 | |
400 | AC_SUBST(INCLUDES) |
|
|
401 | |
|
|
402 | AC_CONFIG_FILES([Makefile po/Makefile.in |
|
|
403 | src/Makefile |
|
|
404 | doc/Makefile |
|
|
405 | lib/Makefile |
|
|
406 | m4/Makefile |
|
|
407 | ]) |
|
|
408 | AC_OUTPUT |
|
|