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