Changed quoting of CODE_STATUS for use in make
[privoxy.git] / configure
1 #! /bin/sh
2
3 # From configure.in Revision: 1.23 
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=10
623 CODE_STATUS="\"beta\""
624
625
626
627
628
629
630
631 cat >> confdefs.h <<EOF
632 #define VERSION_MAJOR ${VERSION_MAJOR}
633 EOF
634
635 cat >> confdefs.h <<EOF
636 #define VERSION_MINOR ${VERSION_MINOR}
637 EOF
638
639 cat >> confdefs.h <<EOF
640 #define VERSION_POINT ${VERSION_POINT}
641 EOF
642
643 cat >> confdefs.h <<EOF
644 #define VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_POINT}"
645 EOF
646
647 cat >> confdefs.h <<EOF
648 #define CODE_STATUS ${CODE_STATUS}
649 EOF
650
651
652 PID_FILE_PATH="\"/etc/junkbuster"\"
653
654 # Extract the first word of "gcc", so it can be a program name with args.
655 set dummy gcc; ac_word=$2
656 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
657 echo "configure:658: checking for $ac_word" >&5
658 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
659   echo $ac_n "(cached) $ac_c" 1>&6
660 else
661   if test -n "$CC"; then
662   ac_cv_prog_CC="$CC" # Let the user override the test.
663 else
664   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
665   ac_dummy="$PATH"
666   for ac_dir in $ac_dummy; do
667     test -z "$ac_dir" && ac_dir=.
668     if test -f $ac_dir/$ac_word; then
669       ac_cv_prog_CC="gcc"
670       break
671     fi
672   done
673   IFS="$ac_save_ifs"
674 fi
675 fi
676 CC="$ac_cv_prog_CC"
677 if test -n "$CC"; then
678   echo "$ac_t""$CC" 1>&6
679 else
680   echo "$ac_t""no" 1>&6
681 fi
682
683 if test -z "$CC"; then
684   # Extract the first word of "cc", so it can be a program name with args.
685 set dummy cc; ac_word=$2
686 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
687 echo "configure:688: checking for $ac_word" >&5
688 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
689   echo $ac_n "(cached) $ac_c" 1>&6
690 else
691   if test -n "$CC"; then
692   ac_cv_prog_CC="$CC" # Let the user override the test.
693 else
694   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
695   ac_prog_rejected=no
696   ac_dummy="$PATH"
697   for ac_dir in $ac_dummy; do
698     test -z "$ac_dir" && ac_dir=.
699     if test -f $ac_dir/$ac_word; then
700       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
701         ac_prog_rejected=yes
702         continue
703       fi
704       ac_cv_prog_CC="cc"
705       break
706     fi
707   done
708   IFS="$ac_save_ifs"
709 if test $ac_prog_rejected = yes; then
710   # We found a bogon in the path, so make sure we never use it.
711   set dummy $ac_cv_prog_CC
712   shift
713   if test $# -gt 0; then
714     # We chose a different compiler from the bogus one.
715     # However, it has the same basename, so the bogon will be chosen
716     # first if we set CC to just the basename; use the full file name.
717     shift
718     set dummy "$ac_dir/$ac_word" "$@"
719     shift
720     ac_cv_prog_CC="$@"
721   fi
722 fi
723 fi
724 fi
725 CC="$ac_cv_prog_CC"
726 if test -n "$CC"; then
727   echo "$ac_t""$CC" 1>&6
728 else
729   echo "$ac_t""no" 1>&6
730 fi
731
732   if test -z "$CC"; then
733     case "`uname -s`" in
734     *win32* | *WIN32*)
735       # Extract the first word of "cl", so it can be a program name with args.
736 set dummy cl; ac_word=$2
737 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
738 echo "configure:739: checking for $ac_word" >&5
739 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
740   echo $ac_n "(cached) $ac_c" 1>&6
741 else
742   if test -n "$CC"; then
743   ac_cv_prog_CC="$CC" # Let the user override the test.
744 else
745   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
746   ac_dummy="$PATH"
747   for ac_dir in $ac_dummy; do
748     test -z "$ac_dir" && ac_dir=.
749     if test -f $ac_dir/$ac_word; then
750       ac_cv_prog_CC="cl"
751       break
752     fi
753   done
754   IFS="$ac_save_ifs"
755 fi
756 fi
757 CC="$ac_cv_prog_CC"
758 if test -n "$CC"; then
759   echo "$ac_t""$CC" 1>&6
760 else
761   echo "$ac_t""no" 1>&6
762 fi
763  ;;
764     esac
765   fi
766   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
767 fi
768
769 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
770 echo "configure:771: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
771
772 ac_ext=c
773 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
774 ac_cpp='$CPP $CPPFLAGS'
775 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
776 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
777 cross_compiling=$ac_cv_prog_cc_cross
778
779 cat > conftest.$ac_ext << EOF
780
781 #line 782 "configure"
782 #include "confdefs.h"
783
784 main(){return(0);}
785 EOF
786 if { (eval echo configure:787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
787   ac_cv_prog_cc_works=yes
788   # If we can't run a trivial program, we are probably using a cross compiler.
789   if (./conftest; exit) 2>/dev/null; then
790     ac_cv_prog_cc_cross=no
791   else
792     ac_cv_prog_cc_cross=yes
793   fi
794 else
795   echo "configure: failed program was:" >&5
796   cat conftest.$ac_ext >&5
797   ac_cv_prog_cc_works=no
798 fi
799 rm -fr conftest*
800 ac_ext=c
801 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
802 ac_cpp='$CPP $CPPFLAGS'
803 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
804 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
805 cross_compiling=$ac_cv_prog_cc_cross
806
807 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
808 if test $ac_cv_prog_cc_works = no; then
809   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
810 fi
811 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
812 echo "configure:813: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
813 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
814 cross_compiling=$ac_cv_prog_cc_cross
815
816 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
817 echo "configure:818: checking whether we are using GNU C" >&5
818 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
819   echo $ac_n "(cached) $ac_c" 1>&6
820 else
821   cat > conftest.c <<EOF
822 #ifdef __GNUC__
823   yes;
824 #endif
825 EOF
826 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
827   ac_cv_prog_gcc=yes
828 else
829   ac_cv_prog_gcc=no
830 fi
831 fi
832
833 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
834
835 if test $ac_cv_prog_gcc = yes; then
836   GCC=yes
837 else
838   GCC=
839 fi
840
841 ac_test_CFLAGS="${CFLAGS+set}"
842 ac_save_CFLAGS="$CFLAGS"
843 CFLAGS=
844 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
845 echo "configure:846: checking whether ${CC-cc} accepts -g" >&5
846 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
847   echo $ac_n "(cached) $ac_c" 1>&6
848 else
849   echo 'void f(){}' > conftest.c
850 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
851   ac_cv_prog_cc_g=yes
852 else
853   ac_cv_prog_cc_g=no
854 fi
855 rm -f conftest*
856
857 fi
858
859 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
860 if test "$ac_test_CFLAGS" = set; then
861   CFLAGS="$ac_save_CFLAGS"
862 elif test $ac_cv_prog_cc_g = yes; then
863   if test "$GCC" = yes; then
864     CFLAGS="-g -O2"
865   else
866     CFLAGS="-g"
867   fi
868 else
869   if test "$GCC" = yes; then
870     CFLAGS="-O2"
871   else
872     CFLAGS=
873   fi
874 fi
875
876 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
877 echo "configure:878: checking how to run the C preprocessor" >&5
878 # On Suns, sometimes $CPP names a directory.
879 if test -n "$CPP" && test -d "$CPP"; then
880   CPP=
881 fi
882 if test -z "$CPP"; then
883 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
884   echo $ac_n "(cached) $ac_c" 1>&6
885 else
886     # This must be in double quotes, not single quotes, because CPP may get
887   # substituted into the Makefile and "${CC-cc}" will confuse make.
888   CPP="${CC-cc} -E"
889   # On the NeXT, cc -E runs the code through the compiler's parser,
890   # not just through cpp.
891   cat > conftest.$ac_ext <<EOF
892 #line 893 "configure"
893 #include "confdefs.h"
894 #include <assert.h>
895 Syntax Error
896 EOF
897 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
898 { (eval echo configure:899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
899 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
900 if test -z "$ac_err"; then
901   :
902 else
903   echo "$ac_err" >&5
904   echo "configure: failed program was:" >&5
905   cat conftest.$ac_ext >&5
906   rm -rf conftest*
907   CPP="${CC-cc} -E -traditional-cpp"
908   cat > conftest.$ac_ext <<EOF
909 #line 910 "configure"
910 #include "confdefs.h"
911 #include <assert.h>
912 Syntax Error
913 EOF
914 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
915 { (eval echo configure:916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
916 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
917 if test -z "$ac_err"; then
918   :
919 else
920   echo "$ac_err" >&5
921   echo "configure: failed program was:" >&5
922   cat conftest.$ac_ext >&5
923   rm -rf conftest*
924   CPP="${CC-cc} -nologo -E"
925   cat > conftest.$ac_ext <<EOF
926 #line 927 "configure"
927 #include "confdefs.h"
928 #include <assert.h>
929 Syntax Error
930 EOF
931 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
932 { (eval echo configure:933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
933 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
934 if test -z "$ac_err"; then
935   :
936 else
937   echo "$ac_err" >&5
938   echo "configure: failed program was:" >&5
939   cat conftest.$ac_ext >&5
940   rm -rf conftest*
941   CPP=/lib/cpp
942 fi
943 rm -f conftest*
944 fi
945 rm -f conftest*
946 fi
947 rm -f conftest*
948   ac_cv_prog_CPP="$CPP"
949 fi
950   CPP="$ac_cv_prog_CPP"
951 else
952   ac_cv_prog_CPP="$CPP"
953 fi
954 echo "$ac_t""$CPP" 1>&6
955
956
957 # Extract the first word of "gdb", so it can be a program name with args.
958 set dummy gdb; ac_word=$2
959 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
960 echo "configure:961: checking for $ac_word" >&5
961 if eval "test \"`echo '$''{'ac_cv_prog_GDB'+set}'`\" = set"; then
962   echo $ac_n "(cached) $ac_c" 1>&6
963 else
964   if test -n "$GDB"; then
965   ac_cv_prog_GDB="$GDB" # Let the user override the test.
966 else
967   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
968   ac_dummy="$PATH"
969   for ac_dir in $ac_dummy; do
970     test -z "$ac_dir" && ac_dir=.
971     if test -f $ac_dir/$ac_word; then
972       ac_cv_prog_GDB="yes"
973       break
974     fi
975   done
976   IFS="$ac_save_ifs"
977   test -z "$ac_cv_prog_GDB" && ac_cv_prog_GDB="no"
978 fi
979 fi
980 GDB="$ac_cv_prog_GDB"
981 if test -n "$GDB"; then
982   echo "$ac_t""$GDB" 1>&6
983 else
984   echo "$ac_t""no" 1>&6
985 fi
986
987
988
989 # Check whether --with-debug or --without-debug was given.
990 if test "${with_debug+set}" = set; then
991   withval="$with_debug"
992   
993                 if test "x$withval" != "$xno" ; then
994                     if test $ac_cv_prog_cc_g = yes; then
995                       if test "$GCC" = yes; then
996                         if test "$GDB"; then
997                           CFLAGS="-ggdb"
998                         else
999                           CFLAGS="-g"
1000                         fi
1001                         CFLAGS="$CFLAGS -Wshadow  -Wconversion"
1002                       else
1003                         CFLAGS="-g"
1004                       fi
1005                    fi
1006                    CFLAGS="$CFLAGS -D_DEBUG"
1007                 fi
1008         
1009 else
1010   
1011             if test "$GCC" = yes; then
1012               CFLAGS="-O2"
1013             else
1014               CFLAGS=
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
1210
1211 SOCKET_LIB=
1212
1213 case "$host" in
1214 *-solaris*) SOCKET_LIB="-lsocket -lnsl"
1215             cat >> confdefs.h <<\EOF
1216 #define __EXTENSIONS__ 1
1217 EOF
1218
1219             if test "$GCC" = "yes"; then
1220               # Set a GCC specific switch:
1221               # This compiler switch makes Solaris thread-safe
1222               PTHREAD_LIB=
1223               SPECIAL_CFLAGS="-pthreads"
1224             else
1225               # What do we do without GCC? Guess this:
1226               SPECIAL_CFLAGS="-D_REENTRANT"
1227             fi
1228 ;;
1229 esac
1230
1231
1232
1233
1234 case "$host" in
1235 *-os2-emx*) SOCKET_LIB=-lsocket
1236 ;;
1237 esac
1238
1239
1240
1241
1242 AMIGAOS_ONLY=#
1243
1244 case "$host" in
1245 *-amigaos) AMIGAOS_ONLY=
1246 ;;
1247 esac
1248
1249
1250
1251
1252
1253
1254 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1255 echo "configure:1256: checking for executable suffix" >&5
1256 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1257   echo $ac_n "(cached) $ac_c" 1>&6
1258 else
1259   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1260   ac_cv_exeext=.exe
1261 else
1262   rm -f conftest*
1263   echo 'int main () { return 0; }' > conftest.$ac_ext
1264   ac_cv_exeext=
1265   if { (eval echo configure:1266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1266     for file in conftest.*; do
1267       case $file in
1268       *.c | *.o | *.obj) ;;
1269       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1270       esac
1271     done
1272   else
1273     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1274   fi
1275   rm -f conftest*
1276   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1277 fi
1278 fi
1279
1280 EXEEXT=""
1281 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1282 echo "$ac_t""${ac_cv_exeext}" 1>&6
1283 ac_exeext=$EXEEXT
1284
1285 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
1286 echo "configure:1287: checking for object suffix" >&5
1287 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1288   echo $ac_n "(cached) $ac_c" 1>&6
1289 else
1290   rm -f conftest*
1291 echo 'int i = 1;' > conftest.$ac_ext
1292 if { (eval echo configure:1293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1293   for ac_file in conftest.*; do
1294     case $ac_file in
1295     *.c) ;;
1296     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1297     esac
1298   done
1299 else
1300   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1301 fi
1302 rm -f conftest*
1303 fi
1304
1305 echo "$ac_t""$ac_cv_objext" 1>&6
1306 OBJEXT=$ac_cv_objext
1307 ac_objext=$ac_cv_objext
1308
1309 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1310 echo "configure:1311: checking for ANSI C header files" >&5
1311 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1312   echo $ac_n "(cached) $ac_c" 1>&6
1313 else
1314   cat > conftest.$ac_ext <<EOF
1315 #line 1316 "configure"
1316 #include "confdefs.h"
1317 #include <stdlib.h>
1318 #include <stdarg.h>
1319 #include <string.h>
1320 #include <float.h>
1321 EOF
1322 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1323 { (eval echo configure:1324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1324 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1325 if test -z "$ac_err"; then
1326   rm -rf conftest*
1327   ac_cv_header_stdc=yes
1328 else
1329   echo "$ac_err" >&5
1330   echo "configure: failed program was:" >&5
1331   cat conftest.$ac_ext >&5
1332   rm -rf conftest*
1333   ac_cv_header_stdc=no
1334 fi
1335 rm -f conftest*
1336
1337 if test $ac_cv_header_stdc = yes; then
1338   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1339 cat > conftest.$ac_ext <<EOF
1340 #line 1341 "configure"
1341 #include "confdefs.h"
1342 #include <string.h>
1343 EOF
1344 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1345   egrep "memchr" >/dev/null 2>&1; then
1346   :
1347 else
1348   rm -rf conftest*
1349   ac_cv_header_stdc=no
1350 fi
1351 rm -f conftest*
1352
1353 fi
1354
1355 if test $ac_cv_header_stdc = yes; then
1356   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1357 cat > conftest.$ac_ext <<EOF
1358 #line 1359 "configure"
1359 #include "confdefs.h"
1360 #include <stdlib.h>
1361 EOF
1362 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1363   egrep "free" >/dev/null 2>&1; then
1364   :
1365 else
1366   rm -rf conftest*
1367   ac_cv_header_stdc=no
1368 fi
1369 rm -f conftest*
1370
1371 fi
1372
1373 if test $ac_cv_header_stdc = yes; then
1374   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1375 if test "$cross_compiling" = yes; then
1376   :
1377 else
1378   cat > conftest.$ac_ext <<EOF
1379 #line 1380 "configure"
1380 #include "confdefs.h"
1381 #include <ctype.h>
1382 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1383 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1384 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1385 int main () { int i; for (i = 0; i < 256; i++)
1386 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1387 exit (0); }
1388
1389 EOF
1390 if { (eval echo configure:1391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1391 then
1392   :
1393 else
1394   echo "configure: failed program was:" >&5
1395   cat conftest.$ac_ext >&5
1396   rm -fr conftest*
1397   ac_cv_header_stdc=no
1398 fi
1399 rm -fr conftest*
1400 fi
1401
1402 fi
1403 fi
1404
1405 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1406 if test $ac_cv_header_stdc = yes; then
1407   cat >> confdefs.h <<\EOF
1408 #define STDC_HEADERS 1
1409 EOF
1410
1411 fi
1412
1413 echo $ac_n "checking for working const""... $ac_c" 1>&6
1414 echo "configure:1415: checking for working const" >&5
1415 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1416   echo $ac_n "(cached) $ac_c" 1>&6
1417 else
1418   cat > conftest.$ac_ext <<EOF
1419 #line 1420 "configure"
1420 #include "confdefs.h"
1421
1422 int main() {
1423
1424 /* Ultrix mips cc rejects this.  */
1425 typedef int charset[2]; const charset x;
1426 /* SunOS 4.1.1 cc rejects this.  */
1427 char const *const *ccp;
1428 char **p;
1429 /* NEC SVR4.0.2 mips cc rejects this.  */
1430 struct point {int x, y;};
1431 static struct point const zero = {0,0};
1432 /* AIX XL C 1.02.0.0 rejects this.
1433    It does not let you subtract one const X* pointer from another in an arm
1434    of an if-expression whose if-part is not a constant expression */
1435 const char *g = "string";
1436 ccp = &g + (g ? g-g : 0);
1437 /* HPUX 7.0 cc rejects these. */
1438 ++ccp;
1439 p = (char**) ccp;
1440 ccp = (char const *const *) p;
1441 { /* SCO 3.2v4 cc rejects this.  */
1442   char *t;
1443   char const *s = 0 ? (char *) 0 : (char const *) 0;
1444
1445   *t++ = 0;
1446 }
1447 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1448   int x[] = {25, 17};
1449   const int *foo = &x[0];
1450   ++foo;
1451 }
1452 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1453   typedef const int *iptr;
1454   iptr p = 0;
1455   ++p;
1456 }
1457 { /* AIX XL C 1.02.0.0 rejects this saying
1458      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1459   struct s { int j; const int *ap[3]; };
1460   struct s *b; b->j = 5;
1461 }
1462 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1463   const int foo = 10;
1464 }
1465
1466 ; return 0; }
1467 EOF
1468 if { (eval echo configure:1469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1469   rm -rf conftest*
1470   ac_cv_c_const=yes
1471 else
1472   echo "configure: failed program was:" >&5
1473   cat conftest.$ac_ext >&5
1474   rm -rf conftest*
1475   ac_cv_c_const=no
1476 fi
1477 rm -f conftest*
1478 fi
1479
1480 echo "$ac_t""$ac_cv_c_const" 1>&6
1481 if test $ac_cv_c_const = no; then
1482   cat >> confdefs.h <<\EOF
1483 #define const 
1484 EOF
1485
1486 fi
1487
1488 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1489 echo "configure:1490: checking for size_t" >&5
1490 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1491   echo $ac_n "(cached) $ac_c" 1>&6
1492 else
1493   cat > conftest.$ac_ext <<EOF
1494 #line 1495 "configure"
1495 #include "confdefs.h"
1496 #include <sys/types.h>
1497 #if STDC_HEADERS
1498 #include <stdlib.h>
1499 #include <stddef.h>
1500 #endif
1501 EOF
1502 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1503   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1504   rm -rf conftest*
1505   ac_cv_type_size_t=yes
1506 else
1507   rm -rf conftest*
1508   ac_cv_type_size_t=no
1509 fi
1510 rm -f conftest*
1511
1512 fi
1513 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1514 if test $ac_cv_type_size_t = no; then
1515   cat >> confdefs.h <<\EOF
1516 #define size_t unsigned
1517 EOF
1518
1519 fi
1520
1521 echo $ac_n "checking size of int""... $ac_c" 1>&6
1522 echo "configure:1523: checking size of int" >&5
1523 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1524   echo $ac_n "(cached) $ac_c" 1>&6
1525 else
1526   if test "$cross_compiling" = yes; then
1527     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1528 else
1529   cat > conftest.$ac_ext <<EOF
1530 #line 1531 "configure"
1531 #include "confdefs.h"
1532 #include <stdio.h>
1533 int main()
1534 {
1535   FILE *f=fopen("conftestval", "w");
1536   if (!f) return(1);
1537   fprintf(f, "%d\n", sizeof(int));
1538   return(0);
1539 }
1540 EOF
1541 if { (eval echo configure:1542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1542 then
1543   ac_cv_sizeof_int=`cat conftestval`
1544 else
1545   echo "configure: failed program was:" >&5
1546   cat conftest.$ac_ext >&5
1547   rm -fr conftest*
1548   ac_cv_sizeof_int=0
1549 fi
1550 rm -fr conftest*
1551 fi
1552
1553 fi
1554 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1555 cat >> confdefs.h <<EOF
1556 #define SIZEOF_INT $ac_cv_sizeof_int
1557 EOF
1558
1559
1560 echo $ac_n "checking size of char *""... $ac_c" 1>&6
1561 echo "configure:1562: checking size of char *" >&5
1562 if eval "test \"`echo '$''{'ac_cv_sizeof_char_p'+set}'`\" = set"; then
1563   echo $ac_n "(cached) $ac_c" 1>&6
1564 else
1565   if test "$cross_compiling" = yes; then
1566     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1567 else
1568   cat > conftest.$ac_ext <<EOF
1569 #line 1570 "configure"
1570 #include "confdefs.h"
1571 #include <stdio.h>
1572 int main()
1573 {
1574   FILE *f=fopen("conftestval", "w");
1575   if (!f) return(1);
1576   fprintf(f, "%d\n", sizeof(char *));
1577   return(0);
1578 }
1579 EOF
1580 if { (eval echo configure:1581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1581 then
1582   ac_cv_sizeof_char_p=`cat conftestval`
1583 else
1584   echo "configure: failed program was:" >&5
1585   cat conftest.$ac_ext >&5
1586   rm -fr conftest*
1587   ac_cv_sizeof_char_p=0
1588 fi
1589 rm -fr conftest*
1590 fi
1591
1592 fi
1593 echo "$ac_t""$ac_cv_sizeof_char_p" 1>&6
1594 cat >> confdefs.h <<EOF
1595 #define SIZEOF_CHAR_P $ac_cv_sizeof_char_p
1596 EOF
1597
1598
1599 echo $ac_n "checking size of long""... $ac_c" 1>&6
1600 echo "configure:1601: checking size of long" >&5
1601 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1602   echo $ac_n "(cached) $ac_c" 1>&6
1603 else
1604   if test "$cross_compiling" = yes; then
1605     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1606 else
1607   cat > conftest.$ac_ext <<EOF
1608 #line 1609 "configure"
1609 #include "confdefs.h"
1610 #include <stdio.h>
1611 int main()
1612 {
1613   FILE *f=fopen("conftestval", "w");
1614   if (!f) return(1);
1615   fprintf(f, "%d\n", sizeof(long));
1616   return(0);
1617 }
1618 EOF
1619 if { (eval echo configure:1620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1620 then
1621   ac_cv_sizeof_long=`cat conftestval`
1622 else
1623   echo "configure: failed program was:" >&5
1624   cat conftest.$ac_ext >&5
1625   rm -fr conftest*
1626   ac_cv_sizeof_long=0
1627 fi
1628 rm -fr conftest*
1629 fi
1630
1631 fi
1632 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1633 cat >> confdefs.h <<EOF
1634 #define SIZEOF_LONG $ac_cv_sizeof_long
1635 EOF
1636
1637
1638 echo $ac_n "checking size of long long""... $ac_c" 1>&6
1639 echo "configure:1640: checking size of long long" >&5
1640 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
1641   echo $ac_n "(cached) $ac_c" 1>&6
1642 else
1643   if test "$cross_compiling" = yes; then
1644     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1645 else
1646   cat > conftest.$ac_ext <<EOF
1647 #line 1648 "configure"
1648 #include "confdefs.h"
1649 #include <stdio.h>
1650 int main()
1651 {
1652   FILE *f=fopen("conftestval", "w");
1653   if (!f) return(1);
1654   fprintf(f, "%d\n", sizeof(long long));
1655   return(0);
1656 }
1657 EOF
1658 if { (eval echo configure:1659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1659 then
1660   ac_cv_sizeof_long_long=`cat conftestval`
1661 else
1662   echo "configure: failed program was:" >&5
1663   cat conftest.$ac_ext >&5
1664   rm -fr conftest*
1665   ac_cv_sizeof_long_long=0
1666 fi
1667 rm -fr conftest*
1668 fi
1669
1670 fi
1671 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
1672 cat >> confdefs.h <<EOF
1673 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
1674 EOF
1675
1676
1677 echo $ac_n "checking size of size_t""... $ac_c" 1>&6
1678 echo "configure:1679: checking size of size_t" >&5
1679 if eval "test \"`echo '$''{'ac_cv_sizeof_size_t'+set}'`\" = set"; then
1680   echo $ac_n "(cached) $ac_c" 1>&6
1681 else
1682   if test "$cross_compiling" = yes; then
1683     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1684 else
1685   cat > conftest.$ac_ext <<EOF
1686 #line 1687 "configure"
1687 #include "confdefs.h"
1688 #include <stdio.h>
1689 int main()
1690 {
1691   FILE *f=fopen("conftestval", "w");
1692   if (!f) return(1);
1693   fprintf(f, "%d\n", sizeof(size_t));
1694   return(0);
1695 }
1696 EOF
1697 if { (eval echo configure:1698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1698 then
1699   ac_cv_sizeof_size_t=`cat conftestval`
1700 else
1701   echo "configure: failed program was:" >&5
1702   cat conftest.$ac_ext >&5
1703   rm -fr conftest*
1704   ac_cv_sizeof_size_t=0
1705 fi
1706 rm -fr conftest*
1707 fi
1708
1709 fi
1710 echo "$ac_t""$ac_cv_sizeof_size_t" 1>&6
1711 cat >> confdefs.h <<EOF
1712 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
1713 EOF
1714
1715
1716
1717
1718 for ac_func in strerror bcopy memmove
1719 do
1720 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1721 echo "configure:1722: checking for $ac_func" >&5
1722 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1723   echo $ac_n "(cached) $ac_c" 1>&6
1724 else
1725   cat > conftest.$ac_ext <<EOF
1726 #line 1727 "configure"
1727 #include "confdefs.h"
1728 /* System header to define __stub macros and hopefully few prototypes,
1729     which can conflict with char $ac_func(); below.  */
1730 #include <assert.h>
1731 /* Override any gcc2 internal prototype to avoid an error.  */
1732 /* We use char because int might match the return type of a gcc2
1733     builtin and then its argument prototype would still apply.  */
1734 char $ac_func();
1735
1736 int main() {
1737
1738 /* The GNU C library defines this for functions which it implements
1739     to always fail with ENOSYS.  Some functions are actually named
1740     something starting with __ and the normal name is an alias.  */
1741 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1742 choke me
1743 #else
1744 $ac_func();
1745 #endif
1746
1747 ; return 0; }
1748 EOF
1749 if { (eval echo configure:1750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1750   rm -rf conftest*
1751   eval "ac_cv_func_$ac_func=yes"
1752 else
1753   echo "configure: failed program was:" >&5
1754   cat conftest.$ac_ext >&5
1755   rm -rf conftest*
1756   eval "ac_cv_func_$ac_func=no"
1757 fi
1758 rm -f conftest*
1759 fi
1760
1761 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1762   echo "$ac_t""yes" 1>&6
1763     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1764   cat >> confdefs.h <<EOF
1765 #define $ac_tr_func 1
1766 EOF
1767  
1768 else
1769   echo "$ac_t""no" 1>&6
1770 fi
1771 done
1772
1773
1774
1775 echo $ac_n "checking for pcre_compile in -lpcre""... $ac_c" 1>&6
1776 echo "configure:1777: checking for pcre_compile in -lpcre" >&5
1777 ac_lib_var=`echo pcre'_'pcre_compile | sed 'y%./+-%__p_%'`
1778 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1779   echo $ac_n "(cached) $ac_c" 1>&6
1780 else
1781   ac_save_LIBS="$LIBS"
1782 LIBS="-lpcre  $LIBS"
1783 cat > conftest.$ac_ext <<EOF
1784 #line 1785 "configure"
1785 #include "confdefs.h"
1786 /* Override any gcc2 internal prototype to avoid an error.  */
1787 /* We use char because int might match the return type of a gcc2
1788     builtin and then its argument prototype would still apply.  */
1789 char pcre_compile();
1790
1791 int main() {
1792 pcre_compile()
1793 ; return 0; }
1794 EOF
1795 if { (eval echo configure:1796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1796   rm -rf conftest*
1797   eval "ac_cv_lib_$ac_lib_var=yes"
1798 else
1799   echo "configure: failed program was:" >&5
1800   cat conftest.$ac_ext >&5
1801   rm -rf conftest*
1802   eval "ac_cv_lib_$ac_lib_var=no"
1803 fi
1804 rm -f conftest*
1805 LIBS="$ac_save_LIBS"
1806
1807 fi
1808 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1809   echo "$ac_t""yes" 1>&6
1810   ac_safe=`echo "pcre.h" | sed 'y%./+-%__p_%'`
1811 echo $ac_n "checking for pcre.h""... $ac_c" 1>&6
1812 echo "configure:1813: checking for pcre.h" >&5
1813 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1814   echo $ac_n "(cached) $ac_c" 1>&6
1815 else
1816   cat > conftest.$ac_ext <<EOF
1817 #line 1818 "configure"
1818 #include "confdefs.h"
1819 #include <pcre.h>
1820 EOF
1821 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1822 { (eval echo configure:1823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1823 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1824 if test -z "$ac_err"; then
1825   rm -rf conftest*
1826   eval "ac_cv_header_$ac_safe=yes"
1827 else
1828   echo "$ac_err" >&5
1829   echo "configure: failed program was:" >&5
1830   cat conftest.$ac_ext >&5
1831   rm -rf conftest*
1832   eval "ac_cv_header_$ac_safe=no"
1833 fi
1834 rm -f conftest*
1835 fi
1836 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1837   echo "$ac_t""yes" 1>&6
1838   have_pcre=yes
1839 else
1840   echo "$ac_t""no" 1>&6
1841 have_pcre=no
1842 fi
1843
1844 else
1845   echo "$ac_t""no" 1>&6
1846 have_pcre=no
1847 fi
1848
1849 echo $ac_n "checking for regcomp in -lpcreposix""... $ac_c" 1>&6
1850 echo "configure:1851: checking for regcomp in -lpcreposix" >&5
1851 ac_lib_var=`echo pcreposix'_'regcomp | sed 'y%./+-%__p_%'`
1852 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1853   echo $ac_n "(cached) $ac_c" 1>&6
1854 else
1855   ac_save_LIBS="$LIBS"
1856 LIBS="-lpcreposix -lpcre $LIBS"
1857 cat > conftest.$ac_ext <<EOF
1858 #line 1859 "configure"
1859 #include "confdefs.h"
1860 /* Override any gcc2 internal prototype to avoid an error.  */
1861 /* We use char because int might match the return type of a gcc2
1862     builtin and then its argument prototype would still apply.  */
1863 char regcomp();
1864
1865 int main() {
1866 regcomp()
1867 ; return 0; }
1868 EOF
1869 if { (eval echo configure:1870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1870   rm -rf conftest*
1871   eval "ac_cv_lib_$ac_lib_var=yes"
1872 else
1873   echo "configure: failed program was:" >&5
1874   cat conftest.$ac_ext >&5
1875   rm -rf conftest*
1876   eval "ac_cv_lib_$ac_lib_var=no"
1877 fi
1878 rm -f conftest*
1879 LIBS="$ac_save_LIBS"
1880
1881 fi
1882 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1883   echo "$ac_t""yes" 1>&6
1884   ac_safe=`echo "pcreposix.h" | sed 'y%./+-%__p_%'`
1885 echo $ac_n "checking for pcreposix.h""... $ac_c" 1>&6
1886 echo "configure:1887: checking for pcreposix.h" >&5
1887 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1888   echo $ac_n "(cached) $ac_c" 1>&6
1889 else
1890   cat > conftest.$ac_ext <<EOF
1891 #line 1892 "configure"
1892 #include "confdefs.h"
1893 #include <pcreposix.h>
1894 EOF
1895 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1896 { (eval echo configure:1897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1897 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1898 if test -z "$ac_err"; then
1899   rm -rf conftest*
1900   eval "ac_cv_header_$ac_safe=yes"
1901 else
1902   echo "$ac_err" >&5
1903   echo "configure: failed program was:" >&5
1904   cat conftest.$ac_ext >&5
1905   rm -rf conftest*
1906   eval "ac_cv_header_$ac_safe=no"
1907 fi
1908 rm -f conftest*
1909 fi
1910 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1911   echo "$ac_t""yes" 1>&6
1912   have_pcreposix=yes
1913 else
1914   echo "$ac_t""no" 1>&6
1915 have_pcreposix=no
1916 fi
1917
1918 else
1919   echo "$ac_t""no" 1>&6
1920 have_pcreposix=no
1921 fi
1922
1923 echo $ac_n "checking for pcrs_compile in -lpcrs""... $ac_c" 1>&6
1924 echo "configure:1925: checking for pcrs_compile in -lpcrs" >&5
1925 ac_lib_var=`echo pcrs'_'pcrs_compile | sed 'y%./+-%__p_%'`
1926 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1927   echo $ac_n "(cached) $ac_c" 1>&6
1928 else
1929   ac_save_LIBS="$LIBS"
1930 LIBS="-lpcrs  $LIBS"
1931 cat > conftest.$ac_ext <<EOF
1932 #line 1933 "configure"
1933 #include "confdefs.h"
1934 /* Override any gcc2 internal prototype to avoid an error.  */
1935 /* We use char because int might match the return type of a gcc2
1936     builtin and then its argument prototype would still apply.  */
1937 char pcrs_compile();
1938
1939 int main() {
1940 pcrs_compile()
1941 ; return 0; }
1942 EOF
1943 if { (eval echo configure:1944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1944   rm -rf conftest*
1945   eval "ac_cv_lib_$ac_lib_var=yes"
1946 else
1947   echo "configure: failed program was:" >&5
1948   cat conftest.$ac_ext >&5
1949   rm -rf conftest*
1950   eval "ac_cv_lib_$ac_lib_var=no"
1951 fi
1952 rm -f conftest*
1953 LIBS="$ac_save_LIBS"
1954
1955 fi
1956 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1957   echo "$ac_t""yes" 1>&6
1958   ac_safe=`echo "pcrs.h" | sed 'y%./+-%__p_%'`
1959 echo $ac_n "checking for pcrs.h""... $ac_c" 1>&6
1960 echo "configure:1961: checking for pcrs.h" >&5
1961 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1962   echo $ac_n "(cached) $ac_c" 1>&6
1963 else
1964   cat > conftest.$ac_ext <<EOF
1965 #line 1966 "configure"
1966 #include "confdefs.h"
1967 #include <pcrs.h>
1968 EOF
1969 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1970 { (eval echo configure:1971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1971 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1972 if test -z "$ac_err"; then
1973   rm -rf conftest*
1974   eval "ac_cv_header_$ac_safe=yes"
1975 else
1976   echo "$ac_err" >&5
1977   echo "configure: failed program was:" >&5
1978   cat conftest.$ac_ext >&5
1979   rm -rf conftest*
1980   eval "ac_cv_header_$ac_safe=no"
1981 fi
1982 rm -f conftest*
1983 fi
1984 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1985   echo "$ac_t""yes" 1>&6
1986   have_pcrs=yes
1987 else
1988   echo "$ac_t""no" 1>&6
1989 have_pcrs=no
1990 fi
1991
1992 else
1993   echo "$ac_t""no" 1>&6
1994 have_pcrs=no
1995 fi
1996
1997
1998
1999
2000 cat >> confdefs.h <<\EOF
2001 #define __MT__ 1
2002 EOF
2003
2004
2005
2006 # Check whether --enable-toggle or --disable-toggle was given.
2007 if test "${enable_toggle+set}" = set; then
2008   enableval="$enable_toggle"
2009   if test $enableval = yes; then
2010   cat >> confdefs.h <<\EOF
2011 #define FEATURE_TOGGLE 1
2012 EOF
2013
2014 fi
2015 else
2016   cat >> confdefs.h <<\EOF
2017 #define FEATURE_TOGGLE 1
2018 EOF
2019
2020 fi
2021
2022
2023 # Check whether --enable-force or --disable-force was given.
2024 if test "${enable_force+set}" = set; then
2025   enableval="$enable_force"
2026   if test $enableval = yes; then
2027   cat >> confdefs.h <<\EOF
2028 #define FEATURE_FORCE_LOAD 1
2029 EOF
2030
2031 fi
2032 else
2033   cat >> confdefs.h <<\EOF
2034 #define FEATURE_FORCE_LOAD 1
2035 EOF
2036
2037 fi
2038
2039
2040 # Check whether --enable-fast-redirects or --disable-fast-redirects was given.
2041 if test "${enable_fast_redirects+set}" = set; then
2042   enableval="$enable_fast_redirects"
2043   if test $enableval = yes; then
2044   cat >> confdefs.h <<\EOF
2045 #define FEATURE_FAST_REDIRECTS 1
2046 EOF
2047
2048 fi
2049 else
2050   cat >> confdefs.h <<\EOF
2051 #define FEATURE_FAST_REDIRECTS 1
2052 EOF
2053
2054 fi
2055
2056
2057 # Check whether --enable-killpopup or --disable-killpopup was given.
2058 if test "${enable_killpopup+set}" = set; then
2059   enableval="$enable_killpopup"
2060   if test $enableval = yes; then
2061   cat >> confdefs.h <<\EOF
2062 #define FEATURE_KILL_POPUPS 1
2063 EOF
2064
2065 fi
2066 else
2067   cat >> confdefs.h <<\EOF
2068 #define FEATURE_KILL_POPUPS 1
2069 EOF
2070
2071 fi
2072
2073
2074 # Check whether --enable-stats or --disable-stats was given.
2075 if test "${enable_stats+set}" = set; then
2076   enableval="$enable_stats"
2077   if test $enableval = yes; then
2078   cat >> confdefs.h <<\EOF
2079 #define FEATURE_STATISTICS 1
2080 EOF
2081
2082 fi
2083 else
2084   cat >> confdefs.h <<\EOF
2085 #define FEATURE_STATISTICS 1
2086 EOF
2087
2088 fi
2089
2090
2091 # Check whether --enable-ie-images or --disable-ie-images was given.
2092 if test "${enable_ie_images+set}" = set; then
2093   enableval="$enable_ie_images"
2094   if test $enableval = yes; then
2095   cat >> confdefs.h <<\EOF
2096 #define FEATURE_IMAGE_DETECT_MSIE 1
2097 EOF
2098
2099 fi
2100 else
2101   cat >> confdefs.h <<\EOF
2102 #define FEATURE_IMAGE_DETECT_MSIE 1
2103 EOF
2104
2105 fi
2106
2107
2108 # Check whether --enable-image-blocking or --disable-image-blocking was given.
2109 if test "${enable_image_blocking+set}" = set; then
2110   enableval="$enable_image_blocking"
2111   if test $enableval = yes; then
2112   cat >> confdefs.h <<\EOF
2113 #define FEATURE_IMAGE_BLOCKING 1
2114 EOF
2115
2116 fi
2117 else
2118   cat >> confdefs.h <<\EOF
2119 #define FEATURE_IMAGE_BLOCKING 1
2120 EOF
2121
2122 fi
2123
2124
2125 # Check whether --enable-acl-files or --disable-acl-files was given.
2126 if test "${enable_acl_files+set}" = set; then
2127   enableval="$enable_acl_files"
2128   if test $enableval = yes; then
2129   cat >> confdefs.h <<\EOF
2130 #define FEATURE_ACL 1
2131 EOF
2132
2133 fi
2134 else
2135   cat >> confdefs.h <<\EOF
2136 #define FEATURE_ACL 1
2137 EOF
2138
2139 fi
2140
2141
2142 # Check whether --enable-trust-files or --disable-trust-files was given.
2143 if test "${enable_trust_files+set}" = set; then
2144   enableval="$enable_trust_files"
2145   if test $enableval = yes; then
2146   cat >> confdefs.h <<\EOF
2147 #define FEATURE_TRUST 1
2148 EOF
2149
2150 fi
2151 else
2152   cat >> confdefs.h <<\EOF
2153 #define FEATURE_TRUST 1
2154 EOF
2155
2156 fi
2157
2158
2159 # Check whether --enable-jar-files or --disable-jar-files was given.
2160 if test "${enable_jar_files+set}" = set; then
2161   enableval="$enable_jar_files"
2162   if test $enableval = yes; then
2163   cat >> confdefs.h <<\EOF
2164 #define FEATURE_COOKIE_JAR 1
2165 EOF
2166
2167 fi
2168 else
2169   cat >> confdefs.h <<\EOF
2170 #define FEATURE_COOKIE_JAR 1
2171 EOF
2172
2173 fi
2174
2175
2176 # Check whether --enable-editor or --disable-editor was given.
2177 if test "${enable_editor+set}" = set; then
2178   enableval="$enable_editor"
2179   if test $enableval = yes; then
2180   cat >> confdefs.h <<\EOF
2181 #define FEATURE_CGI_EDIT_ACTIONS 1
2182 EOF
2183
2184 fi
2185 else
2186   cat >> confdefs.h <<\EOF
2187 #define FEATURE_CGI_EDIT_ACTIONS 1
2188 EOF
2189
2190 fi
2191
2192
2193
2194 # Check whether --enable-regex-matching or --disable-regex-matching was given.
2195 if test "${enable_regex_matching+set}" = set; then
2196   enableval="$enable_regex_matching"
2197    regex_matching=$enableval 
2198 else
2199    regex_matching=pcre 
2200 fi
2201
2202
2203 # Check whether --enable-dynamic-pcre or --disable-dynamic-pcre was given.
2204 if test "${enable_dynamic_pcre+set}" = set; then
2205   enableval="$enable_dynamic_pcre"
2206    if test $enableval = "no"; then have_pcre=no; fi 
2207 fi
2208
2209
2210 # Check whether --enable-dynamic-pcrs or --disable-dynamic-pcrs was given.
2211 if test "${enable_dynamic_pcrs+set}" = set; then
2212   enableval="$enable_dynamic_pcrs"
2213    if test $enableval = "no"; then have_pcrs=no; fi 
2214 fi
2215
2216
2217
2218 # Is the regex URL matching based on libpcreposix, but we
2219 # don't have that library?
2220 #
2221 if test $have_pcreposix = "yes" -o $regex_matching != "pcre"; then
2222   dont_miss_pcreposix=yes
2223 else
2224   dont_miss_pcreposix=no
2225 fi
2226
2227 # If we have libpcre and either we also have pcreposix or
2228 # we don't need pcreposix, then link pcre dynamically; else
2229 # build it and link statically
2230 #
2231 if test $have_pcre = "yes" -a $dont_miss_pcreposix = "yes"; then
2232   echo "using libpcre"
2233   pcre_dyn=yes
2234   STATIC_PCRE_ONLY=#
2235   LIBS="$LIBS -lpcre"
2236 else
2237   echo "using built-in static pcre"
2238   pcre_dyn=no
2239   cat >> confdefs.h <<\EOF
2240 #define STATIC_PCRE 1
2241 EOF
2242
2243   STATIC_PCRE_ONLY=
2244 fi
2245
2246 # If we have libpcrs and pcre is linked dynamically
2247 # then also link pcrs dynamically, else build and link
2248 # pcrs statically
2249 #
2250 if test $have_pcrs = "yes" -a $pcre_dyn = "yes"; then
2251   echo "using libpcrs"
2252   STATIC_PCRS_ONLY=#
2253   LIBS="$LIBS -lpcrs"
2254 else
2255   echo "using built-in static pcrs"
2256   cat >> confdefs.h <<\EOF
2257 #define STATIC_PCRS 1
2258 EOF
2259
2260   STATIC_PCRS_ONLY=
2261 fi
2262
2263 # Which method should be used for URL matching?
2264 # pcre, gnu regex or prefix matching?
2265 #
2266 if test $regex_matching = "gnu"; then
2267   echo "using gnu regex for URL matching"
2268   cat >> confdefs.h <<\EOF
2269 #define REGEX_GNU 1
2270 EOF
2271
2272   GNU_REGEX_ONLY=
2273   PCRE_REGEX_ONLY=#
2274 elif test $regex_matching = "pcre"; then
2275   echo "using pcre regex for URL matching"
2276   cat >> confdefs.h <<\EOF
2277 #define REGEX_PCRE 1
2278 EOF
2279
2280   GNU_REGEX_ONLY=#
2281   PCRE_REGEX_ONLY=
2282   if test $pcre_dyn = "yes"; then
2283     LIBS="$LIBS -lpcreposix"
2284   fi
2285 else
2286   echo -e "using prefix matching for URLs\nHint: This does NOT make the executable any smaller!"
2287   GNU_REGEX_ONLY=#
2288   PCRE_REGEX_ONLY=#
2289 fi
2290
2291
2292
2293
2294
2295
2296
2297 CFLAGS=$old_CFLAGS_nospecial
2298
2299
2300
2301 cat >> confdefs.h <<EOF
2302 #define PID_FILE_PATH ${PID_FILE_PATH}
2303 EOF
2304
2305
2306
2307
2308 trap '' 1 2 15
2309 cat > confcache <<\EOF
2310 # This file is a shell script that caches the results of configure
2311 # tests run on this system so they can be shared between configure
2312 # scripts and configure runs.  It is not useful on other systems.
2313 # If it contains results you don't want to keep, you may remove or edit it.
2314 #
2315 # By default, configure uses ./config.cache as the cache file,
2316 # creating it if it does not exist already.  You can give configure
2317 # the --cache-file=FILE option to use a different cache file; that is
2318 # what configure does when it calls configure scripts in
2319 # subdirectories, so they share the cache.
2320 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2321 # config.status only pays attention to the cache file if you give it the
2322 # --recheck option to rerun configure.
2323 #
2324 EOF
2325 # The following way of writing the cache mishandles newlines in values,
2326 # but we know of no workaround that is simple, portable, and efficient.
2327 # So, don't put newlines in cache variables' values.
2328 # Ultrix sh set writes to stderr and can't be redirected directly,
2329 # and sets the high bit in the cache file unless we assign to the vars.
2330 (set) 2>&1 |
2331   case `(ac_space=' '; set | grep ac_space) 2>&1` in
2332   *ac_space=\ *)
2333     # `set' does not quote correctly, so add quotes (double-quote substitution
2334     # turns \\\\ into \\, and sed turns \\ into \).
2335     sed -n \
2336       -e "s/'/'\\\\''/g" \
2337       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2338     ;;
2339   *)
2340     # `set' quotes correctly as required by POSIX, so do not add quotes.
2341     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2342     ;;
2343   esac >> confcache
2344 if cmp -s $cache_file confcache; then
2345   :
2346 else
2347   if test -w $cache_file; then
2348     echo "updating cache $cache_file"
2349     cat confcache > $cache_file
2350   else
2351     echo "not updating unwritable cache $cache_file"
2352   fi
2353 fi
2354 rm -f confcache
2355
2356 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2357
2358 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2359 # Let make expand exec_prefix.
2360 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2361
2362 # Any assignment to VPATH causes Sun make to only execute
2363 # the first set of double-colon rules, so remove it if not needed.
2364 # If there is a colon in the path, we need to keep it.
2365 if test "x$srcdir" = x.; then
2366   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2367 fi
2368
2369 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2370
2371 DEFS=-DHAVE_CONFIG_H
2372
2373 # Without the "./", some shells look in PATH for config.status.
2374 : ${CONFIG_STATUS=./config.status}
2375
2376 echo creating $CONFIG_STATUS
2377 rm -f $CONFIG_STATUS
2378 cat > $CONFIG_STATUS <<EOF
2379 #! /bin/sh
2380 # Generated automatically by configure.
2381 # Run this file to recreate the current configuration.
2382 # This directory was configured as follows,
2383 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2384 #
2385 # $0 $ac_configure_args
2386 #
2387 # Compiler output produced by configure, useful for debugging
2388 # configure, is in ./config.log if it exists.
2389
2390 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2391 for ac_option
2392 do
2393   case "\$ac_option" in
2394   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2395     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2396     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2397   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2398     echo "$CONFIG_STATUS generated by autoconf version 2.13"
2399     exit 0 ;;
2400   -help | --help | --hel | --he | --h)
2401     echo "\$ac_cs_usage"; exit 0 ;;
2402   *) echo "\$ac_cs_usage"; exit 1 ;;
2403   esac
2404 done
2405
2406 ac_given_srcdir=$srcdir
2407
2408 trap 'rm -fr `echo "GNUmakefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2409 EOF
2410 cat >> $CONFIG_STATUS <<EOF
2411
2412 # Protect against being on the right side of a sed subst in config.status.
2413 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2414  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2415 $ac_vpsub
2416 $extrasub
2417 s%@SHELL@%$SHELL%g
2418 s%@CFLAGS@%$CFLAGS%g
2419 s%@CPPFLAGS@%$CPPFLAGS%g
2420 s%@CXXFLAGS@%$CXXFLAGS%g
2421 s%@FFLAGS@%$FFLAGS%g
2422 s%@DEFS@%$DEFS%g
2423 s%@LDFLAGS@%$LDFLAGS%g
2424 s%@LIBS@%$LIBS%g
2425 s%@exec_prefix@%$exec_prefix%g
2426 s%@prefix@%$prefix%g
2427 s%@program_transform_name@%$program_transform_name%g
2428 s%@bindir@%$bindir%g
2429 s%@sbindir@%$sbindir%g
2430 s%@libexecdir@%$libexecdir%g
2431 s%@datadir@%$datadir%g
2432 s%@sysconfdir@%$sysconfdir%g
2433 s%@sharedstatedir@%$sharedstatedir%g
2434 s%@localstatedir@%$localstatedir%g
2435 s%@libdir@%$libdir%g
2436 s%@includedir@%$includedir%g
2437 s%@oldincludedir@%$oldincludedir%g
2438 s%@infodir@%$infodir%g
2439 s%@mandir@%$mandir%g
2440 s%@host@%$host%g
2441 s%@host_alias@%$host_alias%g
2442 s%@host_cpu@%$host_cpu%g
2443 s%@host_vendor@%$host_vendor%g
2444 s%@host_os@%$host_os%g
2445 s%@VERSION_MAJOR@%$VERSION_MAJOR%g
2446 s%@VERSION_MINOR@%$VERSION_MINOR%g
2447 s%@VERSION_POINT@%$VERSION_POINT%g
2448 s%@CC@%$CC%g
2449 s%@CPP@%$CPP%g
2450 s%@GDB@%$GDB%g
2451 s%@WIN_ONLY@%$WIN_ONLY%g
2452 s%@PTHREAD_ONLY@%$PTHREAD_ONLY%g
2453 s%@SOCKET_LIB@%$SOCKET_LIB%g
2454 s%@AMIGAOS_ONLY@%$AMIGAOS_ONLY%g
2455 s%@EXEEXT@%$EXEEXT%g
2456 s%@OBJEXT@%$OBJEXT%g
2457 s%@GNU_REGEX_ONLY@%$GNU_REGEX_ONLY%g
2458 s%@PCRE_REGEX_ONLY@%$PCRE_REGEX_ONLY%g
2459 s%@STATIC_PCRE_ONLY@%$STATIC_PCRE_ONLY%g
2460 s%@STATIC_PCRS_ONLY@%$STATIC_PCRS_ONLY%g
2461 s%@SPECIAL_CFLAGS@%$SPECIAL_CFLAGS%g
2462 s%@PID_FILE_PATH@%$PID_FILE_PATH%g
2463 s%@PTHREAD_LIB@%$PTHREAD_LIB%g
2464
2465 CEOF
2466 EOF
2467
2468 cat >> $CONFIG_STATUS <<\EOF
2469
2470 # Split the substitutions into bite-sized pieces for seds with
2471 # small command number limits, like on Digital OSF/1 and HP-UX.
2472 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2473 ac_file=1 # Number of current file.
2474 ac_beg=1 # First line for current file.
2475 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2476 ac_more_lines=:
2477 ac_sed_cmds=""
2478 while $ac_more_lines; do
2479   if test $ac_beg -gt 1; then
2480     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2481   else
2482     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2483   fi
2484   if test ! -s conftest.s$ac_file; then
2485     ac_more_lines=false
2486     rm -f conftest.s$ac_file
2487   else
2488     if test -z "$ac_sed_cmds"; then
2489       ac_sed_cmds="sed -f conftest.s$ac_file"
2490     else
2491       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2492     fi
2493     ac_file=`expr $ac_file + 1`
2494     ac_beg=$ac_end
2495     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2496   fi
2497 done
2498 if test -z "$ac_sed_cmds"; then
2499   ac_sed_cmds=cat
2500 fi
2501 EOF
2502
2503 cat >> $CONFIG_STATUS <<EOF
2504
2505 CONFIG_FILES=\${CONFIG_FILES-"GNUmakefile"}
2506 EOF
2507 cat >> $CONFIG_STATUS <<\EOF
2508 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2509   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2510   case "$ac_file" in
2511   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2512        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2513   *) ac_file_in="${ac_file}.in" ;;
2514   esac
2515
2516   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2517
2518   # Remove last slash and all that follows it.  Not all systems have dirname.
2519   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2520   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2521     # The file is in a subdirectory.
2522     test ! -d "$ac_dir" && mkdir "$ac_dir"
2523     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2524     # A "../" for each directory in $ac_dir_suffix.
2525     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2526   else
2527     ac_dir_suffix= ac_dots=
2528   fi
2529
2530   case "$ac_given_srcdir" in
2531   .)  srcdir=.
2532       if test -z "$ac_dots"; then top_srcdir=.
2533       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2534   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2535   *) # Relative path.
2536     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2537     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2538   esac
2539
2540
2541   echo creating "$ac_file"
2542   rm -f "$ac_file"
2543   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2544   case "$ac_file" in
2545   *Makefile*) ac_comsub="1i\\
2546 # $configure_input" ;;
2547   *) ac_comsub= ;;
2548   esac
2549
2550   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2551   sed -e "$ac_comsub
2552 s%@configure_input@%$configure_input%g
2553 s%@srcdir@%$srcdir%g
2554 s%@top_srcdir@%$top_srcdir%g
2555 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2556 fi; done
2557 rm -f conftest.s*
2558
2559 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2560 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2561 #
2562 # ac_d sets the value in "#define NAME VALUE" lines.
2563 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
2564 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
2565 ac_dC='\3'
2566 ac_dD='%g'
2567 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2568 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2569 ac_uB='\([      ]\)%\1#\2define\3'
2570 ac_uC=' '
2571 ac_uD='\4%g'
2572 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2573 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2574 ac_eB='$%\1#\2define\3'
2575 ac_eC=' '
2576 ac_eD='%g'
2577
2578 if test "${CONFIG_HEADERS+set}" != set; then
2579 EOF
2580 cat >> $CONFIG_STATUS <<EOF
2581   CONFIG_HEADERS="config.h"
2582 EOF
2583 cat >> $CONFIG_STATUS <<\EOF
2584 fi
2585 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2586   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2587   case "$ac_file" in
2588   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2589        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2590   *) ac_file_in="${ac_file}.in" ;;
2591   esac
2592
2593   echo creating $ac_file
2594
2595   rm -f conftest.frag conftest.in conftest.out
2596   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2597   cat $ac_file_inputs > conftest.in
2598
2599 EOF
2600
2601 # Transform confdefs.h into a sed script conftest.vals that substitutes
2602 # the proper values into config.h.in to produce config.h.  And first:
2603 # Protect against being on the right side of a sed subst in config.status.
2604 # Protect against being in an unquoted here document in config.status.
2605 rm -f conftest.vals
2606 cat > conftest.hdr <<\EOF
2607 s/[\\&%]/\\&/g
2608 s%[\\$`]%\\&%g
2609 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2610 s%ac_d%ac_u%gp
2611 s%ac_u%ac_e%gp
2612 EOF
2613 sed -n -f conftest.hdr confdefs.h > conftest.vals
2614 rm -f conftest.hdr
2615
2616 # This sed command replaces #undef with comments.  This is necessary, for
2617 # example, in the case of _POSIX_SOURCE, which is predefined and required
2618 # on some systems where configure will not decide to define it.
2619 cat >> conftest.vals <<\EOF
2620 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2621 EOF
2622
2623 # Break up conftest.vals because some shells have a limit on
2624 # the size of here documents, and old seds have small limits too.
2625
2626 rm -f conftest.tail
2627 while :
2628 do
2629   ac_lines=`grep -c . conftest.vals`
2630   # grep -c gives empty output for an empty file on some AIX systems.
2631   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2632   # Write a limited-size here document to conftest.frag.
2633   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2634   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2635   echo 'CEOF
2636   sed -f conftest.frag conftest.in > conftest.out
2637   rm -f conftest.in
2638   mv conftest.out conftest.in
2639 ' >> $CONFIG_STATUS
2640   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2641   rm -f conftest.vals
2642   mv conftest.tail conftest.vals
2643 done
2644 rm -f conftest.vals
2645
2646 cat >> $CONFIG_STATUS <<\EOF
2647   rm -f conftest.frag conftest.h
2648   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
2649   cat conftest.in >> conftest.h
2650   rm -f conftest.in
2651   if cmp -s $ac_file conftest.h 2>/dev/null; then
2652     echo "$ac_file is unchanged"
2653     rm -f conftest.h
2654   else
2655     # Remove last slash and all that follows it.  Not all systems have dirname.
2656       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2657       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2658       # The file is in a subdirectory.
2659       test ! -d "$ac_dir" && mkdir "$ac_dir"
2660     fi
2661     rm -f $ac_file
2662     mv conftest.h $ac_file
2663   fi
2664 fi; done
2665
2666 EOF
2667 cat >> $CONFIG_STATUS <<EOF
2668
2669 EOF
2670 cat >> $CONFIG_STATUS <<\EOF
2671
2672 exit 0
2673 EOF
2674 chmod +x $CONFIG_STATUS
2675 rm -fr confdefs* $ac_clean_files
2676 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2677