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