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