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