/[LeafOK_CVS]/pvpgn-1.7.4/src/configure
ViewVC logotype

Annotation of /pvpgn-1.7.4/src/configure

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Tue Jun 6 03:41:37 2006 UTC (19 years, 9 months ago) by sysadm
Branch: MAIN
CVS Tags: pvpgn_1-7-4-0_MIL
Branch point for: GNU
Initial revision

1 sysadm 1.1 #! /bin/sh
2    
3     # Guess values for system-dependent variables and create Makefiles.
4     # Generated automatically using autoconf version 2.13
5     # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6     #
7     # This configure script is free software; the Free Software Foundation
8     # gives unlimited permission to copy, distribute and modify it.
9    
10     # Defaults:
11     ac_help=
12     ac_default_prefix=/usr/local
13     # Any additions from configure.in:
14     ac_help="$ac_help
15     --with-warn enable compiler warnings"
16     ac_help="$ac_help
17     --with-ansi use ANSI C mode"
18     ac_help="$ac_help
19     --with-includes=DIR search include DIR for header files"
20     ac_help="$ac_help
21     --with-libraries=DIR search library DIR for libraries"
22     ac_help="$ac_help
23     --with-efence link with Electric Fence to find memory problems"
24     ac_help="$ac_help
25     --with-mysql include MySQL user accounts support"
26     ac_help="$ac_help
27     --with-pgsql include PostgreSQL user accounts support"
28     ac_help="$ac_help
29     --with-mssql include MSSQL user accounts support (requires FreeTDS includes/libs)"
30     ac_help="$ac_help
31     --enable-poll Enable poll() instead of select(). Normally poll
32     is preferred over select, but configure knows poll
33     is broken on some platforms. If you think you are
34     smarter than the configure script, you may enable
35     poll with this option.
36     --disable-poll Disable the use of poll()."
37     ac_help="$ac_help
38     --enable-bnetd Enable building of bnetd server (default)
39     --disable-bnetd Disable building of bnetd server"
40     ac_help="$ac_help
41     --enable-d2cs Enable building of d2cs server (default)
42     --disable-d2cs Disable building of d2cs server"
43     ac_help="$ac_help
44     --enable-d2dbs Enable building of d2dbs server (default)
45     --disable-d2dbs Disable building of d2dbs server"
46    
47     # Initialize some variables set by options.
48     # The variables have the same names as the options, with
49     # dashes changed to underlines.
50     build=NONE
51     cache_file=./config.cache
52     exec_prefix=NONE
53     host=NONE
54     no_create=
55     nonopt=NONE
56     no_recursion=
57     prefix=NONE
58     program_prefix=NONE
59     program_suffix=NONE
60     program_transform_name=s,x,x,
61     silent=
62     site=
63     srcdir=
64     target=NONE
65     verbose=
66     x_includes=NONE
67     x_libraries=NONE
68     bindir='${exec_prefix}/bin'
69     sbindir='${exec_prefix}/sbin'
70     libexecdir='${exec_prefix}/libexec'
71     datadir='${prefix}/share'
72     sysconfdir='${prefix}/etc'
73     sharedstatedir='${prefix}/com'
74     localstatedir='${prefix}/var'
75     libdir='${exec_prefix}/lib'
76     includedir='${prefix}/include'
77     oldincludedir='/usr/include'
78     infodir='${prefix}/info'
79     mandir='${prefix}/man'
80    
81     # Initialize some other variables.
82     subdirs=
83     MFLAGS= MAKEFLAGS=
84     SHELL=${CONFIG_SHELL-/bin/sh}
85     # Maximum number of lines to put in a shell here document.
86     ac_max_here_lines=12
87    
88     ac_prev=
89     for ac_option
90     do
91    
92     # If the previous option needs an argument, assign it.
93     if test -n "$ac_prev"; then
94     eval "$ac_prev=\$ac_option"
95     ac_prev=
96     continue
97     fi
98    
99     case "$ac_option" in
100     -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
101     *) ac_optarg= ;;
102     esac
103    
104     # Accept the important Cygnus configure options, so we can diagnose typos.
105    
106     case "$ac_option" in
107    
108     -bindir | --bindir | --bindi | --bind | --bin | --bi)
109     ac_prev=bindir ;;
110     -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
111     bindir="$ac_optarg" ;;
112    
113     -build | --build | --buil | --bui | --bu)
114     ac_prev=build ;;
115     -build=* | --build=* | --buil=* | --bui=* | --bu=*)
116     build="$ac_optarg" ;;
117    
118     -cache-file | --cache-file | --cache-fil | --cache-fi \
119     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
120     ac_prev=cache_file ;;
121     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
122     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
123     cache_file="$ac_optarg" ;;
124    
125     -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
126     ac_prev=datadir ;;
127     -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
128     | --da=*)
129     datadir="$ac_optarg" ;;
130    
131     -disable-* | --disable-*)
132     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
133     # Reject names that are not valid shell variable names.
134     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
135     { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
136     fi
137     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
138     eval "enable_${ac_feature}=no" ;;
139    
140     -enable-* | --enable-*)
141     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
142     # Reject names that are not valid shell variable names.
143     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
144     { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
145     fi
146     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
147     case "$ac_option" in
148     *=*) ;;
149     *) ac_optarg=yes ;;
150     esac
151     eval "enable_${ac_feature}='$ac_optarg'" ;;
152    
153     -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
154     | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
155     | --exec | --exe | --ex)
156     ac_prev=exec_prefix ;;
157     -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
158     | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
159     | --exec=* | --exe=* | --ex=*)
160     exec_prefix="$ac_optarg" ;;
161    
162     -gas | --gas | --ga | --g)
163     # Obsolete; use --with-gas.
164     with_gas=yes ;;
165    
166     -help | --help | --hel | --he)
167     # Omit some internal or obsolete options to make the list less imposing.
168     # This message is too long to be a string in the A/UX 3.1 sh.
169     cat << EOF
170     Usage: configure [options] [host]
171     Options: [defaults in brackets after descriptions]
172     Configuration:
173     --cache-file=FILE cache test results in FILE
174     --help print this message
175     --no-create do not create output files
176     --quiet, --silent do not print \`checking...' messages
177     --version print the version of autoconf that created configure
178     Directory and file names:
179     --prefix=PREFIX install architecture-independent files in PREFIX
180     [$ac_default_prefix]
181     --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
182     [same as prefix]
183     --bindir=DIR user executables in DIR [EPREFIX/bin]
184     --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
185     --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
186     --datadir=DIR read-only architecture-independent data in DIR
187     [PREFIX/share]
188     --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
189     --sharedstatedir=DIR modifiable architecture-independent data in DIR
190     [PREFIX/com]
191     --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
192     --libdir=DIR object code libraries in DIR [EPREFIX/lib]
193     --includedir=DIR C header files in DIR [PREFIX/include]
194     --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
195     --infodir=DIR info documentation in DIR [PREFIX/info]
196     --mandir=DIR man documentation in DIR [PREFIX/man]
197     --srcdir=DIR find the sources in DIR [configure dir or ..]
198     --program-prefix=PREFIX prepend PREFIX to installed program names
199     --program-suffix=SUFFIX append SUFFIX to installed program names
200     --program-transform-name=PROGRAM
201     run sed PROGRAM on installed program names
202     EOF
203     cat << EOF
204     Host type:
205     --build=BUILD configure for building on BUILD [BUILD=HOST]
206     --host=HOST configure for HOST [guessed]
207     --target=TARGET configure for TARGET [TARGET=HOST]
208     Features and packages:
209     --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
210     --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
211     --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
212     --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
213     --x-includes=DIR X include files are in DIR
214     --x-libraries=DIR X library files are in DIR
215     EOF
216     if test -n "$ac_help"; then
217     echo "--enable and --with options recognized:$ac_help"
218     fi
219     exit 0 ;;
220    
221     -host | --host | --hos | --ho)
222     ac_prev=host ;;
223     -host=* | --host=* | --hos=* | --ho=*)
224     host="$ac_optarg" ;;
225    
226     -includedir | --includedir | --includedi | --included | --include \
227     | --includ | --inclu | --incl | --inc)
228     ac_prev=includedir ;;
229     -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
230     | --includ=* | --inclu=* | --incl=* | --inc=*)
231     includedir="$ac_optarg" ;;
232    
233     -infodir | --infodir | --infodi | --infod | --info | --inf)
234     ac_prev=infodir ;;
235     -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
236     infodir="$ac_optarg" ;;
237    
238     -libdir | --libdir | --libdi | --libd)
239     ac_prev=libdir ;;
240     -libdir=* | --libdir=* | --libdi=* | --libd=*)
241     libdir="$ac_optarg" ;;
242    
243     -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
244     | --libexe | --libex | --libe)
245     ac_prev=libexecdir ;;
246     -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
247     | --libexe=* | --libex=* | --libe=*)
248     libexecdir="$ac_optarg" ;;
249    
250     -localstatedir | --localstatedir | --localstatedi | --localstated \
251     | --localstate | --localstat | --localsta | --localst \
252     | --locals | --local | --loca | --loc | --lo)
253     ac_prev=localstatedir ;;
254     -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
255     | --localstate=* | --localstat=* | --localsta=* | --localst=* \
256     | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
257     localstatedir="$ac_optarg" ;;
258    
259     -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
260     ac_prev=mandir ;;
261     -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
262     mandir="$ac_optarg" ;;
263    
264     -nfp | --nfp | --nf)
265     # Obsolete; use --without-fp.
266     with_fp=no ;;
267    
268     -no-create | --no-create | --no-creat | --no-crea | --no-cre \
269     | --no-cr | --no-c)
270     no_create=yes ;;
271    
272     -no-recursion | --no-recursion | --no-recursio | --no-recursi \
273     | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
274     no_recursion=yes ;;
275    
276     -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
277     | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
278     | --oldin | --oldi | --old | --ol | --o)
279     ac_prev=oldincludedir ;;
280     -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
281     | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
282     | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
283     oldincludedir="$ac_optarg" ;;
284    
285     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
286     ac_prev=prefix ;;
287     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
288     prefix="$ac_optarg" ;;
289    
290     -program-prefix | --program-prefix | --program-prefi | --program-pref \
291     | --program-pre | --program-pr | --program-p)
292     ac_prev=program_prefix ;;
293     -program-prefix=* | --program-prefix=* | --program-prefi=* \
294     | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
295     program_prefix="$ac_optarg" ;;
296    
297     -program-suffix | --program-suffix | --program-suffi | --program-suff \
298     | --program-suf | --program-su | --program-s)
299     ac_prev=program_suffix ;;
300     -program-suffix=* | --program-suffix=* | --program-suffi=* \
301     | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
302     program_suffix="$ac_optarg" ;;
303    
304     -program-transform-name | --program-transform-name \
305     | --program-transform-nam | --program-transform-na \
306     | --program-transform-n | --program-transform- \
307     | --program-transform | --program-transfor \
308     | --program-transfo | --program-transf \
309     | --program-trans | --program-tran \
310     | --progr-tra | --program-tr | --program-t)
311     ac_prev=program_transform_name ;;
312     -program-transform-name=* | --program-transform-name=* \
313     | --program-transform-nam=* | --program-transform-na=* \
314     | --program-transform-n=* | --program-transform-=* \
315     | --program-transform=* | --program-transfor=* \
316     | --program-transfo=* | --program-transf=* \
317     | --program-trans=* | --program-tran=* \
318     | --progr-tra=* | --program-tr=* | --program-t=*)
319     program_transform_name="$ac_optarg" ;;
320    
321     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
322     | -silent | --silent | --silen | --sile | --sil)
323     silent=yes ;;
324    
325     -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
326     ac_prev=sbindir ;;
327     -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
328     | --sbi=* | --sb=*)
329     sbindir="$ac_optarg" ;;
330    
331     -sharedstatedir | --sharedstatedir | --sharedstatedi \
332     | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
333     | --sharedst | --shareds | --shared | --share | --shar \
334     | --sha | --sh)
335     ac_prev=sharedstatedir ;;
336     -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
337     | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
338     | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
339     | --sha=* | --sh=*)
340     sharedstatedir="$ac_optarg" ;;
341    
342     -site | --site | --sit)
343     ac_prev=site ;;
344     -site=* | --site=* | --sit=*)
345     site="$ac_optarg" ;;
346    
347     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
348     ac_prev=srcdir ;;
349     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
350     srcdir="$ac_optarg" ;;
351    
352     -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
353     | --syscon | --sysco | --sysc | --sys | --sy)
354     ac_prev=sysconfdir ;;
355     -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
356     | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
357     sysconfdir="$ac_optarg" ;;
358    
359     -target | --target | --targe | --targ | --tar | --ta | --t)
360     ac_prev=target ;;
361     -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
362     target="$ac_optarg" ;;
363    
364     -v | -verbose | --verbose | --verbos | --verbo | --verb)
365     verbose=yes ;;
366    
367     -version | --version | --versio | --versi | --vers)
368     echo "configure generated by autoconf version 2.13"
369     exit 0 ;;
370    
371     -with-* | --with-*)
372     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
373     # Reject names that are not valid shell variable names.
374     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
375     { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
376     fi
377     ac_package=`echo $ac_package| sed 's/-/_/g'`
378     case "$ac_option" in
379     *=*) ;;
380     *) ac_optarg=yes ;;
381     esac
382     eval "with_${ac_package}='$ac_optarg'" ;;
383    
384     -without-* | --without-*)
385     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
386     # Reject names that are not valid shell variable names.
387     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
388     { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
389     fi
390     ac_package=`echo $ac_package| sed 's/-/_/g'`
391     eval "with_${ac_package}=no" ;;
392    
393     --x)
394     # Obsolete; use --with-x.
395     with_x=yes ;;
396    
397     -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
398     | --x-incl | --x-inc | --x-in | --x-i)
399     ac_prev=x_includes ;;
400     -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
401     | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
402     x_includes="$ac_optarg" ;;
403    
404     -x-libraries | --x-libraries | --x-librarie | --x-librari \
405     | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
406     ac_prev=x_libraries ;;
407     -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
408     | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
409     x_libraries="$ac_optarg" ;;
410    
411     -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
412     ;;
413    
414     *)
415     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
416     echo "configure: warning: $ac_option: invalid host type" 1>&2
417     fi
418     if test "x$nonopt" != xNONE; then
419     { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
420     fi
421     nonopt="$ac_option"
422     ;;
423    
424     esac
425     done
426    
427     if test -n "$ac_prev"; then
428     { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
429     fi
430    
431     trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
432    
433     # File descriptor usage:
434     # 0 standard input
435     # 1 file creation
436     # 2 errors and warnings
437     # 3 some systems may open it to /dev/tty
438     # 4 used on the Kubota Titan
439     # 6 checking for... messages and results
440     # 5 compiler messages saved in config.log
441     if test "$silent" = yes; then
442     exec 6>/dev/null
443     else
444     exec 6>&1
445     fi
446     exec 5>./config.log
447    
448     echo "\
449     This file contains any messages produced by compilers while
450     running configure, to aid debugging if configure makes a mistake.
451     " 1>&5
452    
453     # Strip out --no-create and --no-recursion so they do not pile up.
454     # Also quote any args containing shell metacharacters.
455     ac_configure_args=
456     for ac_arg
457     do
458     case "$ac_arg" in
459     -no-create | --no-create | --no-creat | --no-crea | --no-cre \
460     | --no-cr | --no-c) ;;
461     -no-recursion | --no-recursion | --no-recursio | --no-recursi \
462     | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
463     *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
464     ac_configure_args="$ac_configure_args '$ac_arg'" ;;
465     *) ac_configure_args="$ac_configure_args $ac_arg" ;;
466     esac
467     done
468    
469     # NLS nuisances.
470     # Only set these to C if already set. These must not be set unconditionally
471     # because not all systems understand e.g. LANG=C (notably SCO).
472     # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
473     # Non-C LC_CTYPE values break the ctype check.
474     if test "${LANG+set}" = set; then LANG=C; export LANG; fi
475     if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
476     if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
477     if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
478    
479     # confdefs.h avoids OS command line length limits that DEFS can exceed.
480     rm -rf conftest* confdefs.h
481     # AIX cpp loses on an empty file, so make sure it contains at least a newline.
482     echo > confdefs.h
483    
484     # A filename unique to this package, relative to the directory that
485     # configure is in, which we can look for to find out if srcdir is correct.
486     ac_unique_file=bnetd/handle_bnet.c
487    
488     # Find the source files, if location was not specified.
489     if test -z "$srcdir"; then
490     ac_srcdir_defaulted=yes
491     # Try the directory containing this script, then its parent.
492     ac_prog=$0
493     ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
494     test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
495     srcdir=$ac_confdir
496     if test ! -r $srcdir/$ac_unique_file; then
497     srcdir=..
498     fi
499     else
500     ac_srcdir_defaulted=no
501     fi
502     if test ! -r $srcdir/$ac_unique_file; then
503     if test "$ac_srcdir_defaulted" = yes; then
504     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
505     else
506     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
507     fi
508     fi
509     srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
510    
511     # Prefer explicitly selected file to automatically selected ones.
512     if test -z "$CONFIG_SITE"; then
513     if test "x$prefix" != xNONE; then
514     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
515     else
516     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
517     fi
518     fi
519     for ac_site_file in $CONFIG_SITE; do
520     if test -r "$ac_site_file"; then
521     echo "loading site script $ac_site_file"
522     . "$ac_site_file"
523     fi
524     done
525    
526     if test -r "$cache_file"; then
527     echo "loading cache $cache_file"
528     . $cache_file
529     else
530     echo "creating cache $cache_file"
531     > $cache_file
532     fi
533    
534     ac_ext=c
535     # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
536     ac_cpp='$CPP $CPPFLAGS'
537     ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
538     ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
539     cross_compiling=$ac_cv_prog_cc_cross
540    
541     ac_exeext=
542     ac_objext=o
543     if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
544     # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
545     if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
546     ac_n= ac_c='
547     ' ac_t=' '
548     else
549     ac_n=-n ac_c= ac_t=
550     fi
551     else
552     ac_n= ac_c='\c' ac_t=
553     fi
554    
555    
556    
557    
558     AUTOCONF_CONFIG_DIR="autoconf"
559     ac_aux_dir=
560     for ac_dir in ${AUTOCONF_CONFIG_DIR} $srcdir/${AUTOCONF_CONFIG_DIR}; do
561     if test -f $ac_dir/install-sh; then
562     ac_aux_dir=$ac_dir
563     ac_install_sh="$ac_aux_dir/install-sh -c"
564     break
565     elif test -f $ac_dir/install.sh; then
566     ac_aux_dir=$ac_dir
567     ac_install_sh="$ac_aux_dir/install.sh -c"
568     break
569     fi
570     done
571     if test -z "$ac_aux_dir"; then
572     { echo "configure: error: can not find install-sh or install.sh in ${AUTOCONF_CONFIG_DIR} $srcdir/${AUTOCONF_CONFIG_DIR}" 1>&2; exit 1; }
573     fi
574     ac_config_guess=$ac_aux_dir/config.guess
575     ac_config_sub=$ac_aux_dir/config.sub
576     ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
577    
578     ## ----------------------------------------- ##
579     ## ANSIfy the C compiler whenever possible. ##
580     ## From Franc,ois Pinard ##
581     ## ----------------------------------------- ##
582    
583     # serial 1
584    
585     # @defmac AC_PROG_CC_STDC
586     # @maindex PROG_CC_STDC
587     # @ovindex CC
588     # If the C compiler in not in ANSI C mode by default, try to add an option
589     # to output variable @code{CC} to make it so. This macro tries various
590     # options that select ANSI C on some system or another. It considers the
591     # compiler to be in ANSI C mode if it handles function prototypes correctly.
592     #
593     # If you use this macro, you should check after calling it whether the C
594     # compiler has been set to accept ANSI C; if not, the shell variable
595     # @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
596     # code in ANSI C, you can make an un-ANSIfied copy of it by using the
597     # program @code{ansi2knr}, which comes with Ghostscript.
598     # @end defmac
599    
600    
601    
602    
603    
604    
605    
606    
607     # Do some error checking and defaulting for the host and target type.
608     # The inputs are:
609     # configure --host=HOST --target=TARGET --build=BUILD NONOPT
610     #
611     # The rules are:
612     # 1. You are not allowed to specify --host, --target, and nonopt at the
613     # same time.
614     # 2. Host defaults to nonopt.
615     # 3. If nonopt is not specified, then host defaults to the current host,
616     # as determined by config.guess.
617     # 4. Target and build default to nonopt.
618     # 5. If nonopt is not specified, then target and build default to host.
619    
620     # The aliases save the names the user supplied, while $host etc.
621     # will get canonicalized.
622     case $host---$target---$nonopt in
623     NONE---*---* | *---NONE---* | *---*---NONE) ;;
624     *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
625     esac
626    
627    
628     # Make sure we can run config.sub.
629     if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
630     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
631     fi
632    
633     echo $ac_n "checking host system type""... $ac_c" 1>&6
634     echo "configure:635: checking host system type" >&5
635    
636     host_alias=$host
637     case "$host_alias" in
638     NONE)
639     case $nonopt in
640     NONE)
641     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
642     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
643     fi ;;
644     *) host_alias=$nonopt ;;
645     esac ;;
646     esac
647    
648     host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
649     host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
650     host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
651     host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
652     echo "$ac_t""$host" 1>&6
653    
654     echo $ac_n "checking target system type""... $ac_c" 1>&6
655     echo "configure:656: checking target system type" >&5
656    
657     target_alias=$target
658     case "$target_alias" in
659     NONE)
660     case $nonopt in
661     NONE) target_alias=$host_alias ;;
662     *) target_alias=$nonopt ;;
663     esac ;;
664     esac
665    
666     target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
667     target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
668     target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
669     target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
670     echo "$ac_t""$target" 1>&6
671    
672     echo $ac_n "checking build system type""... $ac_c" 1>&6
673     echo "configure:674: checking build system type" >&5
674    
675     build_alias=$build
676     case "$build_alias" in
677     NONE)
678     case $nonopt in
679     NONE) build_alias=$host_alias ;;
680     *) build_alias=$nonopt ;;
681     esac ;;
682     esac
683    
684     build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
685     build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
686     build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
687     build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
688     echo "$ac_t""$build" 1>&6
689    
690     test "$host_alias" != "$target_alias" &&
691     test "$program_prefix$program_suffix$program_transform_name" = \
692     NONENONEs,x,x, &&
693     program_prefix=${target_alias}-
694    
695    
696     # Checks for programs.
697     # Extract the first word of "gcc", so it can be a program name with args.
698     set dummy gcc; ac_word=$2
699     echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
700     echo "configure:701: checking for $ac_word" >&5
701     if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
702     echo $ac_n "(cached) $ac_c" 1>&6
703     else
704     if test -n "$CC"; then
705     ac_cv_prog_CC="$CC" # Let the user override the test.
706     else
707     IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
708     ac_dummy="$PATH"
709     for ac_dir in $ac_dummy; do
710     test -z "$ac_dir" && ac_dir=.
711     if test -f $ac_dir/$ac_word; then
712     ac_cv_prog_CC="gcc"
713     break
714     fi
715     done
716     IFS="$ac_save_ifs"
717     fi
718     fi
719     CC="$ac_cv_prog_CC"
720     if test -n "$CC"; then
721     echo "$ac_t""$CC" 1>&6
722     else
723     echo "$ac_t""no" 1>&6
724     fi
725    
726     if test -z "$CC"; then
727     # Extract the first word of "cc", so it can be a program name with args.
728     set dummy cc; ac_word=$2
729     echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
730     echo "configure:731: checking for $ac_word" >&5
731     if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
732     echo $ac_n "(cached) $ac_c" 1>&6
733     else
734     if test -n "$CC"; then
735     ac_cv_prog_CC="$CC" # Let the user override the test.
736     else
737     IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
738     ac_prog_rejected=no
739     ac_dummy="$PATH"
740     for ac_dir in $ac_dummy; do
741     test -z "$ac_dir" && ac_dir=.
742     if test -f $ac_dir/$ac_word; then
743     if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
744     ac_prog_rejected=yes
745     continue
746     fi
747     ac_cv_prog_CC="cc"
748     break
749     fi
750     done
751     IFS="$ac_save_ifs"
752     if test $ac_prog_rejected = yes; then
753     # We found a bogon in the path, so make sure we never use it.
754     set dummy $ac_cv_prog_CC
755     shift
756     if test $# -gt 0; then
757     # We chose a different compiler from the bogus one.
758     # However, it has the same basename, so the bogon will be chosen
759     # first if we set CC to just the basename; use the full file name.
760     shift
761     set dummy "$ac_dir/$ac_word" "$@"
762     shift
763     ac_cv_prog_CC="$@"
764     fi
765     fi
766     fi
767     fi
768     CC="$ac_cv_prog_CC"
769     if test -n "$CC"; then
770     echo "$ac_t""$CC" 1>&6
771     else
772     echo "$ac_t""no" 1>&6
773     fi
774    
775     if test -z "$CC"; then
776     case "`uname -s`" in
777     *win32* | *WIN32*)
778     # Extract the first word of "cl", so it can be a program name with args.
779     set dummy cl; ac_word=$2
780     echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
781     echo "configure:782: checking for $ac_word" >&5
782     if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
783     echo $ac_n "(cached) $ac_c" 1>&6
784     else
785     if test -n "$CC"; then
786     ac_cv_prog_CC="$CC" # Let the user override the test.
787     else
788     IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
789     ac_dummy="$PATH"
790     for ac_dir in $ac_dummy; do
791     test -z "$ac_dir" && ac_dir=.
792     if test -f $ac_dir/$ac_word; then
793     ac_cv_prog_CC="cl"
794     break
795     fi
796     done
797     IFS="$ac_save_ifs"
798     fi
799     fi
800     CC="$ac_cv_prog_CC"
801     if test -n "$CC"; then
802     echo "$ac_t""$CC" 1>&6
803     else
804     echo "$ac_t""no" 1>&6
805     fi
806     ;;
807     esac
808     fi
809     test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
810     fi
811    
812     echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
813     echo "configure:814: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
814    
815     ac_ext=c
816     # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
817     ac_cpp='$CPP $CPPFLAGS'
818     ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
819     ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
820     cross_compiling=$ac_cv_prog_cc_cross
821    
822     cat > conftest.$ac_ext << EOF
823    
824     #line 825 "configure"
825     #include "confdefs.h"
826    
827     main(){return(0);}
828     EOF
829     if { (eval echo configure:830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
830     ac_cv_prog_cc_works=yes
831     # If we can't run a trivial program, we are probably using a cross compiler.
832     if (./conftest; exit) 2>/dev/null; then
833     ac_cv_prog_cc_cross=no
834     else
835     ac_cv_prog_cc_cross=yes
836     fi
837     else
838     echo "configure: failed program was:" >&5
839     cat conftest.$ac_ext >&5
840     ac_cv_prog_cc_works=no
841     fi
842     rm -fr conftest*
843     ac_ext=c
844     # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
845     ac_cpp='$CPP $CPPFLAGS'
846     ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
847     ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
848     cross_compiling=$ac_cv_prog_cc_cross
849    
850     echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
851     if test $ac_cv_prog_cc_works = no; then
852     { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
853     fi
854     echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
855     echo "configure:856: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
856     echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
857     cross_compiling=$ac_cv_prog_cc_cross
858    
859     echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
860     echo "configure:861: checking whether we are using GNU C" >&5
861     if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
862     echo $ac_n "(cached) $ac_c" 1>&6
863     else
864     cat > conftest.c <<EOF
865     #ifdef __GNUC__
866     yes;
867     #endif
868     EOF
869     if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
870     ac_cv_prog_gcc=yes
871     else
872     ac_cv_prog_gcc=no
873     fi
874     fi
875    
876     echo "$ac_t""$ac_cv_prog_gcc" 1>&6
877    
878     if test $ac_cv_prog_gcc = yes; then
879     GCC=yes
880     else
881     GCC=
882     fi
883    
884     ac_test_CFLAGS="${CFLAGS+set}"
885     ac_save_CFLAGS="$CFLAGS"
886     CFLAGS=
887     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
888     echo "configure:889: checking whether ${CC-cc} accepts -g" >&5
889     if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
890     echo $ac_n "(cached) $ac_c" 1>&6
891     else
892     echo 'void f(){}' > conftest.c
893     if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
894     ac_cv_prog_cc_g=yes
895     else
896     ac_cv_prog_cc_g=no
897     fi
898     rm -f conftest*
899    
900     fi
901    
902     echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
903     if test "$ac_test_CFLAGS" = set; then
904     CFLAGS="$ac_save_CFLAGS"
905     elif test $ac_cv_prog_cc_g = yes; then
906     if test "$GCC" = yes; then
907     CFLAGS="-g -O2"
908     else
909     CFLAGS="-g"
910     fi
911     else
912     if test "$GCC" = yes; then
913     CFLAGS="-O2"
914     else
915     CFLAGS=
916     fi
917     fi
918    
919     # Find a good install program. We prefer a C program (faster),
920     # so one script is as good as another. But avoid the broken or
921     # incompatible versions:
922     # SysV /etc/install, /usr/sbin/install
923     # SunOS /usr/etc/install
924     # IRIX /sbin/install
925     # AIX /bin/install
926     # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
927     # AFS /usr/afsws/bin/install, which mishandles nonexistent args
928     # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
929     # ./install, which can be erroneously created by make from ./install.sh.
930     echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
931     echo "configure:932: checking for a BSD compatible install" >&5
932     if test -z "$INSTALL"; then
933     if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
934     echo $ac_n "(cached) $ac_c" 1>&6
935     else
936     IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
937     for ac_dir in $PATH; do
938     # Account for people who put trailing slashes in PATH elements.
939     case "$ac_dir/" in
940     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
941     *)
942     # OSF1 and SCO ODT 3.0 have their own names for install.
943     # Don't use installbsd from OSF since it installs stuff as root
944     # by default.
945     for ac_prog in ginstall scoinst install; do
946     if test -f $ac_dir/$ac_prog; then
947     if test $ac_prog = install &&
948     grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
949     # AIX install. It has an incompatible calling convention.
950     :
951     else
952     ac_cv_path_install="$ac_dir/$ac_prog -c"
953     break 2
954     fi
955     fi
956     done
957     ;;
958     esac
959     done
960     IFS="$ac_save_IFS"
961    
962     fi
963     if test "${ac_cv_path_install+set}" = set; then
964     INSTALL="$ac_cv_path_install"
965     else
966     # As a last resort, use the slow shell script. We don't cache a
967     # path for INSTALL within a source directory, because that will
968     # break other packages using the cache if that directory is
969     # removed, or if the path is relative.
970     INSTALL="$ac_install_sh"
971     fi
972     fi
973     echo "$ac_t""$INSTALL" 1>&6
974    
975     # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
976     # It thinks the first close brace ends the variable substitution.
977     test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
978    
979     test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
980    
981     test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
982    
983    
984     # Checks compiler.
985     echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
986     echo "configure:987: checking how to run the C preprocessor" >&5
987     # On Suns, sometimes $CPP names a directory.
988     if test -n "$CPP" && test -d "$CPP"; then
989     CPP=
990     fi
991     if test -z "$CPP"; then
992     if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
993     echo $ac_n "(cached) $ac_c" 1>&6
994     else
995     # This must be in double quotes, not single quotes, because CPP may get
996     # substituted into the Makefile and "${CC-cc}" will confuse make.
997     CPP="${CC-cc} -E"
998     # On the NeXT, cc -E runs the code through the compiler's parser,
999     # not just through cpp.
1000     cat > conftest.$ac_ext <<EOF
1001     #line 1002 "configure"
1002     #include "confdefs.h"
1003     #include <assert.h>
1004     Syntax Error
1005     EOF
1006     ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1007     { (eval echo configure:1008: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1008     ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1009     if test -z "$ac_err"; then
1010     :
1011     else
1012     echo "$ac_err" >&5
1013     echo "configure: failed program was:" >&5
1014     cat conftest.$ac_ext >&5
1015     rm -rf conftest*
1016     CPP="${CC-cc} -E -traditional-cpp"
1017     cat > conftest.$ac_ext <<EOF
1018     #line 1019 "configure"
1019     #include "confdefs.h"
1020     #include <assert.h>
1021     Syntax Error
1022     EOF
1023     ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1024     { (eval echo configure:1025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1025     ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1026     if test -z "$ac_err"; then
1027     :
1028     else
1029     echo "$ac_err" >&5
1030     echo "configure: failed program was:" >&5
1031     cat conftest.$ac_ext >&5
1032     rm -rf conftest*
1033     CPP="${CC-cc} -nologo -E"
1034     cat > conftest.$ac_ext <<EOF
1035     #line 1036 "configure"
1036     #include "confdefs.h"
1037     #include <assert.h>
1038     Syntax Error
1039     EOF
1040     ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1041     { (eval echo configure:1042: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1042     ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1043     if test -z "$ac_err"; then
1044     :
1045     else
1046     echo "$ac_err" >&5
1047     echo "configure: failed program was:" >&5
1048     cat conftest.$ac_ext >&5
1049     rm -rf conftest*
1050     CPP=/lib/cpp
1051     fi
1052     rm -f conftest*
1053     fi
1054     rm -f conftest*
1055     fi
1056     rm -f conftest*
1057     ac_cv_prog_CPP="$CPP"
1058     fi
1059     CPP="$ac_cv_prog_CPP"
1060     else
1061     ac_cv_prog_CPP="$CPP"
1062     fi
1063     echo "$ac_t""$CPP" 1>&6
1064    
1065    
1066     # Checks for systems.
1067     echo $ac_n "checking for AIX""... $ac_c" 1>&6
1068     echo "configure:1069: checking for AIX" >&5
1069     cat > conftest.$ac_ext <<EOF
1070     #line 1071 "configure"
1071     #include "confdefs.h"
1072     #ifdef _AIX
1073     yes
1074     #endif
1075    
1076     EOF
1077     if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1078     egrep "yes" >/dev/null 2>&1; then
1079     rm -rf conftest*
1080     echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
1081     #define _ALL_SOURCE 1
1082     EOF
1083    
1084     else
1085     rm -rf conftest*
1086     echo "$ac_t""no" 1>&6
1087     fi
1088     rm -f conftest*
1089    
1090    
1091     echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
1092     echo "configure:1093: checking for POSIXized ISC" >&5
1093     if test -d /etc/conf/kconfig.d &&
1094     grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1095     then
1096     echo "$ac_t""yes" 1>&6
1097     ISC=yes # If later tests want to check for ISC.
1098     cat >> confdefs.h <<\EOF
1099     #define _POSIX_SOURCE 1
1100     EOF
1101    
1102     if test "$GCC" = yes; then
1103     CC="$CC -posix"
1104     else
1105     CC="$CC -Xp"
1106     fi
1107     else
1108     echo "$ac_t""no" 1>&6
1109     ISC=
1110     fi
1111    
1112     ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
1113     echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
1114     echo "configure:1115: checking for minix/config.h" >&5
1115     if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1116     echo $ac_n "(cached) $ac_c" 1>&6
1117     else
1118     cat > conftest.$ac_ext <<EOF
1119     #line 1120 "configure"
1120     #include "confdefs.h"
1121     #include <minix/config.h>
1122     EOF
1123     ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1124     { (eval echo configure:1125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1125     ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1126     if test -z "$ac_err"; then
1127     rm -rf conftest*
1128     eval "ac_cv_header_$ac_safe=yes"
1129     else
1130     echo "$ac_err" >&5
1131     echo "configure: failed program was:" >&5
1132     cat conftest.$ac_ext >&5
1133     rm -rf conftest*
1134     eval "ac_cv_header_$ac_safe=no"
1135     fi
1136     rm -f conftest*
1137     fi
1138     if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1139     echo "$ac_t""yes" 1>&6
1140     MINIX=yes
1141     else
1142     echo "$ac_t""no" 1>&6
1143     MINIX=
1144     fi
1145    
1146     if test "$MINIX" = yes; then
1147     cat >> confdefs.h <<\EOF
1148     #define _POSIX_SOURCE 1
1149     EOF
1150    
1151     cat >> confdefs.h <<\EOF
1152     #define _POSIX_1_SOURCE 2
1153     EOF
1154    
1155     cat >> confdefs.h <<\EOF
1156     #define _MINIX 1
1157     EOF
1158    
1159     fi
1160    
1161    
1162     # Custom checks.
1163     zwarnflags=""
1164     # Check whether --with-warn or --without-warn was given.
1165     if test "${with_warn+set}" = set; then
1166     withval="$with_warn"
1167     zwarnflags="-pedantic -Wall -W -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wunreachable-code -Winline -Wpacked -Wno-sign-compare"
1168     fi
1169    
1170    
1171     zlangflags=""
1172     # Check whether --with-ansi or --without-ansi was given.
1173     if test "${with_ansi+set}" = set; then
1174     withval="$with_ansi"
1175     zlangflags="-ansi -pedantic"
1176     fi
1177    
1178    
1179     extra_include=""
1180     # Check whether --with-includes or --without-includes was given.
1181     if test "${with_includes+set}" = set; then
1182     withval="$with_includes"
1183    
1184     case "x$withval" in
1185     x/*|x.*)
1186     echo "$ac_t""adding ${withval} to include search path" 1>&6
1187     if test ! -d ${withval}; then
1188     echo "$ac_t""Warning: directory ${withval} does not exist" 1>&6
1189     fi
1190     extra_include="${extra_include} -I${withval}"
1191     ;;
1192     *)
1193     echo "$ac_t""not adding any includes" 1>&6
1194     ;;
1195     esac
1196     fi
1197    
1198    
1199     extra_lib_dir=""
1200     # Check whether --with-libraries or --without-libraries was given.
1201     if test "${with_libraries+set}" = set; then
1202     withval="$with_libraries"
1203    
1204     case "x${withval}" in
1205     x/*|x.*)
1206     echo "$ac_t""adding ${withval} to library search path" 1>&6
1207     if test ! -d ${withval}; then
1208     echo "$ac_t""Warning: directory ${withval} does not exist" 1>&6
1209     fi
1210     extra_lib_dir="${extra_lib_dir} -L${withval}"
1211     ;;
1212     *)
1213     echo "$ac_t""not adding any libs" 1>&6
1214     ;;
1215     esac
1216     fi
1217    
1218    
1219     extra_lib=""
1220     # Check whether --with-efence or --without-efence was given.
1221     if test "${with_efence+set}" = set; then
1222     withval="$with_efence"
1223     extra_lib="${extra_lib} -lefence"
1224     fi
1225    
1226    
1227     # Check whether --with-mysql or --without-mysql was given.
1228     if test "${with_mysql+set}" = set; then
1229     withval="$with_mysql"
1230     ac_with_mysql='yes'
1231     fi
1232    
1233    
1234     # Check whether --with-pgsql or --without-pgsql was given.
1235     if test "${with_pgsql+set}" = set; then
1236     withval="$with_pgsql"
1237     ac_with_pgsql='yes'
1238     fi
1239    
1240    
1241     # Check whether --with-mssql or --without-mssql was given.
1242     if test "${with_mssql+set}" = set; then
1243     withval="$with_mssql"
1244     ac_with_mssql='yes'
1245     fi
1246    
1247    
1248     extra_define=""
1249     # Check whether --enable-poll or --disable-poll was given.
1250     if test "${enable_poll+set}" = set; then
1251     enableval="$enable_poll"
1252    
1253     case "$enableval" in
1254     yes)
1255     echo "Forcing poll() to be enabled"
1256     ac_cv_func_poll='yes'
1257     ;;
1258     no)
1259     echo "Forcing poll() to be disabled"
1260     ac_cv_func_poll='no'
1261     ;;
1262     esac
1263    
1264     fi
1265    
1266    
1267     # Disable poll() on certain platforms. Override by setting ac_cv_func_poll
1268     # when running configure.
1269     if test -z "$ac_cv_func_poll"; then
1270     case "$host" in
1271     alpha-dec-osf3.*)
1272     # John Kay (jkay@nlanr.net) 19970818
1273     echo "disabling poll for $host..."
1274     ac_cv_func_poll='no'
1275     ;;
1276     *-hp-hpux*.*)
1277     # Duane Wessels
1278     echo "disabling poll for $host..."
1279     ac_cv_func_poll='no'
1280     ;;
1281     *-linux-*)
1282     # Henrik Nordstrom (hno@hem.passagen.se) 19980817
1283     # poll is problematic on Linux. We disable it
1284     # by default until Linux gets it right.
1285     rev=`uname -r | awk -F. '{printf "%03d%03d",$1,$2}'`
1286     if test $rev -lt 002002; then
1287     echo "disabling poll for $host < 2.2..."
1288     ac_cv_func_poll='no'
1289     fi
1290     ;;
1291     powerpc-ibm-aix4.1.*)
1292     # Mike Laster (mlaster@metavillage.com) 19981021
1293     echo "disabling poll for $host..."
1294     ac_cv_func_poll='no'
1295     ;;
1296     *-pc-sco3.2*)
1297     # Robert Side <rside@aiinc.bc.ca>
1298     # Mon, 18 Jan 1999 17:48:00 GMT
1299     echo "disabling poll for $host..."
1300     ac_cv_func_poll='no'
1301     ;;
1302     esac
1303     fi
1304    
1305     # disable parts of the build process
1306     # Check whether --enable-bnetd or --disable-bnetd was given.
1307     if test "${enable_bnetd+set}" = set; then
1308     enableval="$enable_bnetd"
1309     :
1310     fi
1311    
1312     # Check whether --enable-d2cs or --disable-d2cs was given.
1313     if test "${enable_d2cs+set}" = set; then
1314     enableval="$enable_d2cs"
1315     :
1316     fi
1317    
1318     # Check whether --enable-d2dbs or --disable-d2dbs was given.
1319     if test "${enable_d2dbs+set}" = set; then
1320     enableval="$enable_d2dbs"
1321     :
1322     fi
1323    
1324    
1325     LDFLAGS="${LDFLAGS} ${extra_lib_dir}"
1326     LIBS="${LIBS} ${extra_lib}"
1327     CFLAGS="${CFLAGS} ${zlangflags} ${zwarnflags}"
1328     DEFINES="${DEFINES} ${extra_define}"
1329     CPPFLAGS="${CPPFLAGS} ${extra_include}"
1330    
1331     # This is our invention so we have to substitute it ourselves
1332     # autoconf uses DEFS
1333    
1334    
1335    
1336    
1337    
1338     # Checks for compiler quirks.
1339     if test $ac_cv_prog_gcc = yes; then
1340     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
1341     echo "configure:1342: checking whether ${CC-cc} needs -traditional" >&5
1342     if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
1343     echo $ac_n "(cached) $ac_c" 1>&6
1344     else
1345     ac_pattern="Autoconf.*'x'"
1346     cat > conftest.$ac_ext <<EOF
1347     #line 1348 "configure"
1348     #include "confdefs.h"
1349     #include <sgtty.h>
1350     Autoconf TIOCGETP
1351     EOF
1352     if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1353     egrep "$ac_pattern" >/dev/null 2>&1; then
1354     rm -rf conftest*
1355     ac_cv_prog_gcc_traditional=yes
1356     else
1357     rm -rf conftest*
1358     ac_cv_prog_gcc_traditional=no
1359     fi
1360     rm -f conftest*
1361    
1362    
1363     if test $ac_cv_prog_gcc_traditional = no; then
1364     cat > conftest.$ac_ext <<EOF
1365     #line 1366 "configure"
1366     #include "confdefs.h"
1367     #include <termio.h>
1368     Autoconf TCGETA
1369     EOF
1370     if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1371     egrep "$ac_pattern" >/dev/null 2>&1; then
1372     rm -rf conftest*
1373     ac_cv_prog_gcc_traditional=yes
1374     fi
1375     rm -f conftest*
1376    
1377     fi
1378     fi
1379    
1380     echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
1381     if test $ac_cv_prog_gcc_traditional = yes; then
1382     CC="$CC -traditional"
1383     fi
1384     fi
1385    
1386    
1387    
1388    
1389     echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
1390     echo "configure:1391: checking for ${CC-cc} option to accept ANSI C" >&5
1391     if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
1392     echo $ac_n "(cached) $ac_c" 1>&6
1393     else
1394     am_cv_prog_cc_stdc=no
1395     ac_save_CC="$CC"
1396     # Don't try gcc -ansi; that turns off useful extensions and
1397     # breaks some systems' header files.
1398     # AIX -qlanglvl=ansi
1399     # Ultrix and OSF/1 -std1
1400     # HP-UX -Aa -D_HPUX_SOURCE
1401     # SVR4 -Xc -D__EXTENSIONS__
1402     for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1403     do
1404     CC="$ac_save_CC $ac_arg"
1405     cat > conftest.$ac_ext <<EOF
1406     #line 1407 "configure"
1407     #include "confdefs.h"
1408     #include <stdarg.h>
1409     #include <stdio.h>
1410     #include <sys/types.h>
1411     #include <sys/stat.h>
1412     /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1413     struct buf { int x; };
1414     FILE * (*rcsopen) (struct buf *, struct stat *, int);
1415     static char *e (p, i)
1416     char **p;
1417     int i;
1418     {
1419     return p[i];
1420     }
1421     static char *f (char * (*g) (char **, int), char **p, ...)
1422     {
1423     char *s;
1424     va_list v;
1425     va_start (v,p);
1426     s = g (p, va_arg (v,int));
1427     va_end (v);
1428     return s;
1429     }
1430     int test (int i, double x);
1431     struct s1 {int (*f) (int a);};
1432     struct s2 {int (*f) (double a);};
1433     int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1434     int argc;
1435     char **argv;
1436    
1437     int main() {
1438    
1439     return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1440    
1441     ; return 0; }
1442     EOF
1443     if { (eval echo configure:1444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1444     rm -rf conftest*
1445     am_cv_prog_cc_stdc="$ac_arg"; break
1446     else
1447     echo "configure: failed program was:" >&5
1448     cat conftest.$ac_ext >&5
1449     fi
1450     rm -f conftest*
1451     done
1452     CC="$ac_save_CC"
1453    
1454     fi
1455    
1456     if test -z "$am_cv_prog_cc_stdc"; then
1457     echo "$ac_t""none needed" 1>&6
1458     else
1459     echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1460     fi
1461     case "x$am_cv_prog_cc_stdc" in
1462     x|xno) ;;
1463     *) CC="$CC $am_cv_prog_cc_stdc" ;;
1464     esac
1465    
1466     echo $ac_n "checking for working const""... $ac_c" 1>&6
1467     echo "configure:1468: checking for working const" >&5
1468     if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1469     echo $ac_n "(cached) $ac_c" 1>&6
1470     else
1471     cat > conftest.$ac_ext <<EOF
1472     #line 1473 "configure"
1473     #include "confdefs.h"
1474    
1475     int main() {
1476    
1477     /* Ultrix mips cc rejects this. */
1478     typedef int charset[2]; const charset x;
1479     /* SunOS 4.1.1 cc rejects this. */
1480     char const *const *ccp;
1481     char **p;
1482     /* NEC SVR4.0.2 mips cc rejects this. */
1483     struct point {int x, y;};
1484     static struct point const zero = {0,0};
1485     /* AIX XL C 1.02.0.0 rejects this.
1486     It does not let you subtract one const X* pointer from another in an arm
1487     of an if-expression whose if-part is not a constant expression */
1488     const char *g = "string";
1489     ccp = &g + (g ? g-g : 0);
1490     /* HPUX 7.0 cc rejects these. */
1491     ++ccp;
1492     p = (char**) ccp;
1493     ccp = (char const *const *) p;
1494     { /* SCO 3.2v4 cc rejects this. */
1495     char *t;
1496     char const *s = 0 ? (char *) 0 : (char const *) 0;
1497    
1498     *t++ = 0;
1499     }
1500     { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1501     int x[] = {25, 17};
1502     const int *foo = &x[0];
1503     ++foo;
1504     }
1505     { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1506     typedef const int *iptr;
1507     iptr p = 0;
1508     ++p;
1509     }
1510     { /* AIX XL C 1.02.0.0 rejects this saying
1511     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1512     struct s { int j; const int *ap[3]; };
1513     struct s *b; b->j = 5;
1514     }
1515     { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1516     const int foo = 10;
1517     }
1518    
1519     ; return 0; }
1520     EOF
1521     if { (eval echo configure:1522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1522     rm -rf conftest*
1523     ac_cv_c_const=yes
1524     else
1525     echo "configure: failed program was:" >&5
1526     cat conftest.$ac_ext >&5
1527     rm -rf conftest*
1528     ac_cv_c_const=no
1529     fi
1530     rm -f conftest*
1531     fi
1532    
1533     echo "$ac_t""$ac_cv_c_const" 1>&6
1534     if test $ac_cv_c_const = no; then
1535     cat >> confdefs.h <<\EOF
1536     #define const
1537     EOF
1538    
1539     fi
1540    
1541     echo $ac_n "checking for inline""... $ac_c" 1>&6
1542     echo "configure:1543: checking for inline" >&5
1543     if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1544     echo $ac_n "(cached) $ac_c" 1>&6
1545     else
1546     ac_cv_c_inline=no
1547     for ac_kw in inline __inline__ __inline; do
1548     cat > conftest.$ac_ext <<EOF
1549     #line 1550 "configure"
1550     #include "confdefs.h"
1551    
1552     int main() {
1553     } $ac_kw foo() {
1554     ; return 0; }
1555     EOF
1556     if { (eval echo configure:1557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1557     rm -rf conftest*
1558     ac_cv_c_inline=$ac_kw; break
1559     else
1560     echo "configure: failed program was:" >&5
1561     cat conftest.$ac_ext >&5
1562     fi
1563     rm -f conftest*
1564     done
1565    
1566     fi
1567    
1568     echo "$ac_t""$ac_cv_c_inline" 1>&6
1569     case "$ac_cv_c_inline" in
1570     inline | yes) ;;
1571     no) cat >> confdefs.h <<\EOF
1572     #define inline
1573     EOF
1574     ;;
1575     *) cat >> confdefs.h <<EOF
1576     #define inline $ac_cv_c_inline
1577     EOF
1578     ;;
1579     esac
1580    
1581     #AC_EXEEXT
1582    
1583     # Checks for libraries.
1584     echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
1585     echo "configure:1586: checking for pow in -lm" >&5
1586     ac_lib_var=`echo m'_'pow | sed 'y%./+-%__p_%'`
1587     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1588     echo $ac_n "(cached) $ac_c" 1>&6
1589     else
1590     ac_save_LIBS="$LIBS"
1591     LIBS="-lm $LIBS"
1592     cat > conftest.$ac_ext <<EOF
1593     #line 1594 "configure"
1594     #include "confdefs.h"
1595     /* Override any gcc2 internal prototype to avoid an error. */
1596     /* We use char because int might match the return type of a gcc2
1597     builtin and then its argument prototype would still apply. */
1598     char pow();
1599    
1600     int main() {
1601     pow()
1602     ; return 0; }
1603     EOF
1604     if { (eval echo configure:1605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1605     rm -rf conftest*
1606     eval "ac_cv_lib_$ac_lib_var=yes"
1607     else
1608     echo "configure: failed program was:" >&5
1609     cat conftest.$ac_ext >&5
1610     rm -rf conftest*
1611     eval "ac_cv_lib_$ac_lib_var=no"
1612     fi
1613     rm -f conftest*
1614     LIBS="$ac_save_LIBS"
1615    
1616     fi
1617     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1618     echo "$ac_t""yes" 1>&6
1619     LIBS="$LIBS -lm"
1620     else
1621     echo "$ac_t""no" 1>&6
1622     fi
1623    
1624    
1625     echo $ac_n "checking for compress in -lz""... $ac_c" 1>&6
1626     echo "configure:1627: checking for compress in -lz" >&5
1627     ac_lib_var=`echo z'_'compress | sed 'y%./+-%__p_%'`
1628     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1629     echo $ac_n "(cached) $ac_c" 1>&6
1630     else
1631     ac_save_LIBS="$LIBS"
1632     LIBS="-lz $LIBS"
1633     cat > conftest.$ac_ext <<EOF
1634     #line 1635 "configure"
1635     #include "confdefs.h"
1636     /* Override any gcc2 internal prototype to avoid an error. */
1637     /* We use char because int might match the return type of a gcc2
1638     builtin and then its argument prototype would still apply. */
1639     char compress();
1640    
1641     int main() {
1642     compress()
1643     ; return 0; }
1644     EOF
1645     if { (eval echo configure:1646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1646     rm -rf conftest*
1647     eval "ac_cv_lib_$ac_lib_var=yes"
1648     else
1649     echo "configure: failed program was:" >&5
1650     cat conftest.$ac_ext >&5
1651     rm -rf conftest*
1652     eval "ac_cv_lib_$ac_lib_var=no"
1653     fi
1654     rm -f conftest*
1655     LIBS="$ac_save_LIBS"
1656    
1657     fi
1658     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1659     echo "$ac_t""yes" 1>&6
1660     LIBS="$LIBS -lz"
1661     else
1662     echo "$ac_t""no" 1>&6
1663     fi
1664    
1665    
1666     mysql_include_path=""
1667     if test "$ac_with_mysql" = "yes" ; then
1668     echo -n "checking for mysql include path ... "
1669     mysql_try_includes="/usr/include /usr/include/mysql /usr/local/include /usr/local/include/mysql /usr/local/mysql/include /usr/local/mysql/include/mysql"
1670     for i in `echo ${mysql_try_includes}`; do
1671     if test -f "${i}/mysql.h" ; then
1672     echo ${i}
1673     CPPFLAGS="${CPPFLAGS} -I${i}"
1674     mysql_include_path=${i}
1675     break
1676     fi
1677     done
1678     fi
1679    
1680     mysql_lib_path=""
1681     if test "$ac_with_mysql" = "yes" ; then
1682     echo $ac_n "checking for mysql_init in -lmysqlclient""... $ac_c" 1>&6
1683     echo "configure:1684: checking for mysql_init in -lmysqlclient" >&5
1684     ac_lib_var=`echo mysqlclient'_'mysql_init | sed 'y%./+-%__p_%'`
1685     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1686     echo $ac_n "(cached) $ac_c" 1>&6
1687     else
1688     ac_save_LIBS="$LIBS"
1689     LIBS="-lmysqlclient $LIBS"
1690     cat > conftest.$ac_ext <<EOF
1691     #line 1692 "configure"
1692     #include "confdefs.h"
1693     /* Override any gcc2 internal prototype to avoid an error. */
1694     /* We use char because int might match the return type of a gcc2
1695     builtin and then its argument prototype would still apply. */
1696     char mysql_init ();
1697    
1698     int main() {
1699     mysql_init ()
1700     ; return 0; }
1701     EOF
1702     if { (eval echo configure:1703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1703     rm -rf conftest*
1704     eval "ac_cv_lib_$ac_lib_var=yes"
1705     else
1706     echo "configure: failed program was:" >&5
1707     cat conftest.$ac_ext >&5
1708     rm -rf conftest*
1709     eval "ac_cv_lib_$ac_lib_var=no"
1710     fi
1711     rm -f conftest*
1712     LIBS="$ac_save_LIBS"
1713    
1714     fi
1715     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1716     echo "$ac_t""yes" 1>&6
1717     DEFINES="${DEFINES} -DWITH_SQL_MYSQL" ; LIBS="${LIBS} -lmysqlclient"
1718     else
1719     echo "$ac_t""no" 1>&6
1720    
1721     echo -n "checking for mysql lib path ... "
1722     mysql_try_libs="/usr/lib /usr/lib/mysql /usr/local/lib /usr/local/lib/mysql /usr/local/mysql/lib /usr/local/mysql/lib/mysql"
1723     for i in `echo ${mysql_try_libs}`; do
1724     if test -f "${i}/libmysqlclient.so" -o -f "${i}/libmysqlclient.a" ; then
1725     echo ${i}
1726     save_ldflags="${LDFLAGS}"
1727     LDFLAGS="${LDFLAGS} -L${i}"
1728     echo $ac_n "checking for mysql_close in -lmysqlclient""... $ac_c" 1>&6
1729     echo "configure:1730: checking for mysql_close in -lmysqlclient" >&5
1730     ac_lib_var=`echo mysqlclient'_'mysql_close | sed 'y%./+-%__p_%'`
1731     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1732     echo $ac_n "(cached) $ac_c" 1>&6
1733     else
1734     ac_save_LIBS="$LIBS"
1735     LIBS="-lmysqlclient $LIBS"
1736     cat > conftest.$ac_ext <<EOF
1737     #line 1738 "configure"
1738     #include "confdefs.h"
1739     /* Override any gcc2 internal prototype to avoid an error. */
1740     /* We use char because int might match the return type of a gcc2
1741     builtin and then its argument prototype would still apply. */
1742     char mysql_close ();
1743    
1744     int main() {
1745     mysql_close ()
1746     ; return 0; }
1747     EOF
1748     if { (eval echo configure:1749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1749     rm -rf conftest*
1750     eval "ac_cv_lib_$ac_lib_var=yes"
1751     else
1752     echo "configure: failed program was:" >&5
1753     cat conftest.$ac_ext >&5
1754     rm -rf conftest*
1755     eval "ac_cv_lib_$ac_lib_var=no"
1756     fi
1757     rm -f conftest*
1758     LIBS="$ac_save_LIBS"
1759    
1760     fi
1761     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1762     echo "$ac_t""yes" 1>&6
1763     DEFINES="${DEFINES} -DWITH_SQL_MYSQL" ; LIBS="${LIBS} -lmysqlclient" ; mysql_lib_path="${i}"
1764     else
1765     echo "$ac_t""no" 1>&6
1766     LDFLAGS="${save_ldflags}"
1767     fi
1768    
1769     break
1770     fi
1771     done
1772    
1773     fi
1774    
1775     fi
1776    
1777     pgsql_include_path=""
1778     if test "$ac_with_pgsql" = "yes" ; then
1779     echo -n "checking for pgsql include path ... "
1780     pgsql_try_includes="/usr/include /usr/include/pgsql /usr/local/include /usr/local/include/pgsql /usr/local/pgsql/include"
1781     for i in `echo ${pgsql_try_includes}`; do
1782     if test -f "${i}/libpq-fe.h" ; then
1783     echo ${i}
1784     CPPFLAGS="${CPPFLAGS} -I${i}"
1785     pgsql_include_path=${i}
1786     break
1787     fi
1788     done
1789     fi
1790    
1791     pgsql_lib_path=""
1792     if test "$ac_with_pgsql" = "yes" ; then
1793     echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
1794     echo "configure:1795: checking for PQsetdbLogin in -lpq" >&5
1795     ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
1796     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1797     echo $ac_n "(cached) $ac_c" 1>&6
1798     else
1799     ac_save_LIBS="$LIBS"
1800     LIBS="-lpq $LIBS"
1801     cat > conftest.$ac_ext <<EOF
1802     #line 1803 "configure"
1803     #include "confdefs.h"
1804     /* Override any gcc2 internal prototype to avoid an error. */
1805     /* We use char because int might match the return type of a gcc2
1806     builtin and then its argument prototype would still apply. */
1807     char PQsetdbLogin ();
1808    
1809     int main() {
1810     PQsetdbLogin ()
1811     ; return 0; }
1812     EOF
1813     if { (eval echo configure:1814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1814     rm -rf conftest*
1815     eval "ac_cv_lib_$ac_lib_var=yes"
1816     else
1817     echo "configure: failed program was:" >&5
1818     cat conftest.$ac_ext >&5
1819     rm -rf conftest*
1820     eval "ac_cv_lib_$ac_lib_var=no"
1821     fi
1822     rm -f conftest*
1823     LIBS="$ac_save_LIBS"
1824    
1825     fi
1826     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1827     echo "$ac_t""yes" 1>&6
1828     DEFINES="${DEFINES} -DWITH_SQL_PGSQL" ; LIBS="${LIBS} -lpq"
1829     else
1830     echo "$ac_t""no" 1>&6
1831    
1832     echo -n "checking for pgsql lib path ... "
1833     pgsql_try_libs="/usr/lib /usr/lib/pgsql /usr/local/lib /usr/local/lib/pgsql /usr/local/pgsql/lib"
1834     for i in `echo ${pgsql_try_libs}`; do
1835     if test -f "${i}/libpq.so" -o -f "${i}/libpq.a" ; then
1836     echo ${i}
1837     save_ldflags="${LDFLAGS}"
1838     LDFLAGS="${LDFLAGS} -L${i}"
1839     echo $ac_n "checking for PQfinish in -lpq""... $ac_c" 1>&6
1840     echo "configure:1841: checking for PQfinish in -lpq" >&5
1841     ac_lib_var=`echo pq'_'PQfinish | sed 'y%./+-%__p_%'`
1842     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1843     echo $ac_n "(cached) $ac_c" 1>&6
1844     else
1845     ac_save_LIBS="$LIBS"
1846     LIBS="-lpq $LIBS"
1847     cat > conftest.$ac_ext <<EOF
1848     #line 1849 "configure"
1849     #include "confdefs.h"
1850     /* Override any gcc2 internal prototype to avoid an error. */
1851     /* We use char because int might match the return type of a gcc2
1852     builtin and then its argument prototype would still apply. */
1853     char PQfinish ();
1854    
1855     int main() {
1856     PQfinish ()
1857     ; return 0; }
1858     EOF
1859     if { (eval echo configure:1860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1860     rm -rf conftest*
1861     eval "ac_cv_lib_$ac_lib_var=yes"
1862     else
1863     echo "configure: failed program was:" >&5
1864     cat conftest.$ac_ext >&5
1865     rm -rf conftest*
1866     eval "ac_cv_lib_$ac_lib_var=no"
1867     fi
1868     rm -f conftest*
1869     LIBS="$ac_save_LIBS"
1870    
1871     fi
1872     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1873     echo "$ac_t""yes" 1>&6
1874     DEFINES="${DEFINES} -DWITH_SQL_PGSQL" ; LIBS="${LIBS} -lpq" ; pgsql_lib_path="${i}"
1875     else
1876     echo "$ac_t""no" 1>&6
1877     LDFLAGS="${save_ldflags}"
1878     fi
1879    
1880     break
1881     fi
1882     done
1883    
1884     fi
1885    
1886     fi
1887    
1888     mssql_include_path=""
1889     if test "$ac_with_mssql" = "yes" ; then
1890     echo -n "checking for mssql/FreeTDS include path ... "
1891     mssql_try_includes="/usr/include /usr/include/freetds /usr/local/include /usr/local/include/freetds /usr/local/freetds/include"
1892     for i in `echo ${mssql_try_includes}`; do
1893     if test -f "${i}/sqlfront.h" ; then
1894     echo ${i}
1895     CPPFLAGS="${CPPFLAGS} -I${i}"
1896     mssql_include_path=${i}
1897     break
1898     fi
1899     done
1900     fi
1901    
1902     mssql_lib_path=""
1903     if test "$ac_with_mssql" = "yes" ; then
1904     echo $ac_n "checking for dbinit in -lsybdb""... $ac_c" 1>&6
1905     echo "configure:1906: checking for dbinit in -lsybdb" >&5
1906     ac_lib_var=`echo sybdb'_'dbinit | sed 'y%./+-%__p_%'`
1907     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1908     echo $ac_n "(cached) $ac_c" 1>&6
1909     else
1910     ac_save_LIBS="$LIBS"
1911     LIBS="-lsybdb $LIBS"
1912     cat > conftest.$ac_ext <<EOF
1913     #line 1914 "configure"
1914     #include "confdefs.h"
1915     /* Override any gcc2 internal prototype to avoid an error. */
1916     /* We use char because int might match the return type of a gcc2
1917     builtin and then its argument prototype would still apply. */
1918     char dbinit();
1919    
1920     int main() {
1921     dbinit()
1922     ; return 0; }
1923     EOF
1924     if { (eval echo configure:1925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1925     rm -rf conftest*
1926     eval "ac_cv_lib_$ac_lib_var=yes"
1927     else
1928     echo "configure: failed program was:" >&5
1929     cat conftest.$ac_ext >&5
1930     rm -rf conftest*
1931     eval "ac_cv_lib_$ac_lib_var=no"
1932     fi
1933     rm -f conftest*
1934     LIBS="$ac_save_LIBS"
1935    
1936     fi
1937     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1938     echo "$ac_t""yes" 1>&6
1939     DEFINES="${DEFINES} -DWITH_SQL_MSSQL" ; LIBS="${LIBS} -lsybdb"
1940     else
1941     echo "$ac_t""no" 1>&6
1942    
1943     echo -n "checking for mssql/FreeTDS lib path ... "
1944     mssql_try_libs="/usr/lib /usr/lib/freetds /usr/local/lib /usr/local/lib/freetds /usr/local/freetds/lib"
1945     for i in `echo ${mssql_try_libs}`; do
1946     if test -f "${i}/libsybdb.so" -o -f "${i}/libsybdb.a" ; then
1947     echo ${i}
1948     save_ldflags="${LDFLAGS}"
1949     LDFLAGS="${LDFLAGS} -L${i}"
1950     echo $ac_n "checking for dbclose in -lsybdb""... $ac_c" 1>&6
1951     echo "configure:1952: checking for dbclose in -lsybdb" >&5
1952     ac_lib_var=`echo sybdb'_'dbclose | sed 'y%./+-%__p_%'`
1953     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1954     echo $ac_n "(cached) $ac_c" 1>&6
1955     else
1956     ac_save_LIBS="$LIBS"
1957     LIBS="-lsybdb $LIBS"
1958     cat > conftest.$ac_ext <<EOF
1959     #line 1960 "configure"
1960     #include "confdefs.h"
1961     /* Override any gcc2 internal prototype to avoid an error. */
1962     /* We use char because int might match the return type of a gcc2
1963     builtin and then its argument prototype would still apply. */
1964     char dbclose();
1965    
1966     int main() {
1967     dbclose()
1968     ; return 0; }
1969     EOF
1970     if { (eval echo configure:1971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1971     rm -rf conftest*
1972     eval "ac_cv_lib_$ac_lib_var=yes"
1973     else
1974     echo "configure: failed program was:" >&5
1975     cat conftest.$ac_ext >&5
1976     rm -rf conftest*
1977     eval "ac_cv_lib_$ac_lib_var=no"
1978     fi
1979     rm -f conftest*
1980     LIBS="$ac_save_LIBS"
1981    
1982     fi
1983     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1984     echo "$ac_t""yes" 1>&6
1985     DEFINES="${DEFINES} -DWITH_SQL_MSSQL" ; LIBS="${LIBS} -lsybdb" ; mssql_lib_path="${i}"
1986     else
1987     echo "$ac_t""no" 1>&6
1988     LDFLAGS="${save_ldflags}"
1989     fi
1990    
1991     break
1992     fi
1993     done
1994    
1995     fi
1996    
1997     fi
1998    
1999     echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2000     echo "configure:2001: checking for gethostbyname in -lnsl" >&5
2001     ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2002     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2003     echo $ac_n "(cached) $ac_c" 1>&6
2004     else
2005     ac_save_LIBS="$LIBS"
2006     LIBS="-lnsl $LIBS"
2007     cat > conftest.$ac_ext <<EOF
2008     #line 2009 "configure"
2009     #include "confdefs.h"
2010     /* Override any gcc2 internal prototype to avoid an error. */
2011     /* We use char because int might match the return type of a gcc2
2012     builtin and then its argument prototype would still apply. */
2013     char gethostbyname();
2014    
2015     int main() {
2016     gethostbyname()
2017     ; return 0; }
2018     EOF
2019     if { (eval echo configure:2020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2020     rm -rf conftest*
2021     eval "ac_cv_lib_$ac_lib_var=yes"
2022     else
2023     echo "configure: failed program was:" >&5
2024     cat conftest.$ac_ext >&5
2025     rm -rf conftest*
2026     eval "ac_cv_lib_$ac_lib_var=no"
2027     fi
2028     rm -f conftest*
2029     LIBS="$ac_save_LIBS"
2030    
2031     fi
2032     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2033     echo "$ac_t""yes" 1>&6
2034     LIBS="$LIBS -lnsl"
2035     else
2036     echo "$ac_t""no" 1>&6
2037     fi
2038    
2039     echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
2040     echo "configure:2041: checking for socket in -lsocket" >&5
2041     ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
2042     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2043     echo $ac_n "(cached) $ac_c" 1>&6
2044     else
2045     ac_save_LIBS="$LIBS"
2046     LIBS="-lsocket $LIBS"
2047     cat > conftest.$ac_ext <<EOF
2048     #line 2049 "configure"
2049     #include "confdefs.h"
2050     /* Override any gcc2 internal prototype to avoid an error. */
2051     /* We use char because int might match the return type of a gcc2
2052     builtin and then its argument prototype would still apply. */
2053     char socket();
2054    
2055     int main() {
2056     socket()
2057     ; return 0; }
2058     EOF
2059     if { (eval echo configure:2060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2060     rm -rf conftest*
2061     eval "ac_cv_lib_$ac_lib_var=yes"
2062     else
2063     echo "configure: failed program was:" >&5
2064     cat conftest.$ac_ext >&5
2065     rm -rf conftest*
2066     eval "ac_cv_lib_$ac_lib_var=no"
2067     fi
2068     rm -f conftest*
2069     LIBS="$ac_save_LIBS"
2070    
2071     fi
2072     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2073     echo "$ac_t""yes" 1>&6
2074     LIBS="$LIBS -lsocket"
2075     else
2076     echo "$ac_t""no" 1>&6
2077     fi
2078    
2079     echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
2080     echo "configure:2081: checking for inet_aton in -lresolv" >&5
2081     ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'`
2082     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2083     echo $ac_n "(cached) $ac_c" 1>&6
2084     else
2085     ac_save_LIBS="$LIBS"
2086     LIBS="-lresolv $LIBS"
2087     cat > conftest.$ac_ext <<EOF
2088     #line 2089 "configure"
2089     #include "confdefs.h"
2090     /* Override any gcc2 internal prototype to avoid an error. */
2091     /* We use char because int might match the return type of a gcc2
2092     builtin and then its argument prototype would still apply. */
2093     char inet_aton();
2094    
2095     int main() {
2096     inet_aton()
2097     ; return 0; }
2098     EOF
2099     if { (eval echo configure:2100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2100     rm -rf conftest*
2101     eval "ac_cv_lib_$ac_lib_var=yes"
2102     else
2103     echo "configure: failed program was:" >&5
2104     cat conftest.$ac_ext >&5
2105     rm -rf conftest*
2106     eval "ac_cv_lib_$ac_lib_var=no"
2107     fi
2108     rm -f conftest*
2109     LIBS="$ac_save_LIBS"
2110    
2111     fi
2112     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2113     echo "$ac_t""yes" 1>&6
2114     LIBS="$LIBS -lresolv"
2115     else
2116     echo "$ac_t""no" 1>&6
2117     fi
2118    
2119     echo $ac_n "checking for __inet_aton in -lbind""... $ac_c" 1>&6
2120     echo "configure:2121: checking for __inet_aton in -lbind" >&5
2121     ac_lib_var=`echo bind'_'__inet_aton | sed 'y%./+-%__p_%'`
2122     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2123     echo $ac_n "(cached) $ac_c" 1>&6
2124     else
2125     ac_save_LIBS="$LIBS"
2126     LIBS="-lbind $LIBS"
2127     cat > conftest.$ac_ext <<EOF
2128     #line 2129 "configure"
2129     #include "confdefs.h"
2130     /* Override any gcc2 internal prototype to avoid an error. */
2131     /* We use char because int might match the return type of a gcc2
2132     builtin and then its argument prototype would still apply. */
2133     char __inet_aton();
2134    
2135     int main() {
2136     __inet_aton()
2137     ; return 0; }
2138     EOF
2139     if { (eval echo configure:2140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2140     rm -rf conftest*
2141     eval "ac_cv_lib_$ac_lib_var=yes"
2142     else
2143     echo "configure: failed program was:" >&5
2144     cat conftest.$ac_ext >&5
2145     rm -rf conftest*
2146     eval "ac_cv_lib_$ac_lib_var=no"
2147     fi
2148     rm -f conftest*
2149     LIBS="$ac_save_LIBS"
2150    
2151     fi
2152     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2153     echo "$ac_t""yes" 1>&6
2154     LIBS="$LIBS -lbind"
2155     else
2156     echo "$ac_t""no" 1>&6
2157     fi
2158    
2159     case "$host" in
2160     *-beos*)
2161     if test "$ac_cv_lib_bind___inet_aton" = "yes"; then
2162     echo "Forcing inet_aton() and inet_ntoa() to be enabled"
2163     ac_cv_func_inet_aton='yes'
2164     ac_cv_func_inet_ntoa='yes'
2165     fi
2166     ;;
2167     esac
2168    
2169     # Checks for header files.
2170     ac_header_dirent=no
2171     for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2172     do
2173     ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2174     echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
2175     echo "configure:2176: checking for $ac_hdr that defines DIR" >&5
2176     if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
2177     echo $ac_n "(cached) $ac_c" 1>&6
2178     else
2179     cat > conftest.$ac_ext <<EOF
2180     #line 2181 "configure"
2181     #include "confdefs.h"
2182     #include <sys/types.h>
2183     #include <$ac_hdr>
2184     int main() {
2185     DIR *dirp = 0;
2186     ; return 0; }
2187     EOF
2188     if { (eval echo configure:2189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2189     rm -rf conftest*
2190     eval "ac_cv_header_dirent_$ac_safe=yes"
2191     else
2192     echo "configure: failed program was:" >&5
2193     cat conftest.$ac_ext >&5
2194     rm -rf conftest*
2195     eval "ac_cv_header_dirent_$ac_safe=no"
2196     fi
2197     rm -f conftest*
2198     fi
2199     if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2200     echo "$ac_t""yes" 1>&6
2201     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2202     cat >> confdefs.h <<EOF
2203     #define $ac_tr_hdr 1
2204     EOF
2205     ac_header_dirent=$ac_hdr; break
2206     else
2207     echo "$ac_t""no" 1>&6
2208     fi
2209     done
2210     # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2211     if test $ac_header_dirent = dirent.h; then
2212     echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
2213     echo "configure:2214: checking for opendir in -ldir" >&5
2214     ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2215     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2216     echo $ac_n "(cached) $ac_c" 1>&6
2217     else
2218     ac_save_LIBS="$LIBS"
2219     LIBS="-ldir $LIBS"
2220     cat > conftest.$ac_ext <<EOF
2221     #line 2222 "configure"
2222     #include "confdefs.h"
2223     /* Override any gcc2 internal prototype to avoid an error. */
2224     /* We use char because int might match the return type of a gcc2
2225     builtin and then its argument prototype would still apply. */
2226     char opendir();
2227    
2228     int main() {
2229     opendir()
2230     ; return 0; }
2231     EOF
2232     if { (eval echo configure:2233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2233     rm -rf conftest*
2234     eval "ac_cv_lib_$ac_lib_var=yes"
2235     else
2236     echo "configure: failed program was:" >&5
2237     cat conftest.$ac_ext >&5
2238     rm -rf conftest*
2239     eval "ac_cv_lib_$ac_lib_var=no"
2240     fi
2241     rm -f conftest*
2242     LIBS="$ac_save_LIBS"
2243    
2244     fi
2245     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2246     echo "$ac_t""yes" 1>&6
2247     LIBS="$LIBS -ldir"
2248     else
2249     echo "$ac_t""no" 1>&6
2250     fi
2251    
2252     else
2253     echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2254     echo "configure:2255: checking for opendir in -lx" >&5
2255     ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2256     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2257     echo $ac_n "(cached) $ac_c" 1>&6
2258     else
2259     ac_save_LIBS="$LIBS"
2260     LIBS="-lx $LIBS"
2261     cat > conftest.$ac_ext <<EOF
2262     #line 2263 "configure"
2263     #include "confdefs.h"
2264     /* Override any gcc2 internal prototype to avoid an error. */
2265     /* We use char because int might match the return type of a gcc2
2266     builtin and then its argument prototype would still apply. */
2267     char opendir();
2268    
2269     int main() {
2270     opendir()
2271     ; return 0; }
2272     EOF
2273     if { (eval echo configure:2274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2274     rm -rf conftest*
2275     eval "ac_cv_lib_$ac_lib_var=yes"
2276     else
2277     echo "configure: failed program was:" >&5
2278     cat conftest.$ac_ext >&5
2279     rm -rf conftest*
2280     eval "ac_cv_lib_$ac_lib_var=no"
2281     fi
2282     rm -f conftest*
2283     LIBS="$ac_save_LIBS"
2284    
2285     fi
2286     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2287     echo "$ac_t""yes" 1>&6
2288     LIBS="$LIBS -lx"
2289     else
2290     echo "$ac_t""no" 1>&6
2291     fi
2292    
2293     fi
2294    
2295     echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2296     echo "configure:2297: checking for ANSI C header files" >&5
2297     if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2298     echo $ac_n "(cached) $ac_c" 1>&6
2299     else
2300     cat > conftest.$ac_ext <<EOF
2301     #line 2302 "configure"
2302     #include "confdefs.h"
2303     #include <stdlib.h>
2304     #include <stdarg.h>
2305     #include <string.h>
2306     #include <float.h>
2307     EOF
2308     ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2309     { (eval echo configure:2310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2310     ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2311     if test -z "$ac_err"; then
2312     rm -rf conftest*
2313     ac_cv_header_stdc=yes
2314     else
2315     echo "$ac_err" >&5
2316     echo "configure: failed program was:" >&5
2317     cat conftest.$ac_ext >&5
2318     rm -rf conftest*
2319     ac_cv_header_stdc=no
2320     fi
2321     rm -f conftest*
2322    
2323     if test $ac_cv_header_stdc = yes; then
2324     # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2325     cat > conftest.$ac_ext <<EOF
2326     #line 2327 "configure"
2327     #include "confdefs.h"
2328     #include <string.h>
2329     EOF
2330     if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2331     egrep "memchr" >/dev/null 2>&1; then
2332     :
2333     else
2334     rm -rf conftest*
2335     ac_cv_header_stdc=no
2336     fi
2337     rm -f conftest*
2338    
2339     fi
2340    
2341     if test $ac_cv_header_stdc = yes; then
2342     # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2343     cat > conftest.$ac_ext <<EOF
2344     #line 2345 "configure"
2345     #include "confdefs.h"
2346     #include <stdlib.h>
2347     EOF
2348     if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2349     egrep "free" >/dev/null 2>&1; then
2350     :
2351     else
2352     rm -rf conftest*
2353     ac_cv_header_stdc=no
2354     fi
2355     rm -f conftest*
2356    
2357     fi
2358    
2359     if test $ac_cv_header_stdc = yes; then
2360     # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2361     if test "$cross_compiling" = yes; then
2362     :
2363     else
2364     cat > conftest.$ac_ext <<EOF
2365     #line 2366 "configure"
2366     #include "confdefs.h"
2367     #include <ctype.h>
2368     #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2369     #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2370     #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2371     int main () { int i; for (i = 0; i < 256; i++)
2372     if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2373     exit (0); }
2374    
2375     EOF
2376     if { (eval echo configure:2377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2377     then
2378     :
2379     else
2380     echo "configure: failed program was:" >&5
2381     cat conftest.$ac_ext >&5
2382     rm -fr conftest*
2383     ac_cv_header_stdc=no
2384     fi
2385     rm -fr conftest*
2386     fi
2387    
2388     fi
2389     fi
2390    
2391     echo "$ac_t""$ac_cv_header_stdc" 1>&6
2392     if test $ac_cv_header_stdc = yes; then
2393     cat >> confdefs.h <<\EOF
2394     #define STDC_HEADERS 1
2395     EOF
2396    
2397     fi
2398    
2399     echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2400     echo "configure:2401: checking whether time.h and sys/time.h may both be included" >&5
2401     if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2402     echo $ac_n "(cached) $ac_c" 1>&6
2403     else
2404     cat > conftest.$ac_ext <<EOF
2405     #line 2406 "configure"
2406     #include "confdefs.h"
2407     #include <sys/types.h>
2408     #include <sys/time.h>
2409     #include <time.h>
2410     int main() {
2411     struct tm *tp;
2412     ; return 0; }
2413     EOF
2414     if { (eval echo configure:2415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2415     rm -rf conftest*
2416     ac_cv_header_time=yes
2417     else
2418     echo "configure: failed program was:" >&5
2419     cat conftest.$ac_ext >&5
2420     rm -rf conftest*
2421     ac_cv_header_time=no
2422     fi
2423     rm -f conftest*
2424     fi
2425    
2426     echo "$ac_t""$ac_cv_header_time" 1>&6
2427     if test $ac_cv_header_time = yes; then
2428     cat >> confdefs.h <<\EOF
2429     #define TIME_WITH_SYS_TIME 1
2430     EOF
2431    
2432     fi
2433    
2434     echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
2435     echo "configure:2436: checking whether stat file-mode macros are broken" >&5
2436     if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
2437     echo $ac_n "(cached) $ac_c" 1>&6
2438     else
2439     cat > conftest.$ac_ext <<EOF
2440     #line 2441 "configure"
2441     #include "confdefs.h"
2442     #include <sys/types.h>
2443     #include <sys/stat.h>
2444    
2445     #if defined(S_ISBLK) && defined(S_IFDIR)
2446     # if S_ISBLK (S_IFDIR)
2447     You lose.
2448     # endif
2449     #endif
2450    
2451     #if defined(S_ISBLK) && defined(S_IFCHR)
2452     # if S_ISBLK (S_IFCHR)
2453     You lose.
2454     # endif
2455     #endif
2456    
2457     #if defined(S_ISLNK) && defined(S_IFREG)
2458     # if S_ISLNK (S_IFREG)
2459     You lose.
2460     # endif
2461     #endif
2462    
2463     #if defined(S_ISSOCK) && defined(S_IFREG)
2464     # if S_ISSOCK (S_IFREG)
2465     You lose.
2466     # endif
2467     #endif
2468    
2469     EOF
2470     if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2471     egrep "You lose" >/dev/null 2>&1; then
2472     rm -rf conftest*
2473     ac_cv_header_stat_broken=yes
2474     else
2475     rm -rf conftest*
2476     ac_cv_header_stat_broken=no
2477     fi
2478     rm -f conftest*
2479    
2480     fi
2481    
2482     echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
2483     if test $ac_cv_header_stat_broken = yes; then
2484     cat >> confdefs.h <<\EOF
2485     #define STAT_MACROS_BROKEN 1
2486     EOF
2487    
2488     fi
2489    
2490     for ac_hdr in fcntl.h sys/time.h time.h sys/select.h string.h strings.h unistd.h stdarg.h varargs.h malloc.h sys/utsname.h sys/timeb.h sys/socket.h sys/param.h netinet/in.h arpa/inet.h netdb.h termios.h stddef.h memory.h sys/types.h sys/wait.h sys/ioctl.h stdint.h sys/file.h limits.h poll.h sys/poll.h stropts.h sys/stropts.h sys/stat.h pwd.h grp.h dir.h direct.h sys/mman.h sys/event.h sys/epoll.h sys/resource.h assert.h
2491     do
2492     ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2493     echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2494     echo "configure:2495: checking for $ac_hdr" >&5
2495     if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2496     echo $ac_n "(cached) $ac_c" 1>&6
2497     else
2498     cat > conftest.$ac_ext <<EOF
2499     #line 2500 "configure"
2500     #include "confdefs.h"
2501     #include <$ac_hdr>
2502     EOF
2503     ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2504     { (eval echo configure:2505: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2505     ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2506     if test -z "$ac_err"; then
2507     rm -rf conftest*
2508     eval "ac_cv_header_$ac_safe=yes"
2509     else
2510     echo "$ac_err" >&5
2511     echo "configure: failed program was:" >&5
2512     cat conftest.$ac_ext >&5
2513     rm -rf conftest*
2514     eval "ac_cv_header_$ac_safe=no"
2515     fi
2516     rm -f conftest*
2517     fi
2518     if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2519     echo "$ac_t""yes" 1>&6
2520     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2521     cat >> confdefs.h <<EOF
2522     #define $ac_tr_hdr 1
2523     EOF
2524    
2525     else
2526     echo "$ac_t""no" 1>&6
2527     fi
2528     done
2529    
2530    
2531     # Checks for typedefs and structures
2532     echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
2533     echo "configure:2534: checking whether struct tm is in sys/time.h or time.h" >&5
2534     if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2535     echo $ac_n "(cached) $ac_c" 1>&6
2536     else
2537     cat > conftest.$ac_ext <<EOF
2538     #line 2539 "configure"
2539     #include "confdefs.h"
2540     #include <sys/types.h>
2541     #include <time.h>
2542     int main() {
2543     struct tm *tp; tp->tm_sec;
2544     ; return 0; }
2545     EOF
2546     if { (eval echo configure:2547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2547     rm -rf conftest*
2548     ac_cv_struct_tm=time.h
2549     else
2550     echo "configure: failed program was:" >&5
2551     cat conftest.$ac_ext >&5
2552     rm -rf conftest*
2553     ac_cv_struct_tm=sys/time.h
2554     fi
2555     rm -f conftest*
2556     fi
2557    
2558     echo "$ac_t""$ac_cv_struct_tm" 1>&6
2559     if test $ac_cv_struct_tm = sys/time.h; then
2560     cat >> confdefs.h <<\EOF
2561     #define TM_IN_SYS_TIME 1
2562     EOF
2563    
2564     fi
2565    
2566     echo $ac_n "checking for pid_t""... $ac_c" 1>&6
2567     echo "configure:2568: checking for pid_t" >&5
2568     if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2569     echo $ac_n "(cached) $ac_c" 1>&6
2570     else
2571     cat > conftest.$ac_ext <<EOF
2572     #line 2573 "configure"
2573     #include "confdefs.h"
2574     #include <sys/types.h>
2575     #if STDC_HEADERS
2576     #include <stdlib.h>
2577     #include <stddef.h>
2578     #endif
2579     EOF
2580     if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2581     egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2582     rm -rf conftest*
2583     ac_cv_type_pid_t=yes
2584     else
2585     rm -rf conftest*
2586     ac_cv_type_pid_t=no
2587     fi
2588     rm -f conftest*
2589    
2590     fi
2591     echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2592     if test $ac_cv_type_pid_t = no; then
2593     cat >> confdefs.h <<\EOF
2594     #define pid_t int
2595     EOF
2596    
2597     fi
2598    
2599     echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2600     echo "configure:2601: checking return type of signal handlers" >&5
2601     if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2602     echo $ac_n "(cached) $ac_c" 1>&6
2603     else
2604     cat > conftest.$ac_ext <<EOF
2605     #line 2606 "configure"
2606     #include "confdefs.h"
2607     #include <sys/types.h>
2608     #include <signal.h>
2609     #ifdef signal
2610     #undef signal
2611     #endif
2612     #ifdef __cplusplus
2613     extern "C" void (*signal (int, void (*)(int)))(int);
2614     #else
2615     void (*signal ()) ();
2616     #endif
2617    
2618     int main() {
2619     int i;
2620     ; return 0; }
2621     EOF
2622     if { (eval echo configure:2623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2623     rm -rf conftest*
2624     ac_cv_type_signal=void
2625     else
2626     echo "configure: failed program was:" >&5
2627     cat conftest.$ac_ext >&5
2628     rm -rf conftest*
2629     ac_cv_type_signal=int
2630     fi
2631     rm -f conftest*
2632     fi
2633    
2634     echo "$ac_t""$ac_cv_type_signal" 1>&6
2635     cat >> confdefs.h <<EOF
2636     #define RETSIGTYPE $ac_cv_type_signal
2637     EOF
2638    
2639    
2640     echo $ac_n "checking for off_t""... $ac_c" 1>&6
2641     echo "configure:2642: checking for off_t" >&5
2642     if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2643     echo $ac_n "(cached) $ac_c" 1>&6
2644     else
2645     cat > conftest.$ac_ext <<EOF
2646     #line 2647 "configure"
2647     #include "confdefs.h"
2648     #include <sys/types.h>
2649     #if STDC_HEADERS
2650     #include <stdlib.h>
2651     #include <stddef.h>
2652     #endif
2653     EOF
2654     if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2655     egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2656     rm -rf conftest*
2657     ac_cv_type_off_t=yes
2658     else
2659     rm -rf conftest*
2660     ac_cv_type_off_t=no
2661     fi
2662     rm -f conftest*
2663    
2664     fi
2665     echo "$ac_t""$ac_cv_type_off_t" 1>&6
2666     if test $ac_cv_type_off_t = no; then
2667     cat >> confdefs.h <<\EOF
2668     #define off_t long
2669     EOF
2670    
2671     fi
2672    
2673     echo $ac_n "checking for size_t""... $ac_c" 1>&6
2674     echo "configure:2675: checking for size_t" >&5
2675     if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2676     echo $ac_n "(cached) $ac_c" 1>&6
2677     else
2678     cat > conftest.$ac_ext <<EOF
2679     #line 2680 "configure"
2680     #include "confdefs.h"
2681     #include <sys/types.h>
2682     #if STDC_HEADERS
2683     #include <stdlib.h>
2684     #include <stddef.h>
2685     #endif
2686     EOF
2687     if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2688     egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2689     rm -rf conftest*
2690     ac_cv_type_size_t=yes
2691     else
2692     rm -rf conftest*
2693     ac_cv_type_size_t=no
2694     fi
2695     rm -f conftest*
2696    
2697     fi
2698     echo "$ac_t""$ac_cv_type_size_t" 1>&6
2699     if test $ac_cv_type_size_t = no; then
2700     cat >> confdefs.h <<\EOF
2701     #define size_t unsigned
2702     EOF
2703    
2704     fi
2705    
2706     echo $ac_n "checking size of unsigned char""... $ac_c" 1>&6
2707     echo "configure:2708: checking size of unsigned char" >&5
2708     if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_char'+set}'`\" = set"; then
2709     echo $ac_n "(cached) $ac_c" 1>&6
2710     else
2711     if test "$cross_compiling" = yes; then
2712     ac_cv_sizeof_unsigned_char=1
2713     else
2714     cat > conftest.$ac_ext <<EOF
2715     #line 2716 "configure"
2716     #include "confdefs.h"
2717     #include <stdio.h>
2718     main()
2719     {
2720     FILE *f=fopen("conftestval", "w");
2721     if (!f) exit(1);
2722     fprintf(f, "%d\n", sizeof(unsigned char));
2723     exit(0);
2724     }
2725     EOF
2726     if { (eval echo configure:2727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2727     then
2728     ac_cv_sizeof_unsigned_char=`cat conftestval`
2729     else
2730     echo "configure: failed program was:" >&5
2731     cat conftest.$ac_ext >&5
2732     rm -fr conftest*
2733     ac_cv_sizeof_unsigned_char=0
2734     fi
2735     rm -fr conftest*
2736     fi
2737    
2738     fi
2739     echo "$ac_t""$ac_cv_sizeof_unsigned_char" 1>&6
2740     cat >> confdefs.h <<EOF
2741     #define SIZEOF_UNSIGNED_CHAR $ac_cv_sizeof_unsigned_char
2742     EOF
2743    
2744    
2745     echo $ac_n "checking size of unsigned short""... $ac_c" 1>&6
2746     echo "configure:2747: checking size of unsigned short" >&5
2747     if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_short'+set}'`\" = set"; then
2748     echo $ac_n "(cached) $ac_c" 1>&6
2749     else
2750     if test "$cross_compiling" = yes; then
2751     ac_cv_sizeof_unsigned_short=2
2752     else
2753     cat > conftest.$ac_ext <<EOF
2754     #line 2755 "configure"
2755     #include "confdefs.h"
2756     #include <stdio.h>
2757     main()
2758     {
2759     FILE *f=fopen("conftestval", "w");
2760     if (!f) exit(1);
2761     fprintf(f, "%d\n", sizeof(unsigned short));
2762     exit(0);
2763     }
2764     EOF
2765     if { (eval echo configure:2766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2766     then
2767     ac_cv_sizeof_unsigned_short=`cat conftestval`
2768     else
2769     echo "configure: failed program was:" >&5
2770     cat conftest.$ac_ext >&5
2771     rm -fr conftest*
2772     ac_cv_sizeof_unsigned_short=0
2773     fi
2774     rm -fr conftest*
2775     fi
2776    
2777     fi
2778     echo "$ac_t""$ac_cv_sizeof_unsigned_short" 1>&6
2779     cat >> confdefs.h <<EOF
2780     #define SIZEOF_UNSIGNED_SHORT $ac_cv_sizeof_unsigned_short
2781     EOF
2782    
2783    
2784     echo $ac_n "checking size of unsigned int""... $ac_c" 1>&6
2785     echo "configure:2786: checking size of unsigned int" >&5
2786     if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_int'+set}'`\" = set"; then
2787     echo $ac_n "(cached) $ac_c" 1>&6
2788     else
2789     if test "$cross_compiling" = yes; then
2790     ac_cv_sizeof_unsigned_int=4
2791     else
2792     cat > conftest.$ac_ext <<EOF
2793     #line 2794 "configure"
2794     #include "confdefs.h"
2795     #include <stdio.h>
2796     main()
2797     {
2798     FILE *f=fopen("conftestval", "w");
2799     if (!f) exit(1);
2800     fprintf(f, "%d\n", sizeof(unsigned int));
2801     exit(0);
2802     }
2803     EOF
2804     if { (eval echo configure:2805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2805     then
2806     ac_cv_sizeof_unsigned_int=`cat conftestval`
2807     else
2808     echo "configure: failed program was:" >&5
2809     cat conftest.$ac_ext >&5
2810     rm -fr conftest*
2811     ac_cv_sizeof_unsigned_int=0
2812     fi
2813     rm -fr conftest*
2814     fi
2815    
2816     fi
2817     echo "$ac_t""$ac_cv_sizeof_unsigned_int" 1>&6
2818     cat >> confdefs.h <<EOF
2819     #define SIZEOF_UNSIGNED_INT $ac_cv_sizeof_unsigned_int
2820     EOF
2821    
2822    
2823     echo $ac_n "checking size of unsigned long""... $ac_c" 1>&6
2824     echo "configure:2825: checking size of unsigned long" >&5
2825     if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long'+set}'`\" = set"; then
2826     echo $ac_n "(cached) $ac_c" 1>&6
2827     else
2828     if test "$cross_compiling" = yes; then
2829     ac_cv_sizeof_unsigned_long=4
2830     else
2831     cat > conftest.$ac_ext <<EOF
2832     #line 2833 "configure"
2833     #include "confdefs.h"
2834     #include <stdio.h>
2835     main()
2836     {
2837     FILE *f=fopen("conftestval", "w");
2838     if (!f) exit(1);
2839     fprintf(f, "%d\n", sizeof(unsigned long));
2840     exit(0);
2841     }
2842     EOF
2843     if { (eval echo configure:2844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2844     then
2845     ac_cv_sizeof_unsigned_long=`cat conftestval`
2846     else
2847     echo "configure: failed program was:" >&5
2848     cat conftest.$ac_ext >&5
2849     rm -fr conftest*
2850     ac_cv_sizeof_unsigned_long=0
2851     fi
2852     rm -fr conftest*
2853     fi
2854    
2855     fi
2856     echo "$ac_t""$ac_cv_sizeof_unsigned_long" 1>&6
2857     cat >> confdefs.h <<EOF
2858     #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
2859     EOF
2860    
2861    
2862     echo $ac_n "checking size of unsigned long long""... $ac_c" 1>&6
2863     echo "configure:2864: checking size of unsigned long long" >&5
2864     if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long_long'+set}'`\" = set"; then
2865     echo $ac_n "(cached) $ac_c" 1>&6
2866     else
2867     if test "$cross_compiling" = yes; then
2868     ac_cv_sizeof_unsigned_long_long=0
2869     else
2870     cat > conftest.$ac_ext <<EOF
2871     #line 2872 "configure"
2872     #include "confdefs.h"
2873     #include <stdio.h>
2874     main()
2875     {
2876     FILE *f=fopen("conftestval", "w");
2877     if (!f) exit(1);
2878     fprintf(f, "%d\n", sizeof(unsigned long long));
2879     exit(0);
2880     }
2881     EOF
2882     if { (eval echo configure:2883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2883     then
2884     ac_cv_sizeof_unsigned_long_long=`cat conftestval`
2885     else
2886     echo "configure: failed program was:" >&5
2887     cat conftest.$ac_ext >&5
2888     rm -fr conftest*
2889     ac_cv_sizeof_unsigned_long_long=0
2890     fi
2891     rm -fr conftest*
2892     fi
2893    
2894     fi
2895     echo "$ac_t""$ac_cv_sizeof_unsigned_long_long" 1>&6
2896     cat >> confdefs.h <<EOF
2897     #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
2898     EOF
2899    
2900    
2901    
2902     # Checks for library functions.
2903     for ac_hdr in unistd.h
2904     do
2905     ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2906     echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2907     echo "configure:2908: checking for $ac_hdr" >&5
2908     if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2909     echo $ac_n "(cached) $ac_c" 1>&6
2910     else
2911     cat > conftest.$ac_ext <<EOF
2912     #line 2913 "configure"
2913     #include "confdefs.h"
2914     #include <$ac_hdr>
2915     EOF
2916     ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2917     { (eval echo configure:2918: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2918     ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2919     if test -z "$ac_err"; then
2920     rm -rf conftest*
2921     eval "ac_cv_header_$ac_safe=yes"
2922     else
2923     echo "$ac_err" >&5
2924     echo "configure: failed program was:" >&5
2925     cat conftest.$ac_ext >&5
2926     rm -rf conftest*
2927     eval "ac_cv_header_$ac_safe=no"
2928     fi
2929     rm -f conftest*
2930     fi
2931     if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2932     echo "$ac_t""yes" 1>&6
2933     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2934     cat >> confdefs.h <<EOF
2935     #define $ac_tr_hdr 1
2936     EOF
2937    
2938     else
2939     echo "$ac_t""no" 1>&6
2940     fi
2941     done
2942    
2943     for ac_func in getpagesize
2944     do
2945     echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2946     echo "configure:2947: checking for $ac_func" >&5
2947     if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2948     echo $ac_n "(cached) $ac_c" 1>&6
2949     else
2950     cat > conftest.$ac_ext <<EOF
2951     #line 2952 "configure"
2952     #include "confdefs.h"
2953     /* System header to define __stub macros and hopefully few prototypes,
2954     which can conflict with char $ac_func(); below. */
2955     #include <assert.h>
2956     /* Override any gcc2 internal prototype to avoid an error. */
2957     /* We use char because int might match the return type of a gcc2
2958     builtin and then its argument prototype would still apply. */
2959     char $ac_func();
2960    
2961     int main() {
2962    
2963     /* The GNU C library defines this for functions which it implements
2964     to always fail with ENOSYS. Some functions are actually named
2965     something starting with __ and the normal name is an alias. */
2966     #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2967     choke me
2968     #else
2969     $ac_func();
2970     #endif
2971    
2972     ; return 0; }
2973     EOF
2974     if { (eval echo configure:2975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2975     rm -rf conftest*
2976     eval "ac_cv_func_$ac_func=yes"
2977     else
2978     echo "configure: failed program was:" >&5
2979     cat conftest.$ac_ext >&5
2980     rm -rf conftest*
2981     eval "ac_cv_func_$ac_func=no"
2982     fi
2983     rm -f conftest*
2984     fi
2985    
2986     if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2987     echo "$ac_t""yes" 1>&6
2988     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2989     cat >> confdefs.h <<EOF
2990     #define $ac_tr_func 1
2991     EOF
2992    
2993     else
2994     echo "$ac_t""no" 1>&6
2995     fi
2996     done
2997    
2998     echo $ac_n "checking for working mmap""... $ac_c" 1>&6
2999     echo "configure:3000: checking for working mmap" >&5
3000     if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
3001     echo $ac_n "(cached) $ac_c" 1>&6
3002     else
3003     if test "$cross_compiling" = yes; then
3004     ac_cv_func_mmap_fixed_mapped=no
3005     else
3006     cat > conftest.$ac_ext <<EOF
3007     #line 3008 "configure"
3008     #include "confdefs.h"
3009    
3010     /* Thanks to Mike Haertel and Jim Avera for this test.
3011     Here is a matrix of mmap possibilities:
3012     mmap private not fixed
3013     mmap private fixed at somewhere currently unmapped
3014     mmap private fixed at somewhere already mapped
3015     mmap shared not fixed
3016     mmap shared fixed at somewhere currently unmapped
3017     mmap shared fixed at somewhere already mapped
3018     For private mappings, we should verify that changes cannot be read()
3019     back from the file, nor mmap's back from the file at a different
3020     address. (There have been systems where private was not correctly
3021     implemented like the infamous i386 svr4.0, and systems where the
3022     VM page cache was not coherent with the filesystem buffer cache
3023     like early versions of FreeBSD and possibly contemporary NetBSD.)
3024     For shared mappings, we should conversely verify that changes get
3025     propogated back to all the places they're supposed to be.
3026    
3027     Grep wants private fixed already mapped.
3028     The main things grep needs to know about mmap are:
3029     * does it exist and is it safe to write into the mmap'd area
3030     * how to use it (BSD variants) */
3031     #include <sys/types.h>
3032     #include <fcntl.h>
3033     #include <sys/mman.h>
3034    
3035     /* This mess was copied from the GNU getpagesize.h. */
3036     #ifndef HAVE_GETPAGESIZE
3037     # ifdef HAVE_UNISTD_H
3038     # include <unistd.h>
3039     # endif
3040    
3041     /* Assume that all systems that can run configure have sys/param.h. */
3042     # ifndef HAVE_SYS_PARAM_H
3043     # define HAVE_SYS_PARAM_H 1
3044     # endif
3045    
3046     # ifdef _SC_PAGESIZE
3047     # define getpagesize() sysconf(_SC_PAGESIZE)
3048     # else /* no _SC_PAGESIZE */
3049     # ifdef HAVE_SYS_PARAM_H
3050     # include <sys/param.h>
3051     # ifdef EXEC_PAGESIZE
3052     # define getpagesize() EXEC_PAGESIZE
3053     # else /* no EXEC_PAGESIZE */
3054     # ifdef NBPG
3055     # define getpagesize() NBPG * CLSIZE
3056     # ifndef CLSIZE
3057     # define CLSIZE 1
3058     # endif /* no CLSIZE */
3059     # else /* no NBPG */
3060     # ifdef NBPC
3061     # define getpagesize() NBPC
3062     # else /* no NBPC */
3063     # ifdef PAGESIZE
3064     # define getpagesize() PAGESIZE
3065     # endif /* PAGESIZE */
3066     # endif /* no NBPC */
3067     # endif /* no NBPG */
3068     # endif /* no EXEC_PAGESIZE */
3069     # else /* no HAVE_SYS_PARAM_H */
3070     # define getpagesize() 8192 /* punt totally */
3071     # endif /* no HAVE_SYS_PARAM_H */
3072     # endif /* no _SC_PAGESIZE */
3073    
3074     #endif /* no HAVE_GETPAGESIZE */
3075    
3076     #ifdef __cplusplus
3077     extern "C" { void *malloc(unsigned); }
3078     #else
3079     char *malloc();
3080     #endif
3081    
3082     int
3083     main()
3084     {
3085     char *data, *data2, *data3;
3086     int i, pagesize;
3087     int fd;
3088    
3089     pagesize = getpagesize();
3090    
3091     /*
3092     * First, make a file with some known garbage in it.
3093     */
3094     data = malloc(pagesize);
3095     if (!data)
3096     exit(1);
3097     for (i = 0; i < pagesize; ++i)
3098     *(data + i) = rand();
3099     umask(0);
3100     fd = creat("conftestmmap", 0600);
3101     if (fd < 0)
3102     exit(1);
3103     if (write(fd, data, pagesize) != pagesize)
3104     exit(1);
3105     close(fd);
3106    
3107     /*
3108     * Next, try to mmap the file at a fixed address which
3109     * already has something else allocated at it. If we can,
3110     * also make sure that we see the same garbage.
3111     */
3112     fd = open("conftestmmap", O_RDWR);
3113     if (fd < 0)
3114     exit(1);
3115     data2 = malloc(2 * pagesize);
3116     if (!data2)
3117     exit(1);
3118     data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
3119     if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
3120     MAP_PRIVATE | MAP_FIXED, fd, 0L))
3121     exit(1);
3122     for (i = 0; i < pagesize; ++i)
3123     if (*(data + i) != *(data2 + i))
3124     exit(1);
3125    
3126     /*
3127     * Finally, make sure that changes to the mapped area
3128     * do not percolate back to the file as seen by read().
3129     * (This is a bug on some variants of i386 svr4.0.)
3130     */
3131     for (i = 0; i < pagesize; ++i)
3132     *(data2 + i) = *(data2 + i) + 1;
3133     data3 = malloc(pagesize);
3134     if (!data3)
3135     exit(1);
3136     if (read(fd, data3, pagesize) != pagesize)
3137     exit(1);
3138     for (i = 0; i < pagesize; ++i)
3139     if (*(data + i) != *(data3 + i))
3140     exit(1);
3141     close(fd);
3142     unlink("conftestmmap");
3143     exit(0);
3144     }
3145    
3146     EOF
3147     if { (eval echo configure:3148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3148     then
3149     ac_cv_func_mmap_fixed_mapped=yes
3150     else
3151     echo "configure: failed program was:" >&5
3152     cat conftest.$ac_ext >&5
3153     rm -fr conftest*
3154     ac_cv_func_mmap_fixed_mapped=no
3155     fi
3156     rm -fr conftest*
3157     fi
3158    
3159     fi
3160    
3161     echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
3162     if test $ac_cv_func_mmap_fixed_mapped = yes; then
3163     cat >> confdefs.h <<\EOF
3164     #define HAVE_MMAP 1
3165     EOF
3166    
3167     fi
3168    
3169     echo $ac_n "checking for strftime""... $ac_c" 1>&6
3170     echo "configure:3171: checking for strftime" >&5
3171     if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then
3172     echo $ac_n "(cached) $ac_c" 1>&6
3173     else
3174     cat > conftest.$ac_ext <<EOF
3175     #line 3176 "configure"
3176     #include "confdefs.h"
3177     /* System header to define __stub macros and hopefully few prototypes,
3178     which can conflict with char strftime(); below. */
3179     #include <assert.h>
3180     /* Override any gcc2 internal prototype to avoid an error. */
3181     /* We use char because int might match the return type of a gcc2
3182     builtin and then its argument prototype would still apply. */
3183     char strftime();
3184    
3185     int main() {
3186    
3187     /* The GNU C library defines this for functions which it implements
3188     to always fail with ENOSYS. Some functions are actually named
3189     something starting with __ and the normal name is an alias. */
3190     #if defined (__stub_strftime) || defined (__stub___strftime)
3191     choke me
3192     #else
3193     strftime();
3194     #endif
3195    
3196     ; return 0; }
3197     EOF
3198     if { (eval echo configure:3199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3199     rm -rf conftest*
3200     eval "ac_cv_func_strftime=yes"
3201     else
3202     echo "configure: failed program was:" >&5
3203     cat conftest.$ac_ext >&5
3204     rm -rf conftest*
3205     eval "ac_cv_func_strftime=no"
3206     fi
3207     rm -f conftest*
3208     fi
3209    
3210     if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
3211     echo "$ac_t""yes" 1>&6
3212     cat >> confdefs.h <<\EOF
3213     #define HAVE_STRFTIME 1
3214     EOF
3215    
3216     else
3217     echo "$ac_t""no" 1>&6
3218     # strftime is in -lintl on SCO UNIX.
3219     echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
3220     echo "configure:3221: checking for strftime in -lintl" >&5
3221     ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
3222     if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3223     echo $ac_n "(cached) $ac_c" 1>&6
3224     else
3225     ac_save_LIBS="$LIBS"
3226     LIBS="-lintl $LIBS"
3227     cat > conftest.$ac_ext <<EOF
3228     #line 3229 "configure"
3229     #include "confdefs.h"
3230     /* Override any gcc2 internal prototype to avoid an error. */
3231     /* We use char because int might match the return type of a gcc2
3232     builtin and then its argument prototype would still apply. */
3233     char strftime();
3234    
3235     int main() {
3236     strftime()
3237     ; return 0; }
3238     EOF
3239     if { (eval echo configure:3240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3240     rm -rf conftest*
3241     eval "ac_cv_lib_$ac_lib_var=yes"
3242     else
3243     echo "configure: failed program was:" >&5
3244     cat conftest.$ac_ext >&5
3245     rm -rf conftest*
3246     eval "ac_cv_lib_$ac_lib_var=no"
3247     fi
3248     rm -f conftest*
3249     LIBS="$ac_save_LIBS"
3250    
3251     fi
3252     if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3253     echo "$ac_t""yes" 1>&6
3254     cat >> confdefs.h <<\EOF
3255     #define HAVE_STRFTIME 1
3256     EOF
3257    
3258     LIBS="-lintl $LIBS"
3259     else
3260     echo "$ac_t""no" 1>&6
3261     fi
3262    
3263     fi
3264    
3265     echo $ac_n "checking for vprintf""... $ac_c" 1>&6
3266     echo "configure:3267: checking for vprintf" >&5
3267     if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
3268     echo $ac_n "(cached) $ac_c" 1>&6
3269     else
3270     cat > conftest.$ac_ext <<EOF
3271     #line 3272 "configure"
3272     #include "confdefs.h"
3273     /* System header to define __stub macros and hopefully few prototypes,
3274     which can conflict with char vprintf(); below. */
3275     #include <assert.h>
3276     /* Override any gcc2 internal prototype to avoid an error. */
3277     /* We use char because int might match the return type of a gcc2
3278     builtin and then its argument prototype would still apply. */
3279     char vprintf();
3280    
3281     int main() {
3282    
3283     /* The GNU C library defines this for functions which it implements
3284     to always fail with ENOSYS. Some functions are actually named
3285     something starting with __ and the normal name is an alias. */
3286     #if defined (__stub_vprintf) || defined (__stub___vprintf)
3287     choke me
3288     #else
3289     vprintf();
3290     #endif
3291    
3292     ; return 0; }
3293     EOF
3294     if { (eval echo configure:3295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3295     rm -rf conftest*
3296     eval "ac_cv_func_vprintf=yes"
3297     else
3298     echo "configure: failed program was:" >&5
3299     cat conftest.$ac_ext >&5
3300     rm -rf conftest*
3301     eval "ac_cv_func_vprintf=no"
3302     fi
3303     rm -f conftest*
3304     fi
3305    
3306     if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
3307     echo "$ac_t""yes" 1>&6
3308     cat >> confdefs.h <<\EOF
3309     #define HAVE_VPRINTF 1
3310     EOF
3311    
3312     else
3313     echo "$ac_t""no" 1>&6
3314     fi
3315    
3316     if test "$ac_cv_func_vprintf" != yes; then
3317     echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
3318     echo "configure:3319: checking for _doprnt" >&5
3319     if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
3320     echo $ac_n "(cached) $ac_c" 1>&6
3321     else
3322     cat > conftest.$ac_ext <<EOF
3323     #line 3324 "configure"
3324     #include "confdefs.h"
3325     /* System header to define __stub macros and hopefully few prototypes,
3326     which can conflict with char _doprnt(); below. */
3327     #include <assert.h>
3328     /* Override any gcc2 internal prototype to avoid an error. */
3329     /* We use char because int might match the return type of a gcc2
3330     builtin and then its argument prototype would still apply. */
3331     char _doprnt();
3332    
3333     int main() {
3334    
3335     /* The GNU C library defines this for functions which it implements
3336     to always fail with ENOSYS. Some functions are actually named
3337     something starting with __ and the normal name is an alias. */
3338     #if defined (__stub__doprnt) || defined (__stub____doprnt)
3339     choke me
3340     #else
3341     _doprnt();
3342     #endif
3343    
3344     ; return 0; }
3345     EOF
3346     if { (eval echo configure:3347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3347     rm -rf conftest*
3348     eval "ac_cv_func__doprnt=yes"
3349     else
3350     echo "configure: failed program was:" >&5
3351     cat conftest.$ac_ext >&5
3352     rm -rf conftest*
3353     eval "ac_cv_func__doprnt=no"
3354     fi
3355     rm -f conftest*
3356     fi
3357    
3358     if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
3359     echo "$ac_t""yes" 1>&6
3360     cat >> confdefs.h <<\EOF
3361     #define HAVE_DOPRNT 1
3362     EOF
3363    
3364     else
3365     echo "$ac_t""no" 1>&6
3366     fi
3367    
3368     fi
3369    
3370     echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
3371     echo "configure:3372: checking whether setpgrp takes no argument" >&5
3372     if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
3373     echo $ac_n "(cached) $ac_c" 1>&6
3374     else
3375     if test "$cross_compiling" = yes; then
3376     { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
3377     else
3378     cat > conftest.$ac_ext <<EOF
3379     #line 3380 "configure"
3380     #include "confdefs.h"
3381    
3382     #ifdef HAVE_UNISTD_H
3383     #include <unistd.h>
3384     #endif
3385    
3386     /*
3387     * If this system has a BSD-style setpgrp, which takes arguments, exit
3388     * successfully.
3389     */
3390     main()
3391     {
3392     if (setpgrp(1,1) == -1)
3393     exit(0);
3394     else
3395     exit(1);
3396     }
3397    
3398     EOF
3399     if { (eval echo configure:3400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3400     then
3401     ac_cv_func_setpgrp_void=no
3402     else
3403     echo "configure: failed program was:" >&5
3404     cat conftest.$ac_ext >&5
3405     rm -fr conftest*
3406     ac_cv_func_setpgrp_void=yes
3407     fi
3408     rm -fr conftest*
3409     fi
3410    
3411    
3412     fi
3413    
3414     echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
3415     if test $ac_cv_func_setpgrp_void = yes; then
3416     cat >> confdefs.h <<\EOF
3417     #define SETPGRP_VOID 1
3418     EOF
3419    
3420     fi
3421    
3422     echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&6
3423     echo "configure:3424: checking whether closedir returns void" >&5
3424     if eval "test \"`echo '$''{'ac_cv_func_closedir_void'+set}'`\" = set"; then
3425     echo $ac_n "(cached) $ac_c" 1>&6
3426     else
3427     if test "$cross_compiling" = yes; then
3428     ac_cv_func_closedir_void=yes
3429     else
3430     cat > conftest.$ac_ext <<EOF
3431     #line 3432 "configure"
3432     #include "confdefs.h"
3433     #include <sys/types.h>
3434     #include <$ac_header_dirent>
3435     int closedir(); main() { exit(closedir(opendir(".")) != 0); }
3436     EOF
3437     if { (eval echo configure:3438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3438     then
3439     ac_cv_func_closedir_void=no
3440     else
3441     echo "configure: failed program was:" >&5
3442     cat conftest.$ac_ext >&5
3443     rm -fr conftest*
3444     ac_cv_func_closedir_void=yes
3445     fi
3446     rm -fr conftest*
3447     fi
3448    
3449     fi
3450    
3451     echo "$ac_t""$ac_cv_func_closedir_void" 1>&6
3452     if test $ac_cv_func_closedir_void = yes; then
3453     cat >> confdefs.h <<\EOF
3454     #define CLOSEDIR_VOID 1
3455     EOF
3456    
3457     fi
3458    
3459     for ac_func in mkdir _mkdir
3460     do
3461     echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3462     echo "configure:3463: checking for $ac_func" >&5
3463     if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3464     echo $ac_n "(cached) $ac_c" 1>&6
3465     else
3466     cat > conftest.$ac_ext <<EOF
3467     #line 3468 "configure"
3468     #include "confdefs.h"
3469     /* System header to define __stub macros and hopefully few prototypes,
3470     which can conflict with char $ac_func(); below. */
3471     #include <assert.h>
3472     /* Override any gcc2 internal prototype to avoid an error. */
3473     /* We use char because int might match the return type of a gcc2
3474     builtin and then its argument prototype would still apply. */
3475     char $ac_func();
3476    
3477     int main() {
3478    
3479     /* The GNU C library defines this for functions which it implements
3480     to always fail with ENOSYS. Some functions are actually named
3481     something starting with __ and the normal name is an alias. */
3482     #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3483     choke me
3484     #else
3485     $ac_func();
3486     #endif
3487    
3488     ; return 0; }
3489     EOF
3490     if { (eval echo configure:3491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3491     rm -rf conftest*
3492     eval "ac_cv_func_$ac_func=yes"
3493     else
3494     echo "configure: failed program was:" >&5
3495     cat conftest.$ac_ext >&5
3496     rm -rf conftest*
3497     eval "ac_cv_func_$ac_func=no"
3498     fi
3499     rm -f conftest*
3500     fi
3501    
3502     if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3503     echo "$ac_t""yes" 1>&6
3504     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3505     cat >> confdefs.h <<EOF
3506     #define $ac_tr_func 1
3507     EOF
3508    
3509     else
3510     echo "$ac_t""no" 1>&6
3511     fi
3512     done
3513    
3514     echo $ac_n "checking whether mkdir takes one argument""... $ac_c" 1>&6
3515     echo "configure:3516: checking whether mkdir takes one argument" >&5
3516     if eval "test \"`echo '$''{'ac_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
3517     echo $ac_n "(cached) $ac_c" 1>&6
3518     else
3519     cat > conftest.$ac_ext <<EOF
3520     #line 3521 "configure"
3521     #include "confdefs.h"
3522    
3523     #ifdef HAVE_SYS_STAT_H
3524     # include <sys/stat.h>
3525     #endif
3526     #ifdef HAVE_UNISTD_H
3527     # include <unistd.h>
3528     #endif
3529     #ifdef HAVE_DIR_H
3530     # include <dir.h>
3531     #endif
3532     #ifdef HAVE_DIRECT_H
3533     # include <direct.h>
3534     #endif
3535     #ifndef HAVE_MKDIR
3536     # ifdef HAVE__MKDIR
3537     # define mkdir _mkdir
3538     # endif
3539     #endif
3540    
3541     int main() {
3542     mkdir(".");
3543     ; return 0; }
3544     EOF
3545     if { (eval echo configure:3546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3546     rm -rf conftest*
3547     ac_cv_mkdir_takes_one_arg=yes
3548     else
3549     echo "configure: failed program was:" >&5
3550     cat conftest.$ac_ext >&5
3551     rm -rf conftest*
3552     ac_cv_mkdir_takes_one_arg=no
3553     fi
3554     rm -f conftest*
3555     fi
3556    
3557     echo "$ac_t""$ac_cv_mkdir_takes_one_arg" 1>&6
3558     if test x"$ac_cv_mkdir_takes_one_arg" = xyes; then
3559     cat >> confdefs.h <<\EOF
3560     #define MKDIR_TAKES_ONE_ARG 1
3561     EOF
3562    
3563     fi
3564    
3565     for ac_func in gethostname gettimeofday select socket strdup strtoul strerror inet_aton inet_ntoa uname recv send recvfrom sendto uname fork getpid sigaction sigprocmask sigaddset setpgid setpgrp ftime strcasecmp strncasecmp stricmp strnicmp chdir difftime strchr strrchr index rindex memcpy memset memmove bcopy wait waitpid pipe getenv ioctl setsid mktime poll gethostbyname getservbyname getlogin pow getpwnam getgrnam getuid getgid setuid setgid mkdir _mkdir strsep getopt kqueue setitimer epoll_create getrlimit vsnprintf _vsnprintf
3566     do
3567     echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3568     echo "configure:3569: checking for $ac_func" >&5
3569     if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3570     echo $ac_n "(cached) $ac_c" 1>&6
3571     else
3572     cat > conftest.$ac_ext <<EOF
3573     #line 3574 "configure"
3574     #include "confdefs.h"
3575     /* System header to define __stub macros and hopefully few prototypes,
3576     which can conflict with char $ac_func(); below. */
3577     #include <assert.h>
3578     /* Override any gcc2 internal prototype to avoid an error. */
3579     /* We use char because int might match the return type of a gcc2
3580     builtin and then its argument prototype would still apply. */
3581     char $ac_func();
3582    
3583     int main() {
3584    
3585     /* The GNU C library defines this for functions which it implements
3586     to always fail with ENOSYS. Some functions are actually named
3587     something starting with __ and the normal name is an alias. */
3588     #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3589     choke me
3590     #else
3591     $ac_func();
3592     #endif
3593    
3594     ; return 0; }
3595     EOF
3596     if { (eval echo configure:3597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3597     rm -rf conftest*
3598     eval "ac_cv_func_$ac_func=yes"
3599     else
3600     echo "configure: failed program was:" >&5
3601     cat conftest.$ac_ext >&5
3602     rm -rf conftest*
3603     eval "ac_cv_func_$ac_func=no"
3604     fi
3605     rm -f conftest*
3606     fi
3607    
3608     if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3609     echo "$ac_t""yes" 1>&6
3610     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3611     cat >> confdefs.h <<EOF
3612     #define $ac_tr_func 1
3613     EOF
3614    
3615     else
3616     echo "$ac_t""no" 1>&6
3617     fi
3618     done
3619    
3620    
3621     if test X"${am_cv_prog_cc_stdc}" = X"no"; then
3622     COMPILEANSI1='${PREPROCESS} $< | sed '"'"'s/^# *\([0-9][0-9]*\) *\([^ ]*[a-z][^ ]*\) *.*$$/#line \1 \2/'"'"' | ${SRC_ACDIR}/ansi2knr > ${SRC_SRCDIR}/.ansi2knr_tmp.c'
3623     COMPILEANSI2='${COMPILE} ${SRC_SRCDIR}/.ansi2knr_tmp.c -o $@'
3624     COMPILEANSI3='@${RMF} ${SRC_SRCDIR}/.ansi2knr_tmp.c'
3625     ANSI2KNR_TMP='${SRC_SRCDIR}/.ansi2knr_tmp.c'
3626     ANSI2KNR_DEP='${SRC_ACDIR}/ansi2knr'
3627     else
3628     COMPILEANSI1='${COMPILE} $< -o $@'
3629     COMPILEANSI2='@:'
3630     COMPILEANSI3='@:'
3631     ANSI2KNR_TMP=''
3632     ANSI2KNR_DEP=''
3633     fi
3634    
3635    
3636    
3637    
3638    
3639    
3640     trap '' 1 2 15
3641     cat > confcache <<\EOF
3642     # This file is a shell script that caches the results of configure
3643     # tests run on this system so they can be shared between configure
3644     # scripts and configure runs. It is not useful on other systems.
3645     # If it contains results you don't want to keep, you may remove or edit it.
3646     #
3647     # By default, configure uses ./config.cache as the cache file,
3648     # creating it if it does not exist already. You can give configure
3649     # the --cache-file=FILE option to use a different cache file; that is
3650     # what configure does when it calls configure scripts in
3651     # subdirectories, so they share the cache.
3652     # Giving --cache-file=/dev/null disables caching, for debugging configure.
3653     # config.status only pays attention to the cache file if you give it the
3654     # --recheck option to rerun configure.
3655     #
3656     EOF
3657     # The following way of writing the cache mishandles newlines in values,
3658     # but we know of no workaround that is simple, portable, and efficient.
3659     # So, don't put newlines in cache variables' values.
3660     # Ultrix sh set writes to stderr and can't be redirected directly,
3661     # and sets the high bit in the cache file unless we assign to the vars.
3662     (set) 2>&1 |
3663     case `(ac_space=' '; set | grep ac_space) 2>&1` in
3664     *ac_space=\ *)
3665     # `set' does not quote correctly, so add quotes (double-quote substitution
3666     # turns \\\\ into \\, and sed turns \\ into \).
3667     sed -n \
3668     -e "s/'/'\\\\''/g" \
3669     -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3670     ;;
3671     *)
3672     # `set' quotes correctly as required by POSIX, so do not add quotes.
3673     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3674     ;;
3675     esac >> confcache
3676     if cmp -s $cache_file confcache; then
3677     :
3678     else
3679     if test -w $cache_file; then
3680     echo "updating cache $cache_file"
3681     cat confcache > $cache_file
3682     else
3683     echo "not updating unwritable cache $cache_file"
3684     fi
3685     fi
3686     rm -f confcache
3687    
3688     trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3689    
3690     test "x$prefix" = xNONE && prefix=$ac_default_prefix
3691     # Let make expand exec_prefix.
3692     test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3693    
3694     # Any assignment to VPATH causes Sun make to only execute
3695     # the first set of double-colon rules, so remove it if not needed.
3696     # If there is a colon in the path, we need to keep it.
3697     if test "x$srcdir" = x.; then
3698     ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3699     fi
3700    
3701     trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3702    
3703     DEFS=-DHAVE_CONFIG_H
3704    
3705     # Without the "./", some shells look in PATH for config.status.
3706     : ${CONFIG_STATUS=./config.status}
3707    
3708     echo creating $CONFIG_STATUS
3709     rm -f $CONFIG_STATUS
3710     cat > $CONFIG_STATUS <<EOF
3711     #! /bin/sh
3712     # Generated automatically by configure.
3713     # Run this file to recreate the current configuration.
3714     # This directory was configured as follows,
3715     # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3716     #
3717     # $0 $ac_configure_args
3718     #
3719     # Compiler output produced by configure, useful for debugging
3720     # configure, is in ./config.log if it exists.
3721    
3722     ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3723     for ac_option
3724     do
3725     case "\$ac_option" in
3726     -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3727     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3728     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3729     -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3730     echo "$CONFIG_STATUS generated by autoconf version 2.13"
3731     exit 0 ;;
3732     -help | --help | --hel | --he | --h)
3733     echo "\$ac_cs_usage"; exit 0 ;;
3734     *) echo "\$ac_cs_usage"; exit 1 ;;
3735     esac
3736     done
3737    
3738     ac_given_srcdir=$srcdir
3739     ac_given_INSTALL="$INSTALL"
3740    
3741     trap 'rm -fr `echo "Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3742     EOF
3743     cat >> $CONFIG_STATUS <<EOF
3744    
3745     # Protect against being on the right side of a sed subst in config.status.
3746     sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3747     s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3748     $ac_vpsub
3749     $extrasub
3750     s%@SHELL@%$SHELL%g
3751     s%@CFLAGS@%$CFLAGS%g
3752     s%@CPPFLAGS@%$CPPFLAGS%g
3753     s%@CXXFLAGS@%$CXXFLAGS%g
3754     s%@FFLAGS@%$FFLAGS%g
3755     s%@DEFS@%$DEFS%g
3756     s%@LDFLAGS@%$LDFLAGS%g
3757     s%@LIBS@%$LIBS%g
3758     s%@exec_prefix@%$exec_prefix%g
3759     s%@prefix@%$prefix%g
3760     s%@program_transform_name@%$program_transform_name%g
3761     s%@bindir@%$bindir%g
3762     s%@sbindir@%$sbindir%g
3763     s%@libexecdir@%$libexecdir%g
3764     s%@datadir@%$datadir%g
3765     s%@sysconfdir@%$sysconfdir%g
3766     s%@sharedstatedir@%$sharedstatedir%g
3767     s%@localstatedir@%$localstatedir%g
3768     s%@libdir@%$libdir%g
3769     s%@includedir@%$includedir%g
3770     s%@oldincludedir@%$oldincludedir%g
3771     s%@infodir@%$infodir%g
3772     s%@mandir@%$mandir%g
3773     s%@host@%$host%g
3774     s%@host_alias@%$host_alias%g
3775     s%@host_cpu@%$host_cpu%g
3776     s%@host_vendor@%$host_vendor%g
3777     s%@host_os@%$host_os%g
3778     s%@target@%$target%g
3779     s%@target_alias@%$target_alias%g
3780     s%@target_cpu@%$target_cpu%g
3781     s%@target_vendor@%$target_vendor%g
3782     s%@target_os@%$target_os%g
3783     s%@build@%$build%g
3784     s%@build_alias@%$build_alias%g
3785     s%@build_cpu@%$build_cpu%g
3786     s%@build_vendor@%$build_vendor%g
3787     s%@build_os@%$build_os%g
3788     s%@CC@%$CC%g
3789     s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3790     s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3791     s%@INSTALL_DATA@%$INSTALL_DATA%g
3792     s%@CPP@%$CPP%g
3793     s%@DEFINES@%$DEFINES%g
3794     s%@enable_bnetd@%$enable_bnetd%g
3795     s%@enable_d2cs@%$enable_d2cs%g
3796     s%@enable_d2dbs@%$enable_d2dbs%g
3797     s%@COMPILEANSI1@%$COMPILEANSI1%g
3798     s%@COMPILEANSI2@%$COMPILEANSI2%g
3799     s%@COMPILEANSI3@%$COMPILEANSI3%g
3800     s%@ANSI2KNR_TMP@%$ANSI2KNR_TMP%g
3801     s%@ANSI2KNR_DEP@%$ANSI2KNR_DEP%g
3802    
3803     CEOF
3804     EOF
3805    
3806     cat >> $CONFIG_STATUS <<\EOF
3807    
3808     # Split the substitutions into bite-sized pieces for seds with
3809     # small command number limits, like on Digital OSF/1 and HP-UX.
3810     ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3811     ac_file=1 # Number of current file.
3812     ac_beg=1 # First line for current file.
3813     ac_end=$ac_max_sed_cmds # Line after last line for current file.
3814     ac_more_lines=:
3815     ac_sed_cmds=""
3816     while $ac_more_lines; do
3817     if test $ac_beg -gt 1; then
3818     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3819     else
3820     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3821     fi
3822     if test ! -s conftest.s$ac_file; then
3823     ac_more_lines=false
3824     rm -f conftest.s$ac_file
3825     else
3826     if test -z "$ac_sed_cmds"; then
3827     ac_sed_cmds="sed -f conftest.s$ac_file"
3828     else
3829     ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3830     fi
3831     ac_file=`expr $ac_file + 1`
3832     ac_beg=$ac_end
3833     ac_end=`expr $ac_end + $ac_max_sed_cmds`
3834     fi
3835     done
3836     if test -z "$ac_sed_cmds"; then
3837     ac_sed_cmds=cat
3838     fi
3839     EOF
3840    
3841     cat >> $CONFIG_STATUS <<EOF
3842    
3843     CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
3844     EOF
3845     cat >> $CONFIG_STATUS <<\EOF
3846     for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3847     # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3848     case "$ac_file" in
3849     *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3850     ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3851     *) ac_file_in="${ac_file}.in" ;;
3852     esac
3853    
3854     # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3855    
3856     # Remove last slash and all that follows it. Not all systems have dirname.
3857     ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3858     if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3859     # The file is in a subdirectory.
3860     test ! -d "$ac_dir" && mkdir "$ac_dir"
3861     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3862     # A "../" for each directory in $ac_dir_suffix.
3863     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3864     else
3865     ac_dir_suffix= ac_dots=
3866     fi
3867    
3868     case "$ac_given_srcdir" in
3869     .) srcdir=.
3870     if test -z "$ac_dots"; then top_srcdir=.
3871     else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3872     /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3873     *) # Relative path.
3874     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3875     top_srcdir="$ac_dots$ac_given_srcdir" ;;
3876     esac
3877    
3878     case "$ac_given_INSTALL" in
3879     [/$]*) INSTALL="$ac_given_INSTALL" ;;
3880     *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3881     esac
3882    
3883     echo creating "$ac_file"
3884     rm -f "$ac_file"
3885     configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3886     case "$ac_file" in
3887     *Makefile*) ac_comsub="1i\\
3888     # $configure_input" ;;
3889     *) ac_comsub= ;;
3890     esac
3891    
3892     ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3893     sed -e "$ac_comsub
3894     s%@configure_input@%$configure_input%g
3895     s%@srcdir@%$srcdir%g
3896     s%@top_srcdir@%$top_srcdir%g
3897     s%@INSTALL@%$INSTALL%g
3898     " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3899     fi; done
3900     rm -f conftest.s*
3901    
3902     # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3903     # NAME is the cpp macro being defined and VALUE is the value it is being given.
3904     #
3905     # ac_d sets the value in "#define NAME VALUE" lines.
3906     ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3907     ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
3908     ac_dC='\3'
3909     ac_dD='%g'
3910     # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3911     ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3912     ac_uB='\([ ]\)%\1#\2define\3'
3913     ac_uC=' '
3914     ac_uD='\4%g'
3915     # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3916     ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3917     ac_eB='$%\1#\2define\3'
3918     ac_eC=' '
3919     ac_eD='%g'
3920    
3921     if test "${CONFIG_HEADERS+set}" != set; then
3922     EOF
3923     cat >> $CONFIG_STATUS <<EOF
3924     CONFIG_HEADERS="config.h"
3925     EOF
3926     cat >> $CONFIG_STATUS <<\EOF
3927     fi
3928     for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3929     # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3930     case "$ac_file" in
3931     *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3932     ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3933     *) ac_file_in="${ac_file}.in" ;;
3934     esac
3935    
3936     echo creating $ac_file
3937    
3938     rm -f conftest.frag conftest.in conftest.out
3939     ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3940     cat $ac_file_inputs > conftest.in
3941    
3942     EOF
3943    
3944     # Transform confdefs.h into a sed script conftest.vals that substitutes
3945     # the proper values into config.h.in to produce config.h. And first:
3946     # Protect against being on the right side of a sed subst in config.status.
3947     # Protect against being in an unquoted here document in config.status.
3948     rm -f conftest.vals
3949     cat > conftest.hdr <<\EOF
3950     s/[\\&%]/\\&/g
3951     s%[\\$`]%\\&%g
3952     s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3953     s%ac_d%ac_u%gp
3954     s%ac_u%ac_e%gp
3955     EOF
3956     sed -n -f conftest.hdr confdefs.h > conftest.vals
3957     rm -f conftest.hdr
3958    
3959     # This sed command replaces #undef with comments. This is necessary, for
3960     # example, in the case of _POSIX_SOURCE, which is predefined and required
3961     # on some systems where configure will not decide to define it.
3962     cat >> conftest.vals <<\EOF
3963     s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3964     EOF
3965    
3966     # Break up conftest.vals because some shells have a limit on
3967     # the size of here documents, and old seds have small limits too.
3968    
3969     rm -f conftest.tail
3970     while :
3971     do
3972     ac_lines=`grep -c . conftest.vals`
3973     # grep -c gives empty output for an empty file on some AIX systems.
3974     if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3975     # Write a limited-size here document to conftest.frag.
3976     echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3977     sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3978     echo 'CEOF
3979     sed -f conftest.frag conftest.in > conftest.out
3980     rm -f conftest.in
3981     mv conftest.out conftest.in
3982     ' >> $CONFIG_STATUS
3983     sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3984     rm -f conftest.vals
3985     mv conftest.tail conftest.vals
3986     done
3987     rm -f conftest.vals
3988    
3989     cat >> $CONFIG_STATUS <<\EOF
3990     rm -f conftest.frag conftest.h
3991     echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
3992     cat conftest.in >> conftest.h
3993     rm -f conftest.in
3994     if cmp -s $ac_file conftest.h 2>/dev/null; then
3995     echo "$ac_file is unchanged"
3996     rm -f conftest.h
3997     else
3998     # Remove last slash and all that follows it. Not all systems have dirname.
3999     ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4000     if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4001     # The file is in a subdirectory.
4002     test ! -d "$ac_dir" && mkdir "$ac_dir"
4003     fi
4004     rm -f $ac_file
4005     mv conftest.h $ac_file
4006     fi
4007     fi; done
4008    
4009     EOF
4010     cat >> $CONFIG_STATUS <<EOF
4011    
4012     EOF
4013     cat >> $CONFIG_STATUS <<\EOF
4014    
4015     exit 0
4016     EOF
4017     chmod +x $CONFIG_STATUS
4018     rm -fr confdefs* $ac_clean_files
4019     test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4020    

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1