]> sjero.net Git - wget/blob - configure
[svn] Committed C. Frankel's SSL patch.
[wget] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --with-socks            use the socks library"
16 ac_help="$ac_help
17   --with-ssl              use the openssl library"
18 ac_help="$ac_help
19   --disable-opie          disable support for opie or s/key FTP login"
20 ac_help="$ac_help
21   --disable-digest        disable support for HTTP digest authorization"
22 ac_help="$ac_help
23   --disable-debug         disable support for debugging output"
24 ac_help="$ac_help
25   --disable-nls           do not use Native Language Support"
26
27 # Initialize some variables set by options.
28 # The variables have the same names as the options, with
29 # dashes changed to underlines.
30 build=NONE
31 cache_file=./config.cache
32 exec_prefix=NONE
33 host=NONE
34 no_create=
35 nonopt=NONE
36 no_recursion=
37 prefix=NONE
38 program_prefix=NONE
39 program_suffix=NONE
40 program_transform_name=s,x,x,
41 silent=
42 site=
43 srcdir=
44 target=NONE
45 verbose=
46 x_includes=NONE
47 x_libraries=NONE
48 bindir='${exec_prefix}/bin'
49 sbindir='${exec_prefix}/sbin'
50 libexecdir='${exec_prefix}/libexec'
51 datadir='${prefix}/share'
52 sysconfdir='${prefix}/etc'
53 sharedstatedir='${prefix}/com'
54 localstatedir='${prefix}/var'
55 libdir='${exec_prefix}/lib'
56 includedir='${prefix}/include'
57 oldincludedir='/usr/include'
58 infodir='${prefix}/info'
59 mandir='${prefix}/man'
60
61 # Initialize some other variables.
62 subdirs=
63 MFLAGS= MAKEFLAGS=
64 SHELL=${CONFIG_SHELL-/bin/sh}
65 # Maximum number of lines to put in a shell here document.
66 ac_max_here_lines=12
67
68 ac_prev=
69 for ac_option
70 do
71
72   # If the previous option needs an argument, assign it.
73   if test -n "$ac_prev"; then
74     eval "$ac_prev=\$ac_option"
75     ac_prev=
76     continue
77   fi
78
79   case "$ac_option" in
80   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
81   *) ac_optarg= ;;
82   esac
83
84   # Accept the important Cygnus configure options, so we can diagnose typos.
85
86   case "$ac_option" in
87
88   -bindir | --bindir | --bindi | --bind | --bin | --bi)
89     ac_prev=bindir ;;
90   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
91     bindir="$ac_optarg" ;;
92
93   -build | --build | --buil | --bui | --bu)
94     ac_prev=build ;;
95   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
96     build="$ac_optarg" ;;
97
98   -cache-file | --cache-file | --cache-fil | --cache-fi \
99   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
100     ac_prev=cache_file ;;
101   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
102   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
103     cache_file="$ac_optarg" ;;
104
105   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
106     ac_prev=datadir ;;
107   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
108   | --da=*)
109     datadir="$ac_optarg" ;;
110
111   -disable-* | --disable-*)
112     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
113     # Reject names that are not valid shell variable names.
114     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
115       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
116     fi
117     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
118     eval "enable_${ac_feature}=no" ;;
119
120   -enable-* | --enable-*)
121     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
122     # Reject names that are not valid shell variable names.
123     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
124       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
125     fi
126     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
127     case "$ac_option" in
128       *=*) ;;
129       *) ac_optarg=yes ;;
130     esac
131     eval "enable_${ac_feature}='$ac_optarg'" ;;
132
133   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
134   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
135   | --exec | --exe | --ex)
136     ac_prev=exec_prefix ;;
137   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
138   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
139   | --exec=* | --exe=* | --ex=*)
140     exec_prefix="$ac_optarg" ;;
141
142   -gas | --gas | --ga | --g)
143     # Obsolete; use --with-gas.
144     with_gas=yes ;;
145
146   -help | --help | --hel | --he)
147     # Omit some internal or obsolete options to make the list less imposing.
148     # This message is too long to be a string in the A/UX 3.1 sh.
149     cat << EOF
150 Usage: configure [options] [host]
151 Options: [defaults in brackets after descriptions]
152 Configuration:
153   --cache-file=FILE       cache test results in FILE
154   --help                  print this message
155   --no-create             do not create output files
156   --quiet, --silent       do not print \`checking...' messages
157   --version               print the version of autoconf that created configure
158 Directory and file names:
159   --prefix=PREFIX         install architecture-independent files in PREFIX
160                           [$ac_default_prefix]
161   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
162                           [same as prefix]
163   --bindir=DIR            user executables in DIR [EPREFIX/bin]
164   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
165   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
166   --datadir=DIR           read-only architecture-independent data in DIR
167                           [PREFIX/share]
168   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
169   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
170                           [PREFIX/com]
171   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
172   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
173   --includedir=DIR        C header files in DIR [PREFIX/include]
174   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
175   --infodir=DIR           info documentation in DIR [PREFIX/info]
176   --mandir=DIR            man documentation in DIR [PREFIX/man]
177   --srcdir=DIR            find the sources in DIR [configure dir or ..]
178   --program-prefix=PREFIX prepend PREFIX to installed program names
179   --program-suffix=SUFFIX append SUFFIX to installed program names
180   --program-transform-name=PROGRAM
181                           run sed PROGRAM on installed program names
182 EOF
183     cat << EOF
184 Host type:
185   --build=BUILD           configure for building on BUILD [BUILD=HOST]
186   --host=HOST             configure for HOST [guessed]
187   --target=TARGET         configure for TARGET [TARGET=HOST]
188 Features and packages:
189   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
190   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
191   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
192   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
193   --x-includes=DIR        X include files are in DIR
194   --x-libraries=DIR       X library files are in DIR
195 EOF
196     if test -n "$ac_help"; then
197       echo "--enable and --with options recognized:$ac_help"
198     fi
199     exit 0 ;;
200
201   -host | --host | --hos | --ho)
202     ac_prev=host ;;
203   -host=* | --host=* | --hos=* | --ho=*)
204     host="$ac_optarg" ;;
205
206   -includedir | --includedir | --includedi | --included | --include \
207   | --includ | --inclu | --incl | --inc)
208     ac_prev=includedir ;;
209   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
210   | --includ=* | --inclu=* | --incl=* | --inc=*)
211     includedir="$ac_optarg" ;;
212
213   -infodir | --infodir | --infodi | --infod | --info | --inf)
214     ac_prev=infodir ;;
215   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
216     infodir="$ac_optarg" ;;
217
218   -libdir | --libdir | --libdi | --libd)
219     ac_prev=libdir ;;
220   -libdir=* | --libdir=* | --libdi=* | --libd=*)
221     libdir="$ac_optarg" ;;
222
223   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
224   | --libexe | --libex | --libe)
225     ac_prev=libexecdir ;;
226   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
227   | --libexe=* | --libex=* | --libe=*)
228     libexecdir="$ac_optarg" ;;
229
230   -localstatedir | --localstatedir | --localstatedi | --localstated \
231   | --localstate | --localstat | --localsta | --localst \
232   | --locals | --local | --loca | --loc | --lo)
233     ac_prev=localstatedir ;;
234   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
235   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
236   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
237     localstatedir="$ac_optarg" ;;
238
239   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
240     ac_prev=mandir ;;
241   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
242     mandir="$ac_optarg" ;;
243
244   -nfp | --nfp | --nf)
245     # Obsolete; use --without-fp.
246     with_fp=no ;;
247
248   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
249   | --no-cr | --no-c)
250     no_create=yes ;;
251
252   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
253   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
254     no_recursion=yes ;;
255
256   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
257   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
258   | --oldin | --oldi | --old | --ol | --o)
259     ac_prev=oldincludedir ;;
260   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
261   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
262   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
263     oldincludedir="$ac_optarg" ;;
264
265   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
266     ac_prev=prefix ;;
267   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
268     prefix="$ac_optarg" ;;
269
270   -program-prefix | --program-prefix | --program-prefi | --program-pref \
271   | --program-pre | --program-pr | --program-p)
272     ac_prev=program_prefix ;;
273   -program-prefix=* | --program-prefix=* | --program-prefi=* \
274   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
275     program_prefix="$ac_optarg" ;;
276
277   -program-suffix | --program-suffix | --program-suffi | --program-suff \
278   | --program-suf | --program-su | --program-s)
279     ac_prev=program_suffix ;;
280   -program-suffix=* | --program-suffix=* | --program-suffi=* \
281   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
282     program_suffix="$ac_optarg" ;;
283
284   -program-transform-name | --program-transform-name \
285   | --program-transform-nam | --program-transform-na \
286   | --program-transform-n | --program-transform- \
287   | --program-transform | --program-transfor \
288   | --program-transfo | --program-transf \
289   | --program-trans | --program-tran \
290   | --progr-tra | --program-tr | --program-t)
291     ac_prev=program_transform_name ;;
292   -program-transform-name=* | --program-transform-name=* \
293   | --program-transform-nam=* | --program-transform-na=* \
294   | --program-transform-n=* | --program-transform-=* \
295   | --program-transform=* | --program-transfor=* \
296   | --program-transfo=* | --program-transf=* \
297   | --program-trans=* | --program-tran=* \
298   | --progr-tra=* | --program-tr=* | --program-t=*)
299     program_transform_name="$ac_optarg" ;;
300
301   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
302   | -silent | --silent | --silen | --sile | --sil)
303     silent=yes ;;
304
305   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
306     ac_prev=sbindir ;;
307   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
308   | --sbi=* | --sb=*)
309     sbindir="$ac_optarg" ;;
310
311   -sharedstatedir | --sharedstatedir | --sharedstatedi \
312   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
313   | --sharedst | --shareds | --shared | --share | --shar \
314   | --sha | --sh)
315     ac_prev=sharedstatedir ;;
316   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
317   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
318   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
319   | --sha=* | --sh=*)
320     sharedstatedir="$ac_optarg" ;;
321
322   -site | --site | --sit)
323     ac_prev=site ;;
324   -site=* | --site=* | --sit=*)
325     site="$ac_optarg" ;;
326
327   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
328     ac_prev=srcdir ;;
329   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
330     srcdir="$ac_optarg" ;;
331
332   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
333   | --syscon | --sysco | --sysc | --sys | --sy)
334     ac_prev=sysconfdir ;;
335   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
336   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
337     sysconfdir="$ac_optarg" ;;
338
339   -target | --target | --targe | --targ | --tar | --ta | --t)
340     ac_prev=target ;;
341   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
342     target="$ac_optarg" ;;
343
344   -v | -verbose | --verbose | --verbos | --verbo | --verb)
345     verbose=yes ;;
346
347   -version | --version | --versio | --versi | --vers)
348     echo "configure generated by autoconf version 2.13"
349     exit 0 ;;
350
351   -with-* | --with-*)
352     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
353     # Reject names that are not valid shell variable names.
354     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
355       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
356     fi
357     ac_package=`echo $ac_package| sed 's/-/_/g'`
358     case "$ac_option" in
359       *=*) ;;
360       *) ac_optarg=yes ;;
361     esac
362     eval "with_${ac_package}='$ac_optarg'" ;;
363
364   -without-* | --without-*)
365     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
366     # Reject names that are not valid shell variable names.
367     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
368       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
369     fi
370     ac_package=`echo $ac_package| sed 's/-/_/g'`
371     eval "with_${ac_package}=no" ;;
372
373   --x)
374     # Obsolete; use --with-x.
375     with_x=yes ;;
376
377   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
378   | --x-incl | --x-inc | --x-in | --x-i)
379     ac_prev=x_includes ;;
380   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
381   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
382     x_includes="$ac_optarg" ;;
383
384   -x-libraries | --x-libraries | --x-librarie | --x-librari \
385   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
386     ac_prev=x_libraries ;;
387   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
388   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
389     x_libraries="$ac_optarg" ;;
390
391   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
392     ;;
393
394   *)
395     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
396       echo "configure: warning: $ac_option: invalid host type" 1>&2
397     fi
398     if test "x$nonopt" != xNONE; then
399       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
400     fi
401     nonopt="$ac_option"
402     ;;
403
404   esac
405 done
406
407 if test -n "$ac_prev"; then
408   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
409 fi
410
411 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
412
413 # File descriptor usage:
414 # 0 standard input
415 # 1 file creation
416 # 2 errors and warnings
417 # 3 some systems may open it to /dev/tty
418 # 4 used on the Kubota Titan
419 # 6 checking for... messages and results
420 # 5 compiler messages saved in config.log
421 if test "$silent" = yes; then
422   exec 6>/dev/null
423 else
424   exec 6>&1
425 fi
426 exec 5>./config.log
427
428 echo "\
429 This file contains any messages produced by compilers while
430 running configure, to aid debugging if configure makes a mistake.
431 " 1>&5
432
433 # Strip out --no-create and --no-recursion so they do not pile up.
434 # Also quote any args containing shell metacharacters.
435 ac_configure_args=
436 for ac_arg
437 do
438   case "$ac_arg" in
439   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
440   | --no-cr | --no-c) ;;
441   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
442   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
443   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
444   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
445   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
446   esac
447 done
448
449 # NLS nuisances.
450 # Only set these to C if already set.  These must not be set unconditionally
451 # because not all systems understand e.g. LANG=C (notably SCO).
452 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
453 # Non-C LC_CTYPE values break the ctype check.
454 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
455 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
456 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
457 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
458
459 # confdefs.h avoids OS command line length limits that DEFS can exceed.
460 rm -rf conftest* confdefs.h
461 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
462 echo > confdefs.h
463
464 # A filename unique to this package, relative to the directory that
465 # configure is in, which we can look for to find out if srcdir is correct.
466 ac_unique_file=src/version.c
467
468 # Find the source files, if location was not specified.
469 if test -z "$srcdir"; then
470   ac_srcdir_defaulted=yes
471   # Try the directory containing this script, then its parent.
472   ac_prog=$0
473   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
474   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
475   srcdir=$ac_confdir
476   if test ! -r $srcdir/$ac_unique_file; then
477     srcdir=..
478   fi
479 else
480   ac_srcdir_defaulted=no
481 fi
482 if test ! -r $srcdir/$ac_unique_file; then
483   if test "$ac_srcdir_defaulted" = yes; then
484     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
485   else
486     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
487   fi
488 fi
489 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
490
491 # Prefer explicitly selected file to automatically selected ones.
492 if test -z "$CONFIG_SITE"; then
493   if test "x$prefix" != xNONE; then
494     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
495   else
496     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
497   fi
498 fi
499 for ac_site_file in $CONFIG_SITE; do
500   if test -r "$ac_site_file"; then
501     echo "loading site script $ac_site_file"
502     . "$ac_site_file"
503   fi
504 done
505
506 if test -r "$cache_file"; then
507   echo "loading cache $cache_file"
508   . $cache_file
509 else
510   echo "creating cache $cache_file"
511   > $cache_file
512 fi
513
514 ac_ext=c
515 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
516 ac_cpp='$CPP $CPPFLAGS'
517 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
518 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
519 cross_compiling=$ac_cv_prog_cc_cross
520
521 ac_exeext=
522 ac_objext=o
523 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
524   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
525   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
526     ac_n= ac_c='
527 ' ac_t='        '
528   else
529     ac_n=-n ac_c= ac_t=
530   fi
531 else
532   ac_n= ac_c='\c' ac_t=
533 fi
534
535
536
537
538
539 VERSION=`sed -e 's/^.*"\(.*\)";$/\1/' ${srcdir}/src/version.c`
540 echo "configuring for GNU Wget $VERSION"
541
542 PACKAGE=wget
543
544
545 ac_aux_dir=
546 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
547   if test -f $ac_dir/install-sh; then
548     ac_aux_dir=$ac_dir
549     ac_install_sh="$ac_aux_dir/install-sh -c"
550     break
551   elif test -f $ac_dir/install.sh; then
552     ac_aux_dir=$ac_dir
553     ac_install_sh="$ac_aux_dir/install.sh -c"
554     break
555   fi
556 done
557 if test -z "$ac_aux_dir"; then
558   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
559 fi
560 ac_config_guess=$ac_aux_dir/config.guess
561 ac_config_sub=$ac_aux_dir/config.sub
562 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
563
564
565 # Make sure we can run config.sub.
566 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
567 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
568 fi
569
570 echo $ac_n "checking host system type""... $ac_c" 1>&6
571 echo "configure:572: checking host system type" >&5
572
573 host_alias=$host
574 case "$host_alias" in
575 NONE)
576   case $nonopt in
577   NONE)
578     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
579     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
580     fi ;;
581   *) host_alias=$nonopt ;;
582   esac ;;
583 esac
584
585 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
586 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
587 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
588 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
589 echo "$ac_t""$host" 1>&6
590
591 cat >> confdefs.h <<EOF
592 #define OS_TYPE "$host_os"
593 EOF
594
595
596 # Check whether --with-socks or --without-socks was given.
597 if test "${with_socks+set}" = set; then
598   withval="$with_socks"
599   cat >> confdefs.h <<\EOF
600 #define HAVE_SOCKS 1
601 EOF
602
603 fi
604
605
606 # Check whether --with-ssl or --without-ssl was given.
607 if test "${with_ssl+set}" = set; then
608   withval="$with_ssl"
609   :
610 fi
611
612
613 # Check whether --enable-opie or --disable-opie was given.
614 if test "${enable_opie+set}" = set; then
615   enableval="$enable_opie"
616   USE_OPIE=$enableval
617 else
618   USE_OPIE=yes
619 fi
620
621 test x"${USE_OPIE}" = xyes && cat >> confdefs.h <<\EOF
622 #define USE_OPIE 1
623 EOF
624
625
626 # Check whether --enable-digest or --disable-digest was given.
627 if test "${enable_digest+set}" = set; then
628   enableval="$enable_digest"
629   USE_DIGEST=$enableval
630 else
631   USE_DIGEST=yes
632 fi
633
634 test x"${USE_DIGEST}" = xyes && cat >> confdefs.h <<\EOF
635 #define USE_DIGEST 1
636 EOF
637
638
639 # Check whether --enable-debug or --disable-debug was given.
640 if test "${enable_debug+set}" = set; then
641   enableval="$enable_debug"
642   DEBUG=$enableval
643 else
644   DEBUG=yes
645 fi
646
647 test x"${DEBUG}" = xyes && cat >> confdefs.h <<\EOF
648 #define DEBUG 1
649 EOF
650
651
652 case "${USE_OPIE}${USE_DIGEST}" in
653 *yes*)
654         MD5_OBJ='md5$o'
655 esac
656 if test x"$USE_OPIE" = xyes; then
657   OPIE_OBJ='ftp-opie$o'
658 fi
659
660
661
662 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
663 echo "configure:664: checking whether ${MAKE-make} sets \${MAKE}" >&5
664 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
665 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
666   echo $ac_n "(cached) $ac_c" 1>&6
667 else
668   cat > conftestmake <<\EOF
669 all:
670         @echo 'ac_maketemp="${MAKE}"'
671 EOF
672 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
673 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
674 if test -n "$ac_maketemp"; then
675   eval ac_cv_prog_make_${ac_make}_set=yes
676 else
677   eval ac_cv_prog_make_${ac_make}_set=no
678 fi
679 rm -f conftestmake
680 fi
681 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
682   echo "$ac_t""yes" 1>&6
683   SET_MAKE=
684 else
685   echo "$ac_t""no" 1>&6
686   SET_MAKE="MAKE=${MAKE-make}"
687 fi
688
689
690 # Find a good install program.  We prefer a C program (faster),
691 # so one script is as good as another.  But avoid the broken or
692 # incompatible versions:
693 # SysV /etc/install, /usr/sbin/install
694 # SunOS /usr/etc/install
695 # IRIX /sbin/install
696 # AIX /bin/install
697 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
698 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
699 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
700 # ./install, which can be erroneously created by make from ./install.sh.
701 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
702 echo "configure:703: checking for a BSD compatible install" >&5
703 if test -z "$INSTALL"; then
704 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
705   echo $ac_n "(cached) $ac_c" 1>&6
706 else
707     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
708   for ac_dir in $PATH; do
709     # Account for people who put trailing slashes in PATH elements.
710     case "$ac_dir/" in
711     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
712     *)
713       # OSF1 and SCO ODT 3.0 have their own names for install.
714       # Don't use installbsd from OSF since it installs stuff as root
715       # by default.
716       for ac_prog in ginstall scoinst install; do
717         if test -f $ac_dir/$ac_prog; then
718           if test $ac_prog = install &&
719             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
720             # AIX install.  It has an incompatible calling convention.
721             :
722           else
723             ac_cv_path_install="$ac_dir/$ac_prog -c"
724             break 2
725           fi
726         fi
727       done
728       ;;
729     esac
730   done
731   IFS="$ac_save_IFS"
732
733 fi
734   if test "${ac_cv_path_install+set}" = set; then
735     INSTALL="$ac_cv_path_install"
736   else
737     # As a last resort, use the slow shell script.  We don't cache a
738     # path for INSTALL within a source directory, because that will
739     # break other packages using the cache if that directory is
740     # removed, or if the path is relative.
741     INSTALL="$ac_install_sh"
742   fi
743 fi
744 echo "$ac_t""$INSTALL" 1>&6
745
746 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
747 # It thinks the first close brace ends the variable substitution.
748 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
749
750 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
751
752 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
753
754
755
756 test -z "$CFLAGS"  && CFLAGS= auto_cflags=1
757 test -z "$CC" && cc_specified=yes
758
759 # Extract the first word of "gcc", so it can be a program name with args.
760 set dummy gcc; ac_word=$2
761 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
762 echo "configure:763: checking for $ac_word" >&5
763 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
764   echo $ac_n "(cached) $ac_c" 1>&6
765 else
766   if test -n "$CC"; then
767   ac_cv_prog_CC="$CC" # Let the user override the test.
768 else
769   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
770   ac_dummy="$PATH"
771   for ac_dir in $ac_dummy; do
772     test -z "$ac_dir" && ac_dir=.
773     if test -f $ac_dir/$ac_word; then
774       ac_cv_prog_CC="gcc"
775       break
776     fi
777   done
778   IFS="$ac_save_ifs"
779 fi
780 fi
781 CC="$ac_cv_prog_CC"
782 if test -n "$CC"; then
783   echo "$ac_t""$CC" 1>&6
784 else
785   echo "$ac_t""no" 1>&6
786 fi
787
788 if test -z "$CC"; then
789   # Extract the first word of "cc", so it can be a program name with args.
790 set dummy cc; ac_word=$2
791 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
792 echo "configure:793: checking for $ac_word" >&5
793 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
794   echo $ac_n "(cached) $ac_c" 1>&6
795 else
796   if test -n "$CC"; then
797   ac_cv_prog_CC="$CC" # Let the user override the test.
798 else
799   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
800   ac_prog_rejected=no
801   ac_dummy="$PATH"
802   for ac_dir in $ac_dummy; do
803     test -z "$ac_dir" && ac_dir=.
804     if test -f $ac_dir/$ac_word; then
805       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
806         ac_prog_rejected=yes
807         continue
808       fi
809       ac_cv_prog_CC="cc"
810       break
811     fi
812   done
813   IFS="$ac_save_ifs"
814 if test $ac_prog_rejected = yes; then
815   # We found a bogon in the path, so make sure we never use it.
816   set dummy $ac_cv_prog_CC
817   shift
818   if test $# -gt 0; then
819     # We chose a different compiler from the bogus one.
820     # However, it has the same basename, so the bogon will be chosen
821     # first if we set CC to just the basename; use the full file name.
822     shift
823     set dummy "$ac_dir/$ac_word" "$@"
824     shift
825     ac_cv_prog_CC="$@"
826   fi
827 fi
828 fi
829 fi
830 CC="$ac_cv_prog_CC"
831 if test -n "$CC"; then
832   echo "$ac_t""$CC" 1>&6
833 else
834   echo "$ac_t""no" 1>&6
835 fi
836
837   if test -z "$CC"; then
838     case "`uname -s`" in
839     *win32* | *WIN32*)
840       # Extract the first word of "cl", so it can be a program name with args.
841 set dummy cl; ac_word=$2
842 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
843 echo "configure:844: checking for $ac_word" >&5
844 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
845   echo $ac_n "(cached) $ac_c" 1>&6
846 else
847   if test -n "$CC"; then
848   ac_cv_prog_CC="$CC" # Let the user override the test.
849 else
850   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
851   ac_dummy="$PATH"
852   for ac_dir in $ac_dummy; do
853     test -z "$ac_dir" && ac_dir=.
854     if test -f $ac_dir/$ac_word; then
855       ac_cv_prog_CC="cl"
856       break
857     fi
858   done
859   IFS="$ac_save_ifs"
860 fi
861 fi
862 CC="$ac_cv_prog_CC"
863 if test -n "$CC"; then
864   echo "$ac_t""$CC" 1>&6
865 else
866   echo "$ac_t""no" 1>&6
867 fi
868  ;;
869     esac
870   fi
871   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
872 fi
873
874 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
875 echo "configure:876: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
876
877 ac_ext=c
878 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
879 ac_cpp='$CPP $CPPFLAGS'
880 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
881 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
882 cross_compiling=$ac_cv_prog_cc_cross
883
884 cat > conftest.$ac_ext << EOF
885
886 #line 887 "configure"
887 #include "confdefs.h"
888
889 main(){return(0);}
890 EOF
891 if { (eval echo configure:892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
892   ac_cv_prog_cc_works=yes
893   # If we can't run a trivial program, we are probably using a cross compiler.
894   if (./conftest; exit) 2>/dev/null; then
895     ac_cv_prog_cc_cross=no
896   else
897     ac_cv_prog_cc_cross=yes
898   fi
899 else
900   echo "configure: failed program was:" >&5
901   cat conftest.$ac_ext >&5
902   ac_cv_prog_cc_works=no
903 fi
904 rm -fr conftest*
905 ac_ext=c
906 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
907 ac_cpp='$CPP $CPPFLAGS'
908 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
909 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
910 cross_compiling=$ac_cv_prog_cc_cross
911
912 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
913 if test $ac_cv_prog_cc_works = no; then
914   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
915 fi
916 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
917 echo "configure:918: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
918 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
919 cross_compiling=$ac_cv_prog_cc_cross
920
921 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
922 echo "configure:923: checking whether we are using GNU C" >&5
923 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
924   echo $ac_n "(cached) $ac_c" 1>&6
925 else
926   cat > conftest.c <<EOF
927 #ifdef __GNUC__
928   yes;
929 #endif
930 EOF
931 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
932   ac_cv_prog_gcc=yes
933 else
934   ac_cv_prog_gcc=no
935 fi
936 fi
937
938 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
939
940 if test $ac_cv_prog_gcc = yes; then
941   GCC=yes
942 else
943   GCC=
944 fi
945
946 ac_test_CFLAGS="${CFLAGS+set}"
947 ac_save_CFLAGS="$CFLAGS"
948 CFLAGS=
949 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
950 echo "configure:951: checking whether ${CC-cc} accepts -g" >&5
951 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
952   echo $ac_n "(cached) $ac_c" 1>&6
953 else
954   echo 'void f(){}' > conftest.c
955 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
956   ac_cv_prog_cc_g=yes
957 else
958   ac_cv_prog_cc_g=no
959 fi
960 rm -f conftest*
961
962 fi
963
964 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
965 if test "$ac_test_CFLAGS" = set; then
966   CFLAGS="$ac_save_CFLAGS"
967 elif test $ac_cv_prog_cc_g = yes; then
968   if test "$GCC" = yes; then
969     CFLAGS="-g -O2"
970   else
971     CFLAGS="-g"
972   fi
973 else
974   if test "$GCC" = yes; then
975     CFLAGS="-O2"
976   else
977     CFLAGS=
978   fi
979 fi
980
981
982 if test -n "$auto_cflags"; then
983   if test -n "$GCC"; then
984     CFLAGS="$CFLAGS -O2 -Wall -Wno-implicit"
985   else
986     case "$host_os" in
987       *hpux*)  CFLAGS="$CFLAGS +O3"                      ;;
988       *ultrix* | *osf*) CFLAGS="$CFLAGS -O -Olimit 2000" ;;
989       *)       CFLAGS="$CFLAGS -O" ;;
990     esac
991   fi
992 fi
993
994 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
995 echo "configure:996: checking how to run the C preprocessor" >&5
996 # On Suns, sometimes $CPP names a directory.
997 if test -n "$CPP" && test -d "$CPP"; then
998   CPP=
999 fi
1000 if test -z "$CPP"; then
1001 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1002   echo $ac_n "(cached) $ac_c" 1>&6
1003 else
1004     # This must be in double quotes, not single quotes, because CPP may get
1005   # substituted into the Makefile and "${CC-cc}" will confuse make.
1006   CPP="${CC-cc} -E"
1007   # On the NeXT, cc -E runs the code through the compiler's parser,
1008   # not just through cpp.
1009   cat > conftest.$ac_ext <<EOF
1010 #line 1011 "configure"
1011 #include "confdefs.h"
1012 #include <assert.h>
1013 Syntax Error
1014 EOF
1015 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1016 { (eval echo configure:1017: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1017 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1018 if test -z "$ac_err"; then
1019   :
1020 else
1021   echo "$ac_err" >&5
1022   echo "configure: failed program was:" >&5
1023   cat conftest.$ac_ext >&5
1024   rm -rf conftest*
1025   CPP="${CC-cc} -E -traditional-cpp"
1026   cat > conftest.$ac_ext <<EOF
1027 #line 1028 "configure"
1028 #include "confdefs.h"
1029 #include <assert.h>
1030 Syntax Error
1031 EOF
1032 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1033 { (eval echo configure:1034: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1034 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1035 if test -z "$ac_err"; then
1036   :
1037 else
1038   echo "$ac_err" >&5
1039   echo "configure: failed program was:" >&5
1040   cat conftest.$ac_ext >&5
1041   rm -rf conftest*
1042   CPP="${CC-cc} -nologo -E"
1043   cat > conftest.$ac_ext <<EOF
1044 #line 1045 "configure"
1045 #include "confdefs.h"
1046 #include <assert.h>
1047 Syntax Error
1048 EOF
1049 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1050 { (eval echo configure:1051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1051 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1052 if test -z "$ac_err"; then
1053   :
1054 else
1055   echo "$ac_err" >&5
1056   echo "configure: failed program was:" >&5
1057   cat conftest.$ac_ext >&5
1058   rm -rf conftest*
1059   CPP=/lib/cpp
1060 fi
1061 rm -f conftest*
1062 fi
1063 rm -f conftest*
1064 fi
1065 rm -f conftest*
1066   ac_cv_prog_CPP="$CPP"
1067 fi
1068   CPP="$ac_cv_prog_CPP"
1069 else
1070   ac_cv_prog_CPP="$CPP"
1071 fi
1072 echo "$ac_t""$CPP" 1>&6
1073
1074 echo $ac_n "checking for AIX""... $ac_c" 1>&6
1075 echo "configure:1076: checking for AIX" >&5
1076 cat > conftest.$ac_ext <<EOF
1077 #line 1078 "configure"
1078 #include "confdefs.h"
1079 #ifdef _AIX
1080   yes
1081 #endif
1082
1083 EOF
1084 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1085   egrep "yes" >/dev/null 2>&1; then
1086   rm -rf conftest*
1087   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
1088 #define _ALL_SOURCE 1
1089 EOF
1090
1091 else
1092   rm -rf conftest*
1093   echo "$ac_t""no" 1>&6
1094 fi
1095 rm -f conftest*
1096
1097
1098
1099 case "$host_os" in
1100   *win32) exeext='.exe';;
1101   *) exeext='';;
1102 esac
1103
1104
1105
1106 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
1107 echo "configure:1108: checking for ${CC-cc} option to accept ANSI C" >&5
1108 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
1109   echo $ac_n "(cached) $ac_c" 1>&6
1110 else
1111   am_cv_prog_cc_stdc=no
1112 ac_save_CC="$CC"
1113 # Don't try gcc -ansi; that turns off useful extensions and
1114 # breaks some systems' header files.
1115 # AIX                   -qlanglvl=ansi
1116 # Ultrix and OSF/1      -std1
1117 # HP-UX                 -Aa -D_HPUX_SOURCE
1118 # SVR4                  -Xc -D__EXTENSIONS__
1119 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1120 do
1121   CC="$ac_save_CC $ac_arg"
1122   cat > conftest.$ac_ext <<EOF
1123 #line 1124 "configure"
1124 #include "confdefs.h"
1125 #if !defined(__STDC__) || __STDC__ != 1
1126 choke me
1127 #endif
1128 /* DYNIX/ptx V4.1.3 can't compile sys/stat.h with -Xc -D__EXTENSIONS__. */
1129 #ifdef _SEQUENT_
1130 # include <sys/types.h>
1131 # include <sys/stat.h>
1132 #endif
1133
1134 int main() {
1135
1136 int test (int i, double x);
1137 struct s1 {int (*f) (int a);};
1138 struct s2 {int (*f) (double a);};
1139 ; return 0; }
1140 EOF
1141 if { (eval echo configure:1142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1142   rm -rf conftest*
1143   am_cv_prog_cc_stdc="$ac_arg"; break
1144 else
1145   echo "configure: failed program was:" >&5
1146   cat conftest.$ac_ext >&5
1147 fi
1148 rm -f conftest*
1149 done
1150 CC="$ac_save_CC"
1151
1152 fi
1153
1154 echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1155 case "x$am_cv_prog_cc_stdc" in
1156   x|xno) ;;
1157   *) CC="$CC $am_cv_prog_cc_stdc" ;;
1158 esac
1159
1160
1161
1162 echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
1163 echo "configure:1164: checking for function prototypes" >&5
1164 if test "$am_cv_prog_cc_stdc" != no; then
1165   echo "$ac_t""yes" 1>&6
1166   cat >> confdefs.h <<\EOF
1167 #define PROTOTYPES 1
1168 EOF
1169
1170   U= ANSI2KNR=
1171 else
1172   echo "$ac_t""no" 1>&6
1173   U=_ ANSI2KNR=./ansi2knr
1174   # Ensure some checks needed by ansi2knr itself.
1175   echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1176 echo "configure:1177: checking for ANSI C header files" >&5
1177 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1178   echo $ac_n "(cached) $ac_c" 1>&6
1179 else
1180   cat > conftest.$ac_ext <<EOF
1181 #line 1182 "configure"
1182 #include "confdefs.h"
1183 #include <stdlib.h>
1184 #include <stdarg.h>
1185 #include <string.h>
1186 #include <float.h>
1187 EOF
1188 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1189 { (eval echo configure:1190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1190 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1191 if test -z "$ac_err"; then
1192   rm -rf conftest*
1193   ac_cv_header_stdc=yes
1194 else
1195   echo "$ac_err" >&5
1196   echo "configure: failed program was:" >&5
1197   cat conftest.$ac_ext >&5
1198   rm -rf conftest*
1199   ac_cv_header_stdc=no
1200 fi
1201 rm -f conftest*
1202
1203 if test $ac_cv_header_stdc = yes; then
1204   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1205 cat > conftest.$ac_ext <<EOF
1206 #line 1207 "configure"
1207 #include "confdefs.h"
1208 #include <string.h>
1209 EOF
1210 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1211   egrep "memchr" >/dev/null 2>&1; then
1212   :
1213 else
1214   rm -rf conftest*
1215   ac_cv_header_stdc=no
1216 fi
1217 rm -f conftest*
1218
1219 fi
1220
1221 if test $ac_cv_header_stdc = yes; then
1222   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1223 cat > conftest.$ac_ext <<EOF
1224 #line 1225 "configure"
1225 #include "confdefs.h"
1226 #include <stdlib.h>
1227 EOF
1228 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1229   egrep "free" >/dev/null 2>&1; then
1230   :
1231 else
1232   rm -rf conftest*
1233   ac_cv_header_stdc=no
1234 fi
1235 rm -f conftest*
1236
1237 fi
1238
1239 if test $ac_cv_header_stdc = yes; then
1240   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1241 if test "$cross_compiling" = yes; then
1242   :
1243 else
1244   cat > conftest.$ac_ext <<EOF
1245 #line 1246 "configure"
1246 #include "confdefs.h"
1247 #include <ctype.h>
1248 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1249 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1250 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1251 int main () { int i; for (i = 0; i < 256; i++)
1252 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1253 exit (0); }
1254
1255 EOF
1256 if { (eval echo configure:1257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1257 then
1258   :
1259 else
1260   echo "configure: failed program was:" >&5
1261   cat conftest.$ac_ext >&5
1262   rm -fr conftest*
1263   ac_cv_header_stdc=no
1264 fi
1265 rm -fr conftest*
1266 fi
1267
1268 fi
1269 fi
1270
1271 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1272 if test $ac_cv_header_stdc = yes; then
1273   cat >> confdefs.h <<\EOF
1274 #define STDC_HEADERS 1
1275 EOF
1276
1277 fi
1278
1279   for ac_hdr in string.h
1280 do
1281 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1282 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1283 echo "configure:1284: checking for $ac_hdr" >&5
1284 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1285   echo $ac_n "(cached) $ac_c" 1>&6
1286 else
1287   cat > conftest.$ac_ext <<EOF
1288 #line 1289 "configure"
1289 #include "confdefs.h"
1290 #include <$ac_hdr>
1291 EOF
1292 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1293 { (eval echo configure:1294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1294 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1295 if test -z "$ac_err"; then
1296   rm -rf conftest*
1297   eval "ac_cv_header_$ac_safe=yes"
1298 else
1299   echo "$ac_err" >&5
1300   echo "configure: failed program was:" >&5
1301   cat conftest.$ac_ext >&5
1302   rm -rf conftest*
1303   eval "ac_cv_header_$ac_safe=no"
1304 fi
1305 rm -f conftest*
1306 fi
1307 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1308   echo "$ac_t""yes" 1>&6
1309     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1310   cat >> confdefs.h <<EOF
1311 #define $ac_tr_hdr 1
1312 EOF
1313  
1314 else
1315   echo "$ac_t""no" 1>&6
1316 fi
1317 done
1318
1319 fi
1320
1321
1322 echo $ac_n "checking for working const""... $ac_c" 1>&6
1323 echo "configure:1324: checking for working const" >&5
1324 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1325   echo $ac_n "(cached) $ac_c" 1>&6
1326 else
1327   cat > conftest.$ac_ext <<EOF
1328 #line 1329 "configure"
1329 #include "confdefs.h"
1330
1331 int main() {
1332
1333 /* Ultrix mips cc rejects this.  */
1334 typedef int charset[2]; const charset x;
1335 /* SunOS 4.1.1 cc rejects this.  */
1336 char const *const *ccp;
1337 char **p;
1338 /* NEC SVR4.0.2 mips cc rejects this.  */
1339 struct point {int x, y;};
1340 static struct point const zero = {0,0};
1341 /* AIX XL C 1.02.0.0 rejects this.
1342    It does not let you subtract one const X* pointer from another in an arm
1343    of an if-expression whose if-part is not a constant expression */
1344 const char *g = "string";
1345 ccp = &g + (g ? g-g : 0);
1346 /* HPUX 7.0 cc rejects these. */
1347 ++ccp;
1348 p = (char**) ccp;
1349 ccp = (char const *const *) p;
1350 { /* SCO 3.2v4 cc rejects this.  */
1351   char *t;
1352   char const *s = 0 ? (char *) 0 : (char const *) 0;
1353
1354   *t++ = 0;
1355 }
1356 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1357   int x[] = {25, 17};
1358   const int *foo = &x[0];
1359   ++foo;
1360 }
1361 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1362   typedef const int *iptr;
1363   iptr p = 0;
1364   ++p;
1365 }
1366 { /* AIX XL C 1.02.0.0 rejects this saying
1367      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1368   struct s { int j; const int *ap[3]; };
1369   struct s *b; b->j = 5;
1370 }
1371 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1372   const int foo = 10;
1373 }
1374
1375 ; return 0; }
1376 EOF
1377 if { (eval echo configure:1378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1378   rm -rf conftest*
1379   ac_cv_c_const=yes
1380 else
1381   echo "configure: failed program was:" >&5
1382   cat conftest.$ac_ext >&5
1383   rm -rf conftest*
1384   ac_cv_c_const=no
1385 fi
1386 rm -f conftest*
1387 fi
1388
1389 echo "$ac_t""$ac_cv_c_const" 1>&6
1390 if test $ac_cv_c_const = no; then
1391   cat >> confdefs.h <<\EOF
1392 #define const 
1393 EOF
1394
1395 fi
1396
1397 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1398 echo "configure:1399: checking for size_t" >&5
1399 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1400   echo $ac_n "(cached) $ac_c" 1>&6
1401 else
1402   cat > conftest.$ac_ext <<EOF
1403 #line 1404 "configure"
1404 #include "confdefs.h"
1405 #include <sys/types.h>
1406 #if STDC_HEADERS
1407 #include <stdlib.h>
1408 #include <stddef.h>
1409 #endif
1410 EOF
1411 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1412   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1413   rm -rf conftest*
1414   ac_cv_type_size_t=yes
1415 else
1416   rm -rf conftest*
1417   ac_cv_type_size_t=no
1418 fi
1419 rm -f conftest*
1420
1421 fi
1422 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1423 if test $ac_cv_type_size_t = no; then
1424   cat >> confdefs.h <<\EOF
1425 #define size_t unsigned
1426 EOF
1427
1428 fi
1429
1430 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1431 echo "configure:1432: checking for pid_t" >&5
1432 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1433   echo $ac_n "(cached) $ac_c" 1>&6
1434 else
1435   cat > conftest.$ac_ext <<EOF
1436 #line 1437 "configure"
1437 #include "confdefs.h"
1438 #include <sys/types.h>
1439 #if STDC_HEADERS
1440 #include <stdlib.h>
1441 #include <stddef.h>
1442 #endif
1443 EOF
1444 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1445   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1446   rm -rf conftest*
1447   ac_cv_type_pid_t=yes
1448 else
1449   rm -rf conftest*
1450   ac_cv_type_pid_t=no
1451 fi
1452 rm -f conftest*
1453
1454 fi
1455 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1456 if test $ac_cv_type_pid_t = no; then
1457   cat >> confdefs.h <<\EOF
1458 #define pid_t int
1459 EOF
1460
1461 fi
1462
1463 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
1464 echo "configure:1465: checking whether byte ordering is bigendian" >&5
1465 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
1466   echo $ac_n "(cached) $ac_c" 1>&6
1467 else
1468   ac_cv_c_bigendian=unknown
1469 # See if sys/param.h defines the BYTE_ORDER macro.
1470 cat > conftest.$ac_ext <<EOF
1471 #line 1472 "configure"
1472 #include "confdefs.h"
1473 #include <sys/types.h>
1474 #include <sys/param.h>
1475 int main() {
1476
1477 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
1478  bogus endian macros
1479 #endif
1480 ; return 0; }
1481 EOF
1482 if { (eval echo configure:1483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1483   rm -rf conftest*
1484   # It does; now see whether it defined to BIG_ENDIAN or not.
1485 cat > conftest.$ac_ext <<EOF
1486 #line 1487 "configure"
1487 #include "confdefs.h"
1488 #include <sys/types.h>
1489 #include <sys/param.h>
1490 int main() {
1491
1492 #if BYTE_ORDER != BIG_ENDIAN
1493  not big endian
1494 #endif
1495 ; return 0; }
1496 EOF
1497 if { (eval echo configure:1498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1498   rm -rf conftest*
1499   ac_cv_c_bigendian=yes
1500 else
1501   echo "configure: failed program was:" >&5
1502   cat conftest.$ac_ext >&5
1503   rm -rf conftest*
1504   ac_cv_c_bigendian=no
1505 fi
1506 rm -f conftest*
1507 else
1508   echo "configure: failed program was:" >&5
1509   cat conftest.$ac_ext >&5
1510 fi
1511 rm -f conftest*
1512 if test $ac_cv_c_bigendian = unknown; then
1513 if test "$cross_compiling" = yes; then
1514     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1515 else
1516   cat > conftest.$ac_ext <<EOF
1517 #line 1518 "configure"
1518 #include "confdefs.h"
1519 main () {
1520   /* Are we little or big endian?  From Harbison&Steele.  */
1521   union
1522   {
1523     long l;
1524     char c[sizeof (long)];
1525   } u;
1526   u.l = 1;
1527   exit (u.c[sizeof (long) - 1] == 1);
1528 }
1529 EOF
1530 if { (eval echo configure:1531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1531 then
1532   ac_cv_c_bigendian=no
1533 else
1534   echo "configure: failed program was:" >&5
1535   cat conftest.$ac_ext >&5
1536   rm -fr conftest*
1537   ac_cv_c_bigendian=yes
1538 fi
1539 rm -fr conftest*
1540 fi
1541
1542 fi
1543 fi
1544
1545 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
1546 if test $ac_cv_c_bigendian = yes; then
1547   cat >> confdefs.h <<\EOF
1548 #define WORDS_BIGENDIAN 1
1549 EOF
1550
1551 fi
1552
1553
1554 # Check size of long.
1555 echo $ac_n "checking size of long""... $ac_c" 1>&6
1556 echo "configure:1557: checking size of long" >&5
1557 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1558   echo $ac_n "(cached) $ac_c" 1>&6
1559 else
1560   if test "$cross_compiling" = yes; then
1561     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1562 else
1563   cat > conftest.$ac_ext <<EOF
1564 #line 1565 "configure"
1565 #include "confdefs.h"
1566 #include <stdio.h>
1567 main()
1568 {
1569   FILE *f=fopen("conftestval", "w");
1570   if (!f) exit(1);
1571   fprintf(f, "%d\n", sizeof(long));
1572   exit(0);
1573 }
1574 EOF
1575 if { (eval echo configure:1576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1576 then
1577   ac_cv_sizeof_long=`cat conftestval`
1578 else
1579   echo "configure: failed program was:" >&5
1580   cat conftest.$ac_ext >&5
1581   rm -fr conftest*
1582   ac_cv_sizeof_long=0
1583 fi
1584 rm -fr conftest*
1585 fi
1586
1587 fi
1588 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1589 cat >> confdefs.h <<EOF
1590 #define SIZEOF_LONG $ac_cv_sizeof_long
1591 EOF
1592
1593
1594 echo $ac_n "checking size of long long""... $ac_c" 1>&6
1595 echo "configure:1596: checking size of long long" >&5
1596 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
1597   echo $ac_n "(cached) $ac_c" 1>&6
1598 else
1599   if test "$cross_compiling" = yes; then
1600     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1601 else
1602   cat > conftest.$ac_ext <<EOF
1603 #line 1604 "configure"
1604 #include "confdefs.h"
1605 #include <stdio.h>
1606 main()
1607 {
1608   FILE *f=fopen("conftestval", "w");
1609   if (!f) exit(1);
1610   fprintf(f, "%d\n", sizeof(long long));
1611   exit(0);
1612 }
1613 EOF
1614 if { (eval echo configure:1615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1615 then
1616   ac_cv_sizeof_long_long=`cat conftestval`
1617 else
1618   echo "configure: failed program was:" >&5
1619   cat conftest.$ac_ext >&5
1620   rm -fr conftest*
1621   ac_cv_sizeof_long_long=0
1622 fi
1623 rm -fr conftest*
1624 fi
1625
1626 fi
1627 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
1628 cat >> confdefs.h <<EOF
1629 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
1630 EOF
1631
1632
1633
1634 for ac_hdr in string.h stdarg.h unistd.h sys/time.h utime.h sys/utime.h
1635 do
1636 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1637 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1638 echo "configure:1639: checking for $ac_hdr" >&5
1639 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1640   echo $ac_n "(cached) $ac_c" 1>&6
1641 else
1642   cat > conftest.$ac_ext <<EOF
1643 #line 1644 "configure"
1644 #include "confdefs.h"
1645 #include <$ac_hdr>
1646 EOF
1647 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1648 { (eval echo configure:1649: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1649 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1650 if test -z "$ac_err"; then
1651   rm -rf conftest*
1652   eval "ac_cv_header_$ac_safe=yes"
1653 else
1654   echo "$ac_err" >&5
1655   echo "configure: failed program was:" >&5
1656   cat conftest.$ac_ext >&5
1657   rm -rf conftest*
1658   eval "ac_cv_header_$ac_safe=no"
1659 fi
1660 rm -f conftest*
1661 fi
1662 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1663   echo "$ac_t""yes" 1>&6
1664     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1665   cat >> confdefs.h <<EOF
1666 #define $ac_tr_hdr 1
1667 EOF
1668  
1669 else
1670   echo "$ac_t""no" 1>&6
1671 fi
1672 done
1673
1674 for ac_hdr in sys/select.h sys/utsname.h pwd.h signal.h
1675 do
1676 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1677 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1678 echo "configure:1679: checking for $ac_hdr" >&5
1679 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1680   echo $ac_n "(cached) $ac_c" 1>&6
1681 else
1682   cat > conftest.$ac_ext <<EOF
1683 #line 1684 "configure"
1684 #include "confdefs.h"
1685 #include <$ac_hdr>
1686 EOF
1687 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1688 { (eval echo configure:1689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1689 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1690 if test -z "$ac_err"; then
1691   rm -rf conftest*
1692   eval "ac_cv_header_$ac_safe=yes"
1693 else
1694   echo "$ac_err" >&5
1695   echo "configure: failed program was:" >&5
1696   cat conftest.$ac_ext >&5
1697   rm -rf conftest*
1698   eval "ac_cv_header_$ac_safe=no"
1699 fi
1700 rm -f conftest*
1701 fi
1702 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1703   echo "$ac_t""yes" 1>&6
1704     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1705   cat >> confdefs.h <<EOF
1706 #define $ac_tr_hdr 1
1707 EOF
1708  
1709 else
1710   echo "$ac_t""no" 1>&6
1711 fi
1712 done
1713
1714 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1715 echo "configure:1716: checking whether time.h and sys/time.h may both be included" >&5
1716 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1717   echo $ac_n "(cached) $ac_c" 1>&6
1718 else
1719   cat > conftest.$ac_ext <<EOF
1720 #line 1721 "configure"
1721 #include "confdefs.h"
1722 #include <sys/types.h>
1723 #include <sys/time.h>
1724 #include <time.h>
1725 int main() {
1726 struct tm *tp;
1727 ; return 0; }
1728 EOF
1729 if { (eval echo configure:1730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1730   rm -rf conftest*
1731   ac_cv_header_time=yes
1732 else
1733   echo "configure: failed program was:" >&5
1734   cat conftest.$ac_ext >&5
1735   rm -rf conftest*
1736   ac_cv_header_time=no
1737 fi
1738 rm -f conftest*
1739 fi
1740
1741 echo "$ac_t""$ac_cv_header_time" 1>&6
1742 if test $ac_cv_header_time = yes; then
1743   cat >> confdefs.h <<\EOF
1744 #define TIME_WITH_SYS_TIME 1
1745 EOF
1746
1747 fi
1748
1749
1750 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1751 echo "configure:1752: checking return type of signal handlers" >&5
1752 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1753   echo $ac_n "(cached) $ac_c" 1>&6
1754 else
1755   cat > conftest.$ac_ext <<EOF
1756 #line 1757 "configure"
1757 #include "confdefs.h"
1758 #include <sys/types.h>
1759 #include <signal.h>
1760 #ifdef signal
1761 #undef signal
1762 #endif
1763 #ifdef __cplusplus
1764 extern "C" void (*signal (int, void (*)(int)))(int);
1765 #else
1766 void (*signal ()) ();
1767 #endif
1768
1769 int main() {
1770 int i;
1771 ; return 0; }
1772 EOF
1773 if { (eval echo configure:1774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1774   rm -rf conftest*
1775   ac_cv_type_signal=void
1776 else
1777   echo "configure: failed program was:" >&5
1778   cat conftest.$ac_ext >&5
1779   rm -rf conftest*
1780   ac_cv_type_signal=int
1781 fi
1782 rm -f conftest*
1783 fi
1784
1785 echo "$ac_t""$ac_cv_type_signal" 1>&6
1786 cat >> confdefs.h <<EOF
1787 #define RETSIGTYPE $ac_cv_type_signal
1788 EOF
1789
1790
1791
1792 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
1793 echo "configure:1794: checking for struct utimbuf" >&5
1794 if test x"$ac_cv_header_utime_h" = xyes; then
1795   cat > conftest.$ac_ext <<EOF
1796 #line 1797 "configure"
1797 #include "confdefs.h"
1798 #include <utime.h>
1799 EOF
1800 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1801   egrep "struct[        ]+utimbuf" >/dev/null 2>&1; then
1802   rm -rf conftest*
1803   cat >> confdefs.h <<\EOF
1804 #define HAVE_STRUCT_UTIMBUF 1
1805 EOF
1806
1807       echo "$ac_t""yes" 1>&6
1808 else
1809   rm -rf conftest*
1810   echo "$ac_t""no" 1>&6
1811 fi
1812 rm -f conftest*
1813
1814 else
1815   echo "$ac_t""no" 1>&6
1816 fi
1817
1818 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1819 # for constant arguments.  Useless!
1820 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1821 echo "configure:1822: checking for working alloca.h" >&5
1822 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1823   echo $ac_n "(cached) $ac_c" 1>&6
1824 else
1825   cat > conftest.$ac_ext <<EOF
1826 #line 1827 "configure"
1827 #include "confdefs.h"
1828 #include <alloca.h>
1829 int main() {
1830 char *p = alloca(2 * sizeof(int));
1831 ; return 0; }
1832 EOF
1833 if { (eval echo configure:1834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1834   rm -rf conftest*
1835   ac_cv_header_alloca_h=yes
1836 else
1837   echo "configure: failed program was:" >&5
1838   cat conftest.$ac_ext >&5
1839   rm -rf conftest*
1840   ac_cv_header_alloca_h=no
1841 fi
1842 rm -f conftest*
1843 fi
1844
1845 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1846 if test $ac_cv_header_alloca_h = yes; then
1847   cat >> confdefs.h <<\EOF
1848 #define HAVE_ALLOCA_H 1
1849 EOF
1850
1851 fi
1852
1853 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1854 echo "configure:1855: checking for alloca" >&5
1855 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1856   echo $ac_n "(cached) $ac_c" 1>&6
1857 else
1858   cat > conftest.$ac_ext <<EOF
1859 #line 1860 "configure"
1860 #include "confdefs.h"
1861
1862 #ifdef __GNUC__
1863 # define alloca __builtin_alloca
1864 #else
1865 # ifdef _MSC_VER
1866 #  include <malloc.h>
1867 #  define alloca _alloca
1868 # else
1869 #  if HAVE_ALLOCA_H
1870 #   include <alloca.h>
1871 #  else
1872 #   ifdef _AIX
1873  #pragma alloca
1874 #   else
1875 #    ifndef alloca /* predefined by HP cc +Olibcalls */
1876 char *alloca ();
1877 #    endif
1878 #   endif
1879 #  endif
1880 # endif
1881 #endif
1882
1883 int main() {
1884 char *p = (char *) alloca(1);
1885 ; return 0; }
1886 EOF
1887 if { (eval echo configure:1888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1888   rm -rf conftest*
1889   ac_cv_func_alloca_works=yes
1890 else
1891   echo "configure: failed program was:" >&5
1892   cat conftest.$ac_ext >&5
1893   rm -rf conftest*
1894   ac_cv_func_alloca_works=no
1895 fi
1896 rm -f conftest*
1897 fi
1898
1899 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1900 if test $ac_cv_func_alloca_works = yes; then
1901   cat >> confdefs.h <<\EOF
1902 #define HAVE_ALLOCA 1
1903 EOF
1904
1905 fi
1906
1907 if test $ac_cv_func_alloca_works = no; then
1908   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1909   # that cause trouble.  Some versions do not even contain alloca or
1910   # contain a buggy version.  If you still want to use their alloca,
1911   # use ar to extract alloca.o from them instead of compiling alloca.c.
1912   ALLOCA=alloca.${ac_objext}
1913   cat >> confdefs.h <<\EOF
1914 #define C_ALLOCA 1
1915 EOF
1916
1917
1918 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1919 echo "configure:1920: checking whether alloca needs Cray hooks" >&5
1920 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1921   echo $ac_n "(cached) $ac_c" 1>&6
1922 else
1923   cat > conftest.$ac_ext <<EOF
1924 #line 1925 "configure"
1925 #include "confdefs.h"
1926 #if defined(CRAY) && ! defined(CRAY2)
1927 webecray
1928 #else
1929 wenotbecray
1930 #endif
1931
1932 EOF
1933 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1934   egrep "webecray" >/dev/null 2>&1; then
1935   rm -rf conftest*
1936   ac_cv_os_cray=yes
1937 else
1938   rm -rf conftest*
1939   ac_cv_os_cray=no
1940 fi
1941 rm -f conftest*
1942
1943 fi
1944
1945 echo "$ac_t""$ac_cv_os_cray" 1>&6
1946 if test $ac_cv_os_cray = yes; then
1947 for ac_func in _getb67 GETB67 getb67; do
1948   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1949 echo "configure:1950: checking for $ac_func" >&5
1950 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1951   echo $ac_n "(cached) $ac_c" 1>&6
1952 else
1953   cat > conftest.$ac_ext <<EOF
1954 #line 1955 "configure"
1955 #include "confdefs.h"
1956 /* System header to define __stub macros and hopefully few prototypes,
1957     which can conflict with char $ac_func(); below.  */
1958 #include <assert.h>
1959 /* Override any gcc2 internal prototype to avoid an error.  */
1960 /* We use char because int might match the return type of a gcc2
1961     builtin and then its argument prototype would still apply.  */
1962 char $ac_func();
1963
1964 int main() {
1965
1966 /* The GNU C library defines this for functions which it implements
1967     to always fail with ENOSYS.  Some functions are actually named
1968     something starting with __ and the normal name is an alias.  */
1969 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1970 choke me
1971 #else
1972 $ac_func();
1973 #endif
1974
1975 ; return 0; }
1976 EOF
1977 if { (eval echo configure:1978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1978   rm -rf conftest*
1979   eval "ac_cv_func_$ac_func=yes"
1980 else
1981   echo "configure: failed program was:" >&5
1982   cat conftest.$ac_ext >&5
1983   rm -rf conftest*
1984   eval "ac_cv_func_$ac_func=no"
1985 fi
1986 rm -f conftest*
1987 fi
1988
1989 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1990   echo "$ac_t""yes" 1>&6
1991   cat >> confdefs.h <<EOF
1992 #define CRAY_STACKSEG_END $ac_func
1993 EOF
1994
1995   break
1996 else
1997   echo "$ac_t""no" 1>&6
1998 fi
1999
2000 done
2001 fi
2002
2003 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
2004 echo "configure:2005: checking stack direction for C alloca" >&5
2005 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
2006   echo $ac_n "(cached) $ac_c" 1>&6
2007 else
2008   if test "$cross_compiling" = yes; then
2009   ac_cv_c_stack_direction=0
2010 else
2011   cat > conftest.$ac_ext <<EOF
2012 #line 2013 "configure"
2013 #include "confdefs.h"
2014 find_stack_direction ()
2015 {
2016   static char *addr = 0;
2017   auto char dummy;
2018   if (addr == 0)
2019     {
2020       addr = &dummy;
2021       return find_stack_direction ();
2022     }
2023   else
2024     return (&dummy > addr) ? 1 : -1;
2025 }
2026 main ()
2027 {
2028   exit (find_stack_direction() < 0);
2029 }
2030 EOF
2031 if { (eval echo configure:2032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2032 then
2033   ac_cv_c_stack_direction=1
2034 else
2035   echo "configure: failed program was:" >&5
2036   cat conftest.$ac_ext >&5
2037   rm -fr conftest*
2038   ac_cv_c_stack_direction=-1
2039 fi
2040 rm -fr conftest*
2041 fi
2042
2043 fi
2044
2045 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
2046 cat >> confdefs.h <<EOF
2047 #define STACK_DIRECTION $ac_cv_c_stack_direction
2048 EOF
2049
2050 fi
2051
2052 for ac_hdr in unistd.h
2053 do
2054 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2055 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2056 echo "configure:2057: checking for $ac_hdr" >&5
2057 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2058   echo $ac_n "(cached) $ac_c" 1>&6
2059 else
2060   cat > conftest.$ac_ext <<EOF
2061 #line 2062 "configure"
2062 #include "confdefs.h"
2063 #include <$ac_hdr>
2064 EOF
2065 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2066 { (eval echo configure:2067: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2067 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2068 if test -z "$ac_err"; then
2069   rm -rf conftest*
2070   eval "ac_cv_header_$ac_safe=yes"
2071 else
2072   echo "$ac_err" >&5
2073   echo "configure: failed program was:" >&5
2074   cat conftest.$ac_ext >&5
2075   rm -rf conftest*
2076   eval "ac_cv_header_$ac_safe=no"
2077 fi
2078 rm -f conftest*
2079 fi
2080 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2081   echo "$ac_t""yes" 1>&6
2082     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2083   cat >> confdefs.h <<EOF
2084 #define $ac_tr_hdr 1
2085 EOF
2086  
2087 else
2088   echo "$ac_t""no" 1>&6
2089 fi
2090 done
2091
2092 for ac_func in getpagesize
2093 do
2094 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2095 echo "configure:2096: checking for $ac_func" >&5
2096 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2097   echo $ac_n "(cached) $ac_c" 1>&6
2098 else
2099   cat > conftest.$ac_ext <<EOF
2100 #line 2101 "configure"
2101 #include "confdefs.h"
2102 /* System header to define __stub macros and hopefully few prototypes,
2103     which can conflict with char $ac_func(); below.  */
2104 #include <assert.h>
2105 /* Override any gcc2 internal prototype to avoid an error.  */
2106 /* We use char because int might match the return type of a gcc2
2107     builtin and then its argument prototype would still apply.  */
2108 char $ac_func();
2109
2110 int main() {
2111
2112 /* The GNU C library defines this for functions which it implements
2113     to always fail with ENOSYS.  Some functions are actually named
2114     something starting with __ and the normal name is an alias.  */
2115 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2116 choke me
2117 #else
2118 $ac_func();
2119 #endif
2120
2121 ; return 0; }
2122 EOF
2123 if { (eval echo configure:2124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2124   rm -rf conftest*
2125   eval "ac_cv_func_$ac_func=yes"
2126 else
2127   echo "configure: failed program was:" >&5
2128   cat conftest.$ac_ext >&5
2129   rm -rf conftest*
2130   eval "ac_cv_func_$ac_func=no"
2131 fi
2132 rm -f conftest*
2133 fi
2134
2135 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2136   echo "$ac_t""yes" 1>&6
2137     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2138   cat >> confdefs.h <<EOF
2139 #define $ac_tr_func 1
2140 EOF
2141  
2142 else
2143   echo "$ac_t""no" 1>&6
2144 fi
2145 done
2146
2147 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
2148 echo "configure:2149: checking for working mmap" >&5
2149 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
2150   echo $ac_n "(cached) $ac_c" 1>&6
2151 else
2152   if test "$cross_compiling" = yes; then
2153   ac_cv_func_mmap_fixed_mapped=no
2154 else
2155   cat > conftest.$ac_ext <<EOF
2156 #line 2157 "configure"
2157 #include "confdefs.h"
2158
2159 /* Thanks to Mike Haertel and Jim Avera for this test.
2160    Here is a matrix of mmap possibilities:
2161         mmap private not fixed
2162         mmap private fixed at somewhere currently unmapped
2163         mmap private fixed at somewhere already mapped
2164         mmap shared not fixed
2165         mmap shared fixed at somewhere currently unmapped
2166         mmap shared fixed at somewhere already mapped
2167    For private mappings, we should verify that changes cannot be read()
2168    back from the file, nor mmap's back from the file at a different
2169    address.  (There have been systems where private was not correctly
2170    implemented like the infamous i386 svr4.0, and systems where the
2171    VM page cache was not coherent with the filesystem buffer cache
2172    like early versions of FreeBSD and possibly contemporary NetBSD.)
2173    For shared mappings, we should conversely verify that changes get
2174    propogated back to all the places they're supposed to be.
2175
2176    Grep wants private fixed already mapped.
2177    The main things grep needs to know about mmap are:
2178    * does it exist and is it safe to write into the mmap'd area
2179    * how to use it (BSD variants)  */
2180 #include <sys/types.h>
2181 #include <fcntl.h>
2182 #include <sys/mman.h>
2183
2184 /* This mess was copied from the GNU getpagesize.h.  */
2185 #ifndef HAVE_GETPAGESIZE
2186 # ifdef HAVE_UNISTD_H
2187 #  include <unistd.h>
2188 # endif
2189
2190 /* Assume that all systems that can run configure have sys/param.h.  */
2191 # ifndef HAVE_SYS_PARAM_H
2192 #  define HAVE_SYS_PARAM_H 1
2193 # endif
2194
2195 # ifdef _SC_PAGESIZE
2196 #  define getpagesize() sysconf(_SC_PAGESIZE)
2197 # else /* no _SC_PAGESIZE */
2198 #  ifdef HAVE_SYS_PARAM_H
2199 #   include <sys/param.h>
2200 #   ifdef EXEC_PAGESIZE
2201 #    define getpagesize() EXEC_PAGESIZE
2202 #   else /* no EXEC_PAGESIZE */
2203 #    ifdef NBPG
2204 #     define getpagesize() NBPG * CLSIZE
2205 #     ifndef CLSIZE
2206 #      define CLSIZE 1
2207 #     endif /* no CLSIZE */
2208 #    else /* no NBPG */
2209 #     ifdef NBPC
2210 #      define getpagesize() NBPC
2211 #     else /* no NBPC */
2212 #      ifdef PAGESIZE
2213 #       define getpagesize() PAGESIZE
2214 #      endif /* PAGESIZE */
2215 #     endif /* no NBPC */
2216 #    endif /* no NBPG */
2217 #   endif /* no EXEC_PAGESIZE */
2218 #  else /* no HAVE_SYS_PARAM_H */
2219 #   define getpagesize() 8192   /* punt totally */
2220 #  endif /* no HAVE_SYS_PARAM_H */
2221 # endif /* no _SC_PAGESIZE */
2222
2223 #endif /* no HAVE_GETPAGESIZE */
2224
2225 #ifdef __cplusplus
2226 extern "C" { void *malloc(unsigned); }
2227 #else
2228 char *malloc();
2229 #endif
2230
2231 int
2232 main()
2233 {
2234         char *data, *data2, *data3;
2235         int i, pagesize;
2236         int fd;
2237
2238         pagesize = getpagesize();
2239
2240         /*
2241          * First, make a file with some known garbage in it.
2242          */
2243         data = malloc(pagesize);
2244         if (!data)
2245                 exit(1);
2246         for (i = 0; i < pagesize; ++i)
2247                 *(data + i) = rand();
2248         umask(0);
2249         fd = creat("conftestmmap", 0600);
2250         if (fd < 0)
2251                 exit(1);
2252         if (write(fd, data, pagesize) != pagesize)
2253                 exit(1);
2254         close(fd);
2255
2256         /*
2257          * Next, try to mmap the file at a fixed address which
2258          * already has something else allocated at it.  If we can,
2259          * also make sure that we see the same garbage.
2260          */
2261         fd = open("conftestmmap", O_RDWR);
2262         if (fd < 0)
2263                 exit(1);
2264         data2 = malloc(2 * pagesize);
2265         if (!data2)
2266                 exit(1);
2267         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2268         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2269             MAP_PRIVATE | MAP_FIXED, fd, 0L))
2270                 exit(1);
2271         for (i = 0; i < pagesize; ++i)
2272                 if (*(data + i) != *(data2 + i))
2273                         exit(1);
2274
2275         /*
2276          * Finally, make sure that changes to the mapped area
2277          * do not percolate back to the file as seen by read().
2278          * (This is a bug on some variants of i386 svr4.0.)
2279          */
2280         for (i = 0; i < pagesize; ++i)
2281                 *(data2 + i) = *(data2 + i) + 1;
2282         data3 = malloc(pagesize);
2283         if (!data3)
2284                 exit(1);
2285         if (read(fd, data3, pagesize) != pagesize)
2286                 exit(1);
2287         for (i = 0; i < pagesize; ++i)
2288                 if (*(data + i) != *(data3 + i))
2289                         exit(1);
2290         close(fd);
2291         unlink("conftestmmap");
2292         exit(0);
2293 }
2294
2295 EOF
2296 if { (eval echo configure:2297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2297 then
2298   ac_cv_func_mmap_fixed_mapped=yes
2299 else
2300   echo "configure: failed program was:" >&5
2301   cat conftest.$ac_ext >&5
2302   rm -fr conftest*
2303   ac_cv_func_mmap_fixed_mapped=no
2304 fi
2305 rm -fr conftest*
2306 fi
2307
2308 fi
2309
2310 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2311 if test $ac_cv_func_mmap_fixed_mapped = yes; then
2312   cat >> confdefs.h <<\EOF
2313 #define HAVE_MMAP 1
2314 EOF
2315
2316 fi
2317
2318 for ac_func in strdup strstr strcasecmp strncasecmp
2319 do
2320 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2321 echo "configure:2322: checking for $ac_func" >&5
2322 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2323   echo $ac_n "(cached) $ac_c" 1>&6
2324 else
2325   cat > conftest.$ac_ext <<EOF
2326 #line 2327 "configure"
2327 #include "confdefs.h"
2328 /* System header to define __stub macros and hopefully few prototypes,
2329     which can conflict with char $ac_func(); below.  */
2330 #include <assert.h>
2331 /* Override any gcc2 internal prototype to avoid an error.  */
2332 /* We use char because int might match the return type of a gcc2
2333     builtin and then its argument prototype would still apply.  */
2334 char $ac_func();
2335
2336 int main() {
2337
2338 /* The GNU C library defines this for functions which it implements
2339     to always fail with ENOSYS.  Some functions are actually named
2340     something starting with __ and the normal name is an alias.  */
2341 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2342 choke me
2343 #else
2344 $ac_func();
2345 #endif
2346
2347 ; return 0; }
2348 EOF
2349 if { (eval echo configure:2350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2350   rm -rf conftest*
2351   eval "ac_cv_func_$ac_func=yes"
2352 else
2353   echo "configure: failed program was:" >&5
2354   cat conftest.$ac_ext >&5
2355   rm -rf conftest*
2356   eval "ac_cv_func_$ac_func=no"
2357 fi
2358 rm -f conftest*
2359 fi
2360
2361 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2362   echo "$ac_t""yes" 1>&6
2363     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2364   cat >> confdefs.h <<EOF
2365 #define $ac_tr_func 1
2366 EOF
2367  
2368 else
2369   echo "$ac_t""no" 1>&6
2370 fi
2371 done
2372
2373 for ac_func in gettimeofday mktime strptime
2374 do
2375 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2376 echo "configure:2377: checking for $ac_func" >&5
2377 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2378   echo $ac_n "(cached) $ac_c" 1>&6
2379 else
2380   cat > conftest.$ac_ext <<EOF
2381 #line 2382 "configure"
2382 #include "confdefs.h"
2383 /* System header to define __stub macros and hopefully few prototypes,
2384     which can conflict with char $ac_func(); below.  */
2385 #include <assert.h>
2386 /* Override any gcc2 internal prototype to avoid an error.  */
2387 /* We use char because int might match the return type of a gcc2
2388     builtin and then its argument prototype would still apply.  */
2389 char $ac_func();
2390
2391 int main() {
2392
2393 /* The GNU C library defines this for functions which it implements
2394     to always fail with ENOSYS.  Some functions are actually named
2395     something starting with __ and the normal name is an alias.  */
2396 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2397 choke me
2398 #else
2399 $ac_func();
2400 #endif
2401
2402 ; return 0; }
2403 EOF
2404 if { (eval echo configure:2405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2405   rm -rf conftest*
2406   eval "ac_cv_func_$ac_func=yes"
2407 else
2408   echo "configure: failed program was:" >&5
2409   cat conftest.$ac_ext >&5
2410   rm -rf conftest*
2411   eval "ac_cv_func_$ac_func=no"
2412 fi
2413 rm -f conftest*
2414 fi
2415
2416 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2417   echo "$ac_t""yes" 1>&6
2418     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2419   cat >> confdefs.h <<EOF
2420 #define $ac_tr_func 1
2421 EOF
2422  
2423 else
2424   echo "$ac_t""no" 1>&6
2425 fi
2426 done
2427
2428 for ac_func in strerror snprintf vsnprintf select signal symlink access isatty
2429 do
2430 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2431 echo "configure:2432: checking for $ac_func" >&5
2432 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2433   echo $ac_n "(cached) $ac_c" 1>&6
2434 else
2435   cat > conftest.$ac_ext <<EOF
2436 #line 2437 "configure"
2437 #include "confdefs.h"
2438 /* System header to define __stub macros and hopefully few prototypes,
2439     which can conflict with char $ac_func(); below.  */
2440 #include <assert.h>
2441 /* Override any gcc2 internal prototype to avoid an error.  */
2442 /* We use char because int might match the return type of a gcc2
2443     builtin and then its argument prototype would still apply.  */
2444 char $ac_func();
2445
2446 int main() {
2447
2448 /* The GNU C library defines this for functions which it implements
2449     to always fail with ENOSYS.  Some functions are actually named
2450     something starting with __ and the normal name is an alias.  */
2451 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2452 choke me
2453 #else
2454 $ac_func();
2455 #endif
2456
2457 ; return 0; }
2458 EOF
2459 if { (eval echo configure:2460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2460   rm -rf conftest*
2461   eval "ac_cv_func_$ac_func=yes"
2462 else
2463   echo "configure: failed program was:" >&5
2464   cat conftest.$ac_ext >&5
2465   rm -rf conftest*
2466   eval "ac_cv_func_$ac_func=no"
2467 fi
2468 rm -f conftest*
2469 fi
2470
2471 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2472   echo "$ac_t""yes" 1>&6
2473     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2474   cat >> confdefs.h <<EOF
2475 #define $ac_tr_func 1
2476 EOF
2477  
2478 else
2479   echo "$ac_t""no" 1>&6
2480 fi
2481 done
2482
2483 for ac_func in uname gethostname
2484 do
2485 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2486 echo "configure:2487: checking for $ac_func" >&5
2487 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2488   echo $ac_n "(cached) $ac_c" 1>&6
2489 else
2490   cat > conftest.$ac_ext <<EOF
2491 #line 2492 "configure"
2492 #include "confdefs.h"
2493 /* System header to define __stub macros and hopefully few prototypes,
2494     which can conflict with char $ac_func(); below.  */
2495 #include <assert.h>
2496 /* Override any gcc2 internal prototype to avoid an error.  */
2497 /* We use char because int might match the return type of a gcc2
2498     builtin and then its argument prototype would still apply.  */
2499 char $ac_func();
2500
2501 int main() {
2502
2503 /* The GNU C library defines this for functions which it implements
2504     to always fail with ENOSYS.  Some functions are actually named
2505     something starting with __ and the normal name is an alias.  */
2506 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2507 choke me
2508 #else
2509 $ac_func();
2510 #endif
2511
2512 ; return 0; }
2513 EOF
2514 if { (eval echo configure:2515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2515   rm -rf conftest*
2516   eval "ac_cv_func_$ac_func=yes"
2517 else
2518   echo "configure: failed program was:" >&5
2519   cat conftest.$ac_ext >&5
2520   rm -rf conftest*
2521   eval "ac_cv_func_$ac_func=no"
2522 fi
2523 rm -f conftest*
2524 fi
2525
2526 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2527   echo "$ac_t""yes" 1>&6
2528     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2529   cat >> confdefs.h <<EOF
2530 #define $ac_tr_func 1
2531 EOF
2532  
2533 else
2534   echo "$ac_t""no" 1>&6
2535 fi
2536 done
2537
2538
2539 for ac_func in gethostbyname
2540 do
2541 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2542 echo "configure:2543: checking for $ac_func" >&5
2543 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2544   echo $ac_n "(cached) $ac_c" 1>&6
2545 else
2546   cat > conftest.$ac_ext <<EOF
2547 #line 2548 "configure"
2548 #include "confdefs.h"
2549 /* System header to define __stub macros and hopefully few prototypes,
2550     which can conflict with char $ac_func(); below.  */
2551 #include <assert.h>
2552 /* Override any gcc2 internal prototype to avoid an error.  */
2553 /* We use char because int might match the return type of a gcc2
2554     builtin and then its argument prototype would still apply.  */
2555 char $ac_func();
2556
2557 int main() {
2558
2559 /* The GNU C library defines this for functions which it implements
2560     to always fail with ENOSYS.  Some functions are actually named
2561     something starting with __ and the normal name is an alias.  */
2562 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2563 choke me
2564 #else
2565 $ac_func();
2566 #endif
2567
2568 ; return 0; }
2569 EOF
2570 if { (eval echo configure:2571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2571   rm -rf conftest*
2572   eval "ac_cv_func_$ac_func=yes"
2573 else
2574   echo "configure: failed program was:" >&5
2575   cat conftest.$ac_ext >&5
2576   rm -rf conftest*
2577   eval "ac_cv_func_$ac_func=no"
2578 fi
2579 rm -f conftest*
2580 fi
2581
2582 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2583   echo "$ac_t""yes" 1>&6
2584     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2585   cat >> confdefs.h <<EOF
2586 #define $ac_tr_func 1
2587 EOF
2588  
2589 else
2590   echo "$ac_t""no" 1>&6
2591 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2592 echo "configure:2593: checking for gethostbyname in -lnsl" >&5
2593 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2594 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2595   echo $ac_n "(cached) $ac_c" 1>&6
2596 else
2597   ac_save_LIBS="$LIBS"
2598 LIBS="-lnsl  $LIBS"
2599 cat > conftest.$ac_ext <<EOF
2600 #line 2601 "configure"
2601 #include "confdefs.h"
2602 /* Override any gcc2 internal prototype to avoid an error.  */
2603 /* We use char because int might match the return type of a gcc2
2604     builtin and then its argument prototype would still apply.  */
2605 char gethostbyname();
2606
2607 int main() {
2608 gethostbyname()
2609 ; return 0; }
2610 EOF
2611 if { (eval echo configure:2612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2612   rm -rf conftest*
2613   eval "ac_cv_lib_$ac_lib_var=yes"
2614 else
2615   echo "configure: failed program was:" >&5
2616   cat conftest.$ac_ext >&5
2617   rm -rf conftest*
2618   eval "ac_cv_lib_$ac_lib_var=no"
2619 fi
2620 rm -f conftest*
2621 LIBS="$ac_save_LIBS"
2622
2623 fi
2624 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2625   echo "$ac_t""yes" 1>&6
2626     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/^a-zA-Z0-9_/_/g' \
2627     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2628   cat >> confdefs.h <<EOF
2629 #define $ac_tr_lib 1
2630 EOF
2631
2632   LIBS="-lnsl $LIBS"
2633
2634 else
2635   echo "$ac_t""no" 1>&6
2636 fi
2637
2638
2639 fi
2640 done
2641
2642
2643
2644 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
2645 echo "configure:2646: checking for socket in -lsocket" >&5
2646 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
2647 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2648   echo $ac_n "(cached) $ac_c" 1>&6
2649 else
2650   ac_save_LIBS="$LIBS"
2651 LIBS="-lsocket  $LIBS"
2652 cat > conftest.$ac_ext <<EOF
2653 #line 2654 "configure"
2654 #include "confdefs.h"
2655 /* Override any gcc2 internal prototype to avoid an error.  */
2656 /* We use char because int might match the return type of a gcc2
2657     builtin and then its argument prototype would still apply.  */
2658 char socket();
2659
2660 int main() {
2661 socket()
2662 ; return 0; }
2663 EOF
2664 if { (eval echo configure:2665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2665   rm -rf conftest*
2666   eval "ac_cv_lib_$ac_lib_var=yes"
2667 else
2668   echo "configure: failed program was:" >&5
2669   cat conftest.$ac_ext >&5
2670   rm -rf conftest*
2671   eval "ac_cv_lib_$ac_lib_var=no"
2672 fi
2673 rm -f conftest*
2674 LIBS="$ac_save_LIBS"
2675
2676 fi
2677 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2678   echo "$ac_t""yes" 1>&6
2679     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2680     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2681   cat >> confdefs.h <<EOF
2682 #define $ac_tr_lib 1
2683 EOF
2684
2685   LIBS="-lsocket $LIBS"
2686
2687 else
2688   echo "$ac_t""no" 1>&6
2689 fi
2690
2691
2692 if test "x${with_socks}" = xyes
2693 then
2694   echo $ac_n "checking for main in -lresolv""... $ac_c" 1>&6
2695 echo "configure:2696: checking for main in -lresolv" >&5
2696 ac_lib_var=`echo resolv'_'main | sed 'y%./+-%__p_%'`
2697 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2698   echo $ac_n "(cached) $ac_c" 1>&6
2699 else
2700   ac_save_LIBS="$LIBS"
2701 LIBS="-lresolv  $LIBS"
2702 cat > conftest.$ac_ext <<EOF
2703 #line 2704 "configure"
2704 #include "confdefs.h"
2705
2706 int main() {
2707 main()
2708 ; return 0; }
2709 EOF
2710 if { (eval echo configure:2711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2711   rm -rf conftest*
2712   eval "ac_cv_lib_$ac_lib_var=yes"
2713 else
2714   echo "configure: failed program was:" >&5
2715   cat conftest.$ac_ext >&5
2716   rm -rf conftest*
2717   eval "ac_cv_lib_$ac_lib_var=no"
2718 fi
2719 rm -f conftest*
2720 LIBS="$ac_save_LIBS"
2721
2722 fi
2723 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2724   echo "$ac_t""yes" 1>&6
2725     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2726     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2727   cat >> confdefs.h <<EOF
2728 #define $ac_tr_lib 1
2729 EOF
2730
2731   LIBS="-lresolv $LIBS"
2732
2733 else
2734   echo "$ac_t""no" 1>&6
2735 fi
2736
2737   echo $ac_n "checking for Rconnect in -lsocks""... $ac_c" 1>&6
2738 echo "configure:2739: checking for Rconnect in -lsocks" >&5
2739 ac_lib_var=`echo socks'_'Rconnect | sed 'y%./+-%__p_%'`
2740 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2741   echo $ac_n "(cached) $ac_c" 1>&6
2742 else
2743   ac_save_LIBS="$LIBS"
2744 LIBS="-lsocks  $LIBS"
2745 cat > conftest.$ac_ext <<EOF
2746 #line 2747 "configure"
2747 #include "confdefs.h"
2748 /* Override any gcc2 internal prototype to avoid an error.  */
2749 /* We use char because int might match the return type of a gcc2
2750     builtin and then its argument prototype would still apply.  */
2751 char Rconnect();
2752
2753 int main() {
2754 Rconnect()
2755 ; return 0; }
2756 EOF
2757 if { (eval echo configure:2758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2758   rm -rf conftest*
2759   eval "ac_cv_lib_$ac_lib_var=yes"
2760 else
2761   echo "configure: failed program was:" >&5
2762   cat conftest.$ac_ext >&5
2763   rm -rf conftest*
2764   eval "ac_cv_lib_$ac_lib_var=no"
2765 fi
2766 rm -f conftest*
2767 LIBS="$ac_save_LIBS"
2768
2769 fi
2770 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2771   echo "$ac_t""yes" 1>&6
2772     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2773     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2774   cat >> confdefs.h <<EOF
2775 #define $ac_tr_lib 1
2776 EOF
2777
2778   LIBS="-lsocks $LIBS"
2779
2780 else
2781   echo "$ac_t""no" 1>&6
2782 fi
2783
2784 fi
2785
2786 if test "x${with_ssl}" = xyes
2787 then
2788   ssl_lose=no
2789   echo $ac_n "checking for SSL_new in -lssl""... $ac_c" 1>&6
2790 echo "configure:2791: checking for SSL_new in -lssl" >&5
2791 ac_lib_var=`echo ssl'_'SSL_new | sed 'y%./+-%__p_%'`
2792 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2793   echo $ac_n "(cached) $ac_c" 1>&6
2794 else
2795   ac_save_LIBS="$LIBS"
2796 LIBS="-lssl -lcrypto $LIBS"
2797 cat > conftest.$ac_ext <<EOF
2798 #line 2799 "configure"
2799 #include "confdefs.h"
2800 /* Override any gcc2 internal prototype to avoid an error.  */
2801 /* We use char because int might match the return type of a gcc2
2802     builtin and then its argument prototype would still apply.  */
2803 char SSL_new();
2804
2805 int main() {
2806 SSL_new()
2807 ; return 0; }
2808 EOF
2809 if { (eval echo configure:2810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2810   rm -rf conftest*
2811   eval "ac_cv_lib_$ac_lib_var=yes"
2812 else
2813   echo "configure: failed program was:" >&5
2814   cat conftest.$ac_ext >&5
2815   rm -rf conftest*
2816   eval "ac_cv_lib_$ac_lib_var=no"
2817 fi
2818 rm -f conftest*
2819 LIBS="$ac_save_LIBS"
2820
2821 fi
2822 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2823   echo "$ac_t""yes" 1>&6
2824     ac_tr_lib=HAVE_LIB`echo ssl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2825     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2826   cat >> confdefs.h <<EOF
2827 #define $ac_tr_lib 1
2828 EOF
2829
2830   LIBS="-lssl $LIBS"
2831
2832 else
2833   echo "$ac_t""no" 1>&6
2834 ssl_lose=yes
2835 fi
2836
2837   echo $ac_n "checking for main in -lcrypto""... $ac_c" 1>&6
2838 echo "configure:2839: checking for main in -lcrypto" >&5
2839 ac_lib_var=`echo crypto'_'main | sed 'y%./+-%__p_%'`
2840 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2841   echo $ac_n "(cached) $ac_c" 1>&6
2842 else
2843   ac_save_LIBS="$LIBS"
2844 LIBS="-lcrypto  $LIBS"
2845 cat > conftest.$ac_ext <<EOF
2846 #line 2847 "configure"
2847 #include "confdefs.h"
2848
2849 int main() {
2850 main()
2851 ; return 0; }
2852 EOF
2853 if { (eval echo configure:2854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2854   rm -rf conftest*
2855   eval "ac_cv_lib_$ac_lib_var=yes"
2856 else
2857   echo "configure: failed program was:" >&5
2858   cat conftest.$ac_ext >&5
2859   rm -rf conftest*
2860   eval "ac_cv_lib_$ac_lib_var=no"
2861 fi
2862 rm -f conftest*
2863 LIBS="$ac_save_LIBS"
2864
2865 fi
2866 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2867   echo "$ac_t""yes" 1>&6
2868     ac_tr_lib=HAVE_LIB`echo crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2869     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2870   cat >> confdefs.h <<EOF
2871 #define $ac_tr_lib 1
2872 EOF
2873
2874   LIBS="-lcrypto $LIBS"
2875
2876 else
2877   echo "$ac_t""no" 1>&6
2878 ssl_lose=yes
2879 fi
2880
2881   if test "$ssl_lose" = no
2882   then
2883     cat >> confdefs.h <<\EOF
2884 #define HAVE_SSL 1
2885 EOF
2886
2887     SSL_OBJ='gen_sslfunc$o'
2888     
2889   fi
2890 fi
2891
2892 ALL_LINGUAS=`(cd ${srcdir}/po && ls *.po | sed -e 's/\.po$//')`
2893
2894
2895 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
2896 echo "configure:2897: checking whether NLS is requested" >&5
2897         # Check whether --enable-nls or --disable-nls was given.
2898 if test "${enable_nls+set}" = set; then
2899   enableval="$enable_nls"
2900   HAVE_NLS=$enableval
2901 else
2902   HAVE_NLS=yes
2903 fi
2904
2905     echo "$ac_t""$HAVE_NLS" 1>&6
2906
2907             
2908     if test x"$HAVE_NLS" = xyes; then
2909       echo "$ac_t"""language catalogs: $ALL_LINGUAS"" 1>&6
2910       # Extract the first word of "msgfmt", so it can be a program name with args.
2911 set dummy msgfmt; ac_word=$2
2912 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2913 echo "configure:2914: checking for $ac_word" >&5
2914 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2915   echo $ac_n "(cached) $ac_c" 1>&6
2916 else
2917   case "$MSGFMT" in
2918   /*)
2919   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2920   ;;
2921   *)
2922   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2923   for ac_dir in $PATH; do
2924     test -z "$ac_dir" && ac_dir=.
2925     if test -f $ac_dir/$ac_word; then
2926       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2927         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2928         break
2929       fi
2930     fi
2931   done
2932   IFS="$ac_save_ifs"
2933   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2934   ;;
2935 esac
2936 fi
2937 MSGFMT="$ac_cv_path_MSGFMT"
2938 if test -n "$MSGFMT"; then
2939   echo "$ac_t""$MSGFMT" 1>&6
2940 else
2941   echo "$ac_t""no" 1>&6
2942 fi
2943
2944       # Extract the first word of "xgettext", so it can be a program name with args.
2945 set dummy xgettext; ac_word=$2
2946 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2947 echo "configure:2948: checking for $ac_word" >&5
2948 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2949   echo $ac_n "(cached) $ac_c" 1>&6
2950 else
2951   case "$XGETTEXT" in
2952   /*)
2953   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2954   ;;
2955   *)
2956   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2957   for ac_dir in $PATH; do
2958     test -z "$ac_dir" && ac_dir=.
2959     if test -f $ac_dir/$ac_word; then
2960       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2961         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2962         break
2963       fi
2964     fi
2965   done
2966   IFS="$ac_save_ifs"
2967   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2968   ;;
2969 esac
2970 fi
2971 XGETTEXT="$ac_cv_path_XGETTEXT"
2972 if test -n "$XGETTEXT"; then
2973   echo "$ac_t""$XGETTEXT" 1>&6
2974 else
2975   echo "$ac_t""no" 1>&6
2976 fi
2977
2978       
2979       # Extract the first word of "gmsgfmt", so it can be a program name with args.
2980 set dummy gmsgfmt; ac_word=$2
2981 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2982 echo "configure:2983: checking for $ac_word" >&5
2983 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2984   echo $ac_n "(cached) $ac_c" 1>&6
2985 else
2986   case "$GMSGFMT" in
2987   /*)
2988   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2989   ;;
2990   ?:/*)                  
2991   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2992   ;;
2993   *)
2994   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2995   ac_dummy="$PATH"
2996   for ac_dir in $ac_dummy; do 
2997     test -z "$ac_dir" && ac_dir=.
2998     if test -f $ac_dir/$ac_word; then
2999       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3000       break
3001     fi
3002   done
3003   IFS="$ac_save_ifs"
3004   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
3005   ;;
3006 esac
3007 fi
3008 GMSGFMT="$ac_cv_path_GMSGFMT"
3009 if test -n "$GMSGFMT"; then
3010   echo "$ac_t""$GMSGFMT" 1>&6
3011 else
3012   echo "$ac_t""no" 1>&6
3013 fi
3014
3015       CATOBJEXT=.gmo
3016       INSTOBJEXT=.mo
3017       DATADIRNAME=share
3018
3019             if test "$XGETTEXT" != ":"; then
3020                         if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3021           : ;
3022         else
3023           echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
3024           XGETTEXT=":"
3025         fi
3026       fi
3027
3028       for ac_hdr in locale.h libintl.h
3029 do
3030 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3031 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3032 echo "configure:3033: checking for $ac_hdr" >&5
3033 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3034   echo $ac_n "(cached) $ac_c" 1>&6
3035 else
3036   cat > conftest.$ac_ext <<EOF
3037 #line 3038 "configure"
3038 #include "confdefs.h"
3039 #include <$ac_hdr>
3040 EOF
3041 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3042 { (eval echo configure:3043: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3043 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3044 if test -z "$ac_err"; then
3045   rm -rf conftest*
3046   eval "ac_cv_header_$ac_safe=yes"
3047 else
3048   echo "$ac_err" >&5
3049   echo "configure: failed program was:" >&5
3050   cat conftest.$ac_ext >&5
3051   rm -rf conftest*
3052   eval "ac_cv_header_$ac_safe=no"
3053 fi
3054 rm -f conftest*
3055 fi
3056 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3057   echo "$ac_t""yes" 1>&6
3058     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3059   cat >> confdefs.h <<EOF
3060 #define $ac_tr_hdr 1
3061 EOF
3062  
3063 else
3064   echo "$ac_t""no" 1>&6
3065 fi
3066 done
3067
3068
3069       for ac_func in gettext
3070 do
3071 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3072 echo "configure:3073: checking for $ac_func" >&5
3073 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3074   echo $ac_n "(cached) $ac_c" 1>&6
3075 else
3076   cat > conftest.$ac_ext <<EOF
3077 #line 3078 "configure"
3078 #include "confdefs.h"
3079 /* System header to define __stub macros and hopefully few prototypes,
3080     which can conflict with char $ac_func(); below.  */
3081 #include <assert.h>
3082 /* Override any gcc2 internal prototype to avoid an error.  */
3083 /* We use char because int might match the return type of a gcc2
3084     builtin and then its argument prototype would still apply.  */
3085 char $ac_func();
3086
3087 int main() {
3088
3089 /* The GNU C library defines this for functions which it implements
3090     to always fail with ENOSYS.  Some functions are actually named
3091     something starting with __ and the normal name is an alias.  */
3092 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3093 choke me
3094 #else
3095 $ac_func();
3096 #endif
3097
3098 ; return 0; }
3099 EOF
3100 if { (eval echo configure:3101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3101   rm -rf conftest*
3102   eval "ac_cv_func_$ac_func=yes"
3103 else
3104   echo "configure: failed program was:" >&5
3105   cat conftest.$ac_ext >&5
3106   rm -rf conftest*
3107   eval "ac_cv_func_$ac_func=no"
3108 fi
3109 rm -f conftest*
3110 fi
3111
3112 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3113   echo "$ac_t""yes" 1>&6
3114     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3115   cat >> confdefs.h <<EOF
3116 #define $ac_tr_func 1
3117 EOF
3118  
3119 else
3120   echo "$ac_t""no" 1>&6
3121 echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
3122 echo "configure:3123: checking for gettext in -lintl" >&5
3123 ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
3124 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3125   echo $ac_n "(cached) $ac_c" 1>&6
3126 else
3127   ac_save_LIBS="$LIBS"
3128 LIBS="-lintl  $LIBS"
3129 cat > conftest.$ac_ext <<EOF
3130 #line 3131 "configure"
3131 #include "confdefs.h"
3132 /* Override any gcc2 internal prototype to avoid an error.  */
3133 /* We use char because int might match the return type of a gcc2
3134     builtin and then its argument prototype would still apply.  */
3135 char gettext();
3136
3137 int main() {
3138 gettext()
3139 ; return 0; }
3140 EOF
3141 if { (eval echo configure:3142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3142   rm -rf conftest*
3143   eval "ac_cv_lib_$ac_lib_var=yes"
3144 else
3145   echo "configure: failed program was:" >&5
3146   cat conftest.$ac_ext >&5
3147   rm -rf conftest*
3148   eval "ac_cv_lib_$ac_lib_var=no"
3149 fi
3150 rm -f conftest*
3151 LIBS="$ac_save_LIBS"
3152
3153 fi
3154 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3155   echo "$ac_t""yes" 1>&6
3156   
3157                     LIBS="-lintl $LIBS"
3158           cat >> confdefs.h <<\EOF
3159 #define HAVE_GETTEXT 1
3160 EOF
3161
3162         
3163 else
3164   echo "$ac_t""no" 1>&6
3165
3166           echo "$ac_t""gettext not found; disabling NLS" 1>&6
3167           HAVE_NLS=no
3168         
3169 fi
3170
3171       
3172 fi
3173 done
3174
3175
3176                         for lang in $ALL_LINGUAS; do
3177         GMOFILES="$GMOFILES $lang.gmo"
3178         POFILES="$POFILES $lang.po"
3179       done
3180             for lang in $ALL_LINGUAS; do
3181         CATALOGS="$CATALOGS ${lang}${CATOBJEXT}"
3182       done
3183
3184             
3185       
3186       
3187       
3188       
3189       
3190       
3191     fi
3192     
3193             USE_NLS=$HAVE_NLS
3194     
3195     if test "x$HAVE_NLS" = xyes; then
3196       cat >> confdefs.h <<\EOF
3197 #define HAVE_NLS 1
3198 EOF
3199
3200     fi
3201   
3202
3203
3204 for ac_prog in makeinfo emacs xemacs
3205 do
3206 # Extract the first word of "$ac_prog", so it can be a program name with args.
3207 set dummy $ac_prog; ac_word=$2
3208 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3209 echo "configure:3210: checking for $ac_word" >&5
3210 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
3211   echo $ac_n "(cached) $ac_c" 1>&6
3212 else
3213   if test -n "$MAKEINFO"; then
3214   ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
3215 else
3216   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3217   ac_dummy="$PATH"
3218   for ac_dir in $ac_dummy; do
3219     test -z "$ac_dir" && ac_dir=.
3220     if test -f $ac_dir/$ac_word; then
3221       ac_cv_prog_MAKEINFO="$ac_prog"
3222       break
3223     fi
3224   done
3225   IFS="$ac_save_ifs"
3226 fi
3227 fi
3228 MAKEINFO="$ac_cv_prog_MAKEINFO"
3229 if test -n "$MAKEINFO"; then
3230   echo "$ac_t""$MAKEINFO" 1>&6
3231 else
3232   echo "$ac_t""no" 1>&6
3233 fi
3234
3235 test -n "$MAKEINFO" && break
3236 done
3237
3238
3239 case "${MAKEINFO}" in
3240    *makeinfo) MAKEINFO="${MAKEINFO} \$(srcdir)/wget.texi"  ;;
3241    *emacs | *xemacs) MAKEINFO="${MAKEINFO} -batch -q -no-site-file -eval '(find-file \"\$(srcdir)/wget.texi\")' -l texinfmt -f texinfo-format-buffer -f save-buffer"  ;;
3242    *) MAKEINFO="makeinfo \$(srcdir)/wget.texi"            ;;
3243 esac
3244
3245 trap '' 1 2 15
3246 cat > confcache <<\EOF
3247 # This file is a shell script that caches the results of configure
3248 # tests run on this system so they can be shared between configure
3249 # scripts and configure runs.  It is not useful on other systems.
3250 # If it contains results you don't want to keep, you may remove or edit it.
3251 #
3252 # By default, configure uses ./config.cache as the cache file,
3253 # creating it if it does not exist already.  You can give configure
3254 # the --cache-file=FILE option to use a different cache file; that is
3255 # what configure does when it calls configure scripts in
3256 # subdirectories, so they share the cache.
3257 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3258 # config.status only pays attention to the cache file if you give it the
3259 # --recheck option to rerun configure.
3260 #
3261 EOF
3262 # The following way of writing the cache mishandles newlines in values,
3263 # but we know of no workaround that is simple, portable, and efficient.
3264 # So, don't put newlines in cache variables' values.
3265 # Ultrix sh set writes to stderr and can't be redirected directly,
3266 # and sets the high bit in the cache file unless we assign to the vars.
3267 (set) 2>&1 |
3268   case `(ac_space=' '; set | grep ac_space) 2>&1` in
3269   *ac_space=\ *)
3270     # `set' does not quote correctly, so add quotes (double-quote substitution
3271     # turns \\\\ into \\, and sed turns \\ into \).
3272     sed -n \
3273       -e "s/'/'\\\\''/g" \
3274       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3275     ;;
3276   *)
3277     # `set' quotes correctly as required by POSIX, so do not add quotes.
3278     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3279     ;;
3280   esac >> confcache
3281 if cmp -s $cache_file confcache; then
3282   :
3283 else
3284   if test -w $cache_file; then
3285     echo "updating cache $cache_file"
3286     cat confcache > $cache_file
3287   else
3288     echo "not updating unwritable cache $cache_file"
3289   fi
3290 fi
3291 rm -f confcache
3292
3293 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3294
3295 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3296 # Let make expand exec_prefix.
3297 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3298
3299 # Any assignment to VPATH causes Sun make to only execute
3300 # the first set of double-colon rules, so remove it if not needed.
3301 # If there is a colon in the path, we need to keep it.
3302 if test "x$srcdir" = x.; then
3303   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
3304 fi
3305
3306 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3307
3308 DEFS=-DHAVE_CONFIG_H
3309
3310 # Without the "./", some shells look in PATH for config.status.
3311 : ${CONFIG_STATUS=./config.status}
3312
3313 echo creating $CONFIG_STATUS
3314 rm -f $CONFIG_STATUS
3315 cat > $CONFIG_STATUS <<EOF
3316 #! /bin/sh
3317 # Generated automatically by configure.
3318 # Run this file to recreate the current configuration.
3319 # This directory was configured as follows,
3320 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3321 #
3322 # $0 $ac_configure_args
3323 #
3324 # Compiler output produced by configure, useful for debugging
3325 # configure, is in ./config.log if it exists.
3326
3327 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3328 for ac_option
3329 do
3330   case "\$ac_option" in
3331   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3332     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3333     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3334   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3335     echo "$CONFIG_STATUS generated by autoconf version 2.13"
3336     exit 0 ;;
3337   -help | --help | --hel | --he | --h)
3338     echo "\$ac_cs_usage"; exit 0 ;;
3339   *) echo "\$ac_cs_usage"; exit 1 ;;
3340   esac
3341 done
3342
3343 ac_given_srcdir=$srcdir
3344 ac_given_INSTALL="$INSTALL"
3345
3346 trap 'rm -fr `echo "Makefile src/Makefile doc/Makefile util/Makefile po/Makefile.in src/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3347 EOF
3348 cat >> $CONFIG_STATUS <<EOF
3349
3350 # Protect against being on the right side of a sed subst in config.status.
3351 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3352  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3353 $ac_vpsub
3354 $extrasub
3355 s%@SHELL@%$SHELL%g
3356 s%@CFLAGS@%$CFLAGS%g
3357 s%@CPPFLAGS@%$CPPFLAGS%g
3358 s%@CXXFLAGS@%$CXXFLAGS%g
3359 s%@FFLAGS@%$FFLAGS%g
3360 s%@DEFS@%$DEFS%g
3361 s%@LDFLAGS@%$LDFLAGS%g
3362 s%@LIBS@%$LIBS%g
3363 s%@exec_prefix@%$exec_prefix%g
3364 s%@prefix@%$prefix%g
3365 s%@program_transform_name@%$program_transform_name%g
3366 s%@bindir@%$bindir%g
3367 s%@sbindir@%$sbindir%g
3368 s%@libexecdir@%$libexecdir%g
3369 s%@datadir@%$datadir%g
3370 s%@sysconfdir@%$sysconfdir%g
3371 s%@sharedstatedir@%$sharedstatedir%g
3372 s%@localstatedir@%$localstatedir%g
3373 s%@libdir@%$libdir%g
3374 s%@includedir@%$includedir%g
3375 s%@oldincludedir@%$oldincludedir%g
3376 s%@infodir@%$infodir%g
3377 s%@mandir@%$mandir%g
3378 s%@VERSION@%$VERSION%g
3379 s%@PACKAGE@%$PACKAGE%g
3380 s%@host@%$host%g
3381 s%@host_alias@%$host_alias%g
3382 s%@host_cpu@%$host_cpu%g
3383 s%@host_vendor@%$host_vendor%g
3384 s%@host_os@%$host_os%g
3385 s%@MD5_OBJ@%$MD5_OBJ%g
3386 s%@OPIE_OBJ@%$OPIE_OBJ%g
3387 s%@SET_MAKE@%$SET_MAKE%g
3388 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3389 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3390 s%@INSTALL_DATA@%$INSTALL_DATA%g
3391 s%@CC@%$CC%g
3392 s%@CPP@%$CPP%g
3393 s%@exeext@%$exeext%g
3394 s%@U@%$U%g
3395 s%@ANSI2KNR@%$ANSI2KNR%g
3396 s%@ALLOCA@%$ALLOCA%g
3397 s%@SSL_OBJ@%$SSL_OBJ%g
3398 s%@MSGFMT@%$MSGFMT%g
3399 s%@XGETTEXT@%$XGETTEXT%g
3400 s%@GMSGFMT@%$GMSGFMT%g
3401 s%@CATALOGS@%$CATALOGS%g
3402 s%@CATOBJEXT@%$CATOBJEXT%g
3403 s%@DATADIRNAME@%$DATADIRNAME%g
3404 s%@GMOFILES@%$GMOFILES%g
3405 s%@INSTOBJEXT@%$INSTOBJEXT%g
3406 s%@INTLLIBS@%$INTLLIBS%g
3407 s%@POFILES@%$POFILES%g
3408 s%@HAVE_NLS@%$HAVE_NLS%g
3409 s%@USE_NLS@%$USE_NLS%g
3410 s%@MAKEINFO@%$MAKEINFO%g
3411
3412 CEOF
3413 EOF
3414
3415 cat >> $CONFIG_STATUS <<\EOF
3416
3417 # Split the substitutions into bite-sized pieces for seds with
3418 # small command number limits, like on Digital OSF/1 and HP-UX.
3419 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3420 ac_file=1 # Number of current file.
3421 ac_beg=1 # First line for current file.
3422 ac_end=$ac_max_sed_cmds # Line after last line for current file.
3423 ac_more_lines=:
3424 ac_sed_cmds=""
3425 while $ac_more_lines; do
3426   if test $ac_beg -gt 1; then
3427     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3428   else
3429     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3430   fi
3431   if test ! -s conftest.s$ac_file; then
3432     ac_more_lines=false
3433     rm -f conftest.s$ac_file
3434   else
3435     if test -z "$ac_sed_cmds"; then
3436       ac_sed_cmds="sed -f conftest.s$ac_file"
3437     else
3438       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3439     fi
3440     ac_file=`expr $ac_file + 1`
3441     ac_beg=$ac_end
3442     ac_end=`expr $ac_end + $ac_max_sed_cmds`
3443   fi
3444 done
3445 if test -z "$ac_sed_cmds"; then
3446   ac_sed_cmds=cat
3447 fi
3448 EOF
3449
3450 cat >> $CONFIG_STATUS <<EOF
3451
3452 CONFIG_FILES=\${CONFIG_FILES-"Makefile src/Makefile doc/Makefile util/Makefile po/Makefile.in"}
3453 EOF
3454 cat >> $CONFIG_STATUS <<\EOF
3455 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3456   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3457   case "$ac_file" in
3458   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3459        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3460   *) ac_file_in="${ac_file}.in" ;;
3461   esac
3462
3463   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3464
3465   # Remove last slash and all that follows it.  Not all systems have dirname.
3466   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3467   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3468     # The file is in a subdirectory.
3469     test ! -d "$ac_dir" && mkdir "$ac_dir"
3470     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3471     # A "../" for each directory in $ac_dir_suffix.
3472     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3473   else
3474     ac_dir_suffix= ac_dots=
3475   fi
3476
3477   case "$ac_given_srcdir" in
3478   .)  srcdir=.
3479       if test -z "$ac_dots"; then top_srcdir=.
3480       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3481   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3482   *) # Relative path.
3483     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3484     top_srcdir="$ac_dots$ac_given_srcdir" ;;
3485   esac
3486
3487   case "$ac_given_INSTALL" in
3488   [/$]*) INSTALL="$ac_given_INSTALL" ;;
3489   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3490   esac
3491
3492   echo creating "$ac_file"
3493   rm -f "$ac_file"
3494   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3495   case "$ac_file" in
3496   *Makefile*) ac_comsub="1i\\
3497 # $configure_input" ;;
3498   *) ac_comsub= ;;
3499   esac
3500
3501   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3502   sed -e "$ac_comsub
3503 s%@configure_input@%$configure_input%g
3504 s%@srcdir@%$srcdir%g
3505 s%@top_srcdir@%$top_srcdir%g
3506 s%@INSTALL@%$INSTALL%g
3507 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3508 fi; done
3509 rm -f conftest.s*
3510
3511 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3512 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3513 #
3514 # ac_d sets the value in "#define NAME VALUE" lines.
3515 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
3516 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
3517 ac_dC='\3'
3518 ac_dD='%g'
3519 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3520 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3521 ac_uB='\([      ]\)%\1#\2define\3'
3522 ac_uC=' '
3523 ac_uD='\4%g'
3524 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3525 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3526 ac_eB='$%\1#\2define\3'
3527 ac_eC=' '
3528 ac_eD='%g'
3529
3530 if test "${CONFIG_HEADERS+set}" != set; then
3531 EOF
3532 cat >> $CONFIG_STATUS <<EOF
3533   CONFIG_HEADERS="src/config.h"
3534 EOF
3535 cat >> $CONFIG_STATUS <<\EOF
3536 fi
3537 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3538   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3539   case "$ac_file" in
3540   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3541        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3542   *) ac_file_in="${ac_file}.in" ;;
3543   esac
3544
3545   echo creating $ac_file
3546
3547   rm -f conftest.frag conftest.in conftest.out
3548   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3549   cat $ac_file_inputs > conftest.in
3550
3551 EOF
3552
3553 # Transform confdefs.h into a sed script conftest.vals that substitutes
3554 # the proper values into config.h.in to produce config.h.  And first:
3555 # Protect against being on the right side of a sed subst in config.status.
3556 # Protect against being in an unquoted here document in config.status.
3557 rm -f conftest.vals
3558 cat > conftest.hdr <<\EOF
3559 s/[\\&%]/\\&/g
3560 s%[\\$`]%\\&%g
3561 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3562 s%ac_d%ac_u%gp
3563 s%ac_u%ac_e%gp
3564 EOF
3565 sed -n -f conftest.hdr confdefs.h > conftest.vals
3566 rm -f conftest.hdr
3567
3568 # This sed command replaces #undef with comments.  This is necessary, for
3569 # example, in the case of _POSIX_SOURCE, which is predefined and required
3570 # on some systems where configure will not decide to define it.
3571 cat >> conftest.vals <<\EOF
3572 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3573 EOF
3574
3575 # Break up conftest.vals because some shells have a limit on
3576 # the size of here documents, and old seds have small limits too.
3577
3578 rm -f conftest.tail
3579 while :
3580 do
3581   ac_lines=`grep -c . conftest.vals`
3582   # grep -c gives empty output for an empty file on some AIX systems.
3583   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3584   # Write a limited-size here document to conftest.frag.
3585   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3586   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3587   echo 'CEOF
3588   sed -f conftest.frag conftest.in > conftest.out
3589   rm -f conftest.in
3590   mv conftest.out conftest.in
3591 ' >> $CONFIG_STATUS
3592   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3593   rm -f conftest.vals
3594   mv conftest.tail conftest.vals
3595 done
3596 rm -f conftest.vals
3597
3598 cat >> $CONFIG_STATUS <<\EOF
3599   rm -f conftest.frag conftest.h
3600   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
3601   cat conftest.in >> conftest.h
3602   rm -f conftest.in
3603   if cmp -s $ac_file conftest.h 2>/dev/null; then
3604     echo "$ac_file is unchanged"
3605     rm -f conftest.h
3606   else
3607     # Remove last slash and all that follows it.  Not all systems have dirname.
3608       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3609       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3610       # The file is in a subdirectory.
3611       test ! -d "$ac_dir" && mkdir "$ac_dir"
3612     fi
3613     rm -f $ac_file
3614     mv conftest.h $ac_file
3615   fi
3616 fi; done
3617
3618 EOF
3619 cat >> $CONFIG_STATUS <<EOF
3620
3621 EOF
3622 cat >> $CONFIG_STATUS <<\EOF
3623 srcdir=$ac_given_srcdir # Advanced autoconf hackery
3624       if test "x$srcdir" != "x."; then
3625      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
3626        posrcprefix="$srcdir/"
3627      else
3628        posrcprefix="../$srcdir/"
3629      fi
3630    else
3631      posrcprefix="../"
3632    fi
3633    rm -f po/POTFILES
3634          echo "generating po/POTFILES from $srcdir/po/POTFILES.in"
3635    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\,"  \
3636        -e "\$s/\(.*\) \\\\/\1/" \
3637         < $srcdir/po/POTFILES.in > po/POTFILES
3638    echo "creating po/Makefile"
3639    sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
3640   
3641 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
3642 exit 0
3643 EOF
3644 chmod +x $CONFIG_STATUS
3645 rm -fr confdefs* $ac_clean_files
3646 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3647