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