A lengthy patch to add the wiretap library. Wiretap is not used by default
[obnox/wireshark/wip.git] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.12 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --with-gtk-prefix=PFX   Prefix where GTK is installed (optional)"
16 ac_help="$ac_help
17   --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)"
18 ac_help="$ac_help
19   --disable-gtktest       Do not try to compile and run a test GTK program"
20 ac_help="$ac_help
21   --with-wiretap          Include wiretap library.
22   --without-wiretap       Don't include wiretap library (default)"
23
24 # Initialize some variables set by options.
25 # The variables have the same names as the options, with
26 # dashes changed to underlines.
27 build=NONE
28 cache_file=./config.cache
29 exec_prefix=NONE
30 host=NONE
31 no_create=
32 nonopt=NONE
33 no_recursion=
34 prefix=NONE
35 program_prefix=NONE
36 program_suffix=NONE
37 program_transform_name=s,x,x,
38 silent=
39 site=
40 srcdir=
41 target=NONE
42 verbose=
43 x_includes=NONE
44 x_libraries=NONE
45 bindir='${exec_prefix}/bin'
46 sbindir='${exec_prefix}/sbin'
47 libexecdir='${exec_prefix}/libexec'
48 datadir='${prefix}/share'
49 sysconfdir='${prefix}/etc'
50 sharedstatedir='${prefix}/com'
51 localstatedir='${prefix}/var'
52 libdir='${exec_prefix}/lib'
53 includedir='${prefix}/include'
54 oldincludedir='/usr/include'
55 infodir='${prefix}/info'
56 mandir='${prefix}/man'
57
58 # Initialize some other variables.
59 subdirs=
60 MFLAGS= MAKEFLAGS=
61 # Maximum number of lines to put in a shell here document.
62 ac_max_here_lines=12
63
64 ac_prev=
65 for ac_option
66 do
67
68   # If the previous option needs an argument, assign it.
69   if test -n "$ac_prev"; then
70     eval "$ac_prev=\$ac_option"
71     ac_prev=
72     continue
73   fi
74
75   case "$ac_option" in
76   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
77   *) ac_optarg= ;;
78   esac
79
80   # Accept the important Cygnus configure options, so we can diagnose typos.
81
82   case "$ac_option" in
83
84   -bindir | --bindir | --bindi | --bind | --bin | --bi)
85     ac_prev=bindir ;;
86   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
87     bindir="$ac_optarg" ;;
88
89   -build | --build | --buil | --bui | --bu)
90     ac_prev=build ;;
91   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
92     build="$ac_optarg" ;;
93
94   -cache-file | --cache-file | --cache-fil | --cache-fi \
95   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
96     ac_prev=cache_file ;;
97   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
98   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
99     cache_file="$ac_optarg" ;;
100
101   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
102     ac_prev=datadir ;;
103   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
104   | --da=*)
105     datadir="$ac_optarg" ;;
106
107   -disable-* | --disable-*)
108     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
109     # Reject names that are not valid shell variable names.
110     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
111       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
112     fi
113     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
114     eval "enable_${ac_feature}=no" ;;
115
116   -enable-* | --enable-*)
117     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
118     # Reject names that are not valid shell variable names.
119     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
120       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
121     fi
122     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
123     case "$ac_option" in
124       *=*) ;;
125       *) ac_optarg=yes ;;
126     esac
127     eval "enable_${ac_feature}='$ac_optarg'" ;;
128
129   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
130   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
131   | --exec | --exe | --ex)
132     ac_prev=exec_prefix ;;
133   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
134   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
135   | --exec=* | --exe=* | --ex=*)
136     exec_prefix="$ac_optarg" ;;
137
138   -gas | --gas | --ga | --g)
139     # Obsolete; use --with-gas.
140     with_gas=yes ;;
141
142   -help | --help | --hel | --he)
143     # Omit some internal or obsolete options to make the list less imposing.
144     # This message is too long to be a string in the A/UX 3.1 sh.
145     cat << EOF
146 Usage: configure [options] [host]
147 Options: [defaults in brackets after descriptions]
148 Configuration:
149   --cache-file=FILE       cache test results in FILE
150   --help                  print this message
151   --no-create             do not create output files
152   --quiet, --silent       do not print \`checking...' messages
153   --version               print the version of autoconf that created configure
154 Directory and file names:
155   --prefix=PREFIX         install architecture-independent files in PREFIX
156                           [$ac_default_prefix]
157   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
158                           [same as prefix]
159   --bindir=DIR            user executables in DIR [EPREFIX/bin]
160   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
161   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
162   --datadir=DIR           read-only architecture-independent data in DIR
163                           [PREFIX/share]
164   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
165   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
166                           [PREFIX/com]
167   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
168   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
169   --includedir=DIR        C header files in DIR [PREFIX/include]
170   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
171   --infodir=DIR           info documentation in DIR [PREFIX/info]
172   --mandir=DIR            man documentation in DIR [PREFIX/man]
173   --srcdir=DIR            find the sources in DIR [configure dir or ..]
174   --program-prefix=PREFIX prepend PREFIX to installed program names
175   --program-suffix=SUFFIX append SUFFIX to installed program names
176   --program-transform-name=PROGRAM
177                           run sed PROGRAM on installed program names
178 EOF
179     cat << EOF
180 Host type:
181   --build=BUILD           configure for building on BUILD [BUILD=HOST]
182   --host=HOST             configure for HOST [guessed]
183   --target=TARGET         configure for TARGET [TARGET=HOST]
184 Features and packages:
185   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
186   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
187   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
188   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
189   --x-includes=DIR        X include files are in DIR
190   --x-libraries=DIR       X library files are in DIR
191 EOF
192     if test -n "$ac_help"; then
193       echo "--enable and --with options recognized:$ac_help"
194     fi
195     exit 0 ;;
196
197   -host | --host | --hos | --ho)
198     ac_prev=host ;;
199   -host=* | --host=* | --hos=* | --ho=*)
200     host="$ac_optarg" ;;
201
202   -includedir | --includedir | --includedi | --included | --include \
203   | --includ | --inclu | --incl | --inc)
204     ac_prev=includedir ;;
205   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
206   | --includ=* | --inclu=* | --incl=* | --inc=*)
207     includedir="$ac_optarg" ;;
208
209   -infodir | --infodir | --infodi | --infod | --info | --inf)
210     ac_prev=infodir ;;
211   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
212     infodir="$ac_optarg" ;;
213
214   -libdir | --libdir | --libdi | --libd)
215     ac_prev=libdir ;;
216   -libdir=* | --libdir=* | --libdi=* | --libd=*)
217     libdir="$ac_optarg" ;;
218
219   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
220   | --libexe | --libex | --libe)
221     ac_prev=libexecdir ;;
222   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
223   | --libexe=* | --libex=* | --libe=*)
224     libexecdir="$ac_optarg" ;;
225
226   -localstatedir | --localstatedir | --localstatedi | --localstated \
227   | --localstate | --localstat | --localsta | --localst \
228   | --locals | --local | --loca | --loc | --lo)
229     ac_prev=localstatedir ;;
230   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
231   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
232   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
233     localstatedir="$ac_optarg" ;;
234
235   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
236     ac_prev=mandir ;;
237   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
238     mandir="$ac_optarg" ;;
239
240   -nfp | --nfp | --nf)
241     # Obsolete; use --without-fp.
242     with_fp=no ;;
243
244   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
245   | --no-cr | --no-c)
246     no_create=yes ;;
247
248   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
249   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
250     no_recursion=yes ;;
251
252   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
253   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
254   | --oldin | --oldi | --old | --ol | --o)
255     ac_prev=oldincludedir ;;
256   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
257   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
258   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
259     oldincludedir="$ac_optarg" ;;
260
261   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
262     ac_prev=prefix ;;
263   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
264     prefix="$ac_optarg" ;;
265
266   -program-prefix | --program-prefix | --program-prefi | --program-pref \
267   | --program-pre | --program-pr | --program-p)
268     ac_prev=program_prefix ;;
269   -program-prefix=* | --program-prefix=* | --program-prefi=* \
270   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
271     program_prefix="$ac_optarg" ;;
272
273   -program-suffix | --program-suffix | --program-suffi | --program-suff \
274   | --program-suf | --program-su | --program-s)
275     ac_prev=program_suffix ;;
276   -program-suffix=* | --program-suffix=* | --program-suffi=* \
277   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
278     program_suffix="$ac_optarg" ;;
279
280   -program-transform-name | --program-transform-name \
281   | --program-transform-nam | --program-transform-na \
282   | --program-transform-n | --program-transform- \
283   | --program-transform | --program-transfor \
284   | --program-transfo | --program-transf \
285   | --program-trans | --program-tran \
286   | --progr-tra | --program-tr | --program-t)
287     ac_prev=program_transform_name ;;
288   -program-transform-name=* | --program-transform-name=* \
289   | --program-transform-nam=* | --program-transform-na=* \
290   | --program-transform-n=* | --program-transform-=* \
291   | --program-transform=* | --program-transfor=* \
292   | --program-transfo=* | --program-transf=* \
293   | --program-trans=* | --program-tran=* \
294   | --progr-tra=* | --program-tr=* | --program-t=*)
295     program_transform_name="$ac_optarg" ;;
296
297   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
298   | -silent | --silent | --silen | --sile | --sil)
299     silent=yes ;;
300
301   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
302     ac_prev=sbindir ;;
303   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
304   | --sbi=* | --sb=*)
305     sbindir="$ac_optarg" ;;
306
307   -sharedstatedir | --sharedstatedir | --sharedstatedi \
308   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
309   | --sharedst | --shareds | --shared | --share | --shar \
310   | --sha | --sh)
311     ac_prev=sharedstatedir ;;
312   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
313   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
314   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
315   | --sha=* | --sh=*)
316     sharedstatedir="$ac_optarg" ;;
317
318   -site | --site | --sit)
319     ac_prev=site ;;
320   -site=* | --site=* | --sit=*)
321     site="$ac_optarg" ;;
322
323   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
324     ac_prev=srcdir ;;
325   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
326     srcdir="$ac_optarg" ;;
327
328   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
329   | --syscon | --sysco | --sysc | --sys | --sy)
330     ac_prev=sysconfdir ;;
331   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
332   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
333     sysconfdir="$ac_optarg" ;;
334
335   -target | --target | --targe | --targ | --tar | --ta | --t)
336     ac_prev=target ;;
337   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
338     target="$ac_optarg" ;;
339
340   -v | -verbose | --verbose | --verbos | --verbo | --verb)
341     verbose=yes ;;
342
343   -version | --version | --versio | --versi | --vers)
344     echo "configure generated by autoconf version 2.12"
345     exit 0 ;;
346
347   -with-* | --with-*)
348     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
349     # Reject names that are not valid shell variable names.
350     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
351       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
352     fi
353     ac_package=`echo $ac_package| sed 's/-/_/g'`
354     case "$ac_option" in
355       *=*) ;;
356       *) ac_optarg=yes ;;
357     esac
358     eval "with_${ac_package}='$ac_optarg'" ;;
359
360   -without-* | --without-*)
361     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
362     # Reject names that are not valid shell variable names.
363     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
364       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
365     fi
366     ac_package=`echo $ac_package| sed 's/-/_/g'`
367     eval "with_${ac_package}=no" ;;
368
369   --x)
370     # Obsolete; use --with-x.
371     with_x=yes ;;
372
373   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
374   | --x-incl | --x-inc | --x-in | --x-i)
375     ac_prev=x_includes ;;
376   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
377   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
378     x_includes="$ac_optarg" ;;
379
380   -x-libraries | --x-libraries | --x-librarie | --x-librari \
381   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
382     ac_prev=x_libraries ;;
383   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
384   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
385     x_libraries="$ac_optarg" ;;
386
387   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
388     ;;
389
390   *)
391     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
392       echo "configure: warning: $ac_option: invalid host type" 1>&2
393     fi
394     if test "x$nonopt" != xNONE; then
395       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
396     fi
397     nonopt="$ac_option"
398     ;;
399
400   esac
401 done
402
403 if test -n "$ac_prev"; then
404   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
405 fi
406
407 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
408
409 # File descriptor usage:
410 # 0 standard input
411 # 1 file creation
412 # 2 errors and warnings
413 # 3 some systems may open it to /dev/tty
414 # 4 used on the Kubota Titan
415 # 6 checking for... messages and results
416 # 5 compiler messages saved in config.log
417 if test "$silent" = yes; then
418   exec 6>/dev/null
419 else
420   exec 6>&1
421 fi
422 exec 5>./config.log
423
424 echo "\
425 This file contains any messages produced by compilers while
426 running configure, to aid debugging if configure makes a mistake.
427 " 1>&5
428
429 # Strip out --no-create and --no-recursion so they do not pile up.
430 # Also quote any args containing shell metacharacters.
431 ac_configure_args=
432 for ac_arg
433 do
434   case "$ac_arg" in
435   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
436   | --no-cr | --no-c) ;;
437   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
438   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
439   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
440   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
441   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
442   esac
443 done
444
445 # NLS nuisances.
446 # Only set these to C if already set.  These must not be set unconditionally
447 # because not all systems understand e.g. LANG=C (notably SCO).
448 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
449 # Non-C LC_CTYPE values break the ctype check.
450 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
451 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
452 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
453 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
454
455 # confdefs.h avoids OS command line length limits that DEFS can exceed.
456 rm -rf conftest* confdefs.h
457 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
458 echo > confdefs.h
459
460 # A filename unique to this package, relative to the directory that
461 # configure is in, which we can look for to find out if srcdir is correct.
462 ac_unique_file=etypes.h
463
464 # Find the source files, if location was not specified.
465 if test -z "$srcdir"; then
466   ac_srcdir_defaulted=yes
467   # Try the directory containing this script, then its parent.
468   ac_prog=$0
469   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
470   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
471   srcdir=$ac_confdir
472   if test ! -r $srcdir/$ac_unique_file; then
473     srcdir=..
474   fi
475 else
476   ac_srcdir_defaulted=no
477 fi
478 if test ! -r $srcdir/$ac_unique_file; then
479   if test "$ac_srcdir_defaulted" = yes; then
480     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
481   else
482     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
483   fi
484 fi
485 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
486
487 # Prefer explicitly selected file to automatically selected ones.
488 if test -z "$CONFIG_SITE"; then
489   if test "x$prefix" != xNONE; then
490     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
491   else
492     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
493   fi
494 fi
495 for ac_site_file in $CONFIG_SITE; do
496   if test -r "$ac_site_file"; then
497     echo "loading site script $ac_site_file"
498     . "$ac_site_file"
499   fi
500 done
501
502 if test -r "$cache_file"; then
503   echo "loading cache $cache_file"
504   . $cache_file
505 else
506   echo "creating cache $cache_file"
507   > $cache_file
508 fi
509
510 ac_ext=c
511 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
512 ac_cpp='$CPP $CPPFLAGS'
513 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
514 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
515 cross_compiling=$ac_cv_prog_cc_cross
516
517 if (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
525 else
526   ac_n= ac_c='\c' ac_t=
527 fi
528
529
530
531 ac_aux_dir=
532 for 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
542 done
543 if 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; }
545 fi
546 ac_config_guess=$ac_aux_dir/config.guess
547 ac_config_sub=$ac_aux_dir/config.sub
548 ac_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 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
558 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
559 # ./install, which can be erroneously created by make from ./install.sh.
560 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
561 echo "configure:562: checking for a BSD compatible install" >&5
562 if test -z "$INSTALL"; then
563 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
564   echo $ac_n "(cached) $ac_c" 1>&6
565 else
566     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
567   for ac_dir in $PATH; do
568     # Account for people who put trailing slashes in PATH elements.
569     case "$ac_dir/" in
570     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
571     *)
572       # OSF1 and SCO ODT 3.0 have their own names for install.
573       for ac_prog in ginstall installbsd scoinst install; do
574         if test -f $ac_dir/$ac_prog; then
575           if test $ac_prog = install &&
576             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
577             # AIX install.  It has an incompatible calling convention.
578             # OSF/1 installbsd also uses dspmsg, but is usable.
579             :
580           else
581             ac_cv_path_install="$ac_dir/$ac_prog -c"
582             break 2
583           fi
584         fi
585       done
586       ;;
587     esac
588   done
589   IFS="$ac_save_IFS"
590
591 fi
592   if test "${ac_cv_path_install+set}" = set; then
593     INSTALL="$ac_cv_path_install"
594   else
595     # As a last resort, use the slow shell script.  We don't cache a
596     # path for INSTALL within a source directory, because that will
597     # break other packages using the cache if that directory is
598     # removed, or if the path is relative.
599     INSTALL="$ac_install_sh"
600   fi
601 fi
602 echo "$ac_t""$INSTALL" 1>&6
603
604 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
605 # It thinks the first close brace ends the variable substitution.
606 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
607
608 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
609
610
611 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
612
613 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
614 echo "configure:615: checking whether build environment is sane" >&5
615 # Just in case
616 sleep 1
617 echo timestamp > conftestfile
618 # Do `set' in a subshell so we don't clobber the current shell's
619 # arguments.  Must try -L first in case configure is actually a
620 # symlink; some systems play weird games with the mod time of symlinks
621 # (eg FreeBSD returns the mod time of the symlink's containing
622 # directory).
623 if (
624    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
625    if test "$*" = "X"; then
626       # -L didn't work.
627       set X `ls -t $srcdir/configure conftestfile`
628    fi
629    if test "$*" != "X $srcdir/configure conftestfile" \
630       && test "$*" != "X conftestfile $srcdir/configure"; then
631
632       # If neither matched, then we have a broken ls.  This can happen
633       # if, for instance, CONFIG_SHELL is bash and it inherits a
634       # broken ls alias from the environment.  This has actually
635       # happened.  Such a system could not be considered "sane".
636       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
637 alias in your environment" 1>&2; exit 1; }
638    fi
639
640    test "$2" = conftestfile
641    )
642 then
643    # Ok.
644    :
645 else
646    { echo "configure: error: newly created file is older than distributed files!
647 Check your system clock" 1>&2; exit 1; }
648 fi
649 rm -f conftest*
650 echo "$ac_t""yes" 1>&6
651 if test "$program_transform_name" = s,x,x,; then
652   program_transform_name=
653 else
654   # Double any \ or $.  echo might interpret backslashes.
655   cat <<\EOF_SED > conftestsed
656 s,\\,\\\\,g; s,\$,$$,g
657 EOF_SED
658   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
659   rm -f conftestsed
660 fi
661 test "$program_prefix" != NONE &&
662   program_transform_name="s,^,${program_prefix},; $program_transform_name"
663 # Use a double $ so make ignores it.
664 test "$program_suffix" != NONE &&
665   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
666
667 # sed with no file args requires a program.
668 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
669
670 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
671 echo "configure:672: checking whether ${MAKE-make} sets \${MAKE}" >&5
672 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
673 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
674   echo $ac_n "(cached) $ac_c" 1>&6
675 else
676   cat > conftestmake <<\EOF
677 all:
678         @echo 'ac_maketemp="${MAKE}"'
679 EOF
680 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
681 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
682 if test -n "$ac_maketemp"; then
683   eval ac_cv_prog_make_${ac_make}_set=yes
684 else
685   eval ac_cv_prog_make_${ac_make}_set=no
686 fi
687 rm -f conftestmake
688 fi
689 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
690   echo "$ac_t""yes" 1>&6
691   SET_MAKE=
692 else
693   echo "$ac_t""no" 1>&6
694   SET_MAKE="MAKE=${MAKE-make}"
695 fi
696
697
698 PACKAGE=ethereal
699
700 VERSION=0.4.1
701
702 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
703   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
704 fi
705 cat >> confdefs.h <<EOF
706 #define PACKAGE "$PACKAGE"
707 EOF
708
709 cat >> confdefs.h <<EOF
710 #define VERSION "$VERSION"
711 EOF
712
713
714
715 missing_dir=`cd $ac_aux_dir && pwd`
716 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
717 echo "configure:718: checking for working aclocal" >&5
718 # Run test in a subshell; some versions of sh will print an error if
719 # an executable is not found, even if stderr is redirected.
720 # Redirect stdin to placate older versions of autoconf.  Sigh.
721 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
722    ACLOCAL=aclocal
723    echo "$ac_t""found" 1>&6
724 else
725    ACLOCAL="$missing_dir/missing aclocal"
726    echo "$ac_t""missing" 1>&6
727 fi
728
729 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
730 echo "configure:731: checking for working autoconf" >&5
731 # Run test in a subshell; some versions of sh will print an error if
732 # an executable is not found, even if stderr is redirected.
733 # Redirect stdin to placate older versions of autoconf.  Sigh.
734 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
735    AUTOCONF=autoconf
736    echo "$ac_t""found" 1>&6
737 else
738    AUTOCONF="$missing_dir/missing autoconf"
739    echo "$ac_t""missing" 1>&6
740 fi
741
742 echo $ac_n "checking for working automake""... $ac_c" 1>&6
743 echo "configure:744: checking for working automake" >&5
744 # Run test in a subshell; some versions of sh will print an error if
745 # an executable is not found, even if stderr is redirected.
746 # Redirect stdin to placate older versions of autoconf.  Sigh.
747 if (automake --version) < /dev/null > /dev/null 2>&1; then
748    AUTOMAKE=automake
749    echo "$ac_t""found" 1>&6
750 else
751    AUTOMAKE="$missing_dir/missing automake"
752    echo "$ac_t""missing" 1>&6
753 fi
754
755 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
756 echo "configure:757: checking for working autoheader" >&5
757 # Run test in a subshell; some versions of sh will print an error if
758 # an executable is not found, even if stderr is redirected.
759 # Redirect stdin to placate older versions of autoconf.  Sigh.
760 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
761    AUTOHEADER=autoheader
762    echo "$ac_t""found" 1>&6
763 else
764    AUTOHEADER="$missing_dir/missing autoheader"
765    echo "$ac_t""missing" 1>&6
766 fi
767
768 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
769 echo "configure:770: checking for working makeinfo" >&5
770 # Run test in a subshell; some versions of sh will print an error if
771 # an executable is not found, even if stderr is redirected.
772 # Redirect stdin to placate older versions of autoconf.  Sigh.
773 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
774    MAKEINFO=makeinfo
775    echo "$ac_t""found" 1>&6
776 else
777    MAKEINFO="$missing_dir/missing makeinfo"
778    echo "$ac_t""missing" 1>&6
779 fi
780
781
782
783
784 # Make sure we can run config.sub.
785 if $ac_config_sub sun4 >/dev/null 2>&1; then :
786 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
787 fi
788
789 echo $ac_n "checking host system type""... $ac_c" 1>&6
790 echo "configure:791: checking host system type" >&5
791
792 host_alias=$host
793 case "$host_alias" in
794 NONE)
795   case $nonopt in
796   NONE)
797     if host_alias=`$ac_config_guess`; then :
798     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
799     fi ;;
800   *) host_alias=$nonopt ;;
801   esac ;;
802 esac
803
804 host=`$ac_config_sub $host_alias`
805 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
806 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
807 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
808 echo "$ac_t""$host" 1>&6
809
810
811 # Extract the first word of "gcc", so it can be a program name with args.
812 set dummy gcc; ac_word=$2
813 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
814 echo "configure:815: checking for $ac_word" >&5
815 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
816   echo $ac_n "(cached) $ac_c" 1>&6
817 else
818   if test -n "$CC"; then
819   ac_cv_prog_CC="$CC" # Let the user override the test.
820 else
821   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
822   for ac_dir in $PATH; do
823     test -z "$ac_dir" && ac_dir=.
824     if test -f $ac_dir/$ac_word; then
825       ac_cv_prog_CC="gcc"
826       break
827     fi
828   done
829   IFS="$ac_save_ifs"
830 fi
831 fi
832 CC="$ac_cv_prog_CC"
833 if test -n "$CC"; then
834   echo "$ac_t""$CC" 1>&6
835 else
836   echo "$ac_t""no" 1>&6
837 fi
838
839 if test -z "$CC"; then
840   # Extract the first word of "cc", so it can be a program name with args.
841 set dummy cc; ac_word=$2
842 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
843 echo "configure:844: checking for $ac_word" >&5
844 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
845   echo $ac_n "(cached) $ac_c" 1>&6
846 else
847   if test -n "$CC"; then
848   ac_cv_prog_CC="$CC" # Let the user override the test.
849 else
850   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
851   ac_prog_rejected=no
852   for ac_dir in $PATH; do
853     test -z "$ac_dir" && ac_dir=.
854     if test -f $ac_dir/$ac_word; then
855       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
856         ac_prog_rejected=yes
857         continue
858       fi
859       ac_cv_prog_CC="cc"
860       break
861     fi
862   done
863   IFS="$ac_save_ifs"
864 if test $ac_prog_rejected = yes; then
865   # We found a bogon in the path, so make sure we never use it.
866   set dummy $ac_cv_prog_CC
867   shift
868   if test $# -gt 0; then
869     # We chose a different compiler from the bogus one.
870     # However, it has the same basename, so the bogon will be chosen
871     # first if we set CC to just the basename; use the full file name.
872     shift
873     set dummy "$ac_dir/$ac_word" "$@"
874     shift
875     ac_cv_prog_CC="$@"
876   fi
877 fi
878 fi
879 fi
880 CC="$ac_cv_prog_CC"
881 if test -n "$CC"; then
882   echo "$ac_t""$CC" 1>&6
883 else
884   echo "$ac_t""no" 1>&6
885 fi
886
887   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
888 fi
889
890 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
891 echo "configure:892: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
892
893 ac_ext=c
894 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
895 ac_cpp='$CPP $CPPFLAGS'
896 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
897 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
898 cross_compiling=$ac_cv_prog_cc_cross
899
900 cat > conftest.$ac_ext <<EOF
901 #line 902 "configure"
902 #include "confdefs.h"
903 main(){return(0);}
904 EOF
905 if { (eval echo configure:906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
906   ac_cv_prog_cc_works=yes
907   # If we can't run a trivial program, we are probably using a cross compiler.
908   if (./conftest; exit) 2>/dev/null; then
909     ac_cv_prog_cc_cross=no
910   else
911     ac_cv_prog_cc_cross=yes
912   fi
913 else
914   echo "configure: failed program was:" >&5
915   cat conftest.$ac_ext >&5
916   ac_cv_prog_cc_works=no
917 fi
918 rm -fr conftest*
919
920 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
921 if test $ac_cv_prog_cc_works = no; then
922   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
923 fi
924 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
925 echo "configure:926: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
926 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
927 cross_compiling=$ac_cv_prog_cc_cross
928
929 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
930 echo "configure:931: checking whether we are using GNU C" >&5
931 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
932   echo $ac_n "(cached) $ac_c" 1>&6
933 else
934   cat > conftest.c <<EOF
935 #ifdef __GNUC__
936   yes;
937 #endif
938 EOF
939 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
940   ac_cv_prog_gcc=yes
941 else
942   ac_cv_prog_gcc=no
943 fi
944 fi
945
946 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
947
948 if test $ac_cv_prog_gcc = yes; then
949   GCC=yes
950   ac_test_CFLAGS="${CFLAGS+set}"
951   ac_save_CFLAGS="$CFLAGS"
952   CFLAGS=
953   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
954 echo "configure:955: checking whether ${CC-cc} accepts -g" >&5
955 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
956   echo $ac_n "(cached) $ac_c" 1>&6
957 else
958   echo 'void f(){}' > conftest.c
959 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
960   ac_cv_prog_cc_g=yes
961 else
962   ac_cv_prog_cc_g=no
963 fi
964 rm -f conftest*
965
966 fi
967
968 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
969   if test "$ac_test_CFLAGS" = set; then
970     CFLAGS="$ac_save_CFLAGS"
971   elif test $ac_cv_prog_cc_g = yes; then
972     CFLAGS="-g -O2"
973   else
974     CFLAGS="-O2"
975   fi
976 else
977   GCC=
978   test "${CFLAGS+set}" = set || CFLAGS="-g"
979 fi
980
981 # Extract the first word of "ranlib", so it can be a program name with args.
982 set dummy ranlib; ac_word=$2
983 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
984 echo "configure:985: checking for $ac_word" >&5
985 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
986   echo $ac_n "(cached) $ac_c" 1>&6
987 else
988   if test -n "$RANLIB"; then
989   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
990 else
991   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
992   for ac_dir in $PATH; do
993     test -z "$ac_dir" && ac_dir=.
994     if test -f $ac_dir/$ac_word; then
995       ac_cv_prog_RANLIB="ranlib"
996       break
997     fi
998   done
999   IFS="$ac_save_ifs"
1000   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1001 fi
1002 fi
1003 RANLIB="$ac_cv_prog_RANLIB"
1004 if test -n "$RANLIB"; then
1005   echo "$ac_t""$RANLIB" 1>&6
1006 else
1007   echo "$ac_t""no" 1>&6
1008 fi
1009
1010
1011 # Create DATAFILE_DIR #define for config.h
1012 DATAFILE_DIR=$sysconfdir
1013 DATAFILE_DIR=`(
1014     test "x$prefix" = xNONE && prefix=$ac_default_prefix
1015     test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
1016     eval echo "$DATAFILE_DIR"
1017 )`
1018 cat >> confdefs.h <<EOF
1019 #define DATAFILE_DIR "$DATAFILE_DIR"
1020 EOF
1021
1022
1023
1024 # If we're running Solaris, and LD_LIBRARY_PATH is defined, add it as a
1025 # link directory.
1026 case "$host_os" in
1027   solaris*)
1028     echo $ac_n "checking for LD_LIBRARY_PATH""... $ac_c" 1>&6
1029 echo "configure:1030: checking for LD_LIBRARY_PATH" >&5
1030     if test x$LD_LIBRARY_PATH != x ; then
1031       LIBS="$LIBS -R$LD_LIBRARY_PATH"
1032       echo "$ac_t""yes -- added LD_LIBRARY_PATH to run-time linker path" 1>&6
1033     else
1034       echo "$ac_t""no -- this may be a problem in a few seconds" 1>&6
1035     fi
1036   ;;
1037 esac
1038
1039 # GTK checks
1040 # Check whether --with-gtk-prefix or --without-gtk-prefix was given.
1041 if test "${with_gtk_prefix+set}" = set; then
1042   withval="$with_gtk_prefix"
1043   gtk_config_prefix="$withval"
1044 else
1045   gtk_config_prefix=""
1046 fi
1047
1048 # Check whether --with-gtk-exec-prefix or --without-gtk-exec-prefix was given.
1049 if test "${with_gtk_exec_prefix+set}" = set; then
1050   withval="$with_gtk_exec_prefix"
1051   gtk_config_exec_prefix="$withval"
1052 else
1053   gtk_config_exec_prefix=""
1054 fi
1055
1056 # Check whether --enable-gtktest or --disable-gtktest was given.
1057 if test "${enable_gtktest+set}" = set; then
1058   enableval="$enable_gtktest"
1059   :
1060 else
1061   enable_gtktest=yes
1062 fi
1063
1064
1065   if test x$gtk_config_exec_prefix != x ; then
1066      gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
1067      if test x${GTK_CONFIG+set} != xset ; then
1068         GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
1069      fi
1070   fi
1071   if test x$gtk_config_prefix != x ; then
1072      gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
1073      if test x${GTK_CONFIG+set} != xset ; then
1074         GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
1075      fi
1076   fi
1077
1078   # Extract the first word of "gtk-config", so it can be a program name with args.
1079 set dummy gtk-config; ac_word=$2
1080 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1081 echo "configure:1082: checking for $ac_word" >&5
1082 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
1083   echo $ac_n "(cached) $ac_c" 1>&6
1084 else
1085   case "$GTK_CONFIG" in
1086   /*)
1087   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
1088   ;;
1089   *)
1090   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1091   for ac_dir in $PATH; do
1092     test -z "$ac_dir" && ac_dir=.
1093     if test -f $ac_dir/$ac_word; then
1094       ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
1095       break
1096     fi
1097   done
1098   IFS="$ac_save_ifs"
1099   test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
1100   ;;
1101 esac
1102 fi
1103 GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
1104 if test -n "$GTK_CONFIG"; then
1105   echo "$ac_t""$GTK_CONFIG" 1>&6
1106 else
1107   echo "$ac_t""no" 1>&6
1108 fi
1109
1110   min_gtk_version=1.0.0
1111   echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6
1112 echo "configure:1113: checking for GTK - version >= $min_gtk_version" >&5
1113   no_gtk=""
1114   if test "$GTK_CONFIG" = "no" ; then
1115     no_gtk=yes
1116   else
1117     GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
1118     GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
1119     gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
1120            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
1121     gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
1122            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
1123     gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
1124            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
1125     if test "x$enable_gtktest" = "xyes" ; then
1126       ac_save_CFLAGS="$CFLAGS"
1127       ac_save_LIBS="$LIBS"
1128       CFLAGS="$CFLAGS $GTK_CFLAGS"
1129       LIBS="$LIBS $GTK_LIBS"
1130       rm -f conf.gtktest
1131       if test "$cross_compiling" = yes; then
1132   echo $ac_n "cross compiling; assumed OK... $ac_c"
1133 else
1134   cat > conftest.$ac_ext <<EOF
1135 #line 1136 "configure"
1136 #include "confdefs.h"
1137
1138 #include <gtk/gtk.h>
1139 #include <stdio.h>
1140
1141 int 
1142 main ()
1143 {
1144   int major, minor, micro;
1145
1146   system ("touch conf.gtktest");
1147
1148   if (sscanf("$min_gtk_version", "%d.%d.%d", &major, &minor, &micro) != 3) {
1149      printf("%s, bad version string\n", "$min_gtk_version");
1150      exit(1);
1151    }
1152
1153   if ((gtk_major_version != $gtk_config_major_version) ||
1154       (gtk_minor_version != $gtk_config_minor_version) ||
1155       (gtk_micro_version != $gtk_config_micro_version))
1156     {
1157       printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", 
1158              $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
1159              gtk_major_version, gtk_minor_version, gtk_micro_version);
1160       printf ("*** was found! If gtk-config was correct, then it is best\n");
1161       printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
1162       printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
1163       printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
1164       printf("*** required on your system.\n");
1165       printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
1166       printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
1167       printf("*** before re-running configure\n");
1168     } 
1169   else
1170     {
1171       if ((gtk_major_version > major) ||
1172         ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
1173         ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
1174       {
1175         return 0;
1176        }
1177      else
1178       {
1179         printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
1180                gtk_major_version, gtk_minor_version, gtk_micro_version);
1181         printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
1182                major, minor, micro);
1183         printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
1184         printf("***\n");
1185         printf("*** If you have already installed a sufficiently new version, this error\n");
1186         printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
1187         printf("*** being found. The easiest way to fix this is to remove the old version\n");
1188         printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
1189         printf("*** correct copy of gtk-config. (In this case, you will have to\n");
1190         printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
1191         printf("*** so that the correct libraries are found at run-time))\n");
1192       }
1193     }
1194   return 1;
1195 }
1196
1197 EOF
1198 if { (eval echo configure:1199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1199 then
1200   :
1201 else
1202   echo "configure: failed program was:" >&5
1203   cat conftest.$ac_ext >&5
1204   rm -fr conftest*
1205   no_gtk=yes
1206 fi
1207 rm -fr conftest*
1208 fi
1209
1210        CFLAGS="$ac_save_CFLAGS"
1211        LIBS="$ac_save_LIBS"
1212      fi
1213   fi
1214   if test "x$no_gtk" = x ; then
1215      echo "$ac_t""yes" 1>&6
1216      CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS"     
1217   else
1218      echo "$ac_t""no" 1>&6
1219      if test "$GTK_CONFIG" = "no" ; then
1220        echo "*** The gtk-config script installed by GTK could not be found"
1221        echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
1222        echo "*** your path, or set the GTK_CONFIG environment variable to the"
1223        echo "*** full path to gtk-config."
1224      else
1225        if test -f conf.gtktest ; then
1226         :
1227        else
1228           echo "*** Could not run GTK test program, checking why..."
1229           CFLAGS="$CFLAGS $GTK_CFLAGS"
1230           LIBS="$LIBS $GTK_LIBS"
1231           cat > conftest.$ac_ext <<EOF
1232 #line 1233 "configure"
1233 #include "confdefs.h"
1234
1235 #include <gtk/gtk.h>
1236 #include <stdio.h>
1237
1238 int main() {
1239  return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); 
1240 ; return 0; }
1241 EOF
1242 if { (eval echo configure:1243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1243   rm -rf conftest*
1244    echo "*** The test program compiled, but did not run. This usually means"
1245           echo "*** that the run-time linker is not finding GTK or finding the wrong"
1246           echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
1247           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
1248           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
1249           echo "*** is required on your system"
1250           echo "***"
1251           echo "*** If you have an old version installed, it is best to remove it, although"
1252           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
1253           echo "***"
1254           echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
1255           echo "*** came with the system with the command"
1256           echo "***"
1257           echo "***    rpm --erase --nodeps gtk gtk-devel" 
1258 else
1259   echo "configure: failed program was:" >&5
1260   cat conftest.$ac_ext >&5
1261   rm -rf conftest*
1262    echo "*** The test program failed to compile or link. See the file config.log for the"
1263           echo "*** exact error that occured. This usually means GTK was incorrectly installed"
1264           echo "*** or that you have moved GTK since it was installed. In the latter case, you"
1265           echo "*** may want to edit the gtk-config script: $GTK_CONFIG" 
1266 fi
1267 rm -f conftest*
1268           CFLAGS="$ac_save_CFLAGS"
1269           LIBS="$ac_save_LIBS"
1270        fi
1271      fi
1272      GTK_CFLAGS=""
1273      GTK_LIBS=""
1274      { echo "configure: error: GTK+ distribution not found." 1>&2; exit 1; }
1275   fi
1276   
1277   
1278   rm -f conf.gtktest
1279
1280
1281 # Pcap checks
1282 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1283 echo "configure:1284: checking how to run the C preprocessor" >&5
1284 # On Suns, sometimes $CPP names a directory.
1285 if test -n "$CPP" && test -d "$CPP"; then
1286   CPP=
1287 fi
1288 if test -z "$CPP"; then
1289 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1290   echo $ac_n "(cached) $ac_c" 1>&6
1291 else
1292     # This must be in double quotes, not single quotes, because CPP may get
1293   # substituted into the Makefile and "${CC-cc}" will confuse make.
1294   CPP="${CC-cc} -E"
1295   # On the NeXT, cc -E runs the code through the compiler's parser,
1296   # not just through cpp.
1297   cat > conftest.$ac_ext <<EOF
1298 #line 1299 "configure"
1299 #include "confdefs.h"
1300 #include <assert.h>
1301 Syntax Error
1302 EOF
1303 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1304 { (eval echo configure:1305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1305 ac_err=`grep -v '^ *+' conftest.out`
1306 if test -z "$ac_err"; then
1307   :
1308 else
1309   echo "$ac_err" >&5
1310   echo "configure: failed program was:" >&5
1311   cat conftest.$ac_ext >&5
1312   rm -rf conftest*
1313   CPP="${CC-cc} -E -traditional-cpp"
1314   cat > conftest.$ac_ext <<EOF
1315 #line 1316 "configure"
1316 #include "confdefs.h"
1317 #include <assert.h>
1318 Syntax Error
1319 EOF
1320 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1321 { (eval echo configure:1322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1322 ac_err=`grep -v '^ *+' conftest.out`
1323 if test -z "$ac_err"; then
1324   :
1325 else
1326   echo "$ac_err" >&5
1327   echo "configure: failed program was:" >&5
1328   cat conftest.$ac_ext >&5
1329   rm -rf conftest*
1330   CPP=/lib/cpp
1331 fi
1332 rm -f conftest*
1333 fi
1334 rm -f conftest*
1335   ac_cv_prog_CPP="$CPP"
1336 fi
1337   CPP="$ac_cv_prog_CPP"
1338 else
1339   ac_cv_prog_CPP="$CPP"
1340 fi
1341 echo "$ac_t""$CPP" 1>&6
1342
1343 ac_safe=`echo "net/bpf.h" | sed 'y%./+-%__p_%'`
1344 echo $ac_n "checking for net/bpf.h""... $ac_c" 1>&6
1345 echo "configure:1346: checking for net/bpf.h" >&5
1346 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1347   echo $ac_n "(cached) $ac_c" 1>&6
1348 else
1349   cat > conftest.$ac_ext <<EOF
1350 #line 1351 "configure"
1351 #include "confdefs.h"
1352 #include <net/bpf.h>
1353 EOF
1354 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1355 { (eval echo configure:1356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1356 ac_err=`grep -v '^ *+' conftest.out`
1357 if test -z "$ac_err"; then
1358   rm -rf conftest*
1359   eval "ac_cv_header_$ac_safe=yes"
1360 else
1361   echo "$ac_err" >&5
1362   echo "configure: failed program was:" >&5
1363   cat conftest.$ac_ext >&5
1364   rm -rf conftest*
1365   eval "ac_cv_header_$ac_safe=no"
1366 fi
1367 rm -f conftest*
1368 fi
1369 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1370   echo "$ac_t""yes" 1>&6
1371   :
1372 else
1373   echo "$ac_t""no" 1>&6
1374 { echo "configure: error: Header file net/bpf.h not found." 1>&2; exit 1; }
1375 fi
1376
1377 ac_safe=`echo "pcap.h" | sed 'y%./+-%__p_%'`
1378 echo $ac_n "checking for pcap.h""... $ac_c" 1>&6
1379 echo "configure:1380: checking for pcap.h" >&5
1380 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1381   echo $ac_n "(cached) $ac_c" 1>&6
1382 else
1383   cat > conftest.$ac_ext <<EOF
1384 #line 1385 "configure"
1385 #include "confdefs.h"
1386 #include <pcap.h>
1387 EOF
1388 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1389 { (eval echo configure:1390: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1390 ac_err=`grep -v '^ *+' conftest.out`
1391 if test -z "$ac_err"; then
1392   rm -rf conftest*
1393   eval "ac_cv_header_$ac_safe=yes"
1394 else
1395   echo "$ac_err" >&5
1396   echo "configure: failed program was:" >&5
1397   cat conftest.$ac_ext >&5
1398   rm -rf conftest*
1399   eval "ac_cv_header_$ac_safe=no"
1400 fi
1401 rm -f conftest*
1402 fi
1403 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1404   echo "$ac_t""yes" 1>&6
1405   :
1406 else
1407   echo "$ac_t""no" 1>&6
1408 { echo "configure: error: Header file pcap.h not found." 1>&2; exit 1; }
1409 fi
1410
1411 echo $ac_n "checking for pcap_open_offline in -lpcap""... $ac_c" 1>&6
1412 echo "configure:1413: checking for pcap_open_offline in -lpcap" >&5
1413 ac_lib_var=`echo pcap'_'pcap_open_offline | sed 'y%./+-%__p_%'`
1414 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1415   echo $ac_n "(cached) $ac_c" 1>&6
1416 else
1417   ac_save_LIBS="$LIBS"
1418 LIBS="-lpcap  $LIBS"
1419 cat > conftest.$ac_ext <<EOF
1420 #line 1421 "configure"
1421 #include "confdefs.h"
1422 /* Override any gcc2 internal prototype to avoid an error.  */
1423 /* We use char because int might match the return type of a gcc2
1424     builtin and then its argument prototype would still apply.  */
1425 char pcap_open_offline();
1426
1427 int main() {
1428 pcap_open_offline()
1429 ; return 0; }
1430 EOF
1431 if { (eval echo configure:1432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1432   rm -rf conftest*
1433   eval "ac_cv_lib_$ac_lib_var=yes"
1434 else
1435   echo "configure: failed program was:" >&5
1436   cat conftest.$ac_ext >&5
1437   rm -rf conftest*
1438   eval "ac_cv_lib_$ac_lib_var=no"
1439 fi
1440 rm -f conftest*
1441 LIBS="$ac_save_LIBS"
1442
1443 fi
1444 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1445   echo "$ac_t""yes" 1>&6
1446     ac_tr_lib=HAVE_LIB`echo pcap | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1447     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1448   cat >> confdefs.h <<EOF
1449 #define $ac_tr_lib 1
1450 EOF
1451
1452   LIBS="-lpcap $LIBS"
1453
1454 else
1455   echo "$ac_t""no" 1>&6
1456 { echo "configure: error: Library libpcap not found." 1>&2; exit 1; }
1457 fi
1458
1459
1460 # Evidently, some systems have pcap.h, etc. in */include/pcap
1461 echo $ac_n "checking for extraneous pcap header directories""... $ac_c" 1>&6
1462 echo "configure:1463: checking for extraneous pcap header directories" >&5
1463 found_pcap_dir=""
1464 for pcap_dir in /usr/include/pcap /usr/local/include/pcap
1465 do
1466   if test -d $pcap_dir ; then
1467     LIBS="$LIBS -L$pcap_dir"
1468     found_pcap_dir=" $found_pcap_dir -L$pcap_dir"
1469   fi
1470 done
1471
1472 if test "$found_pcap_dir" != "" ; then
1473   echo "$ac_t""found --$found_pcap_dir added to LIBS" 1>&6
1474 else
1475   echo "$ac_t""not found" 1>&6
1476 fi
1477
1478 # Wiretap check
1479 echo $ac_n "checking whether to include wiretap library""... $ac_c" 1>&6
1480 echo "configure:1481: checking whether to include wiretap library" >&5
1481 # Check whether --with-wiretap or --without-wiretap was given.
1482 if test "${with_wiretap+set}" = set; then
1483   withval="$with_wiretap"
1484    case "$withval" in
1485                 yes)
1486                         echo "$ac_t""yes" 1>&6
1487                         cat >> confdefs.h <<\EOF
1488 #define WITH_WIRETAP 1
1489 EOF
1490
1491                         CFLAGS="$CFLAGS -Iwiretap"
1492                         LIBWIRETAP_A="wiretap/libwiretap.a"
1493                         ;;
1494                 *)
1495                         echo "$ac_t""no" 1>&6
1496                         LIBWIRETAP_A=""
1497                         ;;
1498         esac 
1499 else
1500   echo "$ac_t""no" 1>&6
1501
1502 fi
1503
1504
1505
1506 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1507 echo "configure:1508: checking for ANSI C header files" >&5
1508 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1509   echo $ac_n "(cached) $ac_c" 1>&6
1510 else
1511   cat > conftest.$ac_ext <<EOF
1512 #line 1513 "configure"
1513 #include "confdefs.h"
1514 #include <stdlib.h>
1515 #include <stdarg.h>
1516 #include <string.h>
1517 #include <float.h>
1518 EOF
1519 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1520 { (eval echo configure:1521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1521 ac_err=`grep -v '^ *+' conftest.out`
1522 if test -z "$ac_err"; then
1523   rm -rf conftest*
1524   ac_cv_header_stdc=yes
1525 else
1526   echo "$ac_err" >&5
1527   echo "configure: failed program was:" >&5
1528   cat conftest.$ac_ext >&5
1529   rm -rf conftest*
1530   ac_cv_header_stdc=no
1531 fi
1532 rm -f conftest*
1533
1534 if test $ac_cv_header_stdc = yes; then
1535   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1536 cat > conftest.$ac_ext <<EOF
1537 #line 1538 "configure"
1538 #include "confdefs.h"
1539 #include <string.h>
1540 EOF
1541 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1542   egrep "memchr" >/dev/null 2>&1; then
1543   :
1544 else
1545   rm -rf conftest*
1546   ac_cv_header_stdc=no
1547 fi
1548 rm -f conftest*
1549
1550 fi
1551
1552 if test $ac_cv_header_stdc = yes; then
1553   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1554 cat > conftest.$ac_ext <<EOF
1555 #line 1556 "configure"
1556 #include "confdefs.h"
1557 #include <stdlib.h>
1558 EOF
1559 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1560   egrep "free" >/dev/null 2>&1; then
1561   :
1562 else
1563   rm -rf conftest*
1564   ac_cv_header_stdc=no
1565 fi
1566 rm -f conftest*
1567
1568 fi
1569
1570 if test $ac_cv_header_stdc = yes; then
1571   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1572 if test "$cross_compiling" = yes; then
1573   :
1574 else
1575   cat > conftest.$ac_ext <<EOF
1576 #line 1577 "configure"
1577 #include "confdefs.h"
1578 #include <ctype.h>
1579 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1580 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1581 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1582 int main () { int i; for (i = 0; i < 256; i++)
1583 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1584 exit (0); }
1585
1586 EOF
1587 if { (eval echo configure:1588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1588 then
1589   :
1590 else
1591   echo "configure: failed program was:" >&5
1592   cat conftest.$ac_ext >&5
1593   rm -fr conftest*
1594   ac_cv_header_stdc=no
1595 fi
1596 rm -fr conftest*
1597 fi
1598
1599 fi
1600 fi
1601
1602 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1603 if test $ac_cv_header_stdc = yes; then
1604   cat >> confdefs.h <<\EOF
1605 #define STDC_HEADERS 1
1606 EOF
1607
1608 fi
1609
1610 for ac_hdr in fcntl.h strings.h sys/ioctl.h sys/time.h unistd.h stdarg.h
1611 do
1612 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1613 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1614 echo "configure:1615: checking for $ac_hdr" >&5
1615 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1616   echo $ac_n "(cached) $ac_c" 1>&6
1617 else
1618   cat > conftest.$ac_ext <<EOF
1619 #line 1620 "configure"
1620 #include "confdefs.h"
1621 #include <$ac_hdr>
1622 EOF
1623 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1624 { (eval echo configure:1625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1625 ac_err=`grep -v '^ *+' conftest.out`
1626 if test -z "$ac_err"; then
1627   rm -rf conftest*
1628   eval "ac_cv_header_$ac_safe=yes"
1629 else
1630   echo "$ac_err" >&5
1631   echo "configure: failed program was:" >&5
1632   cat conftest.$ac_ext >&5
1633   rm -rf conftest*
1634   eval "ac_cv_header_$ac_safe=no"
1635 fi
1636 rm -f conftest*
1637 fi
1638 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1639   echo "$ac_t""yes" 1>&6
1640     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1641   cat >> confdefs.h <<EOF
1642 #define $ac_tr_hdr 1
1643 EOF
1644  
1645 else
1646   echo "$ac_t""no" 1>&6
1647 fi
1648 done
1649
1650
1651 for ac_hdr in sys/sockio.h sys/types.h netinet/in.h
1652 do
1653 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1654 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1655 echo "configure:1656: checking for $ac_hdr" >&5
1656 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1657   echo $ac_n "(cached) $ac_c" 1>&6
1658 else
1659   cat > conftest.$ac_ext <<EOF
1660 #line 1661 "configure"
1661 #include "confdefs.h"
1662 #include <$ac_hdr>
1663 EOF
1664 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1665 { (eval echo configure:1666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1666 ac_err=`grep -v '^ *+' conftest.out`
1667 if test -z "$ac_err"; then
1668   rm -rf conftest*
1669   eval "ac_cv_header_$ac_safe=yes"
1670 else
1671   echo "$ac_err" >&5
1672   echo "configure: failed program was:" >&5
1673   cat conftest.$ac_ext >&5
1674   rm -rf conftest*
1675   eval "ac_cv_header_$ac_safe=no"
1676 fi
1677 rm -f conftest*
1678 fi
1679 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1680   echo "$ac_t""yes" 1>&6
1681     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1682   cat >> confdefs.h <<EOF
1683 #define $ac_tr_hdr 1
1684 EOF
1685  
1686 else
1687   echo "$ac_t""no" 1>&6
1688 fi
1689 done
1690
1691
1692 # AC_C_CONST
1693
1694 # We need libpcap's AC_LBL_SOCKADDR_SA_LEN test for get_interface_list().
1695
1696 echo $ac_n "checking if sockaddr struct has sa_len member""... $ac_c" 1>&6
1697 echo "configure:1698: checking if sockaddr struct has sa_len member" >&5
1698     if eval "test \"`echo '$''{'ac_cv_lbl_sockaddr_has_sa_len'+set}'`\" = set"; then
1699   echo $ac_n "(cached) $ac_c" 1>&6
1700 else
1701   cat > conftest.$ac_ext <<EOF
1702 #line 1703 "configure"
1703 #include "confdefs.h"
1704
1705 #   include <sys/types.h>
1706 #   include <sys/socket.h>
1707 int main() {
1708 u_int i = sizeof(((struct sockaddr *)0)->sa_len)
1709 ; return 0; }
1710 EOF
1711 if { (eval echo configure:1712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1712   rm -rf conftest*
1713   ac_cv_lbl_sockaddr_has_sa_len=yes
1714 else
1715   echo "configure: failed program was:" >&5
1716   cat conftest.$ac_ext >&5
1717   rm -rf conftest*
1718   ac_cv_lbl_sockaddr_has_sa_len=no
1719 fi
1720 rm -f conftest*
1721 fi
1722
1723     echo "$ac_t""$ac_cv_lbl_sockaddr_has_sa_len" 1>&6
1724     if test $ac_cv_lbl_sockaddr_has_sa_len = yes ; then
1725         cat >> confdefs.h <<\EOF
1726 #define HAVE_SOCKADDR_SA_LEN 1
1727 EOF
1728
1729     fi
1730
1731 # We must know our byte order
1732 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
1733 echo "configure:1734: checking whether byte ordering is bigendian" >&5
1734 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
1735   echo $ac_n "(cached) $ac_c" 1>&6
1736 else
1737   ac_cv_c_bigendian=unknown
1738 # See if sys/param.h defines the BYTE_ORDER macro.
1739 cat > conftest.$ac_ext <<EOF
1740 #line 1741 "configure"
1741 #include "confdefs.h"
1742 #include <sys/types.h>
1743 #include <sys/param.h>
1744 int main() {
1745
1746 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
1747  bogus endian macros
1748 #endif
1749 ; return 0; }
1750 EOF
1751 if { (eval echo configure:1752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1752   rm -rf conftest*
1753   # It does; now see whether it defined to BIG_ENDIAN or not.
1754 cat > conftest.$ac_ext <<EOF
1755 #line 1756 "configure"
1756 #include "confdefs.h"
1757 #include <sys/types.h>
1758 #include <sys/param.h>
1759 int main() {
1760
1761 #if BYTE_ORDER != BIG_ENDIAN
1762  not big endian
1763 #endif
1764 ; return 0; }
1765 EOF
1766 if { (eval echo configure:1767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1767   rm -rf conftest*
1768   ac_cv_c_bigendian=yes
1769 else
1770   echo "configure: failed program was:" >&5
1771   cat conftest.$ac_ext >&5
1772   rm -rf conftest*
1773   ac_cv_c_bigendian=no
1774 fi
1775 rm -f conftest*
1776 else
1777   echo "configure: failed program was:" >&5
1778   cat conftest.$ac_ext >&5
1779 fi
1780 rm -f conftest*
1781 if test $ac_cv_c_bigendian = unknown; then
1782 if test "$cross_compiling" = yes; then
1783     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1784 else
1785   cat > conftest.$ac_ext <<EOF
1786 #line 1787 "configure"
1787 #include "confdefs.h"
1788 main () {
1789   /* Are we little or big endian?  From Harbison&Steele.  */
1790   union
1791   {
1792     long l;
1793     char c[sizeof (long)];
1794   } u;
1795   u.l = 1;
1796   exit (u.c[sizeof (long) - 1] == 1);
1797 }
1798 EOF
1799 if { (eval echo configure:1800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1800 then
1801   ac_cv_c_bigendian=no
1802 else
1803   echo "configure: failed program was:" >&5
1804   cat conftest.$ac_ext >&5
1805   rm -fr conftest*
1806   ac_cv_c_bigendian=yes
1807 fi
1808 rm -fr conftest*
1809 fi
1810
1811 fi
1812 fi
1813
1814 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
1815 if test $ac_cv_c_bigendian = yes; then
1816   cat >> confdefs.h <<\EOF
1817 #define WORDS_BIGENDIAN 1
1818 EOF
1819
1820 fi
1821
1822
1823 if test $ac_cv_prog_gcc = yes; then
1824     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
1825 echo "configure:1826: checking whether ${CC-cc} needs -traditional" >&5
1826 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
1827   echo $ac_n "(cached) $ac_c" 1>&6
1828 else
1829     ac_pattern="Autoconf.*'x'"
1830   cat > conftest.$ac_ext <<EOF
1831 #line 1832 "configure"
1832 #include "confdefs.h"
1833 #include <sgtty.h>
1834 Autoconf TIOCGETP
1835 EOF
1836 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1837   egrep "$ac_pattern" >/dev/null 2>&1; then
1838   rm -rf conftest*
1839   ac_cv_prog_gcc_traditional=yes
1840 else
1841   rm -rf conftest*
1842   ac_cv_prog_gcc_traditional=no
1843 fi
1844 rm -f conftest*
1845
1846
1847   if test $ac_cv_prog_gcc_traditional = no; then
1848     cat > conftest.$ac_ext <<EOF
1849 #line 1850 "configure"
1850 #include "confdefs.h"
1851 #include <termio.h>
1852 Autoconf TCGETA
1853 EOF
1854 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1855   egrep "$ac_pattern" >/dev/null 2>&1; then
1856   rm -rf conftest*
1857   ac_cv_prog_gcc_traditional=yes
1858 fi
1859 rm -f conftest*
1860
1861   fi
1862 fi
1863
1864 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
1865   if test $ac_cv_prog_gcc_traditional = yes; then
1866     CC="$CC -traditional"
1867   fi
1868 fi
1869
1870 echo $ac_n "checking for socket""... $ac_c" 1>&6
1871 echo "configure:1872: checking for socket" >&5
1872 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
1873   echo $ac_n "(cached) $ac_c" 1>&6
1874 else
1875   cat > conftest.$ac_ext <<EOF
1876 #line 1877 "configure"
1877 #include "confdefs.h"
1878 /* System header to define __stub macros and hopefully few prototypes,
1879     which can conflict with char socket(); below.  */
1880 #include <assert.h>
1881 /* Override any gcc2 internal prototype to avoid an error.  */
1882 /* We use char because int might match the return type of a gcc2
1883     builtin and then its argument prototype would still apply.  */
1884 char socket();
1885
1886 int main() {
1887
1888 /* The GNU C library defines this for functions which it implements
1889     to always fail with ENOSYS.  Some functions are actually named
1890     something starting with __ and the normal name is an alias.  */
1891 #if defined (__stub_socket) || defined (__stub___socket)
1892 choke me
1893 #else
1894 socket();
1895 #endif
1896
1897 ; return 0; }
1898 EOF
1899 if { (eval echo configure:1900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1900   rm -rf conftest*
1901   eval "ac_cv_func_socket=yes"
1902 else
1903   echo "configure: failed program was:" >&5
1904   cat conftest.$ac_ext >&5
1905   rm -rf conftest*
1906   eval "ac_cv_func_socket=no"
1907 fi
1908 rm -f conftest*
1909 fi
1910
1911 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
1912   echo "$ac_t""yes" 1>&6
1913   :
1914 else
1915   echo "$ac_t""no" 1>&6
1916 { echo "configure: error: Function 'socket' not found." 1>&2; exit 1; }
1917 fi
1918
1919
1920 # If there's a system out there that has snprintf and _doesn't_ have vsnprintf,
1921 # then this won't work.
1922 SNPRINTF_C=""
1923 SNPRINTF_O=""
1924 echo $ac_n "checking for snprintf""... $ac_c" 1>&6
1925 echo "configure:1926: checking for snprintf" >&5
1926 if eval "test \"`echo '$''{'ac_cv_func_snprintf'+set}'`\" = set"; then
1927   echo $ac_n "(cached) $ac_c" 1>&6
1928 else
1929   cat > conftest.$ac_ext <<EOF
1930 #line 1931 "configure"
1931 #include "confdefs.h"
1932 /* System header to define __stub macros and hopefully few prototypes,
1933     which can conflict with char snprintf(); below.  */
1934 #include <assert.h>
1935 /* Override any gcc2 internal prototype to avoid an error.  */
1936 /* We use char because int might match the return type of a gcc2
1937     builtin and then its argument prototype would still apply.  */
1938 char snprintf();
1939
1940 int main() {
1941
1942 /* The GNU C library defines this for functions which it implements
1943     to always fail with ENOSYS.  Some functions are actually named
1944     something starting with __ and the normal name is an alias.  */
1945 #if defined (__stub_snprintf) || defined (__stub___snprintf)
1946 choke me
1947 #else
1948 snprintf();
1949 #endif
1950
1951 ; return 0; }
1952 EOF
1953 if { (eval echo configure:1954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1954   rm -rf conftest*
1955   eval "ac_cv_func_snprintf=yes"
1956 else
1957   echo "configure: failed program was:" >&5
1958   cat conftest.$ac_ext >&5
1959   rm -rf conftest*
1960   eval "ac_cv_func_snprintf=no"
1961 fi
1962 rm -f conftest*
1963 fi
1964
1965 if eval "test \"`echo '$ac_cv_func_'snprintf`\" = yes"; then
1966   echo "$ac_t""yes" 1>&6
1967   SNPRINTF_O=""
1968 else
1969   echo "$ac_t""no" 1>&6
1970 SNPRINTF_O="snprintf.o" cat >> confdefs.h <<\EOF
1971 #define NEED_SNPRINTF_H 1
1972 EOF
1973
1974 fi
1975
1976 if test "$ac_cv_func_snprintf" = no ; then
1977   SNPRINTF_C="snprintf.c"
1978   SNPRINTF_O="snprintf.o"
1979 fi
1980
1981
1982
1983
1984
1985
1986 #AC_CONFIG_SUBDIRS(wiretap)
1987 trap '' 1 2 15
1988 cat > confcache <<\EOF
1989 # This file is a shell script that caches the results of configure
1990 # tests run on this system so they can be shared between configure
1991 # scripts and configure runs.  It is not useful on other systems.
1992 # If it contains results you don't want to keep, you may remove or edit it.
1993 #
1994 # By default, configure uses ./config.cache as the cache file,
1995 # creating it if it does not exist already.  You can give configure
1996 # the --cache-file=FILE option to use a different cache file; that is
1997 # what configure does when it calls configure scripts in
1998 # subdirectories, so they share the cache.
1999 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2000 # config.status only pays attention to the cache file if you give it the
2001 # --recheck option to rerun configure.
2002 #
2003 EOF
2004 # The following way of writing the cache mishandles newlines in values,
2005 # but we know of no workaround that is simple, portable, and efficient.
2006 # So, don't put newlines in cache variables' values.
2007 # Ultrix sh set writes to stderr and can't be redirected directly,
2008 # and sets the high bit in the cache file unless we assign to the vars.
2009 (set) 2>&1 |
2010   case `(ac_space=' '; set) 2>&1` in
2011   *ac_space=\ *)
2012     # `set' does not quote correctly, so add quotes (double-quote substitution
2013     # turns \\\\ into \\, and sed turns \\ into \).
2014     sed -n \
2015       -e "s/'/'\\\\''/g" \
2016       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2017     ;;
2018   *)
2019     # `set' quotes correctly as required by POSIX, so do not add quotes.
2020     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2021     ;;
2022   esac >> confcache
2023 if cmp -s $cache_file confcache; then
2024   :
2025 else
2026   if test -w $cache_file; then
2027     echo "updating cache $cache_file"
2028     cat confcache > $cache_file
2029   else
2030     echo "not updating unwritable cache $cache_file"
2031   fi
2032 fi
2033 rm -f confcache
2034
2035 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2036
2037 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2038 # Let make expand exec_prefix.
2039 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2040
2041 # Any assignment to VPATH causes Sun make to only execute
2042 # the first set of double-colon rules, so remove it if not needed.
2043 # If there is a colon in the path, we need to keep it.
2044 if test "x$srcdir" = x.; then
2045   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2046 fi
2047
2048 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2049
2050 DEFS=-DHAVE_CONFIG_H
2051
2052 # Without the "./", some shells look in PATH for config.status.
2053 : ${CONFIG_STATUS=./config.status}
2054
2055 echo creating $CONFIG_STATUS
2056 rm -f $CONFIG_STATUS
2057 cat > $CONFIG_STATUS <<EOF
2058 #! /bin/sh
2059 # Generated automatically by configure.
2060 # Run this file to recreate the current configuration.
2061 # This directory was configured as follows,
2062 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2063 #
2064 # $0 $ac_configure_args
2065 #
2066 # Compiler output produced by configure, useful for debugging
2067 # configure, is in ./config.log if it exists.
2068
2069 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2070 for ac_option
2071 do
2072   case "\$ac_option" in
2073   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2074     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2075     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2076   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2077     echo "$CONFIG_STATUS generated by autoconf version 2.12"
2078     exit 0 ;;
2079   -help | --help | --hel | --he | --h)
2080     echo "\$ac_cs_usage"; exit 0 ;;
2081   *) echo "\$ac_cs_usage"; exit 1 ;;
2082   esac
2083 done
2084
2085 ac_given_srcdir=$srcdir
2086 ac_given_INSTALL="$INSTALL"
2087
2088 trap 'rm -fr `echo "Makefile wiretap/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2089 EOF
2090 cat >> $CONFIG_STATUS <<EOF
2091
2092 # Protect against being on the right side of a sed subst in config.status.
2093 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2094  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2095 $ac_vpsub
2096 $extrasub
2097 s%@CFLAGS@%$CFLAGS%g
2098 s%@CPPFLAGS@%$CPPFLAGS%g
2099 s%@CXXFLAGS@%$CXXFLAGS%g
2100 s%@DEFS@%$DEFS%g
2101 s%@LDFLAGS@%$LDFLAGS%g
2102 s%@LIBS@%$LIBS%g
2103 s%@exec_prefix@%$exec_prefix%g
2104 s%@prefix@%$prefix%g
2105 s%@program_transform_name@%$program_transform_name%g
2106 s%@bindir@%$bindir%g
2107 s%@sbindir@%$sbindir%g
2108 s%@libexecdir@%$libexecdir%g
2109 s%@datadir@%$datadir%g
2110 s%@sysconfdir@%$sysconfdir%g
2111 s%@sharedstatedir@%$sharedstatedir%g
2112 s%@localstatedir@%$localstatedir%g
2113 s%@libdir@%$libdir%g
2114 s%@includedir@%$includedir%g
2115 s%@oldincludedir@%$oldincludedir%g
2116 s%@infodir@%$infodir%g
2117 s%@mandir@%$mandir%g
2118 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2119 s%@INSTALL_DATA@%$INSTALL_DATA%g
2120 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2121 s%@PACKAGE@%$PACKAGE%g
2122 s%@VERSION@%$VERSION%g
2123 s%@ACLOCAL@%$ACLOCAL%g
2124 s%@AUTOCONF@%$AUTOCONF%g
2125 s%@AUTOMAKE@%$AUTOMAKE%g
2126 s%@AUTOHEADER@%$AUTOHEADER%g
2127 s%@MAKEINFO@%$MAKEINFO%g
2128 s%@SET_MAKE@%$SET_MAKE%g
2129 s%@host@%$host%g
2130 s%@host_alias@%$host_alias%g
2131 s%@host_cpu@%$host_cpu%g
2132 s%@host_vendor@%$host_vendor%g
2133 s%@host_os@%$host_os%g
2134 s%@CC@%$CC%g
2135 s%@RANLIB@%$RANLIB%g
2136 s%@DATAFILE_DIR@%$DATAFILE_DIR%g
2137 s%@GTK_CONFIG@%$GTK_CONFIG%g
2138 s%@GTK_CFLAGS@%$GTK_CFLAGS%g
2139 s%@GTK_LIBS@%$GTK_LIBS%g
2140 s%@CPP@%$CPP%g
2141 s%@LIBWIRETAP_A@%$LIBWIRETAP_A%g
2142 s%@SNPRINTF_C@%$SNPRINTF_C%g
2143 s%@SNPRINTF_O@%$SNPRINTF_O%g
2144
2145 CEOF
2146 EOF
2147
2148 cat >> $CONFIG_STATUS <<\EOF
2149
2150 # Split the substitutions into bite-sized pieces for seds with
2151 # small command number limits, like on Digital OSF/1 and HP-UX.
2152 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2153 ac_file=1 # Number of current file.
2154 ac_beg=1 # First line for current file.
2155 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2156 ac_more_lines=:
2157 ac_sed_cmds=""
2158 while $ac_more_lines; do
2159   if test $ac_beg -gt 1; then
2160     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2161   else
2162     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2163   fi
2164   if test ! -s conftest.s$ac_file; then
2165     ac_more_lines=false
2166     rm -f conftest.s$ac_file
2167   else
2168     if test -z "$ac_sed_cmds"; then
2169       ac_sed_cmds="sed -f conftest.s$ac_file"
2170     else
2171       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2172     fi
2173     ac_file=`expr $ac_file + 1`
2174     ac_beg=$ac_end
2175     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2176   fi
2177 done
2178 if test -z "$ac_sed_cmds"; then
2179   ac_sed_cmds=cat
2180 fi
2181 EOF
2182
2183 cat >> $CONFIG_STATUS <<EOF
2184
2185 CONFIG_FILES=\${CONFIG_FILES-"Makefile wiretap/Makefile"}
2186 EOF
2187 cat >> $CONFIG_STATUS <<\EOF
2188 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2189   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2190   case "$ac_file" in
2191   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2192        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2193   *) ac_file_in="${ac_file}.in" ;;
2194   esac
2195
2196   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2197
2198   # Remove last slash and all that follows it.  Not all systems have dirname.
2199   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2200   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2201     # The file is in a subdirectory.
2202     test ! -d "$ac_dir" && mkdir "$ac_dir"
2203     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2204     # A "../" for each directory in $ac_dir_suffix.
2205     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2206   else
2207     ac_dir_suffix= ac_dots=
2208   fi
2209
2210   case "$ac_given_srcdir" in
2211   .)  srcdir=.
2212       if test -z "$ac_dots"; then top_srcdir=.
2213       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2214   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2215   *) # Relative path.
2216     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2217     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2218   esac
2219
2220   case "$ac_given_INSTALL" in
2221   [/$]*) INSTALL="$ac_given_INSTALL" ;;
2222   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2223   esac
2224
2225   echo creating "$ac_file"
2226   rm -f "$ac_file"
2227   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2228   case "$ac_file" in
2229   *Makefile*) ac_comsub="1i\\
2230 # $configure_input" ;;
2231   *) ac_comsub= ;;
2232   esac
2233
2234   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2235   sed -e "$ac_comsub
2236 s%@configure_input@%$configure_input%g
2237 s%@srcdir@%$srcdir%g
2238 s%@top_srcdir@%$top_srcdir%g
2239 s%@INSTALL@%$INSTALL%g
2240 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2241 fi; done
2242 rm -f conftest.s*
2243
2244 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2245 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2246 #
2247 # ac_d sets the value in "#define NAME VALUE" lines.
2248 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
2249 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
2250 ac_dC='\3'
2251 ac_dD='%g'
2252 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2253 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2254 ac_uB='\([      ]\)%\1#\2define\3'
2255 ac_uC=' '
2256 ac_uD='\4%g'
2257 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2258 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2259 ac_eB='$%\1#\2define\3'
2260 ac_eC=' '
2261 ac_eD='%g'
2262
2263 if test "${CONFIG_HEADERS+set}" != set; then
2264 EOF
2265 cat >> $CONFIG_STATUS <<EOF
2266   CONFIG_HEADERS="config.h"
2267 EOF
2268 cat >> $CONFIG_STATUS <<\EOF
2269 fi
2270 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2271   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2272   case "$ac_file" in
2273   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2274        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2275   *) ac_file_in="${ac_file}.in" ;;
2276   esac
2277
2278   echo creating $ac_file
2279
2280   rm -f conftest.frag conftest.in conftest.out
2281   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2282   cat $ac_file_inputs > conftest.in
2283
2284 EOF
2285
2286 # Transform confdefs.h into a sed script conftest.vals that substitutes
2287 # the proper values into config.h.in to produce config.h.  And first:
2288 # Protect against being on the right side of a sed subst in config.status.
2289 # Protect against being in an unquoted here document in config.status.
2290 rm -f conftest.vals
2291 cat > conftest.hdr <<\EOF
2292 s/[\\&%]/\\&/g
2293 s%[\\$`]%\\&%g
2294 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2295 s%ac_d%ac_u%gp
2296 s%ac_u%ac_e%gp
2297 EOF
2298 sed -n -f conftest.hdr confdefs.h > conftest.vals
2299 rm -f conftest.hdr
2300
2301 # This sed command replaces #undef with comments.  This is necessary, for
2302 # example, in the case of _POSIX_SOURCE, which is predefined and required
2303 # on some systems where configure will not decide to define it.
2304 cat >> conftest.vals <<\EOF
2305 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2306 EOF
2307
2308 # Break up conftest.vals because some shells have a limit on
2309 # the size of here documents, and old seds have small limits too.
2310
2311 rm -f conftest.tail
2312 while :
2313 do
2314   ac_lines=`grep -c . conftest.vals`
2315   # grep -c gives empty output for an empty file on some AIX systems.
2316   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2317   # Write a limited-size here document to conftest.frag.
2318   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2319   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2320   echo 'CEOF
2321   sed -f conftest.frag conftest.in > conftest.out
2322   rm -f conftest.in
2323   mv conftest.out conftest.in
2324 ' >> $CONFIG_STATUS
2325   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2326   rm -f conftest.vals
2327   mv conftest.tail conftest.vals
2328 done
2329 rm -f conftest.vals
2330
2331 cat >> $CONFIG_STATUS <<\EOF
2332   rm -f conftest.frag conftest.h
2333   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
2334   cat conftest.in >> conftest.h
2335   rm -f conftest.in
2336   if cmp -s $ac_file conftest.h 2>/dev/null; then
2337     echo "$ac_file is unchanged"
2338     rm -f conftest.h
2339   else
2340     # Remove last slash and all that follows it.  Not all systems have dirname.
2341       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2342       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2343       # The file is in a subdirectory.
2344       test ! -d "$ac_dir" && mkdir "$ac_dir"
2345     fi
2346     rm -f $ac_file
2347     mv conftest.h $ac_file
2348   fi
2349 fi; done
2350
2351 EOF
2352 cat >> $CONFIG_STATUS <<EOF
2353
2354
2355 EOF
2356 cat >> $CONFIG_STATUS <<\EOF
2357 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
2358
2359 exit 0
2360 EOF
2361 chmod +x $CONFIG_STATUS
2362 rm -fr confdefs* $ac_clean_files
2363 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2364