* Modified Makefile.am and configure.in so that wiretap isn't built unless
[obnox/wireshark/wip.git] / wiretap / 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=wtap.c
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 ac_aux_dir=
531 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
532   if test -f $ac_dir/install-sh; then
533     ac_aux_dir=$ac_dir
534     ac_install_sh="$ac_aux_dir/install-sh -c"
535     break
536   elif test -f $ac_dir/install.sh; then
537     ac_aux_dir=$ac_dir
538     ac_install_sh="$ac_aux_dir/install.sh -c"
539     break
540   fi
541 done
542 if test -z "$ac_aux_dir"; then
543   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
544 fi
545 ac_config_guess=$ac_aux_dir/config.guess
546 ac_config_sub=$ac_aux_dir/config.sub
547 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
548
549 # Find a good install program.  We prefer a C program (faster),
550 # so one script is as good as another.  But avoid the broken or
551 # incompatible versions:
552 # SysV /etc/install, /usr/sbin/install
553 # SunOS /usr/etc/install
554 # IRIX /sbin/install
555 # AIX /bin/install
556 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
557 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
558 # ./install, which can be erroneously created by make from ./install.sh.
559 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
560 echo "configure:561: checking for a BSD compatible install" >&5
561 if test -z "$INSTALL"; then
562 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
563   echo $ac_n "(cached) $ac_c" 1>&6
564 else
565     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
566   for ac_dir in $PATH; do
567     # Account for people who put trailing slashes in PATH elements.
568     case "$ac_dir/" in
569     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
570     *)
571       # OSF1 and SCO ODT 3.0 have their own names for install.
572       for ac_prog in ginstall installbsd scoinst install; do
573         if test -f $ac_dir/$ac_prog; then
574           if test $ac_prog = install &&
575             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
576             # AIX install.  It has an incompatible calling convention.
577             # OSF/1 installbsd also uses dspmsg, but is usable.
578             :
579           else
580             ac_cv_path_install="$ac_dir/$ac_prog -c"
581             break 2
582           fi
583         fi
584       done
585       ;;
586     esac
587   done
588   IFS="$ac_save_IFS"
589
590 fi
591   if test "${ac_cv_path_install+set}" = set; then
592     INSTALL="$ac_cv_path_install"
593   else
594     # As a last resort, use the slow shell script.  We don't cache a
595     # path for INSTALL within a source directory, because that will
596     # break other packages using the cache if that directory is
597     # removed, or if the path is relative.
598     INSTALL="$ac_install_sh"
599   fi
600 fi
601 echo "$ac_t""$INSTALL" 1>&6
602
603 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
604 # It thinks the first close brace ends the variable substitution.
605 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
606
607 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
608
609
610 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
611
612 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
613 echo "configure:614: checking whether build environment is sane" >&5
614 # Just in case
615 sleep 1
616 echo timestamp > conftestfile
617 # Do `set' in a subshell so we don't clobber the current shell's
618 # arguments.  Must try -L first in case configure is actually a
619 # symlink; some systems play weird games with the mod time of symlinks
620 # (eg FreeBSD returns the mod time of the symlink's containing
621 # directory).
622 if (
623    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
624    if test "$*" = "X"; then
625       # -L didn't work.
626       set X `ls -t $srcdir/configure conftestfile`
627    fi
628    if test "$*" != "X $srcdir/configure conftestfile" \
629       && test "$*" != "X conftestfile $srcdir/configure"; then
630
631       # If neither matched, then we have a broken ls.  This can happen
632       # if, for instance, CONFIG_SHELL is bash and it inherits a
633       # broken ls alias from the environment.  This has actually
634       # happened.  Such a system could not be considered "sane".
635       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
636 alias in your environment" 1>&2; exit 1; }
637    fi
638
639    test "$2" = conftestfile
640    )
641 then
642    # Ok.
643    :
644 else
645    { echo "configure: error: newly created file is older than distributed files!
646 Check your system clock" 1>&2; exit 1; }
647 fi
648 rm -f conftest*
649 echo "$ac_t""yes" 1>&6
650 if test "$program_transform_name" = s,x,x,; then
651   program_transform_name=
652 else
653   # Double any \ or $.  echo might interpret backslashes.
654   cat <<\EOF_SED > conftestsed
655 s,\\,\\\\,g; s,\$,$$,g
656 EOF_SED
657   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
658   rm -f conftestsed
659 fi
660 test "$program_prefix" != NONE &&
661   program_transform_name="s,^,${program_prefix},; $program_transform_name"
662 # Use a double $ so make ignores it.
663 test "$program_suffix" != NONE &&
664   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
665
666 # sed with no file args requires a program.
667 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
668
669 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
670 echo "configure:671: checking whether ${MAKE-make} sets \${MAKE}" >&5
671 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
672 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
673   echo $ac_n "(cached) $ac_c" 1>&6
674 else
675   cat > conftestmake <<\EOF
676 all:
677         @echo 'ac_maketemp="${MAKE}"'
678 EOF
679 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
680 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
681 if test -n "$ac_maketemp"; then
682   eval ac_cv_prog_make_${ac_make}_set=yes
683 else
684   eval ac_cv_prog_make_${ac_make}_set=no
685 fi
686 rm -f conftestmake
687 fi
688 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
689   echo "$ac_t""yes" 1>&6
690   SET_MAKE=
691 else
692   echo "$ac_t""no" 1>&6
693   SET_MAKE="MAKE=${MAKE-make}"
694 fi
695
696
697 PACKAGE=libwtap.a
698
699 VERSION=0.0.0
700
701 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
702   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
703 fi
704 cat >> confdefs.h <<EOF
705 #define PACKAGE "$PACKAGE"
706 EOF
707
708 cat >> confdefs.h <<EOF
709 #define VERSION "$VERSION"
710 EOF
711
712
713
714 missing_dir=`cd $ac_aux_dir && pwd`
715 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
716 echo "configure:717: checking for working aclocal" >&5
717 # Run test in a subshell; some versions of sh will print an error if
718 # an executable is not found, even if stderr is redirected.
719 # Redirect stdin to placate older versions of autoconf.  Sigh.
720 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
721    ACLOCAL=aclocal
722    echo "$ac_t""found" 1>&6
723 else
724    ACLOCAL="$missing_dir/missing aclocal"
725    echo "$ac_t""missing" 1>&6
726 fi
727
728 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
729 echo "configure:730: checking for working autoconf" >&5
730 # Run test in a subshell; some versions of sh will print an error if
731 # an executable is not found, even if stderr is redirected.
732 # Redirect stdin to placate older versions of autoconf.  Sigh.
733 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
734    AUTOCONF=autoconf
735    echo "$ac_t""found" 1>&6
736 else
737    AUTOCONF="$missing_dir/missing autoconf"
738    echo "$ac_t""missing" 1>&6
739 fi
740
741 echo $ac_n "checking for working automake""... $ac_c" 1>&6
742 echo "configure:743: checking for working automake" >&5
743 # Run test in a subshell; some versions of sh will print an error if
744 # an executable is not found, even if stderr is redirected.
745 # Redirect stdin to placate older versions of autoconf.  Sigh.
746 if (automake --version) < /dev/null > /dev/null 2>&1; then
747    AUTOMAKE=automake
748    echo "$ac_t""found" 1>&6
749 else
750    AUTOMAKE="$missing_dir/missing automake"
751    echo "$ac_t""missing" 1>&6
752 fi
753
754 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
755 echo "configure:756: checking for working autoheader" >&5
756 # Run test in a subshell; some versions of sh will print an error if
757 # an executable is not found, even if stderr is redirected.
758 # Redirect stdin to placate older versions of autoconf.  Sigh.
759 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
760    AUTOHEADER=autoheader
761    echo "$ac_t""found" 1>&6
762 else
763    AUTOHEADER="$missing_dir/missing autoheader"
764    echo "$ac_t""missing" 1>&6
765 fi
766
767 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
768 echo "configure:769: checking for working makeinfo" >&5
769 # Run test in a subshell; some versions of sh will print an error if
770 # an executable is not found, even if stderr is redirected.
771 # Redirect stdin to placate older versions of autoconf.  Sigh.
772 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
773    MAKEINFO=makeinfo
774    echo "$ac_t""found" 1>&6
775 else
776    MAKEINFO="$missing_dir/missing makeinfo"
777    echo "$ac_t""missing" 1>&6
778 fi
779
780
781
782
783
784
785 # Extract the first word of "gcc", so it can be a program name with args.
786 set dummy gcc; ac_word=$2
787 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
788 echo "configure:789: checking for $ac_word" >&5
789 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
790   echo $ac_n "(cached) $ac_c" 1>&6
791 else
792   if test -n "$CC"; then
793   ac_cv_prog_CC="$CC" # Let the user override the test.
794 else
795   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
796   for ac_dir in $PATH; do
797     test -z "$ac_dir" && ac_dir=.
798     if test -f $ac_dir/$ac_word; then
799       ac_cv_prog_CC="gcc"
800       break
801     fi
802   done
803   IFS="$ac_save_ifs"
804 fi
805 fi
806 CC="$ac_cv_prog_CC"
807 if test -n "$CC"; then
808   echo "$ac_t""$CC" 1>&6
809 else
810   echo "$ac_t""no" 1>&6
811 fi
812
813 if test -z "$CC"; then
814   # Extract the first word of "cc", so it can be a program name with args.
815 set dummy cc; ac_word=$2
816 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
817 echo "configure:818: checking for $ac_word" >&5
818 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
819   echo $ac_n "(cached) $ac_c" 1>&6
820 else
821   if test -n "$CC"; then
822   ac_cv_prog_CC="$CC" # Let the user override the test.
823 else
824   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
825   ac_prog_rejected=no
826   for ac_dir in $PATH; do
827     test -z "$ac_dir" && ac_dir=.
828     if test -f $ac_dir/$ac_word; then
829       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
830         ac_prog_rejected=yes
831         continue
832       fi
833       ac_cv_prog_CC="cc"
834       break
835     fi
836   done
837   IFS="$ac_save_ifs"
838 if test $ac_prog_rejected = yes; then
839   # We found a bogon in the path, so make sure we never use it.
840   set dummy $ac_cv_prog_CC
841   shift
842   if test $# -gt 0; then
843     # We chose a different compiler from the bogus one.
844     # However, it has the same basename, so the bogon will be chosen
845     # first if we set CC to just the basename; use the full file name.
846     shift
847     set dummy "$ac_dir/$ac_word" "$@"
848     shift
849     ac_cv_prog_CC="$@"
850   fi
851 fi
852 fi
853 fi
854 CC="$ac_cv_prog_CC"
855 if test -n "$CC"; then
856   echo "$ac_t""$CC" 1>&6
857 else
858   echo "$ac_t""no" 1>&6
859 fi
860
861   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
862 fi
863
864 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
865 echo "configure:866: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
866
867 ac_ext=c
868 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
869 ac_cpp='$CPP $CPPFLAGS'
870 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
871 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
872 cross_compiling=$ac_cv_prog_cc_cross
873
874 cat > conftest.$ac_ext <<EOF
875 #line 876 "configure"
876 #include "confdefs.h"
877 main(){return(0);}
878 EOF
879 if { (eval echo configure:880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
880   ac_cv_prog_cc_works=yes
881   # If we can't run a trivial program, we are probably using a cross compiler.
882   if (./conftest; exit) 2>/dev/null; then
883     ac_cv_prog_cc_cross=no
884   else
885     ac_cv_prog_cc_cross=yes
886   fi
887 else
888   echo "configure: failed program was:" >&5
889   cat conftest.$ac_ext >&5
890   ac_cv_prog_cc_works=no
891 fi
892 rm -fr conftest*
893
894 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
895 if test $ac_cv_prog_cc_works = no; then
896   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
897 fi
898 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
899 echo "configure:900: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
900 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
901 cross_compiling=$ac_cv_prog_cc_cross
902
903 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
904 echo "configure:905: checking whether we are using GNU C" >&5
905 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
906   echo $ac_n "(cached) $ac_c" 1>&6
907 else
908   cat > conftest.c <<EOF
909 #ifdef __GNUC__
910   yes;
911 #endif
912 EOF
913 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:914: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
914   ac_cv_prog_gcc=yes
915 else
916   ac_cv_prog_gcc=no
917 fi
918 fi
919
920 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
921
922 if test $ac_cv_prog_gcc = yes; then
923   GCC=yes
924   ac_test_CFLAGS="${CFLAGS+set}"
925   ac_save_CFLAGS="$CFLAGS"
926   CFLAGS=
927   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
928 echo "configure:929: checking whether ${CC-cc} accepts -g" >&5
929 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
930   echo $ac_n "(cached) $ac_c" 1>&6
931 else
932   echo 'void f(){}' > conftest.c
933 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
934   ac_cv_prog_cc_g=yes
935 else
936   ac_cv_prog_cc_g=no
937 fi
938 rm -f conftest*
939
940 fi
941
942 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
943   if test "$ac_test_CFLAGS" = set; then
944     CFLAGS="$ac_save_CFLAGS"
945   elif test $ac_cv_prog_cc_g = yes; then
946     CFLAGS="-g -O2"
947   else
948     CFLAGS="-O2"
949   fi
950 else
951   GCC=
952   test "${CFLAGS+set}" = set || CFLAGS="-g"
953 fi
954
955 # Extract the first word of "ranlib", so it can be a program name with args.
956 set dummy ranlib; ac_word=$2
957 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
958 echo "configure:959: checking for $ac_word" >&5
959 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
960   echo $ac_n "(cached) $ac_c" 1>&6
961 else
962   if test -n "$RANLIB"; then
963   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
964 else
965   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
966   for ac_dir in $PATH; do
967     test -z "$ac_dir" && ac_dir=.
968     if test -f $ac_dir/$ac_word; then
969       ac_cv_prog_RANLIB="ranlib"
970       break
971     fi
972   done
973   IFS="$ac_save_ifs"
974   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
975 fi
976 fi
977 RANLIB="$ac_cv_prog_RANLIB"
978 if test -n "$RANLIB"; then
979   echo "$ac_t""$RANLIB" 1>&6
980 else
981   echo "$ac_t""no" 1>&6
982 fi
983
984
985 # If we're running gcc, add '-Wall' to CFLAGS.
986 echo $ac_n "checking to see if we can add '-Wall' to CFLAGS""... $ac_c" 1>&6
987 echo "configure:988: checking to see if we can add '-Wall' to CFLAGS" >&5
988 if test x$GCC != x ; then
989   CFLAGS="-Wall $CFLAGS"
990   echo "$ac_t""yes" 1>&6
991 else
992   echo "$ac_t""no" 1>&6
993 fi
994
995 # GTK checks (copied from ethereal)
996 # Check whether --with-gtk-prefix or --without-gtk-prefix was given.
997 if test "${with_gtk_prefix+set}" = set; then
998   withval="$with_gtk_prefix"
999   gtk_config_prefix="$withval"
1000 else
1001   gtk_config_prefix=""
1002 fi
1003
1004 # Check whether --with-gtk-exec-prefix or --without-gtk-exec-prefix was given.
1005 if test "${with_gtk_exec_prefix+set}" = set; then
1006   withval="$with_gtk_exec_prefix"
1007   gtk_config_exec_prefix="$withval"
1008 else
1009   gtk_config_exec_prefix=""
1010 fi
1011
1012 # Check whether --enable-gtktest or --disable-gtktest was given.
1013 if test "${enable_gtktest+set}" = set; then
1014   enableval="$enable_gtktest"
1015   :
1016 else
1017   enable_gtktest=yes
1018 fi
1019
1020
1021   if test x$gtk_config_exec_prefix != x ; then
1022      gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
1023      if test x${GTK_CONFIG+set} != xset ; then
1024         GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
1025      fi
1026   fi
1027   if test x$gtk_config_prefix != x ; then
1028      gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
1029      if test x${GTK_CONFIG+set} != xset ; then
1030         GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
1031      fi
1032   fi
1033
1034   # Extract the first word of "gtk-config", so it can be a program name with args.
1035 set dummy gtk-config; ac_word=$2
1036 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1037 echo "configure:1038: checking for $ac_word" >&5
1038 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
1039   echo $ac_n "(cached) $ac_c" 1>&6
1040 else
1041   case "$GTK_CONFIG" in
1042   /*)
1043   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
1044   ;;
1045   *)
1046   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1047   for ac_dir in $PATH; do
1048     test -z "$ac_dir" && ac_dir=.
1049     if test -f $ac_dir/$ac_word; then
1050       ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
1051       break
1052     fi
1053   done
1054   IFS="$ac_save_ifs"
1055   test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
1056   ;;
1057 esac
1058 fi
1059 GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
1060 if test -n "$GTK_CONFIG"; then
1061   echo "$ac_t""$GTK_CONFIG" 1>&6
1062 else
1063   echo "$ac_t""no" 1>&6
1064 fi
1065
1066   min_gtk_version=1.0.0
1067   echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6
1068 echo "configure:1069: checking for GTK - version >= $min_gtk_version" >&5
1069   no_gtk=""
1070   if test "$GTK_CONFIG" = "no" ; then
1071     no_gtk=yes
1072   else
1073     GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
1074     GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
1075     gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
1076            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
1077     gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
1078            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
1079     gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
1080            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
1081     if test "x$enable_gtktest" = "xyes" ; then
1082       ac_save_CFLAGS="$CFLAGS"
1083       ac_save_LIBS="$LIBS"
1084       CFLAGS="$CFLAGS $GTK_CFLAGS"
1085       LIBS="$LIBS $GTK_LIBS"
1086       rm -f conf.gtktest
1087       if test "$cross_compiling" = yes; then
1088   echo $ac_n "cross compiling; assumed OK... $ac_c"
1089 else
1090   cat > conftest.$ac_ext <<EOF
1091 #line 1092 "configure"
1092 #include "confdefs.h"
1093
1094 #include <gtk/gtk.h>
1095 #include <stdio.h>
1096
1097 int 
1098 main ()
1099 {
1100   int major, minor, micro;
1101
1102   system ("touch conf.gtktest");
1103
1104   if (sscanf("$min_gtk_version", "%d.%d.%d", &major, &minor, &micro) != 3) {
1105      printf("%s, bad version string\n", "$min_gtk_version");
1106      exit(1);
1107    }
1108
1109   if ((gtk_major_version != $gtk_config_major_version) ||
1110       (gtk_minor_version != $gtk_config_minor_version) ||
1111       (gtk_micro_version != $gtk_config_micro_version))
1112     {
1113       printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", 
1114              $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
1115              gtk_major_version, gtk_minor_version, gtk_micro_version);
1116       printf ("*** was found! If gtk-config was correct, then it is best\n");
1117       printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
1118       printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
1119       printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
1120       printf("*** required on your system.\n");
1121       printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
1122       printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
1123       printf("*** before re-running configure\n");
1124     } 
1125   else
1126     {
1127       if ((gtk_major_version > major) ||
1128         ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
1129         ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
1130       {
1131         return 0;
1132        }
1133      else
1134       {
1135         printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
1136                gtk_major_version, gtk_minor_version, gtk_micro_version);
1137         printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
1138                major, minor, micro);
1139         printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
1140         printf("***\n");
1141         printf("*** If you have already installed a sufficiently new version, this error\n");
1142         printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
1143         printf("*** being found. The easiest way to fix this is to remove the old version\n");
1144         printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
1145         printf("*** correct copy of gtk-config. (In this case, you will have to\n");
1146         printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
1147         printf("*** so that the correct libraries are found at run-time))\n");
1148       }
1149     }
1150   return 1;
1151 }
1152
1153 EOF
1154 if { (eval echo configure:1155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1155 then
1156   :
1157 else
1158   echo "configure: failed program was:" >&5
1159   cat conftest.$ac_ext >&5
1160   rm -fr conftest*
1161   no_gtk=yes
1162 fi
1163 rm -fr conftest*
1164 fi
1165
1166        CFLAGS="$ac_save_CFLAGS"
1167        LIBS="$ac_save_LIBS"
1168      fi
1169   fi
1170   if test "x$no_gtk" = x ; then
1171      echo "$ac_t""yes" 1>&6
1172      CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS"     
1173   else
1174      echo "$ac_t""no" 1>&6
1175      if test "$GTK_CONFIG" = "no" ; then
1176        echo "*** The gtk-config script installed by GTK could not be found"
1177        echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
1178        echo "*** your path, or set the GTK_CONFIG environment variable to the"
1179        echo "*** full path to gtk-config."
1180      else
1181        if test -f conf.gtktest ; then
1182         :
1183        else
1184           echo "*** Could not run GTK test program, checking why..."
1185           CFLAGS="$CFLAGS $GTK_CFLAGS"
1186           LIBS="$LIBS $GTK_LIBS"
1187           cat > conftest.$ac_ext <<EOF
1188 #line 1189 "configure"
1189 #include "confdefs.h"
1190
1191 #include <gtk/gtk.h>
1192 #include <stdio.h>
1193
1194 int main() {
1195  return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); 
1196 ; return 0; }
1197 EOF
1198 if { (eval echo configure:1199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1199   rm -rf conftest*
1200    echo "*** The test program compiled, but did not run. This usually means"
1201           echo "*** that the run-time linker is not finding GTK or finding the wrong"
1202           echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
1203           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
1204           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
1205           echo "*** is required on your system"
1206           echo "***"
1207           echo "*** If you have an old version installed, it is best to remove it, although"
1208           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
1209           echo "***"
1210           echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
1211           echo "*** came with the system with the command"
1212           echo "***"
1213           echo "***    rpm --erase --nodeps gtk gtk-devel" 
1214 else
1215   echo "configure: failed program was:" >&5
1216   cat conftest.$ac_ext >&5
1217   rm -rf conftest*
1218    echo "*** The test program failed to compile or link. See the file config.log for the"
1219           echo "*** exact error that occured. This usually means GTK was incorrectly installed"
1220           echo "*** or that you have moved GTK since it was installed. In the latter case, you"
1221           echo "*** may want to edit the gtk-config script: $GTK_CONFIG" 
1222 fi
1223 rm -f conftest*
1224           CFLAGS="$ac_save_CFLAGS"
1225           LIBS="$ac_save_LIBS"
1226        fi
1227      fi
1228      GTK_CFLAGS=""
1229      GTK_LIBS=""
1230      { echo "configure: error: GTK+ distribution not found." 1>&2; exit 1; }
1231   fi
1232   
1233   
1234   rm -f conf.gtktest
1235
1236
1237 # Wiretap check (copied and modified from ethereal)
1238 echo $ac_n "checking whether to include wiretap library""... $ac_c" 1>&6
1239 echo "configure:1240: checking whether to include wiretap library" >&5
1240 # Check whether --with-wiretap or --without-wiretap was given.
1241 if test "${with_wiretap+set}" = set; then
1242   withval="$with_wiretap"
1243    case "$withval" in
1244                 yes)
1245                         echo "$ac_t""yes" 1>&6
1246                         LIBWIRETAP_A="libwiretap.a"
1247                         ;;
1248                 *)
1249                         echo "$ac_t""no" 1>&6
1250                         LIBWIRETAP_A=""
1251                         ;;
1252         esac 
1253 else
1254   echo "$ac_t""no" 1>&6
1255
1256 fi
1257
1258
1259
1260 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1261 echo "configure:1262: checking how to run the C preprocessor" >&5
1262 # On Suns, sometimes $CPP names a directory.
1263 if test -n "$CPP" && test -d "$CPP"; then
1264   CPP=
1265 fi
1266 if test -z "$CPP"; then
1267 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1268   echo $ac_n "(cached) $ac_c" 1>&6
1269 else
1270     # This must be in double quotes, not single quotes, because CPP may get
1271   # substituted into the Makefile and "${CC-cc}" will confuse make.
1272   CPP="${CC-cc} -E"
1273   # On the NeXT, cc -E runs the code through the compiler's parser,
1274   # not just through cpp.
1275   cat > conftest.$ac_ext <<EOF
1276 #line 1277 "configure"
1277 #include "confdefs.h"
1278 #include <assert.h>
1279 Syntax Error
1280 EOF
1281 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1282 { (eval echo configure:1283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1283 ac_err=`grep -v '^ *+' conftest.out`
1284 if test -z "$ac_err"; then
1285   :
1286 else
1287   echo "$ac_err" >&5
1288   echo "configure: failed program was:" >&5
1289   cat conftest.$ac_ext >&5
1290   rm -rf conftest*
1291   CPP="${CC-cc} -E -traditional-cpp"
1292   cat > conftest.$ac_ext <<EOF
1293 #line 1294 "configure"
1294 #include "confdefs.h"
1295 #include <assert.h>
1296 Syntax Error
1297 EOF
1298 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1299 { (eval echo configure:1300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1300 ac_err=`grep -v '^ *+' conftest.out`
1301 if test -z "$ac_err"; then
1302   :
1303 else
1304   echo "$ac_err" >&5
1305   echo "configure: failed program was:" >&5
1306   cat conftest.$ac_ext >&5
1307   rm -rf conftest*
1308   CPP=/lib/cpp
1309 fi
1310 rm -f conftest*
1311 fi
1312 rm -f conftest*
1313   ac_cv_prog_CPP="$CPP"
1314 fi
1315   CPP="$ac_cv_prog_CPP"
1316 else
1317   ac_cv_prog_CPP="$CPP"
1318 fi
1319 echo "$ac_t""$CPP" 1>&6
1320
1321 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1322 echo "configure:1323: checking for ANSI C header files" >&5
1323 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1324   echo $ac_n "(cached) $ac_c" 1>&6
1325 else
1326   cat > conftest.$ac_ext <<EOF
1327 #line 1328 "configure"
1328 #include "confdefs.h"
1329 #include <stdlib.h>
1330 #include <stdarg.h>
1331 #include <string.h>
1332 #include <float.h>
1333 EOF
1334 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1335 { (eval echo configure:1336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1336 ac_err=`grep -v '^ *+' conftest.out`
1337 if test -z "$ac_err"; then
1338   rm -rf conftest*
1339   ac_cv_header_stdc=yes
1340 else
1341   echo "$ac_err" >&5
1342   echo "configure: failed program was:" >&5
1343   cat conftest.$ac_ext >&5
1344   rm -rf conftest*
1345   ac_cv_header_stdc=no
1346 fi
1347 rm -f conftest*
1348
1349 if test $ac_cv_header_stdc = yes; then
1350   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1351 cat > conftest.$ac_ext <<EOF
1352 #line 1353 "configure"
1353 #include "confdefs.h"
1354 #include <string.h>
1355 EOF
1356 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1357   egrep "memchr" >/dev/null 2>&1; then
1358   :
1359 else
1360   rm -rf conftest*
1361   ac_cv_header_stdc=no
1362 fi
1363 rm -f conftest*
1364
1365 fi
1366
1367 if test $ac_cv_header_stdc = yes; then
1368   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1369 cat > conftest.$ac_ext <<EOF
1370 #line 1371 "configure"
1371 #include "confdefs.h"
1372 #include <stdlib.h>
1373 EOF
1374 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1375   egrep "free" >/dev/null 2>&1; then
1376   :
1377 else
1378   rm -rf conftest*
1379   ac_cv_header_stdc=no
1380 fi
1381 rm -f conftest*
1382
1383 fi
1384
1385 if test $ac_cv_header_stdc = yes; then
1386   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1387 if test "$cross_compiling" = yes; then
1388   :
1389 else
1390   cat > conftest.$ac_ext <<EOF
1391 #line 1392 "configure"
1392 #include "confdefs.h"
1393 #include <ctype.h>
1394 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1395 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1396 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1397 int main () { int i; for (i = 0; i < 256; i++)
1398 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1399 exit (0); }
1400
1401 EOF
1402 if { (eval echo configure:1403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1403 then
1404   :
1405 else
1406   echo "configure: failed program was:" >&5
1407   cat conftest.$ac_ext >&5
1408   rm -fr conftest*
1409   ac_cv_header_stdc=no
1410 fi
1411 rm -fr conftest*
1412 fi
1413
1414 fi
1415 fi
1416
1417 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1418 if test $ac_cv_header_stdc = yes; then
1419   cat >> confdefs.h <<\EOF
1420 #define STDC_HEADERS 1
1421 EOF
1422
1423 fi
1424
1425 for ac_hdr in unistd.h
1426 do
1427 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1428 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1429 echo "configure:1430: checking for $ac_hdr" >&5
1430 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+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 <$ac_hdr>
1437 EOF
1438 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1439 { (eval echo configure:1440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1440 ac_err=`grep -v '^ *+' conftest.out`
1441 if test -z "$ac_err"; then
1442   rm -rf conftest*
1443   eval "ac_cv_header_$ac_safe=yes"
1444 else
1445   echo "$ac_err" >&5
1446   echo "configure: failed program was:" >&5
1447   cat conftest.$ac_ext >&5
1448   rm -rf conftest*
1449   eval "ac_cv_header_$ac_safe=no"
1450 fi
1451 rm -f conftest*
1452 fi
1453 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1454   echo "$ac_t""yes" 1>&6
1455     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1456   cat >> confdefs.h <<EOF
1457 #define $ac_tr_hdr 1
1458 EOF
1459  
1460 else
1461   echo "$ac_t""no" 1>&6
1462 fi
1463 done
1464
1465
1466 trap '' 1 2 15
1467 cat > confcache <<\EOF
1468 # This file is a shell script that caches the results of configure
1469 # tests run on this system so they can be shared between configure
1470 # scripts and configure runs.  It is not useful on other systems.
1471 # If it contains results you don't want to keep, you may remove or edit it.
1472 #
1473 # By default, configure uses ./config.cache as the cache file,
1474 # creating it if it does not exist already.  You can give configure
1475 # the --cache-file=FILE option to use a different cache file; that is
1476 # what configure does when it calls configure scripts in
1477 # subdirectories, so they share the cache.
1478 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1479 # config.status only pays attention to the cache file if you give it the
1480 # --recheck option to rerun configure.
1481 #
1482 EOF
1483 # The following way of writing the cache mishandles newlines in values,
1484 # but we know of no workaround that is simple, portable, and efficient.
1485 # So, don't put newlines in cache variables' values.
1486 # Ultrix sh set writes to stderr and can't be redirected directly,
1487 # and sets the high bit in the cache file unless we assign to the vars.
1488 (set) 2>&1 |
1489   case `(ac_space=' '; set) 2>&1` in
1490   *ac_space=\ *)
1491     # `set' does not quote correctly, so add quotes (double-quote substitution
1492     # turns \\\\ into \\, and sed turns \\ into \).
1493     sed -n \
1494       -e "s/'/'\\\\''/g" \
1495       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1496     ;;
1497   *)
1498     # `set' quotes correctly as required by POSIX, so do not add quotes.
1499     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1500     ;;
1501   esac >> confcache
1502 if cmp -s $cache_file confcache; then
1503   :
1504 else
1505   if test -w $cache_file; then
1506     echo "updating cache $cache_file"
1507     cat confcache > $cache_file
1508   else
1509     echo "not updating unwritable cache $cache_file"
1510   fi
1511 fi
1512 rm -f confcache
1513
1514 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1515
1516 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1517 # Let make expand exec_prefix.
1518 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1519
1520 # Any assignment to VPATH causes Sun make to only execute
1521 # the first set of double-colon rules, so remove it if not needed.
1522 # If there is a colon in the path, we need to keep it.
1523 if test "x$srcdir" = x.; then
1524   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
1525 fi
1526
1527 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1528
1529 DEFS=-DHAVE_CONFIG_H
1530
1531 # Without the "./", some shells look in PATH for config.status.
1532 : ${CONFIG_STATUS=./config.status}
1533
1534 echo creating $CONFIG_STATUS
1535 rm -f $CONFIG_STATUS
1536 cat > $CONFIG_STATUS <<EOF
1537 #! /bin/sh
1538 # Generated automatically by configure.
1539 # Run this file to recreate the current configuration.
1540 # This directory was configured as follows,
1541 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1542 #
1543 # $0 $ac_configure_args
1544 #
1545 # Compiler output produced by configure, useful for debugging
1546 # configure, is in ./config.log if it exists.
1547
1548 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1549 for ac_option
1550 do
1551   case "\$ac_option" in
1552   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1553     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1554     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1555   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1556     echo "$CONFIG_STATUS generated by autoconf version 2.12"
1557     exit 0 ;;
1558   -help | --help | --hel | --he | --h)
1559     echo "\$ac_cs_usage"; exit 0 ;;
1560   *) echo "\$ac_cs_usage"; exit 1 ;;
1561   esac
1562 done
1563
1564 ac_given_srcdir=$srcdir
1565 ac_given_INSTALL="$INSTALL"
1566
1567 trap 'rm -fr `echo "Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1568 EOF
1569 cat >> $CONFIG_STATUS <<EOF
1570
1571 # Protect against being on the right side of a sed subst in config.status.
1572 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1573  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
1574 $ac_vpsub
1575 $extrasub
1576 s%@CFLAGS@%$CFLAGS%g
1577 s%@CPPFLAGS@%$CPPFLAGS%g
1578 s%@CXXFLAGS@%$CXXFLAGS%g
1579 s%@DEFS@%$DEFS%g
1580 s%@LDFLAGS@%$LDFLAGS%g
1581 s%@LIBS@%$LIBS%g
1582 s%@exec_prefix@%$exec_prefix%g
1583 s%@prefix@%$prefix%g
1584 s%@program_transform_name@%$program_transform_name%g
1585 s%@bindir@%$bindir%g
1586 s%@sbindir@%$sbindir%g
1587 s%@libexecdir@%$libexecdir%g
1588 s%@datadir@%$datadir%g
1589 s%@sysconfdir@%$sysconfdir%g
1590 s%@sharedstatedir@%$sharedstatedir%g
1591 s%@localstatedir@%$localstatedir%g
1592 s%@libdir@%$libdir%g
1593 s%@includedir@%$includedir%g
1594 s%@oldincludedir@%$oldincludedir%g
1595 s%@infodir@%$infodir%g
1596 s%@mandir@%$mandir%g
1597 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
1598 s%@INSTALL_DATA@%$INSTALL_DATA%g
1599 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
1600 s%@PACKAGE@%$PACKAGE%g
1601 s%@VERSION@%$VERSION%g
1602 s%@ACLOCAL@%$ACLOCAL%g
1603 s%@AUTOCONF@%$AUTOCONF%g
1604 s%@AUTOMAKE@%$AUTOMAKE%g
1605 s%@AUTOHEADER@%$AUTOHEADER%g
1606 s%@MAKEINFO@%$MAKEINFO%g
1607 s%@SET_MAKE@%$SET_MAKE%g
1608 s%@CC@%$CC%g
1609 s%@RANLIB@%$RANLIB%g
1610 s%@GTK_CONFIG@%$GTK_CONFIG%g
1611 s%@GTK_CFLAGS@%$GTK_CFLAGS%g
1612 s%@GTK_LIBS@%$GTK_LIBS%g
1613 s%@LIBWIRETAP_A@%$LIBWIRETAP_A%g
1614 s%@CPP@%$CPP%g
1615
1616 CEOF
1617 EOF
1618
1619 cat >> $CONFIG_STATUS <<\EOF
1620
1621 # Split the substitutions into bite-sized pieces for seds with
1622 # small command number limits, like on Digital OSF/1 and HP-UX.
1623 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
1624 ac_file=1 # Number of current file.
1625 ac_beg=1 # First line for current file.
1626 ac_end=$ac_max_sed_cmds # Line after last line for current file.
1627 ac_more_lines=:
1628 ac_sed_cmds=""
1629 while $ac_more_lines; do
1630   if test $ac_beg -gt 1; then
1631     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
1632   else
1633     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
1634   fi
1635   if test ! -s conftest.s$ac_file; then
1636     ac_more_lines=false
1637     rm -f conftest.s$ac_file
1638   else
1639     if test -z "$ac_sed_cmds"; then
1640       ac_sed_cmds="sed -f conftest.s$ac_file"
1641     else
1642       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
1643     fi
1644     ac_file=`expr $ac_file + 1`
1645     ac_beg=$ac_end
1646     ac_end=`expr $ac_end + $ac_max_sed_cmds`
1647   fi
1648 done
1649 if test -z "$ac_sed_cmds"; then
1650   ac_sed_cmds=cat
1651 fi
1652 EOF
1653
1654 cat >> $CONFIG_STATUS <<EOF
1655
1656 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
1657 EOF
1658 cat >> $CONFIG_STATUS <<\EOF
1659 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1660   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
1661   case "$ac_file" in
1662   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
1663        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1664   *) ac_file_in="${ac_file}.in" ;;
1665   esac
1666
1667   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
1668
1669   # Remove last slash and all that follows it.  Not all systems have dirname.
1670   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1671   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1672     # The file is in a subdirectory.
1673     test ! -d "$ac_dir" && mkdir "$ac_dir"
1674     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1675     # A "../" for each directory in $ac_dir_suffix.
1676     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1677   else
1678     ac_dir_suffix= ac_dots=
1679   fi
1680
1681   case "$ac_given_srcdir" in
1682   .)  srcdir=.
1683       if test -z "$ac_dots"; then top_srcdir=.
1684       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1685   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1686   *) # Relative path.
1687     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1688     top_srcdir="$ac_dots$ac_given_srcdir" ;;
1689   esac
1690
1691   case "$ac_given_INSTALL" in
1692   [/$]*) INSTALL="$ac_given_INSTALL" ;;
1693   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
1694   esac
1695
1696   echo creating "$ac_file"
1697   rm -f "$ac_file"
1698   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1699   case "$ac_file" in
1700   *Makefile*) ac_comsub="1i\\
1701 # $configure_input" ;;
1702   *) ac_comsub= ;;
1703   esac
1704
1705   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
1706   sed -e "$ac_comsub
1707 s%@configure_input@%$configure_input%g
1708 s%@srcdir@%$srcdir%g
1709 s%@top_srcdir@%$top_srcdir%g
1710 s%@INSTALL@%$INSTALL%g
1711 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
1712 fi; done
1713 rm -f conftest.s*
1714
1715 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
1716 # NAME is the cpp macro being defined and VALUE is the value it is being given.
1717 #
1718 # ac_d sets the value in "#define NAME VALUE" lines.
1719 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
1720 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
1721 ac_dC='\3'
1722 ac_dD='%g'
1723 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
1724 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
1725 ac_uB='\([      ]\)%\1#\2define\3'
1726 ac_uC=' '
1727 ac_uD='\4%g'
1728 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
1729 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
1730 ac_eB='$%\1#\2define\3'
1731 ac_eC=' '
1732 ac_eD='%g'
1733
1734 if test "${CONFIG_HEADERS+set}" != set; then
1735 EOF
1736 cat >> $CONFIG_STATUS <<EOF
1737   CONFIG_HEADERS="config.h"
1738 EOF
1739 cat >> $CONFIG_STATUS <<\EOF
1740 fi
1741 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
1742   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
1743   case "$ac_file" in
1744   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
1745        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1746   *) ac_file_in="${ac_file}.in" ;;
1747   esac
1748
1749   echo creating $ac_file
1750
1751   rm -f conftest.frag conftest.in conftest.out
1752   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
1753   cat $ac_file_inputs > conftest.in
1754
1755 EOF
1756
1757 # Transform confdefs.h into a sed script conftest.vals that substitutes
1758 # the proper values into config.h.in to produce config.h.  And first:
1759 # Protect against being on the right side of a sed subst in config.status.
1760 # Protect against being in an unquoted here document in config.status.
1761 rm -f conftest.vals
1762 cat > conftest.hdr <<\EOF
1763 s/[\\&%]/\\&/g
1764 s%[\\$`]%\\&%g
1765 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
1766 s%ac_d%ac_u%gp
1767 s%ac_u%ac_e%gp
1768 EOF
1769 sed -n -f conftest.hdr confdefs.h > conftest.vals
1770 rm -f conftest.hdr
1771
1772 # This sed command replaces #undef with comments.  This is necessary, for
1773 # example, in the case of _POSIX_SOURCE, which is predefined and required
1774 # on some systems where configure will not decide to define it.
1775 cat >> conftest.vals <<\EOF
1776 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
1777 EOF
1778
1779 # Break up conftest.vals because some shells have a limit on
1780 # the size of here documents, and old seds have small limits too.
1781
1782 rm -f conftest.tail
1783 while :
1784 do
1785   ac_lines=`grep -c . conftest.vals`
1786   # grep -c gives empty output for an empty file on some AIX systems.
1787   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
1788   # Write a limited-size here document to conftest.frag.
1789   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
1790   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
1791   echo 'CEOF
1792   sed -f conftest.frag conftest.in > conftest.out
1793   rm -f conftest.in
1794   mv conftest.out conftest.in
1795 ' >> $CONFIG_STATUS
1796   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
1797   rm -f conftest.vals
1798   mv conftest.tail conftest.vals
1799 done
1800 rm -f conftest.vals
1801
1802 cat >> $CONFIG_STATUS <<\EOF
1803   rm -f conftest.frag conftest.h
1804   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
1805   cat conftest.in >> conftest.h
1806   rm -f conftest.in
1807   if cmp -s $ac_file conftest.h 2>/dev/null; then
1808     echo "$ac_file is unchanged"
1809     rm -f conftest.h
1810   else
1811     # Remove last slash and all that follows it.  Not all systems have dirname.
1812       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1813       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1814       # The file is in a subdirectory.
1815       test ! -d "$ac_dir" && mkdir "$ac_dir"
1816     fi
1817     rm -f $ac_file
1818     mv conftest.h $ac_file
1819   fi
1820 fi; done
1821
1822 EOF
1823 cat >> $CONFIG_STATUS <<EOF
1824
1825
1826 EOF
1827 cat >> $CONFIG_STATUS <<\EOF
1828 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
1829
1830 exit 0
1831 EOF
1832 chmod +x $CONFIG_STATUS
1833 rm -fr confdefs* $ac_clean_files
1834 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
1835