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.2) |
6 | AM_INIT_AUTOMAKE(vpe, 1.5) |
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__ |
… | |
… | |
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. |
48 | AC_DEFINE([_GNU_SOURCE], 1, [Enable GNU extenstions]) |
48 | AC_DEFINE([_GNU_SOURCE], 1, [Enable GNU extenstions]) |
49 | AC_DEFINE([__USE_BSD], 1, [Enable BSD extensions]) |
49 | |
|
|
50 | # do NOT define POSIX_SOURCE, sicne this clashes with many BSDs |
|
|
51 | dnl AC_DEFINE([_POSIX_SOURCE], 1, [Enable POSIX 1003.1 extensions]) |
|
|
52 | dnl AC_DEFINE([_XOPEN_SOURCE], 500, [Enable XOPEN extensions]) |
50 | |
53 | |
51 | ALL_LINGUAS="" |
54 | ALL_LINGUAS="" |
52 | |
55 | |
53 | dnl Checks for programs. |
56 | dnl Checks for programs. |
54 | AC_PROG_CC |
57 | AC_PROG_CC |
… | |
… | |
58 | AC_PROG_AWK |
61 | AC_PROG_AWK |
59 | AC_PROG_INSTALL |
62 | AC_PROG_INSTALL |
60 | AC_PROG_LN_S |
63 | AC_PROG_LN_S |
61 | AC_PROG_MAKE_SET |
64 | AC_PROG_MAKE_SET |
62 | AC_PROG_RANLIB |
65 | AC_PROG_RANLIB |
63 | |
|
|
64 | AC_ISC_POSIX |
|
|
65 | |
66 | |
66 | AC_ARG_ENABLE(iftype, |
67 | AC_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: |
… | |
… | |
133 | esac |
134 | esac |
134 | fi |
135 | fi |
135 | AC_MSG_RESULT($IFTYPE/$IFSUBTYPE) |
136 | AC_MSG_RESULT($IFTYPE/$IFSUBTYPE) |
136 | AC_SUBST(IFTYPE,$IFTYPE) |
137 | AC_SUBST(IFTYPE,$IFTYPE) |
137 | AC_SUBST(IFSUBTYPE,$IFSUBTYPE) |
138 | AC_SUBST(IFSUBTYPE,$IFSUBTYPE) |
|
|
139 | AC_DEFINE_UNQUOTED(IFTYPE,"$IFTYPE",[kernel interface type]) |
|
|
140 | AC_DEFINE_UNQUOTED(IFSUBTYPE,"$IFSUBTYPE",[kernel interface subtype]) |
138 | |
141 | |
139 | AC_CACHE_SAVE |
142 | AC_CACHE_SAVE |
140 | |
143 | |
141 | dnl Checks for libraries. |
144 | dnl Checks for libraries. |
142 | |
145 | |
143 | AC_LANG(C++) |
146 | AC_LANG(C++) |
144 | AC_CHECK_HEADERS(ext/hash_map) |
147 | AC_CHECK_HEADERS(ext/hash_map) |
145 | |
148 | |
146 | dnl Checks for header files. |
149 | dnl Checks for header files. |
147 | AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h malloc.h stdint.h strings.h syslog.h unistd.h \ |
150 | AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h malloc.h stdint.h strings.h syslog.h unistd.h \ |
148 | 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 \ |
149 | sys/poll.h sys/mman.h netinet/in.h]) |
152 | sys/mman.h netinet/in.h]) |
150 | AC_CHECK_HEADERS([net/ethernet.h net/if.h netinet/ip.h netinet/tcp.h netinet/in_systm.h], [], [], |
153 | AC_CHECK_HEADERS([arpa/inet.h net/ethernet.h net/if.h netinet/ip.h netinet/tcp.h netinet/in_systm.h], [], [], |
151 | [ |
154 | [ |
152 | #include <sys/types.h> |
155 | #include <sys/types.h> |
153 | #include <sys/socket.h> |
156 | #include <sys/socket.h> |
154 | #ifdef HAVE_NETINET_IN_H |
157 | #ifdef HAVE_NETINET_IN_H |
155 | # include <netinet/in.h> |
158 | # include <netinet/in.h> |
… | |
… | |
202 | AC_LANG_PUSH(C) |
205 | AC_LANG_PUSH(C) |
203 | |
206 | |
204 | AC_HEADER_STDC |
207 | AC_HEADER_STDC |
205 | |
208 | |
206 | dnl argl, could somebody catapult darwin into the 21st century??? |
209 | dnl argl, could somebody catapult darwin into the 21st century??? |
207 | AC_CHECK_FUNCS(asprintf daemon get_current_dir_name putenv select strerror strsignal strtol unsetenv mlockall poll) |
210 | AC_CHECK_FUNCS(asprintf daemon get_current_dir_name putenv select strerror strsignal strtol unsetenv mlockall) |
208 | |
211 | |
209 | AC_FUNC_ALLOCA |
212 | AC_FUNC_ALLOCA |
210 | |
213 | |
211 | dnl Support for SunOS |
214 | dnl Support for SunOS |
212 | |
215 | |
… | |
… | |
327 | |
330 | |
328 | if $CXX -v --help 2>&1 | grep -q fexceptions; then |
331 | if $CXX -v --help 2>&1 | grep -q fexceptions; then |
329 | CXXFLAGS="$CXXFLAGS -fno-exceptions" |
332 | CXXFLAGS="$CXXFLAGS -fno-exceptions" |
330 | fi |
333 | fi |
331 | |
334 | |
332 | if $CXX -v --help 2>&1 | grep -q ffunction-sections; then |
335 | dnl if $CXX -v --help 2>&1 | grep -q ffunction-sections; then |
333 | CXXFLAGS="$CXXFLAGS -ffunction-sections" |
336 | dnl CXXFLAGS="$CXXFLAGS -ffunction-sections" |
334 | fi |
337 | dnl fi |
335 | |
338 | dnl |
336 | if $LD -v --help 2>&1 | grep -q gc-sections; then |
339 | dnl if $LD -v --help 2>&1 | grep -q gc-sections; then |
337 | LDFLAGS="$LDFLAGS -Wl,--gc-sections" |
340 | dnl LDFLAGS="$LDFLAGS -Wl,--gc-sections" |
338 | fi |
341 | dnl fi |
339 | |
342 | |
340 | AC_CONFIG_COMMANDS_POST([ |
343 | AC_CONFIG_COMMANDS_POST([ |
341 | |
344 | |
342 | echo |
345 | echo |
343 | echo "***" |
346 | echo "***" |
… | |
… | |
348 | echo "*** Digest used: $DIGEST" |
351 | echo "*** Digest used: $DIGEST" |
349 | echo "*** HMAC length: $HMAC" |
352 | echo "*** HMAC length: $HMAC" |
350 | echo "*** RAND used: $RAND" |
353 | echo "*** RAND used: $RAND" |
351 | echo "*** Max. MTU: $MTU" |
354 | echo "*** Max. MTU: $MTU" |
352 | echo "*** Compression: $COMPRESS" |
355 | echo "*** Compression: $COMPRESS" |
353 | echo "***" |
|
|
354 | |
356 | |
355 | if test "x$DIGEST" = xmd4; then |
357 | if test "x$DIGEST" = xmd4; then |
356 | echo "*** WARNING" |
358 | echo "***" |
357 | echo "*** The digest you have chosen ($DIGEST) is known to be insecure" |
359 | echo "*** WARNING: The digest you have chosen ($DIGEST) is known to be insecure" |
358 | echo "***" |
|
|
359 | fi |
360 | fi |
|
|
361 | |
|
|
362 | if test "$HMAC" -lt 12; then |
|
|
363 | echo "***" |
|
|
364 | echo "*** WARNING: The hmac length you have chosen ($HMAC) might be insecure" |
|
|
365 | fi |
|
|
366 | |
|
|
367 | if test "$RAND" -lt 8; then |
|
|
368 | echo "***" |
|
|
369 | echo "*** WARNING: The random prefix you have chosen ($RAND) might be insecure" |
|
|
370 | fi |
|
|
371 | |
|
|
372 | echo "***" |
360 | |
373 | |
361 | echo |
374 | echo |
362 | |
375 | |
363 | ]) |
376 | ]) |
364 | |
377 | |