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