Don't keep connection on failure.
[catagits/fcgi2.git] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.9 
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 # Setup a symbol for the null device so that on NT a file can be used
11 # instead
12 #
13 if test "`uname -s`" = "Windows_NT"; then
14   rm -f nulldevr
15   touch nulldevr
16   NULLDEVR=`pwd`/nulldevr
17   rm -f nulldevw
18   NULLDEVW=`pwd`/nulldevw
19   # See if a root device has been specified
20   #
21   if test -z "$ROOTDRIVE"; then
22     ROOTDRIVE="c"
23   fi
24   #
25   # Find the root of the MKS toolkit
26   #
27   if test -z "$MKSROOT"; then
28     if test -d $ROOTDRIVE:/mks/mksnt; then
29       MKSROOT=$ROOTDRIVE:/mks/mksnt
30     elif test -d $ROOTDRIVE:/mksnt; then
31       MKSROOT=$ROOTDRIVE:/mksnt
32     else
33       MKSROOT=$ROOTDRIVE:/mksnotfound
34     fi
35   fi
36 else
37   NULLDEVR=/dev/null
38   NULLDEVW=/dev/null
39 fi
40
41 # Defaults:
42 ac_help=
43 ac_default_prefix=/usr/local
44 # Any additions from configure.in:
45 ac_help="$ac_help
46   --with-global           Build an executable for global export(outside USA)"
47 ac_help="$ac_help
48   --with-domestic         Build an executable for global export(outside USA)"
49 ac_help="$ac_help
50   --with-purify           Build an executable with Purify
51                           (Pure Software's tool for finding memory
52                           errors)"
53 ac_help="$ac_help
54   --with-purecov          Build an executable with PureCoverage
55                           (Pure Software's tool for doing test coverage
56                           analysis)"
57 ac_help="$ac_help
58   --with-quantify         Build an executable with Quantify
59                           (Pure Software's tool for doing performance
60                           analysis)"
61 ac_help="$ac_help
62   --with-profile          Build with profiling"
63 ac_help="$ac_help
64   --with-nodebug          Build a production version with no debugging code"
65 ac_help="$ac_help
66   --with-noassert         Build a production version with no ASSERTs"
67 ac_help="$ac_help
68   --with-notest           Build a production version with no testing code"
69 ac_help="$ac_help
70   --with-omireleases      Use OMI standard release paths"
71
72 # Initialize some variables set by options.
73 # The variables have the same names as the options, with
74 # dashes changed to underlines.
75 build=NONE
76 cache_file=./config.cache
77 exec_prefix=NONE
78 host=NONE
79 no_create=
80 nonopt=NONE
81 no_recursion=
82 prefix=NONE
83 program_prefix=NONE
84 program_suffix=NONE
85 program_transform_name=s,x,x,
86 silent=
87 site=
88 srcdir=
89 target=NONE
90 verbose=
91 x_includes=NONE
92 x_libraries=NONE
93 if test "`uname -s`" = Windows_NT; then
94   bindir='${exec_prefix}\\bin'
95   sbindir='${exec_prefix}\\sbin'
96   libexecdir='${exec_prefix}\\libexec'
97   datadir='${prefix}\\share'
98   sysconfdir='${prefix}\\etc'
99   sharedstatedir='${prefix}\\com'
100   localstatedir='${prefix}\\var'
101   libdir='${exec_prefix}\\lib'
102   includedir='${prefix}\\include'
103   oldincludedir='\\msdev\\include'
104   infodir='${prefix}\\info'
105   mandir='${prefix}\\man'
106 else
107   bindir='${exec_prefix}/bin'
108   sbindir='${exec_prefix}/sbin'
109   libexecdir='${exec_prefix}/libexec'
110   datadir='${prefix}/share'
111   sysconfdir='${prefix}/etc'
112   sharedstatedir='${prefix}/com'
113   localstatedir='${prefix}/var'
114   libdir='${exec_prefix}/lib'
115   includedir='${prefix}/include'
116   oldincludedir='/usr/include'
117   infodir='${prefix}/info'
118   mandir='${prefix}/man'
119 fi
120 # Initialize some other variables.
121 subdirs=
122 MFLAGS= MAKEFLAGS=
123
124 ac_prev=
125 for ac_option
126 do
127
128   # If the previous option needs an argument, assign it.
129   if test -n "$ac_prev"; then
130     eval "$ac_prev=\$ac_option"
131     ac_prev=
132     continue
133   fi
134
135   case "$ac_option" in
136   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
137   *) ac_optarg= ;;
138   esac
139
140   # Accept the important Cygnus configure options, so we can diagnose typos.
141
142   case "$ac_option" in
143
144   -bindir | --bindir | --bindi | --bind | --bin | --bi)
145     ac_prev=bindir ;;
146   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
147     bindir="$ac_optarg" ;;
148
149   -build | --build | --buil | --bui | --bu)
150     ac_prev=build ;;
151   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
152     build="$ac_optarg" ;;
153
154   -cache-file | --cache-file | --cache-fil | --cache-fi \
155   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
156     ac_prev=cache_file ;;
157   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
158   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
159     cache_file="$ac_optarg" ;;
160
161   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
162     ac_prev=datadir ;;
163   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
164   | --da=*)
165     datadir="$ac_optarg" ;;
166
167   -disable-* | --disable-*)
168     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
169     # Reject names that are not valid shell variable names.
170     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
171       { echo "configure: error: $ac_feature: invalid feature name" 1>&2;
172    if test -z "$IGNORE_ERRORS"; then
173      exit 1 ;
174    fi; }
175     fi
176     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
177     eval "enable_${ac_feature}=no" ;;
178
179   -enable-* | --enable-*)
180     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
181     # Reject names that are not valid shell variable names.
182     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
183       { echo "configure: error: $ac_feature: invalid feature name" 1>&2;
184    if test -z "$IGNORE_ERRORS"; then
185      exit 1 ;
186    fi; }
187     fi
188     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
189     case "$ac_option" in
190       *=*) ;;
191       *) ac_optarg=yes ;;
192     esac
193     eval "enable_${ac_feature}='$ac_optarg'" ;;
194
195   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
196   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
197   | --exec | --exe | --ex)
198     ac_prev=exec_prefix ;;
199   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
200   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
201   | --exec=* | --exe=* | --ex=*)
202     exec_prefix="$ac_optarg" ;;
203
204   -gas | --gas | --ga | --g)
205     # Obsolete; use --with-gas.
206     with_gas=yes ;;
207
208   -help | --help | --hel | --he)
209     # Omit some internal or obsolete options to make the list less imposing.
210     # This message is too long to be a string in the A/UX 3.1 sh.
211     cat << EOF
212 Usage: configure [options] [host]
213 Options: [defaults in brackets after descriptions]
214 Configuration:
215   --cache-file=FILE       cache test results in FILE
216   --help                  print this message
217   --no-create             do not create output files
218   --quiet, --silent       do not print \`checking...' messages
219   --version               print the version of autoconf that created configure
220 Directory and file names:
221   --prefix=PREFIX         install architecture-independent files in PREFIX
222                           [$ac_default_prefix]
223   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
224                           [same as prefix]
225   --bindir=DIR            user executables in DIR [EPREFIX/bin]
226   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
227   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
228   --datadir=DIR           read-only architecture-independent data in DIR
229                           [PREFIX/share]
230   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
231   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
232                           [PREFIX/com]
233   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
234   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
235   --includedir=DIR        C header files in DIR [PREFIX/include]
236   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
237   --infodir=DIR           info documentation in DIR [PREFIX/info]
238   --mandir=DIR            man documentation in DIR [PREFIX/man]
239   --srcdir=DIR            find the sources in DIR [configure dir or ..]
240   --program-prefix=PREFIX prepend PREFIX to installed program names
241   --program-suffix=SUFFIX append SUFFIX to installed program names
242   --program-transform-name=PROGRAM
243                           run sed PROGRAM on installed program names
244 EOF
245     cat << EOF
246 Host type:
247   --build=BUILD           configure for building on BUILD [BUILD=HOST]
248   --host=HOST             configure for HOST [guessed]
249   --target=TARGET         configure for TARGET [TARGET=HOST]
250 Features and packages:
251   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
252   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
253   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
254   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
255   --x-includes=DIR        X include files are in DIR
256   --x-libraries=DIR       X library files are in DIR
257 EOF
258     if test -n "$ac_help"; then
259       echo "--enable and --with options recognized:$ac_help"
260     fi
261     exit 0 ;;
262
263   -host | --host | --hos | --ho)
264     ac_prev=host ;;
265   -host=* | --host=* | --hos=* | --ho=*)
266     host="$ac_optarg" ;;
267
268   -includedir | --includedir | --includedi | --included | --include \
269   | --includ | --inclu | --incl | --inc)
270     ac_prev=includedir ;;
271   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
272   | --includ=* | --inclu=* | --incl=* | --inc=*)
273     includedir="$ac_optarg" ;;
274
275   -infodir | --infodir | --infodi | --infod | --info | --inf)
276     ac_prev=infodir ;;
277   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
278     infodir="$ac_optarg" ;;
279
280   -libdir | --libdir | --libdi | --libd)
281     ac_prev=libdir ;;
282   -libdir=* | --libdir=* | --libdi=* | --libd=*)
283     libdir="$ac_optarg" ;;
284
285   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
286   | --libexe | --libex | --libe)
287     ac_prev=libexecdir ;;
288   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
289   | --libexe=* | --libex=* | --libe=*)
290     libexecdir="$ac_optarg" ;;
291
292   -localstatedir | --localstatedir | --localstatedi | --localstated \
293   | --localstate | --localstat | --localsta | --localst \
294   | --locals | --local | --loca | --loc | --lo)
295     ac_prev=localstatedir ;;
296   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
297   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
298   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
299     localstatedir="$ac_optarg" ;;
300
301   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
302     ac_prev=mandir ;;
303   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
304     mandir="$ac_optarg" ;;
305
306   -nfp | --nfp | --nf)
307     # Obsolete; use --without-fp.
308     with_fp=no ;;
309
310   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
311   | --no-cr | --no-c)
312     no_create=yes ;;
313
314   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
315   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
316     no_recursion=yes ;;
317
318   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
319   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
320   | --oldin | --oldi | --old | --ol | --o)
321     ac_prev=oldincludedir ;;
322   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
323   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
324   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
325     oldincludedir="$ac_optarg" ;;
326
327   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
328     ac_prev=prefix ;;
329   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
330     prefix="$ac_optarg" ;;
331
332   -program-prefix | --program-prefix | --program-prefi | --program-pref \
333   | --program-pre | --program-pr | --program-p)
334     ac_prev=program_prefix ;;
335   -program-prefix=* | --program-prefix=* | --program-prefi=* \
336   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
337     program_prefix="$ac_optarg" ;;
338
339   -program-suffix | --program-suffix | --program-suffi | --program-suff \
340   | --program-suf | --program-su | --program-s)
341     ac_prev=program_suffix ;;
342   -program-suffix=* | --program-suffix=* | --program-suffi=* \
343   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
344     program_suffix="$ac_optarg" ;;
345
346   -program-transform-name | --program-transform-name \
347   | --program-transform-nam | --program-transform-na \
348   | --program-transform-n | --program-transform- \
349   | --program-transform | --program-transfor \
350   | --program-transfo | --program-transf \
351   | --program-trans | --program-tran \
352   | --progr-tra | --program-tr | --program-t)
353     ac_prev=program_transform_name ;;
354   -program-transform-name=* | --program-transform-name=* \
355   | --program-transform-nam=* | --program-transform-na=* \
356   | --program-transform-n=* | --program-transform-=* \
357   | --program-transform=* | --program-transfor=* \
358   | --program-transfo=* | --program-transf=* \
359   | --program-trans=* | --program-tran=* \
360   | --progr-tra=* | --program-tr=* | --program-t=*)
361     program_transform_name="$ac_optarg" ;;
362
363   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
364   | -silent | --silent | --silen | --sile | --sil)
365     silent=yes ;;
366
367   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
368     ac_prev=sbindir ;;
369   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
370   | --sbi=* | --sb=*)
371     sbindir="$ac_optarg" ;;
372
373   -sharedstatedir | --sharedstatedir | --sharedstatedi \
374   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
375   | --sharedst | --shareds | --shared | --share | --shar \
376   | --sha | --sh)
377     ac_prev=sharedstatedir ;;
378   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
379   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
380   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
381   | --sha=* | --sh=*)
382     sharedstatedir="$ac_optarg" ;;
383
384   -site | --site | --sit)
385     ac_prev=site ;;
386   -site=* | --site=* | --sit=*)
387     site="$ac_optarg" ;;
388
389   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
390     ac_prev=srcdir ;;
391   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
392     srcdir="$ac_optarg" ;;
393
394   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
395   | --syscon | --sysco | --sysc | --sys | --sy)
396     ac_prev=sysconfdir ;;
397   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
398   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
399     sysconfdir="$ac_optarg" ;;
400
401   -target | --target | --targe | --targ | --tar | --ta | --t)
402     ac_prev=target ;;
403   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
404     target="$ac_optarg" ;;
405
406   -v | -verbose | --verbose | --verbos | --verbo | --verb)
407     verbose=yes ;;
408
409   -version | --version | --versio | --versi | --vers)
410     echo "configure generated by autoconf version 2.9"
411     exit 0 ;;
412
413   -with-* | --with-*)
414     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
415     # Reject names that are not valid shell variable names.
416     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
417       { echo "configure: error: $ac_package: invalid package name" 1>&2;
418    if test -z "$IGNORE_ERRORS"; then
419      exit 1 ;
420    fi; }
421     fi
422     ac_package=`echo $ac_package| sed 's/-/_/g'`
423     case "$ac_option" in
424       *=*) ;;
425       *) ac_optarg=yes ;;
426     esac
427     eval "with_${ac_package}='$ac_optarg'" ;;
428
429   -without-* | --without-*)
430     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
431     # Reject names that are not valid shell variable names.
432     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
433       { echo "configure: error: $ac_package: invalid package name" 1>&2;
434    if test -z "$IGNORE_ERRORS"; then
435      exit 1 ;
436    fi; }
437     fi
438     ac_package=`echo $ac_package| sed 's/-/_/g'`
439     eval "with_${ac_package}=no" ;;
440
441   --x)
442     # Obsolete; use --with-x.
443     with_x=yes ;;
444
445   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
446   | --x-incl | --x-inc | --x-in | --x-i)
447     ac_prev=x_includes ;;
448   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
449   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
450     x_includes="$ac_optarg" ;;
451
452   -x-libraries | --x-libraries | --x-librarie | --x-librari \
453   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
454     ac_prev=x_libraries ;;
455   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
456   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
457     x_libraries="$ac_optarg" ;;
458
459   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2;
460    if test -z "$IGNORE_ERRORS"; then
461      exit 1 ;
462    fi; }
463     ;;
464
465   *)
466     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
467       echo "configure: warning: $ac_option: invalid host type" 1>&2
468     fi
469     if test "x$nonopt" != xNONE; then
470       { echo "configure: error: can only configure for one host and one target at a time" 1>&2;
471    if test -z "$IGNORE_ERRORS"; then
472      exit 1 ;
473    fi; }
474     fi
475     nonopt="$ac_option"
476     ;;
477
478   esac
479 done
480
481 if test -n "$ac_prev"; then
482   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2;
483    if test -z "$IGNORE_ERRORS"; then
484      exit 1 ;
485    fi; }
486 fi
487
488 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
489
490 # File descriptor usage:
491 # 0 standard input
492 # 1 file creation
493 # 2 errors and warnings
494 # 3 some systems may open it to /dev/tty
495 # 4 used on the Kubota Titan
496 # 6 checking for... messages and results
497 # 5 compiler messages saved in config.log
498 if test "$silent" = yes; then
499   exec 6>$NULLDEVW
500 else
501   exec 6>&1
502 fi
503 exec 5>./config.log
504
505 echo "\
506 This file contains any messages produced by compilers while
507 running configure, to aid debugging if configure makes a mistake.
508 " 1>&5
509
510 # Strip out --no-create and --no-recursion so they do not pile up.
511 # Also quote any args containing shell metacharacters.
512 ac_configure_args=
513 for ac_arg
514 do
515   case "$ac_arg" in
516   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
517   | --no-cr | --no-c) ;;
518   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
519   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
520   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
521   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
522   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
523   esac
524 done
525
526 # NLS nuisances.
527 # Only set LANG and LC_ALL to C if already set.
528 # These must not be set unconditionally because not all systems understand
529 # e.g. LANG=C (notably SCO).
530 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
531 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
532
533 # confdefs.h avoids OS command line length limits that DEFS can exceed.
534 rm -rf conftest* confdefs.h
535 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
536 echo > confdefs.h
537
538 # A filename unique to this package, relative to the directory that
539 # configure is in, which we can look for to find out if srcdir is correct.
540 ac_unique_file=libfcgi/fcgiapp.c
541
542 # Find the source files, if location was not specified.
543 if test -z "$srcdir"; then
544   ac_srcdir_defaulted=yes
545   # Try the directory containing this script, then its parent.
546   ac_prog=$0
547   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
548   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
549   srcdir=$ac_confdir
550   if test ! -r $srcdir/$ac_unique_file; then
551     srcdir=..
552   fi
553 else
554   ac_srcdir_defaulted=no
555 fi
556 if test ! -r $srcdir/$ac_unique_file; then
557   if test "$ac_srcdir_defaulted" = yes; then
558     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2;
559    if test -z "$IGNORE_ERRORS"; then
560      exit 1 ;
561    fi; }
562   else
563     { echo "configure: error: can not find sources in $srcdir" 1>&2;
564    if test -z "$IGNORE_ERRORS"; then
565      exit 1 ;
566    fi; }
567   fi
568 fi
569 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
570
571 # Prefer explicitly selected file to automatically selected ones.
572 if test -z "$CONFIG_SITE"; then
573   if test "x$prefix" != xNONE; then
574     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
575   else
576     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
577   fi
578 fi
579 for ac_site_file in $CONFIG_SITE; do
580   if test -r "$ac_site_file"; then
581     echo "loading site script $ac_site_file"
582     . "$ac_site_file"
583   fi
584 done
585
586 if test -r "$cache_file"; then
587   echo "loading cache $cache_file"
588   . $cache_file
589 else
590   echo "creating cache $cache_file"
591   > $cache_file
592 fi
593
594 ac_ext=c
595 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
596 ac_cpp='$CPP $CPPFLAGS'
597 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
598 if test "`uname -s`" = "Windows_NT"; then
599   conftest_name=conftest.exe
600   ac_link='${CC-cc} -o $conftest_name $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
601 else
602   conftest_name=conftest
603   ac_link='${CC-cc} -o $conftest_name $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
604 fi
605
606 if (echo "testing\c"; echo 1,2,3) | grep c >$NULLDEVW; then
607   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
608   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >$NULLDEVW; then
609     ac_n= ac_c='
610 ' ac_t='        '
611   else
612     ac_n=-n ac_c= ac_t=
613   fi
614 else
615   ac_n= ac_c='\c' ac_t=
616 fi
617
618
619
620 #--------------------------------------------------------------------
621 #  Perform common OMI configuration. This will include:
622 #       1) Choosing compiler and associated build options.
623 #       2) Checking for various common build associated programs.
624 #       3) Determining the best build options for this platform.
625 #       4) Checking for certain common header files.
626 #       5) Checking for exports/global switch.
627 #       6) Importing OMI dependencies (header files, libraries, and binaries).
628 #       7) Checking for existence of various system libraries and routines.
629 #--------------------------------------------------------------------
630 ac_aux_dir=
631 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
632   if test -f $ac_dir/install-sh; then
633     ac_aux_dir=$ac_dir
634     ac_install_sh="$ac_aux_dir/install-sh -c"
635     break
636   elif test -f $ac_dir/install.sh; then
637     ac_aux_dir=$ac_dir
638     ac_install_sh="$ac_aux_dir/install.sh -c"
639     break
640   fi
641 done
642 if test -z "$ac_aux_dir"; then
643   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2;
644    if test -z "$IGNORE_ERRORS"; then
645      exit 1 ;
646    fi; }
647 fi
648 ac_config_guess=$ac_aux_dir/config.guess
649 ac_config_sub=$ac_aux_dir/config.sub
650 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
651
652 # If we cannot run a trivial program, we must be cross compiling.
653 echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
654 if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
655   echo $ac_n "(cached) $ac_c" 1>&6
656 else
657   if test "$cross_compiling" = yes; then
658   ac_cv_c_cross=yes
659 else
660 cat > conftest.$ac_ext <<EOF
661 #line 662 "configure"
662 #include "confdefs.h"
663 main(){return(0);}
664 EOF
665 { (eval echo configure:666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
666 if test -s $conftest_name && (./$conftest_name; exit) 2>$NULLDEVW; then
667   ac_cv_c_cross=no
668 else
669   ac_cv_c_cross=yes
670 fi
671 fi
672 rm -fr conftest*
673 fi
674
675 echo "$ac_t""$ac_cv_c_cross" 1>&6
676 cross_compiling=$ac_cv_c_cross
677
678
679
680 EXTRA_OBJS=""
681 INCLUDE_PATH=""
682 LIBS=""
683 EXPORTS_PREFIX=""
684
685
686
687
688
689
690
691 # Find a good install program.  We prefer a C program (faster),
692 # so one script is as good as another.  But avoid the broken or
693 # incompatible versions:
694 # SysV /etc/install, /usr/sbin/install
695 # SunOS /usr/etc/install
696 # IRIX /sbin/install
697 # AIX /bin/install
698 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
699 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
700 # ./install, which can be erroneously created by make from ./install.sh.
701 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
702 if test -z "$INSTALL"; then
703 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
704   echo $ac_n "(cached) $ac_c" 1>&6
705 else
706     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
707   for ac_dir in $PATH; do
708     # Account for people who put trailing slashes in PATH elements.
709     case "$ac_dir/" in
710     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
711     *)
712       # OSF1 and SCO ODT 3.0 have their own names for install.
713       for ac_prog in ginstall installbsd scoinst install; do
714         if test -f $ac_dir/$ac_prog; then
715           if test $ac_prog = install &&
716             grep dspmsg $ac_dir/$ac_prog >$NULLDEVW 2>&1; then
717             # AIX install.  It has an incompatible calling convention.
718             # OSF/1 installbsd also uses dspmsg, but is usable.
719             :
720           else
721             ac_cv_path_install="$ac_dir/$ac_prog -c"
722             break 2
723           fi
724         fi
725       done
726       ;;
727     esac
728   done
729   IFS="$ac_save_ifs"
730
731 fi
732   if test "${ac_cv_path_install+set}" = set; then
733     INSTALL="$ac_cv_path_install"
734   else
735     # As a last resort, use the slow shell script.  We don't cache a
736     # path for INSTALL within a source directory, because that will
737     # break other packages using the cache if that directory is
738     # removed, or if the path is relative.
739     INSTALL="$ac_install_sh"
740   fi
741 fi
742 if test "`uname -s`" = Windows_NT; then
743   INSTALL="copy"
744 fi
745 echo "$ac_t""$INSTALL" 1>&6
746
747 if test "`uname -s`" = Windows_NT; then
748   INSTALL_PROGRAM="copy"
749   INSTALL_DATA="copy"
750 else
751   # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
752   # It thinks the first close brace ends the variable substitution.
753   test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
754   test -z "$INSTALL_DATA" && INSTALL_DATA='$(INSTALL) -m 644'
755 fi
756
757 for ac_prog in ar
758 do
759 # Extract the first word of "$ac_prog", so it can be a program name with args.
760 set dummy $ac_prog; ac_word=$2
761 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
762 if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
763   echo $ac_n "(cached) $ac_c" 1>&6
764 else
765   case "$AR" in
766   /*)
767   ac_cv_path_AR="$AR" # Let the user override the test with a path.
768   ;;
769   *)
770   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
771   for ac_dir in $PATH; do
772     test -z "$ac_dir" && ac_dir=.
773     if test -f $ac_dir/$ac_word; then
774       ac_cv_path_AR="$ac_dir/$ac_word"
775       break
776     fi
777   done
778   IFS="$ac_save_ifs"
779   ;;
780 esac
781 fi
782 AR="$ac_cv_path_AR"
783 if test -n "$AR"; then
784   echo "$ac_t""$AR" 1>&6
785 else
786   echo "$ac_t""no" 1>&6
787 fi
788
789 test -n "$AR" && break
790 done
791
792 # Extract the first word of "ranlib", so it can be a program name with args.
793 set dummy ranlib; ac_word=$2
794 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
795 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
796   echo $ac_n "(cached) $ac_c" 1>&6
797 else
798   if test -n "$RANLIB"; then
799   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
800 else
801   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
802   for ac_dir in $PATH; do
803     test -z "$ac_dir" && ac_dir=.
804     if test -f $ac_dir/$ac_word; then
805       ac_cv_prog_RANLIB="ranlib"
806       break
807     fi
808   done
809   IFS="$ac_save_ifs"
810   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
811 fi
812 fi
813 RANLIB="$ac_cv_prog_RANLIB"
814 if test -n "$RANLIB"; then
815   echo "$ac_t""$RANLIB" 1>&6
816 else
817   echo "$ac_t""no" 1>&6
818 fi
819
820
821
822 CCDEFS=""
823
824 acaux_native_cc=""
825 acaux_ccdefs=""
826 O=o
827 L=a
828 X=""
829 SHELL=/bin/sh
830 if test -n "$CC"; then
831     echo "checking Compiler selection overridden via CC env variable '$CC'" 1>&6
832 else
833     case "`uname -sr`" in
834         HP-UX*)
835                  # look for the native HP-UX "c89" compiler
836     # Extract the first word of "c89", so it can be a program name with args.
837 set dummy c89; ac_word=$2
838 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
839 if eval "test \"`echo '$''{'ac_cv_prog_acaux_native_cc'+set}'`\" = set"; then
840   echo $ac_n "(cached) $ac_c" 1>&6
841 else
842   if test -n "$acaux_native_cc"; then
843   ac_cv_prog_acaux_native_cc="$acaux_native_cc" # Let the user override the test.
844 else
845   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
846   for ac_dir in $PATH; do
847     test -z "$ac_dir" && ac_dir=.
848     if test -f $ac_dir/$ac_word; then
849       ac_cv_prog_acaux_native_cc="c89"
850       break
851     fi
852   done
853   IFS="$ac_save_ifs"
854   test -z "$ac_cv_prog_acaux_native_cc" && ac_cv_prog_acaux_native_cc="c89"
855 fi
856 fi
857 acaux_native_cc="$ac_cv_prog_acaux_native_cc"
858 if test -n "$acaux_native_cc"; then
859   echo "$ac_t""$acaux_native_cc" 1>&6
860 else
861   echo "$ac_t""no" 1>&6
862 fi
863
864     hp_extra_flags=""
865     if test "`uname -r`" = "B.10.10"; then
866       hp_extra_flags="-D_XOPEN_SOURCE_EXTENDED"
867     fi
868     # if we found the compiler, set the flags
869     if test "$acaux_native_cc" = "c89"; then
870         acaux_ccdefs="-Wl,+n +DA1.0 +DS1.0 -lc -l:libdld.sl -Wl,-E -D_HPUX_SOURCE"
871
872         # set CPP for HP-UX here, too
873         CPP="c89 -E -D_HPUX_SOURCE"
874     fi
875
876             ;;
877         SunOS\ 5.*)     
878                 # look for the native Solaris "cc" compiler
879     # Extract the first word of "cc", so it can be a program name with args.
880 set dummy cc; ac_word=$2
881 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
882 if eval "test \"`echo '$''{'ac_cv_prog_acaux_native_cc'+set}'`\" = set"; then
883   echo $ac_n "(cached) $ac_c" 1>&6
884 else
885   if test -n "$acaux_native_cc"; then
886   ac_cv_prog_acaux_native_cc="$acaux_native_cc" # Let the user override the test.
887 else
888   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
889   for ac_dir in $PATH; do
890     test -z "$ac_dir" && ac_dir=.
891     if test -f $ac_dir/$ac_word; then
892       ac_cv_prog_acaux_native_cc="cc"
893       break
894     fi
895   done
896   IFS="$ac_save_ifs"
897   test -z "$ac_cv_prog_acaux_native_cc" && ac_cv_prog_acaux_native_cc="cc"
898 fi
899 fi
900 acaux_native_cc="$ac_cv_prog_acaux_native_cc"
901 if test -n "$acaux_native_cc"; then
902   echo "$ac_t""$acaux_native_cc" 1>&6
903 else
904   echo "$ac_t""no" 1>&6
905 fi
906
907     # if we found the compiler, make sure it's the right one
908     if test "$acaux_native_cc" = "cc"; then
909         echo $ac_n "checking if cc is a native Solaris compiler""... $ac_c" 1>&6
910         cat > conftest.c <<EOF
911 #ifdef __SVR4
912   yes
913 #endif
914 EOF
915         cc -E conftest.c > conftest.out 2>&1
916         if egrep yes conftest.out >/dev/null 2>&1; then
917             acaux_native_cc="cc"
918             echo "$ac_t""yes" 1>&6
919         else
920             echo "$ac_t""no" 1>&6
921             echo "configure: warning: 'cc' is NOT the right native Solaris compiler.
922 Make sure you have /opt/SUNWspro/SC*/bin (or a link to it) in your path." 1>&2
923         fi
924         rm -f conftest*
925
926         # check for the berkley env. shell - don't want it
927         for dir in `echo $PATH | sed -e "s/\:/ /g"`; do
928         
929             if test -x "$dir/cc"; then
930                 if egrep SUNWspro < `echo $dir/cc` > /dev/null 2>&1; then
931                     break # SUNWpro version used - OK!
932                 fi
933                 if egrep ucb < `echo $dir/cc` > /dev/null 2>&1; then
934                     echo "configure: warning: You appear to be using the Berkley 
935 compatibility shell around the compiler.  This shell includes Berkley 
936 headers ahead of the the SVR4 headers and should not be used.  Make sure 
937 your path includes /opt/SUNWspro/bin ahead of /usr/ucb." 1>&2
938                     break
939                 fi
940             fi
941         done
942     fi
943
944             ;;
945         OSF*)
946             # Extract the first word of "cc", so it can be a program name with args.
947 set dummy cc; ac_word=$2
948 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
949 if eval "test \"`echo '$''{'ac_cv_prog_acaux_native_cc'+set}'`\" = set"; then
950   echo $ac_n "(cached) $ac_c" 1>&6
951 else
952   if test -n "$acaux_native_cc"; then
953   ac_cv_prog_acaux_native_cc="$acaux_native_cc" # Let the user override the test.
954 else
955   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
956   for ac_dir in $PATH; do
957     test -z "$ac_dir" && ac_dir=.
958     if test -f $ac_dir/$ac_word; then
959       ac_cv_prog_acaux_native_cc="cc"
960       break
961     fi
962   done
963   IFS="$ac_save_ifs"
964   test -z "$ac_cv_prog_acaux_native_cc" && ac_cv_prog_acaux_native_cc="gcc"
965 fi
966 fi
967 acaux_native_cc="$ac_cv_prog_acaux_native_cc"
968 if test -n "$acaux_native_cc"; then
969   echo "$ac_t""$acaux_native_cc" 1>&6
970 else
971   echo "$ac_t""no" 1>&6
972 fi
973
974             ;;
975         AIX*)
976             # Extract the first word of "cc", so it can be a program name with args.
977 set dummy cc; ac_word=$2
978 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
979 if eval "test \"`echo '$''{'ac_cv_prog_acaux_native_cc'+set}'`\" = set"; then
980   echo $ac_n "(cached) $ac_c" 1>&6
981 else
982   if test -n "$acaux_native_cc"; then
983   ac_cv_prog_acaux_native_cc="$acaux_native_cc" # Let the user override the test.
984 else
985   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
986   for ac_dir in $PATH; do
987     test -z "$ac_dir" && ac_dir=.
988     if test -f $ac_dir/$ac_word; then
989       ac_cv_prog_acaux_native_cc="cc"
990       break
991     fi
992   done
993   IFS="$ac_save_ifs"
994   test -z "$ac_cv_prog_acaux_native_cc" && ac_cv_prog_acaux_native_cc="gcc"
995 fi
996 fi
997 acaux_native_cc="$ac_cv_prog_acaux_native_cc"
998 if test -n "$acaux_native_cc"; then
999   echo "$ac_t""$acaux_native_cc" 1>&6
1000 else
1001   echo "$ac_t""no" 1>&6
1002 fi
1003
1004             ;;
1005         BSD\/OS\ 2*)
1006             # Extract the first word of "gcc", so it can be a program name with args.
1007 set dummy gcc; ac_word=$2
1008 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1009 if eval "test \"`echo '$''{'ac_cv_prog_acaux_native_cc'+set}'`\" = set"; then
1010   echo $ac_n "(cached) $ac_c" 1>&6
1011 else
1012   if test -n "$acaux_native_cc"; then
1013   ac_cv_prog_acaux_native_cc="$acaux_native_cc" # Let the user override the test.
1014 else
1015   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1016   for ac_dir in $PATH; do
1017     test -z "$ac_dir" && ac_dir=.
1018     if test -f $ac_dir/$ac_word; then
1019       ac_cv_prog_acaux_native_cc="gcc"
1020       break
1021     fi
1022   done
1023   IFS="$ac_save_ifs"
1024   test -z "$ac_cv_prog_acaux_native_cc" && ac_cv_prog_acaux_native_cc="cc"
1025 fi
1026 fi
1027 acaux_native_cc="$ac_cv_prog_acaux_native_cc"
1028 if test -n "$acaux_native_cc"; then
1029   echo "$ac_t""$acaux_native_cc" 1>&6
1030 else
1031   echo "$ac_t""no" 1>&6
1032 fi
1033
1034             ;;
1035         Windows_NT*)
1036                  # Check for msvc V2
1037     if eval which cl | grep -i msvc2 > $NULLDEVW; then
1038       if test "$with_nodebug" = "yes"; then
1039         acaux_ccdefs="-O2 -W3"
1040       else
1041         acaux_ccdefs="-W3 -Zi -Od"
1042       fi
1043     else
1044       # msvc V4
1045       if test "$with_nodebug" = "yes"; then
1046         acaux_ccdefs="-O2 -W3"
1047       else
1048         acaux_ccdefs="-W3 -Zi -Od"
1049       fi
1050     fi
1051     # set CC and CPP
1052     #
1053     acaux_native_cc=$MKSROOT/cc.exe
1054     CPP="cc -E"
1055     O=obj
1056     L=lib
1057     X=.exe
1058     SHELL=$MKSROOT/sh.exe
1059     CONFIG_SHELL=$MKSROOT/sh.exe
1060     RANLIB=true
1061
1062             O=obj
1063             L=lib
1064             X=exe
1065             ;;
1066     esac
1067     # if native compiler, set CC, else use GCC
1068     if test -n "$acaux_native_cc"; then
1069         CC="$acaux_native_cc $acaux_ccdefs"
1070     else
1071         # Extract the first word of "gcc", so it can be a program name with args.
1072 set dummy gcc; ac_word=$2
1073 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1074 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1075   echo $ac_n "(cached) $ac_c" 1>&6
1076 else
1077   if test -n "$CC"; then
1078   ac_cv_prog_CC="$CC" # Let the user override the test.
1079 else
1080   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1081   for ac_dir in $PATH; do
1082     test -z "$ac_dir" && ac_dir=.
1083     if test -f $ac_dir/$ac_word; then
1084       ac_cv_prog_CC="gcc"
1085       break
1086     fi
1087   done
1088   IFS="$ac_save_ifs"
1089 fi
1090 fi
1091 CC="$ac_cv_prog_CC"
1092 if test -n "$CC"; then
1093   echo "$ac_t""$CC" 1>&6
1094 else
1095   echo "$ac_t""no" 1>&6
1096 fi
1097
1098 if test -z "$CC"; then
1099   if test "`uname -s`" = "Windows_NT"; then
1100     CC=$MKSROOT/cc.exe
1101   else 
1102     # Extract the first word of "cc", so it can be a program name with args.
1103 set dummy cc; ac_word=$2
1104 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1105 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1106   echo $ac_n "(cached) $ac_c" 1>&6
1107 else
1108   if test -n "$CC"; then
1109   ac_cv_prog_CC="$CC" # Let the user override the test.
1110 else
1111   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1112   ac_prog_rejected=no
1113   for ac_dir in $PATH; do
1114     test -z "$ac_dir" && ac_dir=.
1115     if test -f $ac_dir/$ac_word; then
1116       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1117         ac_prog_rejected=yes
1118         continue
1119       fi
1120       ac_cv_prog_CC="cc"
1121       break
1122     fi
1123   done
1124   IFS="$ac_save_ifs"
1125 if test $ac_prog_rejected = yes; then
1126   # We found a bogon in the path, so make sure we never use it.
1127   set dummy $ac_cv_prog_CC
1128   shift
1129   if test $# -gt 0; then
1130     # We chose a different compiler from the bogus one.
1131     # However, it has the same basename, so the bogon will be chosen
1132     # first if we set CC to just the basename; use the full file name.
1133     shift
1134     set dummy "$ac_dir/$ac_word" "$@"
1135     shift
1136     ac_cv_prog_CC="$@"
1137   fi
1138 fi
1139 fi
1140 fi
1141 CC="$ac_cv_prog_CC"
1142 if test -n "$CC"; then
1143   echo "$ac_t""$CC" 1>&6
1144 else
1145   echo "$ac_t""no" 1>&6
1146 fi
1147
1148     test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2;
1149    if test -z "$IGNORE_ERRORS"; then
1150      exit 1 ;
1151    fi; }
1152   fi
1153 fi
1154
1155 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1156 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1157   echo $ac_n "(cached) $ac_c" 1>&6
1158 else
1159   cat > conftest.c <<EOF
1160 #ifdef __GNUC__
1161   yes;
1162 #endif
1163 EOF
1164 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >$NULLDEVW 2>&1; then
1165   ac_cv_prog_gcc=yes
1166 else
1167   ac_cv_prog_gcc=no
1168 fi
1169 fi
1170
1171 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1172 if test $ac_cv_prog_gcc = yes; then
1173   GCC=yes
1174   if test "${CFLAGS+set}" != set; then
1175     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1176 if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
1177   echo $ac_n "(cached) $ac_c" 1>&6
1178 else
1179   echo 'void f(){}' > conftest.c
1180 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1181   ac_cv_prog_gcc_g=yes
1182 else
1183   ac_cv_prog_gcc_g=no
1184 fi
1185 rm -f conftest*
1186
1187 fi
1188
1189 echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
1190     if test $ac_cv_prog_gcc_g = yes; then
1191       CFLAGS="-g -O"
1192     else
1193       CFLAGS="-O"
1194     fi
1195   fi
1196 else
1197   GCC=
1198   test "${CFLAGS+set}" = set || CFLAGS="-g"
1199 fi
1200
1201     fi
1202 fi
1203 if test -z "$CPP"; then
1204   echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1205 # On Suns, sometimes $CPP names a directory.
1206 if test -n "$CPP" && test -d "$CPP"; then
1207   CPP=
1208 fi
1209 if test -z "$CPP"; then
1210 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1211   echo $ac_n "(cached) $ac_c" 1>&6
1212 else
1213     # This must be in double quotes, not single quotes, because CPP may get
1214   # substituted into the Makefile and "${CC-cc}" will confuse make.
1215   CPP="${CC-cc} -E"
1216   # On the NeXT, cc -E runs the code through the compiler's parser,
1217   # not just through cpp.
1218   cat > conftest.$ac_ext <<EOF
1219 #line 1220 "configure"
1220 #include "confdefs.h"
1221 #include <assert.h>
1222 Syntax Error
1223 EOF
1224 ac_try="$ac_cpp conftest.$ac_ext >$NULLDEVW 2>conftest.out"
1225 { (eval echo configure:1226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1226 if test "`uname -s`" = "Windows_NT"; then
1227   ac_err=`egrep '^.*error' conftest.out`
1228 else
1229   ac_err=`grep -v '^ *+' conftest.out`
1230 fi
1231 if test -z "$ac_err"; then
1232   :
1233 else
1234   echo "$ac_err" >&5
1235   rm -rf conftest*
1236   CPP="${CC-cc} -E -traditional-cpp"
1237   cat > conftest.$ac_ext <<EOF
1238 #line 1239 "configure"
1239 #include "confdefs.h"
1240 #include <assert.h>
1241 Syntax Error
1242 EOF
1243 ac_try="$ac_cpp conftest.$ac_ext >$NULLDEVW 2>conftest.out"
1244 { (eval echo configure:1245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1245 if test "`uname -s`" = "Windows_NT"; then
1246   ac_err=`egrep '^.*error' conftest.out`
1247 else
1248   ac_err=`grep -v '^ *+' conftest.out`
1249 fi
1250 if test -z "$ac_err"; then
1251   :
1252 else
1253   echo "$ac_err" >&5
1254   rm -rf conftest*
1255   CPP=/lib/cpp
1256 fi
1257 rm -f conftest*
1258 fi
1259 rm -f conftest*
1260   ac_cv_prog_CPP="$CPP"
1261 fi
1262   CPP="$ac_cv_prog_CPP"
1263 else
1264   ac_cv_prog_CPP="$CPP"
1265 fi
1266 echo "$ac_t""$CPP" 1>&6
1267
1268 fi
1269
1270
1271
1272
1273
1274
1275 CCNOP=$CC
1276
1277 echo $ac_n "checking for AIX""... $ac_c" 1>&6
1278 cat > conftest.$ac_ext <<EOF
1279 #line 1280 "configure"
1280 #include "confdefs.h"
1281 #ifdef _AIX
1282   yes
1283 #endif
1284
1285 EOF
1286 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1287   egrep "yes" >$NULLDEVW 2>&1; then
1288   rm -rf conftest*
1289   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
1290 #define _ALL_SOURCE 1
1291 EOF
1292
1293 else
1294   rm -rf conftest*
1295   echo "$ac_t""no" 1>&6
1296 fi
1297 rm -f conftest*
1298
1299
1300
1301 #--------------------------------------------------------------------
1302 #  Determine the best warning options for this platform
1303 #--------------------------------------------------------------------
1304 if test "$CC" = "gcc " -o "$CC" = "gcc"; then
1305     WARNDEFS="-ansi -pedantic -Wall -Wmissing-prototypes"
1306 else
1307     if test -f /bin/uname && test `/bin/uname` = OSF1; then
1308         WARNDEFS="-std1 -warnprotos"
1309     fi
1310 fi
1311 CCDEFS="$CCDEFS $WARNDEFS"
1312
1313 echo $ac_n "checking for working const""... $ac_c" 1>&6
1314 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1315   echo $ac_n "(cached) $ac_c" 1>&6
1316 else
1317   cat > conftest.$ac_ext <<EOF
1318 #line 1319 "configure"
1319 #include "confdefs.h"
1320
1321 int main() { return 0; }
1322 int t() {
1323
1324 /* Ultrix mips cc rejects this.  */
1325 typedef int charset[2]; const charset x;
1326 /* SunOS 4.1.1 cc rejects this.  */
1327 char const *const *ccp;
1328 char **p;
1329 /* NEC SVR4.0.2 mips cc rejects this.  */
1330 struct point {int x, y;};
1331 static struct point const zero = {0,0};
1332 /* AIX XL C 1.02.0.0 rejects this.
1333    It does not let you subtract one const X* pointer from another in an arm
1334    of an if-expression whose if-part is not a constant expression */
1335 const char *g = "string";
1336 ccp = &g + (g ? g-g : 0);
1337 /* HPUX 7.0 cc rejects these. */
1338 ++ccp;
1339 p = (char**) ccp;
1340 ccp = (char const *const *) p;
1341 { /* SCO 3.2v4 cc rejects this.  */
1342   char *t;
1343   char const *s = 0 ? (char *) 0 : (char const *) 0;
1344
1345   *t++ = 0;
1346 }
1347 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1348   int x[] = {25, 17};
1349   const int *foo = &x[0];
1350   ++foo;
1351 }
1352 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1353   typedef const int *iptr;
1354   iptr p = 0;
1355   ++p;
1356 }
1357 { /* AIX XL C 1.02.0.0 rejects this saying
1358      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1359   struct s { int j; const int *ap[3]; };
1360   struct s *b; b->j = 5;
1361 }
1362 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1363   const int foo = 10;
1364 }
1365
1366 ; return 0; }
1367 EOF
1368 if { (eval echo configure:1369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1369   rm -rf conftest*
1370   ac_cv_c_const=yes
1371 else
1372   rm -rf conftest*
1373   ac_cv_c_const=no
1374 fi
1375 rm -f conftest*
1376
1377 fi
1378
1379 echo "$ac_t""$ac_cv_c_const" 1>&6
1380 if test $ac_cv_c_const = no; then
1381   cat >> confdefs.h <<\EOF
1382 #define const 
1383 EOF
1384
1385 fi
1386
1387
1388 echo $ac_n "checking size of unsigned int""... $ac_c" 1>&6
1389 if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_int'+set}'`\" = set"; then
1390   echo $ac_n "(cached) $ac_c" 1>&6
1391 else
1392   if test "$cross_compiling" = yes; then
1393   :
1394 else
1395 cat > conftest.$ac_ext <<EOF
1396 #line 1397 "configure"
1397 #include "confdefs.h"
1398 #include <stdio.h>
1399 main()
1400 {
1401   FILE *f=fopen("conftestval", "w");
1402   if (!f) exit(1);
1403   fprintf(f, "%d\n", sizeof(unsigned int));
1404   exit(0);
1405 }
1406 EOF
1407 { (eval echo configure:1408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1408 if test -s $conftest_name && (./$conftest_name; exit) 2>$NULLDEVW; then
1409   ac_cv_sizeof_unsigned_int=`cat conftestval`
1410 else
1411   ac_cv_sizeof_unsigned_int=0
1412 fi
1413 fi
1414 rm -fr conftest*
1415 fi
1416 echo "$ac_t""$ac_cv_sizeof_unsigned_int" 1>&6
1417 cat >> confdefs.h <<EOF
1418 #define SIZEOF_UNSIGNED_INT $ac_cv_sizeof_unsigned_int
1419 EOF
1420
1421
1422 echo $ac_n "checking size of unsigned short""... $ac_c" 1>&6
1423 if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_short'+set}'`\" = set"; then
1424   echo $ac_n "(cached) $ac_c" 1>&6
1425 else
1426   if test "$cross_compiling" = yes; then
1427   :
1428 else
1429 cat > conftest.$ac_ext <<EOF
1430 #line 1431 "configure"
1431 #include "confdefs.h"
1432 #include <stdio.h>
1433 main()
1434 {
1435   FILE *f=fopen("conftestval", "w");
1436   if (!f) exit(1);
1437   fprintf(f, "%d\n", sizeof(unsigned short));
1438   exit(0);
1439 }
1440 EOF
1441 { (eval echo configure:1442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1442 if test -s $conftest_name && (./$conftest_name; exit) 2>$NULLDEVW; then
1443   ac_cv_sizeof_unsigned_short=`cat conftestval`
1444 else
1445   ac_cv_sizeof_unsigned_short=0
1446 fi
1447 fi
1448 rm -fr conftest*
1449 fi
1450 echo "$ac_t""$ac_cv_sizeof_unsigned_short" 1>&6
1451 cat >> confdefs.h <<EOF
1452 #define SIZEOF_UNSIGNED_SHORT $ac_cv_sizeof_unsigned_short
1453 EOF
1454
1455
1456 echo $ac_n "checking size of unsigned long""... $ac_c" 1>&6
1457 if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long'+set}'`\" = set"; then
1458   echo $ac_n "(cached) $ac_c" 1>&6
1459 else
1460   if test "$cross_compiling" = yes; then
1461   :
1462 else
1463 cat > conftest.$ac_ext <<EOF
1464 #line 1465 "configure"
1465 #include "confdefs.h"
1466 #include <stdio.h>
1467 main()
1468 {
1469   FILE *f=fopen("conftestval", "w");
1470   if (!f) exit(1);
1471   fprintf(f, "%d\n", sizeof(unsigned long));
1472   exit(0);
1473 }
1474 EOF
1475 { (eval echo configure:1476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1476 if test -s $conftest_name && (./$conftest_name; exit) 2>$NULLDEVW; then
1477   ac_cv_sizeof_unsigned_long=`cat conftestval`
1478 else
1479   ac_cv_sizeof_unsigned_long=0
1480 fi
1481 fi
1482 rm -fr conftest*
1483 fi
1484 echo "$ac_t""$ac_cv_sizeof_unsigned_long" 1>&6
1485 cat >> confdefs.h <<EOF
1486 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
1487 EOF
1488
1489
1490 echo $ac_n "checking size of int""... $ac_c" 1>&6
1491 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1492   echo $ac_n "(cached) $ac_c" 1>&6
1493 else
1494   if test "$cross_compiling" = yes; then
1495   :
1496 else
1497 cat > conftest.$ac_ext <<EOF
1498 #line 1499 "configure"
1499 #include "confdefs.h"
1500 #include <stdio.h>
1501 main()
1502 {
1503   FILE *f=fopen("conftestval", "w");
1504   if (!f) exit(1);
1505   fprintf(f, "%d\n", sizeof(int));
1506   exit(0);
1507 }
1508 EOF
1509 { (eval echo configure:1510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1510 if test -s $conftest_name && (./$conftest_name; exit) 2>$NULLDEVW; then
1511   ac_cv_sizeof_int=`cat conftestval`
1512 else
1513   ac_cv_sizeof_int=0
1514 fi
1515 fi
1516 rm -fr conftest*
1517 fi
1518 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1519 cat >> confdefs.h <<EOF
1520 #define SIZEOF_INT $ac_cv_sizeof_int
1521 EOF
1522
1523
1524 echo $ac_n "checking size of long""... $ac_c" 1>&6
1525 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1526   echo $ac_n "(cached) $ac_c" 1>&6
1527 else
1528   if test "$cross_compiling" = yes; then
1529   :
1530 else
1531 cat > conftest.$ac_ext <<EOF
1532 #line 1533 "configure"
1533 #include "confdefs.h"
1534 #include <stdio.h>
1535 main()
1536 {
1537   FILE *f=fopen("conftestval", "w");
1538   if (!f) exit(1);
1539   fprintf(f, "%d\n", sizeof(long));
1540   exit(0);
1541 }
1542 EOF
1543 { (eval echo configure:1544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1544 if test -s $conftest_name && (./$conftest_name; exit) 2>$NULLDEVW; then
1545   ac_cv_sizeof_long=`cat conftestval`
1546 else
1547   ac_cv_sizeof_long=0
1548 fi
1549 fi
1550 rm -fr conftest*
1551 fi
1552 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1553 cat >> confdefs.h <<EOF
1554 #define SIZEOF_LONG $ac_cv_sizeof_long
1555 EOF
1556
1557
1558 echo $ac_n "checking size of size_t""... $ac_c" 1>&6
1559 if eval "test \"`echo '$''{'ac_cv_sizeof_size_t'+set}'`\" = set"; then
1560   echo $ac_n "(cached) $ac_c" 1>&6
1561 else
1562   if test "$cross_compiling" = yes; then
1563   :
1564 else
1565 cat > conftest.$ac_ext <<EOF
1566 #line 1567 "configure"
1567 #include "confdefs.h"
1568 #include <stdio.h>
1569 main()
1570 {
1571   FILE *f=fopen("conftestval", "w");
1572   if (!f) exit(1);
1573   fprintf(f, "%d\n", sizeof(size_t));
1574   exit(0);
1575 }
1576 EOF
1577 { (eval echo configure:1578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1578 if test -s $conftest_name && (./$conftest_name; exit) 2>$NULLDEVW; then
1579   ac_cv_sizeof_size_t=`cat conftestval`
1580 else
1581   ac_cv_sizeof_size_t=0
1582 fi
1583 fi
1584 rm -fr conftest*
1585 fi
1586 echo "$ac_t""$ac_cv_sizeof_size_t" 1>&6
1587 cat >> confdefs.h <<EOF
1588 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
1589 EOF
1590
1591
1592 cat > conftest.$ac_ext <<EOF
1593 #line 1594 "configure"
1594 #include "confdefs.h"
1595 #include <sys/types.h>
1596 EOF
1597 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1598   egrep "ssize_t" >$NULLDEVW 2>&1; then
1599   :
1600 else
1601   rm -rf conftest*
1602   cat >> confdefs.h <<\EOF
1603 #define ssize_t int
1604 EOF
1605
1606 fi
1607 rm -f conftest*
1608
1609 echo $ac_n "checking size of off_t""... $ac_c" 1>&6
1610 if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
1611   echo $ac_n "(cached) $ac_c" 1>&6
1612 else
1613   if test "$cross_compiling" = yes; then
1614   :
1615 else
1616 cat > conftest.$ac_ext <<EOF
1617 #line 1618 "configure"
1618 #include "confdefs.h"
1619 #include <stdio.h>
1620 main()
1621 {
1622   FILE *f=fopen("conftestval", "w");
1623   if (!f) exit(1);
1624   fprintf(f, "%d\n", sizeof(off_t));
1625   exit(0);
1626 }
1627 EOF
1628 { (eval echo configure:1629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1629 if test -s $conftest_name && (./$conftest_name; exit) 2>$NULLDEVW; then
1630   ac_cv_sizeof_off_t=`cat conftestval`
1631 else
1632   ac_cv_sizeof_off_t=0
1633 fi
1634 fi
1635 rm -fr conftest*
1636 fi
1637 echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
1638 cat >> confdefs.h <<EOF
1639 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
1640 EOF
1641
1642
1643
1644
1645 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1646 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1647   echo $ac_n "(cached) $ac_c" 1>&6
1648 else
1649   cat > conftest.$ac_ext <<EOF
1650 #line 1651 "configure"
1651 #include "confdefs.h"
1652 #include <stdlib.h>
1653 #include <stdarg.h>
1654 #include <string.h>
1655 #include <float.h>
1656 EOF
1657 ac_try="$ac_cpp conftest.$ac_ext >$NULLDEVW 2>conftest.out"
1658 { (eval echo configure:1659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1659 if test "`uname -s`" = "Windows_NT"; then
1660   ac_err=`egrep '^.*error' conftest.out`
1661 else
1662   ac_err=`grep -v '^ *+' conftest.out`
1663 fi
1664 if test -z "$ac_err"; then
1665   rm -rf conftest*
1666   ac_cv_header_stdc=yes
1667 else
1668   echo "$ac_err" >&5
1669   rm -rf conftest*
1670   ac_cv_header_stdc=no
1671 fi
1672 rm -f conftest*
1673
1674 if test $ac_cv_header_stdc = yes; then
1675   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1676 cat > conftest.$ac_ext <<EOF
1677 #line 1678 "configure"
1678 #include "confdefs.h"
1679 #include <string.h>
1680 EOF
1681 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1682   egrep "memchr" >$NULLDEVW 2>&1; then
1683   :
1684 else
1685   rm -rf conftest*
1686   ac_cv_header_stdc=no
1687 fi
1688 rm -f conftest*
1689
1690 fi
1691
1692 if test $ac_cv_header_stdc = yes; then
1693   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1694 cat > conftest.$ac_ext <<EOF
1695 #line 1696 "configure"
1696 #include "confdefs.h"
1697 #include <stdlib.h>
1698 EOF
1699 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1700   egrep "free" >$NULLDEVW 2>&1; then
1701   :
1702 else
1703   rm -rf conftest*
1704   ac_cv_header_stdc=no
1705 fi
1706 rm -f conftest*
1707
1708 fi
1709
1710 if test $ac_cv_header_stdc = yes; then
1711   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1712 if test "$cross_compiling" = yes; then
1713   :
1714 else
1715 cat > conftest.$ac_ext <<EOF
1716 #line 1717 "configure"
1717 #include "confdefs.h"
1718 #include <ctype.h>
1719 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1720 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1721 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1722 int main () { int i; for (i = 0; i < 256; i++)
1723 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1724 exit (0); }
1725
1726 EOF
1727 { (eval echo configure:1728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1728 if test -s $conftest_name && (./$conftest_name; exit) 2>$NULLDEVW; then
1729   :
1730 else
1731   ac_cv_header_stdc=no
1732 fi
1733 fi
1734 rm -fr conftest*
1735 fi
1736 fi
1737
1738 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1739 if test $ac_cv_header_stdc = yes; then
1740   cat >> confdefs.h <<\EOF
1741 #define STDC_HEADERS 1
1742 EOF
1743
1744 fi
1745
1746 for ac_hdr in limits.h unistd.h
1747 do
1748 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1749 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1750 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1751   echo $ac_n "(cached) $ac_c" 1>&6
1752 else
1753   cat > conftest.$ac_ext <<EOF
1754 #line 1755 "configure"
1755 #include "confdefs.h"
1756 #include <$ac_hdr>
1757 EOF
1758 ac_try="$ac_cpp conftest.$ac_ext >$NULLDEVW 2>conftest.out"
1759 { (eval echo configure:1760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1760 if test "`uname -s`" = "Windows_NT"; then
1761   ac_err=`egrep '^.*error' conftest.out`
1762 else
1763   ac_err=`grep -v '^ *+' conftest.out`
1764 fi
1765 if test -z "$ac_err"; then
1766   rm -rf conftest*
1767   eval "ac_cv_header_$ac_safe=yes"
1768 else
1769   echo "$ac_err" >&5
1770   rm -rf conftest*
1771   eval "ac_cv_header_$ac_safe=no"
1772 fi
1773 rm -f conftest*
1774 fi
1775 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1776   echo "$ac_t""yes" 1>&6
1777     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1778   cat >> confdefs.h <<EOF
1779 #define $ac_tr_hdr 1
1780 EOF
1781  
1782 else
1783   echo "$ac_t""no" 1>&6
1784 fi
1785 done
1786
1787
1788 # Check whether --with-global or --without-global was given.
1789 if test "${with_global+set}" = set; then
1790   withval="$with_global"
1791   with_export=$withval
1792     cat >> confdefs.h <<\EOF
1793 #define WITH_EXPORT 1
1794 EOF
1795
1796     cat >> confdefs.h <<\EOF
1797 #define WITH_GLOBAL 1
1798 EOF
1799
1800 else
1801   if test -z "$with_export"; then
1802        with_export=no
1803      fi
1804
1805 fi
1806
1807 # Check whether --with-domestic or --without-domestic was given.
1808 if test "${with_domestic+set}" = set; then
1809   withval="$with_domestic"
1810   with_domestic=$withval
1811     cat >> confdefs.h <<\EOF
1812 #define WITH_DOMESTIC 1
1813 EOF
1814
1815 else
1816   if test -z "$with_export"; then
1817        with_export=no
1818      fi
1819
1820 fi
1821
1822
1823
1824 #--------------------------------------------------------------------
1825 #  Run with Purify?  PureCoverage?  Quantify?
1826 #--------------------------------------------------------------------
1827 # Check whether --with-purify or --without-purify was given.
1828 if test "${with_purify+set}" = set; then
1829   withval="$with_purify"
1830   with_purify=$withval
1831 else
1832   with_purify=no
1833
1834 fi
1835
1836 if test "$with_purify" = "yes" ; then
1837     CC="purify $CC"
1838 fi
1839
1840 # Check whether --with-purecov or --without-purecov was given.
1841 if test "${with_purecov+set}" = set; then
1842   withval="$with_purecov"
1843   with_purecov=$withval
1844 else
1845   with_purecov=no
1846
1847 fi
1848
1849 if test "$with_purecov" = "yes" ; then
1850     CC="purecov $CC"
1851 fi
1852 # Check whether --with-quantify or --without-quantify was given.
1853 if test "${with_quantify+set}" = set; then
1854   withval="$with_quantify"
1855   with_quantify=$withval
1856 else
1857   with_quantify=no
1858
1859 fi
1860
1861 if test "$with_quantify" = "yes" ; then
1862     CC="quantify $CC"
1863 fi
1864
1865
1866
1867
1868 # Check whether --with-profile or --without-profile was given.
1869 if test "${with_profile+set}" = set; then
1870   withval="$with_profile"
1871   with_profile=$withval
1872 else
1873   with_profile=no
1874
1875 fi
1876
1877 if test "$with_profile" = "yes" ; then
1878     PROFILE="-pg"
1879 else
1880     PROFILE=""
1881 fi
1882
1883
1884
1885 #--------------------------------------------------------------------
1886 #  Build optimized, production version with no debugging code?  No
1887 #  asserts?  No testing code?
1888 #--------------------------------------------------------------------
1889 # Check whether --with-nodebug or --without-nodebug was given.
1890 if test "${with_nodebug+set}" = set; then
1891   withval="$with_nodebug"
1892   with_nodebug=$withval
1893 else
1894   with_nodebug=no
1895
1896 fi
1897
1898 if test "$with_nodebug" = "yes" ; then
1899     CCDEFS="$CCDEFS -O"
1900 else
1901     cat >> confdefs.h <<\EOF
1902 #define WITH_DEBUG 1
1903 EOF
1904
1905     CCDEFS="$CCDEFS -g"
1906 fi
1907 # Check whether --with-noassert or --without-noassert was given.
1908 if test "${with_noassert+set}" = set; then
1909   withval="$with_noassert"
1910   with_noassert=$withval
1911 else
1912   with_noassert=no
1913
1914 fi
1915
1916 if test "$with_noassert" = "no" ; then
1917     cat >> confdefs.h <<\EOF
1918 #define WITH_ASSERT 1
1919 EOF
1920
1921 fi
1922 # Check whether --with-notest or --without-notest was given.
1923 if test "${with_notest+set}" = set; then
1924   withval="$with_notest"
1925   with_notest=$withval
1926 else
1927   with_notest=no
1928
1929 fi
1930
1931 if test "$with_notest" = "no" ; then
1932     cat >> confdefs.h <<\EOF
1933 #define WITH_TEST 1
1934 EOF
1935
1936 fi
1937
1938 # Make sure that they didn't specify with-domestic and with-global
1939 if test "$with_export" = "yes" -a "$with_domestic" = "yes"; then
1940   { echo "configure: error: --with-domestic and --with-global are mutually exclusive" 1>&2;
1941    if test -z "$IGNORE_ERRORS"; then
1942      exit 1 ;
1943    fi; }
1944   exit 1
1945 fi
1946
1947
1948 #--------------
1949 # Open Market Dependencies
1950 #
1951 # define the platform that is being built
1952 #
1953
1954 # Old style platform name.
1955 #
1956 legacy_platform=`uname -s`-`uname -m`-`uname -r`
1957 legacy_platform=`echo "$legacy_platform" | tr / -`
1958 #
1959 # Generate the canonical form of the platform name
1960 #
1961 platform=`uname -s`-`uname -r`
1962 platform=`echo "$platform" | tr / -`
1963 platform=`echo "$platform" | tr '[A-Z]' '[a-z]'`
1964 platform_class=UNIX
1965
1966 case $platform in
1967   aix*)                 platform=aix_414;;
1968   bsd-386-1*)           platform=bsdi_11;;
1969   bsd-os-2*)            platform=bsdi_20;;
1970   hp-ux-b.10.10)        platform=hpux_1010;;
1971   hp-ux-b.10*)          platform=hpux_10;;
1972   hp-ux-a.09*)          platform=hpux_905;;
1973   irix-5*)              platform=sgi_53;;
1974   irix-6*)              platform=sgi_62;;
1975   osf1-v3.0)            platform=osf_30;;
1976   osf1-v3.2)            platform=osf_32;;
1977   osf1-v4.0)            platform=osf_40;;
1978   sunos-5.4)            platform=sun_54;;
1979   sunos-5.5*)           platform=sun_55;;
1980   sunos-4.1.4)          platform=sun_414;;
1981   linux*)               platform=lin_128;;
1982   nonstop*)             platform=tan_40;;
1983   unix_system_v*)
1984     stratus_name=`uname -a`
1985     ftx_version=`echo "$stratus_name" | cut -f5 -d' '`
1986     case $ftx_version in
1987       3.0*)             platform=ftx_30;;
1988       3.1*)             platform=ftx_31;;
1989     esac;;
1990   sco*)                 platform=sco_32;;
1991   windows_95-4)
1992     platform=win_40
1993     platform_class=WINDOWS
1994   ;;
1995   windows_nt-3)
1996     platform=wnt_351
1997     platform_class=WINDOWS
1998   ;;
1999   windows_nt-4)
2000     platform=wnt_40
2001     platform_class=WINDOWS
2002   ;;
2003 esac
2004
2005 PLATFORM=$platform
2006
2007 PLATFORM_CLASS=$platform_class
2008
2009
2010 #
2011 # Pick up any OMI specific switches
2012 #
2013 # Check whether --with-omireleases or --without-omireleases was given.
2014 if test "${with_omireleases+set}" = set; then
2015   withval="$with_omireleases"
2016   with_releases="yes"
2017 else
2018   with_releases="no"
2019 fi
2020
2021
2022 # Start of version declaration
2023 #
2024 SUBSYSTEM=FastCGI
2025
2026 VERSION=T2.0.a
2027
2028 if test -n "a"; then
2029   CVS_TAG=T2_0_a_NT
2030   DOT_CVS_TAG=T2.0.a.NT
2031 else
2032   echo "Warning: Patch tag missing from version.in"
2033   CVS_TAG=T2_0_NT
2034   DOT_CVS_TAG=T2.0.NT
2035 fi
2036
2037
2038 if test "$with_export" = "yes"; then
2039   export_class="-- GLOBAL version"
2040 else
2041   export_class="-- DOMESTIC version"
2042 fi
2043 #
2044 echo "--------------------------------------------------------------------------"
2045 echo Configuring $SUBSYSTEM version $VERSION, cvs tag is: $CVS_TAG $export_class
2046 echo "Canonical system name is $platform"
2047 if test -z "$with_purify"; then
2048   with_purify="no"
2049 fi
2050 echo "CC = $CC, CFLAGS = $acaux_ccdefs"
2051 echo "omi_releases = $with_releases, purify = $with_purify"
2052 if test -z "$with_purecov"; then
2053   with_purecov="no"
2054 fi
2055 if test -z "$with_quantify"; then
2056   with_quantify="no"
2057 fi
2058 if test -z "$with_profile"; then
2059   with_profile="no"
2060 fi
2061 echo "purecov = $with_purecov, quantify = $with_quantify, profile = $with_profile"
2062 if test -z "$with_nodebug"; then
2063   with_nodebug="no"
2064 fi
2065 if test -z "$with_noassert"; then
2066   with_noassert="no"
2067 fi
2068 if test -z "$with_notest"; then
2069   with_notest="no"
2070 fi
2071 echo "nodebug = $with_nodebug, noassert = $with_noassert, notest = $with_notest"
2072 echo "Built on `uname -n`, OS-type: `uname -s`, version `uname -r`"
2073 version=`echo Revision: 1.15  | cut -f 2 -d' '`
2074 echo "Autoconf version 2.9, OMI extensions version: $version"
2075 echo "--------------------------------------------------------------------------"
2076 #
2077 # Create version.conf
2078 #
2079 echo "Creating version.conf"
2080 cat <<EOF > version.conf
2081 #
2082 # version.conf for $SUBSYSTEM. 
2083 #
2084 # This file is machine generated.
2085 # Do not edit this file.
2086 #
2087 # generated on `date`
2088 #
2089 set Release $DOT_CVS_TAG
2090 set Platform $PLATFORM
2091 set ProductName $SUBSYSTEM
2092 EOF
2093 if test ! -z "$DOT_MIN_RELEASE"; then
2094   cat <<EOF >> version.conf
2095 set MinRelease $DOT_MIN_RELEASE
2096 EOF
2097 fi
2098 if test ! -z "$REQUIRED_PAKS"; then
2099   cat <<EOF >>version.conf
2100 set RequiredPaks {$REQUIRED_PAKS}
2101 EOF
2102 fi
2103 # End of version declaration
2104
2105
2106
2107 if test "$with_releases" = "yes"; then
2108   if test "`uname -s`" = Windows_NT; then
2109     echo "Setting up EXPORTS_ROOT for wnt"
2110     EXPORTS_ROOT=\\omi\\exports
2111     if test "$with_export" = "yes"; then
2112       EXPORTS_PREFIX=$EXPORTS_ROOT\\$SUBSYSTEM\\$VERSION/${platform}.global
2113     else
2114       if test "$export_restricted" = "yes"; then
2115         EXPORTS_PREFIX=$EXPORTS_ROOT\\$SUBSYSTEM\\$VERSION\\${platform}.domestic
2116       else
2117         EXPORTS_PREFIX=$EXPORTS_ROOT\\$SUBSYSTEM\\$VERSION\\$platform
2118       fi
2119     fi
2120     EXPORTS_COMMON=$EXPORTS_ROOT\\$SUBSYSTEM\\$VERSION\\common
2121   else 
2122     EXPORTS_ROOT=/omi/exports
2123     if test "$with_export" = "yes"; then
2124       EXPORTS_PREFIX=$EXPORTS_ROOT/$SUBSYSTEM/$VERSION/${platform}.global
2125     else
2126       if test "$export_restricted" = "yes"; then
2127         EXPORTS_PREFIX=$EXPORTS_ROOT/$SUBSYSTEM/$VERSION/${platform}.domestic
2128       else
2129         EXPORTS_PREFIX=$EXPORTS_ROOT/$SUBSYSTEM/$VERSION/$platform
2130       fi
2131     fi
2132     EXPORTS_COMMON=$EXPORTS_ROOT/$SUBSYSTEM/$VERSION/common
2133   fi
2134 else
2135   EXPORTS_ROOT=/usr/local
2136   EXPORTS_PREFIX=$EXPORTS_ROOT
2137   EXPORTS_COMMON=$EXPORTS_ROOT
2138 fi
2139
2140 prefix=$EXPORTS_PREFIX
2141 exec_prefix=$EXPORTS_PREFIX
2142 common_prefix=$EXPORTS_COMMON
2143
2144
2145
2146
2147
2148
2149
2150 #---------------
2151
2152 #------------------------
2153 #
2154 # Start of dependencies.in
2155 #
2156
2157 #
2158 # OMI provided dependencies
2159 #
2160
2161 #
2162 # Depends on Tcl, Version: V7.4
2163 #
2164 if test "$with_releases" = "yes"; then
2165   platform_root=$EXPORTS_ROOT/Tcl/V7.4/$platform
2166   legacy_platform_root=$EXPORTS_ROOT/Tcl/V7.4/$legacy_platform
2167   TCLLIB_DIR=$platform_root/lib
2168   TCLINC_DIR=$EXPORTS_ROOT/Tcl/V7.4/common/include
2169   TCLCOMMON_DIR=$EXPORTS_ROOT/Tcl/V7.4/common
2170   TCLBIN_DIR=$platform_root/bin
2171   #
2172   # If the file doesn't exist in the new name space, fall back to
2173   # the legacy name.
2174   #
2175   if test ! -r $TCLLIB_DIR/libtcl.$L -a \
2176           ! -r $TCLLIB_DIR/Tcl.$L; then
2177     echo "  libtcl.$L or Tcl.$L not found in $TCLLIB_DIR" > PATH_ERR
2178     TCLLIB_DIR=$legacy_platform_root/lib
2179     TCLBIN_DIR=$legacy_platform_root/bin
2180     platform_root=$legacy_platform_root
2181   fi
2182 else
2183   platform_root=$EXPORTS_ROOT
2184   TCLLIB_DIR=$platform_root/lib
2185   TCLINC_DIR=$EXPORTS_ROOT/include
2186   TCLCOMMON_DIR=$EXPORTS_ROOT
2187   TCLBIN_DIR=$platform_root/bin
2188 fi
2189
2190
2191
2192
2193
2194
2195 echo $ac_n "checking for Tcl library""... $ac_c" 1>&6
2196 if eval "test \"`echo '$''{'ac_cv_lib_Tcl'+set}'`\" = set"; then
2197   echo $ac_n "(cached) $ac_c" 1>&6
2198 else
2199   
2200 if test "$with_export" = "yes"; then
2201   
2202 #
2203 # Declare a dependency
2204 #
2205 if test "$with_releases" = "yes"; then
2206   #
2207   # Append the information to the lock database
2208   #
2209   dependency="Tcl,V7.4,global,$SUBSYSTEM,$VERSION,$CVS_TAG"
2210   #
2211   # Log the dependency
2212   #
2213   /omi/exports/Toolshed/LATEST/common/bin/xmb-ctrl \
2214     -send "$dependency" -type dependency
2215 fi
2216
2217   if test -r ${platform_root}.global/lib/libtcl.$L; then
2218     ac_cv_lib_Tcl=yes
2219     TCLLIB_DIR=${platform_root}.global/lib
2220     TCLBIN_DIR=${platform_root}.global/bin
2221     echo "Using export version for Tcl..."
2222   elif test -r ${platform_root}.global/lib/Tcl.$L; then
2223     ac_cv_lib_Tcl=yes
2224     TCLLIB_DIR=${platform_root}.global/lib
2225     TCLBIN_DIR=${platform_root}.global/bin
2226     echo "Using export version for Tcl... "
2227   else
2228     if test -r $TCLLIB_DIR/libtcl.$L -o \
2229             -r $TCLLIB_DIR/Tcl.$L; then
2230       ac_cv_lib_Tcl=yes
2231     else
2232       ac_cv_lib_Tcl=no
2233     fi
2234   fi
2235 else  
2236   if test "$export_restricted" = "yes"; then
2237     
2238 #
2239 # Declare a dependency
2240 #
2241 if test "$with_releases" = "yes"; then
2242   #
2243   # Append the information to the lock database
2244   #
2245   dependency="Tcl,V7.4,domestic,$SUBSYSTEM,$VERSION,$CVS_TAG"
2246   #
2247   # Log the dependency
2248   #
2249   /omi/exports/Toolshed/LATEST/common/bin/xmb-ctrl \
2250     -send "$dependency" -type dependency
2251 fi
2252
2253   else
2254     
2255 #
2256 # Declare a dependency
2257 #
2258 if test "$with_releases" = "yes"; then
2259   #
2260   # Append the information to the lock database
2261   #
2262   dependency="Tcl,V7.4,unrestricted,$SUBSYSTEM,$VERSION,$CVS_TAG"
2263   #
2264   # Log the dependency
2265   #
2266   /omi/exports/Toolshed/LATEST/common/bin/xmb-ctrl \
2267     -send "$dependency" -type dependency
2268 fi
2269
2270   fi
2271   if test -r $TCLLIB_DIR/libtcl.$L -o \
2272           -r $TCLLIB_DIR/Tcl.$L; then
2273     ac_cv_lib_Tcl=yes
2274   else
2275     ac_cv_lib_Tcl=no
2276   fi
2277 fi
2278
2279 fi
2280 if eval "test \"`echo '$ac_cv_lib_'Tcl`\" = yes"; then
2281   echo "$ac_t""yes" 1>&6
2282     ac_tr_lib=HAVE_LIB`echo Tcl | tr '[a-z]' '[A-Z]'`
2283     cat >> confdefs.h <<EOF
2284 #define $ac_tr_lib 1
2285 EOF
2286
2287   if test "$with_export" = "yes"; then
2288     if test -r "${platform_root}.global/lib/libtcl.$L";then
2289       LIBS="$LIBS ${platform_root}.global/lib/libtcl.$L"
2290     elif test -r "${platform_root}.global/lib/Tcl.$L";then
2291       LIBS="$LIBS ${platform_root}.global/lib/Tcl.$L"
2292     else
2293       LIBS="$LIBS $TCLLIB_DIR/libtcl.$L"
2294     fi
2295   else
2296     if test "$PLATFORM_CLASS" = "UNIX"; then
2297       LIBS="$LIBS $TCLLIB_DIR/libtcl.$L"
2298     else
2299       LIBS="$LIBS $TCLLIB_DIR/Tcl.$L"
2300     fi
2301   fi
2302   INCLUDE_PATH="$INCLUDE_PATH -I$TCLINC_DIR"
2303 else
2304   echo "  libtcl.$L not found in $TCLLIB_DIR" >> PATH_ERR
2305   echo "$ac_t""not found" 1>&6
2306   cat PATH_ERR
2307 fi 
2308 rm -f PATH_ERR
2309
2310
2311 #
2312 # System library dependencies
2313 #
2314
2315
2316 if test $PLATFORM != "sgi_62"; then
2317 echo $ac_n "checking for nsl""... $ac_c" 1>&6
2318 echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
2319 ac_lib_var=`echo nsl_gethostent | tr '.-/+' '___p'`
2320 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2321   echo $ac_n "(cached) $ac_c" 1>&6
2322 else
2323   ac_save_LIBS="$LIBS"
2324 LIBS="-lnsl  $LIBS"
2325 cat > conftest.$ac_ext <<EOF
2326 #line 2327 "configure"
2327 #include "confdefs.h"
2328 /* Override any gcc2 internal prototype to avoid an error.  */
2329 char gethostent();
2330
2331 int main() { return 0; }
2332 int t() {
2333 gethostent()
2334 ; return 0; }
2335 EOF
2336 if { (eval echo configure:2337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2337   rm -rf conftest*
2338   eval "ac_cv_lib_$ac_lib_var=yes"
2339 else
2340   rm -rf conftest*
2341   eval "ac_cv_lib_$ac_lib_var=no"
2342 fi
2343 rm -f conftest*
2344 LIBS="$ac_save_LIBS"
2345
2346 fi
2347 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2348   echo "$ac_t""yes" 1>&6
2349   LIBS="$LIBS -lnsl"
2350 else
2351   echo "$ac_t""no" 1>&6
2352 fi
2353
2354
2355 echo $ac_n "checking for resolv""... $ac_c" 1>&6
2356 echo $ac_n "checking for -lresolv""... $ac_c" 1>&6
2357 ac_lib_var=`echo resolv_res_init | tr '.-/+' '___p'`
2358 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2359   echo $ac_n "(cached) $ac_c" 1>&6
2360 else
2361   ac_save_LIBS="$LIBS"
2362 LIBS="-lresolv  $LIBS"
2363 cat > conftest.$ac_ext <<EOF
2364 #line 2365 "configure"
2365 #include "confdefs.h"
2366 /* Override any gcc2 internal prototype to avoid an error.  */
2367 char res_init();
2368
2369 int main() { return 0; }
2370 int t() {
2371 res_init()
2372 ; return 0; }
2373 EOF
2374 if { (eval echo configure:2375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2375   rm -rf conftest*
2376   eval "ac_cv_lib_$ac_lib_var=yes"
2377 else
2378   rm -rf conftest*
2379   eval "ac_cv_lib_$ac_lib_var=no"
2380 fi
2381 rm -f conftest*
2382 LIBS="$ac_save_LIBS"
2383
2384 fi
2385 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2386   echo "$ac_t""yes" 1>&6
2387   LIBS="$LIBS -lresolv"
2388 else
2389   echo "$ac_t""no" 1>&6
2390 fi
2391
2392
2393 echo $ac_n "checking for socket""... $ac_c" 1>&6
2394 echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
2395 ac_lib_var=`echo socket_socket | tr '.-/+' '___p'`
2396 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2397   echo $ac_n "(cached) $ac_c" 1>&6
2398 else
2399   ac_save_LIBS="$LIBS"
2400 LIBS="-lsocket  $LIBS"
2401 cat > conftest.$ac_ext <<EOF
2402 #line 2403 "configure"
2403 #include "confdefs.h"
2404 /* Override any gcc2 internal prototype to avoid an error.  */
2405 char socket();
2406
2407 int main() { return 0; }
2408 int t() {
2409 socket()
2410 ; return 0; }
2411 EOF
2412 if { (eval echo configure:2413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2413   rm -rf conftest*
2414   eval "ac_cv_lib_$ac_lib_var=yes"
2415 else
2416   rm -rf conftest*
2417   eval "ac_cv_lib_$ac_lib_var=no"
2418 fi
2419 rm -f conftest*
2420 LIBS="$ac_save_LIBS"
2421
2422 fi
2423 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2424   echo "$ac_t""yes" 1>&6
2425   LIBS="$LIBS -lsocket"
2426 else
2427   echo "$ac_t""no" 1>&6
2428 fi
2429
2430
2431 echo $ac_n "checking for dnet_stub""... $ac_c" 1>&6
2432 if test -s /usr/lib/libdnet_stub.a; then
2433   LIBS="$LIBS -ldnet_stub"
2434   echo "$ac_t""yes" 1>&6
2435 else
2436   echo "$ac_t""no" 1>&6
2437 fi
2438
2439 if test "`uname -s`" = "Windows_NT"; then
2440   echo $ac_n "checking for wsock32""... $ac_c" 1>&6
2441   if test -s c:/msdev/lib/wsock32.lib; then
2442     LIBS="$LIBS -lwsock32"
2443     echo "$ac_t""yes" 1>&6
2444   fi
2445   echo $ac_n "checking for advapi32""... $ac_c" 1>&6
2446   if test -s c:/msdev/lib/advapi32.lib; then
2447     LIBS="$LIBS -ladvapi32"
2448     echo "$ac_t""yes" 1>&6
2449   fi
2450   echo $ac_n "checking for user32""... $ac_c" 1>&6
2451   if test -s c:/msdev/lib/user32.lib; then
2452     LIBS="$LIBS -luser32"
2453     echo "$ac_t""yes" 1>&6
2454   fi
2455 fi
2456 fi
2457
2458
2459 if test $PLATFORM != sgi_62; then
2460 echo $ac_n "checking for sin""... $ac_c" 1>&6
2461 if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then
2462   echo $ac_n "(cached) $ac_c" 1>&6
2463 else
2464   cat > conftest.$ac_ext <<EOF
2465 #line 2466 "configure"
2466 #include "confdefs.h"
2467 /* System header to define __stub macros and hopefully few prototypes,
2468     which can conflict with char sin(); below.  */
2469 #include <assert.h>
2470 /* Override any gcc2 internal prototype to avoid an error.  */
2471 char sin();
2472
2473 int main() { return 0; }
2474 int t() {
2475
2476 /* The GNU C library defines this for functions which it implements
2477     to always fail with ENOSYS.  Some functions are actually named
2478     something starting with __ and the normal name is an alias.  */
2479 #if defined (__stub_sin) || defined (__stub___sin)
2480 choke me
2481 #else
2482 sin();
2483 #endif
2484
2485 ; return 0; }
2486 EOF
2487 if { (eval echo configure:2488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2488   rm -rf conftest*
2489   eval "ac_cv_func_sin=yes"
2490 else
2491   rm -rf conftest*
2492   eval "ac_cv_func_sin=no"
2493 fi
2494 rm -f conftest*
2495
2496 fi
2497 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
2498   echo "$ac_t""yes" 1>&6
2499   :
2500 else
2501   echo "$ac_t""no" 1>&6
2502 LIBS="$LIBS -lm"
2503 fi
2504
2505 echo $ac_n "checking for -lieee""... $ac_c" 1>&6
2506 ac_lib_var=`echo ieee_main | tr '.-/+' '___p'`
2507 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2508   echo $ac_n "(cached) $ac_c" 1>&6
2509 else
2510   ac_save_LIBS="$LIBS"
2511 LIBS="-lieee  $LIBS"
2512 cat > conftest.$ac_ext <<EOF
2513 #line 2514 "configure"
2514 #include "confdefs.h"
2515 /* Override any gcc2 internal prototype to avoid an error.  */
2516 char main();
2517
2518 int main() { return 0; }
2519 int t() {
2520 main()
2521 ; return 0; }
2522 EOF
2523 if { (eval echo configure:2524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2524   rm -rf conftest*
2525   eval "ac_cv_lib_$ac_lib_var=yes"
2526 else
2527   rm -rf conftest*
2528   eval "ac_cv_lib_$ac_lib_var=no"
2529 fi
2530 rm -f conftest*
2531 LIBS="$ac_save_LIBS"
2532
2533 fi
2534 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2535   echo "$ac_t""yes" 1>&6
2536   LIBS="$LIBS -lieee"
2537 else
2538   echo "$ac_t""no" 1>&6
2539 fi
2540
2541 cat >> confdefs.h <<\EOF
2542 #define HAVE_MATHLIB 1
2543 EOF
2544
2545 fi
2546
2547
2548 #
2549 # End of dependencies.in
2550 #------------------------
2551
2552
2553 if test "$export_restricted" = "yes"; then
2554   if test "$with_export" = "yes"; then
2555     EXPORT_RESTRICTION=GLOBAL
2556   else
2557     EXPORT_RESTRICTION=DOMESTIC
2558   fi
2559 else
2560   EXPORT_RESTRICTION=NONE
2561 fi
2562
2563
2564
2565
2566 echo $ac_n "checking for sun_len in sys/un.h""... $ac_c" 1>&6
2567 cat > conftest.$ac_ext <<EOF
2568 #line 2569 "configure"
2569 #include "confdefs.h"
2570 #include <sys/un.h>
2571 EOF
2572 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2573   egrep "sun_len" >$NULLDEVW 2>&1; then
2574   rm -rf conftest*
2575   echo "$ac_t""yes" 1>&6
2576    cat >> confdefs.h <<\EOF
2577 #define HAVE_SOCKADDR_UN_SUN_LEN 1
2578 EOF
2579
2580 else
2581   rm -rf conftest*
2582   echo "$ac_t""no" 1>&6
2583 fi
2584 rm -f conftest*
2585
2586
2587 #--------------------------------------------------------------------
2588 #  What extra libraries do we need for this platform?
2589 #--------------------------------------------------------------------
2590
2591 for ac_func in strerror strtol
2592 do
2593 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2594 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2595   echo $ac_n "(cached) $ac_c" 1>&6
2596 else
2597   cat > conftest.$ac_ext <<EOF
2598 #line 2599 "configure"
2599 #include "confdefs.h"
2600 /* System header to define __stub macros and hopefully few prototypes,
2601     which can conflict with char $ac_func(); below.  */
2602 #include <assert.h>
2603 /* Override any gcc2 internal prototype to avoid an error.  */
2604 char $ac_func();
2605
2606 int main() { return 0; }
2607 int t() {
2608
2609 /* The GNU C library defines this for functions which it implements
2610     to always fail with ENOSYS.  Some functions are actually named
2611     something starting with __ and the normal name is an alias.  */
2612 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2613 choke me
2614 #else
2615 $ac_func();
2616 #endif
2617
2618 ; return 0; }
2619 EOF
2620 if { (eval echo configure:2621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2621   rm -rf conftest*
2622   eval "ac_cv_func_$ac_func=yes"
2623 else
2624   rm -rf conftest*
2625   eval "ac_cv_func_$ac_func=no"
2626 fi
2627 rm -f conftest*
2628
2629 fi
2630 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2631   echo "$ac_t""yes" 1>&6
2632     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2633   cat >> confdefs.h <<EOF
2634 #define $ac_tr_func 1
2635 EOF
2636  
2637 else
2638   echo "$ac_t""no" 1>&6
2639 fi
2640 done
2641
2642
2643 for ac_func in strerror strtol
2644 do
2645 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2646 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2647   echo $ac_n "(cached) $ac_c" 1>&6
2648 else
2649   cat > conftest.$ac_ext <<EOF
2650 #line 2651 "configure"
2651 #include "confdefs.h"
2652 /* System header to define __stub macros and hopefully few prototypes,
2653     which can conflict with char $ac_func(); below.  */
2654 #include <assert.h>
2655 /* Override any gcc2 internal prototype to avoid an error.  */
2656 char $ac_func();
2657
2658 int main() { return 0; }
2659 int t() {
2660
2661 /* The GNU C library defines this for functions which it implements
2662     to always fail with ENOSYS.  Some functions are actually named
2663     something starting with __ and the normal name is an alias.  */
2664 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2665 choke me
2666 #else
2667 $ac_func();
2668 #endif
2669
2670 ; return 0; }
2671 EOF
2672 if { (eval echo configure:2673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2673   rm -rf conftest*
2674   eval "ac_cv_func_$ac_func=yes"
2675 else
2676   rm -rf conftest*
2677   eval "ac_cv_func_$ac_func=no"
2678 fi
2679 rm -f conftest*
2680
2681 fi
2682 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2683   echo "$ac_t""yes" 1>&6
2684   :
2685 else
2686   echo "$ac_t""no" 1>&6
2687 LIBOBJS="$LIBOBJS ${ac_func}.o"
2688 fi
2689
2690 done
2691
2692
2693 #--------------------------------------------------------------------
2694 #       Include sys/select.h if it exists and if it supplies things
2695 #       that appear to be useful and aren't already in sys/types.h.
2696 #       This appears to be true only on the RS/6000 under AIX.  Some
2697 #       systems like OSF/1 have a sys/select.h that's of no use, and
2698 #       other systems like SCO UNIX have a sys/select.h that's
2699 #       pernicious.  If "fd_set" isn't defined anywhere then set a
2700 #       special flag.
2701 #--------------------------------------------------------------------
2702
2703 echo $ac_n "checking for fd_set in in sys/types.h""... $ac_c" 1>&6
2704 cat > conftest.$ac_ext <<EOF
2705 #line 2706 "configure"
2706 #include "confdefs.h"
2707 #include <sys/types.h>
2708 int main() { return 0; }
2709 int t() {
2710 fd_set readMask, writeMask;
2711 ; return 0; }
2712 EOF
2713 if { (eval echo configure:2714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2714   rm -rf conftest*
2715   echo "$ac_t""yes" 1>&6
2716 else
2717   rm -rf conftest*
2718   echo "$ac_t""no" 1>&6
2719    echo $ac_n "checking for fd_mask in in sys/select.h""... $ac_c" 1>&6
2720    cat > conftest.$ac_ext <<EOF
2721 #line 2722 "configure"
2722 #include "confdefs.h"
2723 #include <sys/select.h>
2724 EOF
2725 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2726   egrep "fd_mask" >$NULLDEVW 2>&1; then
2727   rm -rf conftest*
2728   echo "$ac_t""yes" 1>&6
2729       cat >> confdefs.h <<\EOF
2730 #define HAVE_SYS_SELECT_H 1
2731 EOF
2732
2733 else
2734   rm -rf conftest*
2735   echo "$ac_t""no" 1>&6
2736       cat >> confdefs.h <<\EOF
2737 #define NO_FD_SET 1
2738 EOF
2739
2740 fi
2741 rm -f conftest*
2742
2743 fi
2744 rm -f conftest*
2745
2746
2747 echo $ac_n "checking for fpos in stdio.h""... $ac_c" 1>&6
2748 cat > conftest.$ac_ext <<EOF
2749 #line 2750 "configure"
2750 #include "confdefs.h"
2751 #include <stdio.h>
2752 EOF
2753 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2754   egrep "fpos_t" >$NULLDEVW 2>&1; then
2755   rm -rf conftest*
2756   echo "$ac_t""yes" 1>&6
2757    cat >> confdefs.h <<\EOF
2758 #define HAVE_FPOS 1
2759 EOF
2760
2761 else
2762   rm -rf conftest*
2763   echo "$ac_t""no" 1>&6
2764 fi
2765 rm -f conftest*
2766
2767
2768 for ac_hdr in windows.h
2769 do
2770 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
2771 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2772 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2773   echo $ac_n "(cached) $ac_c" 1>&6
2774 else
2775   cat > conftest.$ac_ext <<EOF
2776 #line 2777 "configure"
2777 #include "confdefs.h"
2778 #include <$ac_hdr>
2779 EOF
2780 ac_try="$ac_cpp conftest.$ac_ext >$NULLDEVW 2>conftest.out"
2781 { (eval echo configure:2782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2782 if test "`uname -s`" = "Windows_NT"; then
2783   ac_err=`egrep '^.*error' conftest.out`
2784 else
2785   ac_err=`grep -v '^ *+' conftest.out`
2786 fi
2787 if test -z "$ac_err"; then
2788   rm -rf conftest*
2789   eval "ac_cv_header_$ac_safe=yes"
2790 else
2791   echo "$ac_err" >&5
2792   rm -rf conftest*
2793   eval "ac_cv_header_$ac_safe=no"
2794 fi
2795 rm -f conftest*
2796 fi
2797 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2798   echo "$ac_t""yes" 1>&6
2799     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
2800   cat >> confdefs.h <<EOF
2801 #define $ac_tr_hdr 1
2802 EOF
2803  
2804 else
2805   echo "$ac_t""no" 1>&6
2806 fi
2807 done
2808
2809 for ac_hdr in sys/socket.h
2810 do
2811 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
2812 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2813 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2814   echo $ac_n "(cached) $ac_c" 1>&6
2815 else
2816   cat > conftest.$ac_ext <<EOF
2817 #line 2818 "configure"
2818 #include "confdefs.h"
2819 #include <$ac_hdr>
2820 EOF
2821 ac_try="$ac_cpp conftest.$ac_ext >$NULLDEVW 2>conftest.out"
2822 { (eval echo configure:2823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2823 if test "`uname -s`" = "Windows_NT"; then
2824   ac_err=`egrep '^.*error' conftest.out`
2825 else
2826   ac_err=`grep -v '^ *+' conftest.out`
2827 fi
2828 if test -z "$ac_err"; then
2829   rm -rf conftest*
2830   eval "ac_cv_header_$ac_safe=yes"
2831 else
2832   echo "$ac_err" >&5
2833   rm -rf conftest*
2834   eval "ac_cv_header_$ac_safe=no"
2835 fi
2836 rm -f conftest*
2837 fi
2838 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2839   echo "$ac_t""yes" 1>&6
2840     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
2841   cat >> confdefs.h <<EOF
2842 #define $ac_tr_hdr 1
2843 EOF
2844  
2845 else
2846   echo "$ac_t""no" 1>&6
2847 fi
2848 done
2849
2850 for ac_hdr in winsock.h
2851 do
2852 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
2853 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2854 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2855   echo $ac_n "(cached) $ac_c" 1>&6
2856 else
2857   cat > conftest.$ac_ext <<EOF
2858 #line 2859 "configure"
2859 #include "confdefs.h"
2860 #include <$ac_hdr>
2861 EOF
2862 ac_try="$ac_cpp conftest.$ac_ext >$NULLDEVW 2>conftest.out"
2863 { (eval echo configure:2864: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2864 if test "`uname -s`" = "Windows_NT"; then
2865   ac_err=`egrep '^.*error' conftest.out`
2866 else
2867   ac_err=`grep -v '^ *+' conftest.out`
2868 fi
2869 if test -z "$ac_err"; then
2870   rm -rf conftest*
2871   eval "ac_cv_header_$ac_safe=yes"
2872 else
2873   echo "$ac_err" >&5
2874   rm -rf conftest*
2875   eval "ac_cv_header_$ac_safe=no"
2876 fi
2877 rm -f conftest*
2878 fi
2879 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2880   echo "$ac_t""yes" 1>&6
2881     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
2882   cat >> confdefs.h <<EOF
2883 #define $ac_tr_hdr 1
2884 EOF
2885  
2886 else
2887   echo "$ac_t""no" 1>&6
2888 fi
2889 done
2890
2891 for ac_hdr in netdb.h
2892 do
2893 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
2894 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2895 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2896   echo $ac_n "(cached) $ac_c" 1>&6
2897 else
2898   cat > conftest.$ac_ext <<EOF
2899 #line 2900 "configure"
2900 #include "confdefs.h"
2901 #include <$ac_hdr>
2902 EOF
2903 ac_try="$ac_cpp conftest.$ac_ext >$NULLDEVW 2>conftest.out"
2904 { (eval echo configure:2905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2905 if test "`uname -s`" = "Windows_NT"; then
2906   ac_err=`egrep '^.*error' conftest.out`
2907 else
2908   ac_err=`grep -v '^ *+' conftest.out`
2909 fi
2910 if test -z "$ac_err"; then
2911   rm -rf conftest*
2912   eval "ac_cv_header_$ac_safe=yes"
2913 else
2914   echo "$ac_err" >&5
2915   rm -rf conftest*
2916   eval "ac_cv_header_$ac_safe=no"
2917 fi
2918 rm -f conftest*
2919 fi
2920 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2921   echo "$ac_t""yes" 1>&6
2922     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
2923   cat >> confdefs.h <<EOF
2924 #define $ac_tr_hdr 1
2925 EOF
2926  
2927 else
2928   echo "$ac_t""no" 1>&6
2929 fi
2930 done
2931
2932 for ac_hdr in netinet/in.h
2933 do
2934 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
2935 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2936 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2937   echo $ac_n "(cached) $ac_c" 1>&6
2938 else
2939   cat > conftest.$ac_ext <<EOF
2940 #line 2941 "configure"
2941 #include "confdefs.h"
2942 #include <$ac_hdr>
2943 EOF
2944 ac_try="$ac_cpp conftest.$ac_ext >$NULLDEVW 2>conftest.out"
2945 { (eval echo configure:2946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2946 if test "`uname -s`" = "Windows_NT"; then
2947   ac_err=`egrep '^.*error' conftest.out`
2948 else
2949   ac_err=`grep -v '^ *+' conftest.out`
2950 fi
2951 if test -z "$ac_err"; then
2952   rm -rf conftest*
2953   eval "ac_cv_header_$ac_safe=yes"
2954 else
2955   echo "$ac_err" >&5
2956   rm -rf conftest*
2957   eval "ac_cv_header_$ac_safe=no"
2958 fi
2959 rm -f conftest*
2960 fi
2961 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2962   echo "$ac_t""yes" 1>&6
2963     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
2964   cat >> confdefs.h <<EOF
2965 #define $ac_tr_hdr 1
2966 EOF
2967  
2968 else
2969   echo "$ac_t""no" 1>&6
2970 fi
2971 done
2972
2973 for ac_hdr in arpa/inet.h
2974 do
2975 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
2976 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2977 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2978   echo $ac_n "(cached) $ac_c" 1>&6
2979 else
2980   cat > conftest.$ac_ext <<EOF
2981 #line 2982 "configure"
2982 #include "confdefs.h"
2983 #include <$ac_hdr>
2984 EOF
2985 ac_try="$ac_cpp conftest.$ac_ext >$NULLDEVW 2>conftest.out"
2986 { (eval echo configure:2987: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2987 if test "`uname -s`" = "Windows_NT"; then
2988   ac_err=`egrep '^.*error' conftest.out`
2989 else
2990   ac_err=`grep -v '^ *+' conftest.out`
2991 fi
2992 if test -z "$ac_err"; then
2993   rm -rf conftest*
2994   eval "ac_cv_header_$ac_safe=yes"
2995 else
2996   echo "$ac_err" >&5
2997   rm -rf conftest*
2998   eval "ac_cv_header_$ac_safe=no"
2999 fi
3000 rm -f conftest*
3001 fi
3002 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3003   echo "$ac_t""yes" 1>&6
3004     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
3005   cat >> confdefs.h <<EOF
3006 #define $ac_tr_hdr 1
3007 EOF
3008  
3009 else
3010   echo "$ac_t""no" 1>&6
3011 fi
3012 done
3013
3014 for ac_hdr in strings.h
3015 do
3016 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
3017 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3018 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3019   echo $ac_n "(cached) $ac_c" 1>&6
3020 else
3021   cat > conftest.$ac_ext <<EOF
3022 #line 3023 "configure"
3023 #include "confdefs.h"
3024 #include <$ac_hdr>
3025 EOF
3026 ac_try="$ac_cpp conftest.$ac_ext >$NULLDEVW 2>conftest.out"
3027 { (eval echo configure:3028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3028 if test "`uname -s`" = "Windows_NT"; then
3029   ac_err=`egrep '^.*error' conftest.out`
3030 else
3031   ac_err=`grep -v '^ *+' conftest.out`
3032 fi
3033 if test -z "$ac_err"; then
3034   rm -rf conftest*
3035   eval "ac_cv_header_$ac_safe=yes"
3036 else
3037   echo "$ac_err" >&5
3038   rm -rf conftest*
3039   eval "ac_cv_header_$ac_safe=no"
3040 fi
3041 rm -f conftest*
3042 fi
3043 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3044   echo "$ac_t""yes" 1>&6
3045     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
3046   cat >> confdefs.h <<EOF
3047 #define $ac_tr_hdr 1
3048 EOF
3049  
3050 else
3051   echo "$ac_t""no" 1>&6
3052 fi
3053 done
3054
3055 for ac_hdr in sys/time.h
3056 do
3057 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
3058 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3059 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3060   echo $ac_n "(cached) $ac_c" 1>&6
3061 else
3062   cat > conftest.$ac_ext <<EOF
3063 #line 3064 "configure"
3064 #include "confdefs.h"
3065 #include <$ac_hdr>
3066 EOF
3067 ac_try="$ac_cpp conftest.$ac_ext >$NULLDEVW 2>conftest.out"
3068 { (eval echo configure:3069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3069 if test "`uname -s`" = "Windows_NT"; then
3070   ac_err=`egrep '^.*error' conftest.out`
3071 else
3072   ac_err=`grep -v '^ *+' conftest.out`
3073 fi
3074 if test -z "$ac_err"; then
3075   rm -rf conftest*
3076   eval "ac_cv_header_$ac_safe=yes"
3077 else
3078   echo "$ac_err" >&5
3079   rm -rf conftest*
3080   eval "ac_cv_header_$ac_safe=no"
3081 fi
3082 rm -f conftest*
3083 fi
3084 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3085   echo "$ac_t""yes" 1>&6
3086     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
3087   cat >> confdefs.h <<EOF
3088 #define $ac_tr_hdr 1
3089 EOF
3090  
3091 else
3092   echo "$ac_t""no" 1>&6
3093 fi
3094 done
3095
3096
3097 #--------------------------------------------------------------------
3098 #  Do we need cross-process locking on this platform?
3099 #--------------------------------------------------------------------
3100 echo $ac_n "checking "if this machine needs cross-process locking"""... $ac_c" 1>&6
3101 case "`uname -sr`" in
3102     IRIX\ 5.*)  
3103         cat >> confdefs.h <<\EOF
3104 #define USE_LOCKING 1
3105 EOF
3106
3107         echo "$ac_t""yes" 1>&6
3108     ;;
3109     SunOS\ 5.*) 
3110         cat >> confdefs.h <<\EOF
3111 #define USE_LOCKING 1
3112 EOF
3113
3114         echo "$ac_t""yes" 1>&6
3115     ;;
3116     UNIX_System_V\ 4.0)
3117         cat >> confdefs.h <<\EOF
3118 #define USE_LOCKING 1
3119 EOF
3120
3121         echo "$ac_t""yes" 1>&6
3122     ;;
3123     *)
3124         echo "$ac_t""no" 1>&6
3125     ;;
3126 esac
3127
3128 #--------------------------------------------------------------------
3129 #  Does va_arg(arg, long double) crash the compiler?
3130 #  hpux 9.04 compiler does and so does Stratus FTX (uses HP's compiler)
3131 #--------------------------------------------------------------------
3132 echo $ac_n "checking if va_arg(arg, long double) crashes the compiler""... $ac_c" 1>&6
3133 cat > conftest.$ac_ext <<EOF
3134 #line 3135 "configure"
3135 #include "confdefs.h"
3136 #include <stdarg.h>
3137 int main() { return 0; }
3138 int t() {
3139 long double lDblArg; va_list arg; lDblArg = va_arg(arg, long double);
3140 ; return 0; }
3141 EOF
3142 if { (eval echo configure:3143: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3143   rm -rf conftest*
3144   echo "$ac_t""no" 1>&6
3145 else
3146   rm -rf conftest*
3147   cat >> confdefs.h <<\EOF
3148 #define HAVE_VA_ARG_LONG_DOUBLE_BUG 1
3149 EOF
3150
3151    echo "$ac_t""yes" 1>&6
3152 fi
3153 rm -f conftest*
3154
3155
3156 #--------------------------------------------------------------------
3157 #  What's the target system?
3158 #--------------------------------------------------------------------
3159 case "$PLATFORM_CLASS" in
3160     WINDOWS)    
3161         SYSTEM="win32"
3162     ;;
3163     UNIX)       
3164         SYSTEM="unix"
3165     ;;
3166 esac
3167
3168
3169 trap '' 1 2 15
3170 cat > confcache <<\EOF
3171 # This file is a shell script that caches the results of configure
3172 # tests run on this system so they can be shared between configure
3173 # scripts and configure runs.  It is not useful on other systems.
3174 # If it contains results you don't want to keep, you may remove or edit it.
3175 #
3176 # By default, configure uses ./config.cache as the cache file,
3177 # creating it if it does not exist already.  You can give configure
3178 # the --cache-file=FILE option to use a different cache file; that is
3179 # what configure does when it calls configure scripts in
3180 # subdirectories, so they share the cache.
3181 # Giving --cache-file=$NULLDEVW disables caching, for debugging configure.
3182 # config.status only pays attention to the cache file if you give it the
3183 # --recheck option to rerun configure.
3184 #
3185 EOF
3186 # Ultrix sh set writes to stderr and can't be redirected directly,
3187 # and sets the high bit in the cache file unless we assign to the vars.
3188 (set) 2>&1 |
3189   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
3190   >> confcache
3191 if test "`uname -s`" = "Windows_NT"; then
3192   cat > confcache.sed <<EOF
3193 s/='"/='/
3194 s/"'}/'}/p
3195 EOF
3196   sed -n -f confcache.sed < confcache > confcache.wnt
3197   mv confcache.wnt confcache
3198   rm -f confcache.sed
3199 fi
3200 if cmp -s $cache_file confcache; then
3201   :
3202 else
3203   if test -w $cache_file; then
3204     echo "updating cache $cache_file"
3205     cat confcache > $cache_file
3206   else
3207     echo "not updating unwritable cache $cache_file"
3208   fi
3209 fi
3210 rm -f confcache
3211
3212 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3213
3214 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3215 # Let make expand exec_prefix.
3216 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3217
3218 # Any assignment to VPATH causes Sun make to only execute
3219 # the first set of double-colon rules, so remove it if not needed.
3220 # If there is a colon in the path, we need to keep it.
3221 if test "x$srcdir" = x.; then
3222   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
3223 fi
3224
3225 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3226
3227 DEFS=-DHAVE_CONFIG_H
3228
3229 # Without the "./", some shells look in PATH for config.status.
3230 : ${CONFIG_STATUS=./config.status}
3231
3232 echo creating $CONFIG_STATUS
3233 rm -f $CONFIG_STATUS
3234 if test "`uname -s`" = "Windows_NT"; then
3235   cat > $CONFIG_STATUS <<EOF
3236 #! $MKSROOT/sh.exe
3237 EOF
3238 else
3239   cat > $CONFIG_STATUS <<EOF
3240 #! /bin/sh
3241 EOF
3242 fi
3243 cat >> $CONFIG_STATUS <<EOF
3244 # Generated automatically by configure.
3245 # Run this file to recreate the current configuration.
3246 # This directory was configured as follows,
3247 # on host `(hostname || uname -n) 2>$NULLDEVW | sed 1q`:
3248 #
3249 # $0 $ac_configure_args
3250 #
3251 # Compiler output produced by configure, useful for debugging
3252 # configure, is in ./config.log if it exists.
3253
3254 NULLDEVW=$NULLDEVW
3255 if test ! -z "$CONFIG_SHELL"; then
3256   CONFIG_SHELL=$CONFIG_SHELL
3257 fi
3258 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3259 for ac_option
3260 do
3261   case "\$ac_option" in
3262   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3263     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3264     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3265   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3266     echo "$CONFIG_STATUS generated by autoconf version 2.9"
3267     exit 0 ;;
3268   -help | --help | --hel | --he | --h)
3269     echo "\$ac_cs_usage"; exit 0 ;;
3270   *) echo "\$ac_cs_usage"; exit 1 ;;
3271   esac
3272 done
3273
3274 ac_given_srcdir=$srcdir
3275 ac_given_INSTALL="$INSTALL"
3276
3277 trap 'rm -fr `echo "Makefile FastCGI.mak
3278           libfcgi/Makefile libfcgi/libfcgi.mak
3279           cgi-fcgi/Makefile cgi-fcgi/cgi-fcgi.mak
3280           examples/Makefile  include/fcgi_config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3281 EOF
3282 cat >> $CONFIG_STATUS <<EOF
3283
3284 # setup substitution commands for sed
3285 #
3286 cat > conftest.tmp <<\CEOF
3287 $ac_vpsub
3288 $extrasub
3289 s%@CFLAGS@%$CFLAGS%g
3290 s%@CPPFLAGS@%$CPPFLAGS%g
3291 s%@CXXFLAGS@%$CXXFLAGS%g
3292 s%@DEFS@%$DEFS%g
3293 s%@LDFLAGS@%$LDFLAGS%g
3294 s%@LIBS@%$LIBS%g
3295 s%@exec_prefix@%$exec_prefix%g
3296 s%@prefix@%$prefix%g
3297 s%@program_transform_name@%$program_transform_name%g
3298 s%@bindir@%$bindir%g
3299 s%@sbindir@%$sbindir%g
3300 s%@libexecdir@%$libexecdir%g
3301 s%@datadir@%$datadir%g
3302 s%@sysconfdir@%$sysconfdir%g
3303 s%@sharedstatedir@%$sharedstatedir%g
3304 s%@localstatedir@%$localstatedir%g
3305 s%@libdir@%$libdir%g
3306 s%@includedir@%$includedir%g
3307 s%@oldincludedir@%$oldincludedir%g
3308 s%@infodir@%$infodir%g
3309 s%@mandir@%$mandir%g
3310 s%@MKSROOT@%$MKSROOT%g
3311 s%@INCLUDE_PATH@%$INCLUDE_PATH%g
3312 s%@EXTRA_OBJS@%$EXTRA_OBJS%g
3313 s%@EXPORTS_PREFIX@%$EXPORTS_PREFIX%g
3314 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3315 s%@INSTALL_DATA@%$INSTALL_DATA%g
3316 s%@AR@%$AR%g
3317 s%@RANLIB@%$RANLIB%g
3318 s%@CCDEFS@%$CCDEFS%g
3319 s%@acaux_native_cc@%$acaux_native_cc%g
3320 s%@CC@%$CC%g
3321 s%@CPP@%$CPP%g
3322 s%@O@%$O%g
3323 s%@L@%$L%g
3324 s%@X@%$X%g
3325 s%@SHELL@%$SHELL%g
3326 s%@CCNOP@%$CCNOP%g
3327 s%@PROFILE@%$PROFILE%g
3328 s%@PLATFORM@%$PLATFORM%g
3329 s%@PLATFORM_CLASS@%$PLATFORM_CLASS%g
3330 s%@SUBSYSTEM@%$SUBSYSTEM%g
3331 s%@VERSION@%$VERSION%g
3332 s%@CVS_TAG@%$CVS_TAG%g
3333 s%@DOT_CVS_TAG@%$DOT_CVS_TAG%g
3334 s%@common_prefix@%$common_prefix%g
3335 s%@EXPORTS_ROOT@%$EXPORTS_ROOT%g
3336 s%@EXPORTS_COMMON@%$EXPORTS_COMMON%g
3337 s%@TCLLIB_DIR@%$TCLLIB_DIR%g
3338 s%@TCLINC_DIR@%$TCLINC_DIR%g
3339 s%@TCLCOMMON_DIR@%$TCLCOMMON_DIR%g
3340 s%@TCLBIN_DIR@%$TCLBIN_DIR%g
3341 s%@EXPORT_RESTRICTION@%$EXPORT_RESTRICTION%g
3342 s%@LIBOBJS@%$LIBOBJS%g
3343 s%@SYSTEM@%$SYSTEM%g
3344
3345 CEOF
3346 #
3347 # Protect against being on the right side of a sed subst in config.status.
3348 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3349  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' conftest.tmp > conftest.subs
3350 rm -f conftest.tmp
3351 EOF
3352 cat >> $CONFIG_STATUS <<EOF
3353
3354 CONFIG_FILES=\${CONFIG_FILES-"Makefile FastCGI.mak
3355           libfcgi/Makefile libfcgi/libfcgi.mak
3356           cgi-fcgi/Makefile cgi-fcgi/cgi-fcgi.mak
3357           examples/Makefile "}
3358 EOF
3359 cat >> $CONFIG_STATUS <<\EOF
3360 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3361   # Support "outfile[:infile]", defaulting infile="outfile.in".
3362   case "$ac_file" in
3363   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
3364        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3365   *) ac_file_in="${ac_file}.in" ;;
3366   esac
3367
3368   # Adjust relative srcdir, etc. for subdirectories.
3369
3370   # Remove last slash and all that follows it.  Not all systems have dirname.
3371   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3372   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3373     # The file is in a subdirectory.
3374     test ! -d "$ac_dir" && mkdir "$ac_dir"
3375     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3376     # A "../" for each directory in $ac_dir_suffix.
3377     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3378   else
3379     ac_dir_suffix= ac_dots=
3380   fi
3381
3382   case "$ac_given_srcdir" in
3383   .)  srcdir=.
3384       if test -z "$ac_dots"; then top_srcdir=.
3385       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3386   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3387   *) # Relative path.
3388     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3389     top_srcdir="$ac_dots$ac_given_srcdir" ;;
3390   esac
3391
3392   case "$ac_given_INSTALL" in
3393   [/$]*) INSTALL="$ac_given_INSTALL" ;;
3394   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3395   esac
3396   echo creating "$ac_file"
3397   rm -f "$ac_file"
3398   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3399   case "$ac_file" in
3400   *Makefile*) ac_comsub="1i\\
3401 # $configure_input" ;;
3402   *) ac_comsub= ;;
3403   esac
3404   sed -e "$ac_comsub
3405 s%@configure_input@%$configure_input%g
3406 s%@srcdir@%$srcdir%g
3407 s%@top_srcdir@%$top_srcdir%g
3408 s%@INSTALL@%$INSTALL%g
3409 " $ac_given_srcdir/$ac_file_in > ${ac_file_in}.fragin
3410   ac_lines_subs=`grep -c . conftest.subs`
3411   ac_max_subs_lines=12
3412   cp conftest.subs conftest.tmp
3413   while :
3414   do
3415     sed ${ac_max_subs_lines}q conftest.tmp >conftest.frag
3416     sed 1,${ac_max_subs_lines}d conftest.tmp >conftest.tail
3417     sed -f conftest.frag $ac_given_srcdir/${ac_file_in}.fragin \
3418       >${ac_file_in}.fragout
3419     rm -f ${ac_file_in}.fragin
3420     mv ${ac_file_in}.fragout ${ac_file_in}.fragin
3421     ac_lines_subs=`grep -c . conftest.tail`
3422     if test -z "$ac_lines_subs" || \
3423        test "$ac_lines_subs" -eq 0; then
3424       break
3425     fi
3426     rm -f conftest.tmp
3427     mv conftest.tail conftest.tmp
3428     rm -f conftest.frag
3429   done
3430   mv ${ac_file_in}.fragin ${ac_file}
3431   rm -f conftest.tmp
3432   rm -f conftest.tail
3433 fi; done
3434 rm -f conftest.subs
3435
3436 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3437 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3438 #
3439 # ac_d sets the value in "#define NAME VALUE" lines.
3440 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
3441 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
3442 ac_dC='\3'
3443 ac_dD='%g'
3444 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3445 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3446 ac_uB='\([      ]\)%\1#\2define\3'
3447 ac_uC=' '
3448 ac_uD='\4%g'
3449 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3450 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3451 ac_eB='$%\1#\2define\3'
3452 ac_eC=' '
3453 ac_eD='%g'
3454
3455 CONFIG_HEADERS=${CONFIG_HEADERS-"include/fcgi_config.h"}
3456 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3457   # Support "outfile[:infile]", defaulting infile="outfile.in".
3458   case "$ac_file" in
3459   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
3460        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3461   *) ac_file_in="${ac_file}.in" ;;
3462   esac
3463
3464   echo creating $ac_file
3465
3466   rm -f conftest.frag conftest.in conftest.out
3467   cp $ac_given_srcdir/$ac_file_in conftest.in
3468
3469 EOF
3470
3471 # Transform confdefs.h into a sed script conftest.vals that substitutes
3472 # the proper values into config.h.in to produce config.h.  And first:
3473 # Protect against being on the right side of a sed subst in config.status.
3474 # Protect against being in an unquoted here document in config.status.
3475 rm -f conftest.vals
3476 cat > conftest.hdr <<\EOF
3477 s/[\\&%]/\\&/g
3478 s%[\\$`]%\\&%g
3479 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3480 s%ac_d%ac_u%gp
3481 s%ac_u%ac_e%gp
3482 EOF
3483 sed -n -f conftest.hdr confdefs.h > conftest.vals
3484 rm -f conftest.hdr
3485
3486 # This sed command replaces #undef with comments.  This is necessary, for
3487 # example, in the case of _POSIX_SOURCE, which is predefined and required
3488 # on some systems where configure will not decide to define it.
3489 cat >> conftest.vals <<\EOF
3490 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3491 EOF
3492
3493 # Break up conftest.vals because some shells have a limit on
3494 # the size of here documents, and old seds have small limits too.
3495 # Maximum number of lines to put in a single here document.
3496 ac_max_here_lines=12
3497
3498 rm -f conftest.tail
3499 while :
3500 do
3501   ac_lines=`grep -c . conftest.vals`
3502   # grep -c gives empty output for an empty file on some AIX systems.
3503   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3504   # Write a limited-size here document to conftest.frag.
3505   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3506   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3507   echo 'CEOF
3508   sed -f conftest.frag conftest.in > conftest.out
3509   rm -f conftest.in
3510   mv conftest.out conftest.in
3511 ' >> $CONFIG_STATUS
3512   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3513   rm -f conftest.vals
3514   mv conftest.tail conftest.vals
3515 done
3516 rm -f conftest.vals
3517
3518 cat >> $CONFIG_STATUS <<\EOF
3519   rm -f conftest.frag conftest.h
3520   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
3521   cat conftest.in >> conftest.h
3522   rm -f conftest.in
3523   if cmp -s $ac_file conftest.h 2>$NULLDEVW; then
3524     echo "$ac_file is unchanged"
3525     rm -f conftest.h
3526   else
3527     rm -f $ac_file
3528     mv conftest.h $ac_file
3529   fi
3530 fi; done
3531
3532
3533
3534 exit 0
3535 EOF
3536 chmod +x $CONFIG_STATUS
3537 rm -fr confdefs* $ac_clean_files
3538 if test "$no_create" != yes; then
3539   if test "`uname -s`" = Windows_NT; then
3540     ${CONFIG_SHELL-$MKSROOT/sh} < $CONFIG_STATUS || exit 1
3541   else 
3542     ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3543   fi
3544 fi
3545
3546
3547