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