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