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