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