home *** CD-ROM | disk | FTP | other *** search
/ Steganos Hacker Tools / SHT151.iso / programme / scanner / nmapNTsp1 / Win_2000.exe / nmapNT-src / configure < prev    next >
Encoding:
Text File  |  2000-05-08  |  83.5 KB  |  2,863 lines

  1. #! /bin/sh
  2.  
  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.
  6. #
  7. # This configure script is free software; the Free Software Foundation
  8. # gives unlimited permission to copy, distribute and modify it.
  9.  
  10. # Defaults:
  11. ac_help=
  12. ac_default_prefix=/usr/local
  13. # Any additions from configure.in:
  14. ac_help="$ac_help
  15.   --with-libpcap[=DIR]    Look for pcap include/libs in DIR"
  16.  
  17. # Initialize some variables set by options.
  18. # The variables have the same names as the options, with
  19. # dashes changed to underlines.
  20. build=NONE
  21. cache_file=./config.cache
  22. exec_prefix=NONE
  23. host=NONE
  24. no_create=
  25. nonopt=NONE
  26. no_recursion=
  27. prefix=NONE
  28. program_prefix=NONE
  29. program_suffix=NONE
  30. program_transform_name=s,x,x,
  31. silent=
  32. site=
  33. srcdir=
  34. target=NONE
  35. verbose=
  36. x_includes=NONE
  37. x_libraries=NONE
  38. bindir='${exec_prefix}/bin'
  39. sbindir='${exec_prefix}/sbin'
  40. libexecdir='${exec_prefix}/libexec'
  41. datadir='${prefix}/share'
  42. sysconfdir='${prefix}/etc'
  43. sharedstatedir='${prefix}/com'
  44. localstatedir='${prefix}/var'
  45. libdir='${exec_prefix}/lib'
  46. includedir='${prefix}/include'
  47. oldincludedir='/usr/include'
  48. infodir='${prefix}/info'
  49. mandir='${prefix}/man'
  50.  
  51. # Initialize some other variables.
  52. subdirs=
  53. MFLAGS= MAKEFLAGS=
  54. SHELL=${CONFIG_SHELL-/bin/sh}
  55. # Maximum number of lines to put in a shell here document.
  56. ac_max_here_lines=12
  57.  
  58. ac_prev=
  59. for ac_option
  60. do
  61.  
  62.   # If the previous option needs an argument, assign it.
  63.   if test -n "$ac_prev"; then
  64.     eval "$ac_prev=\$ac_option"
  65.     ac_prev=
  66.     continue
  67.   fi
  68.  
  69.   case "$ac_option" in
  70.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  71.   *) ac_optarg= ;;
  72.   esac
  73.  
  74.   # Accept the important Cygnus configure options, so we can diagnose typos.
  75.  
  76.   case "$ac_option" in
  77.  
  78.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  79.     ac_prev=bindir ;;
  80.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  81.     bindir="$ac_optarg" ;;
  82.  
  83.   -build | --build | --buil | --bui | --bu)
  84.     ac_prev=build ;;
  85.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  86.     build="$ac_optarg" ;;
  87.  
  88.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  89.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  90.     ac_prev=cache_file ;;
  91.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  92.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  93.     cache_file="$ac_optarg" ;;
  94.  
  95.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  96.     ac_prev=datadir ;;
  97.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  98.   | --da=*)
  99.     datadir="$ac_optarg" ;;
  100.  
  101.   -disable-* | --disable-*)
  102.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  103.     # Reject names that are not valid shell variable names.
  104.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  105.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  106.     fi
  107.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  108.     eval "enable_${ac_feature}=no" ;;
  109.  
  110.   -enable-* | --enable-*)
  111.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  112.     # Reject names that are not valid shell variable names.
  113.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  114.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  115.     fi
  116.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  117.     case "$ac_option" in
  118.       *=*) ;;
  119.       *) ac_optarg=yes ;;
  120.     esac
  121.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  122.  
  123.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  124.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  125.   | --exec | --exe | --ex)
  126.     ac_prev=exec_prefix ;;
  127.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  128.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  129.   | --exec=* | --exe=* | --ex=*)
  130.     exec_prefix="$ac_optarg" ;;
  131.  
  132.   -gas | --gas | --ga | --g)
  133.     # Obsolete; use --with-gas.
  134.     with_gas=yes ;;
  135.  
  136.   -help | --help | --hel | --he)
  137.     # Omit some internal or obsolete options to make the list less imposing.
  138.     # This message is too long to be a string in the A/UX 3.1 sh.
  139.     cat << EOF
  140. Usage: configure [options] [host]
  141. Options: [defaults in brackets after descriptions]
  142. Configuration:
  143.   --cache-file=FILE       cache test results in FILE
  144.   --help                  print this message
  145.   --no-create             do not create output files
  146.   --quiet, --silent       do not print \`checking...' messages
  147.   --version               print the version of autoconf that created configure
  148. Directory and file names:
  149.   --prefix=PREFIX         install architecture-independent files in PREFIX
  150.                           [$ac_default_prefix]
  151.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  152.                           [same as prefix]
  153.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  154.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  155.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  156.   --datadir=DIR           read-only architecture-independent data in DIR
  157.                           [PREFIX/share]
  158.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  159.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  160.                           [PREFIX/com]
  161.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  162.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  163.   --includedir=DIR        C header files in DIR [PREFIX/include]
  164.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  165.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  166.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  167.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  168.   --program-prefix=PREFIX prepend PREFIX to installed program names
  169.   --program-suffix=SUFFIX append SUFFIX to installed program names
  170.   --program-transform-name=PROGRAM
  171.                           run sed PROGRAM on installed program names
  172. EOF
  173.     cat << EOF
  174. Host type:
  175.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  176.   --host=HOST             configure for HOST [guessed]
  177.   --target=TARGET         configure for TARGET [TARGET=HOST]
  178. Features and packages:
  179.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  180.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  181.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  182.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  183.   --x-includes=DIR        X include files are in DIR
  184.   --x-libraries=DIR       X library files are in DIR
  185. EOF
  186.     if test -n "$ac_help"; then
  187.       echo "--enable and --with options recognized:$ac_help"
  188.     fi
  189.     exit 0 ;;
  190.  
  191.   -host | --host | --hos | --ho)
  192.     ac_prev=host ;;
  193.   -host=* | --host=* | --hos=* | --ho=*)
  194.     host="$ac_optarg" ;;
  195.  
  196.   -includedir | --includedir | --includedi | --included | --include \
  197.   | --includ | --inclu | --incl | --inc)
  198.     ac_prev=includedir ;;
  199.   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  200.   | --includ=* | --inclu=* | --incl=* | --inc=*)
  201.     includedir="$ac_optarg" ;;
  202.  
  203.   -infodir | --infodir | --infodi | --infod | --info | --inf)
  204.     ac_prev=infodir ;;
  205.   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  206.     infodir="$ac_optarg" ;;
  207.  
  208.   -libdir | --libdir | --libdi | --libd)
  209.     ac_prev=libdir ;;
  210.   -libdir=* | --libdir=* | --libdi=* | --libd=*)
  211.     libdir="$ac_optarg" ;;
  212.  
  213.   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  214.   | --libexe | --libex | --libe)
  215.     ac_prev=libexecdir ;;
  216.   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  217.   | --libexe=* | --libex=* | --libe=*)
  218.     libexecdir="$ac_optarg" ;;
  219.  
  220.   -localstatedir | --localstatedir | --localstatedi | --localstated \
  221.   | --localstate | --localstat | --localsta | --localst \
  222.   | --locals | --local | --loca | --loc | --lo)
  223.     ac_prev=localstatedir ;;
  224.   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  225.   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  226.   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  227.     localstatedir="$ac_optarg" ;;
  228.  
  229.   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  230.     ac_prev=mandir ;;
  231.   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  232.     mandir="$ac_optarg" ;;
  233.  
  234.   -nfp | --nfp | --nf)
  235.     # Obsolete; use --without-fp.
  236.     with_fp=no ;;
  237.  
  238.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  239.   | --no-cr | --no-c)
  240.     no_create=yes ;;
  241.  
  242.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  243.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  244.     no_recursion=yes ;;
  245.  
  246.   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  247.   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  248.   | --oldin | --oldi | --old | --ol | --o)
  249.     ac_prev=oldincludedir ;;
  250.   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  251.   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  252.   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  253.     oldincludedir="$ac_optarg" ;;
  254.  
  255.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  256.     ac_prev=prefix ;;
  257.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  258.     prefix="$ac_optarg" ;;
  259.  
  260.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  261.   | --program-pre | --program-pr | --program-p)
  262.     ac_prev=program_prefix ;;
  263.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  264.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  265.     program_prefix="$ac_optarg" ;;
  266.  
  267.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  268.   | --program-suf | --program-su | --program-s)
  269.     ac_prev=program_suffix ;;
  270.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  271.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  272.     program_suffix="$ac_optarg" ;;
  273.  
  274.   -program-transform-name | --program-transform-name \
  275.   | --program-transform-nam | --program-transform-na \
  276.   | --program-transform-n | --program-transform- \
  277.   | --program-transform | --program-transfor \
  278.   | --program-transfo | --program-transf \
  279.   | --program-trans | --program-tran \
  280.   | --progr-tra | --program-tr | --program-t)
  281.     ac_prev=program_transform_name ;;
  282.   -program-transform-name=* | --program-transform-name=* \
  283.   | --program-transform-nam=* | --program-transform-na=* \
  284.   | --program-transform-n=* | --program-transform-=* \
  285.   | --program-transform=* | --program-transfor=* \
  286.   | --program-transfo=* | --program-transf=* \
  287.   | --program-trans=* | --program-tran=* \
  288.   | --progr-tra=* | --program-tr=* | --program-t=*)
  289.     program_transform_name="$ac_optarg" ;;
  290.  
  291.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  292.   | -silent | --silent | --silen | --sile | --sil)
  293.     silent=yes ;;
  294.  
  295.   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  296.     ac_prev=sbindir ;;
  297.   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  298.   | --sbi=* | --sb=*)
  299.     sbindir="$ac_optarg" ;;
  300.  
  301.   -sharedstatedir | --sharedstatedir | --sharedstatedi \
  302.   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  303.   | --sharedst | --shareds | --shared | --share | --shar \
  304.   | --sha | --sh)
  305.     ac_prev=sharedstatedir ;;
  306.   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  307.   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  308.   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  309.   | --sha=* | --sh=*)
  310.     sharedstatedir="$ac_optarg" ;;
  311.  
  312.   -site | --site | --sit)
  313.     ac_prev=site ;;
  314.   -site=* | --site=* | --sit=*)
  315.     site="$ac_optarg" ;;
  316.  
  317.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  318.     ac_prev=srcdir ;;
  319.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  320.     srcdir="$ac_optarg" ;;
  321.  
  322.   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  323.   | --syscon | --sysco | --sysc | --sys | --sy)
  324.     ac_prev=sysconfdir ;;
  325.   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  326.   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  327.     sysconfdir="$ac_optarg" ;;
  328.  
  329.   -target | --target | --targe | --targ | --tar | --ta | --t)
  330.     ac_prev=target ;;
  331.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  332.     target="$ac_optarg" ;;
  333.  
  334.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  335.     verbose=yes ;;
  336.  
  337.   -version | --version | --versio | --versi | --vers)
  338.     echo "configure generated by autoconf version 2.13"
  339.     exit 0 ;;
  340.  
  341.   -with-* | --with-*)
  342.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  343.     # Reject names that are not valid shell variable names.
  344.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  345.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  346.     fi
  347.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  348.     case "$ac_option" in
  349.       *=*) ;;
  350.       *) ac_optarg=yes ;;
  351.     esac
  352.     eval "with_${ac_package}='$ac_optarg'" ;;
  353.  
  354.   -without-* | --without-*)
  355.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  356.     # Reject names that are not valid shell variable names.
  357.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  358.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  359.     fi
  360.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  361.     eval "with_${ac_package}=no" ;;
  362.  
  363.   --x)
  364.     # Obsolete; use --with-x.
  365.     with_x=yes ;;
  366.  
  367.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  368.   | --x-incl | --x-inc | --x-in | --x-i)
  369.     ac_prev=x_includes ;;
  370.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  371.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  372.     x_includes="$ac_optarg" ;;
  373.  
  374.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  375.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  376.     ac_prev=x_libraries ;;
  377.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  378.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  379.     x_libraries="$ac_optarg" ;;
  380.  
  381.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  382.     ;;
  383.  
  384.   *)
  385.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  386.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  387.     fi
  388.     if test "x$nonopt" != xNONE; then
  389.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  390.     fi
  391.     nonopt="$ac_option"
  392.     ;;
  393.  
  394.   esac
  395. done
  396.  
  397. if test -n "$ac_prev"; then
  398.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  399. fi
  400.  
  401. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  402.  
  403. # File descriptor usage:
  404. # 0 standard input
  405. # 1 file creation
  406. # 2 errors and warnings
  407. # 3 some systems may open it to /dev/tty
  408. # 4 used on the Kubota Titan
  409. # 6 checking for... messages and results
  410. # 5 compiler messages saved in config.log
  411. if test "$silent" = yes; then
  412.   exec 6>/dev/null
  413. else
  414.   exec 6>&1
  415. fi
  416. exec 5>./config.log
  417.  
  418. echo "\
  419. This file contains any messages produced by compilers while
  420. running configure, to aid debugging if configure makes a mistake.
  421. " 1>&5
  422.  
  423. # Strip out --no-create and --no-recursion so they do not pile up.
  424. # Also quote any args containing shell metacharacters.
  425. ac_configure_args=
  426. for ac_arg
  427. do
  428.   case "$ac_arg" in
  429.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  430.   | --no-cr | --no-c) ;;
  431.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  432.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  433.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  434.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  435.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  436.   esac
  437. done
  438.  
  439. # NLS nuisances.
  440. # Only set these to C if already set.  These must not be set unconditionally
  441. # because not all systems understand e.g. LANG=C (notably SCO).
  442. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  443. # Non-C LC_CTYPE values break the ctype check.
  444. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  445. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  446. if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  447. if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
  448.  
  449. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  450. rm -rf conftest* confdefs.h
  451. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  452. echo > confdefs.h
  453.  
  454. # A filename unique to this package, relative to the directory that
  455. # configure is in, which we can look for to find out if srcdir is correct.
  456. ac_unique_file=nmap.c
  457.  
  458. # Find the source files, if location was not specified.
  459. if test -z "$srcdir"; then
  460.   ac_srcdir_defaulted=yes
  461.   # Try the directory containing this script, then its parent.
  462.   ac_prog=$0
  463.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  464.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  465.   srcdir=$ac_confdir
  466.   if test ! -r $srcdir/$ac_unique_file; then
  467.     srcdir=..
  468.   fi
  469. else
  470.   ac_srcdir_defaulted=no
  471. fi
  472. if test ! -r $srcdir/$ac_unique_file; then
  473.   if test "$ac_srcdir_defaulted" = yes; then
  474.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  475.   else
  476.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  477.   fi
  478. fi
  479. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  480.  
  481. # Prefer explicitly selected file to automatically selected ones.
  482. if test -z "$CONFIG_SITE"; then
  483.   if test "x$prefix" != xNONE; then
  484.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  485.   else
  486.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  487.   fi
  488. fi
  489. for ac_site_file in $CONFIG_SITE; do
  490.   if test -r "$ac_site_file"; then
  491.     echo "loading site script $ac_site_file"
  492.     . "$ac_site_file"
  493.   fi
  494. done
  495.  
  496. if test -r "$cache_file"; then
  497.   echo "loading cache $cache_file"
  498.   . $cache_file
  499. else
  500.   echo "creating cache $cache_file"
  501.   > $cache_file
  502. fi
  503.  
  504. ac_ext=c
  505. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  506. ac_cpp='$CPP $CPPFLAGS'
  507. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  508. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  509. cross_compiling=$ac_cv_prog_cc_cross
  510.  
  511. ac_exeext=
  512. ac_objext=o
  513. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  514.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  515.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  516.     ac_n= ac_c='
  517. ' ac_t='    '
  518.   else
  519.     ac_n=-n ac_c= ac_t=
  520.   fi
  521. else
  522.   ac_n= ac_c='\c' ac_t=
  523. fi
  524.  
  525.  
  526.  
  527. libpcapdir=libpcap-possiblymodified
  528.  
  529.  
  530.  
  531.  
  532. # Extract the first word of "gcc", so it can be a program name with args.
  533. set dummy gcc; ac_word=$2
  534. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  535. echo "configure:536: checking for $ac_word" >&5
  536. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  537.   echo $ac_n "(cached) $ac_c" 1>&6
  538. else
  539.   if test -n "$CC"; then
  540.   ac_cv_prog_CC="$CC" # Let the user override the test.
  541. else
  542.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  543.   ac_dummy="$PATH"
  544.   for ac_dir in $ac_dummy; do
  545.     test -z "$ac_dir" && ac_dir=.
  546.     if test -f $ac_dir/$ac_word; then
  547.       ac_cv_prog_CC="gcc"
  548.       break
  549.     fi
  550.   done
  551.   IFS="$ac_save_ifs"
  552. fi
  553. fi
  554. CC="$ac_cv_prog_CC"
  555. if test -n "$CC"; then
  556.   echo "$ac_t""$CC" 1>&6
  557. else
  558.   echo "$ac_t""no" 1>&6
  559. fi
  560.  
  561. if test -z "$CC"; then
  562.   # Extract the first word of "cc", so it can be a program name with args.
  563. set dummy cc; ac_word=$2
  564. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  565. echo "configure:566: checking for $ac_word" >&5
  566. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  567.   echo $ac_n "(cached) $ac_c" 1>&6
  568. else
  569.   if test -n "$CC"; then
  570.   ac_cv_prog_CC="$CC" # Let the user override the test.
  571. else
  572.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  573.   ac_prog_rejected=no
  574.   ac_dummy="$PATH"
  575.   for ac_dir in $ac_dummy; do
  576.     test -z "$ac_dir" && ac_dir=.
  577.     if test -f $ac_dir/$ac_word; then
  578.       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  579.         ac_prog_rejected=yes
  580.     continue
  581.       fi
  582.       ac_cv_prog_CC="cc"
  583.       break
  584.     fi
  585.   done
  586.   IFS="$ac_save_ifs"
  587. if test $ac_prog_rejected = yes; then
  588.   # We found a bogon in the path, so make sure we never use it.
  589.   set dummy $ac_cv_prog_CC
  590.   shift
  591.   if test $# -gt 0; then
  592.     # We chose a different compiler from the bogus one.
  593.     # However, it has the same basename, so the bogon will be chosen
  594.     # first if we set CC to just the basename; use the full file name.
  595.     shift
  596.     set dummy "$ac_dir/$ac_word" "$@"
  597.     shift
  598.     ac_cv_prog_CC="$@"
  599.   fi
  600. fi
  601. fi
  602. fi
  603. CC="$ac_cv_prog_CC"
  604. if test -n "$CC"; then
  605.   echo "$ac_t""$CC" 1>&6
  606. else
  607.   echo "$ac_t""no" 1>&6
  608. fi
  609.  
  610.   if test -z "$CC"; then
  611.     case "`uname -s`" in
  612.     *win32* | *WIN32*)
  613.       # Extract the first word of "cl", so it can be a program name with args.
  614. set dummy cl; ac_word=$2
  615. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  616. echo "configure:617: checking for $ac_word" >&5
  617. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  618.   echo $ac_n "(cached) $ac_c" 1>&6
  619. else
  620.   if test -n "$CC"; then
  621.   ac_cv_prog_CC="$CC" # Let the user override the test.
  622. else
  623.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  624.   ac_dummy="$PATH"
  625.   for ac_dir in $ac_dummy; do
  626.     test -z "$ac_dir" && ac_dir=.
  627.     if test -f $ac_dir/$ac_word; then
  628.       ac_cv_prog_CC="cl"
  629.       break
  630.     fi
  631.   done
  632.   IFS="$ac_save_ifs"
  633. fi
  634. fi
  635. CC="$ac_cv_prog_CC"
  636. if test -n "$CC"; then
  637.   echo "$ac_t""$CC" 1>&6
  638. else
  639.   echo "$ac_t""no" 1>&6
  640. fi
  641.  ;;
  642.     esac
  643.   fi
  644.   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  645. fi
  646.  
  647. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  648. echo "configure:649: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  649.  
  650. ac_ext=c
  651. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  652. ac_cpp='$CPP $CPPFLAGS'
  653. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  654. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  655. cross_compiling=$ac_cv_prog_cc_cross
  656.  
  657. cat > conftest.$ac_ext << EOF
  658.  
  659. #line 660 "configure"
  660. #include "confdefs.h"
  661.  
  662. main(){return(0);}
  663. EOF
  664. if { (eval echo configure:665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  665.   ac_cv_prog_cc_works=yes
  666.   # If we can't run a trivial program, we are probably using a cross compiler.
  667.   if (./conftest; exit) 2>/dev/null; then
  668.     ac_cv_prog_cc_cross=no
  669.   else
  670.     ac_cv_prog_cc_cross=yes
  671.   fi
  672. else
  673.   echo "configure: failed program was:" >&5
  674.   cat conftest.$ac_ext >&5
  675.   ac_cv_prog_cc_works=no
  676. fi
  677. rm -fr conftest*
  678. ac_ext=c
  679. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  680. ac_cpp='$CPP $CPPFLAGS'
  681. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  682. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  683. cross_compiling=$ac_cv_prog_cc_cross
  684.  
  685. echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  686. if test $ac_cv_prog_cc_works = no; then
  687.   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  688. fi
  689. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  690. echo "configure:691: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  691. echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  692. cross_compiling=$ac_cv_prog_cc_cross
  693.  
  694. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  695. echo "configure:696: checking whether we are using GNU C" >&5
  696. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  697.   echo $ac_n "(cached) $ac_c" 1>&6
  698. else
  699.   cat > conftest.c <<EOF
  700. #ifdef __GNUC__
  701.   yes;
  702. #endif
  703. EOF
  704. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:705: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  705.   ac_cv_prog_gcc=yes
  706. else
  707.   ac_cv_prog_gcc=no
  708. fi
  709. fi
  710.  
  711. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  712.  
  713. if test $ac_cv_prog_gcc = yes; then
  714.   GCC=yes
  715. else
  716.   GCC=
  717. fi
  718.  
  719. ac_test_CFLAGS="${CFLAGS+set}"
  720. ac_save_CFLAGS="$CFLAGS"
  721. CFLAGS=
  722. echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  723. echo "configure:724: checking whether ${CC-cc} accepts -g" >&5
  724. if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  725.   echo $ac_n "(cached) $ac_c" 1>&6
  726. else
  727.   echo 'void f(){}' > conftest.c
  728. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  729.   ac_cv_prog_cc_g=yes
  730. else
  731.   ac_cv_prog_cc_g=no
  732. fi
  733. rm -f conftest*
  734.  
  735. fi
  736.  
  737. echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  738. if test "$ac_test_CFLAGS" = set; then
  739.   CFLAGS="$ac_save_CFLAGS"
  740. elif test $ac_cv_prog_cc_g = yes; then
  741.   if test "$GCC" = yes; then
  742.     CFLAGS="-g -O2"
  743.   else
  744.     CFLAGS="-g"
  745.   fi
  746. else
  747.   if test "$GCC" = yes; then
  748.     CFLAGS="-O2"
  749.   else
  750.     CFLAGS=
  751.   fi
  752. fi
  753.  
  754.  if test -n "$GCC"; then
  755.       CFLAGS="$CFLAGS -Wall "
  756.  fi
  757.  
  758.  
  759.  
  760.  
  761. ac_aux_dir=
  762. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  763.   if test -f $ac_dir/install-sh; then
  764.     ac_aux_dir=$ac_dir
  765.     ac_install_sh="$ac_aux_dir/install-sh -c"
  766.     break
  767.   elif test -f $ac_dir/install.sh; then
  768.     ac_aux_dir=$ac_dir
  769.     ac_install_sh="$ac_aux_dir/install.sh -c"
  770.     break
  771.   fi
  772. done
  773. if test -z "$ac_aux_dir"; then
  774.   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  775. fi
  776. ac_config_guess=$ac_aux_dir/config.guess
  777. ac_config_sub=$ac_aux_dir/config.sub
  778. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  779.  
  780.  
  781. # Make sure we can run config.sub.
  782. if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
  783. else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
  784. fi
  785.  
  786. echo $ac_n "checking host system type""... $ac_c" 1>&6
  787. echo "configure:788: checking host system type" >&5
  788.  
  789. host_alias=$host
  790. case "$host_alias" in
  791. NONE)
  792.   case $nonopt in
  793.   NONE)
  794.     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
  795.     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
  796.     fi ;;
  797.   *) host_alias=$nonopt ;;
  798.   esac ;;
  799. esac
  800.  
  801. host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
  802. host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  803. host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  804. host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  805. echo "$ac_t""$host" 1>&6
  806.  
  807.  
  808. linux=no
  809.  
  810. case "$host" in
  811.   *-netbsd*)
  812.     cat >> confdefs.h <<\EOF
  813. #define NETBSD 1
  814. EOF
  815.  
  816.     ;;
  817.   *-openbsd*)
  818.     cat >> confdefs.h <<\EOF
  819. #define OPENBSD 1
  820. EOF
  821.  
  822.     ;;
  823.   *-sgi-irix5*)
  824.     cat >> confdefs.h <<\EOF
  825. #define IRIX 1
  826. EOF
  827.  
  828.     if test -z "$GCC"; then
  829.       sgi_cc=yes
  830.     fi
  831.     ;;
  832.   *-sgi-irix6*)
  833.     cat >> confdefs.h <<\EOF
  834. #define IRIX 1
  835. EOF
  836.  
  837.     if test -z "$GCC"; then
  838.       sgi_cc=yes
  839.     fi
  840.     ;;
  841.   *-solaris2.0*)  
  842.     cat >> confdefs.h <<\EOF
  843. #define STUPID_SOLARIS_CHECKSUM_BUG 1
  844. EOF
  845.  
  846.     cat >> confdefs.h <<\EOF
  847. #define SOLARIS 1
  848. EOF
  849.  
  850.     ;;
  851.   *-solaris2.1*)
  852.     cat >> confdefs.h <<\EOF
  853. #define STUPID_SOLARIS_CHECKSUM_BUG 1
  854. EOF
  855.  
  856.     cat >> confdefs.h <<\EOF
  857. #define SOLARIS 1
  858. EOF
  859.  
  860.     ;;
  861.   *-solaris2.2*)
  862.     cat >> confdefs.h <<\EOF
  863. #define STUPID_SOLARIS_CHECKSUM_BUG 1
  864. EOF
  865.  
  866.     cat >> confdefs.h <<\EOF
  867. #define SOLARIS 1
  868. EOF
  869.  
  870.     ;;
  871.   *-solaris2.3*)
  872.     cat >> confdefs.h <<\EOF
  873. #define STUPID_SOLARIS_CHECKSUM_BUG 1
  874. EOF
  875.  
  876.     cat >> confdefs.h <<\EOF
  877. #define SOLARIS 1
  878. EOF
  879.  
  880.     ;;
  881.   *-solaris2.4*)
  882.     cat >> confdefs.h <<\EOF
  883. #define STUPID_SOLARIS_CHECKSUM_BUG 1
  884. EOF
  885.  
  886.     cat >> confdefs.h <<\EOF
  887. #define SOLARIS 1
  888. EOF
  889.  
  890.     ;;
  891.   *-solaris2.5.1)
  892.     cat >> confdefs.h <<\EOF
  893. #define STUPID_SOLARIS_CHECKSUM_BUG 1
  894. EOF
  895.  
  896.     cat >> confdefs.h <<\EOF
  897. #define SOLARIS 1
  898. EOF
  899.  
  900.     ;;
  901.   *-solaris*)
  902.     cat >> confdefs.h <<\EOF
  903. #define SOLARIS 1
  904. EOF
  905.  
  906.     ;;
  907.   *-sunos4*)
  908.     cat >> confdefs.h <<\EOF
  909. #define SUNOS 1
  910. EOF
  911.  
  912.     cat >> confdefs.h <<\EOF
  913. #define SPRINTF_RETURNS_STRING 1
  914. EOF
  915.  
  916.     ;;
  917.   *-linux*)
  918.     linux=yes
  919.     cat >> confdefs.h <<\EOF
  920. #define LINUX 1
  921. EOF
  922.  
  923.     cat >> confdefs.h <<\EOF
  924. #define PCAP_TIMEOUT_IGNORED 1
  925. EOF
  926.   # libpcap doesn't even LOOK at
  927.                                      # the timeout you give it under Linux
  928.     ;;
  929.   *-freebsd*)
  930.     cat >> confdefs.h <<\EOF
  931. #define FREEBSD 1
  932. EOF
  933.  
  934.     ;;
  935.   *-bsdi*)
  936.     cat >> confdefs.h <<\EOF
  937. #define BSDI 1
  938. EOF
  939.  
  940.     ;;
  941. esac
  942.  
  943.  
  944. echo $ac_n "checking for gethostent""... $ac_c" 1>&6
  945. echo "configure:946: checking for gethostent" >&5
  946. if eval "test \"`echo '$''{'ac_cv_func_gethostent'+set}'`\" = set"; then
  947.   echo $ac_n "(cached) $ac_c" 1>&6
  948. else
  949.   cat > conftest.$ac_ext <<EOF
  950. #line 951 "configure"
  951. #include "confdefs.h"
  952. /* System header to define __stub macros and hopefully few prototypes,
  953.     which can conflict with char gethostent(); below.  */
  954. #include <assert.h>
  955. /* Override any gcc2 internal prototype to avoid an error.  */
  956. /* We use char because int might match the return type of a gcc2
  957.     builtin and then its argument prototype would still apply.  */
  958. char gethostent();
  959.  
  960. int main() {
  961.  
  962. /* The GNU C library defines this for functions which it implements
  963.     to always fail with ENOSYS.  Some functions are actually named
  964.     something starting with __ and the normal name is an alias.  */
  965. #if defined (__stub_gethostent) || defined (__stub___gethostent)
  966. choke me
  967. #else
  968. gethostent();
  969. #endif
  970.  
  971. ; return 0; }
  972. EOF
  973. if { (eval echo configure:974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  974.   rm -rf conftest*
  975.   eval "ac_cv_func_gethostent=yes"
  976. else
  977.   echo "configure: failed program was:" >&5
  978.   cat conftest.$ac_ext >&5
  979.   rm -rf conftest*
  980.   eval "ac_cv_func_gethostent=no"
  981. fi
  982. rm -f conftest*
  983. fi
  984.  
  985. if eval "test \"`echo '$ac_cv_func_'gethostent`\" = yes"; then
  986.   echo "$ac_t""yes" 1>&6
  987.   :
  988. else
  989.   echo "$ac_t""no" 1>&6
  990. echo $ac_n "checking for gethostent in -lnsl""... $ac_c" 1>&6
  991. echo "configure:992: checking for gethostent in -lnsl" >&5
  992. ac_lib_var=`echo nsl'_'gethostent | sed 'y%./+-%__p_%'`
  993. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  994.   echo $ac_n "(cached) $ac_c" 1>&6
  995. else
  996.   ac_save_LIBS="$LIBS"
  997. LIBS="-lnsl  $LIBS"
  998. cat > conftest.$ac_ext <<EOF
  999. #line 1000 "configure"
  1000. #include "confdefs.h"
  1001. /* Override any gcc2 internal prototype to avoid an error.  */
  1002. /* We use char because int might match the return type of a gcc2
  1003.     builtin and then its argument prototype would still apply.  */
  1004. char gethostent();
  1005.  
  1006. int main() {
  1007. gethostent()
  1008. ; return 0; }
  1009. EOF
  1010. if { (eval echo configure:1011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1011.   rm -rf conftest*
  1012.   eval "ac_cv_lib_$ac_lib_var=yes"
  1013. else
  1014.   echo "configure: failed program was:" >&5
  1015.   cat conftest.$ac_ext >&5
  1016.   rm -rf conftest*
  1017.   eval "ac_cv_lib_$ac_lib_var=no"
  1018. fi
  1019. rm -f conftest*
  1020. LIBS="$ac_save_LIBS"
  1021.  
  1022. fi
  1023. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1024.   echo "$ac_t""yes" 1>&6
  1025.     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/^a-zA-Z0-9_/_/g' \
  1026.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  1027.   cat >> confdefs.h <<EOF
  1028. #define $ac_tr_lib 1
  1029. EOF
  1030.  
  1031.   LIBS="-lnsl $LIBS"
  1032.  
  1033. else
  1034.   echo "$ac_t""no" 1>&6
  1035. fi
  1036.  
  1037. fi
  1038.  
  1039. echo $ac_n "checking for setsockopt""... $ac_c" 1>&6
  1040. echo "configure:1041: checking for setsockopt" >&5
  1041. if eval "test \"`echo '$''{'ac_cv_func_setsockopt'+set}'`\" = set"; then
  1042.   echo $ac_n "(cached) $ac_c" 1>&6
  1043. else
  1044.   cat > conftest.$ac_ext <<EOF
  1045. #line 1046 "configure"
  1046. #include "confdefs.h"
  1047. /* System header to define __stub macros and hopefully few prototypes,
  1048.     which can conflict with char setsockopt(); below.  */
  1049. #include <assert.h>
  1050. /* Override any gcc2 internal prototype to avoid an error.  */
  1051. /* We use char because int might match the return type of a gcc2
  1052.     builtin and then its argument prototype would still apply.  */
  1053. char setsockopt();
  1054.  
  1055. int main() {
  1056.  
  1057. /* The GNU C library defines this for functions which it implements
  1058.     to always fail with ENOSYS.  Some functions are actually named
  1059.     something starting with __ and the normal name is an alias.  */
  1060. #if defined (__stub_setsockopt) || defined (__stub___setsockopt)
  1061. choke me
  1062. #else
  1063. setsockopt();
  1064. #endif
  1065.  
  1066. ; return 0; }
  1067. EOF
  1068. if { (eval echo configure:1069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1069.   rm -rf conftest*
  1070.   eval "ac_cv_func_setsockopt=yes"
  1071. else
  1072.   echo "configure: failed program was:" >&5
  1073.   cat conftest.$ac_ext >&5
  1074.   rm -rf conftest*
  1075.   eval "ac_cv_func_setsockopt=no"
  1076. fi
  1077. rm -f conftest*
  1078. fi
  1079.  
  1080. if eval "test \"`echo '$ac_cv_func_'setsockopt`\" = yes"; then
  1081.   echo "$ac_t""yes" 1>&6
  1082.   :
  1083. else
  1084.   echo "$ac_t""no" 1>&6
  1085. echo $ac_n "checking for setsockopt in -lsocket""... $ac_c" 1>&6
  1086. echo "configure:1087: checking for setsockopt in -lsocket" >&5
  1087. ac_lib_var=`echo socket'_'setsockopt | sed 'y%./+-%__p_%'`
  1088. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1089.   echo $ac_n "(cached) $ac_c" 1>&6
  1090. else
  1091.   ac_save_LIBS="$LIBS"
  1092. LIBS="-lsocket  $LIBS"
  1093. cat > conftest.$ac_ext <<EOF
  1094. #line 1095 "configure"
  1095. #include "confdefs.h"
  1096. /* Override any gcc2 internal prototype to avoid an error.  */
  1097. /* We use char because int might match the return type of a gcc2
  1098.     builtin and then its argument prototype would still apply.  */
  1099. char setsockopt();
  1100.  
  1101. int main() {
  1102. setsockopt()
  1103. ; return 0; }
  1104. EOF
  1105. if { (eval echo configure:1106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1106.   rm -rf conftest*
  1107.   eval "ac_cv_lib_$ac_lib_var=yes"
  1108. else
  1109.   echo "configure: failed program was:" >&5
  1110.   cat conftest.$ac_ext >&5
  1111.   rm -rf conftest*
  1112.   eval "ac_cv_lib_$ac_lib_var=no"
  1113. fi
  1114. rm -f conftest*
  1115. LIBS="$ac_save_LIBS"
  1116.  
  1117. fi
  1118. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1119.   echo "$ac_t""yes" 1>&6
  1120.     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/^a-zA-Z0-9_/_/g' \
  1121.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  1122.   cat >> confdefs.h <<EOF
  1123. #define $ac_tr_lib 1
  1124. EOF
  1125.  
  1126.   LIBS="-lsocket $LIBS"
  1127.  
  1128. else
  1129.   echo "$ac_t""no" 1>&6
  1130. fi
  1131.  
  1132. fi
  1133.  
  1134.  
  1135. echo $ac_n "checking for nanosleep""... $ac_c" 1>&6
  1136. echo "configure:1137: checking for nanosleep" >&5
  1137. if eval "test \"`echo '$''{'ac_cv_func_nanosleep'+set}'`\" = set"; then
  1138.   echo $ac_n "(cached) $ac_c" 1>&6
  1139. else
  1140.   cat > conftest.$ac_ext <<EOF
  1141. #line 1142 "configure"
  1142. #include "confdefs.h"
  1143. /* System header to define __stub macros and hopefully few prototypes,
  1144.     which can conflict with char nanosleep(); below.  */
  1145. #include <assert.h>
  1146. /* Override any gcc2 internal prototype to avoid an error.  */
  1147. /* We use char because int might match the return type of a gcc2
  1148.     builtin and then its argument prototype would still apply.  */
  1149. char nanosleep();
  1150.  
  1151. int main() {
  1152.  
  1153. /* The GNU C library defines this for functions which it implements
  1154.     to always fail with ENOSYS.  Some functions are actually named
  1155.     something starting with __ and the normal name is an alias.  */
  1156. #if defined (__stub_nanosleep) || defined (__stub___nanosleep)
  1157. choke me
  1158. #else
  1159. nanosleep();
  1160. #endif
  1161.  
  1162. ; return 0; }
  1163. EOF
  1164. if { (eval echo configure:1165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1165.   rm -rf conftest*
  1166.   eval "ac_cv_func_nanosleep=yes"
  1167. else
  1168.   echo "configure: failed program was:" >&5
  1169.   cat conftest.$ac_ext >&5
  1170.   rm -rf conftest*
  1171.   eval "ac_cv_func_nanosleep=no"
  1172. fi
  1173. rm -f conftest*
  1174. fi
  1175.  
  1176. if eval "test \"`echo '$ac_cv_func_'nanosleep`\" = yes"; then
  1177.   echo "$ac_t""yes" 1>&6
  1178.   :
  1179. else
  1180.   echo "$ac_t""no" 1>&6
  1181. echo $ac_n "checking for nanosleep in -lposix4""... $ac_c" 1>&6
  1182. echo "configure:1183: checking for nanosleep in -lposix4" >&5
  1183. ac_lib_var=`echo posix4'_'nanosleep | sed 'y%./+-%__p_%'`
  1184. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1185.   echo $ac_n "(cached) $ac_c" 1>&6
  1186. else
  1187.   ac_save_LIBS="$LIBS"
  1188. LIBS="-lposix4  $LIBS"
  1189. cat > conftest.$ac_ext <<EOF
  1190. #line 1191 "configure"
  1191. #include "confdefs.h"
  1192. /* Override any gcc2 internal prototype to avoid an error.  */
  1193. /* We use char because int might match the return type of a gcc2
  1194.     builtin and then its argument prototype would still apply.  */
  1195. char nanosleep();
  1196.  
  1197. int main() {
  1198. nanosleep()
  1199. ; return 0; }
  1200. EOF
  1201. if { (eval echo configure:1202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1202.   rm -rf conftest*
  1203.   eval "ac_cv_lib_$ac_lib_var=yes"
  1204. else
  1205.   echo "configure: failed program was:" >&5
  1206.   cat conftest.$ac_ext >&5
  1207.   rm -rf conftest*
  1208.   eval "ac_cv_lib_$ac_lib_var=no"
  1209. fi
  1210. rm -f conftest*
  1211. LIBS="$ac_save_LIBS"
  1212.  
  1213. fi
  1214. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1215.   echo "$ac_t""yes" 1>&6
  1216.     ac_tr_lib=HAVE_LIB`echo posix4 | sed -e 's/^a-zA-Z0-9_/_/g' \
  1217.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  1218.   cat >> confdefs.h <<EOF
  1219. #define $ac_tr_lib 1
  1220. EOF
  1221.  
  1222.   LIBS="-lposix4 $LIBS"
  1223.  
  1224. else
  1225.   echo "$ac_t""no" 1>&6
  1226. fi
  1227.  
  1228. fi
  1229.  
  1230.  
  1231. have_libpcap=no
  1232.  
  1233. # By default, search for pcap library
  1234. test "${with_libpcap+set}" != "set" && with_libpcap=yes
  1235.  
  1236. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  1237. echo "configure:1238: checking how to run the C preprocessor" >&5
  1238. # On Suns, sometimes $CPP names a directory.
  1239. if test -n "$CPP" && test -d "$CPP"; then
  1240.   CPP=
  1241. fi
  1242. if test -z "$CPP"; then
  1243. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  1244.   echo $ac_n "(cached) $ac_c" 1>&6
  1245. else
  1246.     # This must be in double quotes, not single quotes, because CPP may get
  1247.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  1248.   CPP="${CC-cc} -E"
  1249.   # On the NeXT, cc -E runs the code through the compiler's parser,
  1250.   # not just through cpp.
  1251.   cat > conftest.$ac_ext <<EOF
  1252. #line 1253 "configure"
  1253. #include "confdefs.h"
  1254. #include <assert.h>
  1255. Syntax Error
  1256. EOF
  1257. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1258. { (eval echo configure:1259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1259. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1260. if test -z "$ac_err"; then
  1261.   :
  1262. else
  1263.   echo "$ac_err" >&5
  1264.   echo "configure: failed program was:" >&5
  1265.   cat conftest.$ac_ext >&5
  1266.   rm -rf conftest*
  1267.   CPP="${CC-cc} -E -traditional-cpp"
  1268.   cat > conftest.$ac_ext <<EOF
  1269. #line 1270 "configure"
  1270. #include "confdefs.h"
  1271. #include <assert.h>
  1272. Syntax Error
  1273. EOF
  1274. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1275. { (eval echo configure:1276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1276. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1277. if test -z "$ac_err"; then
  1278.   :
  1279. else
  1280.   echo "$ac_err" >&5
  1281.   echo "configure: failed program was:" >&5
  1282.   cat conftest.$ac_ext >&5
  1283.   rm -rf conftest*
  1284.   CPP="${CC-cc} -nologo -E"
  1285.   cat > conftest.$ac_ext <<EOF
  1286. #line 1287 "configure"
  1287. #include "confdefs.h"
  1288. #include <assert.h>
  1289. Syntax Error
  1290. EOF
  1291. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1292. { (eval echo configure:1293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1293. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1294. if test -z "$ac_err"; then
  1295.   :
  1296. else
  1297.   echo "$ac_err" >&5
  1298.   echo "configure: failed program was:" >&5
  1299.   cat conftest.$ac_ext >&5
  1300.   rm -rf conftest*
  1301.   CPP=/lib/cpp
  1302. fi
  1303. rm -f conftest*
  1304. fi
  1305. rm -f conftest*
  1306. fi
  1307. rm -f conftest*
  1308.   ac_cv_prog_CPP="$CPP"
  1309. fi
  1310.   CPP="$ac_cv_prog_CPP"
  1311. else
  1312.   ac_cv_prog_CPP="$CPP"
  1313. fi
  1314. echo "$ac_t""$CPP" 1>&6
  1315.  
  1316. # Check whether --with-libpcap or --without-libpcap was given.
  1317. if test "${with_libpcap+set}" = set; then
  1318.   withval="$with_libpcap"
  1319.     case "$with_libpcap" in
  1320.   yes)
  1321.     ac_safe=`echo "pcap.h" | sed 'y%./+-%__p_%'`
  1322. echo $ac_n "checking for pcap.h""... $ac_c" 1>&6
  1323. echo "configure:1324: checking for pcap.h" >&5
  1324. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1325.   echo $ac_n "(cached) $ac_c" 1>&6
  1326. else
  1327.   cat > conftest.$ac_ext <<EOF
  1328. #line 1329 "configure"
  1329. #include "confdefs.h"
  1330. #include <pcap.h>
  1331. EOF
  1332. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1333. { (eval echo configure:1334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1334. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1335. if test -z "$ac_err"; then
  1336.   rm -rf conftest*
  1337.   eval "ac_cv_header_$ac_safe=yes"
  1338. else
  1339.   echo "$ac_err" >&5
  1340.   echo "configure: failed program was:" >&5
  1341.   cat conftest.$ac_ext >&5
  1342.   rm -rf conftest*
  1343.   eval "ac_cv_header_$ac_safe=no"
  1344. fi
  1345. rm -f conftest*
  1346. fi
  1347. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1348.   echo "$ac_t""yes" 1>&6
  1349.   echo $ac_n "checking for pcap_datalink in -lpcap""... $ac_c" 1>&6
  1350. echo "configure:1351: checking for pcap_datalink in -lpcap" >&5
  1351. ac_lib_var=`echo pcap'_'pcap_datalink | sed 'y%./+-%__p_%'`
  1352. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1353.   echo $ac_n "(cached) $ac_c" 1>&6
  1354. else
  1355.   ac_save_LIBS="$LIBS"
  1356. LIBS="-lpcap  $LIBS"
  1357. cat > conftest.$ac_ext <<EOF
  1358. #line 1359 "configure"
  1359. #include "confdefs.h"
  1360. /* Override any gcc2 internal prototype to avoid an error.  */
  1361. /* We use char because int might match the return type of a gcc2
  1362.     builtin and then its argument prototype would still apply.  */
  1363. char pcap_datalink();
  1364.  
  1365. int main() {
  1366. pcap_datalink()
  1367. ; return 0; }
  1368. EOF
  1369. if { (eval echo configure:1370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1370.   rm -rf conftest*
  1371.   eval "ac_cv_lib_$ac_lib_var=yes"
  1372. else
  1373.   echo "configure: failed program was:" >&5
  1374.   cat conftest.$ac_ext >&5
  1375.   rm -rf conftest*
  1376.   eval "ac_cv_lib_$ac_lib_var=no"
  1377. fi
  1378. rm -f conftest*
  1379. LIBS="$ac_save_LIBS"
  1380.  
  1381. fi
  1382. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1383.   echo "$ac_t""yes" 1>&6
  1384.   have_libpcap=yes LIBS="-lpcap $LIBS"
  1385. else
  1386.   echo "$ac_t""no" 1>&6
  1387. fi
  1388.  
  1389. else
  1390.   echo "$ac_t""no" 1>&6
  1391. fi
  1392.  
  1393.     ;;
  1394.   *)
  1395.     _cppflags=$CPPFLAGS
  1396.     _ldflags=$LDFLAGS
  1397.  
  1398.     CPPFLAGS="-I$with_libpcap/include $CPPFLAGS"
  1399.     LDFLAGS="-L$with_libpcap/lib $LDFLAGS"
  1400.  
  1401.     ac_safe=`echo "pcap.h" | sed 'y%./+-%__p_%'`
  1402. echo $ac_n "checking for pcap.h""... $ac_c" 1>&6
  1403. echo "configure:1404: checking for pcap.h" >&5
  1404. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1405.   echo $ac_n "(cached) $ac_c" 1>&6
  1406. else
  1407.   cat > conftest.$ac_ext <<EOF
  1408. #line 1409 "configure"
  1409. #include "confdefs.h"
  1410. #include <pcap.h>
  1411. EOF
  1412. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1413. { (eval echo configure:1414: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1414. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1415. if test -z "$ac_err"; then
  1416.   rm -rf conftest*
  1417.   eval "ac_cv_header_$ac_safe=yes"
  1418. else
  1419.   echo "$ac_err" >&5
  1420.   echo "configure: failed program was:" >&5
  1421.   cat conftest.$ac_ext >&5
  1422.   rm -rf conftest*
  1423.   eval "ac_cv_header_$ac_safe=no"
  1424. fi
  1425. rm -f conftest*
  1426. fi
  1427. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1428.   echo "$ac_t""yes" 1>&6
  1429.   
  1430.       echo $ac_n "checking for pcap_datalink in -lpcap""... $ac_c" 1>&6
  1431. echo "configure:1432: checking for pcap_datalink in -lpcap" >&5
  1432. ac_lib_var=`echo pcap'_'pcap_datalink | sed 'y%./+-%__p_%'`
  1433. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1434.   echo $ac_n "(cached) $ac_c" 1>&6
  1435. else
  1436.   ac_save_LIBS="$LIBS"
  1437. LIBS="-lpcap  $LIBS"
  1438. cat > conftest.$ac_ext <<EOF
  1439. #line 1440 "configure"
  1440. #include "confdefs.h"
  1441. /* Override any gcc2 internal prototype to avoid an error.  */
  1442. /* We use char because int might match the return type of a gcc2
  1443.     builtin and then its argument prototype would still apply.  */
  1444. char pcap_datalink();
  1445.  
  1446. int main() {
  1447. pcap_datalink()
  1448. ; return 0; }
  1449. EOF
  1450. if { (eval echo configure:1451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1451.   rm -rf conftest*
  1452.   eval "ac_cv_lib_$ac_lib_var=yes"
  1453. else
  1454.   echo "configure: failed program was:" >&5
  1455.   cat conftest.$ac_ext >&5
  1456.   rm -rf conftest*
  1457.   eval "ac_cv_lib_$ac_lib_var=no"
  1458. fi
  1459. rm -f conftest*
  1460. LIBS="$ac_save_LIBS"
  1461.  
  1462. fi
  1463. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1464.   echo "$ac_t""yes" 1>&6
  1465.   have_libpcap=yes LIBS="-lpcap $LIBS"
  1466.     LIBPCAP_INC=$with_libpcap/include
  1467.     LIBPCAP_LIB=$with_libpcap/lib
  1468. else
  1469.   echo "$ac_t""no" 1>&6
  1470. fi
  1471.  
  1472. else
  1473.   echo "$ac_t""no" 1>&6
  1474. fi
  1475.  
  1476.  
  1477.     LDFLAGS=$_ldflags
  1478.     CPPFLAGS=$_cppflags
  1479.     ;;
  1480.   esac
  1481.  
  1482. fi
  1483.  
  1484. if test $linux = yes; then
  1485.   have_libpcap=no
  1486. fi
  1487.  
  1488. if test $have_libpcap = yes; then
  1489.   if test "${LIBPCAP_INC+set}" = "set"; then
  1490.     _cflags=$CFLAGS
  1491.     _ldflags=$LDFLAGS
  1492.  
  1493.     CFLAGS="-I$LIBPCAP_INC $CFLAGS"
  1494.     LDFLAGS="-L$LIBPCAP_LIB $LDFLAGS"
  1495.   fi
  1496.  
  1497.   echo $ac_n "checking if libpcap version is recent enough""... $ac_c" 1>&6
  1498. echo "configure:1499: checking if libpcap version is recent enough" >&5
  1499.   if test "$cross_compiling" = yes; then
  1500.   echo "$ac_t""no" 1>&6; have_libpcap=no
  1501. else
  1502.   cat > conftest.$ac_ext <<EOF
  1503. #line 1504 "configure"
  1504. #include "confdefs.h"
  1505.  
  1506. #include <stdio.h>
  1507. extern char pcap_version[];
  1508. int main() {
  1509.   int major, minor;
  1510.   sscanf(pcap_version,"%d.%d", &major, &minor);
  1511.   if (major > 0) 
  1512.     exit(0);
  1513.   if (minor > 4)
  1514.     exit(0);
  1515.   if (minor < 4)
  1516.     exit(1);
  1517.   if (pcap_version[3] > 'a')
  1518.     exit(0);
  1519.   if (pcap_version[3] == 'a') {
  1520.     if(!sscanf(&pcap_version[4], "%d", &minor))
  1521.       exit(1);
  1522.     if (minor >= 6)
  1523.       exit(0);
  1524.     else
  1525.       exit(1);
  1526.   }
  1527.   exit(1);
  1528. }
  1529. EOF
  1530. if { (eval echo configure:1531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1531. then
  1532.   echo "$ac_t""yes" 1>&6; have_libpcap=yes
  1533. else
  1534.   echo "configure: failed program was:" >&5
  1535.   cat conftest.$ac_ext >&5
  1536.   rm -fr conftest*
  1537.   echo "$ac_t""no" 1>&6; have_libpcap=no
  1538. fi
  1539. rm -fr conftest*
  1540. fi
  1541.  
  1542. fi
  1543. if test $have_libpcap = yes; then
  1544.   PCAP_DEPENDS=""
  1545.   PCAP_CLEAN=""
  1546.   PCAP_DIST_CLEAN=""
  1547.   cat >> confdefs.h <<\EOF
  1548. #define HAVE_LIBPCAP 1
  1549. EOF
  1550.  
  1551. else
  1552.   if test "${LIBPCAP_INC+set}" = "set"; then
  1553.     LDFLAGS="-L$libpcapdir $_ldflags"
  1554.     CFLAGS="$_cflags -I$libpcapdir"
  1555.   else
  1556.     LDFLAGS="-L$libpcapdir $LDFLAGS"
  1557.     CFLAGS="$CFLAGS -I$libpcapdir"
  1558.   fi
  1559.   PCAP_DEPENDS='$(LIBPCAPDIR)/libpcap.a'
  1560.   PCAP_CLEAN="pcap_clean"
  1561.   PCAP_DIST_CLEAN="pcap_dist_clean"
  1562. fi
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  1569. echo "configure:1570: checking for ANSI C header files" >&5
  1570. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  1571.   echo $ac_n "(cached) $ac_c" 1>&6
  1572. else
  1573.   cat > conftest.$ac_ext <<EOF
  1574. #line 1575 "configure"
  1575. #include "confdefs.h"
  1576. #include <stdlib.h>
  1577. #include <stdarg.h>
  1578. #include <string.h>
  1579. #include <float.h>
  1580. EOF
  1581. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1582. { (eval echo configure:1583: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1583. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1584. if test -z "$ac_err"; then
  1585.   rm -rf conftest*
  1586.   ac_cv_header_stdc=yes
  1587. else
  1588.   echo "$ac_err" >&5
  1589.   echo "configure: failed program was:" >&5
  1590.   cat conftest.$ac_ext >&5
  1591.   rm -rf conftest*
  1592.   ac_cv_header_stdc=no
  1593. fi
  1594. rm -f conftest*
  1595.  
  1596. if test $ac_cv_header_stdc = yes; then
  1597.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1598. cat > conftest.$ac_ext <<EOF
  1599. #line 1600 "configure"
  1600. #include "confdefs.h"
  1601. #include <string.h>
  1602. EOF
  1603. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1604.   egrep "memchr" >/dev/null 2>&1; then
  1605.   :
  1606. else
  1607.   rm -rf conftest*
  1608.   ac_cv_header_stdc=no
  1609. fi
  1610. rm -f conftest*
  1611.  
  1612. fi
  1613.  
  1614. if test $ac_cv_header_stdc = yes; then
  1615.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1616. cat > conftest.$ac_ext <<EOF
  1617. #line 1618 "configure"
  1618. #include "confdefs.h"
  1619. #include <stdlib.h>
  1620. EOF
  1621. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1622.   egrep "free" >/dev/null 2>&1; then
  1623.   :
  1624. else
  1625.   rm -rf conftest*
  1626.   ac_cv_header_stdc=no
  1627. fi
  1628. rm -f conftest*
  1629.  
  1630. fi
  1631.  
  1632. if test $ac_cv_header_stdc = yes; then
  1633.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1634. if test "$cross_compiling" = yes; then
  1635.   :
  1636. else
  1637.   cat > conftest.$ac_ext <<EOF
  1638. #line 1639 "configure"
  1639. #include "confdefs.h"
  1640. #include <ctype.h>
  1641. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1642. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1643. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  1644. int main () { int i; for (i = 0; i < 256; i++)
  1645. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1646. exit (0); }
  1647.  
  1648. EOF
  1649. if { (eval echo configure:1650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1650. then
  1651.   :
  1652. else
  1653.   echo "configure: failed program was:" >&5
  1654.   cat conftest.$ac_ext >&5
  1655.   rm -fr conftest*
  1656.   ac_cv_header_stdc=no
  1657. fi
  1658. rm -fr conftest*
  1659. fi
  1660.  
  1661. fi
  1662. fi
  1663.  
  1664. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  1665. if test $ac_cv_header_stdc = yes; then
  1666.   cat >> confdefs.h <<\EOF
  1667. #define STDC_HEADERS 1
  1668. EOF
  1669.  
  1670. fi
  1671.  
  1672. for ac_hdr in string.h getopt.h strings.h memory.h sys/param.h sys/sockio.h  netinet/if_ether.h bstring.h sys/time.h 
  1673. do
  1674. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1675. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1676. echo "configure:1677: checking for $ac_hdr" >&5
  1677. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1678.   echo $ac_n "(cached) $ac_c" 1>&6
  1679. else
  1680.   cat > conftest.$ac_ext <<EOF
  1681. #line 1682 "configure"
  1682. #include "confdefs.h"
  1683. #include <$ac_hdr>
  1684. EOF
  1685. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1686. { (eval echo configure:1687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1687. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1688. if test -z "$ac_err"; then
  1689.   rm -rf conftest*
  1690.   eval "ac_cv_header_$ac_safe=yes"
  1691. else
  1692.   echo "$ac_err" >&5
  1693.   echo "configure: failed program was:" >&5
  1694.   cat conftest.$ac_ext >&5
  1695.   rm -rf conftest*
  1696.   eval "ac_cv_header_$ac_safe=no"
  1697. fi
  1698. rm -f conftest*
  1699. fi
  1700. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1701.   echo "$ac_t""yes" 1>&6
  1702.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1703.   cat >> confdefs.h <<EOF
  1704. #define $ac_tr_hdr 1
  1705. EOF
  1706.  
  1707. else
  1708.   echo "$ac_t""no" 1>&6
  1709. fi
  1710. done
  1711.  
  1712. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  1713. echo "configure:1714: checking whether time.h and sys/time.h may both be included" >&5
  1714. if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  1715.   echo $ac_n "(cached) $ac_c" 1>&6
  1716. else
  1717.   cat > conftest.$ac_ext <<EOF
  1718. #line 1719 "configure"
  1719. #include "confdefs.h"
  1720. #include <sys/types.h>
  1721. #include <sys/time.h>
  1722. #include <time.h>
  1723. int main() {
  1724. struct tm *tp;
  1725. ; return 0; }
  1726. EOF
  1727. if { (eval echo configure:1728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1728.   rm -rf conftest*
  1729.   ac_cv_header_time=yes
  1730. else
  1731.   echo "configure: failed program was:" >&5
  1732.   cat conftest.$ac_ext >&5
  1733.   rm -rf conftest*
  1734.   ac_cv_header_time=no
  1735. fi
  1736. rm -f conftest*
  1737. fi
  1738.  
  1739. echo "$ac_t""$ac_cv_header_time" 1>&6
  1740. if test $ac_cv_header_time = yes; then
  1741.   cat >> confdefs.h <<\EOF
  1742. #define TIME_WITH_SYS_TIME 1
  1743. EOF
  1744.  
  1745. fi
  1746.  
  1747.  
  1748.  
  1749.  
  1750.  
  1751.  
  1752. echo $ac_n "checking for inline""... $ac_c" 1>&6
  1753. echo "configure:1754: checking for inline" >&5
  1754. if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
  1755.   echo $ac_n "(cached) $ac_c" 1>&6
  1756. else
  1757.   ac_cv_c_inline=no
  1758. for ac_kw in inline __inline__ __inline; do
  1759.   cat > conftest.$ac_ext <<EOF
  1760. #line 1761 "configure"
  1761. #include "confdefs.h"
  1762.  
  1763. int main() {
  1764. } $ac_kw foo() {
  1765. ; return 0; }
  1766. EOF
  1767. if { (eval echo configure:1768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1768.   rm -rf conftest*
  1769.   ac_cv_c_inline=$ac_kw; break
  1770. else
  1771.   echo "configure: failed program was:" >&5
  1772.   cat conftest.$ac_ext >&5
  1773. fi
  1774. rm -f conftest*
  1775. done
  1776.  
  1777. fi
  1778.  
  1779. echo "$ac_t""$ac_cv_c_inline" 1>&6
  1780. case "$ac_cv_c_inline" in
  1781.   inline | yes) ;;
  1782.   no) cat >> confdefs.h <<\EOF
  1783. #define inline 
  1784. EOF
  1785.  ;;
  1786.   *)  cat >> confdefs.h <<EOF
  1787. #define inline $ac_cv_c_inline
  1788. EOF
  1789.  ;;
  1790. esac
  1791.  
  1792. if test -n "$sgi_cc"; then
  1793.    cat >> confdefs.h <<\EOF
  1794. #define inline 
  1795. EOF
  1796.  
  1797. fi
  1798.  
  1799.  
  1800. echo $ac_n "checking struct ip""... $ac_c" 1>&6
  1801. echo "configure:1802: checking struct ip" >&5
  1802. cat > conftest.$ac_ext <<EOF
  1803. #line 1804 "configure"
  1804. #include "confdefs.h"
  1805. #include <sys/types.h>
  1806. #include <netinet/in.h>
  1807. #include <netinet/in_systm.h>
  1808. #include <netinet/ip.h>
  1809. int main() {
  1810. struct ip ip;
  1811. ; return 0; }
  1812. EOF
  1813. if { (eval echo configure:1814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1814.   rm -rf conftest*
  1815.   echo "$ac_t""yes" 1>&6; bsd_networking=yes
  1816. else
  1817.   echo "configure: failed program was:" >&5
  1818.   cat conftest.$ac_ext >&5
  1819.   rm -rf conftest*
  1820.   echo "$ac_t""no" 1>&6; bsd_networking=no
  1821. fi
  1822. rm -f conftest*;
  1823. if test $bsd_networking = yes; then
  1824.  
  1825.   cat >> confdefs.h <<\EOF
  1826. #define BSD_NETWORKING 1
  1827. EOF
  1828.  
  1829.   echo $ac_n "checking ip_v in struct ip""... $ac_c" 1>&6
  1830. echo "configure:1831: checking ip_v in struct ip" >&5
  1831.   cat > conftest.$ac_ext <<EOF
  1832. #line 1833 "configure"
  1833. #include "confdefs.h"
  1834. #include <sys/types.h>
  1835. #include <netinet/in.h>
  1836. #include <netinet/in_systm.h>
  1837. #include <netinet/ip.h>
  1838. int main() {
  1839. struct ip ip; ip.ip_v;
  1840. ; return 0; }
  1841. EOF
  1842. if { (eval echo configure:1843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1843.   rm -rf conftest*
  1844.   echo "$ac_t""yes" 1>&6; has_bitfields=yes
  1845. else
  1846.   echo "configure: failed program was:" >&5
  1847.   cat conftest.$ac_ext >&5
  1848.   rm -rf conftest*
  1849.   echo "$ac_t""no" 1>&6; has_bitfields=no
  1850. fi
  1851. rm -f conftest*
  1852.  
  1853.   if test $has_bitfields = no; then
  1854.     SAVE_CFLAGS="$CFLAGS"
  1855.     CFLAGS="-D__STDC__=2"
  1856.  
  1857.     echo $ac_n "checking if setting __STDC__=2 gives ip_v""... $ac_c" 1>&6
  1858. echo "configure:1859: checking if setting __STDC__=2 gives ip_v" >&5
  1859.     cat > conftest.$ac_ext <<EOF
  1860. #line 1861 "configure"
  1861. #include "confdefs.h"
  1862. #include <sys/types.h>
  1863. #include <netinet/in.h>
  1864. #include <netinet/in_systm.h>
  1865. #include <netinet/ip.h>
  1866. int main() {
  1867. struct ip ip; ip.ip_v;
  1868. ; return 0; }
  1869. EOF
  1870. if { (eval echo configure:1871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1871.   rm -rf conftest*
  1872.   echo "$ac_t""yes" 1>&6; setting_stdc_helps=yes
  1873. else
  1874.   echo "configure: failed program was:" >&5
  1875.   cat conftest.$ac_ext >&5
  1876.   rm -rf conftest*
  1877.   echo "$ac_t""no" 1>&6; setting_stdc_helps=no
  1878. fi
  1879. rm -f conftest*
  1880.  
  1881.     CFLAGS="$SAVE_CFLAGS"
  1882.     if test $setting_stdc_helps = yes; then
  1883.       CFLAGS="$CFLAGS -D__STDC__=2"
  1884.     else
  1885.       echo "$ac_t""Can't figure out how to get bitfields - configure failed" 1>&6
  1886.       exit 1
  1887.     fi
  1888.   fi
  1889. fi
  1890.  
  1891.  
  1892.  
  1893. echo $ac_n "checking if sockaddr{} has sa_len member""... $ac_c" 1>&6
  1894. echo "configure:1895: checking if sockaddr{} has sa_len member" >&5
  1895. if eval "test \"`echo '$''{'ac_cv_sockaddr_has_sa_len'+set}'`\" = set"; then
  1896.   echo $ac_n "(cached) $ac_c" 1>&6
  1897. else
  1898.   cat > conftest.$ac_ext <<EOF
  1899. #line 1900 "configure"
  1900. #include "confdefs.h"
  1901.  
  1902. #               include <sys/types.h>
  1903. #               include <sys/socket.h>
  1904. int main() {
  1905. unsigned int i = sizeof(((struct sockaddr *)0)->sa_len)
  1906. ; return 0; }
  1907. EOF
  1908. if { (eval echo configure:1909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1909.   rm -rf conftest*
  1910.   ac_cv_sockaddr_has_sa_len=yes
  1911. else
  1912.   echo "configure: failed program was:" >&5
  1913.   cat conftest.$ac_ext >&5
  1914.   rm -rf conftest*
  1915.   ac_cv_sockaddr_has_sa_len=no
  1916. fi
  1917. rm -f conftest*
  1918. fi
  1919.  
  1920. echo "$ac_t""$ac_cv_sockaddr_has_sa_len" 1>&6
  1921. if test $ac_cv_sockaddr_has_sa_len = yes ; then
  1922.         cat >> confdefs.h <<\EOF
  1923. #define HAVE_SOCKADDR_SA_LEN 1
  1924. EOF
  1925.  
  1926. fi
  1927.  
  1928. echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
  1929. echo "configure:1930: checking whether byte ordering is bigendian" >&5
  1930. if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
  1931.   echo $ac_n "(cached) $ac_c" 1>&6
  1932. else
  1933.   ac_cv_c_bigendian=unknown
  1934. # See if sys/param.h defines the BYTE_ORDER macro.
  1935. cat > conftest.$ac_ext <<EOF
  1936. #line 1937 "configure"
  1937. #include "confdefs.h"
  1938. #include <sys/types.h>
  1939. #include <sys/param.h>
  1940. int main() {
  1941.  
  1942. #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
  1943.  bogus endian macros
  1944. #endif
  1945. ; return 0; }
  1946. EOF
  1947. if { (eval echo configure:1948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1948.   rm -rf conftest*
  1949.   # It does; now see whether it defined to BIG_ENDIAN or not.
  1950. cat > conftest.$ac_ext <<EOF
  1951. #line 1952 "configure"
  1952. #include "confdefs.h"
  1953. #include <sys/types.h>
  1954. #include <sys/param.h>
  1955. int main() {
  1956.  
  1957. #if BYTE_ORDER != BIG_ENDIAN
  1958.  not big endian
  1959. #endif
  1960. ; return 0; }
  1961. EOF
  1962. if { (eval echo configure:1963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1963.   rm -rf conftest*
  1964.   ac_cv_c_bigendian=yes
  1965. else
  1966.   echo "configure: failed program was:" >&5
  1967.   cat conftest.$ac_ext >&5
  1968.   rm -rf conftest*
  1969.   ac_cv_c_bigendian=no
  1970. fi
  1971. rm -f conftest*
  1972. else
  1973.   echo "configure: failed program was:" >&5
  1974.   cat conftest.$ac_ext >&5
  1975. fi
  1976. rm -f conftest*
  1977. if test $ac_cv_c_bigendian = unknown; then
  1978. if test "$cross_compiling" = yes; then
  1979.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1980. else
  1981.   cat > conftest.$ac_ext <<EOF
  1982. #line 1983 "configure"
  1983. #include "confdefs.h"
  1984. main () {
  1985.   /* Are we little or big endian?  From Harbison&Steele.  */
  1986.   union
  1987.   {
  1988.     long l;
  1989.     char c[sizeof (long)];
  1990.   } u;
  1991.   u.l = 1;
  1992.   exit (u.c[sizeof (long) - 1] == 1);
  1993. }
  1994. EOF
  1995. if { (eval echo configure:1996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1996. then
  1997.   ac_cv_c_bigendian=no
  1998. else
  1999.   echo "configure: failed program was:" >&5
  2000.   cat conftest.$ac_ext >&5
  2001.   rm -fr conftest*
  2002.   ac_cv_c_bigendian=yes
  2003. fi
  2004. rm -fr conftest*
  2005. fi
  2006.  
  2007. fi
  2008. fi
  2009.  
  2010. echo "$ac_t""$ac_cv_c_bigendian" 1>&6
  2011. if test $ac_cv_c_bigendian = yes; then
  2012.   cat >> confdefs.h <<\EOF
  2013. #define WORDS_BIGENDIAN 1
  2014. EOF
  2015.  
  2016. fi
  2017.  
  2018.  
  2019. echo $ac_n "checking if struct in_addr is a wacky huge structure (some Sun boxes)""... $ac_c" 1>&6
  2020. echo "configure:2021: checking if struct in_addr is a wacky huge structure (some Sun boxes)" >&5
  2021.  
  2022. cat > conftest.$ac_ext <<EOF
  2023. #line 2024 "configure"
  2024. #include "confdefs.h"
  2025. #include <netinet/in.h>
  2026. int main() {
  2027. struct in_addr i; i._S_un._S_addr;
  2028. ; return 0; }
  2029. EOF
  2030. if { (eval echo configure:2031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2031.   rm -rf conftest*
  2032.   \
  2033.               cat >> confdefs.h <<\EOF
  2034. #define IN_ADDR_DEEPSTRUCT 1
  2035. EOF
  2036.  \
  2037.               echo "$ac_t""yes" 1>&6 
  2038. else
  2039.   echo "configure: failed program was:" >&5
  2040.   cat conftest.$ac_ext >&5
  2041.   rm -rf conftest*
  2042.   \
  2043.               cat > conftest.$ac_ext <<EOF
  2044. #line 2045 "configure"
  2045. #include "confdefs.h"
  2046. #include <sys/types.h>
  2047. #include <netinet/in.h>
  2048. int main() {
  2049. struct in_addr i; i.S_un.S_addr;
  2050. ; return 0; }
  2051. EOF
  2052. if { (eval echo configure:2053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2053.   rm -rf conftest*
  2054.   \
  2055.                              cat >> confdefs.h <<\EOF
  2056. #define IN_ADDR_DEEPSTRUCT 1
  2057. EOF
  2058.  \
  2059.                              echo "$ac_t""yes" 1>&6 
  2060. else
  2061.   echo "configure: failed program was:" >&5
  2062.   cat conftest.$ac_ext >&5
  2063.   rm -rf conftest*
  2064.   \
  2065.                              echo "$ac_t""no" 1>&6;
  2066. fi
  2067. rm -f conftest*
  2068. fi
  2069. rm -f conftest*
  2070.  
  2071. echo $ac_n "checking if struct icmp exists""... $ac_c" 1>&6
  2072. echo "configure:2073: checking if struct icmp exists" >&5
  2073. if eval "test \"`echo '$''{'ac_cv_struct_icmp_exists'+set}'`\" = set"; then
  2074.   echo $ac_n "(cached) $ac_c" 1>&6
  2075. else
  2076.   cat > conftest.$ac_ext <<EOF
  2077. #line 2078 "configure"
  2078. #include "confdefs.h"
  2079.  
  2080. #               include <sys/types.h>
  2081. #               include <sys/param.h>
  2082. #               include <netinet/in_systm.h>
  2083. #               include <netinet/in.h>               
  2084. #               define __USE_BSD
  2085. #               define __FAVOR_BSD
  2086. #               define __BSD_SOURCE
  2087. #               include <netinet/ip.h>
  2088. #               include <netinet/ip_icmp.h>
  2089. int main() {
  2090. unsigned int i = sizeof(struct icmp)
  2091. ; return 0; }
  2092. EOF
  2093. if { (eval echo configure:2094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2094.   rm -rf conftest*
  2095.   ac_cv_struct_icmp_exists=yes
  2096. else
  2097.   echo "configure: failed program was:" >&5
  2098.   cat conftest.$ac_ext >&5
  2099.   rm -rf conftest*
  2100.   ac_cv_struct_icmp_exists=no
  2101. fi
  2102. rm -f conftest*
  2103. fi
  2104.  
  2105. echo "$ac_t""$ac_cv_struct_icmp_exists" 1>&6
  2106. if test $ac_cv_struct_icmp_exists = yes ; then
  2107.         cat >> confdefs.h <<\EOF
  2108. #define HAVE_STRUCT_ICMP 1
  2109. EOF
  2110.  
  2111. fi
  2112.  
  2113. echo $ac_n "checking if struct ip exists""... $ac_c" 1>&6
  2114. echo "configure:2115: checking if struct ip exists" >&5
  2115. if eval "test \"`echo '$''{'ac_cv_struct_ip_exists'+set}'`\" = set"; then
  2116.   echo $ac_n "(cached) $ac_c" 1>&6
  2117. else
  2118.   cat > conftest.$ac_ext <<EOF
  2119. #line 2120 "configure"
  2120. #include "confdefs.h"
  2121.  
  2122. #               include <sys/types.h>
  2123. #               include <sys/param.h>
  2124. #               include <netinet/in_systm.h>
  2125. #               include <netinet/in.h>               
  2126. #               define __USE_BSD
  2127. #               define __FAVOR_BSD
  2128. #               define __BSD_SOURCE
  2129. #               include <netinet/ip.h>
  2130. int main() {
  2131. unsigned int i = sizeof(struct ip)
  2132. ; return 0; }
  2133. EOF
  2134. if { (eval echo configure:2135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2135.   rm -rf conftest*
  2136.   ac_cv_struct_ip_exists=yes
  2137. else
  2138.   echo "configure: failed program was:" >&5
  2139.   cat conftest.$ac_ext >&5
  2140.   rm -rf conftest*
  2141.   ac_cv_struct_ip_exists=no
  2142. fi
  2143. rm -f conftest*
  2144. fi
  2145.  
  2146. echo "$ac_t""$ac_cv_struct_ip_exists" 1>&6
  2147. if test $ac_cv_struct_ip_exists = yes ; then
  2148.         cat >> confdefs.h <<\EOF
  2149. #define HAVE_STRUCT_IP 1
  2150. EOF
  2151.  
  2152. fi
  2153.  
  2154. echo $ac_n "checking if struct ip has ip_sum member""... $ac_c" 1>&6
  2155. echo "configure:2156: checking if struct ip has ip_sum member" >&5
  2156. if eval "test \"`echo '$''{'ac_cv_ip_has_ip_sum'+set}'`\" = set"; then
  2157.   echo $ac_n "(cached) $ac_c" 1>&6
  2158. else
  2159.   cat > conftest.$ac_ext <<EOF
  2160. #line 2161 "configure"
  2161. #include "confdefs.h"
  2162.  
  2163. #               include <sys/types.h>
  2164. #               include <sys/param.h>
  2165. #               include <netinet/in_systm.h>
  2166. #               include <netinet/in.h>
  2167. #               define __USE_BSD
  2168. #               define __FAVOR_BSD
  2169. #               define __BSD_SOURCE
  2170. #               include <netinet/ip.h>
  2171. #               include <netinet/ip_icmp.h>
  2172. int main() {
  2173. unsigned int i = sizeof(((struct ip *)0)->ip_sum)
  2174. ; return 0; }
  2175. EOF
  2176. if { (eval echo configure:2177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2177.   rm -rf conftest*
  2178.   ac_cv_ip_has_ip_sum=yes
  2179. else
  2180.   echo "configure: failed program was:" >&5
  2181.   cat conftest.$ac_ext >&5
  2182.   rm -rf conftest*
  2183.   ac_cv_ip_has_ip_sum=no
  2184. fi
  2185. rm -f conftest*
  2186. fi
  2187.  
  2188. echo "$ac_t""$ac_cv_ip_has_ip_sum" 1>&6
  2189. if test $ac_cv_ip_has_ip_sum = yes ; then
  2190.         cat >> confdefs.h <<\EOF
  2191. #define HAVE_IP_IP_SUM 1
  2192. EOF
  2193.  
  2194. fi
  2195.  
  2196. for ac_func in bzero snprintf vsnprintf memcpy usleep nanosleep strerror strcasestr 
  2197. do
  2198. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2199. echo "configure:2200: checking for $ac_func" >&5
  2200. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2201.   echo $ac_n "(cached) $ac_c" 1>&6
  2202. else
  2203.   cat > conftest.$ac_ext <<EOF
  2204. #line 2205 "configure"
  2205. #include "confdefs.h"
  2206. /* System header to define __stub macros and hopefully few prototypes,
  2207.     which can conflict with char $ac_func(); below.  */
  2208. #include <assert.h>
  2209. /* Override any gcc2 internal prototype to avoid an error.  */
  2210. /* We use char because int might match the return type of a gcc2
  2211.     builtin and then its argument prototype would still apply.  */
  2212. char $ac_func();
  2213.  
  2214. int main() {
  2215.  
  2216. /* The GNU C library defines this for functions which it implements
  2217.     to always fail with ENOSYS.  Some functions are actually named
  2218.     something starting with __ and the normal name is an alias.  */
  2219. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2220. choke me
  2221. #else
  2222. $ac_func();
  2223. #endif
  2224.  
  2225. ; return 0; }
  2226. EOF
  2227. if { (eval echo configure:2228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2228.   rm -rf conftest*
  2229.   eval "ac_cv_func_$ac_func=yes"
  2230. else
  2231.   echo "configure: failed program was:" >&5
  2232.   cat conftest.$ac_ext >&5
  2233.   rm -rf conftest*
  2234.   eval "ac_cv_func_$ac_func=no"
  2235. fi
  2236. rm -f conftest*
  2237. fi
  2238.  
  2239. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2240.   echo "$ac_t""yes" 1>&6
  2241.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2242.   cat >> confdefs.h <<EOF
  2243. #define $ac_tr_func 1
  2244. EOF
  2245.  
  2246. else
  2247.   echo "$ac_t""no" 1>&6
  2248. fi
  2249. done
  2250.  
  2251.  
  2252. echo $ac_n "checking for snprintf""... $ac_c" 1>&6
  2253. echo "configure:2254: checking for snprintf" >&5
  2254. if eval "test \"`echo '$''{'ac_cv_func_snprintf'+set}'`\" = set"; then
  2255.   echo $ac_n "(cached) $ac_c" 1>&6
  2256. else
  2257.   cat > conftest.$ac_ext <<EOF
  2258. #line 2259 "configure"
  2259. #include "confdefs.h"
  2260. /* System header to define __stub macros and hopefully few prototypes,
  2261.     which can conflict with char snprintf(); below.  */
  2262. #include <assert.h>
  2263. /* Override any gcc2 internal prototype to avoid an error.  */
  2264. /* We use char because int might match the return type of a gcc2
  2265.     builtin and then its argument prototype would still apply.  */
  2266. char snprintf();
  2267.  
  2268. int main() {
  2269.  
  2270. /* The GNU C library defines this for functions which it implements
  2271.     to always fail with ENOSYS.  Some functions are actually named
  2272.     something starting with __ and the normal name is an alias.  */
  2273. #if defined (__stub_snprintf) || defined (__stub___snprintf)
  2274. choke me
  2275. #else
  2276. snprintf();
  2277. #endif
  2278.  
  2279. ; return 0; }
  2280. EOF
  2281. if { (eval echo configure:2282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2282.   rm -rf conftest*
  2283.   eval "ac_cv_func_snprintf=yes"
  2284. else
  2285.   echo "configure: failed program was:" >&5
  2286.   cat conftest.$ac_ext >&5
  2287.   rm -rf conftest*
  2288.   eval "ac_cv_func_snprintf=no"
  2289. fi
  2290. rm -f conftest*
  2291. fi
  2292.  
  2293. if eval "test \"`echo '$ac_cv_func_'snprintf`\" = yes"; then
  2294.   echo "$ac_t""yes" 1>&6
  2295.   :
  2296. else
  2297.   echo "$ac_t""no" 1>&6
  2298.  COMPAT_SRCS="$COMPAT_SRCS snprintf.c"
  2299.     COMPAT_OBJS="$COMPAT_OBJS snprintf.o" 
  2300. fi
  2301.  
  2302.  
  2303. echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
  2304. echo "configure:2305: checking for inet_aton" >&5
  2305. if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
  2306.   echo $ac_n "(cached) $ac_c" 1>&6
  2307. else
  2308.   cat > conftest.$ac_ext <<EOF
  2309. #line 2310 "configure"
  2310. #include "confdefs.h"
  2311. /* System header to define __stub macros and hopefully few prototypes,
  2312.     which can conflict with char inet_aton(); below.  */
  2313. #include <assert.h>
  2314. /* Override any gcc2 internal prototype to avoid an error.  */
  2315. /* We use char because int might match the return type of a gcc2
  2316.     builtin and then its argument prototype would still apply.  */
  2317. char inet_aton();
  2318.  
  2319. int main() {
  2320.  
  2321. /* The GNU C library defines this for functions which it implements
  2322.     to always fail with ENOSYS.  Some functions are actually named
  2323.     something starting with __ and the normal name is an alias.  */
  2324. #if defined (__stub_inet_aton) || defined (__stub___inet_aton)
  2325. choke me
  2326. #else
  2327. inet_aton();
  2328. #endif
  2329.  
  2330. ; return 0; }
  2331. EOF
  2332. if { (eval echo configure:2333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2333.   rm -rf conftest*
  2334.   eval "ac_cv_func_inet_aton=yes"
  2335. else
  2336.   echo "configure: failed program was:" >&5
  2337.   cat conftest.$ac_ext >&5
  2338.   rm -rf conftest*
  2339.   eval "ac_cv_func_inet_aton=no"
  2340. fi
  2341. rm -f conftest*
  2342. fi
  2343.  
  2344. if eval "test \"`echo '$ac_cv_func_'inet_aton`\" = yes"; then
  2345.   echo "$ac_t""yes" 1>&6
  2346.   :
  2347. else
  2348.   echo "$ac_t""no" 1>&6
  2349.  COMPAT_SRCS="$COMPAT_SRCS inet_aton.c"
  2350.     COMPAT_OBJS="$COMPAT_OBJS inet_aton.o" 
  2351. fi
  2352.  
  2353.  
  2354. echo $ac_n "checking for getopt_long_only""... $ac_c" 1>&6
  2355. echo "configure:2356: checking for getopt_long_only" >&5
  2356. if eval "test \"`echo '$''{'ac_cv_func_getopt_long_only'+set}'`\" = set"; then
  2357.   echo $ac_n "(cached) $ac_c" 1>&6
  2358. else
  2359.   cat > conftest.$ac_ext <<EOF
  2360. #line 2361 "configure"
  2361. #include "confdefs.h"
  2362. /* System header to define __stub macros and hopefully few prototypes,
  2363.     which can conflict with char getopt_long_only(); below.  */
  2364. #include <assert.h>
  2365. /* Override any gcc2 internal prototype to avoid an error.  */
  2366. /* We use char because int might match the return type of a gcc2
  2367.     builtin and then its argument prototype would still apply.  */
  2368. char getopt_long_only();
  2369.  
  2370. int main() {
  2371.  
  2372. /* The GNU C library defines this for functions which it implements
  2373.     to always fail with ENOSYS.  Some functions are actually named
  2374.     something starting with __ and the normal name is an alias.  */
  2375. #if defined (__stub_getopt_long_only) || defined (__stub___getopt_long_only)
  2376. choke me
  2377. #else
  2378. getopt_long_only();
  2379. #endif
  2380.  
  2381. ; return 0; }
  2382. EOF
  2383. if { (eval echo configure:2384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2384.   rm -rf conftest*
  2385.   eval "ac_cv_func_getopt_long_only=yes"
  2386. else
  2387.   echo "configure: failed program was:" >&5
  2388.   cat conftest.$ac_ext >&5
  2389.   rm -rf conftest*
  2390.   eval "ac_cv_func_getopt_long_only=no"
  2391. fi
  2392. rm -f conftest*
  2393. fi
  2394.  
  2395. if eval "test \"`echo '$ac_cv_func_'getopt_long_only`\" = yes"; then
  2396.   echo "$ac_t""yes" 1>&6
  2397.   :
  2398. else
  2399.   echo "$ac_t""no" 1>&6
  2400.  COMPAT_SRCS="$COMPAT_SRCS getopt.c getopt1.c"
  2401.     COMPAT_OBJS="$COMPAT_OBJS getopt.o getopt1.o" 
  2402. fi
  2403.  
  2404.  
  2405.  
  2406. subdirs="$libpcapdir nmapfe "
  2407.  
  2408.  
  2409.  
  2410. trap '' 1 2 15
  2411. cat > confcache <<\EOF
  2412. # This file is a shell script that caches the results of configure
  2413. # tests run on this system so they can be shared between configure
  2414. # scripts and configure runs.  It is not useful on other systems.
  2415. # If it contains results you don't want to keep, you may remove or edit it.
  2416. #
  2417. # By default, configure uses ./config.cache as the cache file,
  2418. # creating it if it does not exist already.  You can give configure
  2419. # the --cache-file=FILE option to use a different cache file; that is
  2420. # what configure does when it calls configure scripts in
  2421. # subdirectories, so they share the cache.
  2422. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  2423. # config.status only pays attention to the cache file if you give it the
  2424. # --recheck option to rerun configure.
  2425. #
  2426. EOF
  2427. # The following way of writing the cache mishandles newlines in values,
  2428. # but we know of no workaround that is simple, portable, and efficient.
  2429. # So, don't put newlines in cache variables' values.
  2430. # Ultrix sh set writes to stderr and can't be redirected directly,
  2431. # and sets the high bit in the cache file unless we assign to the vars.
  2432. (set) 2>&1 |
  2433.   case `(ac_space=' '; set | grep ac_space) 2>&1` in
  2434.   *ac_space=\ *)
  2435.     # `set' does not quote correctly, so add quotes (double-quote substitution
  2436.     # turns \\\\ into \\, and sed turns \\ into \).
  2437.     sed -n \
  2438.       -e "s/'/'\\\\''/g" \
  2439.       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
  2440.     ;;
  2441.   *)
  2442.     # `set' quotes correctly as required by POSIX, so do not add quotes.
  2443.     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
  2444.     ;;
  2445.   esac >> confcache
  2446. if cmp -s $cache_file confcache; then
  2447.   :
  2448. else
  2449.   if test -w $cache_file; then
  2450.     echo "updating cache $cache_file"
  2451.     cat confcache > $cache_file
  2452.   else
  2453.     echo "not updating unwritable cache $cache_file"
  2454.   fi
  2455. fi
  2456. rm -f confcache
  2457.  
  2458. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  2459.  
  2460. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  2461. # Let make expand exec_prefix.
  2462. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  2463.  
  2464. # Any assignment to VPATH causes Sun make to only execute
  2465. # the first set of double-colon rules, so remove it if not needed.
  2466. # If there is a colon in the path, we need to keep it.
  2467. if test "x$srcdir" = x.; then
  2468.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  2469. fi
  2470.  
  2471. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  2472.  
  2473. DEFS=-DHAVE_CONFIG_H
  2474.  
  2475. # Without the "./", some shells look in PATH for config.status.
  2476. : ${CONFIG_STATUS=./config.status}
  2477.  
  2478. echo creating $CONFIG_STATUS
  2479. rm -f $CONFIG_STATUS
  2480. cat > $CONFIG_STATUS <<EOF
  2481. #! /bin/sh
  2482. # Generated automatically by configure.
  2483. # Run this file to recreate the current configuration.
  2484. # This directory was configured as follows,
  2485. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  2486. #
  2487. # $0 $ac_configure_args
  2488. #
  2489. # Compiler output produced by configure, useful for debugging
  2490. # configure, is in ./config.log if it exists.
  2491.  
  2492. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  2493. for ac_option
  2494. do
  2495.   case "\$ac_option" in
  2496.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  2497.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  2498.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  2499.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  2500.     echo "$CONFIG_STATUS generated by autoconf version 2.13"
  2501.     exit 0 ;;
  2502.   -help | --help | --hel | --he | --h)
  2503.     echo "\$ac_cs_usage"; exit 0 ;;
  2504.   *) echo "\$ac_cs_usage"; exit 1 ;;
  2505.   esac
  2506. done
  2507.  
  2508. ac_given_srcdir=$srcdir
  2509.  
  2510. trap 'rm -fr `echo "Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  2511. EOF
  2512. cat >> $CONFIG_STATUS <<EOF
  2513.  
  2514. # Protect against being on the right side of a sed subst in config.status.
  2515. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  2516.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  2517. $ac_vpsub
  2518. $extrasub
  2519. s%@SHELL@%$SHELL%g
  2520. s%@CFLAGS@%$CFLAGS%g
  2521. s%@CPPFLAGS@%$CPPFLAGS%g
  2522. s%@CXXFLAGS@%$CXXFLAGS%g
  2523. s%@FFLAGS@%$FFLAGS%g
  2524. s%@DEFS@%$DEFS%g
  2525. s%@LDFLAGS@%$LDFLAGS%g
  2526. s%@LIBS@%$LIBS%g
  2527. s%@exec_prefix@%$exec_prefix%g
  2528. s%@prefix@%$prefix%g
  2529. s%@program_transform_name@%$program_transform_name%g
  2530. s%@bindir@%$bindir%g
  2531. s%@sbindir@%$sbindir%g
  2532. s%@libexecdir@%$libexecdir%g
  2533. s%@datadir@%$datadir%g
  2534. s%@sysconfdir@%$sysconfdir%g
  2535. s%@sharedstatedir@%$sharedstatedir%g
  2536. s%@localstatedir@%$localstatedir%g
  2537. s%@libdir@%$libdir%g
  2538. s%@includedir@%$includedir%g
  2539. s%@oldincludedir@%$oldincludedir%g
  2540. s%@infodir@%$infodir%g
  2541. s%@mandir@%$mandir%g
  2542. s%@libpcapdir@%$libpcapdir%g
  2543. s%@CC@%$CC%g
  2544. s%@COMPAT_OBJS@%$COMPAT_OBJS%g
  2545. s%@COMPAT_SRCS@%$COMPAT_SRCS%g
  2546. s%@host@%$host%g
  2547. s%@host_alias@%$host_alias%g
  2548. s%@host_cpu@%$host_cpu%g
  2549. s%@host_vendor@%$host_vendor%g
  2550. s%@host_os@%$host_os%g
  2551. s%@CPP@%$CPP%g
  2552. s%@PCAP_DEPENDS@%$PCAP_DEPENDS%g
  2553. s%@PCAP_CLEAN@%$PCAP_CLEAN%g
  2554. s%@PCAP_DIST_CLEAN@%$PCAP_DIST_CLEAN%g
  2555. s%@subdirs@%$subdirs%g
  2556.  
  2557. CEOF
  2558. EOF
  2559.  
  2560. cat >> $CONFIG_STATUS <<\EOF
  2561.  
  2562. # Split the substitutions into bite-sized pieces for seds with
  2563. # small command number limits, like on Digital OSF/1 and HP-UX.
  2564. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  2565. ac_file=1 # Number of current file.
  2566. ac_beg=1 # First line for current file.
  2567. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  2568. ac_more_lines=:
  2569. ac_sed_cmds=""
  2570. while $ac_more_lines; do
  2571.   if test $ac_beg -gt 1; then
  2572.     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  2573.   else
  2574.     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  2575.   fi
  2576.   if test ! -s conftest.s$ac_file; then
  2577.     ac_more_lines=false
  2578.     rm -f conftest.s$ac_file
  2579.   else
  2580.     if test -z "$ac_sed_cmds"; then
  2581.       ac_sed_cmds="sed -f conftest.s$ac_file"
  2582.     else
  2583.       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  2584.     fi
  2585.     ac_file=`expr $ac_file + 1`
  2586.     ac_beg=$ac_end
  2587.     ac_end=`expr $ac_end + $ac_max_sed_cmds`
  2588.   fi
  2589. done
  2590. if test -z "$ac_sed_cmds"; then
  2591.   ac_sed_cmds=cat
  2592. fi
  2593. EOF
  2594.  
  2595. cat >> $CONFIG_STATUS <<EOF
  2596.  
  2597. CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
  2598. EOF
  2599. cat >> $CONFIG_STATUS <<\EOF
  2600. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  2601.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  2602.   case "$ac_file" in
  2603.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  2604.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  2605.   *) ac_file_in="${ac_file}.in" ;;
  2606.   esac
  2607.  
  2608.   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  2609.  
  2610.   # Remove last slash and all that follows it.  Not all systems have dirname.
  2611.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2612.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  2613.     # The file is in a subdirectory.
  2614.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  2615.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  2616.     # A "../" for each directory in $ac_dir_suffix.
  2617.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  2618.   else
  2619.     ac_dir_suffix= ac_dots=
  2620.   fi
  2621.  
  2622.   case "$ac_given_srcdir" in
  2623.   .)  srcdir=.
  2624.       if test -z "$ac_dots"; then top_srcdir=.
  2625.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  2626.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  2627.   *) # Relative path.
  2628.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  2629.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  2630.   esac
  2631.  
  2632.  
  2633.   echo creating "$ac_file"
  2634.   rm -f "$ac_file"
  2635.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  2636.   case "$ac_file" in
  2637.   *Makefile*) ac_comsub="1i\\
  2638. # $configure_input" ;;
  2639.   *) ac_comsub= ;;
  2640.   esac
  2641.  
  2642.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  2643.   sed -e "$ac_comsub
  2644. s%@configure_input@%$configure_input%g
  2645. s%@srcdir@%$srcdir%g
  2646. s%@top_srcdir@%$top_srcdir%g
  2647. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  2648. fi; done
  2649. rm -f conftest.s*
  2650.  
  2651. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  2652. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  2653. #
  2654. # ac_d sets the value in "#define NAME VALUE" lines.
  2655. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  2656. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  2657. ac_dC='\3'
  2658. ac_dD='%g'
  2659. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  2660. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2661. ac_uB='\([     ]\)%\1#\2define\3'
  2662. ac_uC=' '
  2663. ac_uD='\4%g'
  2664. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  2665. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2666. ac_eB='$%\1#\2define\3'
  2667. ac_eC=' '
  2668. ac_eD='%g'
  2669.  
  2670. if test "${CONFIG_HEADERS+set}" != set; then
  2671. EOF
  2672. cat >> $CONFIG_STATUS <<EOF
  2673.   CONFIG_HEADERS="config.h"
  2674. EOF
  2675. cat >> $CONFIG_STATUS <<\EOF
  2676. fi
  2677. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  2678.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  2679.   case "$ac_file" in
  2680.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  2681.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  2682.   *) ac_file_in="${ac_file}.in" ;;
  2683.   esac
  2684.  
  2685.   echo creating $ac_file
  2686.  
  2687.   rm -f conftest.frag conftest.in conftest.out
  2688.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  2689.   cat $ac_file_inputs > conftest.in
  2690.  
  2691. EOF
  2692.  
  2693. # Transform confdefs.h into a sed script conftest.vals that substitutes
  2694. # the proper values into config.h.in to produce config.h.  And first:
  2695. # Protect against being on the right side of a sed subst in config.status.
  2696. # Protect against being in an unquoted here document in config.status.
  2697. rm -f conftest.vals
  2698. cat > conftest.hdr <<\EOF
  2699. s/[\\&%]/\\&/g
  2700. s%[\\$`]%\\&%g
  2701. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  2702. s%ac_d%ac_u%gp
  2703. s%ac_u%ac_e%gp
  2704. EOF
  2705. sed -n -f conftest.hdr confdefs.h > conftest.vals
  2706. rm -f conftest.hdr
  2707.  
  2708. # This sed command replaces #undef with comments.  This is necessary, for
  2709. # example, in the case of _POSIX_SOURCE, which is predefined and required
  2710. # on some systems where configure will not decide to define it.
  2711. cat >> conftest.vals <<\EOF
  2712. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  2713. EOF
  2714.  
  2715. # Break up conftest.vals because some shells have a limit on
  2716. # the size of here documents, and old seds have small limits too.
  2717.  
  2718. rm -f conftest.tail
  2719. while :
  2720. do
  2721.   ac_lines=`grep -c . conftest.vals`
  2722.   # grep -c gives empty output for an empty file on some AIX systems.
  2723.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  2724.   # Write a limited-size here document to conftest.frag.
  2725.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  2726.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  2727.   echo 'CEOF
  2728.   sed -f conftest.frag conftest.in > conftest.out
  2729.   rm -f conftest.in
  2730.   mv conftest.out conftest.in
  2731. ' >> $CONFIG_STATUS
  2732.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  2733.   rm -f conftest.vals
  2734.   mv conftest.tail conftest.vals
  2735. done
  2736. rm -f conftest.vals
  2737.  
  2738. cat >> $CONFIG_STATUS <<\EOF
  2739.   rm -f conftest.frag conftest.h
  2740.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  2741.   cat conftest.in >> conftest.h
  2742.   rm -f conftest.in
  2743.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  2744.     echo "$ac_file is unchanged"
  2745.     rm -f conftest.h
  2746.   else
  2747.     # Remove last slash and all that follows it.  Not all systems have dirname.
  2748.       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2749.       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  2750.       # The file is in a subdirectory.
  2751.       test ! -d "$ac_dir" && mkdir "$ac_dir"
  2752.     fi
  2753.     rm -f $ac_file
  2754.     mv conftest.h $ac_file
  2755.   fi
  2756. fi; done
  2757.  
  2758. EOF
  2759. cat >> $CONFIG_STATUS <<EOF
  2760.  
  2761. EOF
  2762. cat >> $CONFIG_STATUS <<\EOF
  2763.  
  2764. exit 0
  2765. EOF
  2766. chmod +x $CONFIG_STATUS
  2767. rm -fr confdefs* $ac_clean_files
  2768. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  2769.  
  2770. if test "$no_recursion" != yes; then
  2771.  
  2772.   # Remove --cache-file and --srcdir arguments so they do not pile up.
  2773.   ac_sub_configure_args=
  2774.   ac_prev=
  2775.   for ac_arg in $ac_configure_args; do
  2776.     if test -n "$ac_prev"; then
  2777.       ac_prev=
  2778.       continue
  2779.     fi
  2780.     case "$ac_arg" in
  2781.     -cache-file | --cache-file | --cache-fil | --cache-fi \
  2782.     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  2783.       ac_prev=cache_file ;;
  2784.     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  2785.     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  2786.       ;;
  2787.     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  2788.       ac_prev=srcdir ;;
  2789.     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  2790.       ;;
  2791.     *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
  2792.     esac
  2793.   done
  2794.  
  2795.   for ac_config_dir in $libpcapdir nmapfe ; do
  2796.  
  2797.     # Do not complain, so a configure script can configure whichever
  2798.     # parts of a large source tree are present.
  2799.     if test ! -d $srcdir/$ac_config_dir; then
  2800.       continue
  2801.     fi
  2802.  
  2803.     echo configuring in $ac_config_dir
  2804.  
  2805.     case "$srcdir" in
  2806.     .) ;;
  2807.     *)
  2808.       if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
  2809.       else
  2810.         { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
  2811.       fi
  2812.       ;;
  2813.     esac
  2814.  
  2815.     ac_popdir=`pwd`
  2816.     cd $ac_config_dir
  2817.  
  2818.       # A "../" for each directory in /$ac_config_dir.
  2819.       ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
  2820.  
  2821.     case "$srcdir" in
  2822.     .) # No --srcdir option.  We are building in place.
  2823.       ac_sub_srcdir=$srcdir ;;
  2824.     /*) # Absolute path.
  2825.       ac_sub_srcdir=$srcdir/$ac_config_dir ;;
  2826.     *) # Relative path.
  2827.       ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
  2828.     esac
  2829.  
  2830.     # Check for guested configure; otherwise get Cygnus style configure.
  2831.     if test -f $ac_sub_srcdir/configure; then
  2832.       ac_sub_configure=$ac_sub_srcdir/configure
  2833.     elif test -f $ac_sub_srcdir/configure.in; then
  2834.       ac_sub_configure=$ac_configure
  2835.     else
  2836.       echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
  2837.       ac_sub_configure=
  2838.     fi
  2839.  
  2840.     # The recursion is here.
  2841.     if test -n "$ac_sub_configure"; then
  2842.  
  2843.       # Make the cache file name correct relative to the subdirectory.
  2844.       case "$cache_file" in
  2845.       /*) ac_sub_cache_file=$cache_file ;;
  2846.       *) # Relative path.
  2847.         ac_sub_cache_file="$ac_dots$cache_file" ;;
  2848.       esac
  2849.  
  2850.       echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
  2851.       # The eval makes quoting arguments work.
  2852.       if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
  2853.       then :
  2854.       else
  2855.         { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
  2856.       fi
  2857.     fi
  2858.  
  2859.     cd $ac_popdir
  2860.   done
  2861. fi
  2862.  
  2863.