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