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