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