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.57) |
3 | AC_PREREQ(2.57) |
4 | AC_INIT(src/vped.C) |
4 | AC_INIT(src/vped.C) |
5 | AC_CANONICAL_TARGET |
5 | AC_CANONICAL_TARGET |
6 | AM_INIT_AUTOMAKE(vpe, 1.0) |
6 | AM_INIT_AUTOMAKE(vpe, 1.2) |
7 | AM_CONFIG_HEADER(config.h) |
7 | AM_CONFIG_HEADER(config.h) |
8 | AM_MAINTAINER_MODE |
8 | AM_MAINTAINER_MODE |
9 | |
9 | |
10 | AH_TOP([ |
10 | AH_TOP([ |
11 | #ifndef CONFIG_H__ |
11 | #ifndef CONFIG_H__ |
… | |
… | |
65 | |
65 | |
66 | AC_ARG_ENABLE(iftype, |
66 | AC_ARG_ENABLE(iftype, |
67 | [AC_HELP_STRING(--enable-iftype[=TYPE/SUBTYPE], [ |
67 | [AC_HELP_STRING(--enable-iftype[=TYPE/SUBTYPE], [ |
68 | Use kernel/net device interface TYPE/SUBTYPE. |
68 | Use kernel/net device interface TYPE/SUBTYPE. |
69 | Working combinations are: |
69 | Working combinations are: |
70 | "native/linux" "tincd/linux"; |
70 | "native/linux" "tincd/linux" "tincd/freebsd"; |
71 | Untested combinations are: |
71 | Untested combinations are: |
72 | "tincd/freebsd" "tincd/netbsd" "tincd/darwin" "tincd/solaris" |
72 | "tincd/netbsd" "tincd/darwin" "tincd/solaris" |
73 | "tincd/openbsd" "tincd/netbsd" "tincd/cygwin"; |
73 | "tincd/openbsd" "tincd/cygwin"; |
74 | Broken combinations are: |
74 | Broken combinations are: |
75 | "native/cygwin"; |
75 | "native/cygwin"; |
76 | The default is autodetected. |
76 | The default is to autodetect. |
77 | ])], |
77 | ])], |
78 | [ |
78 | [ |
79 | IFTYPE=`echo $enableval | sed s%/.*%%` |
79 | IFTYPE=`echo $enableval | sed s%/.*%%` |
80 | IFSUBTYPE=`echo $enableval | sed s%.*/%%` |
80 | IFSUBTYPE=`echo $enableval | sed s%.*/%%` |
81 | ] |
81 | ] |
… | |
… | |
239 | echo |
239 | echo |
240 | ] |
240 | ] |
241 | ) |
241 | ) |
242 | |
242 | |
243 | AC_ARG_ENABLE(icmp, |
243 | AC_ARG_ENABLE(icmp, |
244 | [AC_HELP_STRING(--enable-icmp, [enable icmp protocol support.])], |
244 | [AC_HELP_STRING(--enable-icmp, [enable icmp protocol support (default disabled).])], |
245 | AC_DEFINE_UNQUOTED(ENABLE_ICMP, 1, [ICMP protocol support.]) |
245 | AC_DEFINE_UNQUOTED(ENABLE_ICMP, 1, [ICMP protocol support.]) |
246 | ) |
246 | ) |
247 | |
247 | |
248 | AC_ARG_ENABLE(tcp, |
248 | AC_ARG_ENABLE(tcp, |
249 | [AC_HELP_STRING(--enable-tcp, [enable tcp protocol support.])], |
249 | [AC_HELP_STRING(--enable-tcp, [enable tcp protocol support (default disabled).])], |
250 | AC_DEFINE_UNQUOTED(ENABLE_TCP, 1, [TCP protocol support.]) |
250 | AC_DEFINE_UNQUOTED(ENABLE_TCP, 1, [TCP protocol support.]) |
251 | ) |
251 | ) |
252 | |
252 | |
253 | AC_ARG_ENABLE(http-proxy, |
253 | AC_ARG_ENABLE(http-proxy, |
254 | [AC_HELP_STRING(--enable-http-proxy, [enable http proxy connect support.])], |
254 | [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.]) |
255 | AC_DEFINE_UNQUOTED(ENABLE_HTTP_PROXY, 1, [http proxy connect support.]) |
256 | ) |
256 | ) |
257 | |
257 | |
258 | HMAC=16 dnl see also the AC_HELP_STRING |
258 | HMAC=12 dnl see also the AC_HELP_STRING |
259 | AC_ARG_ENABLE(hmac-length, |
259 | AC_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.])], |
260 | [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 |
261 | HMAC=$enableval |
262 | ) |
262 | ) |
263 | AC_DEFINE_UNQUOTED(HMACLENGTH, $HMAC, [Size of HMAC in each packet in bytes.]) |
263 | AC_DEFINE_UNQUOTED(HMACLENGTH, $HMAC, [Size of HMAC in each packet in bytes.]) |
264 | |
264 | |
265 | RAND=8 dnl see also the AC_HELP_STRING |
265 | RAND=8 dnl see also the AC_HELP_STRING |
… | |
… | |
287 | |
287 | |
288 | CIPHER=bf_cbc |
288 | CIPHER=bf_cbc |
289 | AC_ARG_ENABLE(cipher, |
289 | AC_ARG_ENABLE(cipher, |
290 | [AC_HELP_STRING(--enable-cipher, [ |
290 | [AC_HELP_STRING(--enable-cipher, [ |
291 | Select the symmetric cipher (default "bf"). Must be one of |
291 | Select the symmetric cipher (default "bf"). Must be one of |
292 | "bf" (blowfish), "aes-128", "aes-192" or "aes-256".])], |
292 | "bf" (blowfish), "aes-128" (rijndael), "aes-192" or "aes-256".])], |
293 | if test "x$enableval" = xbf ; then CIPHER=bf_cbc ; fi |
293 | if test "x$enableval" = xbf ; then CIPHER=bf_cbc ; fi |
294 | if test "x$enableval" = xaes-128; then CIPHER=aes_128_cbc; fi |
294 | 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 |
295 | 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 |
296 | if test "x$enableval" = xaes-256; then CIPHER=aes_256_cbc; fi |
297 | ) |
297 | ) |
… | |
… | |
299 | |
299 | |
300 | DIGEST=sha1 |
300 | DIGEST=sha1 |
301 | AC_ARG_ENABLE(digest, |
301 | AC_ARG_ENABLE(digest, |
302 | [AC_HELP_STRING(--enable-digest, [ |
302 | [AC_HELP_STRING(--enable-digest, [ |
303 | Select the digets algorithm to use (default "sha1"). Must be one of |
303 | Select the digets algorithm to use (default "sha1"). Must be one of |
304 | "sha1", "ripemd160", "md4" or "md5".])], |
304 | "sha1", "ripemd160", "md5" or "md4" (insecure).])], |
305 | if test "x$enableval" = xsha1 ; then DIGEST=sha1 ; fi |
305 | if test "x$enableval" = xsha1 ; then DIGEST=sha1 ; fi |
306 | if test "x$enableval" = xripemd160; then DIGEST=ripemd160; fi |
306 | if test "x$enableval" = xripemd160; then DIGEST=ripemd160; fi |
|
|
307 | if test "x$enableval" = xmd5 ; then DIGEST=md5 ; fi |
307 | if test "x$enableval" = xmd4 ; then DIGEST=md4 ; fi |
308 | if test "x$enableval" = xmd4 ; then DIGEST=md4 ; fi |
308 | if test "x$enableval" = xmd5 ; then DIGEST=md5 ; fi |
|
|
309 | ) |
309 | ) |
310 | AC_DEFINE_UNQUOTED(ENABLE_DIGEST, EVP_${DIGEST}, [Select the digest algorithm to use.]) |
310 | AC_DEFINE_UNQUOTED(ENABLE_DIGEST, EVP_${DIGEST}, [Select the digest algorithm to use.]) |
311 | |
311 | |
312 | if $CXX -v --help 2>&1 | grep -q fno-rtti; then |
312 | if $CXX -v --help 2>&1 | grep -q fno-rtti; then |
313 | CXXFLAGS="$CXXFLAGS -fno-rtti" |
313 | CXXFLAGS="$CXXFLAGS -fno-rtti" |