3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr
16 --with-pf_packet=[yes,no] override defaults"
18 --with-fast_x86_check=[yes,no] override defaults"
20 # Initialize some variables set by options.
21 # The variables have the same names as the options, with
22 # dashes changed to underlines.
24 cache_file=./config.cache
33 program_transform_name=s,x,x,
41 bindir='${exec_prefix}/bin'
42 sbindir='${exec_prefix}/sbin'
43 libexecdir='${exec_prefix}/libexec'
44 datadir='${prefix}/share'
45 sysconfdir='${prefix}/etc'
46 sharedstatedir='${prefix}/com'
47 localstatedir='${prefix}/var'
48 libdir='${exec_prefix}/lib'
49 includedir='${prefix}/include'
50 oldincludedir='/usr/include'
51 infodir='${prefix}/info'
52 mandir='${prefix}/man'
54 # Initialize some other variables.
57 SHELL=${CONFIG_SHELL-/bin/sh}
58 # Maximum number of lines to put in a shell here document.
65 # If the previous option needs an argument, assign it.
66 if test -n "$ac_prev"; then
67 eval "$ac_prev=\$ac_option"
73 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
77 # Accept the important Cygnus configure options, so we can diagnose typos.
81 -bindir | --bindir | --bindi | --bind | --bin | --bi)
83 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
84 bindir="$ac_optarg" ;;
86 -build | --build | --buil | --bui | --bu)
88 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
91 -cache-file | --cache-file | --cache-fil | --cache-fi \
92 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
94 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
95 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
96 cache_file="$ac_optarg" ;;
98 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
100 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
102 datadir="$ac_optarg" ;;
104 -disable-* | --disable-*)
105 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
106 # Reject names that are not valid shell variable names.
107 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
108 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
110 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
111 eval "enable_${ac_feature}=no" ;;
113 -enable-* | --enable-*)
114 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
115 # Reject names that are not valid shell variable names.
116 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
117 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
119 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
124 eval "enable_${ac_feature}='$ac_optarg'" ;;
126 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
127 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
128 | --exec | --exe | --ex)
129 ac_prev=exec_prefix ;;
130 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
131 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
132 | --exec=* | --exe=* | --ex=*)
133 exec_prefix="$ac_optarg" ;;
135 -gas | --gas | --ga | --g)
136 # Obsolete; use --with-gas.
139 -help | --help | --hel | --he)
140 # Omit some internal or obsolete options to make the list less imposing.
141 # This message is too long to be a string in the A/UX 3.1 sh.
143 Usage: configure [options] [host]
144 Options: [defaults in brackets after descriptions]
146 --cache-file=FILE cache test results in FILE
147 --help print this message
148 --no-create do not create output files
149 --quiet, --silent do not print \`checking...' messages
150 --version print the version of autoconf that created configure
151 Directory and file names:
152 --prefix=PREFIX install architecture-independent files in PREFIX
154 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
156 --bindir=DIR user executables in DIR [EPREFIX/bin]
157 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
158 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
159 --datadir=DIR read-only architecture-independent data in DIR
161 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
162 --sharedstatedir=DIR modifiable architecture-independent data in DIR
164 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
165 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
166 --includedir=DIR C header files in DIR [PREFIX/include]
167 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
168 --infodir=DIR info documentation in DIR [PREFIX/info]
169 --mandir=DIR man documentation in DIR [PREFIX/man]
170 --srcdir=DIR find the sources in DIR [configure dir or ..]
171 --program-prefix=PREFIX prepend PREFIX to installed program names
172 --program-suffix=SUFFIX append SUFFIX to installed program names
173 --program-transform-name=PROGRAM
174 run sed PROGRAM on installed program names
178 --build=BUILD configure for building on BUILD [BUILD=HOST]
179 --host=HOST configure for HOST [guessed]
180 --target=TARGET configure for TARGET [TARGET=HOST]
181 Features and packages:
182 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
183 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
184 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
185 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
186 --x-includes=DIR X include files are in DIR
187 --x-libraries=DIR X library files are in DIR
189 if test -n "$ac_help"; then
190 echo "--enable and --with options recognized:$ac_help"
194 -host | --host | --hos | --ho)
196 -host=* | --host=* | --hos=* | --ho=*)
199 -includedir | --includedir | --includedi | --included | --include \
200 | --includ | --inclu | --incl | --inc)
201 ac_prev=includedir ;;
202 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
203 | --includ=* | --inclu=* | --incl=* | --inc=*)
204 includedir="$ac_optarg" ;;
206 -infodir | --infodir | --infodi | --infod | --info | --inf)
208 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
209 infodir="$ac_optarg" ;;
211 -libdir | --libdir | --libdi | --libd)
213 -libdir=* | --libdir=* | --libdi=* | --libd=*)
214 libdir="$ac_optarg" ;;
216 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
217 | --libexe | --libex | --libe)
218 ac_prev=libexecdir ;;
219 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
220 | --libexe=* | --libex=* | --libe=*)
221 libexecdir="$ac_optarg" ;;
223 -localstatedir | --localstatedir | --localstatedi | --localstated \
224 | --localstate | --localstat | --localsta | --localst \
225 | --locals | --local | --loca | --loc | --lo)
226 ac_prev=localstatedir ;;
227 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
228 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
229 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
230 localstatedir="$ac_optarg" ;;
232 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
234 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
235 mandir="$ac_optarg" ;;
238 # Obsolete; use --without-fp.
241 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
245 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
246 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
249 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
250 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
251 | --oldin | --oldi | --old | --ol | --o)
252 ac_prev=oldincludedir ;;
253 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
254 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
255 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
256 oldincludedir="$ac_optarg" ;;
258 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
260 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
261 prefix="$ac_optarg" ;;
263 -program-prefix | --program-prefix | --program-prefi | --program-pref \
264 | --program-pre | --program-pr | --program-p)
265 ac_prev=program_prefix ;;
266 -program-prefix=* | --program-prefix=* | --program-prefi=* \
267 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
268 program_prefix="$ac_optarg" ;;
270 -program-suffix | --program-suffix | --program-suffi | --program-suff \
271 | --program-suf | --program-su | --program-s)
272 ac_prev=program_suffix ;;
273 -program-suffix=* | --program-suffix=* | --program-suffi=* \
274 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
275 program_suffix="$ac_optarg" ;;
277 -program-transform-name | --program-transform-name \
278 | --program-transform-nam | --program-transform-na \
279 | --program-transform-n | --program-transform- \
280 | --program-transform | --program-transfor \
281 | --program-transfo | --program-transf \
282 | --program-trans | --program-tran \
283 | --progr-tra | --program-tr | --program-t)
284 ac_prev=program_transform_name ;;
285 -program-transform-name=* | --program-transform-name=* \
286 | --program-transform-nam=* | --program-transform-na=* \
287 | --program-transform-n=* | --program-transform-=* \
288 | --program-transform=* | --program-transfor=* \
289 | --program-transfo=* | --program-transf=* \
290 | --program-trans=* | --program-tran=* \
291 | --progr-tra=* | --program-tr=* | --program-t=*)
292 program_transform_name="$ac_optarg" ;;
294 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
295 | -silent | --silent | --silen | --sile | --sil)
298 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
300 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
302 sbindir="$ac_optarg" ;;
304 -sharedstatedir | --sharedstatedir | --sharedstatedi \
305 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
306 | --sharedst | --shareds | --shared | --share | --shar \
308 ac_prev=sharedstatedir ;;
309 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
310 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
311 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
313 sharedstatedir="$ac_optarg" ;;
315 -site | --site | --sit)
317 -site=* | --site=* | --sit=*)
320 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
322 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
323 srcdir="$ac_optarg" ;;
325 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
326 | --syscon | --sysco | --sysc | --sys | --sy)
327 ac_prev=sysconfdir ;;
328 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
329 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
330 sysconfdir="$ac_optarg" ;;
332 -target | --target | --targe | --targ | --tar | --ta | --t)
334 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
335 target="$ac_optarg" ;;
337 -v | -verbose | --verbose | --verbos | --verbo | --verb)
340 -version | --version | --versio | --versi | --vers)
341 echo "configure generated by autoconf version 2.13"
345 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
346 # Reject names that are not valid shell variable names.
347 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
348 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
350 ac_package=`echo $ac_package| sed 's/-/_/g'`
355 eval "with_${ac_package}='$ac_optarg'" ;;
357 -without-* | --without-*)
358 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
359 # Reject names that are not valid shell variable names.
360 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
361 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
363 ac_package=`echo $ac_package| sed 's/-/_/g'`
364 eval "with_${ac_package}=no" ;;
367 # Obsolete; use --with-x.
370 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
371 | --x-incl | --x-inc | --x-in | --x-i)
372 ac_prev=x_includes ;;
373 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
374 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
375 x_includes="$ac_optarg" ;;
377 -x-libraries | --x-libraries | --x-librarie | --x-librari \
378 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
379 ac_prev=x_libraries ;;
380 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
381 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
382 x_libraries="$ac_optarg" ;;
384 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
388 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
389 echo "configure: warning: $ac_option: invalid host type" 1>&2
391 if test "x$nonopt" != xNONE; then
392 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
400 if test -n "$ac_prev"; then
401 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
404 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
406 # File descriptor usage:
409 # 2 errors and warnings
410 # 3 some systems may open it to /dev/tty
411 # 4 used on the Kubota Titan
412 # 6 checking for... messages and results
413 # 5 compiler messages saved in config.log
414 if test "$silent" = yes; then
422 This file contains any messages produced by compilers while
423 running configure, to aid debugging if configure makes a mistake.
426 # Strip out --no-create and --no-recursion so they do not pile up.
427 # Also quote any args containing shell metacharacters.
432 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
433 | --no-cr | --no-c) ;;
434 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
435 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
436 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
437 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
438 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
443 # Only set these to C if already set. These must not be set unconditionally
444 # because not all systems understand e.g. LANG=C (notably SCO).
445 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
446 # Non-C LC_CTYPE values break the ctype check.
447 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
448 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
449 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
450 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
452 # confdefs.h avoids OS command line length limits that DEFS can exceed.
453 rm -rf conftest* confdefs.h
454 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
457 # A filename unique to this package, relative to the directory that
458 # configure is in, which we can look for to find out if srcdir is correct.
459 ac_unique_file=src/libnet_build_ip.c
461 # Find the source files, if location was not specified.
462 if test -z "$srcdir"; then
463 ac_srcdir_defaulted=yes
464 # Try the directory containing this script, then its parent.
466 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
467 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
469 if test ! -r $srcdir/$ac_unique_file; then
473 ac_srcdir_defaulted=no
475 if test ! -r $srcdir/$ac_unique_file; then
476 if test "$ac_srcdir_defaulted" = yes; then
477 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
479 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
482 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
484 # Prefer explicitly selected file to automatically selected ones.
485 if test -z "$CONFIG_SITE"; then
486 if test "x$prefix" != xNONE; then
487 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
489 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
492 for ac_site_file in $CONFIG_SITE; do
493 if test -r "$ac_site_file"; then
494 echo "loading site script $ac_site_file"
499 if test -r "$cache_file"; then
500 echo "loading cache $cache_file"
503 echo "creating cache $cache_file"
508 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
509 ac_cpp='$CPP $CPPFLAGS'
510 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
511 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
512 cross_compiling=$ac_cv_prog_cc_cross
516 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
517 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
518 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
525 ac_n= ac_c='\c' ac_t=
531 echo "$ac_t""Beginning autoconfiguration process for libnet-$VER..." 1>&6
548 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
549 if test -f $ac_dir/install-sh; then
551 ac_install_sh="$ac_aux_dir/install-sh -c"
553 elif test -f $ac_dir/install.sh; then
555 ac_install_sh="$ac_aux_dir/install.sh -c"
559 if test -z "$ac_aux_dir"; then
560 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
562 ac_config_guess=$ac_aux_dir/config.guess
563 ac_config_sub=$ac_aux_dir/config.sub
564 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
567 # Do some error checking and defaulting for the host and target type.
569 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
572 # 1. You are not allowed to specify --host, --target, and nonopt at the
574 # 2. Host defaults to nonopt.
575 # 3. If nonopt is not specified, then host defaults to the current host,
576 # as determined by config.guess.
577 # 4. Target and build default to nonopt.
578 # 5. If nonopt is not specified, then target and build default to host.
580 # The aliases save the names the user supplied, while $host etc.
581 # will get canonicalized.
582 case $host---$target---$nonopt in
583 NONE---*---* | *---NONE---* | *---*---NONE) ;;
584 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
588 # Make sure we can run config.sub.
589 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
590 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
593 echo $ac_n "checking host system type""... $ac_c" 1>&6
594 echo "configure:595: checking host system type" >&5
597 case "$host_alias" in
601 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
602 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
604 *) host_alias=$nonopt ;;
608 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
609 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
610 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
611 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
612 echo "$ac_t""$host" 1>&6
614 echo $ac_n "checking target system type""... $ac_c" 1>&6
615 echo "configure:616: checking target system type" >&5
618 case "$target_alias" in
621 NONE) target_alias=$host_alias ;;
622 *) target_alias=$nonopt ;;
626 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
627 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
628 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
629 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
630 echo "$ac_t""$target" 1>&6
632 echo $ac_n "checking build system type""... $ac_c" 1>&6
633 echo "configure:634: checking build system type" >&5
636 case "$build_alias" in
639 NONE) build_alias=$host_alias ;;
640 *) build_alias=$nonopt ;;
644 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
645 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
646 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
647 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
648 echo "$ac_t""$build" 1>&6
650 test "$host_alias" != "$target_alias" &&
651 test "$program_prefix$program_suffix$program_transform_name" = \
653 program_prefix=${target_alias}-
657 if test "$prefix" = "NONE"; then
661 # Extract the first word of "gcc", so it can be a program name with args.
662 set dummy gcc; ac_word=$2
663 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
664 echo "configure:665: checking for $ac_word" >&5
665 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
666 echo $ac_n "(cached) $ac_c" 1>&6
668 if test -n "$CC"; then
669 ac_cv_prog_CC="$CC" # Let the user override the test.
671 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
673 for ac_dir in $ac_dummy; do
674 test -z "$ac_dir" && ac_dir=.
675 if test -f $ac_dir/$ac_word; then
684 if test -n "$CC"; then
685 echo "$ac_t""$CC" 1>&6
687 echo "$ac_t""no" 1>&6
690 if test -z "$CC"; then
691 # Extract the first word of "cc", so it can be a program name with args.
692 set dummy cc; ac_word=$2
693 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
694 echo "configure:695: checking for $ac_word" >&5
695 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
696 echo $ac_n "(cached) $ac_c" 1>&6
698 if test -n "$CC"; then
699 ac_cv_prog_CC="$CC" # Let the user override the test.
701 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
704 for ac_dir in $ac_dummy; do
705 test -z "$ac_dir" && ac_dir=.
706 if test -f $ac_dir/$ac_word; then
707 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
716 if test $ac_prog_rejected = yes; then
717 # We found a bogon in the path, so make sure we never use it.
718 set dummy $ac_cv_prog_CC
720 if test $# -gt 0; then
721 # We chose a different compiler from the bogus one.
722 # However, it has the same basename, so the bogon will be chosen
723 # first if we set CC to just the basename; use the full file name.
725 set dummy "$ac_dir/$ac_word" "$@"
733 if test -n "$CC"; then
734 echo "$ac_t""$CC" 1>&6
736 echo "$ac_t""no" 1>&6
739 if test -z "$CC"; then
742 # Extract the first word of "cl", so it can be a program name with args.
743 set dummy cl; ac_word=$2
744 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
745 echo "configure:746: checking for $ac_word" >&5
746 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
747 echo $ac_n "(cached) $ac_c" 1>&6
749 if test -n "$CC"; then
750 ac_cv_prog_CC="$CC" # Let the user override the test.
752 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
754 for ac_dir in $ac_dummy; do
755 test -z "$ac_dir" && ac_dir=.
756 if test -f $ac_dir/$ac_word; then
765 if test -n "$CC"; then
766 echo "$ac_t""$CC" 1>&6
768 echo "$ac_t""no" 1>&6
773 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
776 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
777 echo "configure:778: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
780 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
781 ac_cpp='$CPP $CPPFLAGS'
782 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
783 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
784 cross_compiling=$ac_cv_prog_cc_cross
786 cat > conftest.$ac_ext << EOF
788 #line 789 "configure"
789 #include "confdefs.h"
793 if { (eval echo configure:794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
794 ac_cv_prog_cc_works=yes
795 # If we can't run a trivial program, we are probably using a cross compiler.
796 if (./conftest; exit) 2>/dev/null; then
797 ac_cv_prog_cc_cross=no
799 ac_cv_prog_cc_cross=yes
802 echo "configure: failed program was:" >&5
803 cat conftest.$ac_ext >&5
804 ac_cv_prog_cc_works=no
808 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
809 ac_cpp='$CPP $CPPFLAGS'
810 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
811 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
812 cross_compiling=$ac_cv_prog_cc_cross
814 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
815 if test $ac_cv_prog_cc_works = no; then
816 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
818 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
819 echo "configure:820: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
820 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
821 cross_compiling=$ac_cv_prog_cc_cross
823 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
824 echo "configure:825: checking whether we are using GNU C" >&5
825 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
826 echo $ac_n "(cached) $ac_c" 1>&6
828 cat > conftest.c <<EOF
833 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
840 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
842 if test $ac_cv_prog_gcc = yes; then
848 ac_test_CFLAGS="${CFLAGS+set}"
849 ac_save_CFLAGS="$CFLAGS"
851 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
852 echo "configure:853: checking whether ${CC-cc} accepts -g" >&5
853 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
854 echo $ac_n "(cached) $ac_c" 1>&6
856 echo 'void f(){}' > conftest.c
857 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
866 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
867 if test "$ac_test_CFLAGS" = set; then
868 CFLAGS="$ac_save_CFLAGS"
869 elif test $ac_cv_prog_cc_g = yes; then
870 if test "$GCC" = yes; then
876 if test "$GCC" = yes; then
884 echo $ac_n "checking for working const""... $ac_c" 1>&6
885 echo "configure:886: checking for working const" >&5
886 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
887 echo $ac_n "(cached) $ac_c" 1>&6
889 cat > conftest.$ac_ext <<EOF
890 #line 891 "configure"
891 #include "confdefs.h"
895 /* Ultrix mips cc rejects this. */
896 typedef int charset[2]; const charset x;
897 /* SunOS 4.1.1 cc rejects this. */
898 char const *const *ccp;
900 /* NEC SVR4.0.2 mips cc rejects this. */
901 struct point {int x, y;};
902 static struct point const zero = {0,0};
903 /* AIX XL C 1.02.0.0 rejects this.
904 It does not let you subtract one const X* pointer from another in an arm
905 of an if-expression whose if-part is not a constant expression */
906 const char *g = "string";
907 ccp = &g + (g ? g-g : 0);
908 /* HPUX 7.0 cc rejects these. */
911 ccp = (char const *const *) p;
912 { /* SCO 3.2v4 cc rejects this. */
914 char const *s = 0 ? (char *) 0 : (char const *) 0;
918 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
920 const int *foo = &x[0];
923 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
924 typedef const int *iptr;
928 { /* AIX XL C 1.02.0.0 rejects this saying
929 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
930 struct s { int j; const int *ap[3]; };
931 struct s *b; b->j = 5;
933 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
939 if { (eval echo configure:940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
943 echo "configure: failed program was:" >&5
944 cat conftest.$ac_ext >&5
951 echo "$ac_t""$ac_cv_c_const" 1>&6
952 if test $ac_cv_c_const = no; then
953 cat >> confdefs.h <<\EOF
961 if test $ac_cv_prog_gcc = yes; then
962 CCOPTS='-O2 -funroll-loops -fomit-frame-pointer -Wall'
966 # Check whether --with-pf_packet or --without-pf_packet was given.
967 if test "${with_pf_packet+set}" = set; then
968 withval="$with_pf_packet"
976 # Check whether --with-fast_x86_check or --without-fast_x86_check was given.
977 if test "${with_fast_x86_check+set}" = set; then
978 withval="$with_fast_x86_check"
980 cat >> confdefs.h <<\EOF
981 #define LIBNET_FAST_X86_CHECK 1
987 # Find a good install program. We prefer a C program (faster),
988 # so one script is as good as another. But avoid the broken or
989 # incompatible versions:
990 # SysV /etc/install, /usr/sbin/install
991 # SunOS /usr/etc/install
994 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
995 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
996 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
997 # ./install, which can be erroneously created by make from ./install.sh.
998 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
999 echo "configure:1000: checking for a BSD compatible install" >&5
1000 if test -z "$INSTALL"; then
1001 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1002 echo $ac_n "(cached) $ac_c" 1>&6
1004 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1005 for ac_dir in $PATH; do
1006 # Account for people who put trailing slashes in PATH elements.
1008 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1010 # OSF1 and SCO ODT 3.0 have their own names for install.
1011 # Don't use installbsd from OSF since it installs stuff as root
1013 for ac_prog in ginstall scoinst install; do
1014 if test -f $ac_dir/$ac_prog; then
1015 if test $ac_prog = install &&
1016 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1017 # AIX install. It has an incompatible calling convention.
1020 ac_cv_path_install="$ac_dir/$ac_prog -c"
1031 if test "${ac_cv_path_install+set}" = set; then
1032 INSTALL="$ac_cv_path_install"
1034 # As a last resort, use the slow shell script. We don't cache a
1035 # path for INSTALL within a source directory, because that will
1036 # break other packages using the cache if that directory is
1037 # removed, or if the path is relative.
1038 INSTALL="$ac_install_sh"
1041 echo "$ac_t""$INSTALL" 1>&6
1043 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1044 # It thinks the first close brace ends the variable substitution.
1045 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1047 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1049 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1051 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1052 echo "configure:1053: checking whether ${MAKE-make} sets \${MAKE}" >&5
1053 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1054 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1055 echo $ac_n "(cached) $ac_c" 1>&6
1057 cat > conftestmake <<\EOF
1059 @echo 'ac_maketemp="${MAKE}"'
1061 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1062 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1063 if test -n "$ac_maketemp"; then
1064 eval ac_cv_prog_make_${ac_make}_set=yes
1066 eval ac_cv_prog_make_${ac_make}_set=no
1070 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1071 echo "$ac_t""yes" 1>&6
1074 echo "$ac_t""no" 1>&6
1075 SET_MAKE="MAKE=${MAKE-make}"
1078 for ac_prog in ranlib
1080 # Extract the first word of "$ac_prog", so it can be a program name with args.
1081 set dummy $ac_prog; ac_word=$2
1082 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1083 echo "configure:1084: checking for $ac_word" >&5
1084 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1085 echo $ac_n "(cached) $ac_c" 1>&6
1087 if test -n "$RANLIB"; then
1088 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1090 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1092 for ac_dir in $ac_dummy; do
1093 test -z "$ac_dir" && ac_dir=.
1094 if test -f $ac_dir/$ac_word; then
1095 ac_cv_prog_RANLIB="$ac_prog"
1102 RANLIB="$ac_cv_prog_RANLIB"
1103 if test -n "$RANLIB"; then
1104 echo "$ac_t""$RANLIB" 1>&6
1106 echo "$ac_t""no" 1>&6
1109 test -n "$RANLIB" && break
1111 test -n "$RANLIB" || RANLIB="@true"
1115 # Extract the first word of "$ac_prog", so it can be a program name with args.
1116 set dummy $ac_prog; ac_word=$2
1117 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1118 echo "configure:1119: checking for $ac_word" >&5
1119 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1120 echo $ac_n "(cached) $ac_c" 1>&6
1122 if test -n "$AR"; then
1123 ac_cv_prog_AR="$AR" # Let the user override the test.
1125 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1127 for ac_dir in $ac_dummy; do
1128 test -z "$ac_dir" && ac_dir=.
1129 if test -f $ac_dir/$ac_word; then
1130 ac_cv_prog_AR="$ac_prog"
1138 if test -n "$AR"; then
1139 echo "$ac_t""$AR" 1>&6
1141 echo "$ac_t""no" 1>&6
1144 test -n "$AR" && break
1146 test -n "$AR" || AR="@true"
1150 # Extract the first word of "$ac_prog", so it can be a program name with args.
1151 set dummy $ac_prog; ac_word=$2
1152 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1153 echo "configure:1154: checking for $ac_word" >&5
1154 if eval "test \"`echo '$''{'ac_cv_prog_LN'+set}'`\" = set"; then
1155 echo $ac_n "(cached) $ac_c" 1>&6
1157 if test -n "$LN"; then
1158 ac_cv_prog_LN="$LN" # Let the user override the test.
1160 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1162 for ac_dir in $ac_dummy; do
1163 test -z "$ac_dir" && ac_dir=.
1164 if test -f $ac_dir/$ac_word; then
1165 ac_cv_prog_LN="$ac_prog"
1173 if test -n "$LN"; then
1174 echo "$ac_t""$LN" 1>&6
1176 echo "$ac_t""no" 1>&6
1179 test -n "$LN" && break
1181 test -n "$LN" || LN="@true"
1184 for ac_func in strerror
1186 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1187 echo "configure:1188: checking for $ac_func" >&5
1188 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1189 echo $ac_n "(cached) $ac_c" 1>&6
1191 cat > conftest.$ac_ext <<EOF
1192 #line 1193 "configure"
1193 #include "confdefs.h"
1194 /* System header to define __stub macros and hopefully few prototypes,
1195 which can conflict with char $ac_func(); below. */
1197 /* Override any gcc2 internal prototype to avoid an error. */
1198 /* We use char because int might match the return type of a gcc2
1199 builtin and then its argument prototype would still apply. */
1204 /* The GNU C library defines this for functions which it implements
1205 to always fail with ENOSYS. Some functions are actually named
1206 something starting with __ and the normal name is an alias. */
1207 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1215 if { (eval echo configure:1216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1217 eval "ac_cv_func_$ac_func=yes"
1219 echo "configure: failed program was:" >&5
1220 cat conftest.$ac_ext >&5
1222 eval "ac_cv_func_$ac_func=no"
1227 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1228 echo "$ac_t""yes" 1>&6
1229 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1230 cat >> confdefs.h <<EOF
1231 #define $ac_tr_func 1
1235 echo "$ac_t""no" 1>&6
1240 echo $ac_n "checking for pcap_open_live in -lpcap""... $ac_c" 1>&6
1241 echo "configure:1242: checking for pcap_open_live in -lpcap" >&5
1242 ac_lib_var=`echo pcap'_'pcap_open_live | sed 'y%./+-%__p_%'`
1243 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1244 echo $ac_n "(cached) $ac_c" 1>&6
1246 ac_save_LIBS="$LIBS"
1248 cat > conftest.$ac_ext <<EOF
1249 #line 1250 "configure"
1250 #include "confdefs.h"
1251 /* Override any gcc2 internal prototype to avoid an error. */
1252 /* We use char because int might match the return type of a gcc2
1253 builtin and then its argument prototype would still apply. */
1254 char pcap_open_live();
1260 if { (eval echo configure:1261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1262 eval "ac_cv_lib_$ac_lib_var=yes"
1264 echo "configure: failed program was:" >&5
1265 cat conftest.$ac_ext >&5
1267 eval "ac_cv_lib_$ac_lib_var=no"
1270 LIBS="$ac_save_LIBS"
1273 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1274 echo "$ac_t""yes" 1>&6
1275 cat >> confdefs.h <<\EOF
1276 #define HAVE_LIB_PCAP 1
1280 echo "$ac_t""no" 1>&6
1284 echo $ac_n "checking low-level packet interface type""... $ac_c" 1>&6
1285 echo "configure:1286: checking low-level packet interface type" >&5
1287 if test -r /dev/bpf0 ; then
1289 echo "$ac_t""found bpf" 1>&6
1290 elif test -r /usr/include/net/pfilt.h ; then
1292 echo "$ac_t""found pf" 1>&6
1293 elif test -r /dev/nit ; then
1295 echo "$ac_t""found snit" 1>&6
1296 elif test -r /usr/include/sys/net/nit.h ; then
1298 echo "$ac_t""found nit" 1>&6
1299 elif test -r /usr/include/net/raw.h ; then
1301 echo "$ac_t""found snoop" 1>&6
1302 elif test -r /usr/include/sys/dlpi.h ; then
1304 echo "$ac_t""found dlpi" 1>&6
1305 cat >> confdefs.h <<\EOF
1309 elif test -r /usr/include/linux/socket.h ; then
1310 LL_INT_TYPE=sockpacket
1311 echo "$ac_t""found SOCK_PACKET" 1>&6
1312 if test $with_pf_packet = yes; then
1314 echo $ac_n "checking for PF_PACKET""... $ac_c" 1>&6
1315 echo "configure:1316: checking for PF_PACKET" >&5
1316 if eval "test \"`echo '$''{'ac_libnet_have_pf_packet'+set}'`\" = set"; then
1317 echo $ac_n "(cached) $ac_c" 1>&6
1319 case "$target_os" in
1322 ac_libnet_have_pf_packet = no
1326 cat > pf_packet-test.c << EOF
1329 #include <netinet/if_ether.h>
1330 #include <net/if_arp.h>
1332 #include <linux/if_arp.h>
1333 #include <linux/if_ether.h>
1337 #define SOL_PACKET 263
1338 #endif /* SOL_PACKET */
1339 #include <linux/if_packet.h>
1342 #include <linux/sockios.h>
1349 struct sockaddr_ll sa;
1351 struct packet_mreq mr;
1354 fd = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
1358 exit (EXIT_FAILURE);
1361 memset(&sa, 0, sizeof(sa));
1362 strcpy(ifr.ifr_name, device);
1363 if (ioctl(fd, SIOCGIFINDEX, &ifr) < 0)
1366 exit (EXIT_FAILURE);
1368 sa.sll_family = AF_PACKET;
1369 sa.sll_ifindex = ifr.ifr_ifindex;
1370 sa.sll_protocol = htons(ETH_P_ALL);
1372 memset(&mr, 0, sizeof (mr));
1373 mr.mr_ifindex = sa.sll_ifindex;
1374 mr.mr_type = PACKET_MR_ALLMULTI;
1376 if (setsockopt(fd, SOL_PACKET, PACKET_ADD_MEMBERSHIP, (char *)&mr,
1380 exit (EXIT_FAILURE);
1382 /* yay. we made it and it workz! */
1384 #else /* PF_PACKET */
1387 exit (EXIT_SUCCESS);
1390 ${CC-cc} -o pf_packet-test $CFLAGS pf_packet-test.c >/dev/null 2>&1
1392 # Oopz 4.3 BSD doesn't have this. Sorry.
1393 if test ! -x ./pf_packet-test ; then
1394 ac_libnet_have_pf_packet=choked
1396 ac_libnet_have_pf_packet=`./pf_packet-test`;
1399 if test $ac_libnet_have_pf_packet = choked; then
1400 echo "$ac_t""test program choked... assuming no" 1>&6
1401 elif test $ac_libnet_have_pf_packet = yes; then
1402 cat >> confdefs.h <<\EOF
1403 #define HAVE_PF_PACKET 1
1406 LIBNET_CONFIG_DEFINES="$LIBNET_CONFIG_DEFINES -DHAVE_PF_PACKET"
1409 if test $ac_libnet_have_pf_packet != choked; then
1410 echo "$ac_t""$ac_libnet_have_pf_packet" 1>&6
1412 rm -f pf_packet-test* core core.pf_packet-test
1419 elif test -c /dev/bpf0 ; then # check again in case not readable
1421 echo "$ac_t""found bpf" 1>&6
1422 elif test -c /dev/enet ; then # check again in case not readable
1424 echo "$ac_t""found enet" 1>&6
1425 elif test -c /dev/nit ; then # check again in case not readable
1427 echo "$ac_t""found snit" 1>&6
1430 echo "configure: warning: could not find a low level packet interface" 1>&2
1431 echo "configure: warning: low level packet creation API will not be added to the library" 1>&2
1434 LL_INT_TYPE_UC=`echo $LL_INT_TYPE | tr a-z A-Z`
1437 case "$target_os" in
1440 cat >> confdefs.h <<\EOF
1441 #define _BSD_SOURCE 1
1444 cat >> confdefs.h <<\EOF
1445 #define __BSD_SOURCE 1
1448 cat >> confdefs.h <<\EOF
1449 #define __FAVOR_BSD 1
1452 LIBNET_CONFIG_DEFINES="-D_BSD_SOURCE -D__BSD_SOURCE -D__FAVOR_BSD"
1453 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1454 echo "configure:1455: checking how to run the C preprocessor" >&5
1455 # On Suns, sometimes $CPP names a directory.
1456 if test -n "$CPP" && test -d "$CPP"; then
1459 if test -z "$CPP"; then
1460 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1461 echo $ac_n "(cached) $ac_c" 1>&6
1463 # This must be in double quotes, not single quotes, because CPP may get
1464 # substituted into the Makefile and "${CC-cc}" will confuse make.
1466 # On the NeXT, cc -E runs the code through the compiler's parser,
1467 # not just through cpp.
1468 cat > conftest.$ac_ext <<EOF
1469 #line 1470 "configure"
1470 #include "confdefs.h"
1474 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1475 { (eval echo configure:1476: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1476 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1477 if test -z "$ac_err"; then
1481 echo "configure: failed program was:" >&5
1482 cat conftest.$ac_ext >&5
1484 CPP="${CC-cc} -E -traditional-cpp"
1485 cat > conftest.$ac_ext <<EOF
1486 #line 1487 "configure"
1487 #include "confdefs.h"
1491 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1492 { (eval echo configure:1493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1493 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1494 if test -z "$ac_err"; then
1498 echo "configure: failed program was:" >&5
1499 cat conftest.$ac_ext >&5
1501 CPP="${CC-cc} -nologo -E"
1502 cat > conftest.$ac_ext <<EOF
1503 #line 1504 "configure"
1504 #include "confdefs.h"
1508 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1509 { (eval echo configure:1510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1510 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1511 if test -z "$ac_err"; then
1515 echo "configure: failed program was:" >&5
1516 cat conftest.$ac_ext >&5
1525 ac_cv_prog_CPP="$CPP"
1527 CPP="$ac_cv_prog_CPP"
1529 ac_cv_prog_CPP="$CPP"
1531 echo "$ac_t""$CPP" 1>&6
1533 for ac_hdr in net/ethernet.h
1535 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1536 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1537 echo "configure:1538: checking for $ac_hdr" >&5
1538 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1539 echo $ac_n "(cached) $ac_c" 1>&6
1541 cat > conftest.$ac_ext <<EOF
1542 #line 1543 "configure"
1543 #include "confdefs.h"
1546 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1547 { (eval echo configure:1548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1548 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1549 if test -z "$ac_err"; then
1551 eval "ac_cv_header_$ac_safe=yes"
1554 echo "configure: failed program was:" >&5
1555 cat conftest.$ac_ext >&5
1557 eval "ac_cv_header_$ac_safe=no"
1561 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1562 echo "$ac_t""yes" 1>&6
1563 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1564 cat >> confdefs.h <<EOF
1565 #define $ac_tr_hdr 1
1568 LIBNET_CONFIG_DEFINES="$LIBNET_CONFIG_DEFINES -DHAVE_NET_ETHERNET_H"
1570 echo "$ac_t""no" 1>&6
1574 MAN_PREFIX="$prefix/man/man3/"
1575 LIB_PREFIX="$prefix/lib/"
1576 INC_PREFIX="$prefix/include/"
1577 BIN_PREFIX="$prefix/bin/"
1581 cat >> confdefs.h <<\EOF
1582 #define LIBNET_BSDISH_OS 1
1585 cat >> confdefs.h <<\EOF
1586 #define LIBNET_BSD_BYTE_SWAP 1
1589 cat >> confdefs.h <<\EOF
1590 #define HAVE_SOCKADDR_SA_LEN 1
1593 LIBNET_CONFIG_DEFINES="-DLIBNET_BSDISH_OS -DLIBNET_BSD_BYTE_SWAP \
1594 -DHAVE_SOCKADDR_SA_LEN"
1595 MAN_PREFIX="$prefix/man/man3/"
1596 LIB_PREFIX="$prefix/lib/aout"
1597 INC_PREFIX="$prefix/include/"
1598 BIN_PREFIX="$prefix/bin/"
1599 echo "$ac_t""Note: support/bpf-lkm/etherspoof contains the lkm source \
1600 required to spoof ethernet frames" 1>&6
1601 ln -sf FreeBSD support/bpf-lkm/etherspoof
1605 cat >> confdefs.h <<\EOF
1606 #define LIBNET_BSDISH_OS 1
1609 cat >> confdefs.h <<\EOF
1610 #define LIBNET_BSD_BYTE_SWAP 1
1613 LIBNET_CONFIG_DEFINES="-DLIBNET_BSDISH_OS -DLIBNET_BSD_BYTE_SWAP"
1614 MAN_PREFIX="$prefix/man/man3/"
1615 LIB_PREFIX="$prefix/lib/aout"
1616 INC_PREFIX="$prefix/include/"
1617 BIN_PREFIX="$prefix/bin/"
1621 cat >> confdefs.h <<\EOF
1622 #define LIBNET_BSDISH_OS 1
1625 cat >> confdefs.h <<\EOF
1626 #define HAVE_SOCKADDR_SA_LEN 1
1629 LIBNET_CONFIG_DEFINES="-DLIBNET_BSDISH_OS"
1630 MAN_PREFIX="$prefix/man/man3/"
1631 LIB_PREFIX="$prefix/lib/"
1632 INC_PREFIX="$prefix/include/"
1633 BIN_PREFIX="$prefix/bin/"
1634 echo "$ac_t""Note: support/bpf-lkm/etherspoof contains the lkm required \
1635 to spoof ethernet frames" 1>&6
1636 ln -sf OpenBSD support/bpf-lkm/etherspoof
1640 cat >> confdefs.h <<\EOF
1641 #define LIBNET_BSDISH_OS 1
1644 cat >> confdefs.h <<\EOF
1645 #define LIBNET_BSD_BYTE_SWAP 1
1648 LIBNET_CONFIG_DEFINES="-DLIBNET_BSDISH_OS -DLIBNET_BSD_BYTE_SWAP"
1649 MAN_PREFIX="$prefix/man/man3/"
1650 LIB_PREFIX="$prefix/lib/"
1651 INC_PREFIX="$prefix/include/"
1652 BIN_PREFIX="$prefix/bin/"
1656 cat >> confdefs.h <<\EOF
1657 #define HAVE_SOLARIS 1
1660 for ac_hdr in sys/bufmod.h sys/dlpi_ext.h
1662 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1663 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1664 echo "configure:1665: checking for $ac_hdr" >&5
1665 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1666 echo $ac_n "(cached) $ac_c" 1>&6
1668 cat > conftest.$ac_ext <<EOF
1669 #line 1670 "configure"
1670 #include "confdefs.h"
1673 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1674 { (eval echo configure:1675: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1675 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1676 if test -z "$ac_err"; then
1678 eval "ac_cv_header_$ac_safe=yes"
1681 echo "configure: failed program was:" >&5
1682 cat conftest.$ac_ext >&5
1684 eval "ac_cv_header_$ac_safe=no"
1688 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1689 echo "$ac_t""yes" 1>&6
1690 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1691 cat >> confdefs.h <<EOF
1692 #define $ac_tr_hdr 1
1696 echo "$ac_t""no" 1>&6
1700 echo $ac_n "checking for /dev/dlpi device""... $ac_c" 1>&6
1701 echo "configure:1702: checking for /dev/dlpi device" >&5
1702 if test -c /dev/dlpi; then
1703 echo "$ac_t""yes" 1>&6
1704 cat >> confdefs.h <<\EOF
1705 #define HAVE_DEV_DLPI 1
1709 echo "$ac_t""no" 1>&6
1711 echo $ac_n "checking for $dir directory""... $ac_c" 1>&6
1712 echo "configure:1713: checking for $dir directory" >&5
1713 if test -d $dir ; then
1714 echo "$ac_t""yes" 1>&6
1715 cat >> confdefs.h <<EOF
1716 #define DLPI_DEV_PREFIX "$dir"
1720 echo "$ac_t""no" 1>&6
1723 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
1724 echo "configure:1725: checking for socket in -lsocket" >&5
1725 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
1726 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1727 echo $ac_n "(cached) $ac_c" 1>&6
1729 ac_save_LIBS="$LIBS"
1730 LIBS="-lsocket $LIBS"
1731 cat > conftest.$ac_ext <<EOF
1732 #line 1733 "configure"
1733 #include "confdefs.h"
1734 /* Override any gcc2 internal prototype to avoid an error. */
1735 /* We use char because int might match the return type of a gcc2
1736 builtin and then its argument prototype would still apply. */
1743 if { (eval echo configure:1744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1745 eval "ac_cv_lib_$ac_lib_var=yes"
1747 echo "configure: failed program was:" >&5
1748 cat conftest.$ac_ext >&5
1750 eval "ac_cv_lib_$ac_lib_var=no"
1753 LIBS="$ac_save_LIBS"
1756 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1757 echo "$ac_t""yes" 1>&6
1758 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1759 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1760 cat >> confdefs.h <<EOF
1761 #define $ac_tr_lib 1
1764 LIBS="-lsocket $LIBS"
1767 echo "$ac_t""no" 1>&6
1768 { echo "configure: error: libsocket not found." 1>&2; exit 1; }
1771 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
1772 echo "configure:1773: checking for gethostbyname in -lnsl" >&5
1773 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
1774 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1775 echo $ac_n "(cached) $ac_c" 1>&6
1777 ac_save_LIBS="$LIBS"
1779 cat > conftest.$ac_ext <<EOF
1780 #line 1781 "configure"
1781 #include "confdefs.h"
1782 /* Override any gcc2 internal prototype to avoid an error. */
1783 /* We use char because int might match the return type of a gcc2
1784 builtin and then its argument prototype would still apply. */
1785 char gethostbyname();
1791 if { (eval echo configure:1792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1793 eval "ac_cv_lib_$ac_lib_var=yes"
1795 echo "configure: failed program was:" >&5
1796 cat conftest.$ac_ext >&5
1798 eval "ac_cv_lib_$ac_lib_var=no"
1801 LIBS="$ac_save_LIBS"
1804 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1805 echo "$ac_t""yes" 1>&6
1806 ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1807 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1808 cat >> confdefs.h <<EOF
1809 #define $ac_tr_lib 1
1815 echo "$ac_t""no" 1>&6
1816 { echo "configure: error: libnsl not found." 1>&2; exit 1; }
1820 case "`uname -r`" in
1822 cat >> confdefs.h <<\EOF
1823 #define STUPID_SOLARIS_CHECKSUM_BUG 1
1828 cat >> confdefs.h <<\EOF
1829 #define STUPID_SOLARIS_CHECKSUM_BUG 1
1836 ADDITIONAL_LIBS='-lsocket -lnsl'
1837 LIBNET_CONFIG_LIBS="$LIBNET_CONFIG_LIBS -lsocket -lnsl"
1838 MAN_PREFIX="$prefix/man/man3/"
1839 LIB_PREFIX="$prefix/lib/"
1840 INC_PREFIX="$prefix/include/"
1841 BIN_PREFIX="$prefix/bin/"
1845 echo "configure: warning: apparently your OS is not officially supported yet" 1>&2
1846 echo "configure: warning: this may not work" 1>&2
1847 echo "$ac_t""you'll have to edit the makefile by hand" 1>&6
1848 echo "$ac_t""please send diffs to mike@infonexus.com" 1>&6
1854 echo $ac_n "checking for libnet_build_ip in -lnet""... $ac_c" 1>&6
1855 echo "configure:1856: checking for libnet_build_ip in -lnet" >&5
1856 ac_lib_var=`echo net'_'libnet_build_ip | sed 'y%./+-%__p_%'`
1857 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1858 echo $ac_n "(cached) $ac_c" 1>&6
1860 ac_save_LIBS="$LIBS"
1862 cat > conftest.$ac_ext <<EOF
1863 #line 1864 "configure"
1864 #include "confdefs.h"
1865 /* Override any gcc2 internal prototype to avoid an error. */
1866 /* We use char because int might match the return type of a gcc2
1867 builtin and then its argument prototype would still apply. */
1868 char libnet_build_ip();
1874 if { (eval echo configure:1875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1876 eval "ac_cv_lib_$ac_lib_var=yes"
1878 echo "configure: failed program was:" >&5
1879 cat conftest.$ac_ext >&5
1881 eval "ac_cv_lib_$ac_lib_var=no"
1884 LIBS="$ac_save_LIBS"
1887 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1888 echo "$ac_t""yes" 1>&6
1889 echo $ac_n "checking version""... $ac_c" 1>&6
1890 echo "configure:1891: checking version" >&5 \
1892 if [ ! -f $LIB_PREFIX/libnet.a ] ; then
1893 echo "$ac_t""$LIB_PREFIX/libnet.a doesn't exist" 1>&6
1894 echo "$ac_t""previous libnet install lives elsewhere" 1>&6
1896 __LIBNET_VERSION=`strings $LIB_PREFIX/libnet.a | grep "libnet version"\
1898 if test -z "$__LIBNET_VERSION"; then
1899 echo "$ac_t""<0.8" 1>&6
1901 echo "$ac_t""$__LIBNET_VERSION" 1>&6
1906 echo "$ac_t""no" 1>&6
1910 echo $ac_n "checking machine endianess""... $ac_c" 1>&6
1911 echo "configure:1912: checking machine endianess" >&5
1913 cat > conftest.c << EOF
1915 # include <stdlib.h>
1922 char c[sizeof(short)];
1926 if (sizeof (short) == 2)
1928 if (un.c [0] == 1 && un.c [1] == 2)
1934 if (un.c [0] == 2 && un.c [1] == 1)
1944 return (EXIT_SUCCESS);
1947 ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS > /dev/null 2>&1
1948 # Oopz 4.3 BSD doesn't have this. Sorry.
1949 if test ! -x conftest ; then
1950 ac_cv_libnet_endianess=unknown
1952 ./conftest > conftest.out
1953 result=`cat conftest.out`
1954 if test $result = "B"; then
1955 ac_cv_libnet_endianess=big
1956 elif test $result = "L"; then
1957 ac_cv_libnet_endianess=lil
1959 ac_cv_libnet_endianess=unknown
1962 rm -f conftest* core core.conftest
1964 echo "$ac_t""$ac_cv_libnet_endianess" 1>&6
1966 if test $ac_cv_libnet_endianess = big ; then
1967 cat >> confdefs.h <<\EOF
1968 #define LIBNET_BIG_ENDIAN 1
1971 LIBNET_CONFIG_DEFINES="$LIBNET_CONFIG_DEFINES -DLIBNET_BIG_ENDIAN"
1972 elif test $ac_cv_libnet_endianess = lil ; then
1973 cat >> confdefs.h <<\EOF
1974 #define LIBNET_LIL_ENDIAN 1
1977 LIBNET_CONFIG_DEFINES="$LIBNET_CONFIG_DEFINES -DLIBNET_LIL_ENDIAN"
1980 echo $ac_n "checking if unaligned accesses fail""... $ac_c" 1>&6
1981 echo "configure:1982: checking if unaligned accesses fail" >&5
1982 if eval "test \"`echo '$''{'ac_cv_lbl_unaligned_fail'+set}'`\" = set"; then
1983 echo $ac_n "(cached) $ac_c" 1>&6
1985 case "$target_cpu" in
1987 alpha|hp*|mips|sparc)
1988 ac_cv_lbl_unaligned_fail=yes
1992 cat >conftest.c <<EOF
1993 # include <sys/types.h>
1994 # include <sys/wait.h>
1996 unsigned char a[5] = { 1, 2, 3, 4, 5 };
2002 /* avoid "core dumped" message */
2011 pid = waitpid(pid, &status, 0);
2016 exit(!WIFEXITED(status));
2019 i = *(unsigned int *)&a[1];
2024 ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS \
2025 conftest.c $LIBS > /dev/null 2>&1
2026 # Oopz 4.3 BSD doesn't have this. Sorry.
2027 if test ! -x conftest ; then
2028 ac_cv_lbl_unaligned_fail=yes
2030 ./conftest > conftest.out
2031 if test ! -s conftest.out ; then
2032 ac_cv_lbl_unaligned_fail=yes
2034 ac_cv_lbl_unaligned_fail=no
2037 rm -f conftest* core core.conftest
2042 echo "$ac_t""$ac_cv_lbl_unaligned_fail" 1>&6
2043 if test $ac_cv_lbl_unaligned_fail = yes ; then
2044 cat >> confdefs.h <<\EOF
2051 for ac_hdr in sys/sockio.h
2053 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2054 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2055 echo "configure:2056: checking for $ac_hdr" >&5
2056 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2057 echo $ac_n "(cached) $ac_c" 1>&6
2059 cat > conftest.$ac_ext <<EOF
2060 #line 2061 "configure"
2061 #include "confdefs.h"
2064 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2065 { (eval echo configure:2066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2066 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2067 if test -z "$ac_err"; then
2069 eval "ac_cv_header_$ac_safe=yes"
2072 echo "configure: failed program was:" >&5
2073 cat conftest.$ac_ext >&5
2075 eval "ac_cv_header_$ac_safe=no"
2079 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2080 echo "$ac_t""yes" 1>&6
2081 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2082 cat >> confdefs.h <<EOF
2083 #define $ac_tr_hdr 1
2087 echo "$ac_t""no" 1>&6
2093 cat > confcache <<\EOF
2094 # This file is a shell script that caches the results of configure
2095 # tests run on this system so they can be shared between configure
2096 # scripts and configure runs. It is not useful on other systems.
2097 # If it contains results you don't want to keep, you may remove or edit it.
2099 # By default, configure uses ./config.cache as the cache file,
2100 # creating it if it does not exist already. You can give configure
2101 # the --cache-file=FILE option to use a different cache file; that is
2102 # what configure does when it calls configure scripts in
2103 # subdirectories, so they share the cache.
2104 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2105 # config.status only pays attention to the cache file if you give it the
2106 # --recheck option to rerun configure.
2109 # The following way of writing the cache mishandles newlines in values,
2110 # but we know of no workaround that is simple, portable, and efficient.
2111 # So, don't put newlines in cache variables' values.
2112 # Ultrix sh set writes to stderr and can't be redirected directly,
2113 # and sets the high bit in the cache file unless we assign to the vars.
2115 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2117 # `set' does not quote correctly, so add quotes (double-quote substitution
2118 # turns \\\\ into \\, and sed turns \\ into \).
2120 -e "s/'/'\\\\''/g" \
2121 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2124 # `set' quotes correctly as required by POSIX, so do not add quotes.
2125 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2128 if cmp -s $cache_file confcache; then
2131 if test -w $cache_file; then
2132 echo "updating cache $cache_file"
2133 cat confcache > $cache_file
2135 echo "not updating unwritable cache $cache_file"
2140 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2142 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2143 # Let make expand exec_prefix.
2144 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2146 # Any assignment to VPATH causes Sun make to only execute
2147 # the first set of double-colon rules, so remove it if not needed.
2148 # If there is a colon in the path, we need to keep it.
2149 if test "x$srcdir" = x.; then
2150 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2153 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2155 DEFS=-DHAVE_CONFIG_H
2157 # Without the "./", some shells look in PATH for config.status.
2158 : ${CONFIG_STATUS=./config.status}
2160 echo creating $CONFIG_STATUS
2161 rm -f $CONFIG_STATUS
2162 cat > $CONFIG_STATUS <<EOF
2164 # Generated automatically by configure.
2165 # Run this file to recreate the current configuration.
2166 # This directory was configured as follows,
2167 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2169 # $0 $ac_configure_args
2171 # Compiler output produced by configure, useful for debugging
2172 # configure, is in ./config.log if it exists.
2174 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2177 case "\$ac_option" in
2178 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2179 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2180 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2181 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2182 echo "$CONFIG_STATUS generated by autoconf version 2.13"
2184 -help | --help | --hel | --he | --h)
2185 echo "\$ac_cs_usage"; exit 0 ;;
2186 *) echo "\$ac_cs_usage"; exit 1 ;;
2190 ac_given_srcdir=$srcdir
2191 ac_given_INSTALL="$INSTALL"
2193 trap 'rm -fr `echo "Makefile test/Makefile test/TCP/Makefile test/Ethernet/Makefile \
2194 test/UDP/Makefile test/ICMP/Makefile test/Random/Makefile \
2195 test/OSPF/Makefile util/Makefile util/Get-mac/Makefile example/Makefile \
2196 libnet-config include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2198 cat >> $CONFIG_STATUS <<EOF
2200 # Protect against being on the right side of a sed subst in config.status.
2201 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2202 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2206 s%@CFLAGS@%$CFLAGS%g
2207 s%@CPPFLAGS@%$CPPFLAGS%g
2208 s%@CXXFLAGS@%$CXXFLAGS%g
2209 s%@FFLAGS@%$FFLAGS%g
2211 s%@LDFLAGS@%$LDFLAGS%g
2213 s%@exec_prefix@%$exec_prefix%g
2214 s%@prefix@%$prefix%g
2215 s%@program_transform_name@%$program_transform_name%g
2216 s%@bindir@%$bindir%g
2217 s%@sbindir@%$sbindir%g
2218 s%@libexecdir@%$libexecdir%g
2219 s%@datadir@%$datadir%g
2220 s%@sysconfdir@%$sysconfdir%g
2221 s%@sharedstatedir@%$sharedstatedir%g
2222 s%@localstatedir@%$localstatedir%g
2223 s%@libdir@%$libdir%g
2224 s%@includedir@%$includedir%g
2225 s%@oldincludedir@%$oldincludedir%g
2226 s%@infodir@%$infodir%g
2227 s%@mandir@%$mandir%g
2228 s%@LL_INT_TYPE_UC@%$LL_INT_TYPE_UC%g
2229 s%@LL_INT_TYPE@%$LL_INT_TYPE%g
2230 s%@LIB_PREFIX@%$LIB_PREFIX%g
2231 s%@INC_PREFIX@%$INC_PREFIX%g
2232 s%@MAN_PREFIX@%$MAN_PREFIX%g
2233 s%@BIN_PREFIX@%$BIN_PREFIX%g
2234 s%@RANLIB@%$RANLIB%g
2237 s%@ADDITIONAL_LIBS@%$ADDITIONAL_LIBS%g
2238 s%@LIBNET_CONFIG_DEFINES@%$LIBNET_CONFIG_DEFINES%g
2239 s%@LIBNET_CONFIG_LIBS@%$LIBNET_CONFIG_LIBS%g
2240 s%@LIBNET_CONFIG_CFLAGS@%$LIBNET_CONFIG_CFLAGS%g
2242 s%@host_alias@%$host_alias%g
2243 s%@host_cpu@%$host_cpu%g
2244 s%@host_vendor@%$host_vendor%g
2245 s%@host_os@%$host_os%g
2246 s%@target@%$target%g
2247 s%@target_alias@%$target_alias%g
2248 s%@target_cpu@%$target_cpu%g
2249 s%@target_vendor@%$target_vendor%g
2250 s%@target_os@%$target_os%g
2252 s%@build_alias@%$build_alias%g
2253 s%@build_cpu@%$build_cpu%g
2254 s%@build_vendor@%$build_vendor%g
2255 s%@build_os@%$build_os%g
2257 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2258 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2259 s%@INSTALL_DATA@%$INSTALL_DATA%g
2260 s%@SET_MAKE@%$SET_MAKE%g
2266 cat >> $CONFIG_STATUS <<\EOF
2268 # Split the substitutions into bite-sized pieces for seds with
2269 # small command number limits, like on Digital OSF/1 and HP-UX.
2270 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2271 ac_file=1 # Number of current file.
2272 ac_beg=1 # First line for current file.
2273 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2276 while $ac_more_lines; do
2277 if test $ac_beg -gt 1; then
2278 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2280 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2282 if test ! -s conftest.s$ac_file; then
2284 rm -f conftest.s$ac_file
2286 if test -z "$ac_sed_cmds"; then
2287 ac_sed_cmds="sed -f conftest.s$ac_file"
2289 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2291 ac_file=`expr $ac_file + 1`
2293 ac_end=`expr $ac_end + $ac_max_sed_cmds`
2296 if test -z "$ac_sed_cmds"; then
2301 cat >> $CONFIG_STATUS <<EOF
2303 CONFIG_FILES=\${CONFIG_FILES-"Makefile test/Makefile test/TCP/Makefile test/Ethernet/Makefile \
2304 test/UDP/Makefile test/ICMP/Makefile test/Random/Makefile \
2305 test/OSPF/Makefile util/Makefile util/Get-mac/Makefile example/Makefile \
2308 cat >> $CONFIG_STATUS <<\EOF
2309 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2310 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2312 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2313 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2314 *) ac_file_in="${ac_file}.in" ;;
2317 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2319 # Remove last slash and all that follows it. Not all systems have dirname.
2320 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2321 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2322 # The file is in a subdirectory.
2323 test ! -d "$ac_dir" && mkdir "$ac_dir"
2324 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2325 # A "../" for each directory in $ac_dir_suffix.
2326 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2328 ac_dir_suffix= ac_dots=
2331 case "$ac_given_srcdir" in
2333 if test -z "$ac_dots"; then top_srcdir=.
2334 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2335 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2337 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2338 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2341 case "$ac_given_INSTALL" in
2342 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2343 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2346 echo creating "$ac_file"
2348 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2350 *Makefile*) ac_comsub="1i\\
2351 # $configure_input" ;;
2355 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2357 s%@configure_input@%$configure_input%g
2358 s%@srcdir@%$srcdir%g
2359 s%@top_srcdir@%$top_srcdir%g
2360 s%@INSTALL@%$INSTALL%g
2361 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2365 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2366 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2368 # ac_d sets the value in "#define NAME VALUE" lines.
2369 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2370 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
2373 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2374 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2375 ac_uB='\([ ]\)%\1#\2define\3'
2378 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2379 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2380 ac_eB='$%\1#\2define\3'
2384 if test "${CONFIG_HEADERS+set}" != set; then
2386 cat >> $CONFIG_STATUS <<EOF
2387 CONFIG_HEADERS="include/config.h"
2389 cat >> $CONFIG_STATUS <<\EOF
2391 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2392 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2394 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2395 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2396 *) ac_file_in="${ac_file}.in" ;;
2399 echo creating $ac_file
2401 rm -f conftest.frag conftest.in conftest.out
2402 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2403 cat $ac_file_inputs > conftest.in
2407 # Transform confdefs.h into a sed script conftest.vals that substitutes
2408 # the proper values into config.h.in to produce config.h. And first:
2409 # Protect against being on the right side of a sed subst in config.status.
2410 # Protect against being in an unquoted here document in config.status.
2412 cat > conftest.hdr <<\EOF
2415 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2419 sed -n -f conftest.hdr confdefs.h > conftest.vals
2422 # This sed command replaces #undef with comments. This is necessary, for
2423 # example, in the case of _POSIX_SOURCE, which is predefined and required
2424 # on some systems where configure will not decide to define it.
2425 cat >> conftest.vals <<\EOF
2426 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2429 # Break up conftest.vals because some shells have a limit on
2430 # the size of here documents, and old seds have small limits too.
2435 ac_lines=`grep -c . conftest.vals`
2436 # grep -c gives empty output for an empty file on some AIX systems.
2437 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2438 # Write a limited-size here document to conftest.frag.
2439 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2440 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2442 sed -f conftest.frag conftest.in > conftest.out
2444 mv conftest.out conftest.in
2446 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2448 mv conftest.tail conftest.vals
2452 cat >> $CONFIG_STATUS <<\EOF
2453 rm -f conftest.frag conftest.h
2454 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2455 cat conftest.in >> conftest.h
2457 if cmp -s $ac_file conftest.h 2>/dev/null; then
2458 echo "$ac_file is unchanged"
2461 # Remove last slash and all that follows it. Not all systems have dirname.
2462 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2463 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2464 # The file is in a subdirectory.
2465 test ! -d "$ac_dir" && mkdir "$ac_dir"
2468 mv conftest.h $ac_file
2473 cat >> $CONFIG_STATUS <<EOF
2476 cat >> $CONFIG_STATUS <<\EOF
2477 chmod +x libnet-config
2480 chmod +x $CONFIG_STATUS
2481 rm -fr confdefs* $ac_clean_files
2482 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1