ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/configure.ac
(Generate patch)

Comparing gvpe/configure.ac (file contents):
Revision 1.8 by pcg, Tue Oct 14 03:22:09 2003 UTC vs.
Revision 1.20 by pcg, Fri Oct 17 01:39:12 2003 UTC

1dnl Process this file with autoconf to produce a configure script. 1dnl Process this file with autoconf to produce a configure script.
2 2
3AC_PREREQ(2.57) 3AC_PREREQ(2.57)
4AC_INIT(src/vped.C) 4AC_INIT(src/vped.C)
5AC_CANONICAL_TARGET 5AC_CANONICAL_TARGET
6AM_INIT_AUTOMAKE(vpe, 1.0) 6AM_INIT_AUTOMAKE(vpe, 1.2)
7AM_CONFIG_HEADER(config.h) 7AM_CONFIG_HEADER(config.h)
8AM_MAINTAINER_MODE 8AM_MAINTAINER_MODE
9 9
10AH_TOP([ 10AH_TOP([
11#ifndef CONFIG_H__ 11#ifndef CONFIG_H__
65 65
66AC_ARG_ENABLE(iftype, 66AC_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"
71 "tincd/linux"
72 "tincd/freebsd"
73 "tincd/openbsd"
74 "tincd/darwin"
75 "native/cygwin";
71 Untested combinations are: 76 Untested combinations are:
72 "tincd/freebsd" "tincd/netbsd" "tincd/darwin" "tincd/solaris" 77 "tincd/netbsd"
73 "tincd/openbsd" "tincd/netbsd" "tincd/cygwin"; 78 "tincd/solaris"
79 "tincd/mingw";
74 Broken combinations are: 80 Broken combinations are:
75 "native/cygwin"; 81 "tincd/cygwin";
76 The default is autodetected. 82 The default is to autodetect.
77 ])], 83 ])],
78 [ 84 [
79 IFTYPE=`echo $enableval | sed s%/.*%%` 85 IFTYPE=`echo $enableval | sed s%/.*%%`
80 IFSUBTYPE=`echo $enableval | sed s%.*/%%` 86 IFSUBTYPE=`echo $enableval | sed s%.*/%%`
81 ] 87 ]
115 IFTYPE=tincd 121 IFTYPE=tincd
116 IFSUBTYPE=netbsd 122 IFSUBTYPE=netbsd
117 AC_DEFINE(HAVE_NETBSD, 1, [NetBSD]) 123 AC_DEFINE(HAVE_NETBSD, 1, [NetBSD])
118 ;; 124 ;;
119 *cygwin*) 125 *cygwin*)
120 IFTYPE=tincd 126 IFTYPE=native
121 IFSUBTYPE=cygwin 127 IFSUBTYPE=cygwin
122 AC_DEFINE(HAVE_CYGWIN, 1, [Cygwin]) 128 AC_DEFINE(HAVE_CYGWIN, 1, [Cygwin])
123 ;; 129 ;;
124 *) 130 *)
125 AC_MSG_ERROR("Unknown operating system.") 131 AC_MSG_ERROR("Unknown operating system.")
127 esac 133 esac
128fi 134fi
129AC_MSG_RESULT($IFTYPE/$IFSUBTYPE) 135AC_MSG_RESULT($IFTYPE/$IFSUBTYPE)
130AC_SUBST(IFTYPE,$IFTYPE) 136AC_SUBST(IFTYPE,$IFTYPE)
131AC_SUBST(IFSUBTYPE,$IFSUBTYPE) 137AC_SUBST(IFSUBTYPE,$IFSUBTYPE)
138AC_DEFINE_UNQUOTED(IFTYPE,"$IFTYPE",[kernel interface type])
139AC_DEFINE_UNQUOTED(IFSUBTYPE,"$IFSUBTYPE",[kernel interface subtype])
132 140
133AC_CACHE_SAVE 141AC_CACHE_SAVE
134 142
135dnl Checks for libraries. 143dnl Checks for libraries.
136 144
137AC_LANG(C++) 145AC_LANG(C++)
138AC_CHECK_HEADERS(ext/hash_map) 146AC_CHECK_HEADERS(ext/hash_map)
139 147
140dnl Checks for header files. 148dnl Checks for header files.
141AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h malloc.h stdint.h strings.h syslog.h unistd.h \ 149AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h malloc.h stdint.h strings.h syslog.h unistd.h \
142 sys/file.h sys/ioctl.h sys/param.h sys/time.h netinet/in_systm.h cygwin.h arpa/inet.h netinet/in.h]) 150 sys/file.h sys/ioctl.h sys/param.h sys/time.h netinet/in_systm.h sys/cygwin.h arpa/inet.h \
151 sys/poll.h sys/mman.h netinet/in.h])
143AC_CHECK_HEADERS([net/ethernet.h net/if.h netinet/ip.h netinet/tcp.h netinet/in_systm.h], [], [], 152AC_CHECK_HEADERS([net/ethernet.h net/if.h netinet/ip.h netinet/tcp.h netinet/in_systm.h], [], [],
144[ 153[
145#include <sys/types.h> 154#include <sys/types.h>
146#include <sys/socket.h> 155#include <sys/socket.h>
147#ifdef HAVE_NETINET_IN_H 156#ifdef HAVE_NETINET_IN_H
194 203
195AC_LANG_PUSH(C) 204AC_LANG_PUSH(C)
196 205
197AC_HEADER_STDC 206AC_HEADER_STDC
198 207
208dnl argl, could somebody catapult darwin into the 21st century???
199AC_CHECK_FUNCS(asprintf daemon get_current_dir_name putenv select strerror strsignal strtol unsetenv mlockall) 209AC_CHECK_FUNCS(asprintf daemon get_current_dir_name putenv select strerror strsignal strtol unsetenv mlockall poll)
200 210
201AC_FUNC_ALLOCA 211AC_FUNC_ALLOCA
202 212
203dnl Support for SunOS 213dnl Support for SunOS
204 214
215 225
216AC_CACHE_SAVE 226AC_CACHE_SAVE
217 227
218dnl These are defined in files in m4/ 228dnl These are defined in files in m4/
219tinc_TUNTAP 229tinc_TUNTAP
230
220tinc_OPENSSL 231tinc_OPENSSL
232if test "x$openssl_include" != x; then
233 CXXFLAGS="$CXXFLAGS -I$openssl_include"
234fi
221dnl tinc_ZLIB 235dnl tinc_ZLIB
222 236
223AC_ARG_ENABLE(rohc, 237AC_ARG_ENABLE(rohc,
224 [AC_HELP_STRING(--enable-rohc, [enable robust header compression (rfc3095).])], 238 [AC_HELP_STRING(--enable-rohc, [enable robust header compression (rfc3095).])],
225 [ 239 [
239 echo 253 echo
240 ] 254 ]
241) 255)
242 256
243AC_ARG_ENABLE(icmp, 257AC_ARG_ENABLE(icmp,
244 [AC_HELP_STRING(--enable-icmp, [enable icmp protocol support.])], 258 [AC_HELP_STRING(--enable-icmp, [enable icmp protocol support (default disabled).])],
245 AC_DEFINE_UNQUOTED(ENABLE_ICMP, 1, [ICMP protocol support.]) 259 AC_DEFINE_UNQUOTED(ENABLE_ICMP, 1, [ICMP protocol support.])
246) 260)
247 261
248AC_ARG_ENABLE(tcp, 262AC_ARG_ENABLE(tcp,
249 [AC_HELP_STRING(--enable-tcp, [enable tcp protocol support.])], 263 [AC_HELP_STRING(--enable-tcp, [enable tcp protocol support (default disabled).])],
250 AC_DEFINE_UNQUOTED(ENABLE_TCP, 1, [TCP protocol support.]) 264 AC_DEFINE_UNQUOTED(ENABLE_TCP, 1, [TCP protocol support.])
251) 265)
252 266
253AC_ARG_ENABLE(http-proxy, 267AC_ARG_ENABLE(http-proxy,
254 [AC_HELP_STRING(--enable-http-proxy, [enable http proxy connect support.])], 268 [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.]) 269 AC_DEFINE_UNQUOTED(ENABLE_HTTP_PROXY, 1, [http proxy connect support.])
256) 270)
257 271
258HMAC=16 dnl see also the AC_HELP_STRING 272HMAC=8 dnl see also the AC_HELP_STRING
259AC_ARG_ENABLE(hmac-length, 273AC_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.])], 274 [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 275 HMAC=$enableval
262) 276)
263AC_DEFINE_UNQUOTED(HMACLENGTH, $HMAC, [Size of HMAC in each packet in bytes.]) 277AC_DEFINE_UNQUOTED(HMACLENGTH, $HMAC, [Size of HMAC in each packet in bytes.])
264 278
265RAND=8 dnl see also the AC_HELP_STRING 279RAND=8 dnl see also the AC_HELP_STRING
287 301
288CIPHER=bf_cbc 302CIPHER=bf_cbc
289AC_ARG_ENABLE(cipher, 303AC_ARG_ENABLE(cipher,
290 [AC_HELP_STRING(--enable-cipher, [ 304 [AC_HELP_STRING(--enable-cipher, [
291 Select the symmetric cipher (default "bf"). Must be one of 305 Select the symmetric cipher (default "bf"). Must be one of
292 "bf" (blowfish), "aes-128", "aes-192" or "aes-256".])], 306 "bf" (blowfish), "aes-128" (rijndael), "aes-192" or "aes-256".])],
293 if test "x$enableval" = xbf ; then CIPHER=bf_cbc ; fi 307 if test "x$enableval" = xbf ; then CIPHER=bf_cbc ; fi
294 if test "x$enableval" = xaes-128; then CIPHER=aes_128_cbc; fi 308 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 309 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 310 if test "x$enableval" = xaes-256; then CIPHER=aes_256_cbc; fi
297) 311)
299 313
300DIGEST=sha1 314DIGEST=sha1
301AC_ARG_ENABLE(digest, 315AC_ARG_ENABLE(digest,
302 [AC_HELP_STRING(--enable-digest, [ 316 [AC_HELP_STRING(--enable-digest, [
303 Select the digets algorithm to use (default "sha1"). Must be one of 317 Select the digets algorithm to use (default "sha1"). Must be one of
304 "sha1", "ripemd160", "md4" or "md5".])], 318 "sha1", "ripemd160", "md5" or "md4" (insecure).])],
305 if test "x$enableval" = xsha1 ; then DIGEST=sha1 ; fi 319 if test "x$enableval" = xsha1 ; then DIGEST=sha1 ; fi
306 if test "x$enableval" = xripemd160; then DIGEST=ripemd160; fi 320 if test "x$enableval" = xripemd160; then DIGEST=ripemd160; fi
321 if test "x$enableval" = xmd5 ; then DIGEST=md5 ; fi
307 if test "x$enableval" = xmd4 ; then DIGEST=md4 ; fi 322 if test "x$enableval" = xmd4 ; then DIGEST=md4 ; fi
308 if test "x$enableval" = xmd5 ; then DIGEST=md5 ; fi
309) 323)
310AC_DEFINE_UNQUOTED(ENABLE_DIGEST, EVP_${DIGEST}, [Select the digest algorithm to use.]) 324AC_DEFINE_UNQUOTED(ENABLE_DIGEST, EVP_${DIGEST}, [Select the digest algorithm to use.])
311 325
312if $CXX -v --help 2>&1 | grep -q fno-rtti; then 326if $CXX -v --help 2>&1 | grep -q fno-rtti; then
313 CXXFLAGS="$CXXFLAGS -fno-rtti" 327 CXXFLAGS="$CXXFLAGS -fno-rtti"
315 329
316if $CXX -v --help 2>&1 | grep -q fexceptions; then 330if $CXX -v --help 2>&1 | grep -q fexceptions; then
317 CXXFLAGS="$CXXFLAGS -fno-exceptions" 331 CXXFLAGS="$CXXFLAGS -fno-exceptions"
318fi 332fi
319 333
320if $CXX -v --help 2>&1 | grep -q ffunction-sections; then 334dnl if $CXX -v --help 2>&1 | grep -q ffunction-sections; then
321 CXXFLAGS="$CXXFLAGS -ffunction-sections" 335dnl CXXFLAGS="$CXXFLAGS -ffunction-sections"
322fi 336dnl fi
323 337dnl
324if $LD -v --help 2>&1 | grep -q gc-sections; then 338dnl if $LD -v --help 2>&1 | grep -q gc-sections; then
325 LDFLAGS="$LDFLAGS -Wl,--gc-sections" 339dnl LDFLAGS="$LDFLAGS -Wl,--gc-sections"
326fi 340dnl fi
327 341
328AC_CONFIG_COMMANDS_POST([ 342AC_CONFIG_COMMANDS_POST([
329 343
330echo 344echo
331echo "***" 345echo "***"

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines