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

Comparing gvpe/configure.ac (file contents):
Revision 1.14 by pcg, Wed Oct 15 01:35:45 2003 UTC vs.
Revision 1.27 by pcg, Wed May 12 13:32:13 2004 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.2) 6AM_INIT_AUTOMAKE(vpe, 1.6.1)
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__
44 44
45# Enable GNU extensions. 45# Enable GNU extensions.
46# Define this here, not in acconfig's @TOP@ section, since definitions 46# Define this here, not in acconfig's @TOP@ section, since definitions
47# in the latter don't make it into the configure-time tests. 47# in the latter don't make it into the configure-time tests.
48AC_DEFINE([_GNU_SOURCE], 1, [Enable GNU extenstions]) 48AC_DEFINE([_GNU_SOURCE], 1, [Enable GNU extenstions])
49AC_DEFINE([__USE_BSD], 1, [Enable BSD extensions]) 49
50# do NOT define POSIX_SOURCE, sicne this clashes with many BSDs
51dnl AC_DEFINE([_POSIX_SOURCE], 1, [Enable POSIX 1003.1 extensions])
52dnl AC_DEFINE([_XOPEN_SOURCE], 500, [Enable XOPEN extensions])
50 53
51ALL_LINGUAS="" 54ALL_LINGUAS=""
52 55
53dnl Checks for programs. 56dnl Checks for programs.
54AC_PROG_CC 57AC_PROG_CC
59AC_PROG_INSTALL 62AC_PROG_INSTALL
60AC_PROG_LN_S 63AC_PROG_LN_S
61AC_PROG_MAKE_SET 64AC_PROG_MAKE_SET
62AC_PROG_RANLIB 65AC_PROG_RANLIB
63 66
64AC_ISC_POSIX
65
66AC_ARG_ENABLE(iftype, 67AC_ARG_ENABLE(iftype,
67 [AC_HELP_STRING(--enable-iftype[=TYPE/SUBTYPE], [ 68 [AC_HELP_STRING(--enable-iftype[=TYPE/SUBTYPE], [
68 Use kernel/net device interface TYPE/SUBTYPE. 69 Use kernel/net device interface TYPE/SUBTYPE.
69 Working combinations are: 70 Working combinations are:
70 "native/linux" 71 "native/linux"
71 "tincd/linux" 72 "tincd/linux"
72 "tincd/freebsd"; 73 "tincd/freebsd"
74 "tincd/openbsd"
75 "tincd/darwin"
76 "native/cygwin";
73 Untested combinations are: 77 Untested combinations are:
74 "tincd/netbsd" 78 "tincd/netbsd"
75 "tincd/darwin"
76 "tincd/solaris" 79 "tincd/solaris"
77 "tincd/openbsd"; 80 "tincd/mingw";
78 Broken combinations are: 81 Broken combinations are:
79 "tincd/cygwin"; 82 "tincd/cygwin";
80 The default is to autodetect. 83 The default is to autodetect.
81 ])], 84 ])],
82 [ 85 [
119 IFTYPE=tincd 122 IFTYPE=tincd
120 IFSUBTYPE=netbsd 123 IFSUBTYPE=netbsd
121 AC_DEFINE(HAVE_NETBSD, 1, [NetBSD]) 124 AC_DEFINE(HAVE_NETBSD, 1, [NetBSD])
122 ;; 125 ;;
123 *cygwin*) 126 *cygwin*)
124 IFTYPE=tincd 127 IFTYPE=native
125 IFSUBTYPE=cygwin 128 IFSUBTYPE=cygwin
126 AC_DEFINE(HAVE_CYGWIN, 1, [Cygwin]) 129 AC_DEFINE(HAVE_CYGWIN, 1, [Cygwin])
127 ;; 130 ;;
128 *) 131 *)
129 AC_MSG_ERROR("Unknown operating system.") 132 AC_MSG_ERROR("Unknown operating system.")
131 esac 134 esac
132fi 135fi
133AC_MSG_RESULT($IFTYPE/$IFSUBTYPE) 136AC_MSG_RESULT($IFTYPE/$IFSUBTYPE)
134AC_SUBST(IFTYPE,$IFTYPE) 137AC_SUBST(IFTYPE,$IFTYPE)
135AC_SUBST(IFSUBTYPE,$IFSUBTYPE) 138AC_SUBST(IFSUBTYPE,$IFSUBTYPE)
139AC_DEFINE_UNQUOTED(IFTYPE,"$IFTYPE",[kernel interface type])
140AC_DEFINE_UNQUOTED(IFSUBTYPE,"$IFSUBTYPE",[kernel interface subtype])
136 141
137AC_CACHE_SAVE 142AC_CACHE_SAVE
138 143
139dnl Checks for libraries. 144dnl Checks for libraries.
140 145
141AC_LANG(C++) 146AC_LANG(C++)
142AC_CHECK_HEADERS(ext/hash_map) 147AC_CHECK_HEADERS(ext/hash_map)
143 148
144dnl Checks for header files. 149dnl Checks for header files.
145AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h malloc.h stdint.h strings.h syslog.h unistd.h \ 150AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h malloc.h stdint.h strings.h syslog.h unistd.h \
146 sys/file.h sys/ioctl.h sys/param.h sys/time.h netinet/in_systm.h sys/cygwin.h arpa/inet.h \ 151 sys/file.h sys/ioctl.h sys/param.h sys/time.h netinet/in_systm.h sys/cygwin.h \
147 sys/poll.h sys/mman.h netinet/in.h]) 152 sys/mman.h netinet/in.h])
148AC_CHECK_HEADERS([net/ethernet.h net/if.h netinet/ip.h netinet/tcp.h netinet/in_systm.h], [], [], 153AC_CHECK_HEADERS([arpa/inet.h net/ethernet.h net/if.h netinet/ip.h netinet/tcp.h netinet/in_systm.h], [], [],
149[ 154[
150#include <sys/types.h> 155#include <sys/types.h>
151#include <sys/socket.h> 156#include <sys/socket.h>
152#ifdef HAVE_NETINET_IN_H 157#ifdef HAVE_NETINET_IN_H
153# include <netinet/in.h> 158# include <netinet/in.h>
200AC_LANG_PUSH(C) 205AC_LANG_PUSH(C)
201 206
202AC_HEADER_STDC 207AC_HEADER_STDC
203 208
204dnl argl, could somebody catapult darwin into the 21st century??? 209dnl argl, could somebody catapult darwin into the 21st century???
205AC_CHECK_FUNCS(asprintf daemon get_current_dir_name putenv select strerror strsignal strtol unsetenv mlockall poll) 210AC_CHECK_FUNCS(asprintf daemon get_current_dir_name putenv select strerror strsignal strtol unsetenv mlockall)
206 211
207AC_FUNC_ALLOCA 212AC_FUNC_ALLOCA
208 213
209dnl Support for SunOS 214dnl Support for SunOS
210 215
221 226
222AC_CACHE_SAVE 227AC_CACHE_SAVE
223 228
224dnl These are defined in files in m4/ 229dnl These are defined in files in m4/
225tinc_TUNTAP 230tinc_TUNTAP
231
226tinc_OPENSSL 232tinc_OPENSSL
233if test "x$openssl_include" != x; then
227CXXFLAGS="$CXXFLAGS -I$openssl_include" 234 CXXFLAGS="$CXXFLAGS -I$openssl_include"
235fi
228dnl tinc_ZLIB 236dnl tinc_ZLIB
229 237
230AC_ARG_ENABLE(rohc, 238AC_ARG_ENABLE(rohc,
231 [AC_HELP_STRING(--enable-rohc, [enable robust header compression (rfc3095).])], 239 [AC_HELP_STRING(--enable-rohc, [enable robust header compression (rfc3095).])],
232 [ 240 [
233 echo 241 echo
234 echo "**********************************************************************" 242 echo "**********************************************************************"
235 echo "**********************************************************************" 243 echo "**********************************************************************"
236 echo "**** --enable-rohc not yet implemented *******************************" 244 echo "**** --enable-rohc is highly experimental, do not use ****************"
237 echo "**********************************************************************"
238 echo "**** uuh sorry, I am such an ass, but I didn't find any rfc3095 (ROHC)"
239 echo "**** implementation to be used in GPL code on the web."
240 echo "**** so this option is just a fake. Please implement one and send it"
241 echo "**** to me ;)"
242 echo "**********************************************************************"
243 echo "**********************************************************************"
244 echo "**********************************************************************" 245 echo "**********************************************************************"
245 echo "**********************************************************************" 246 echo "**********************************************************************"
246 echo 247 echo
248 rohc=true
249 AC_DEFINE_UNQUOTED(ENABLE_ROHC, 1, [ROHC support])
247 ] 250 ]
248) 251)
252
253AM_CONDITIONAL(ROHC, test x$rohc = xtrue)
249 254
250AC_ARG_ENABLE(icmp, 255AC_ARG_ENABLE(icmp,
251 [AC_HELP_STRING(--enable-icmp, [enable icmp protocol support (default disabled).])], 256 [AC_HELP_STRING(--enable-icmp, [enable icmp protocol support (default disabled).])],
252 AC_DEFINE_UNQUOTED(ENABLE_ICMP, 1, [ICMP protocol support.]) 257 AC_DEFINE_UNQUOTED(ENABLE_ICMP, 1, [ICMP protocol support.])
253) 258)
254 259
255AC_ARG_ENABLE(tcp, 260AC_ARG_ENABLE(tcp,
256 [AC_HELP_STRING(--enable-tcp, [enable tcp protocol support (default disabled).])], 261 [AC_HELP_STRING(--enable-tcp, [enable tcp protocol support (default disabled).])],
257 AC_DEFINE_UNQUOTED(ENABLE_TCP, 1, [TCP protocol support.]) 262 AC_DEFINE_UNQUOTED(ENABLE_TCP, 1, [TCP protocol support.])
263)
264
265AC_ARG_ENABLE(dns,
266 [AC_HELP_STRING(--enable-dns, [enable dns tunnel protocol support (DOES NOT WORK).])],
267 AC_DEFINE_UNQUOTED(ENABLE_DNS, 1, [DNS tunnel protocol support.])
258) 268)
259 269
260AC_ARG_ENABLE(http-proxy, 270AC_ARG_ENABLE(http-proxy,
261 [AC_HELP_STRING(--enable-http-proxy, [enable http proxy connect support (default disabled).])], 271 [AC_HELP_STRING(--enable-http-proxy, [enable http proxy connect support (default disabled).])],
262 AC_DEFINE_UNQUOTED(ENABLE_HTTP_PROXY, 1, [http proxy connect support.]) 272 AC_DEFINE_UNQUOTED(ENABLE_HTTP_PROXY, 1, [http proxy connect support.])
322 332
323if $CXX -v --help 2>&1 | grep -q fexceptions; then 333if $CXX -v --help 2>&1 | grep -q fexceptions; then
324 CXXFLAGS="$CXXFLAGS -fno-exceptions" 334 CXXFLAGS="$CXXFLAGS -fno-exceptions"
325fi 335fi
326 336
327if $CXX -v --help 2>&1 | grep -q ffunction-sections; then 337dnl if $CXX -v --help 2>&1 | grep -q ffunction-sections; then
328 CXXFLAGS="$CXXFLAGS -ffunction-sections" 338dnl CXXFLAGS="$CXXFLAGS -ffunction-sections"
329fi 339dnl fi
330 340dnl
331if $LD -v --help 2>&1 | grep -q gc-sections; then 341dnl if $LD -v --help 2>&1 | grep -q gc-sections; then
332 LDFLAGS="$LDFLAGS -Wl,--gc-sections" 342dnl LDFLAGS="$LDFLAGS -Wl,--gc-sections"
333fi 343dnl fi
334 344
335AC_CONFIG_COMMANDS_POST([ 345AC_CONFIG_COMMANDS_POST([
336 346
337echo 347echo
338echo "***" 348echo "***"
343echo "*** Digest used: $DIGEST" 353echo "*** Digest used: $DIGEST"
344echo "*** HMAC length: $HMAC" 354echo "*** HMAC length: $HMAC"
345echo "*** RAND used: $RAND" 355echo "*** RAND used: $RAND"
346echo "*** Max. MTU: $MTU" 356echo "*** Max. MTU: $MTU"
347echo "*** Compression: $COMPRESS" 357echo "*** Compression: $COMPRESS"
348echo "***"
349 358
350if test "x$DIGEST" = xmd4; then 359if test "x$DIGEST" = xmd4; then
351echo "*** WARNING" 360echo "***"
352echo "*** The digest you have chosen ($DIGEST) is known to be insecure" 361echo "*** WARNING: The digest you have chosen ($DIGEST) is known to be insecure"
353echo "***"
354fi 362fi
363
364if test "$HMAC" -lt 12; then
365echo "***"
366echo "*** WARNING: The hmac length you have chosen ($HMAC) is probably insecure"
367fi
368
369if test "$RAND" -lt 8; then
370echo "***"
371echo "*** WARNING: The random prefix you have chosen ($RAND) is probably insecure"
372fi
373
374echo "***"
355 375
356echo 376echo
357 377
358]) 378])
359 379
360AC_SUBST(INCLUDES) 380AC_SUBST(INCLUDES)
361 381
362AC_OUTPUT(Makefile po/Makefile.in 382AC_OUTPUT(Makefile po/Makefile.in
363src/Makefile 383src/Makefile
384src/rohc/Makefile
364doc/Makefile 385doc/Makefile
365lib/Makefile 386lib/Makefile
366m4/Makefile 387m4/Makefile
367) 388)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines