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 |
… | |
… | |
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 | |
66 | |
64 | AC_ISC_POSIX |
|
|
65 | |
|
|
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: |
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 | [ |
… | |
… | |
131 | esac |
134 | esac |
132 | fi |
135 | fi |
133 | AC_MSG_RESULT($IFTYPE/$IFSUBTYPE) |
136 | AC_MSG_RESULT($IFTYPE/$IFSUBTYPE) |
134 | AC_SUBST(IFTYPE,$IFTYPE) |
137 | AC_SUBST(IFTYPE,$IFTYPE) |
135 | 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]) |
136 | |
141 | |
137 | AC_CACHE_SAVE |
142 | AC_CACHE_SAVE |
138 | |
143 | |
139 | dnl Checks for libraries. |
144 | dnl Checks for libraries. |
140 | |
145 | |
141 | AC_LANG(C++) |
146 | AC_LANG(C++) |
142 | AC_CHECK_HEADERS(ext/hash_map) |
147 | AC_CHECK_HEADERS(ext/hash_map) |
143 | |
148 | |
144 | dnl Checks for header files. |
149 | dnl Checks for header files. |
145 | 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 \ |
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]) |
148 | 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], [], [], |
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> |
… | |
… | |
200 | AC_LANG_PUSH(C) |
205 | AC_LANG_PUSH(C) |
201 | |
206 | |
202 | AC_HEADER_STDC |
207 | AC_HEADER_STDC |
203 | |
208 | |
204 | dnl argl, could somebody catapult darwin into the 21st century??? |
209 | dnl argl, could somebody catapult darwin into the 21st century??? |
205 | 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) |
206 | |
211 | |
207 | AC_FUNC_ALLOCA |
212 | AC_FUNC_ALLOCA |
208 | |
213 | |
209 | dnl Support for SunOS |
214 | dnl Support for SunOS |
210 | |
215 | |
… | |
… | |
234 | [AC_HELP_STRING(--enable-rohc, [enable robust header compression (rfc3095).])], |
239 | [AC_HELP_STRING(--enable-rohc, [enable robust header compression (rfc3095).])], |
235 | [ |
240 | [ |
236 | echo |
241 | echo |
237 | echo "**********************************************************************" |
242 | echo "**********************************************************************" |
238 | echo "**********************************************************************" |
243 | echo "**********************************************************************" |
239 | echo "**** --enable-rohc not yet implemented *******************************" |
244 | echo "**** --enable-rohc is highly experimental, do not use ****************" |
240 | echo "**********************************************************************" |
|
|
241 | echo "**** uuh sorry, I am such an ass, but I didn't find any rfc3095 (ROHC)" |
|
|
242 | echo "**** implementation to be used in GPL code on the web." |
|
|
243 | echo "**** so this option is just a fake. Please implement one and send it" |
|
|
244 | echo "**** to me ;)" |
|
|
245 | echo "**********************************************************************" |
|
|
246 | echo "**********************************************************************" |
|
|
247 | echo "**********************************************************************" |
245 | echo "**********************************************************************" |
248 | echo "**********************************************************************" |
246 | echo "**********************************************************************" |
249 | echo |
247 | echo |
|
|
248 | rohc=true |
|
|
249 | AC_DEFINE_UNQUOTED(ENABLE_ROHC, 1, [ROHC support]) |
250 | ] |
250 | ] |
251 | ) |
251 | ) |
|
|
252 | |
|
|
253 | AM_CONDITIONAL(ROHC, test x$rohc = xtrue) |
252 | |
254 | |
253 | AC_ARG_ENABLE(icmp, |
255 | AC_ARG_ENABLE(icmp, |
254 | [AC_HELP_STRING(--enable-icmp, [enable icmp protocol support (default disabled).])], |
256 | [AC_HELP_STRING(--enable-icmp, [enable icmp protocol support (default disabled).])], |
255 | AC_DEFINE_UNQUOTED(ENABLE_ICMP, 1, [ICMP protocol support.]) |
257 | AC_DEFINE_UNQUOTED(ENABLE_ICMP, 1, [ICMP protocol support.]) |
256 | ) |
258 | ) |
… | |
… | |
263 | AC_ARG_ENABLE(http-proxy, |
265 | AC_ARG_ENABLE(http-proxy, |
264 | [AC_HELP_STRING(--enable-http-proxy, [enable http proxy connect support (default disabled).])], |
266 | [AC_HELP_STRING(--enable-http-proxy, [enable http proxy connect support (default disabled).])], |
265 | AC_DEFINE_UNQUOTED(ENABLE_HTTP_PROXY, 1, [http proxy connect support.]) |
267 | AC_DEFINE_UNQUOTED(ENABLE_HTTP_PROXY, 1, [http proxy connect support.]) |
266 | ) |
268 | ) |
267 | |
269 | |
268 | HMAC=12 dnl see also the AC_HELP_STRING |
270 | HMAC=8 dnl see also the AC_HELP_STRING |
269 | AC_ARG_ENABLE(hmac-length, |
271 | AC_ARG_ENABLE(hmac-length, |
270 | [AC_HELP_STRING(--enable-hmac-length=BYTES, [use a hmac of length BYTES bytes (default 12). Allowed values are 4, 8, 12, 16.])], |
272 | [AC_HELP_STRING(--enable-hmac-length=BYTES, [use a hmac of length BYTES bytes (default 12). Allowed values are 4, 8, 12, 16.])], |
271 | HMAC=$enableval |
273 | HMAC=$enableval |
272 | ) |
274 | ) |
273 | AC_DEFINE_UNQUOTED(HMACLENGTH, $HMAC, [Size of HMAC in each packet in bytes.]) |
275 | AC_DEFINE_UNQUOTED(HMACLENGTH, $HMAC, [Size of HMAC in each packet in bytes.]) |
… | |
… | |
325 | |
327 | |
326 | if $CXX -v --help 2>&1 | grep -q fexceptions; then |
328 | if $CXX -v --help 2>&1 | grep -q fexceptions; then |
327 | CXXFLAGS="$CXXFLAGS -fno-exceptions" |
329 | CXXFLAGS="$CXXFLAGS -fno-exceptions" |
328 | fi |
330 | fi |
329 | |
331 | |
330 | if $CXX -v --help 2>&1 | grep -q ffunction-sections; then |
332 | dnl if $CXX -v --help 2>&1 | grep -q ffunction-sections; then |
331 | CXXFLAGS="$CXXFLAGS -ffunction-sections" |
333 | dnl CXXFLAGS="$CXXFLAGS -ffunction-sections" |
332 | fi |
334 | dnl fi |
333 | |
335 | dnl |
334 | if $LD -v --help 2>&1 | grep -q gc-sections; then |
336 | dnl if $LD -v --help 2>&1 | grep -q gc-sections; then |
335 | LDFLAGS="$LDFLAGS -Wl,--gc-sections" |
337 | dnl LDFLAGS="$LDFLAGS -Wl,--gc-sections" |
336 | fi |
338 | dnl fi |
337 | |
339 | |
338 | AC_CONFIG_COMMANDS_POST([ |
340 | AC_CONFIG_COMMANDS_POST([ |
339 | |
341 | |
340 | echo |
342 | echo |
341 | echo "***" |
343 | echo "***" |
… | |
… | |
346 | echo "*** Digest used: $DIGEST" |
348 | echo "*** Digest used: $DIGEST" |
347 | echo "*** HMAC length: $HMAC" |
349 | echo "*** HMAC length: $HMAC" |
348 | echo "*** RAND used: $RAND" |
350 | echo "*** RAND used: $RAND" |
349 | echo "*** Max. MTU: $MTU" |
351 | echo "*** Max. MTU: $MTU" |
350 | echo "*** Compression: $COMPRESS" |
352 | echo "*** Compression: $COMPRESS" |
351 | echo "***" |
|
|
352 | |
353 | |
353 | if test "x$DIGEST" = xmd4; then |
354 | if test "x$DIGEST" = xmd4; then |
354 | echo "*** WARNING" |
355 | echo "***" |
355 | echo "*** The digest you have chosen ($DIGEST) is known to be insecure" |
356 | echo "*** WARNING: The digest you have chosen ($DIGEST) is known to be insecure" |
356 | echo "***" |
|
|
357 | fi |
357 | fi |
|
|
358 | |
|
|
359 | if test "$HMAC" -lt 12; then |
|
|
360 | echo "***" |
|
|
361 | echo "*** WARNING: The hmac length you have chosen ($HMAC) might be insecure" |
|
|
362 | fi |
|
|
363 | |
|
|
364 | if test "$RAND" -lt 8; then |
|
|
365 | echo "***" |
|
|
366 | echo "*** WARNING: The random prefix you have chosen ($RAND) might be insecure" |
|
|
367 | fi |
|
|
368 | |
|
|
369 | echo "***" |
358 | |
370 | |
359 | echo |
371 | echo |
360 | |
372 | |
361 | ]) |
373 | ]) |
362 | |
374 | |
363 | AC_SUBST(INCLUDES) |
375 | AC_SUBST(INCLUDES) |
364 | |
376 | |
365 | AC_OUTPUT(Makefile po/Makefile.in |
377 | AC_OUTPUT(Makefile po/Makefile.in |
366 | src/Makefile |
378 | src/Makefile |
|
|
379 | src/rohc/Makefile |
367 | doc/Makefile |
380 | doc/Makefile |
368 | lib/Makefile |
381 | lib/Makefile |
369 | m4/Makefile |
382 | m4/Makefile |
370 | ) |
383 | ) |