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