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