]> granicus.if.org Git - postgresql/blob - src/configure
autoconf
[postgresql] / src / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.12 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local/pgsql
15 ac_help="$ac_help
16   --with-template=TEMPLATE
17                           use operating system template file 
18                               see template directory"
19 ac_help="$ac_help
20   --with-includes=DIR     site header files for tk/tcl, etc in DIR"
21 ac_help="$ac_help
22   --with-libs=DIR         site library directories for tk/tcl, etc in DIR"
23 ac_help="$ac_help
24   --with-libraries=DIR    site library directories for tk/tcl, etc in DIR"
25 ac_help="$ac_help
26   --enable-locale         enable locale support "
27 ac_help="$ac_help
28   --enable-recode         enable cyrillic recode support "
29 ac_help="$ac_help
30   --with-mb=<encoding> enable multi-byte support "
31 ac_help="$ac_help
32   --with-pgport=<portnum> change default startup port "
33 ac_help="$ac_help
34   --with-tcl              use tcl "
35 ac_help="$ac_help
36   --with-perl             use perl "
37 ac_help="$ac_help
38   --enable-cassert        enable assertion checks (debugging) "
39 ac_help="$ac_help
40   --with-CC=compiler     use specific C compiler"
41 ac_help="$ac_help
42   --with-CXX=compiler     use specific C++ compiler"
43 ac_help="$ac_help
44   --with-x                use the X Window System"
45
46 # Initialize some variables set by options.
47 # The variables have the same names as the options, with
48 # dashes changed to underlines.
49 build=NONE
50 cache_file=./config.cache
51 exec_prefix=NONE
52 host=NONE
53 no_create=
54 nonopt=NONE
55 no_recursion=
56 prefix=NONE
57 program_prefix=NONE
58 program_suffix=NONE
59 program_transform_name=s,x,x,
60 silent=
61 site=
62 srcdir=
63 target=NONE
64 verbose=
65 x_includes=NONE
66 x_libraries=NONE
67 bindir='${exec_prefix}/bin'
68 sbindir='${exec_prefix}/sbin'
69 libexecdir='${exec_prefix}/libexec'
70 datadir='${prefix}/share'
71 sysconfdir='${prefix}/etc'
72 sharedstatedir='${prefix}/com'
73 localstatedir='${prefix}/var'
74 libdir='${exec_prefix}/lib'
75 includedir='${prefix}/include'
76 oldincludedir='/usr/include'
77 infodir='${prefix}/info'
78 mandir='${prefix}/man'
79
80 # Initialize some other variables.
81 subdirs=
82 MFLAGS= MAKEFLAGS=
83 # Maximum number of lines to put in a shell here document.
84 ac_max_here_lines=12
85
86 ac_prev=
87 for ac_option
88 do
89
90   # If the previous option needs an argument, assign it.
91   if test -n "$ac_prev"; then
92     eval "$ac_prev=\$ac_option"
93     ac_prev=
94     continue
95   fi
96
97   case "$ac_option" in
98   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
99   *) ac_optarg= ;;
100   esac
101
102   # Accept the important Cygnus configure options, so we can diagnose typos.
103
104   case "$ac_option" in
105
106   -bindir | --bindir | --bindi | --bind | --bin | --bi)
107     ac_prev=bindir ;;
108   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
109     bindir="$ac_optarg" ;;
110
111   -build | --build | --buil | --bui | --bu)
112     ac_prev=build ;;
113   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
114     build="$ac_optarg" ;;
115
116   -cache-file | --cache-file | --cache-fil | --cache-fi \
117   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
118     ac_prev=cache_file ;;
119   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
120   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
121     cache_file="$ac_optarg" ;;
122
123   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
124     ac_prev=datadir ;;
125   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
126   | --da=*)
127     datadir="$ac_optarg" ;;
128
129   -disable-* | --disable-*)
130     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
131     # Reject names that are not valid shell variable names.
132     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
133       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
134     fi
135     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
136     eval "enable_${ac_feature}=no" ;;
137
138   -enable-* | --enable-*)
139     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
140     # Reject names that are not valid shell variable names.
141     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
142       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
143     fi
144     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
145     case "$ac_option" in
146       *=*) ;;
147       *) ac_optarg=yes ;;
148     esac
149     eval "enable_${ac_feature}='$ac_optarg'" ;;
150
151   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
152   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
153   | --exec | --exe | --ex)
154     ac_prev=exec_prefix ;;
155   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
156   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
157   | --exec=* | --exe=* | --ex=*)
158     exec_prefix="$ac_optarg" ;;
159
160   -gas | --gas | --ga | --g)
161     # Obsolete; use --with-gas.
162     with_gas=yes ;;
163
164   -help | --help | --hel | --he)
165     # Omit some internal or obsolete options to make the list less imposing.
166     # This message is too long to be a string in the A/UX 3.1 sh.
167     cat << EOF
168 Usage: configure [options] [host]
169 Options: [defaults in brackets after descriptions]
170 Configuration:
171   --cache-file=FILE       cache test results in FILE
172   --help                  print this message
173   --no-create             do not create output files
174   --quiet, --silent       do not print \`checking...' messages
175   --version               print the version of autoconf that created configure
176 Directory and file names:
177   --prefix=PREFIX         install architecture-independent files in PREFIX
178                           [$ac_default_prefix]
179   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
180                           [same as prefix]
181   --bindir=DIR            user executables in DIR [EPREFIX/bin]
182   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
183   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
184   --datadir=DIR           read-only architecture-independent data in DIR
185                           [PREFIX/share]
186   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
187   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
188                           [PREFIX/com]
189   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
190   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
191   --includedir=DIR        C header files in DIR [PREFIX/include]
192   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
193   --infodir=DIR           info documentation in DIR [PREFIX/info]
194   --mandir=DIR            man documentation in DIR [PREFIX/man]
195   --srcdir=DIR            find the sources in DIR [configure dir or ..]
196   --program-prefix=PREFIX prepend PREFIX to installed program names
197   --program-suffix=SUFFIX append SUFFIX to installed program names
198   --program-transform-name=PROGRAM
199                           run sed PROGRAM on installed program names
200 EOF
201     cat << EOF
202 Host type:
203   --build=BUILD           configure for building on BUILD [BUILD=HOST]
204   --host=HOST             configure for HOST [guessed]
205   --target=TARGET         configure for TARGET [TARGET=HOST]
206 Features and packages:
207   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
208   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
209   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
210   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
211   --x-includes=DIR        X include files are in DIR
212   --x-libraries=DIR       X library files are in DIR
213 EOF
214     if test -n "$ac_help"; then
215       echo "--enable and --with options recognized:$ac_help"
216     fi
217     exit 0 ;;
218
219   -host | --host | --hos | --ho)
220     ac_prev=host ;;
221   -host=* | --host=* | --hos=* | --ho=*)
222     host="$ac_optarg" ;;
223
224   -includedir | --includedir | --includedi | --included | --include \
225   | --includ | --inclu | --incl | --inc)
226     ac_prev=includedir ;;
227   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
228   | --includ=* | --inclu=* | --incl=* | --inc=*)
229     includedir="$ac_optarg" ;;
230
231   -infodir | --infodir | --infodi | --infod | --info | --inf)
232     ac_prev=infodir ;;
233   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
234     infodir="$ac_optarg" ;;
235
236   -libdir | --libdir | --libdi | --libd)
237     ac_prev=libdir ;;
238   -libdir=* | --libdir=* | --libdi=* | --libd=*)
239     libdir="$ac_optarg" ;;
240
241   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
242   | --libexe | --libex | --libe)
243     ac_prev=libexecdir ;;
244   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
245   | --libexe=* | --libex=* | --libe=*)
246     libexecdir="$ac_optarg" ;;
247
248   -localstatedir | --localstatedir | --localstatedi | --localstated \
249   | --localstate | --localstat | --localsta | --localst \
250   | --locals | --local | --loca | --loc | --lo)
251     ac_prev=localstatedir ;;
252   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
253   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
254   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
255     localstatedir="$ac_optarg" ;;
256
257   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
258     ac_prev=mandir ;;
259   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
260     mandir="$ac_optarg" ;;
261
262   -nfp | --nfp | --nf)
263     # Obsolete; use --without-fp.
264     with_fp=no ;;
265
266   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
267   | --no-cr | --no-c)
268     no_create=yes ;;
269
270   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
271   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
272     no_recursion=yes ;;
273
274   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
275   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
276   | --oldin | --oldi | --old | --ol | --o)
277     ac_prev=oldincludedir ;;
278   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
279   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
280   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
281     oldincludedir="$ac_optarg" ;;
282
283   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
284     ac_prev=prefix ;;
285   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
286     prefix="$ac_optarg" ;;
287
288   -program-prefix | --program-prefix | --program-prefi | --program-pref \
289   | --program-pre | --program-pr | --program-p)
290     ac_prev=program_prefix ;;
291   -program-prefix=* | --program-prefix=* | --program-prefi=* \
292   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
293     program_prefix="$ac_optarg" ;;
294
295   -program-suffix | --program-suffix | --program-suffi | --program-suff \
296   | --program-suf | --program-su | --program-s)
297     ac_prev=program_suffix ;;
298   -program-suffix=* | --program-suffix=* | --program-suffi=* \
299   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
300     program_suffix="$ac_optarg" ;;
301
302   -program-transform-name | --program-transform-name \
303   | --program-transform-nam | --program-transform-na \
304   | --program-transform-n | --program-transform- \
305   | --program-transform | --program-transfor \
306   | --program-transfo | --program-transf \
307   | --program-trans | --program-tran \
308   | --progr-tra | --program-tr | --program-t)
309     ac_prev=program_transform_name ;;
310   -program-transform-name=* | --program-transform-name=* \
311   | --program-transform-nam=* | --program-transform-na=* \
312   | --program-transform-n=* | --program-transform-=* \
313   | --program-transform=* | --program-transfor=* \
314   | --program-transfo=* | --program-transf=* \
315   | --program-trans=* | --program-tran=* \
316   | --progr-tra=* | --program-tr=* | --program-t=*)
317     program_transform_name="$ac_optarg" ;;
318
319   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
320   | -silent | --silent | --silen | --sile | --sil)
321     silent=yes ;;
322
323   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
324     ac_prev=sbindir ;;
325   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
326   | --sbi=* | --sb=*)
327     sbindir="$ac_optarg" ;;
328
329   -sharedstatedir | --sharedstatedir | --sharedstatedi \
330   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
331   | --sharedst | --shareds | --shared | --share | --shar \
332   | --sha | --sh)
333     ac_prev=sharedstatedir ;;
334   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
335   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
336   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
337   | --sha=* | --sh=*)
338     sharedstatedir="$ac_optarg" ;;
339
340   -site | --site | --sit)
341     ac_prev=site ;;
342   -site=* | --site=* | --sit=*)
343     site="$ac_optarg" ;;
344
345   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
346     ac_prev=srcdir ;;
347   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
348     srcdir="$ac_optarg" ;;
349
350   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
351   | --syscon | --sysco | --sysc | --sys | --sy)
352     ac_prev=sysconfdir ;;
353   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
354   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
355     sysconfdir="$ac_optarg" ;;
356
357   -target | --target | --targe | --targ | --tar | --ta | --t)
358     ac_prev=target ;;
359   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
360     target="$ac_optarg" ;;
361
362   -v | -verbose | --verbose | --verbos | --verbo | --verb)
363     verbose=yes ;;
364
365   -version | --version | --versio | --versi | --vers)
366     echo "configure generated by autoconf version 2.12"
367     exit 0 ;;
368
369   -with-* | --with-*)
370     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
371     # Reject names that are not valid shell variable names.
372     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
373       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
374     fi
375     ac_package=`echo $ac_package| sed 's/-/_/g'`
376     case "$ac_option" in
377       *=*) ;;
378       *) ac_optarg=yes ;;
379     esac
380     eval "with_${ac_package}='$ac_optarg'" ;;
381
382   -without-* | --without-*)
383     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
384     # Reject names that are not valid shell variable names.
385     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
386       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
387     fi
388     ac_package=`echo $ac_package| sed 's/-/_/g'`
389     eval "with_${ac_package}=no" ;;
390
391   --x)
392     # Obsolete; use --with-x.
393     with_x=yes ;;
394
395   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
396   | --x-incl | --x-inc | --x-in | --x-i)
397     ac_prev=x_includes ;;
398   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
399   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
400     x_includes="$ac_optarg" ;;
401
402   -x-libraries | --x-libraries | --x-librarie | --x-librari \
403   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
404     ac_prev=x_libraries ;;
405   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
406   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
407     x_libraries="$ac_optarg" ;;
408
409   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
410     ;;
411
412   *)
413     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
414       echo "configure: warning: $ac_option: invalid host type" 1>&2
415     fi
416     if test "x$nonopt" != xNONE; then
417       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
418     fi
419     nonopt="$ac_option"
420     ;;
421
422   esac
423 done
424
425 if test -n "$ac_prev"; then
426   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
427 fi
428
429 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
430
431 # File descriptor usage:
432 # 0 standard input
433 # 1 file creation
434 # 2 errors and warnings
435 # 3 some systems may open it to /dev/tty
436 # 4 used on the Kubota Titan
437 # 6 checking for... messages and results
438 # 5 compiler messages saved in config.log
439 if test "$silent" = yes; then
440   exec 6>/dev/null
441 else
442   exec 6>&1
443 fi
444 exec 5>./config.log
445
446 echo "\
447 This file contains any messages produced by compilers while
448 running configure, to aid debugging if configure makes a mistake.
449 " 1>&5
450
451 # Strip out --no-create and --no-recursion so they do not pile up.
452 # Also quote any args containing shell metacharacters.
453 ac_configure_args=
454 for ac_arg
455 do
456   case "$ac_arg" in
457   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
458   | --no-cr | --no-c) ;;
459   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
460   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
461   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
462   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
463   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
464   esac
465 done
466
467 # NLS nuisances.
468 # Only set these to C if already set.  These must not be set unconditionally
469 # because not all systems understand e.g. LANG=C (notably SCO).
470 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
471 # Non-C LC_CTYPE values break the ctype check.
472 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
473 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
474 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
475 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
476
477 # confdefs.h avoids OS command line length limits that DEFS can exceed.
478 rm -rf conftest* confdefs.h
479 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
480 echo > confdefs.h
481
482 # A filename unique to this package, relative to the directory that
483 # configure is in, which we can look for to find out if srcdir is correct.
484 ac_unique_file=backend/access/common/heaptuple.c
485
486 # Find the source files, if location was not specified.
487 if test -z "$srcdir"; then
488   ac_srcdir_defaulted=yes
489   # Try the directory containing this script, then its parent.
490   ac_prog=$0
491   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
492   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
493   srcdir=$ac_confdir
494   if test ! -r $srcdir/$ac_unique_file; then
495     srcdir=..
496   fi
497 else
498   ac_srcdir_defaulted=no
499 fi
500 if test ! -r $srcdir/$ac_unique_file; then
501   if test "$ac_srcdir_defaulted" = yes; then
502     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
503   else
504     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
505   fi
506 fi
507 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
508
509 # Prefer explicitly selected file to automatically selected ones.
510 if test -z "$CONFIG_SITE"; then
511   if test "x$prefix" != xNONE; then
512     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
513   else
514     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
515   fi
516 fi
517 for ac_site_file in $CONFIG_SITE; do
518   if test -r "$ac_site_file"; then
519     echo "loading site script $ac_site_file"
520     . "$ac_site_file"
521   fi
522 done
523
524 if test -r "$cache_file"; then
525   echo "loading cache $cache_file"
526   . $cache_file
527 else
528   echo "creating cache $cache_file"
529   > $cache_file
530 fi
531
532 ac_ext=c
533 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
534 ac_cpp='$CPP $CPPFLAGS'
535 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
536 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
537 cross_compiling=$ac_cv_prog_cc_cross
538
539 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
540   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
541   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
542     ac_n= ac_c='
543 ' ac_t='        '
544   else
545     ac_n=-n ac_c= ac_t=
546   fi
547 else
548   ac_n= ac_c='\c' ac_t=
549 fi
550
551
552
553
554 ac_aux_dir=
555 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
556   if test -f $ac_dir/install-sh; then
557     ac_aux_dir=$ac_dir
558     ac_install_sh="$ac_aux_dir/install-sh -c"
559     break
560   elif test -f $ac_dir/install.sh; then
561     ac_aux_dir=$ac_dir
562     ac_install_sh="$ac_aux_dir/install.sh -c"
563     break
564   fi
565 done
566 if test -z "$ac_aux_dir"; then
567   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
568 fi
569 ac_config_guess=$ac_aux_dir/config.guess
570 ac_config_sub=$ac_aux_dir/config.sub
571 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
572
573
574 # Make sure we can run config.sub.
575 if $ac_config_sub sun4 >/dev/null 2>&1; then :
576 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
577 fi
578
579 echo $ac_n "checking host system type""... $ac_c" 1>&6
580 echo "configure:581: checking host system type" >&5
581
582 host_alias=$host
583 case "$host_alias" in
584 NONE)
585   case $nonopt in
586   NONE)
587     if host_alias=`$ac_config_guess`; then :
588     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
589     fi ;;
590   *) host_alias=$nonopt ;;
591   esac ;;
592 esac
593
594 host=`$ac_config_sub $host_alias`
595 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
596 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
597 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
598 echo "$ac_t""$host" 1>&6
599
600
601 tas_file=dummy.s
602 case "$host_os" in
603  solaris*)
604         case "$host_cpu" in
605           sparc) os=solaris_sparc need_tas=yes tas_file=solaris_sparc.s ;;
606            i386) os=solaris_sparc need_tas=yes tas_file=solaris_i386.s ;;
607         esac ;;
608    sunos*) os=sunos4 need_tas=no ;;
609      aux*) os=aux need_tas=no ;;
610    linux*) os=linux need_tas=no ;;
611     bsdi*) os=bsdi need_tas=no ;;
612  freebsd*|netbsd*|openbsd*) os=bsd need_tas=no ;;
613     dgux*) os=dgux need_tas=no ;;
614      aix*) os=aix need_tas=no ;;
615 nextstep*) os=nextstep need_tas=no ;;
616   ultrix*) os=ultrix4 need_tas=no ;;
617     irix*) os=irix5 need_tas=no ;;
618     hpux*) os=hpux need_tas=yes tas_file=hpux.s ;;
619      osf*) os=alpha need_tas=no ;;
620      sco*) os=sco need_tas=no ;;
621  machten*) os=machten need_tas=no ;;
622   cygwin*) os=win need_tas=no ;;
623  sysv4.2*)
624        case "$host_vendor" in
625                univel) os=univel need_tas=no ;;
626                     *) os=unknown need_tas=no ;;
627        esac ;;
628    sysv4*) os=svr4 need_tas=no ;;
629    sysv5*) os=unixware need_tas=no ;;
630 *) echo ""
631    echo "*************************************************************"
632    echo "configure does not currently recognize your operating system,"
633    echo "therefore you must do a manual configuration of:"
634    echo "$host_os"
635    echo "Please contact scrappy@hub.org to see about rectifying this, "
636    echo "including the above 'checking host system type...' line "
637    echo "*************************************************************"
638    echo ""
639    exit;;
640 esac
641
642 if test "X$need_tas" = "Xyes"
643 then
644         
645         TAS=tas.o
646         
647 fi
648
649 PORTNAME=${os}
650
651
652
653
654
655
656
657 echo "checking echo setting..."
658 if echo '\c' | grep -s c >/dev/null 2>&1
659 then
660         ECHO_N="echo -n"
661         ECHO_C=""
662 else
663         ECHO_N="echo"
664         ECHO_C='\c'
665 fi
666
667
668 echo $ac_n "checking setting template to""... $ac_c" 1>&6
669 echo "configure:670: checking setting template to" >&5
670 # Check whether --with-template or --without-template was given.
671 if test "${with_template+set}" = set; then
672   withval="$with_template"
673     TEMPLATE=$withval 
674 else
675     host_no_ver=`echo "$host" | sed 's/[0-9.]*$//'`
676        GUESS=`grep "$host_no_ver" template/.similar | sed 's/.*=//' | tail -1`
677        if test "$GUESS"
678        then     TEMPLATE="$GUESS"
679        else     TEMPLATE=`uname -s | tr A-Z a-z` 
680        fi
681     
682 fi
683
684 echo "$ac_t""$TEMPLATE" 1>&6
685
686 export TEMPLATE
687 if test ! -f "template/$TEMPLATE"; then
688         echo ""
689         echo "$TEMPLATE does not exist"
690         echo ""
691         echo "Available Templates (set using --with-template):"
692         echo ""
693         ls template
694         echo ""
695         exit
696 fi
697
698 AROPT=`grep '^AROPT:' template/$TEMPLATE | awk -F: '{print $2}'`
699 SHARED_LIB=`grep '^SHARED_LIB:' template/$TEMPLATE | awk -F: '{print $2}'`
700 CFLAGS=`grep '^CFLAGS:' template/$TEMPLATE | awk -F: '{print $2}'`
701 SRCH_INC=`grep '^SRCH_INC:' template/$TEMPLATE | awk -F: '{print $2}'`
702 SRCH_LIB=`grep '^SRCH_LIB:' template/$TEMPLATE | awk -F: '{print $2}'`
703 USE_LOCALE=`grep '^USE_LOCALE:' template/$TEMPLATE | awk -F: '{print $2}'`
704 DLSUFFIX=`grep '^DLSUFFIX:' template/$TEMPLATE | awk -F: '{print $2}'`
705 DL_LIB=`grep '^DL_LIB:' template/$TEMPLATE | awk -F: '{print $2}'`
706 YACC=`grep '^YACC:' template/$TEMPLATE | awk -F: '{print $2}'`
707 YFLAGS=`grep '^YFLAGS:' template/$TEMPLATE | awk -F: '{print $2}'`
708 CC=`grep '^CC:' template/$TEMPLATE | awk -F: '{print $2}'`
709 LIBS=`grep '^LIBS:' template/$TEMPLATE | awk -F: '{print $2}'`
710
711
712 # Check whether --with-includes or --without-includes was given.
713 if test "${with_includes+set}" = set; then
714   withval="$with_includes"
715   
716         case "$withval" in
717         "" | y | ye | yes | n | no)
718             { echo "configure: error: *** You must supply an argument to the --with-includes option." 1>&2; exit 1; }
719           ;;
720         esac
721         INCLUDE_DIRS="$withval"
722     
723 fi
724
725
726 if test "$INCLUDE_DIRS"; then
727         for dir in $INCLUDE_DIRS; do
728                 if test -d "$dir"; then
729                         PGSQL_CPPFLAGS="$PGSQL_CPPFLAGS -I$dir"
730                 else
731                         echo "configure: warning: *** Include directory $dir does not exist." 1>&2
732                 fi
733         done
734 fi
735
736 # Check whether --with-libs or --without-libs was given.
737 if test "${with_libs+set}" = set; then
738   withval="$with_libs"
739   
740         case "$withval" in
741         "" | y | ye | yes | n | no)
742             { echo "configure: error: *** You must supply an argument to the --with-libs option." 1>&2; exit 1; }
743           ;;
744         esac
745         LIBRARY_DIRS="$withval"
746     
747 fi
748
749
750 # Check whether --with-libraries or --without-libraries was given.
751 if test "${with_libraries+set}" = set; then
752   withval="$with_libraries"
753   
754         case "$withval" in
755         "" | y | ye | yes | n | no)
756             { echo "configure: error: *** You must supply an argument to the --with-libraries option." 1>&2; exit 1; }
757           ;;
758         esac
759         LIBRARY_DIRS="$withval"
760     
761 fi
762
763
764 if test "$LIBRARY_DIRS"; then
765         for dir in $LIBRARY_DIRS; do
766                 if test -d "$dir"; then
767                         PGSQL_LDFLAGS="$PGSQL_LDFLAGS -L$dir"
768                 else
769                         echo "configure: warning: *** Library directory $dir does not exist." 1>&2
770                 fi
771         done
772 fi
773
774 echo $ac_n "checking setting USE_LOCALE""... $ac_c" 1>&6
775 echo "configure:776: checking setting USE_LOCALE" >&5
776 # Check whether --enable-locale or --disable-locale was given.
777 if test "${enable_locale+set}" = set; then
778   enableval="$enable_locale"
779   cat >> confdefs.h <<\EOF
780 #define USE_LOCALE 1
781 EOF
782  echo "$ac_t""enabled" 1>&6
783 else
784   echo "$ac_t""disabled" 1>&6
785
786 fi
787
788
789 echo $ac_n "checking setting CYR_RECODE""... $ac_c" 1>&6
790 echo "configure:791: checking setting CYR_RECODE" >&5
791 # Check whether --enable-recode or --disable-recode was given.
792 if test "${enable_recode+set}" = set; then
793   enableval="$enable_recode"
794   cat >> confdefs.h <<\EOF
795 #define CYR_RECODE 1
796 EOF
797  echo "$ac_t""enabled" 1>&6
798 else
799   echo "$ac_t""disabled" 1>&6
800
801 fi
802
803
804 echo $ac_n "checking setting MULTIBYTE""... $ac_c" 1>&6
805 echo "configure:806: checking setting MULTIBYTE" >&5
806 # Check whether --with-mb or --without-mb was given.
807 if test "${with_mb+set}" = set; then
808   withval="$with_mb"
809   
810         case "$withval" in
811         EUC_JP|EHC_CN|EUC_KR|EUC_TW|UNICODE|MULE_INTERNAL|LATIN1|LATIN2|LATIN3|LATIN4|LATIN5)
812             echo "$ac_t"""enabled with $withval"" 1>&6
813             ;;
814         *)
815             { echo "configure: error: *** You must supply an argument to the --with-mb option one of EUC_JP,EHC_CN,EUC_KR,EUC_TW,UNICODE,MULE_INTERNAL,LATIN1-5" 1>&2; exit 1; }
816           ;;
817         esac
818         MULTIBYTE="$withval"
819     
820 else
821   echo "$ac_t"""disabled"" 1>&6
822
823 fi
824
825
826 echo $ac_n "checking setting DEF_PGPORT""... $ac_c" 1>&6
827 echo "configure:828: checking setting DEF_PGPORT" >&5
828 # Check whether --with-pgport or --without-pgport was given.
829 if test "${with_pgport+set}" = set; then
830   withval="$with_pgport"
831   cat >> confdefs.h <<EOF
832 #define DEF_PGPORT "${withval}"
833 EOF
834  echo "$ac_t""$with_pgport" 1>&6
835 else
836   cat >> confdefs.h <<EOF
837 #define DEF_PGPORT "5432"
838 EOF
839  echo "$ac_t""5432" 1>&6
840
841 fi
842
843
844 echo $ac_n "checking setting USE_TCL""... $ac_c" 1>&6
845 echo "configure:846: checking setting USE_TCL" >&5
846 # Check whether --with-tcl or --without-tcl was given.
847 if test "${with_tcl+set}" = set; then
848   withval="$with_tcl"
849   USE_TCL=true; echo "$ac_t""enabled" 1>&6
850 else
851   USE_TCL=false; echo "$ac_t""disabled" 1>&6
852
853 fi
854
855
856 if test "$USE_TCL"; then
857         header_dirs="/usr/include $INCLUDE_DIRS"
858         tcl_dirs="tcl8.0 tcl80 tcl7.6 tcl76"
859         tk_dirs="tk8.0 tk4.2"
860         for dir in $header_dirs; do
861                 for tcl_dir in $tcl_dirs; do
862                         if test -d "$dir/$tcl_dir"; then
863                                 PGSQL_CPPFLAGS="$PGSQL_CPPFLAGS -I$dir/$tcl_dir"
864                         fi
865                 done
866         done
867         for dir in $header_dirs; do
868                 for tk_dir in $tk_dirs; do
869                         if test -d "$dir/$tk_dir"; then
870                         PGSQL_CPPFLAGS="$PGSQL_CPPFLAGS -I$dir/$tk_dir"
871                         fi
872                 done
873         done
874 fi
875 export USE_TCL
876 USE_X=$USE_TCL
877
878 echo $ac_n "checking setting USE_PERL""... $ac_c" 1>&6
879 echo "configure:880: checking setting USE_PERL" >&5
880 # Check whether --with-perl or --without-perl was given.
881 if test "${with_perl+set}" = set; then
882   withval="$with_perl"
883   USE_PERL=true; echo "$ac_t""enabled" 1>&6
884 else
885   USE_PERL=false; echo "$ac_t""disabled" 1>&6
886
887 fi
888
889
890 #dnl Verify that postgres is already installed
891 #dnl per instructions for perl interface installation
892 #if test "$USE_PERL" = "true"
893 #then
894 #       if test ! -x "$prefix"/bin/postgres -a ! -x "$ac_default_prefix"/bin/postgres
895 #       then    AC_MSG_WARN(perl support disabled; postgres not previously installed)
896 #               USE_PERL=
897 #       fi
898 #fi
899 export USE_PERL
900
901 echo $ac_n "checking setting ASSERT CHECKING""... $ac_c" 1>&6
902 echo "configure:903: checking setting ASSERT CHECKING" >&5
903 # Check whether --enable-cassert or --disable-cassert was given.
904 if test "${enable_cassert+set}" = set; then
905   enableval="$enable_cassert"
906   cat >> confdefs.h <<\EOF
907 #define USE_ASSERT_CHECKING 1
908 EOF
909  echo "$ac_t""enabled" 1>&6
910 else
911   echo "$ac_t""disabled" 1>&6
912
913 fi
914
915
916 # Check whether --with-CC or --without-CC was given.
917 if test "${with_CC+set}" = set; then
918   withval="$with_CC"
919   
920         case "$withval" in
921         "" | y | ye | yes | n | no)
922             { echo "configure: error: *** You must supply an argument to the --with-CC option." 1>&2; exit 1; }
923           ;;
924         esac
925         CC="$withval"
926     
927 else
928      # Extract the first word of "gcc", so it can be a program name with args.
929 set dummy gcc; ac_word=$2
930 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
931 echo "configure:932: checking for $ac_word" >&5
932 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
933   echo $ac_n "(cached) $ac_c" 1>&6
934 else
935   if test -n "$CC"; then
936   ac_cv_prog_CC="$CC" # Let the user override the test.
937 else
938   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
939   for ac_dir in $PATH; do
940     test -z "$ac_dir" && ac_dir=.
941     if test -f $ac_dir/$ac_word; then
942       ac_cv_prog_CC="gcc"
943       break
944     fi
945   done
946   IFS="$ac_save_ifs"
947 fi
948 fi
949 CC="$ac_cv_prog_CC"
950 if test -n "$CC"; then
951   echo "$ac_t""$CC" 1>&6
952 else
953   echo "$ac_t""no" 1>&6
954 fi
955
956 if test -z "$CC"; then
957   # Extract the first word of "cc", so it can be a program name with args.
958 set dummy cc; ac_word=$2
959 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
960 echo "configure:961: checking for $ac_word" >&5
961 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
962   echo $ac_n "(cached) $ac_c" 1>&6
963 else
964   if test -n "$CC"; then
965   ac_cv_prog_CC="$CC" # Let the user override the test.
966 else
967   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
968   ac_prog_rejected=no
969   for ac_dir in $PATH; do
970     test -z "$ac_dir" && ac_dir=.
971     if test -f $ac_dir/$ac_word; then
972       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
973         ac_prog_rejected=yes
974         continue
975       fi
976       ac_cv_prog_CC="cc"
977       break
978     fi
979   done
980   IFS="$ac_save_ifs"
981 if test $ac_prog_rejected = yes; then
982   # We found a bogon in the path, so make sure we never use it.
983   set dummy $ac_cv_prog_CC
984   shift
985   if test $# -gt 0; then
986     # We chose a different compiler from the bogus one.
987     # However, it has the same basename, so the bogon will be chosen
988     # first if we set CC to just the basename; use the full file name.
989     shift
990     set dummy "$ac_dir/$ac_word" "$@"
991     shift
992     ac_cv_prog_CC="$@"
993   fi
994 fi
995 fi
996 fi
997 CC="$ac_cv_prog_CC"
998 if test -n "$CC"; then
999   echo "$ac_t""$CC" 1>&6
1000 else
1001   echo "$ac_t""no" 1>&6
1002 fi
1003
1004   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1005 fi
1006
1007 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1008 echo "configure:1009: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1009
1010 ac_ext=c
1011 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1012 ac_cpp='$CPP $CPPFLAGS'
1013 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1014 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1015 cross_compiling=$ac_cv_prog_cc_cross
1016
1017 cat > conftest.$ac_ext <<EOF
1018 #line 1019 "configure"
1019 #include "confdefs.h"
1020 main(){return(0);}
1021 EOF
1022 if { (eval echo configure:1023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1023   ac_cv_prog_cc_works=yes
1024   # If we can't run a trivial program, we are probably using a cross compiler.
1025   if (./conftest; exit) 2>/dev/null; then
1026     ac_cv_prog_cc_cross=no
1027   else
1028     ac_cv_prog_cc_cross=yes
1029   fi
1030 else
1031   echo "configure: failed program was:" >&5
1032   cat conftest.$ac_ext >&5
1033   ac_cv_prog_cc_works=no
1034 fi
1035 rm -fr conftest*
1036
1037 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1038 if test $ac_cv_prog_cc_works = no; then
1039   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1040 fi
1041 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1042 echo "configure:1043: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1043 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1044 cross_compiling=$ac_cv_prog_cc_cross
1045
1046 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1047 echo "configure:1048: checking whether we are using GNU C" >&5
1048 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1049   echo $ac_n "(cached) $ac_c" 1>&6
1050 else
1051   cat > conftest.c <<EOF
1052 #ifdef __GNUC__
1053   yes;
1054 #endif
1055 EOF
1056 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1057: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1057   ac_cv_prog_gcc=yes
1058 else
1059   ac_cv_prog_gcc=no
1060 fi
1061 fi
1062
1063 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1064
1065 if test $ac_cv_prog_gcc = yes; then
1066   GCC=yes
1067   ac_test_CFLAGS="${CFLAGS+set}"
1068   ac_save_CFLAGS="$CFLAGS"
1069   CFLAGS=
1070   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1071 echo "configure:1072: checking whether ${CC-cc} accepts -g" >&5
1072 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1073   echo $ac_n "(cached) $ac_c" 1>&6
1074 else
1075   echo 'void f(){}' > conftest.c
1076 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1077   ac_cv_prog_cc_g=yes
1078 else
1079   ac_cv_prog_cc_g=no
1080 fi
1081 rm -f conftest*
1082
1083 fi
1084
1085 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1086   if test "$ac_test_CFLAGS" = set; then
1087     CFLAGS="$ac_save_CFLAGS"
1088   elif test $ac_cv_prog_cc_g = yes; then
1089     CFLAGS="-g -O2"
1090   else
1091     CFLAGS="-O2"
1092   fi
1093 else
1094   GCC=
1095   test "${CFLAGS+set}" = set || CFLAGS="-g"
1096 fi
1097
1098 fi
1099
1100
1101 if test "$CC" = "gcc"
1102 then
1103         CC_VERSION=`${CC} --version`
1104 else
1105         CC_VERSION=""
1106 fi
1107
1108
1109 CPPFLAGS="$CPPFLAGS $PGSQL_CPPFLAGS"
1110 export CPPFLAGS
1111 echo "- setting CPPFLAGS=$CPPFLAGS"
1112
1113 LDFLAGS="$LDFLAGS $PGSQL_LDFLAGS"
1114 export LDFLAGS
1115 echo "- setting LDFLAGS=$LDFLAGS"
1116
1117
1118
1119 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1120 echo "configure:1121: checking how to run the C preprocessor" >&5
1121 # On Suns, sometimes $CPP names a directory.
1122 if test -n "$CPP" && test -d "$CPP"; then
1123   CPP=
1124 fi
1125 if test -z "$CPP"; then
1126 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1127   echo $ac_n "(cached) $ac_c" 1>&6
1128 else
1129     # This must be in double quotes, not single quotes, because CPP may get
1130   # substituted into the Makefile and "${CC-cc}" will confuse make.
1131   CPP="${CC-cc} -E"
1132   # On the NeXT, cc -E runs the code through the compiler's parser,
1133   # not just through cpp.
1134   cat > conftest.$ac_ext <<EOF
1135 #line 1136 "configure"
1136 #include "confdefs.h"
1137 #include <assert.h>
1138 Syntax Error
1139 EOF
1140 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1141 { (eval echo configure:1142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1142 ac_err=`grep -v '^ *+' conftest.out`
1143 if test -z "$ac_err"; then
1144   :
1145 else
1146   echo "$ac_err" >&5
1147   echo "configure: failed program was:" >&5
1148   cat conftest.$ac_ext >&5
1149   rm -rf conftest*
1150   CPP="${CC-cc} -E -traditional-cpp"
1151   cat > conftest.$ac_ext <<EOF
1152 #line 1153 "configure"
1153 #include "confdefs.h"
1154 #include <assert.h>
1155 Syntax Error
1156 EOF
1157 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1158 { (eval echo configure:1159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1159 ac_err=`grep -v '^ *+' conftest.out`
1160 if test -z "$ac_err"; then
1161   :
1162 else
1163   echo "$ac_err" >&5
1164   echo "configure: failed program was:" >&5
1165   cat conftest.$ac_ext >&5
1166   rm -rf conftest*
1167   CPP=/lib/cpp
1168 fi
1169 rm -f conftest*
1170 fi
1171 rm -f conftest*
1172   ac_cv_prog_CPP="$CPP"
1173 fi
1174   CPP="$ac_cv_prog_CPP"
1175 else
1176   ac_cv_prog_CPP="$CPP"
1177 fi
1178 echo "$ac_t""$CPP" 1>&6
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193 HAVECXX='HAVE_Cplusplus=true'
1194 # Check whether --with-CXX or --without-CXX was given.
1195 if test "${with_CXX+set}" = set; then
1196   withval="$with_CXX"
1197   
1198         case "$withval" in
1199         "" | y | ye | yes)
1200             { echo "configure: error: *** You must supply an argument to the --with-CC option." 1>&2; exit 1; }
1201           ;;
1202         n | no)
1203             HAVECXX='HAVE_Cplusplus=false'
1204           ;;
1205         esac
1206         CXX="$withval"
1207     
1208 else
1209      for ac_prog in $CCC c++ g++ gcc CC cxx cc++
1210 do
1211 # Extract the first word of "$ac_prog", so it can be a program name with args.
1212 set dummy $ac_prog; ac_word=$2
1213 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1214 echo "configure:1215: checking for $ac_word" >&5
1215 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1216   echo $ac_n "(cached) $ac_c" 1>&6
1217 else
1218   if test -n "$CXX"; then
1219   ac_cv_prog_CXX="$CXX" # Let the user override the test.
1220 else
1221   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1222   for ac_dir in $PATH; do
1223     test -z "$ac_dir" && ac_dir=.
1224     if test -f $ac_dir/$ac_word; then
1225       ac_cv_prog_CXX="$ac_prog"
1226       break
1227     fi
1228   done
1229   IFS="$ac_save_ifs"
1230 fi
1231 fi
1232 CXX="$ac_cv_prog_CXX"
1233 if test -n "$CXX"; then
1234   echo "$ac_t""$CXX" 1>&6
1235 else
1236   echo "$ac_t""no" 1>&6
1237 fi
1238
1239 test -n "$CXX" && break
1240 done
1241 test -n "$CXX" || CXX="gcc"
1242
1243
1244 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1245 echo "configure:1246: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
1246
1247 ac_ext=C
1248 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1249 ac_cpp='$CXXCPP $CPPFLAGS'
1250 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1251 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1252 cross_compiling=$ac_cv_prog_cxx_cross
1253
1254 cat > conftest.$ac_ext <<EOF
1255 #line 1256 "configure"
1256 #include "confdefs.h"
1257 main(){return(0);}
1258 EOF
1259 if { (eval echo configure:1260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1260   ac_cv_prog_cxx_works=yes
1261   # If we can't run a trivial program, we are probably using a cross compiler.
1262   if (./conftest; exit) 2>/dev/null; then
1263     ac_cv_prog_cxx_cross=no
1264   else
1265     ac_cv_prog_cxx_cross=yes
1266   fi
1267 else
1268   echo "configure: failed program was:" >&5
1269   cat conftest.$ac_ext >&5
1270   ac_cv_prog_cxx_works=no
1271 fi
1272 rm -fr conftest*
1273 ac_ext=c
1274 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1275 ac_cpp='$CPP $CPPFLAGS'
1276 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1277 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1278 cross_compiling=$ac_cv_prog_cc_cross
1279
1280 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
1281 if test $ac_cv_prog_cxx_works = no; then
1282   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
1283 fi
1284 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1285 echo "configure:1286: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1286 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1287 cross_compiling=$ac_cv_prog_cxx_cross
1288
1289 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1290 echo "configure:1291: checking whether we are using GNU C++" >&5
1291 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1292   echo $ac_n "(cached) $ac_c" 1>&6
1293 else
1294   cat > conftest.C <<EOF
1295 #ifdef __GNUC__
1296   yes;
1297 #endif
1298 EOF
1299 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1300   ac_cv_prog_gxx=yes
1301 else
1302   ac_cv_prog_gxx=no
1303 fi
1304 fi
1305
1306 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1307
1308 if test $ac_cv_prog_gxx = yes; then
1309   GXX=yes
1310   ac_test_CXXFLAGS="${CXXFLAGS+set}"
1311   ac_save_CXXFLAGS="$CXXFLAGS"
1312   CXXFLAGS=
1313   echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1314 echo "configure:1315: checking whether ${CXX-g++} accepts -g" >&5
1315 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1316   echo $ac_n "(cached) $ac_c" 1>&6
1317 else
1318   echo 'void f(){}' > conftest.cc
1319 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1320   ac_cv_prog_cxx_g=yes
1321 else
1322   ac_cv_prog_cxx_g=no
1323 fi
1324 rm -f conftest*
1325
1326 fi
1327
1328 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1329   if test "$ac_test_CXXFLAGS" = set; then
1330     CXXFLAGS="$ac_save_CXXFLAGS"
1331   elif test $ac_cv_prog_cxx_g = yes; then
1332     CXXFLAGS="-g -O2"
1333   else
1334     CXXFLAGS="-O2"
1335   fi
1336 else
1337   GXX=
1338   test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
1339 fi
1340
1341 fi
1342
1343
1344
1345 INSTALLPATH="/usr/ucb:$PATH"
1346 for ac_prog in ginstall installbsd bsdinst scoinst install
1347 do
1348 # Extract the first word of "$ac_prog", so it can be a program name with args.
1349 set dummy $ac_prog; ac_word=$2
1350 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1351 echo "configure:1352: checking for $ac_word" >&5
1352 if eval "test \"`echo '$''{'ac_cv_path_INSTALL'+set}'`\" = set"; then
1353   echo $ac_n "(cached) $ac_c" 1>&6
1354 else
1355   case "$INSTALL" in
1356   /*)
1357   ac_cv_path_INSTALL="$INSTALL" # Let the user override the test with a path.
1358   ;;
1359   *)
1360   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1361   for ac_dir in $INSTALLPATH$ac_dummy; do
1362     test -z "$ac_dir" && ac_dir=.
1363     if test -f $ac_dir/$ac_word; then
1364       ac_cv_path_INSTALL="$ac_dir/$ac_word"
1365       break
1366     fi
1367   done
1368   IFS="$ac_save_ifs"
1369   ;;
1370 esac
1371 fi
1372 INSTALL="$ac_cv_path_INSTALL"
1373 if test -n "$INSTALL"; then
1374   echo "$ac_t""$INSTALL" 1>&6
1375 else
1376   echo "$ac_t""no" 1>&6
1377 fi
1378
1379 test -n "$INSTALL" && break
1380 done
1381 test -n "$INSTALL" || INSTALL="NONE"
1382
1383 if test $INSTALL = "NONE"
1384 then
1385         echo "- No Install Script found - aborting."
1386         exit 0;
1387 fi
1388
1389 INSTLOPTS="-m 444"
1390 INSTL_EXE_OPTS="-m 555"
1391 INSTL_LIB_OPTS="-m 644"
1392 INSTL_SHLIB_OPTS="-m 644"
1393
1394 case "$host_os" in
1395  hpux*)
1396         INSTL_SHLIB_OPTS="-m 555" ;;
1397 esac
1398
1399 case "`basename $INSTALL`" in
1400  install|installbsd|scoinst)
1401         INSTLOPTS="-c $INSTLOPTS"
1402         INSTL_EXE_OPTS="-c $INSTL_EXE_OPTS"
1403         INSTL_LIB_OPTS="-c $INSTL_LIB_OPTS"
1404         INSTL_SHLIB_OPTS="-c $INSTL_SHLIB_OPTS";;
1405 esac
1406
1407 echo "- Using $INSTALL"
1408
1409
1410
1411
1412
1413
1414 ECHO_N_OUT=`echo -n "" | wc -c`
1415 ECHO_C_OUT=`echo "\c" | wc -c`
1416 if test "$ECHO_N_OUT" -eq 0; then
1417         DASH_N='-n'
1418         BACKSLASH_C=
1419 else
1420         if test "ECHO_C_OUT" -eq 0; then
1421                 DASH_N=
1422                 BACKSLASH_C='\\\\c'
1423         else
1424                 { echo "configure: error: "echo behaviour undetermined"" 1>&2; exit 1; }
1425         fi
1426 fi
1427
1428
1429
1430 # Extract the first word of "flex", so it can be a program name with args.
1431 set dummy flex; ac_word=$2
1432 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1433 echo "configure:1434: checking for $ac_word" >&5
1434 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1435   echo $ac_n "(cached) $ac_c" 1>&6
1436 else
1437   if test -n "$LEX"; then
1438   ac_cv_prog_LEX="$LEX" # Let the user override the test.
1439 else
1440   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1441   for ac_dir in $PATH; do
1442     test -z "$ac_dir" && ac_dir=.
1443     if test -f $ac_dir/$ac_word; then
1444       ac_cv_prog_LEX="flex"
1445       break
1446     fi
1447   done
1448   IFS="$ac_save_ifs"
1449   test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1450 fi
1451 fi
1452 LEX="$ac_cv_prog_LEX"
1453 if test -n "$LEX"; then
1454   echo "$ac_t""$LEX" 1>&6
1455 else
1456   echo "$ac_t""no" 1>&6
1457 fi
1458
1459 if test -z "$LEXLIB"
1460 then
1461   case "$LEX" in
1462   flex*) ac_lib=fl ;;
1463   *) ac_lib=l ;;
1464   esac
1465   echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1466 echo "configure:1467: checking for yywrap in -l$ac_lib" >&5
1467 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1468 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1469   echo $ac_n "(cached) $ac_c" 1>&6
1470 else
1471   ac_save_LIBS="$LIBS"
1472 LIBS="-l$ac_lib  $LIBS"
1473 cat > conftest.$ac_ext <<EOF
1474 #line 1475 "configure"
1475 #include "confdefs.h"
1476 /* Override any gcc2 internal prototype to avoid an error.  */
1477 /* We use char because int might match the return type of a gcc2
1478     builtin and then its argument prototype would still apply.  */
1479 char yywrap();
1480
1481 int main() {
1482 yywrap()
1483 ; return 0; }
1484 EOF
1485 if { (eval echo configure:1486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1486   rm -rf conftest*
1487   eval "ac_cv_lib_$ac_lib_var=yes"
1488 else
1489   echo "configure: failed program was:" >&5
1490   cat conftest.$ac_ext >&5
1491   rm -rf conftest*
1492   eval "ac_cv_lib_$ac_lib_var=no"
1493 fi
1494 rm -f conftest*
1495 LIBS="$ac_save_LIBS"
1496
1497 fi
1498 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1499   echo "$ac_t""yes" 1>&6
1500   LEXLIB="-l$ac_lib"
1501 else
1502   echo "$ac_t""no" 1>&6
1503 fi
1504
1505 fi
1506
1507 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1508 echo "configure:1509: checking whether ln -s works" >&5
1509 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1510   echo $ac_n "(cached) $ac_c" 1>&6
1511 else
1512   rm -f conftestdata
1513 if ln -s X conftestdata 2>/dev/null
1514 then
1515   rm -f conftestdata
1516   ac_cv_prog_LN_S="ln -s"
1517 else
1518   ac_cv_prog_LN_S=ln
1519 fi
1520 fi
1521 LN_S="$ac_cv_prog_LN_S"
1522 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1523   echo "$ac_t""yes" 1>&6
1524 else
1525   echo "$ac_t""no" 1>&6
1526 fi
1527
1528 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1529 echo "configure:1530: checking whether ${MAKE-make} sets \${MAKE}" >&5
1530 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1531 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1532   echo $ac_n "(cached) $ac_c" 1>&6
1533 else
1534   cat > conftestmake <<\EOF
1535 all:
1536         @echo 'ac_maketemp="${MAKE}"'
1537 EOF
1538 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1539 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1540 if test -n "$ac_maketemp"; then
1541   eval ac_cv_prog_make_${ac_make}_set=yes
1542 else
1543   eval ac_cv_prog_make_${ac_make}_set=no
1544 fi
1545 rm -f conftestmake
1546 fi
1547 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1548   echo "$ac_t""yes" 1>&6
1549   SET_MAKE=
1550 else
1551   echo "$ac_t""no" 1>&6
1552   SET_MAKE="MAKE=${MAKE-make}"
1553 fi
1554
1555 # Extract the first word of "ranlib", so it can be a program name with args.
1556 set dummy ranlib; ac_word=$2
1557 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1558 echo "configure:1559: checking for $ac_word" >&5
1559 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1560   echo $ac_n "(cached) $ac_c" 1>&6
1561 else
1562   if test -n "$RANLIB"; then
1563   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1564 else
1565   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1566   for ac_dir in $PATH; do
1567     test -z "$ac_dir" && ac_dir=.
1568     if test -f $ac_dir/$ac_word; then
1569       ac_cv_prog_RANLIB="ranlib"
1570       break
1571     fi
1572   done
1573   IFS="$ac_save_ifs"
1574   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1575 fi
1576 fi
1577 RANLIB="$ac_cv_prog_RANLIB"
1578 if test -n "$RANLIB"; then
1579   echo "$ac_t""$RANLIB" 1>&6
1580 else
1581   echo "$ac_t""no" 1>&6
1582 fi
1583
1584 # Extract the first word of "find", so it can be a program name with args.
1585 set dummy find; ac_word=$2
1586 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1587 echo "configure:1588: checking for $ac_word" >&5
1588 if eval "test \"`echo '$''{'ac_cv_path_find'+set}'`\" = set"; then
1589   echo $ac_n "(cached) $ac_c" 1>&6
1590 else
1591   case "$find" in
1592   /*)
1593   ac_cv_path_find="$find" # Let the user override the test with a path.
1594   ;;
1595   *)
1596   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1597   for ac_dir in $PATH; do
1598     test -z "$ac_dir" && ac_dir=.
1599     if test -f $ac_dir/$ac_word; then
1600       ac_cv_path_find="$ac_dir/$ac_word"
1601       break
1602     fi
1603   done
1604   IFS="$ac_save_ifs"
1605   ;;
1606 esac
1607 fi
1608 find="$ac_cv_path_find"
1609 if test -n "$find"; then
1610   echo "$ac_t""$find" 1>&6
1611 else
1612   echo "$ac_t""no" 1>&6
1613 fi
1614
1615 # Extract the first word of "tar", so it can be a program name with args.
1616 set dummy tar; ac_word=$2
1617 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1618 echo "configure:1619: checking for $ac_word" >&5
1619 if eval "test \"`echo '$''{'ac_cv_path_tar'+set}'`\" = set"; then
1620   echo $ac_n "(cached) $ac_c" 1>&6
1621 else
1622   case "$tar" in
1623   /*)
1624   ac_cv_path_tar="$tar" # Let the user override the test with a path.
1625   ;;
1626   *)
1627   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1628   for ac_dir in $PATH; do
1629     test -z "$ac_dir" && ac_dir=.
1630     if test -f $ac_dir/$ac_word; then
1631       ac_cv_path_tar="$ac_dir/$ac_word"
1632       break
1633     fi
1634   done
1635   IFS="$ac_save_ifs"
1636   ;;
1637 esac
1638 fi
1639 tar="$ac_cv_path_tar"
1640 if test -n "$tar"; then
1641   echo "$ac_t""$tar" 1>&6
1642 else
1643   echo "$ac_t""no" 1>&6
1644 fi
1645
1646 # Extract the first word of "split", so it can be a program name with args.
1647 set dummy split; ac_word=$2
1648 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1649 echo "configure:1650: checking for $ac_word" >&5
1650 if eval "test \"`echo '$''{'ac_cv_path_split'+set}'`\" = set"; then
1651   echo $ac_n "(cached) $ac_c" 1>&6
1652 else
1653   case "$split" in
1654   /*)
1655   ac_cv_path_split="$split" # Let the user override the test with a path.
1656   ;;
1657   *)
1658   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1659   for ac_dir in $PATH; do
1660     test -z "$ac_dir" && ac_dir=.
1661     if test -f $ac_dir/$ac_word; then
1662       ac_cv_path_split="$ac_dir/$ac_word"
1663       break
1664     fi
1665   done
1666   IFS="$ac_save_ifs"
1667   ;;
1668 esac
1669 fi
1670 split="$ac_cv_path_split"
1671 if test -n "$split"; then
1672   echo "$ac_t""$split" 1>&6
1673 else
1674   echo "$ac_t""no" 1>&6
1675 fi
1676
1677 # Extract the first word of "etags", so it can be a program name with args.
1678 set dummy etags; ac_word=$2
1679 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1680 echo "configure:1681: checking for $ac_word" >&5
1681 if eval "test \"`echo '$''{'ac_cv_path_etags'+set}'`\" = set"; then
1682   echo $ac_n "(cached) $ac_c" 1>&6
1683 else
1684   case "$etags" in
1685   /*)
1686   ac_cv_path_etags="$etags" # Let the user override the test with a path.
1687   ;;
1688   *)
1689   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1690   for ac_dir in $PATH; do
1691     test -z "$ac_dir" && ac_dir=.
1692     if test -f $ac_dir/$ac_word; then
1693       ac_cv_path_etags="$ac_dir/$ac_word"
1694       break
1695     fi
1696   done
1697   IFS="$ac_save_ifs"
1698   ;;
1699 esac
1700 fi
1701 etags="$ac_cv_path_etags"
1702 if test -n "$etags"; then
1703   echo "$ac_t""$etags" 1>&6
1704 else
1705   echo "$ac_t""no" 1>&6
1706 fi
1707
1708 # Extract the first word of "xargs", so it can be a program name with args.
1709 set dummy xargs; ac_word=$2
1710 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1711 echo "configure:1712: checking for $ac_word" >&5
1712 if eval "test \"`echo '$''{'ac_cv_path_xargs'+set}'`\" = set"; then
1713   echo $ac_n "(cached) $ac_c" 1>&6
1714 else
1715   case "$xargs" in
1716   /*)
1717   ac_cv_path_xargs="$xargs" # Let the user override the test with a path.
1718   ;;
1719   *)
1720   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1721   for ac_dir in $PATH; do
1722     test -z "$ac_dir" && ac_dir=.
1723     if test -f $ac_dir/$ac_word; then
1724       ac_cv_path_xargs="$ac_dir/$ac_word"
1725       break
1726     fi
1727   done
1728   IFS="$ac_save_ifs"
1729   ;;
1730 esac
1731 fi
1732 xargs="$ac_cv_path_xargs"
1733 if test -n "$xargs"; then
1734   echo "$ac_t""$xargs" 1>&6
1735 else
1736   echo "$ac_t""no" 1>&6
1737 fi
1738
1739 # Extract the first word of "ipcs", so it can be a program name with args.
1740 set dummy ipcs; ac_word=$2
1741 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1742 echo "configure:1743: checking for $ac_word" >&5
1743 if eval "test \"`echo '$''{'ac_cv_path_ipcs'+set}'`\" = set"; then
1744   echo $ac_n "(cached) $ac_c" 1>&6
1745 else
1746   case "$ipcs" in
1747   /*)
1748   ac_cv_path_ipcs="$ipcs" # Let the user override the test with a path.
1749   ;;
1750   *)
1751   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1752   for ac_dir in $PATH; do
1753     test -z "$ac_dir" && ac_dir=.
1754     if test -f $ac_dir/$ac_word; then
1755       ac_cv_path_ipcs="$ac_dir/$ac_word"
1756       break
1757     fi
1758   done
1759   IFS="$ac_save_ifs"
1760   ;;
1761 esac
1762 fi
1763 ipcs="$ac_cv_path_ipcs"
1764 if test -n "$ipcs"; then
1765   echo "$ac_t""$ipcs" 1>&6
1766 else
1767   echo "$ac_t""no" 1>&6
1768 fi
1769
1770 # Extract the first word of "ipcrm", so it can be a program name with args.
1771 set dummy ipcrm; ac_word=$2
1772 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1773 echo "configure:1774: checking for $ac_word" >&5
1774 if eval "test \"`echo '$''{'ac_cv_path_ipcrm'+set}'`\" = set"; then
1775   echo $ac_n "(cached) $ac_c" 1>&6
1776 else
1777   case "$ipcrm" in
1778   /*)
1779   ac_cv_path_ipcrm="$ipcrm" # Let the user override the test with a path.
1780   ;;
1781   *)
1782   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1783   for ac_dir in $PATH; do
1784     test -z "$ac_dir" && ac_dir=.
1785     if test -f $ac_dir/$ac_word; then
1786       ac_cv_path_ipcrm="$ac_dir/$ac_word"
1787       break
1788     fi
1789   done
1790   IFS="$ac_save_ifs"
1791   ;;
1792 esac
1793 fi
1794 ipcrm="$ac_cv_path_ipcrm"
1795 if test -n "$ipcrm"; then
1796   echo "$ac_t""$ipcrm" 1>&6
1797 else
1798   echo "$ac_t""no" 1>&6
1799 fi
1800
1801 for ac_prog in trbsd tr
1802 do
1803 # Extract the first word of "$ac_prog", so it can be a program name with args.
1804 set dummy $ac_prog; ac_word=$2
1805 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1806 echo "configure:1807: checking for $ac_word" >&5
1807 if eval "test \"`echo '$''{'ac_cv_path_TR'+set}'`\" = set"; then
1808   echo $ac_n "(cached) $ac_c" 1>&6
1809 else
1810   case "$TR" in
1811   /*)
1812   ac_cv_path_TR="$TR" # Let the user override the test with a path.
1813   ;;
1814   *)
1815   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1816   for ac_dir in $PATH; do
1817     test -z "$ac_dir" && ac_dir=.
1818     if test -f $ac_dir/$ac_word; then
1819       ac_cv_path_TR="$ac_dir/$ac_word"
1820       break
1821     fi
1822   done
1823   IFS="$ac_save_ifs"
1824   ;;
1825 esac
1826 fi
1827 TR="$ac_cv_path_TR"
1828 if test -n "$TR"; then
1829   echo "$ac_t""$TR" 1>&6
1830 else
1831   echo "$ac_t""no" 1>&6
1832 fi
1833
1834 test -n "$TR" && break
1835 done
1836 test -n "$TR" || TR="NOT_FOUND"
1837
1838
1839 TRSTRINGS="`echo ABCdef | $TR '[a-z]' '[A-Z]' 2>/dev/null | grep ABCDEF`"
1840 TRCLASS="`echo ABCdef | $TR '[:lower:]' '[:upper:]' 2>/dev/null | grep ABCDEF`"
1841
1842 if test "$TRSTRINGS" = "ABCDEF"; then
1843         TRARGS="'[a-z]' '[A-Z]'"
1844 elif test "$TRCLASS" = "ABCDEF"; then
1845         TRARGS="'[:lower:]' '[:upper:]'"
1846 else
1847         { echo "configure: error: "Can\'t find method to convert from upper to lower case with tr"" 1>&2; exit 1; }
1848 fi
1849
1850
1851
1852
1853
1854 # Extract the first word of "yacc", so it can be a program name with args.
1855 set dummy yacc; ac_word=$2
1856 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1857 echo "configure:1858: checking for $ac_word" >&5
1858 if eval "test \"`echo '$''{'ac_cv_path_yacc'+set}'`\" = set"; then
1859   echo $ac_n "(cached) $ac_c" 1>&6
1860 else
1861   case "$yacc" in
1862   /*)
1863   ac_cv_path_yacc="$yacc" # Let the user override the test with a path.
1864   ;;
1865   *)
1866   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1867   for ac_dir in $PATH; do
1868     test -z "$ac_dir" && ac_dir=.
1869     if test -f $ac_dir/$ac_word; then
1870       ac_cv_path_yacc="$ac_dir/$ac_word"
1871       break
1872     fi
1873   done
1874   IFS="$ac_save_ifs"
1875   ;;
1876 esac
1877 fi
1878 yacc="$ac_cv_path_yacc"
1879 if test -n "$yacc"; then
1880   echo "$ac_t""$yacc" 1>&6
1881 else
1882   echo "$ac_t""no" 1>&6
1883 fi
1884
1885 # Extract the first word of "bison", so it can be a program name with args.
1886 set dummy bison; ac_word=$2
1887 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1888 echo "configure:1889: checking for $ac_word" >&5
1889 if eval "test \"`echo '$''{'ac_cv_path_bison'+set}'`\" = set"; then
1890   echo $ac_n "(cached) $ac_c" 1>&6
1891 else
1892   case "$bison" in
1893   /*)
1894   ac_cv_path_bison="$bison" # Let the user override the test with a path.
1895   ;;
1896   *)
1897   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1898   for ac_dir in $PATH; do
1899     test -z "$ac_dir" && ac_dir=.
1900     if test -f $ac_dir/$ac_word; then
1901       ac_cv_path_bison="$ac_dir/$ac_word"
1902       break
1903     fi
1904   done
1905   IFS="$ac_save_ifs"
1906   ;;
1907 esac
1908 fi
1909 bison="$ac_cv_path_bison"
1910 if test -n "$bison"; then
1911   echo "$ac_t""$bison" 1>&6
1912 else
1913   echo "$ac_t""no" 1>&6
1914 fi
1915
1916 if test -f "$YACC"
1917 then
1918         echo "- Using $YACC $YFLAGS"
1919 elif test -f "$bison"
1920 then
1921         echo "- Using $bison -y $YFLAGS"
1922         YACC="$bison"
1923         YFLAGS="-y $YFLAGS"
1924         export YACC YFLAGS
1925 else
1926         echo "- Using $yacc $YFLAGS"
1927         YACC="$yacc"
1928         export YACC
1929 fi
1930
1931 echo $ac_n "checking for main in -lsfio""... $ac_c" 1>&6
1932 echo "configure:1933: checking for main in -lsfio" >&5
1933 ac_lib_var=`echo sfio'_'main | sed 'y%./+-%__p_%'`
1934 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1935   echo $ac_n "(cached) $ac_c" 1>&6
1936 else
1937   ac_save_LIBS="$LIBS"
1938 LIBS="-lsfio  $LIBS"
1939 cat > conftest.$ac_ext <<EOF
1940 #line 1941 "configure"
1941 #include "confdefs.h"
1942
1943 int main() {
1944 main()
1945 ; return 0; }
1946 EOF
1947 if { (eval echo configure:1948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1948   rm -rf conftest*
1949   eval "ac_cv_lib_$ac_lib_var=yes"
1950 else
1951   echo "configure: failed program was:" >&5
1952   cat conftest.$ac_ext >&5
1953   rm -rf conftest*
1954   eval "ac_cv_lib_$ac_lib_var=no"
1955 fi
1956 rm -f conftest*
1957 LIBS="$ac_save_LIBS"
1958
1959 fi
1960 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1961   echo "$ac_t""yes" 1>&6
1962     ac_tr_lib=HAVE_LIB`echo sfio | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1963     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1964   cat >> confdefs.h <<EOF
1965 #define $ac_tr_lib 1
1966 EOF
1967
1968   LIBS="-lsfio $LIBS"
1969
1970 else
1971   echo "$ac_t""no" 1>&6
1972 fi
1973
1974 for curses in ncurses curses ; do
1975         echo $ac_n "checking for main in -l${curses}""... $ac_c" 1>&6
1976 echo "configure:1977: checking for main in -l${curses}" >&5
1977 ac_lib_var=`echo ${curses}'_'main | sed 'y%./+-%__p_%'`
1978 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1979   echo $ac_n "(cached) $ac_c" 1>&6
1980 else
1981   ac_save_LIBS="$LIBS"
1982 LIBS="-l${curses}  $LIBS"
1983 cat > conftest.$ac_ext <<EOF
1984 #line 1985 "configure"
1985 #include "confdefs.h"
1986
1987 int main() {
1988 main()
1989 ; return 0; }
1990 EOF
1991 if { (eval echo configure:1992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1992   rm -rf conftest*
1993   eval "ac_cv_lib_$ac_lib_var=yes"
1994 else
1995   echo "configure: failed program was:" >&5
1996   cat conftest.$ac_ext >&5
1997   rm -rf conftest*
1998   eval "ac_cv_lib_$ac_lib_var=no"
1999 fi
2000 rm -f conftest*
2001 LIBS="$ac_save_LIBS"
2002
2003 fi
2004 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2005   echo "$ac_t""yes" 1>&6
2006   LIBS="-l${curses} $LIBS"; break
2007 else
2008   echo "$ac_t""no" 1>&6
2009 fi
2010
2011 done
2012 echo $ac_n "checking for main in -ltermcap""... $ac_c" 1>&6
2013 echo "configure:2014: checking for main in -ltermcap" >&5
2014 ac_lib_var=`echo termcap'_'main | sed 'y%./+-%__p_%'`
2015 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2016   echo $ac_n "(cached) $ac_c" 1>&6
2017 else
2018   ac_save_LIBS="$LIBS"
2019 LIBS="-ltermcap  $LIBS"
2020 cat > conftest.$ac_ext <<EOF
2021 #line 2022 "configure"
2022 #include "confdefs.h"
2023
2024 int main() {
2025 main()
2026 ; return 0; }
2027 EOF
2028 if { (eval echo configure:2029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2029   rm -rf conftest*
2030   eval "ac_cv_lib_$ac_lib_var=yes"
2031 else
2032   echo "configure: failed program was:" >&5
2033   cat conftest.$ac_ext >&5
2034   rm -rf conftest*
2035   eval "ac_cv_lib_$ac_lib_var=no"
2036 fi
2037 rm -f conftest*
2038 LIBS="$ac_save_LIBS"
2039
2040 fi
2041 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2042   echo "$ac_t""yes" 1>&6
2043     ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2044     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2045   cat >> confdefs.h <<EOF
2046 #define $ac_tr_lib 1
2047 EOF
2048
2049   LIBS="-ltermcap $LIBS"
2050
2051 else
2052   echo "$ac_t""no" 1>&6
2053 fi
2054
2055 echo $ac_n "checking for main in -lhistory""... $ac_c" 1>&6
2056 echo "configure:2057: checking for main in -lhistory" >&5
2057 ac_lib_var=`echo history'_'main | sed 'y%./+-%__p_%'`
2058 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2059   echo $ac_n "(cached) $ac_c" 1>&6
2060 else
2061   ac_save_LIBS="$LIBS"
2062 LIBS="-lhistory  $LIBS"
2063 cat > conftest.$ac_ext <<EOF
2064 #line 2065 "configure"
2065 #include "confdefs.h"
2066
2067 int main() {
2068 main()
2069 ; return 0; }
2070 EOF
2071 if { (eval echo configure:2072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2072   rm -rf conftest*
2073   eval "ac_cv_lib_$ac_lib_var=yes"
2074 else
2075   echo "configure: failed program was:" >&5
2076   cat conftest.$ac_ext >&5
2077   rm -rf conftest*
2078   eval "ac_cv_lib_$ac_lib_var=no"
2079 fi
2080 rm -f conftest*
2081 LIBS="$ac_save_LIBS"
2082
2083 fi
2084 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2085   echo "$ac_t""yes" 1>&6
2086     ac_tr_lib=HAVE_LIB`echo history | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2087     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2088   cat >> confdefs.h <<EOF
2089 #define $ac_tr_lib 1
2090 EOF
2091
2092   LIBS="-lhistory $LIBS"
2093
2094 else
2095   echo "$ac_t""no" 1>&6
2096 fi
2097
2098 echo $ac_n "checking for main in -lreadline""... $ac_c" 1>&6
2099 echo "configure:2100: checking for main in -lreadline" >&5
2100 ac_lib_var=`echo readline'_'main | sed 'y%./+-%__p_%'`
2101 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2102   echo $ac_n "(cached) $ac_c" 1>&6
2103 else
2104   ac_save_LIBS="$LIBS"
2105 LIBS="-lreadline  $LIBS"
2106 cat > conftest.$ac_ext <<EOF
2107 #line 2108 "configure"
2108 #include "confdefs.h"
2109
2110 int main() {
2111 main()
2112 ; return 0; }
2113 EOF
2114 if { (eval echo configure:2115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2115   rm -rf conftest*
2116   eval "ac_cv_lib_$ac_lib_var=yes"
2117 else
2118   echo "configure: failed program was:" >&5
2119   cat conftest.$ac_ext >&5
2120   rm -rf conftest*
2121   eval "ac_cv_lib_$ac_lib_var=no"
2122 fi
2123 rm -f conftest*
2124 LIBS="$ac_save_LIBS"
2125
2126 fi
2127 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2128   echo "$ac_t""yes" 1>&6
2129     ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2130     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2131   cat >> confdefs.h <<EOF
2132 #define $ac_tr_lib 1
2133 EOF
2134
2135   LIBS="-lreadline $LIBS"
2136
2137 else
2138   echo "$ac_t""no" 1>&6
2139 fi
2140
2141 echo $ac_n "checking for write_history in -lreadline""... $ac_c" 1>&6
2142 echo "configure:2143: checking for write_history in -lreadline" >&5
2143 ac_lib_var=`echo readline'_'write_history | sed 'y%./+-%__p_%'`
2144 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2145   echo $ac_n "(cached) $ac_c" 1>&6
2146 else
2147   ac_save_LIBS="$LIBS"
2148 LIBS="-lreadline  $LIBS"
2149 cat > conftest.$ac_ext <<EOF
2150 #line 2151 "configure"
2151 #include "confdefs.h"
2152 /* Override any gcc2 internal prototype to avoid an error.  */
2153 /* We use char because int might match the return type of a gcc2
2154     builtin and then its argument prototype would still apply.  */
2155 char write_history();
2156
2157 int main() {
2158 write_history()
2159 ; return 0; }
2160 EOF
2161 if { (eval echo configure:2162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2162   rm -rf conftest*
2163   eval "ac_cv_lib_$ac_lib_var=yes"
2164 else
2165   echo "configure: failed program was:" >&5
2166   cat conftest.$ac_ext >&5
2167   rm -rf conftest*
2168   eval "ac_cv_lib_$ac_lib_var=no"
2169 fi
2170 rm -f conftest*
2171 LIBS="$ac_save_LIBS"
2172
2173 fi
2174 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2175   echo "$ac_t""yes" 1>&6
2176   cat >> confdefs.h <<\EOF
2177 #define HAVE_HISTORY 1
2178 EOF
2179
2180 else
2181   echo "$ac_t""no" 1>&6
2182 fi
2183
2184 if test "$PORTNAME" != "aix" -a "$PORTNAME" != "alpha"
2185 then
2186         echo $ac_n "checking for main in -lbsd""... $ac_c" 1>&6
2187 echo "configure:2188: checking for main in -lbsd" >&5
2188 ac_lib_var=`echo bsd'_'main | sed 'y%./+-%__p_%'`
2189 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2190   echo $ac_n "(cached) $ac_c" 1>&6
2191 else
2192   ac_save_LIBS="$LIBS"
2193 LIBS="-lbsd  $LIBS"
2194 cat > conftest.$ac_ext <<EOF
2195 #line 2196 "configure"
2196 #include "confdefs.h"
2197
2198 int main() {
2199 main()
2200 ; return 0; }
2201 EOF
2202 if { (eval echo configure:2203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2203   rm -rf conftest*
2204   eval "ac_cv_lib_$ac_lib_var=yes"
2205 else
2206   echo "configure: failed program was:" >&5
2207   cat conftest.$ac_ext >&5
2208   rm -rf conftest*
2209   eval "ac_cv_lib_$ac_lib_var=no"
2210 fi
2211 rm -f conftest*
2212 LIBS="$ac_save_LIBS"
2213
2214 fi
2215 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2216   echo "$ac_t""yes" 1>&6
2217     ac_tr_lib=HAVE_LIB`echo bsd | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2218     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2219   cat >> confdefs.h <<EOF
2220 #define $ac_tr_lib 1
2221 EOF
2222
2223   LIBS="-lbsd $LIBS"
2224
2225 else
2226   echo "$ac_t""no" 1>&6
2227 fi
2228
2229 fi
2230 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
2231 echo "configure:2232: checking for main in -lm" >&5
2232 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
2233 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2234   echo $ac_n "(cached) $ac_c" 1>&6
2235 else
2236   ac_save_LIBS="$LIBS"
2237 LIBS="-lm  $LIBS"
2238 cat > conftest.$ac_ext <<EOF
2239 #line 2240 "configure"
2240 #include "confdefs.h"
2241
2242 int main() {
2243 main()
2244 ; return 0; }
2245 EOF
2246 if { (eval echo configure:2247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2247   rm -rf conftest*
2248   eval "ac_cv_lib_$ac_lib_var=yes"
2249 else
2250   echo "configure: failed program was:" >&5
2251   cat conftest.$ac_ext >&5
2252   rm -rf conftest*
2253   eval "ac_cv_lib_$ac_lib_var=no"
2254 fi
2255 rm -f conftest*
2256 LIBS="$ac_save_LIBS"
2257
2258 fi
2259 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2260   echo "$ac_t""yes" 1>&6
2261     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2262     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2263   cat >> confdefs.h <<EOF
2264 #define $ac_tr_lib 1
2265 EOF
2266
2267   LIBS="-lm $LIBS"
2268
2269 else
2270   echo "$ac_t""no" 1>&6
2271 fi
2272
2273 echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
2274 echo "configure:2275: checking for main in -ldl" >&5
2275 ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
2276 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2277   echo $ac_n "(cached) $ac_c" 1>&6
2278 else
2279   ac_save_LIBS="$LIBS"
2280 LIBS="-ldl  $LIBS"
2281 cat > conftest.$ac_ext <<EOF
2282 #line 2283 "configure"
2283 #include "confdefs.h"
2284
2285 int main() {
2286 main()
2287 ; return 0; }
2288 EOF
2289 if { (eval echo configure:2290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2290   rm -rf conftest*
2291   eval "ac_cv_lib_$ac_lib_var=yes"
2292 else
2293   echo "configure: failed program was:" >&5
2294   cat conftest.$ac_ext >&5
2295   rm -rf conftest*
2296   eval "ac_cv_lib_$ac_lib_var=no"
2297 fi
2298 rm -f conftest*
2299 LIBS="$ac_save_LIBS"
2300
2301 fi
2302 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2303   echo "$ac_t""yes" 1>&6
2304     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2305     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2306   cat >> confdefs.h <<EOF
2307 #define $ac_tr_lib 1
2308 EOF
2309
2310   LIBS="-ldl $LIBS"
2311
2312 else
2313   echo "$ac_t""no" 1>&6
2314 fi
2315
2316 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
2317 echo "configure:2318: checking for main in -lsocket" >&5
2318 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
2319 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2320   echo $ac_n "(cached) $ac_c" 1>&6
2321 else
2322   ac_save_LIBS="$LIBS"
2323 LIBS="-lsocket  $LIBS"
2324 cat > conftest.$ac_ext <<EOF
2325 #line 2326 "configure"
2326 #include "confdefs.h"
2327
2328 int main() {
2329 main()
2330 ; return 0; }
2331 EOF
2332 if { (eval echo configure:2333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2333   rm -rf conftest*
2334   eval "ac_cv_lib_$ac_lib_var=yes"
2335 else
2336   echo "configure: failed program was:" >&5
2337   cat conftest.$ac_ext >&5
2338   rm -rf conftest*
2339   eval "ac_cv_lib_$ac_lib_var=no"
2340 fi
2341 rm -f conftest*
2342 LIBS="$ac_save_LIBS"
2343
2344 fi
2345 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2346   echo "$ac_t""yes" 1>&6
2347     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2348     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2349   cat >> confdefs.h <<EOF
2350 #define $ac_tr_lib 1
2351 EOF
2352
2353   LIBS="-lsocket $LIBS"
2354
2355 else
2356   echo "$ac_t""no" 1>&6
2357 fi
2358
2359 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
2360 echo "configure:2361: checking for main in -lnsl" >&5
2361 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
2362 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2363   echo $ac_n "(cached) $ac_c" 1>&6
2364 else
2365   ac_save_LIBS="$LIBS"
2366 LIBS="-lnsl  $LIBS"
2367 cat > conftest.$ac_ext <<EOF
2368 #line 2369 "configure"
2369 #include "confdefs.h"
2370
2371 int main() {
2372 main()
2373 ; return 0; }
2374 EOF
2375 if { (eval echo configure:2376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2376   rm -rf conftest*
2377   eval "ac_cv_lib_$ac_lib_var=yes"
2378 else
2379   echo "configure: failed program was:" >&5
2380   cat conftest.$ac_ext >&5
2381   rm -rf conftest*
2382   eval "ac_cv_lib_$ac_lib_var=no"
2383 fi
2384 rm -f conftest*
2385 LIBS="$ac_save_LIBS"
2386
2387 fi
2388 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2389   echo "$ac_t""yes" 1>&6
2390     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2391     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2392   cat >> confdefs.h <<EOF
2393 #define $ac_tr_lib 1
2394 EOF
2395
2396   LIBS="-lnsl $LIBS"
2397
2398 else
2399   echo "$ac_t""no" 1>&6
2400 fi
2401
2402 echo $ac_n "checking for main in -lipc""... $ac_c" 1>&6
2403 echo "configure:2404: checking for main in -lipc" >&5
2404 ac_lib_var=`echo ipc'_'main | sed 'y%./+-%__p_%'`
2405 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2406   echo $ac_n "(cached) $ac_c" 1>&6
2407 else
2408   ac_save_LIBS="$LIBS"
2409 LIBS="-lipc  $LIBS"
2410 cat > conftest.$ac_ext <<EOF
2411 #line 2412 "configure"
2412 #include "confdefs.h"
2413
2414 int main() {
2415 main()
2416 ; return 0; }
2417 EOF
2418 if { (eval echo configure:2419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2419   rm -rf conftest*
2420   eval "ac_cv_lib_$ac_lib_var=yes"
2421 else
2422   echo "configure: failed program was:" >&5
2423   cat conftest.$ac_ext >&5
2424   rm -rf conftest*
2425   eval "ac_cv_lib_$ac_lib_var=no"
2426 fi
2427 rm -f conftest*
2428 LIBS="$ac_save_LIBS"
2429
2430 fi
2431 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2432   echo "$ac_t""yes" 1>&6
2433     ac_tr_lib=HAVE_LIB`echo ipc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2434     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2435   cat >> confdefs.h <<EOF
2436 #define $ac_tr_lib 1
2437 EOF
2438
2439   LIBS="-lipc $LIBS"
2440
2441 else
2442   echo "$ac_t""no" 1>&6
2443 fi
2444
2445 echo $ac_n "checking for main in -lIPC""... $ac_c" 1>&6
2446 echo "configure:2447: checking for main in -lIPC" >&5
2447 ac_lib_var=`echo IPC'_'main | sed 'y%./+-%__p_%'`
2448 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2449   echo $ac_n "(cached) $ac_c" 1>&6
2450 else
2451   ac_save_LIBS="$LIBS"
2452 LIBS="-lIPC  $LIBS"
2453 cat > conftest.$ac_ext <<EOF
2454 #line 2455 "configure"
2455 #include "confdefs.h"
2456
2457 int main() {
2458 main()
2459 ; return 0; }
2460 EOF
2461 if { (eval echo configure:2462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2462   rm -rf conftest*
2463   eval "ac_cv_lib_$ac_lib_var=yes"
2464 else
2465   echo "configure: failed program was:" >&5
2466   cat conftest.$ac_ext >&5
2467   rm -rf conftest*
2468   eval "ac_cv_lib_$ac_lib_var=no"
2469 fi
2470 rm -f conftest*
2471 LIBS="$ac_save_LIBS"
2472
2473 fi
2474 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2475   echo "$ac_t""yes" 1>&6
2476     ac_tr_lib=HAVE_LIB`echo IPC | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2477     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2478   cat >> confdefs.h <<EOF
2479 #define $ac_tr_lib 1
2480 EOF
2481
2482   LIBS="-lIPC $LIBS"
2483
2484 else
2485   echo "$ac_t""no" 1>&6
2486 fi
2487
2488 echo $ac_n "checking for main in -llc""... $ac_c" 1>&6
2489 echo "configure:2490: checking for main in -llc" >&5
2490 ac_lib_var=`echo lc'_'main | sed 'y%./+-%__p_%'`
2491 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2492   echo $ac_n "(cached) $ac_c" 1>&6
2493 else
2494   ac_save_LIBS="$LIBS"
2495 LIBS="-llc  $LIBS"
2496 cat > conftest.$ac_ext <<EOF
2497 #line 2498 "configure"
2498 #include "confdefs.h"
2499
2500 int main() {
2501 main()
2502 ; return 0; }
2503 EOF
2504 if { (eval echo configure:2505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2505   rm -rf conftest*
2506   eval "ac_cv_lib_$ac_lib_var=yes"
2507 else
2508   echo "configure: failed program was:" >&5
2509   cat conftest.$ac_ext >&5
2510   rm -rf conftest*
2511   eval "ac_cv_lib_$ac_lib_var=no"
2512 fi
2513 rm -f conftest*
2514 LIBS="$ac_save_LIBS"
2515
2516 fi
2517 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2518   echo "$ac_t""yes" 1>&6
2519     ac_tr_lib=HAVE_LIB`echo lc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2520     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2521   cat >> confdefs.h <<EOF
2522 #define $ac_tr_lib 1
2523 EOF
2524
2525   LIBS="-llc $LIBS"
2526
2527 else
2528   echo "$ac_t""no" 1>&6
2529 fi
2530
2531 echo $ac_n "checking for main in -ldld""... $ac_c" 1>&6
2532 echo "configure:2533: checking for main in -ldld" >&5
2533 ac_lib_var=`echo dld'_'main | sed 'y%./+-%__p_%'`
2534 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2535   echo $ac_n "(cached) $ac_c" 1>&6
2536 else
2537   ac_save_LIBS="$LIBS"
2538 LIBS="-ldld  $LIBS"
2539 cat > conftest.$ac_ext <<EOF
2540 #line 2541 "configure"
2541 #include "confdefs.h"
2542
2543 int main() {
2544 main()
2545 ; return 0; }
2546 EOF
2547 if { (eval echo configure:2548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2548   rm -rf conftest*
2549   eval "ac_cv_lib_$ac_lib_var=yes"
2550 else
2551   echo "configure: failed program was:" >&5
2552   cat conftest.$ac_ext >&5
2553   rm -rf conftest*
2554   eval "ac_cv_lib_$ac_lib_var=no"
2555 fi
2556 rm -f conftest*
2557 LIBS="$ac_save_LIBS"
2558
2559 fi
2560 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2561   echo "$ac_t""yes" 1>&6
2562     ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2563     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2564   cat >> confdefs.h <<EOF
2565 #define $ac_tr_lib 1
2566 EOF
2567
2568   LIBS="-ldld $LIBS"
2569
2570 else
2571   echo "$ac_t""no" 1>&6
2572 fi
2573
2574 echo $ac_n "checking for main in -lln""... $ac_c" 1>&6
2575 echo "configure:2576: checking for main in -lln" >&5
2576 ac_lib_var=`echo ln'_'main | sed 'y%./+-%__p_%'`
2577 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2578   echo $ac_n "(cached) $ac_c" 1>&6
2579 else
2580   ac_save_LIBS="$LIBS"
2581 LIBS="-lln  $LIBS"
2582 cat > conftest.$ac_ext <<EOF
2583 #line 2584 "configure"
2584 #include "confdefs.h"
2585
2586 int main() {
2587 main()
2588 ; return 0; }
2589 EOF
2590 if { (eval echo configure:2591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2591   rm -rf conftest*
2592   eval "ac_cv_lib_$ac_lib_var=yes"
2593 else
2594   echo "configure: failed program was:" >&5
2595   cat conftest.$ac_ext >&5
2596   rm -rf conftest*
2597   eval "ac_cv_lib_$ac_lib_var=no"
2598 fi
2599 rm -f conftest*
2600 LIBS="$ac_save_LIBS"
2601
2602 fi
2603 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2604   echo "$ac_t""yes" 1>&6
2605     ac_tr_lib=HAVE_LIB`echo ln | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2606     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2607   cat >> confdefs.h <<EOF
2608 #define $ac_tr_lib 1
2609 EOF
2610
2611   LIBS="-lln $LIBS"
2612
2613 else
2614   echo "$ac_t""no" 1>&6
2615 fi
2616
2617 echo $ac_n "checking for main in -lld""... $ac_c" 1>&6
2618 echo "configure:2619: checking for main in -lld" >&5
2619 ac_lib_var=`echo ld'_'main | sed 'y%./+-%__p_%'`
2620 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2621   echo $ac_n "(cached) $ac_c" 1>&6
2622 else
2623   ac_save_LIBS="$LIBS"
2624 LIBS="-lld  $LIBS"
2625 cat > conftest.$ac_ext <<EOF
2626 #line 2627 "configure"
2627 #include "confdefs.h"
2628
2629 int main() {
2630 main()
2631 ; return 0; }
2632 EOF
2633 if { (eval echo configure:2634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2634   rm -rf conftest*
2635   eval "ac_cv_lib_$ac_lib_var=yes"
2636 else
2637   echo "configure: failed program was:" >&5
2638   cat conftest.$ac_ext >&5
2639   rm -rf conftest*
2640   eval "ac_cv_lib_$ac_lib_var=no"
2641 fi
2642 rm -f conftest*
2643 LIBS="$ac_save_LIBS"
2644
2645 fi
2646 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2647   echo "$ac_t""yes" 1>&6
2648     ac_tr_lib=HAVE_LIB`echo ld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2649     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2650   cat >> confdefs.h <<EOF
2651 #define $ac_tr_lib 1
2652 EOF
2653
2654   LIBS="-lld $LIBS"
2655
2656 else
2657   echo "$ac_t""no" 1>&6
2658 fi
2659
2660 echo $ac_n "checking for main in -lcompat""... $ac_c" 1>&6
2661 echo "configure:2662: checking for main in -lcompat" >&5
2662 ac_lib_var=`echo compat'_'main | sed 'y%./+-%__p_%'`
2663 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2664   echo $ac_n "(cached) $ac_c" 1>&6
2665 else
2666   ac_save_LIBS="$LIBS"
2667 LIBS="-lcompat  $LIBS"
2668 cat > conftest.$ac_ext <<EOF
2669 #line 2670 "configure"
2670 #include "confdefs.h"
2671
2672 int main() {
2673 main()
2674 ; return 0; }
2675 EOF
2676 if { (eval echo configure:2677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2677   rm -rf conftest*
2678   eval "ac_cv_lib_$ac_lib_var=yes"
2679 else
2680   echo "configure: failed program was:" >&5
2681   cat conftest.$ac_ext >&5
2682   rm -rf conftest*
2683   eval "ac_cv_lib_$ac_lib_var=no"
2684 fi
2685 rm -f conftest*
2686 LIBS="$ac_save_LIBS"
2687
2688 fi
2689 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2690   echo "$ac_t""yes" 1>&6
2691     ac_tr_lib=HAVE_LIB`echo compat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2692     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2693   cat >> confdefs.h <<EOF
2694 #define $ac_tr_lib 1
2695 EOF
2696
2697   LIBS="-lcompat $LIBS"
2698
2699 else
2700   echo "$ac_t""no" 1>&6
2701 fi
2702
2703 echo $ac_n "checking for main in -lBSD""... $ac_c" 1>&6
2704 echo "configure:2705: checking for main in -lBSD" >&5
2705 ac_lib_var=`echo BSD'_'main | sed 'y%./+-%__p_%'`
2706 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2707   echo $ac_n "(cached) $ac_c" 1>&6
2708 else
2709   ac_save_LIBS="$LIBS"
2710 LIBS="-lBSD  $LIBS"
2711 cat > conftest.$ac_ext <<EOF
2712 #line 2713 "configure"
2713 #include "confdefs.h"
2714
2715 int main() {
2716 main()
2717 ; return 0; }
2718 EOF
2719 if { (eval echo configure:2720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2720   rm -rf conftest*
2721   eval "ac_cv_lib_$ac_lib_var=yes"
2722 else
2723   echo "configure: failed program was:" >&5
2724   cat conftest.$ac_ext >&5
2725   rm -rf conftest*
2726   eval "ac_cv_lib_$ac_lib_var=no"
2727 fi
2728 rm -f conftest*
2729 LIBS="$ac_save_LIBS"
2730
2731 fi
2732 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2733   echo "$ac_t""yes" 1>&6
2734     ac_tr_lib=HAVE_LIB`echo BSD | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2735     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2736   cat >> confdefs.h <<EOF
2737 #define $ac_tr_lib 1
2738 EOF
2739
2740   LIBS="-lBSD $LIBS"
2741
2742 else
2743   echo "$ac_t""no" 1>&6
2744 fi
2745
2746 echo $ac_n "checking for main in -lcrypt""... $ac_c" 1>&6
2747 echo "configure:2748: checking for main in -lcrypt" >&5
2748 ac_lib_var=`echo crypt'_'main | sed 'y%./+-%__p_%'`
2749 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2750   echo $ac_n "(cached) $ac_c" 1>&6
2751 else
2752   ac_save_LIBS="$LIBS"
2753 LIBS="-lcrypt  $LIBS"
2754 cat > conftest.$ac_ext <<EOF
2755 #line 2756 "configure"
2756 #include "confdefs.h"
2757
2758 int main() {
2759 main()
2760 ; return 0; }
2761 EOF
2762 if { (eval echo configure:2763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2763   rm -rf conftest*
2764   eval "ac_cv_lib_$ac_lib_var=yes"
2765 else
2766   echo "configure: failed program was:" >&5
2767   cat conftest.$ac_ext >&5
2768   rm -rf conftest*
2769   eval "ac_cv_lib_$ac_lib_var=no"
2770 fi
2771 rm -f conftest*
2772 LIBS="$ac_save_LIBS"
2773
2774 fi
2775 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2776   echo "$ac_t""yes" 1>&6
2777     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2778     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2779   cat >> confdefs.h <<EOF
2780 #define $ac_tr_lib 1
2781 EOF
2782
2783   LIBS="-lcrypt $LIBS"
2784
2785 else
2786   echo "$ac_t""no" 1>&6
2787 fi
2788
2789 echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
2790 echo "configure:2791: checking for main in -lgen" >&5
2791 ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'`
2792 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2793   echo $ac_n "(cached) $ac_c" 1>&6
2794 else
2795   ac_save_LIBS="$LIBS"
2796 LIBS="-lgen  $LIBS"
2797 cat > conftest.$ac_ext <<EOF
2798 #line 2799 "configure"
2799 #include "confdefs.h"
2800
2801 int main() {
2802 main()
2803 ; return 0; }
2804 EOF
2805 if { (eval echo configure:2806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2806   rm -rf conftest*
2807   eval "ac_cv_lib_$ac_lib_var=yes"
2808 else
2809   echo "configure: failed program was:" >&5
2810   cat conftest.$ac_ext >&5
2811   rm -rf conftest*
2812   eval "ac_cv_lib_$ac_lib_var=no"
2813 fi
2814 rm -f conftest*
2815 LIBS="$ac_save_LIBS"
2816
2817 fi
2818 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2819   echo "$ac_t""yes" 1>&6
2820     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2821     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2822   cat >> confdefs.h <<EOF
2823 #define $ac_tr_lib 1
2824 EOF
2825
2826   LIBS="-lgen $LIBS"
2827
2828 else
2829   echo "$ac_t""no" 1>&6
2830 fi
2831
2832 echo $ac_n "checking for main in -lPW""... $ac_c" 1>&6
2833 echo "configure:2834: checking for main in -lPW" >&5
2834 ac_lib_var=`echo PW'_'main | sed 'y%./+-%__p_%'`
2835 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2836   echo $ac_n "(cached) $ac_c" 1>&6
2837 else
2838   ac_save_LIBS="$LIBS"
2839 LIBS="-lPW  $LIBS"
2840 cat > conftest.$ac_ext <<EOF
2841 #line 2842 "configure"
2842 #include "confdefs.h"
2843
2844 int main() {
2845 main()
2846 ; return 0; }
2847 EOF
2848 if { (eval echo configure:2849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2849   rm -rf conftest*
2850   eval "ac_cv_lib_$ac_lib_var=yes"
2851 else
2852   echo "configure: failed program was:" >&5
2853   cat conftest.$ac_ext >&5
2854   rm -rf conftest*
2855   eval "ac_cv_lib_$ac_lib_var=no"
2856 fi
2857 rm -f conftest*
2858 LIBS="$ac_save_LIBS"
2859
2860 fi
2861 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2862   echo "$ac_t""yes" 1>&6
2863     ac_tr_lib=HAVE_LIB`echo PW | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2864     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2865   cat >> confdefs.h <<EOF
2866 #define $ac_tr_lib 1
2867 EOF
2868
2869   LIBS="-lPW $LIBS"
2870
2871 else
2872   echo "$ac_t""no" 1>&6
2873 fi
2874
2875
2876 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2877 echo "configure:2878: checking for ANSI C header files" >&5
2878 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2879   echo $ac_n "(cached) $ac_c" 1>&6
2880 else
2881   cat > conftest.$ac_ext <<EOF
2882 #line 2883 "configure"
2883 #include "confdefs.h"
2884 #include <stdlib.h>
2885 #include <stdarg.h>
2886 #include <string.h>
2887 #include <float.h>
2888 EOF
2889 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2890 { (eval echo configure:2891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2891 ac_err=`grep -v '^ *+' conftest.out`
2892 if test -z "$ac_err"; then
2893   rm -rf conftest*
2894   ac_cv_header_stdc=yes
2895 else
2896   echo "$ac_err" >&5
2897   echo "configure: failed program was:" >&5
2898   cat conftest.$ac_ext >&5
2899   rm -rf conftest*
2900   ac_cv_header_stdc=no
2901 fi
2902 rm -f conftest*
2903
2904 if test $ac_cv_header_stdc = yes; then
2905   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2906 cat > conftest.$ac_ext <<EOF
2907 #line 2908 "configure"
2908 #include "confdefs.h"
2909 #include <string.h>
2910 EOF
2911 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2912   egrep "memchr" >/dev/null 2>&1; then
2913   :
2914 else
2915   rm -rf conftest*
2916   ac_cv_header_stdc=no
2917 fi
2918 rm -f conftest*
2919
2920 fi
2921
2922 if test $ac_cv_header_stdc = yes; then
2923   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2924 cat > conftest.$ac_ext <<EOF
2925 #line 2926 "configure"
2926 #include "confdefs.h"
2927 #include <stdlib.h>
2928 EOF
2929 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2930   egrep "free" >/dev/null 2>&1; then
2931   :
2932 else
2933   rm -rf conftest*
2934   ac_cv_header_stdc=no
2935 fi
2936 rm -f conftest*
2937
2938 fi
2939
2940 if test $ac_cv_header_stdc = yes; then
2941   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2942 if test "$cross_compiling" = yes; then
2943   :
2944 else
2945   cat > conftest.$ac_ext <<EOF
2946 #line 2947 "configure"
2947 #include "confdefs.h"
2948 #include <ctype.h>
2949 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2950 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2951 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2952 int main () { int i; for (i = 0; i < 256; i++)
2953 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2954 exit (0); }
2955
2956 EOF
2957 if { (eval echo configure:2958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2958 then
2959   :
2960 else
2961   echo "configure: failed program was:" >&5
2962   cat conftest.$ac_ext >&5
2963   rm -fr conftest*
2964   ac_cv_header_stdc=no
2965 fi
2966 rm -fr conftest*
2967 fi
2968
2969 fi
2970 fi
2971
2972 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2973 if test $ac_cv_header_stdc = yes; then
2974   cat >> confdefs.h <<\EOF
2975 #define STDC_HEADERS 1
2976 EOF
2977
2978 fi
2979
2980 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2981 echo "configure:2982: checking for sys/wait.h that is POSIX.1 compatible" >&5
2982 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2983   echo $ac_n "(cached) $ac_c" 1>&6
2984 else
2985   cat > conftest.$ac_ext <<EOF
2986 #line 2987 "configure"
2987 #include "confdefs.h"
2988 #include <sys/types.h>
2989 #include <sys/wait.h>
2990 #ifndef WEXITSTATUS
2991 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2992 #endif
2993 #ifndef WIFEXITED
2994 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2995 #endif
2996 int main() {
2997 int s;
2998 wait (&s);
2999 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3000 ; return 0; }
3001 EOF
3002 if { (eval echo configure:3003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3003   rm -rf conftest*
3004   ac_cv_header_sys_wait_h=yes
3005 else
3006   echo "configure: failed program was:" >&5
3007   cat conftest.$ac_ext >&5
3008   rm -rf conftest*
3009   ac_cv_header_sys_wait_h=no
3010 fi
3011 rm -f conftest*
3012 fi
3013
3014 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3015 if test $ac_cv_header_sys_wait_h = yes; then
3016   cat >> confdefs.h <<\EOF
3017 #define HAVE_SYS_WAIT_H 1
3018 EOF
3019
3020 fi
3021
3022 for ac_hdr in limits.h unistd.h termios.h values.h sys/select.h
3023 do
3024 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3025 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3026 echo "configure:3027: checking for $ac_hdr" >&5
3027 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3028   echo $ac_n "(cached) $ac_c" 1>&6
3029 else
3030   cat > conftest.$ac_ext <<EOF
3031 #line 3032 "configure"
3032 #include "confdefs.h"
3033 #include <$ac_hdr>
3034 EOF
3035 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3036 { (eval echo configure:3037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3037 ac_err=`grep -v '^ *+' conftest.out`
3038 if test -z "$ac_err"; then
3039   rm -rf conftest*
3040   eval "ac_cv_header_$ac_safe=yes"
3041 else
3042   echo "$ac_err" >&5
3043   echo "configure: failed program was:" >&5
3044   cat conftest.$ac_ext >&5
3045   rm -rf conftest*
3046   eval "ac_cv_header_$ac_safe=no"
3047 fi
3048 rm -f conftest*
3049 fi
3050 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3051   echo "$ac_t""yes" 1>&6
3052     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3053   cat >> confdefs.h <<EOF
3054 #define $ac_tr_hdr 1
3055 EOF
3056  
3057 else
3058   echo "$ac_t""no" 1>&6
3059 fi
3060 done
3061
3062 for ac_hdr in sys/resource.h netdb.h arpa/inet.h getopt.h
3063 do
3064 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3065 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3066 echo "configure:3067: checking for $ac_hdr" >&5
3067 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3068   echo $ac_n "(cached) $ac_c" 1>&6
3069 else
3070   cat > conftest.$ac_ext <<EOF
3071 #line 3072 "configure"
3072 #include "confdefs.h"
3073 #include <$ac_hdr>
3074 EOF
3075 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3076 { (eval echo configure:3077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3077 ac_err=`grep -v '^ *+' conftest.out`
3078 if test -z "$ac_err"; then
3079   rm -rf conftest*
3080   eval "ac_cv_header_$ac_safe=yes"
3081 else
3082   echo "$ac_err" >&5
3083   echo "configure: failed program was:" >&5
3084   cat conftest.$ac_ext >&5
3085   rm -rf conftest*
3086   eval "ac_cv_header_$ac_safe=no"
3087 fi
3088 rm -f conftest*
3089 fi
3090 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3091   echo "$ac_t""yes" 1>&6
3092     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3093   cat >> confdefs.h <<EOF
3094 #define $ac_tr_hdr 1
3095 EOF
3096  
3097 else
3098   echo "$ac_t""no" 1>&6
3099 fi
3100 done
3101
3102 for ac_hdr in readline.h history.h dld.h crypt.h endian.h float.h
3103 do
3104 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3105 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3106 echo "configure:3107: checking for $ac_hdr" >&5
3107 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3108   echo $ac_n "(cached) $ac_c" 1>&6
3109 else
3110   cat > conftest.$ac_ext <<EOF
3111 #line 3112 "configure"
3112 #include "confdefs.h"
3113 #include <$ac_hdr>
3114 EOF
3115 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3116 { (eval echo configure:3117: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3117 ac_err=`grep -v '^ *+' conftest.out`
3118 if test -z "$ac_err"; then
3119   rm -rf conftest*
3120   eval "ac_cv_header_$ac_safe=yes"
3121 else
3122   echo "$ac_err" >&5
3123   echo "configure: failed program was:" >&5
3124   cat conftest.$ac_ext >&5
3125   rm -rf conftest*
3126   eval "ac_cv_header_$ac_safe=no"
3127 fi
3128 rm -f conftest*
3129 fi
3130 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3131   echo "$ac_t""yes" 1>&6
3132     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3133   cat >> confdefs.h <<EOF
3134 #define $ac_tr_hdr 1
3135 EOF
3136  
3137 else
3138   echo "$ac_t""no" 1>&6
3139 fi
3140 done
3141
3142 for ac_hdr in readline/readline.h readline/history.h ieeefp.h fp_class.h
3143 do
3144 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3145 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3146 echo "configure:3147: checking for $ac_hdr" >&5
3147 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3148   echo $ac_n "(cached) $ac_c" 1>&6
3149 else
3150   cat > conftest.$ac_ext <<EOF
3151 #line 3152 "configure"
3152 #include "confdefs.h"
3153 #include <$ac_hdr>
3154 EOF
3155 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3156 { (eval echo configure:3157: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3157 ac_err=`grep -v '^ *+' conftest.out`
3158 if test -z "$ac_err"; then
3159   rm -rf conftest*
3160   eval "ac_cv_header_$ac_safe=yes"
3161 else
3162   echo "$ac_err" >&5
3163   echo "configure: failed program was:" >&5
3164   cat conftest.$ac_ext >&5
3165   rm -rf conftest*
3166   eval "ac_cv_header_$ac_safe=no"
3167 fi
3168 rm -f conftest*
3169 fi
3170 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3171   echo "$ac_t""yes" 1>&6
3172     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3173   cat >> confdefs.h <<EOF
3174 #define $ac_tr_hdr 1
3175 EOF
3176  
3177 else
3178   echo "$ac_t""no" 1>&6
3179 fi
3180 done
3181
3182 for ac_hdr in netinet/in.h string.h strings.h
3183 do
3184 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3185 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3186 echo "configure:3187: checking for $ac_hdr" >&5
3187 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3188   echo $ac_n "(cached) $ac_c" 1>&6
3189 else
3190   cat > conftest.$ac_ext <<EOF
3191 #line 3192 "configure"
3192 #include "confdefs.h"
3193 #include <$ac_hdr>
3194 EOF
3195 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3196 { (eval echo configure:3197: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3197 ac_err=`grep -v '^ *+' conftest.out`
3198 if test -z "$ac_err"; then
3199   rm -rf conftest*
3200   eval "ac_cv_header_$ac_safe=yes"
3201 else
3202   echo "$ac_err" >&5
3203   echo "configure: failed program was:" >&5
3204   cat conftest.$ac_ext >&5
3205   rm -rf conftest*
3206   eval "ac_cv_header_$ac_safe=no"
3207 fi
3208 rm -f conftest*
3209 fi
3210 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3211   echo "$ac_t""yes" 1>&6
3212     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3213   cat >> confdefs.h <<EOF
3214 #define $ac_tr_hdr 1
3215 EOF
3216  
3217 else
3218   echo "$ac_t""no" 1>&6
3219 fi
3220 done
3221
3222
3223 echo $ac_n "checking for working const""... $ac_c" 1>&6
3224 echo "configure:3225: checking for working const" >&5
3225 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3226   echo $ac_n "(cached) $ac_c" 1>&6
3227 else
3228   cat > conftest.$ac_ext <<EOF
3229 #line 3230 "configure"
3230 #include "confdefs.h"
3231
3232 int main() {
3233
3234 /* Ultrix mips cc rejects this.  */
3235 typedef int charset[2]; const charset x;
3236 /* SunOS 4.1.1 cc rejects this.  */
3237 char const *const *ccp;
3238 char **p;
3239 /* NEC SVR4.0.2 mips cc rejects this.  */
3240 struct point {int x, y;};
3241 static struct point const zero = {0,0};
3242 /* AIX XL C 1.02.0.0 rejects this.
3243    It does not let you subtract one const X* pointer from another in an arm
3244    of an if-expression whose if-part is not a constant expression */
3245 const char *g = "string";
3246 ccp = &g + (g ? g-g : 0);
3247 /* HPUX 7.0 cc rejects these. */
3248 ++ccp;
3249 p = (char**) ccp;
3250 ccp = (char const *const *) p;
3251 { /* SCO 3.2v4 cc rejects this.  */
3252   char *t;
3253   char const *s = 0 ? (char *) 0 : (char const *) 0;
3254
3255   *t++ = 0;
3256 }
3257 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3258   int x[] = {25, 17};
3259   const int *foo = &x[0];
3260   ++foo;
3261 }
3262 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3263   typedef const int *iptr;
3264   iptr p = 0;
3265   ++p;
3266 }
3267 { /* AIX XL C 1.02.0.0 rejects this saying
3268      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3269   struct s { int j; const int *ap[3]; };
3270   struct s *b; b->j = 5;
3271 }
3272 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3273   const int foo = 10;
3274 }
3275
3276 ; return 0; }
3277 EOF
3278 if { (eval echo configure:3279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3279   rm -rf conftest*
3280   ac_cv_c_const=yes
3281 else
3282   echo "configure: failed program was:" >&5
3283   cat conftest.$ac_ext >&5
3284   rm -rf conftest*
3285   ac_cv_c_const=no
3286 fi
3287 rm -f conftest*
3288 fi
3289
3290 echo "$ac_t""$ac_cv_c_const" 1>&6
3291 if test $ac_cv_c_const = no; then
3292   cat >> confdefs.h <<\EOF
3293 #define const 
3294 EOF
3295
3296 fi
3297
3298 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3299 echo "configure:3300: checking for uid_t in sys/types.h" >&5
3300 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3301   echo $ac_n "(cached) $ac_c" 1>&6
3302 else
3303   cat > conftest.$ac_ext <<EOF
3304 #line 3305 "configure"
3305 #include "confdefs.h"
3306 #include <sys/types.h>
3307 EOF
3308 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3309   egrep "uid_t" >/dev/null 2>&1; then
3310   rm -rf conftest*
3311   ac_cv_type_uid_t=yes
3312 else
3313   rm -rf conftest*
3314   ac_cv_type_uid_t=no
3315 fi
3316 rm -f conftest*
3317
3318 fi
3319
3320 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3321 if test $ac_cv_type_uid_t = no; then
3322   cat >> confdefs.h <<\EOF
3323 #define uid_t int
3324 EOF
3325
3326   cat >> confdefs.h <<\EOF
3327 #define gid_t int
3328 EOF
3329
3330 fi
3331
3332 echo $ac_n "checking for inline""... $ac_c" 1>&6
3333 echo "configure:3334: checking for inline" >&5
3334 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3335   echo $ac_n "(cached) $ac_c" 1>&6
3336 else
3337   ac_cv_c_inline=no
3338 for ac_kw in inline __inline__ __inline; do
3339   cat > conftest.$ac_ext <<EOF
3340 #line 3341 "configure"
3341 #include "confdefs.h"
3342
3343 int main() {
3344 } $ac_kw foo() {
3345 ; return 0; }
3346 EOF
3347 if { (eval echo configure:3348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3348   rm -rf conftest*
3349   ac_cv_c_inline=$ac_kw; break
3350 else
3351   echo "configure: failed program was:" >&5
3352   cat conftest.$ac_ext >&5
3353 fi
3354 rm -f conftest*
3355 done
3356
3357 fi
3358
3359 echo "$ac_t""$ac_cv_c_inline" 1>&6
3360 case "$ac_cv_c_inline" in
3361   inline | yes) ;;
3362   no) cat >> confdefs.h <<\EOF
3363 #define inline 
3364 EOF
3365  ;;
3366   *)  cat >> confdefs.h <<EOF
3367 #define inline $ac_cv_c_inline
3368 EOF
3369  ;;
3370 esac
3371
3372 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3373 echo "configure:3374: checking for mode_t" >&5
3374 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3375   echo $ac_n "(cached) $ac_c" 1>&6
3376 else
3377   cat > conftest.$ac_ext <<EOF
3378 #line 3379 "configure"
3379 #include "confdefs.h"
3380 #include <sys/types.h>
3381 #if STDC_HEADERS
3382 #include <stdlib.h>
3383 #include <stddef.h>
3384 #endif
3385 EOF
3386 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3387   egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3388   rm -rf conftest*
3389   ac_cv_type_mode_t=yes
3390 else
3391   rm -rf conftest*
3392   ac_cv_type_mode_t=no
3393 fi
3394 rm -f conftest*
3395
3396 fi
3397 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3398 if test $ac_cv_type_mode_t = no; then
3399   cat >> confdefs.h <<\EOF
3400 #define mode_t int
3401 EOF
3402
3403 fi
3404
3405 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3406 echo "configure:3407: checking for off_t" >&5
3407 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3408   echo $ac_n "(cached) $ac_c" 1>&6
3409 else
3410   cat > conftest.$ac_ext <<EOF
3411 #line 3412 "configure"
3412 #include "confdefs.h"
3413 #include <sys/types.h>
3414 #if STDC_HEADERS
3415 #include <stdlib.h>
3416 #include <stddef.h>
3417 #endif
3418 EOF
3419 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3420   egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3421   rm -rf conftest*
3422   ac_cv_type_off_t=yes
3423 else
3424   rm -rf conftest*
3425   ac_cv_type_off_t=no
3426 fi
3427 rm -f conftest*
3428
3429 fi
3430 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3431 if test $ac_cv_type_off_t = no; then
3432   cat >> confdefs.h <<\EOF
3433 #define off_t long
3434 EOF
3435
3436 fi
3437
3438 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3439 echo "configure:3440: checking for size_t" >&5
3440 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3441   echo $ac_n "(cached) $ac_c" 1>&6
3442 else
3443   cat > conftest.$ac_ext <<EOF
3444 #line 3445 "configure"
3445 #include "confdefs.h"
3446 #include <sys/types.h>
3447 #if STDC_HEADERS
3448 #include <stdlib.h>
3449 #include <stddef.h>
3450 #endif
3451 EOF
3452 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3453   egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3454   rm -rf conftest*
3455   ac_cv_type_size_t=yes
3456 else
3457   rm -rf conftest*
3458   ac_cv_type_size_t=no
3459 fi
3460 rm -f conftest*
3461
3462 fi
3463 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3464 if test $ac_cv_type_size_t = no; then
3465   cat >> confdefs.h <<\EOF
3466 #define size_t unsigned
3467 EOF
3468
3469 fi
3470
3471 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3472 echo "configure:3473: checking whether time.h and sys/time.h may both be included" >&5
3473 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
3474   echo $ac_n "(cached) $ac_c" 1>&6
3475 else
3476   cat > conftest.$ac_ext <<EOF
3477 #line 3478 "configure"
3478 #include "confdefs.h"
3479 #include <sys/types.h>
3480 #include <sys/time.h>
3481 #include <time.h>
3482 int main() {
3483 struct tm *tp;
3484 ; return 0; }
3485 EOF
3486 if { (eval echo configure:3487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3487   rm -rf conftest*
3488   ac_cv_header_time=yes
3489 else
3490   echo "configure: failed program was:" >&5
3491   cat conftest.$ac_ext >&5
3492   rm -rf conftest*
3493   ac_cv_header_time=no
3494 fi
3495 rm -f conftest*
3496 fi
3497
3498 echo "$ac_t""$ac_cv_header_time" 1>&6
3499 if test $ac_cv_header_time = yes; then
3500   cat >> confdefs.h <<\EOF
3501 #define TIME_WITH_SYS_TIME 1
3502 EOF
3503
3504 fi
3505
3506 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3507 echo "configure:3508: checking whether struct tm is in sys/time.h or time.h" >&5
3508 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
3509   echo $ac_n "(cached) $ac_c" 1>&6
3510 else
3511   cat > conftest.$ac_ext <<EOF
3512 #line 3513 "configure"
3513 #include "confdefs.h"
3514 #include <sys/types.h>
3515 #include <time.h>
3516 int main() {
3517 struct tm *tp; tp->tm_sec;
3518 ; return 0; }
3519 EOF
3520 if { (eval echo configure:3521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3521   rm -rf conftest*
3522   ac_cv_struct_tm=time.h
3523 else
3524   echo "configure: failed program was:" >&5
3525   cat conftest.$ac_ext >&5
3526   rm -rf conftest*
3527   ac_cv_struct_tm=sys/time.h
3528 fi
3529 rm -f conftest*
3530 fi
3531
3532 echo "$ac_t""$ac_cv_struct_tm" 1>&6
3533 if test $ac_cv_struct_tm = sys/time.h; then
3534   cat >> confdefs.h <<\EOF
3535 #define TM_IN_SYS_TIME 1
3536 EOF
3537
3538 fi
3539
3540
3541 echo $ac_n "checking for int timezone""... $ac_c" 1>&6
3542 echo "configure:3543: checking for int timezone" >&5
3543 cat > conftest.$ac_ext <<EOF
3544 #line 3545 "configure"
3545 #include "confdefs.h"
3546 #include <time.h>
3547 int main() {
3548 int res = timezone / 60; 
3549 ; return 0; }
3550 EOF
3551 if { (eval echo configure:3552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3552   rm -rf conftest*
3553   cat >> confdefs.h <<\EOF
3554 #define HAVE_INT_TIMEZONE 1
3555 EOF
3556  echo "$ac_t""yes" 1>&6
3557 else
3558   echo "configure: failed program was:" >&5
3559   cat conftest.$ac_ext >&5
3560   rm -rf conftest*
3561   echo "$ac_t""no" 1>&6
3562 fi
3563 rm -f conftest*
3564
3565 echo $ac_n "checking for gettimeofday args""... $ac_c" 1>&6
3566 echo "configure:3567: checking for gettimeofday args" >&5
3567 cat > conftest.$ac_ext <<EOF
3568 #line 3569 "configure"
3569 #include "confdefs.h"
3570 #include <sys/time.h>
3571 int main() {
3572 struct timeval *tp; struct timezone *tzp; gettimeofday(tp,tzp); 
3573 ; return 0; }
3574 EOF
3575 if { (eval echo configure:3576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3576   rm -rf conftest*
3577   cat >> confdefs.h <<\EOF
3578 #define HAVE_GETTIMEOFDAY_2_ARGS 1
3579 EOF
3580  echo "$ac_t""2 args" 1>&6
3581 else
3582   echo "configure: failed program was:" >&5
3583   cat conftest.$ac_ext >&5
3584   rm -rf conftest*
3585   echo "$ac_t""no" 1>&6
3586 fi
3587 rm -f conftest*
3588
3589 echo $ac_n "checking for union semun""... $ac_c" 1>&6
3590 echo "configure:3591: checking for union semun" >&5
3591 cat > conftest.$ac_ext <<EOF
3592 #line 3593 "configure"
3593 #include "confdefs.h"
3594 #include <sys/types.h>
3595 #include <sys/ipc.h>
3596 #include <sys/sem.h>
3597 int main() {
3598 union semun semun;
3599 ; return 0; }
3600 EOF
3601 if { (eval echo configure:3602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3602   rm -rf conftest*
3603   cat >> confdefs.h <<\EOF
3604 #define HAVE_UNION_SEMUN 1
3605 EOF
3606  echo "$ac_t""yes" 1>&6
3607 else
3608   echo "configure: failed program was:" >&5
3609   cat conftest.$ac_ext >&5
3610   rm -rf conftest*
3611   echo "$ac_t""no" 1>&6
3612 fi
3613 rm -f conftest*
3614
3615 echo $ac_n "checking for good DBL_MIN""... $ac_c" 1>&6
3616 echo "configure:3617: checking for good DBL_MIN" >&5
3617 if test "$cross_compiling" = yes; then
3618   echo "$ac_t""assuming ok on target machine" 1>&6
3619 else
3620   cat > conftest.$ac_ext <<EOF
3621 #line 3622 "configure"
3622 #include "confdefs.h"
3623 #include <stdlib.h>
3624 #include <math.h>
3625 #ifdef HAVE_FLOAT_H
3626 # include <float.h>
3627 #endif
3628 main() { double d = DBL_MIN; if (d != DBL_MIN) exit(-1); else exit(0); }
3629 EOF
3630 if { (eval echo configure:3631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3631 then
3632   echo "$ac_t""yes" 1>&6
3633 else
3634   echo "configure: failed program was:" >&5
3635   cat conftest.$ac_ext >&5
3636   rm -fr conftest*
3637   echo "$ac_t""no" 1>&6 cat >> confdefs.h <<\EOF
3638 #define HAVE_DBL_MIN_PROBLEM 1
3639 EOF
3640
3641 fi
3642 rm -fr conftest*
3643 fi
3644
3645
3646 echo $ac_n "checking whether 'long int' is 64 bits""... $ac_c" 1>&6
3647 echo "configure:3648: checking whether 'long int' is 64 bits" >&5
3648 if test "$cross_compiling" = yes; then
3649   echo "$ac_t""assuming not on target machine" 1>&6
3650 else
3651   cat > conftest.$ac_ext <<EOF
3652 #line 3653 "configure"
3653 #include "confdefs.h"
3654 #include <stdio.h>
3655 typedef long int int64;
3656 #define INT64_FORMAT "%ld"
3657
3658 int64 a = 20000001;
3659 int64 b = 40000005;
3660
3661 int does_int64_work()
3662 {
3663   int64 c,d,e;
3664   char buf[100];
3665
3666   if (sizeof(int64) != 8)
3667     return 0;                   /* doesn't look like the right size */
3668
3669   /* we do perfunctory checks on multiply, divide, sprintf, sscanf */
3670   c = a * b;
3671   sprintf(buf, INT64_FORMAT, c);
3672   if (strcmp(buf, "800000140000005") != 0)
3673     return 0;                   /* either multiply or sprintf is busted */
3674   if (sscanf(buf, INT64_FORMAT, &d) != 1)
3675     return 0;
3676   if (d != c)
3677     return 0;
3678   e = d / b;
3679   if (e != a)
3680     return 0;
3681   return 1;
3682 }
3683 main() {
3684   exit(! does_int64_work());
3685 }
3686 EOF
3687 if { (eval echo configure:3688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3688 then
3689   echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF
3690 #define HAVE_LONG_INT_64 1
3691 EOF
3692
3693 else
3694   echo "configure: failed program was:" >&5
3695   cat conftest.$ac_ext >&5
3696   rm -fr conftest*
3697   echo "$ac_t""no" 1>&6
3698 fi
3699 rm -fr conftest*
3700 fi
3701
3702
3703 echo $ac_n "checking whether 'long long int' is 64 bits""... $ac_c" 1>&6
3704 echo "configure:3705: checking whether 'long long int' is 64 bits" >&5
3705 if test "$cross_compiling" = yes; then
3706   echo "$ac_t""assuming not on target machine" 1>&6
3707 else
3708   cat > conftest.$ac_ext <<EOF
3709 #line 3710 "configure"
3710 #include "confdefs.h"
3711 #include <stdio.h>
3712 typedef long long int int64;
3713 #define INT64_FORMAT "%Ld"
3714
3715 int64 a = 20000001;
3716 int64 b = 40000005;
3717
3718 int does_int64_work()
3719 {
3720   int64 c,d,e;
3721   char buf[100];
3722
3723   if (sizeof(int64) != 8)
3724     return 0;                   /* doesn't look like the right size */
3725
3726   /* we do perfunctory checks on multiply, divide, sprintf, sscanf */
3727   c = a * b;
3728   sprintf(buf, INT64_FORMAT, c);
3729   if (strcmp(buf, "800000140000005") != 0)
3730     return 0;                   /* either multiply or sprintf is busted */
3731   if (sscanf(buf, INT64_FORMAT, &d) != 1)
3732     return 0;
3733   if (d != c)
3734     return 0;
3735   e = d / b;
3736   if (e != a)
3737     return 0;
3738   return 1;
3739 }
3740 main() {
3741   exit(! does_int64_work());
3742 }
3743 EOF
3744 if { (eval echo configure:3745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3745 then
3746   echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF
3747 #define HAVE_LONG_LONG_INT_64 1
3748 EOF
3749
3750 else
3751   echo "configure: failed program was:" >&5
3752   cat conftest.$ac_ext >&5
3753   rm -fr conftest*
3754   echo "$ac_t""no" 1>&6
3755 fi
3756 rm -fr conftest*
3757 fi
3758
3759
3760 if test $ac_cv_prog_gcc = yes; then
3761     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
3762 echo "configure:3763: checking whether ${CC-cc} needs -traditional" >&5
3763 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
3764   echo $ac_n "(cached) $ac_c" 1>&6
3765 else
3766     ac_pattern="Autoconf.*'x'"
3767   cat > conftest.$ac_ext <<EOF
3768 #line 3769 "configure"
3769 #include "confdefs.h"
3770 #include <sgtty.h>
3771 Autoconf TIOCGETP
3772 EOF
3773 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3774   egrep "$ac_pattern" >/dev/null 2>&1; then
3775   rm -rf conftest*
3776   ac_cv_prog_gcc_traditional=yes
3777 else
3778   rm -rf conftest*
3779   ac_cv_prog_gcc_traditional=no
3780 fi
3781 rm -f conftest*
3782
3783
3784   if test $ac_cv_prog_gcc_traditional = no; then
3785     cat > conftest.$ac_ext <<EOF
3786 #line 3787 "configure"
3787 #include "confdefs.h"
3788 #include <termio.h>
3789 Autoconf TCGETA
3790 EOF
3791 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3792   egrep "$ac_pattern" >/dev/null 2>&1; then
3793   rm -rf conftest*
3794   ac_cv_prog_gcc_traditional=yes
3795 fi
3796 rm -f conftest*
3797
3798   fi
3799 fi
3800
3801 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
3802   if test $ac_cv_prog_gcc_traditional = yes; then
3803     CC="$CC -traditional"
3804   fi
3805 fi
3806
3807 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
3808 echo "configure:3809: checking for 8-bit clean memcmp" >&5
3809 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
3810   echo $ac_n "(cached) $ac_c" 1>&6
3811 else
3812   if test "$cross_compiling" = yes; then
3813   ac_cv_func_memcmp_clean=no
3814 else
3815   cat > conftest.$ac_ext <<EOF
3816 #line 3817 "configure"
3817 #include "confdefs.h"
3818
3819 main()
3820 {
3821   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
3822   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
3823 }
3824
3825 EOF
3826 if { (eval echo configure:3827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3827 then
3828   ac_cv_func_memcmp_clean=yes
3829 else
3830   echo "configure: failed program was:" >&5
3831   cat conftest.$ac_ext >&5
3832   rm -fr conftest*
3833   ac_cv_func_memcmp_clean=no
3834 fi
3835 rm -fr conftest*
3836 fi
3837
3838 fi
3839
3840 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
3841 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
3842
3843 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3844 echo "configure:3845: checking return type of signal handlers" >&5
3845 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3846   echo $ac_n "(cached) $ac_c" 1>&6
3847 else
3848   cat > conftest.$ac_ext <<EOF
3849 #line 3850 "configure"
3850 #include "confdefs.h"
3851 #include <sys/types.h>
3852 #include <signal.h>
3853 #ifdef signal
3854 #undef signal
3855 #endif
3856 #ifdef __cplusplus
3857 extern "C" void (*signal (int, void (*)(int)))(int);
3858 #else
3859 void (*signal ()) ();
3860 #endif
3861
3862 int main() {
3863 int i;
3864 ; return 0; }
3865 EOF
3866 if { (eval echo configure:3867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3867   rm -rf conftest*
3868   ac_cv_type_signal=void
3869 else
3870   echo "configure: failed program was:" >&5
3871   cat conftest.$ac_ext >&5
3872   rm -rf conftest*
3873   ac_cv_type_signal=int
3874 fi
3875 rm -f conftest*
3876 fi
3877
3878 echo "$ac_t""$ac_cv_type_signal" 1>&6
3879 cat >> confdefs.h <<EOF
3880 #define RETSIGTYPE $ac_cv_type_signal
3881 EOF
3882
3883
3884 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
3885 echo "configure:3886: checking for vprintf" >&5
3886 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
3887   echo $ac_n "(cached) $ac_c" 1>&6
3888 else
3889   cat > conftest.$ac_ext <<EOF
3890 #line 3891 "configure"
3891 #include "confdefs.h"
3892 /* System header to define __stub macros and hopefully few prototypes,
3893     which can conflict with char vprintf(); below.  */
3894 #include <assert.h>
3895 /* Override any gcc2 internal prototype to avoid an error.  */
3896 /* We use char because int might match the return type of a gcc2
3897     builtin and then its argument prototype would still apply.  */
3898 char vprintf();
3899
3900 int main() {
3901
3902 /* The GNU C library defines this for functions which it implements
3903     to always fail with ENOSYS.  Some functions are actually named
3904     something starting with __ and the normal name is an alias.  */
3905 #if defined (__stub_vprintf) || defined (__stub___vprintf)
3906 choke me
3907 #else
3908 vprintf();
3909 #endif
3910
3911 ; return 0; }
3912 EOF
3913 if { (eval echo configure:3914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3914   rm -rf conftest*
3915   eval "ac_cv_func_vprintf=yes"
3916 else
3917   echo "configure: failed program was:" >&5
3918   cat conftest.$ac_ext >&5
3919   rm -rf conftest*
3920   eval "ac_cv_func_vprintf=no"
3921 fi
3922 rm -f conftest*
3923 fi
3924
3925 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
3926   echo "$ac_t""yes" 1>&6
3927   cat >> confdefs.h <<\EOF
3928 #define HAVE_VPRINTF 1
3929 EOF
3930
3931 else
3932   echo "$ac_t""no" 1>&6
3933 fi
3934
3935 if test "$ac_cv_func_vprintf" != yes; then
3936 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
3937 echo "configure:3938: checking for _doprnt" >&5
3938 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
3939   echo $ac_n "(cached) $ac_c" 1>&6
3940 else
3941   cat > conftest.$ac_ext <<EOF
3942 #line 3943 "configure"
3943 #include "confdefs.h"
3944 /* System header to define __stub macros and hopefully few prototypes,
3945     which can conflict with char _doprnt(); below.  */
3946 #include <assert.h>
3947 /* Override any gcc2 internal prototype to avoid an error.  */
3948 /* We use char because int might match the return type of a gcc2
3949     builtin and then its argument prototype would still apply.  */
3950 char _doprnt();
3951
3952 int main() {
3953
3954 /* The GNU C library defines this for functions which it implements
3955     to always fail with ENOSYS.  Some functions are actually named
3956     something starting with __ and the normal name is an alias.  */
3957 #if defined (__stub__doprnt) || defined (__stub____doprnt)
3958 choke me
3959 #else
3960 _doprnt();
3961 #endif
3962
3963 ; return 0; }
3964 EOF
3965 if { (eval echo configure:3966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3966   rm -rf conftest*
3967   eval "ac_cv_func__doprnt=yes"
3968 else
3969   echo "configure: failed program was:" >&5
3970   cat conftest.$ac_ext >&5
3971   rm -rf conftest*
3972   eval "ac_cv_func__doprnt=no"
3973 fi
3974 rm -f conftest*
3975 fi
3976
3977 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
3978   echo "$ac_t""yes" 1>&6
3979   cat >> confdefs.h <<\EOF
3980 #define HAVE_DOPRNT 1
3981 EOF
3982
3983 else
3984   echo "$ac_t""no" 1>&6
3985 fi
3986
3987 fi
3988
3989 for ac_func in tzset memmove sigsetjmp kill sysconf fpclass
3990 do
3991 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3992 echo "configure:3993: checking for $ac_func" >&5
3993 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3994   echo $ac_n "(cached) $ac_c" 1>&6
3995 else
3996   cat > conftest.$ac_ext <<EOF
3997 #line 3998 "configure"
3998 #include "confdefs.h"
3999 /* System header to define __stub macros and hopefully few prototypes,
4000     which can conflict with char $ac_func(); below.  */
4001 #include <assert.h>
4002 /* Override any gcc2 internal prototype to avoid an error.  */
4003 /* We use char because int might match the return type of a gcc2
4004     builtin and then its argument prototype would still apply.  */
4005 char $ac_func();
4006
4007 int main() {
4008
4009 /* The GNU C library defines this for functions which it implements
4010     to always fail with ENOSYS.  Some functions are actually named
4011     something starting with __ and the normal name is an alias.  */
4012 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4013 choke me
4014 #else
4015 $ac_func();
4016 #endif
4017
4018 ; return 0; }
4019 EOF
4020 if { (eval echo configure:4021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4021   rm -rf conftest*
4022   eval "ac_cv_func_$ac_func=yes"
4023 else
4024   echo "configure: failed program was:" >&5
4025   cat conftest.$ac_ext >&5
4026   rm -rf conftest*
4027   eval "ac_cv_func_$ac_func=no"
4028 fi
4029 rm -f conftest*
4030 fi
4031
4032 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4033   echo "$ac_t""yes" 1>&6
4034     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4035   cat >> confdefs.h <<EOF
4036 #define $ac_tr_func 1
4037 EOF
4038  
4039 else
4040   echo "$ac_t""no" 1>&6
4041 fi
4042 done
4043
4044 for ac_func in fp_class fp_class_d class
4045 do
4046 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4047 echo "configure:4048: checking for $ac_func" >&5
4048 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4049   echo $ac_n "(cached) $ac_c" 1>&6
4050 else
4051   cat > conftest.$ac_ext <<EOF
4052 #line 4053 "configure"
4053 #include "confdefs.h"
4054 /* System header to define __stub macros and hopefully few prototypes,
4055     which can conflict with char $ac_func(); below.  */
4056 #include <assert.h>
4057 /* Override any gcc2 internal prototype to avoid an error.  */
4058 /* We use char because int might match the return type of a gcc2
4059     builtin and then its argument prototype would still apply.  */
4060 char $ac_func();
4061
4062 int main() {
4063
4064 /* The GNU C library defines this for functions which it implements
4065     to always fail with ENOSYS.  Some functions are actually named
4066     something starting with __ and the normal name is an alias.  */
4067 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4068 choke me
4069 #else
4070 $ac_func();
4071 #endif
4072
4073 ; return 0; }
4074 EOF
4075 if { (eval echo configure:4076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4076   rm -rf conftest*
4077   eval "ac_cv_func_$ac_func=yes"
4078 else
4079   echo "configure: failed program was:" >&5
4080   cat conftest.$ac_ext >&5
4081   rm -rf conftest*
4082   eval "ac_cv_func_$ac_func=no"
4083 fi
4084 rm -f conftest*
4085 fi
4086
4087 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4088   echo "$ac_t""yes" 1>&6
4089     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4090   cat >> confdefs.h <<EOF
4091 #define $ac_tr_func 1
4092 EOF
4093  
4094 else
4095   echo "$ac_t""no" 1>&6
4096 fi
4097 done
4098
4099 for ac_func in sigprocmask waitpid setsid fcvt
4100 do
4101 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4102 echo "configure:4103: checking for $ac_func" >&5
4103 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4104   echo $ac_n "(cached) $ac_c" 1>&6
4105 else
4106   cat > conftest.$ac_ext <<EOF
4107 #line 4108 "configure"
4108 #include "confdefs.h"
4109 /* System header to define __stub macros and hopefully few prototypes,
4110     which can conflict with char $ac_func(); below.  */
4111 #include <assert.h>
4112 /* Override any gcc2 internal prototype to avoid an error.  */
4113 /* We use char because int might match the return type of a gcc2
4114     builtin and then its argument prototype would still apply.  */
4115 char $ac_func();
4116
4117 int main() {
4118
4119 /* The GNU C library defines this for functions which it implements
4120     to always fail with ENOSYS.  Some functions are actually named
4121     something starting with __ and the normal name is an alias.  */
4122 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4123 choke me
4124 #else
4125 $ac_func();
4126 #endif
4127
4128 ; return 0; }
4129 EOF
4130 if { (eval echo configure:4131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4131   rm -rf conftest*
4132   eval "ac_cv_func_$ac_func=yes"
4133 else
4134   echo "configure: failed program was:" >&5
4135   cat conftest.$ac_ext >&5
4136   rm -rf conftest*
4137   eval "ac_cv_func_$ac_func=no"
4138 fi
4139 rm -f conftest*
4140 fi
4141
4142 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4143   echo "$ac_t""yes" 1>&6
4144     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4145   cat >> confdefs.h <<EOF
4146 #define $ac_tr_func 1
4147 EOF
4148  
4149 else
4150   echo "$ac_t""no" 1>&6
4151 fi
4152 done
4153
4154 echo $ac_n "checking for snprintf""... $ac_c" 1>&6
4155 echo "configure:4156: checking for snprintf" >&5
4156 if eval "test \"`echo '$''{'ac_cv_func_snprintf'+set}'`\" = set"; then
4157   echo $ac_n "(cached) $ac_c" 1>&6
4158 else
4159   cat > conftest.$ac_ext <<EOF
4160 #line 4161 "configure"
4161 #include "confdefs.h"
4162 /* System header to define __stub macros and hopefully few prototypes,
4163     which can conflict with char snprintf(); below.  */
4164 #include <assert.h>
4165 /* Override any gcc2 internal prototype to avoid an error.  */
4166 /* We use char because int might match the return type of a gcc2
4167     builtin and then its argument prototype would still apply.  */
4168 char snprintf();
4169
4170 int main() {
4171
4172 /* The GNU C library defines this for functions which it implements
4173     to always fail with ENOSYS.  Some functions are actually named
4174     something starting with __ and the normal name is an alias.  */
4175 #if defined (__stub_snprintf) || defined (__stub___snprintf)
4176 choke me
4177 #else
4178 snprintf();
4179 #endif
4180
4181 ; return 0; }
4182 EOF
4183 if { (eval echo configure:4184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4184   rm -rf conftest*
4185   eval "ac_cv_func_snprintf=yes"
4186 else
4187   echo "configure: failed program was:" >&5
4188   cat conftest.$ac_ext >&5
4189   rm -rf conftest*
4190   eval "ac_cv_func_snprintf=no"
4191 fi
4192 rm -f conftest*
4193 fi
4194
4195 if eval "test \"`echo '$ac_cv_func_'snprintf`\" = yes"; then
4196   echo "$ac_t""yes" 1>&6
4197   cat >> confdefs.h <<\EOF
4198 #define HAVE_SNPRINTF 1
4199 EOF
4200
4201 else
4202   echo "$ac_t""no" 1>&6
4203 SNPRINTF='snprintf.o'
4204 fi
4205
4206
4207 echo $ac_n "checking for isinf""... $ac_c" 1>&6
4208 echo "configure:4209: checking for isinf" >&5
4209 if eval "test \"`echo '$''{'ac_cv_func_isinf'+set}'`\" = set"; then
4210   echo $ac_n "(cached) $ac_c" 1>&6
4211 else
4212   cat > conftest.$ac_ext <<EOF
4213 #line 4214 "configure"
4214 #include "confdefs.h"
4215 /* System header to define __stub macros and hopefully few prototypes,
4216     which can conflict with char isinf(); below.  */
4217 #include <assert.h>
4218 /* Override any gcc2 internal prototype to avoid an error.  */
4219 /* We use char because int might match the return type of a gcc2
4220     builtin and then its argument prototype would still apply.  */
4221 char isinf();
4222
4223 int main() {
4224
4225 /* The GNU C library defines this for functions which it implements
4226     to always fail with ENOSYS.  Some functions are actually named
4227     something starting with __ and the normal name is an alias.  */
4228 #if defined (__stub_isinf) || defined (__stub___isinf)
4229 choke me
4230 #else
4231 isinf();
4232 #endif
4233
4234 ; return 0; }
4235 EOF
4236 if { (eval echo configure:4237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4237   rm -rf conftest*
4238   eval "ac_cv_func_isinf=yes"
4239 else
4240   echo "configure: failed program was:" >&5
4241   cat conftest.$ac_ext >&5
4242   rm -rf conftest*
4243   eval "ac_cv_func_isinf=no"
4244 fi
4245 rm -f conftest*
4246 fi
4247
4248 if eval "test \"`echo '$ac_cv_func_'isinf`\" = yes"; then
4249   echo "$ac_t""yes" 1>&6
4250   cat >> confdefs.h <<\EOF
4251 #define HAVE_ISINF 1
4252 EOF
4253
4254 else
4255   echo "$ac_t""no" 1>&6
4256 ISINF='isinf.o'
4257 fi
4258
4259
4260 echo $ac_n "checking for getrusage""... $ac_c" 1>&6
4261 echo "configure:4262: checking for getrusage" >&5
4262 if eval "test \"`echo '$''{'ac_cv_func_getrusage'+set}'`\" = set"; then
4263   echo $ac_n "(cached) $ac_c" 1>&6
4264 else
4265   cat > conftest.$ac_ext <<EOF
4266 #line 4267 "configure"
4267 #include "confdefs.h"
4268 /* System header to define __stub macros and hopefully few prototypes,
4269     which can conflict with char getrusage(); below.  */
4270 #include <assert.h>
4271 /* Override any gcc2 internal prototype to avoid an error.  */
4272 /* We use char because int might match the return type of a gcc2
4273     builtin and then its argument prototype would still apply.  */
4274 char getrusage();
4275
4276 int main() {
4277
4278 /* The GNU C library defines this for functions which it implements
4279     to always fail with ENOSYS.  Some functions are actually named
4280     something starting with __ and the normal name is an alias.  */
4281 #if defined (__stub_getrusage) || defined (__stub___getrusage)
4282 choke me
4283 #else
4284 getrusage();
4285 #endif
4286
4287 ; return 0; }
4288 EOF
4289 if { (eval echo configure:4290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4290   rm -rf conftest*
4291   eval "ac_cv_func_getrusage=yes"
4292 else
4293   echo "configure: failed program was:" >&5
4294   cat conftest.$ac_ext >&5
4295   rm -rf conftest*
4296   eval "ac_cv_func_getrusage=no"
4297 fi
4298 rm -f conftest*
4299 fi
4300
4301 if eval "test \"`echo '$ac_cv_func_'getrusage`\" = yes"; then
4302   echo "$ac_t""yes" 1>&6
4303   cat >> confdefs.h <<\EOF
4304 #define HAVE_GETRUSAGE 1
4305 EOF
4306
4307 else
4308   echo "$ac_t""no" 1>&6
4309 GETRUSAGE='getrusage.o'
4310 fi
4311
4312
4313 echo $ac_n "checking for srandom""... $ac_c" 1>&6
4314 echo "configure:4315: checking for srandom" >&5
4315 if eval "test \"`echo '$''{'ac_cv_func_srandom'+set}'`\" = set"; then
4316   echo $ac_n "(cached) $ac_c" 1>&6
4317 else
4318   cat > conftest.$ac_ext <<EOF
4319 #line 4320 "configure"
4320 #include "confdefs.h"
4321 /* System header to define __stub macros and hopefully few prototypes,
4322     which can conflict with char srandom(); below.  */
4323 #include <assert.h>
4324 /* Override any gcc2 internal prototype to avoid an error.  */
4325 /* We use char because int might match the return type of a gcc2
4326     builtin and then its argument prototype would still apply.  */
4327 char srandom();
4328
4329 int main() {
4330
4331 /* The GNU C library defines this for functions which it implements
4332     to always fail with ENOSYS.  Some functions are actually named
4333     something starting with __ and the normal name is an alias.  */
4334 #if defined (__stub_srandom) || defined (__stub___srandom)
4335 choke me
4336 #else
4337 srandom();
4338 #endif
4339
4340 ; return 0; }
4341 EOF
4342 if { (eval echo configure:4343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4343   rm -rf conftest*
4344   eval "ac_cv_func_srandom=yes"
4345 else
4346   echo "configure: failed program was:" >&5
4347   cat conftest.$ac_ext >&5
4348   rm -rf conftest*
4349   eval "ac_cv_func_srandom=no"
4350 fi
4351 rm -f conftest*
4352 fi
4353
4354 if eval "test \"`echo '$ac_cv_func_'srandom`\" = yes"; then
4355   echo "$ac_t""yes" 1>&6
4356   cat >> confdefs.h <<\EOF
4357 #define HAVE_SRANDOM 1
4358 EOF
4359
4360 else
4361   echo "$ac_t""no" 1>&6
4362 SRANDOM='srandom.o'
4363 fi
4364
4365
4366 echo $ac_n "checking for gethostname""... $ac_c" 1>&6
4367 echo "configure:4368: checking for gethostname" >&5
4368 if eval "test \"`echo '$''{'ac_cv_func_gethostname'+set}'`\" = set"; then
4369   echo $ac_n "(cached) $ac_c" 1>&6
4370 else
4371   cat > conftest.$ac_ext <<EOF
4372 #line 4373 "configure"
4373 #include "confdefs.h"
4374 /* System header to define __stub macros and hopefully few prototypes,
4375     which can conflict with char gethostname(); below.  */
4376 #include <assert.h>
4377 /* Override any gcc2 internal prototype to avoid an error.  */
4378 /* We use char because int might match the return type of a gcc2
4379     builtin and then its argument prototype would still apply.  */
4380 char gethostname();
4381
4382 int main() {
4383
4384 /* The GNU C library defines this for functions which it implements
4385     to always fail with ENOSYS.  Some functions are actually named
4386     something starting with __ and the normal name is an alias.  */
4387 #if defined (__stub_gethostname) || defined (__stub___gethostname)
4388 choke me
4389 #else
4390 gethostname();
4391 #endif
4392
4393 ; return 0; }
4394 EOF
4395 if { (eval echo configure:4396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4396   rm -rf conftest*
4397   eval "ac_cv_func_gethostname=yes"
4398 else
4399   echo "configure: failed program was:" >&5
4400   cat conftest.$ac_ext >&5
4401   rm -rf conftest*
4402   eval "ac_cv_func_gethostname=no"
4403 fi
4404 rm -f conftest*
4405 fi
4406
4407 if eval "test \"`echo '$ac_cv_func_'gethostname`\" = yes"; then
4408   echo "$ac_t""yes" 1>&6
4409   cat >> confdefs.h <<\EOF
4410 #define HAVE_GETHOSTNAME 1
4411 EOF
4412
4413 else
4414   echo "$ac_t""no" 1>&6
4415 GETHOSTNAME='gethostname.o'
4416 fi
4417
4418
4419 echo $ac_n "checking for random""... $ac_c" 1>&6
4420 echo "configure:4421: checking for random" >&5
4421 if eval "test \"`echo '$''{'ac_cv_func_random'+set}'`\" = set"; then
4422   echo $ac_n "(cached) $ac_c" 1>&6
4423 else
4424   cat > conftest.$ac_ext <<EOF
4425 #line 4426 "configure"
4426 #include "confdefs.h"
4427 /* System header to define __stub macros and hopefully few prototypes,
4428     which can conflict with char random(); below.  */
4429 #include <assert.h>
4430 /* Override any gcc2 internal prototype to avoid an error.  */
4431 /* We use char because int might match the return type of a gcc2
4432     builtin and then its argument prototype would still apply.  */
4433 char random();
4434
4435 int main() {
4436
4437 /* The GNU C library defines this for functions which it implements
4438     to always fail with ENOSYS.  Some functions are actually named
4439     something starting with __ and the normal name is an alias.  */
4440 #if defined (__stub_random) || defined (__stub___random)
4441 choke me
4442 #else
4443 random();
4444 #endif
4445
4446 ; return 0; }
4447 EOF
4448 if { (eval echo configure:4449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4449   rm -rf conftest*
4450   eval "ac_cv_func_random=yes"
4451 else
4452   echo "configure: failed program was:" >&5
4453   cat conftest.$ac_ext >&5
4454   rm -rf conftest*
4455   eval "ac_cv_func_random=no"
4456 fi
4457 rm -f conftest*
4458 fi
4459
4460 if eval "test \"`echo '$ac_cv_func_'random`\" = yes"; then
4461   echo "$ac_t""yes" 1>&6
4462   cat >> confdefs.h <<\EOF
4463 #define HAVE_RANDOM 1
4464 EOF
4465
4466 else
4467   echo "$ac_t""no" 1>&6
4468 MISSING_RANDOM='random.o'
4469 fi
4470
4471
4472 echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
4473 echo "configure:4474: checking for inet_aton" >&5
4474 if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
4475   echo $ac_n "(cached) $ac_c" 1>&6
4476 else
4477   cat > conftest.$ac_ext <<EOF
4478 #line 4479 "configure"
4479 #include "confdefs.h"
4480 /* System header to define __stub macros and hopefully few prototypes,
4481     which can conflict with char inet_aton(); below.  */
4482 #include <assert.h>
4483 /* Override any gcc2 internal prototype to avoid an error.  */
4484 /* We use char because int might match the return type of a gcc2
4485     builtin and then its argument prototype would still apply.  */
4486 char inet_aton();
4487
4488 int main() {
4489
4490 /* The GNU C library defines this for functions which it implements
4491     to always fail with ENOSYS.  Some functions are actually named
4492     something starting with __ and the normal name is an alias.  */
4493 #if defined (__stub_inet_aton) || defined (__stub___inet_aton)
4494 choke me
4495 #else
4496 inet_aton();
4497 #endif
4498
4499 ; return 0; }
4500 EOF
4501 if { (eval echo configure:4502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4502   rm -rf conftest*
4503   eval "ac_cv_func_inet_aton=yes"
4504 else
4505   echo "configure: failed program was:" >&5
4506   cat conftest.$ac_ext >&5
4507   rm -rf conftest*
4508   eval "ac_cv_func_inet_aton=no"
4509 fi
4510 rm -f conftest*
4511 fi
4512
4513 if eval "test \"`echo '$ac_cv_func_'inet_aton`\" = yes"; then
4514   echo "$ac_t""yes" 1>&6
4515   cat >> confdefs.h <<\EOF
4516 #define HAVE_INET_ATON 1
4517 EOF
4518
4519 else
4520   echo "$ac_t""no" 1>&6
4521 INET_ATON='inet_aton.o'
4522 fi
4523
4524
4525 echo $ac_n "checking for strerror""... $ac_c" 1>&6
4526 echo "configure:4527: checking for strerror" >&5
4527 if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then
4528   echo $ac_n "(cached) $ac_c" 1>&6
4529 else
4530   cat > conftest.$ac_ext <<EOF
4531 #line 4532 "configure"
4532 #include "confdefs.h"
4533 /* System header to define __stub macros and hopefully few prototypes,
4534     which can conflict with char strerror(); below.  */
4535 #include <assert.h>
4536 /* Override any gcc2 internal prototype to avoid an error.  */
4537 /* We use char because int might match the return type of a gcc2
4538     builtin and then its argument prototype would still apply.  */
4539 char strerror();
4540
4541 int main() {
4542
4543 /* The GNU C library defines this for functions which it implements
4544     to always fail with ENOSYS.  Some functions are actually named
4545     something starting with __ and the normal name is an alias.  */
4546 #if defined (__stub_strerror) || defined (__stub___strerror)
4547 choke me
4548 #else
4549 strerror();
4550 #endif
4551
4552 ; return 0; }
4553 EOF
4554 if { (eval echo configure:4555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4555   rm -rf conftest*
4556   eval "ac_cv_func_strerror=yes"
4557 else
4558   echo "configure: failed program was:" >&5
4559   cat conftest.$ac_ext >&5
4560   rm -rf conftest*
4561   eval "ac_cv_func_strerror=no"
4562 fi
4563 rm -f conftest*
4564 fi
4565
4566 if eval "test \"`echo '$ac_cv_func_'strerror`\" = yes"; then
4567   echo "$ac_t""yes" 1>&6
4568   cat >> confdefs.h <<\EOF
4569 #define HAVE_STRERROR 1
4570 EOF
4571
4572 else
4573   echo "$ac_t""no" 1>&6
4574 STRERROR='strerror.o' STRERROR2='../../backend/port/strerror.o'
4575 fi
4576
4577
4578
4579 echo $ac_n "checking for strdup""... $ac_c" 1>&6
4580 echo "configure:4581: checking for strdup" >&5
4581 if eval "test \"`echo '$''{'ac_cv_func_strdup'+set}'`\" = set"; then
4582   echo $ac_n "(cached) $ac_c" 1>&6
4583 else
4584   cat > conftest.$ac_ext <<EOF
4585 #line 4586 "configure"
4586 #include "confdefs.h"
4587 /* System header to define __stub macros and hopefully few prototypes,
4588     which can conflict with char strdup(); below.  */
4589 #include <assert.h>
4590 /* Override any gcc2 internal prototype to avoid an error.  */
4591 /* We use char because int might match the return type of a gcc2
4592     builtin and then its argument prototype would still apply.  */
4593 char strdup();
4594
4595 int main() {
4596
4597 /* The GNU C library defines this for functions which it implements
4598     to always fail with ENOSYS.  Some functions are actually named
4599     something starting with __ and the normal name is an alias.  */
4600 #if defined (__stub_strdup) || defined (__stub___strdup)
4601 choke me
4602 #else
4603 strdup();
4604 #endif
4605
4606 ; return 0; }
4607 EOF
4608 if { (eval echo configure:4609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4609   rm -rf conftest*
4610   eval "ac_cv_func_strdup=yes"
4611 else
4612   echo "configure: failed program was:" >&5
4613   cat conftest.$ac_ext >&5
4614   rm -rf conftest*
4615   eval "ac_cv_func_strdup=no"
4616 fi
4617 rm -f conftest*
4618 fi
4619
4620 if eval "test \"`echo '$ac_cv_func_'strdup`\" = yes"; then
4621   echo "$ac_t""yes" 1>&6
4622   cat >> confdefs.h <<\EOF
4623 #define HAVE_STRDUP 1
4624 EOF
4625
4626 else
4627   echo "$ac_t""no" 1>&6
4628 STRDUP='../../utils/strdup.o'
4629 fi
4630
4631
4632 echo $ac_n "checking for strtol""... $ac_c" 1>&6
4633 echo "configure:4634: checking for strtol" >&5
4634 if eval "test \"`echo '$''{'ac_cv_func_strtol'+set}'`\" = set"; then
4635   echo $ac_n "(cached) $ac_c" 1>&6
4636 else
4637   cat > conftest.$ac_ext <<EOF
4638 #line 4639 "configure"
4639 #include "confdefs.h"
4640 /* System header to define __stub macros and hopefully few prototypes,
4641     which can conflict with char strtol(); below.  */
4642 #include <assert.h>
4643 /* Override any gcc2 internal prototype to avoid an error.  */
4644 /* We use char because int might match the return type of a gcc2
4645     builtin and then its argument prototype would still apply.  */
4646 char strtol();
4647
4648 int main() {
4649
4650 /* The GNU C library defines this for functions which it implements
4651     to always fail with ENOSYS.  Some functions are actually named
4652     something starting with __ and the normal name is an alias.  */
4653 #if defined (__stub_strtol) || defined (__stub___strtol)
4654 choke me
4655 #else
4656 strtol();
4657 #endif
4658
4659 ; return 0; }
4660 EOF
4661 if { (eval echo configure:4662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4662   rm -rf conftest*
4663   eval "ac_cv_func_strtol=yes"
4664 else
4665   echo "configure: failed program was:" >&5
4666   cat conftest.$ac_ext >&5
4667   rm -rf conftest*
4668   eval "ac_cv_func_strtol=no"
4669 fi
4670 rm -f conftest*
4671 fi
4672
4673 if eval "test \"`echo '$ac_cv_func_'strtol`\" = yes"; then
4674   echo "$ac_t""yes" 1>&6
4675   cat >> confdefs.h <<\EOF
4676 #define HAVE_STRTOL 1
4677 EOF
4678
4679 else
4680   echo "$ac_t""no" 1>&6
4681 STRTOL='strtol.o'
4682 fi
4683
4684
4685 echo $ac_n "checking for strtoul""... $ac_c" 1>&6
4686 echo "configure:4687: checking for strtoul" >&5
4687 if eval "test \"`echo '$''{'ac_cv_func_strtoul'+set}'`\" = set"; then
4688   echo $ac_n "(cached) $ac_c" 1>&6
4689 else
4690   cat > conftest.$ac_ext <<EOF
4691 #line 4692 "configure"
4692 #include "confdefs.h"
4693 /* System header to define __stub macros and hopefully few prototypes,
4694     which can conflict with char strtoul(); below.  */
4695 #include <assert.h>
4696 /* Override any gcc2 internal prototype to avoid an error.  */
4697 /* We use char because int might match the return type of a gcc2
4698     builtin and then its argument prototype would still apply.  */
4699 char strtoul();
4700
4701 int main() {
4702
4703 /* The GNU C library defines this for functions which it implements
4704     to always fail with ENOSYS.  Some functions are actually named
4705     something starting with __ and the normal name is an alias.  */
4706 #if defined (__stub_strtoul) || defined (__stub___strtoul)
4707 choke me
4708 #else
4709 strtoul();
4710 #endif
4711
4712 ; return 0; }
4713 EOF
4714 if { (eval echo configure:4715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4715   rm -rf conftest*
4716   eval "ac_cv_func_strtoul=yes"
4717 else
4718   echo "configure: failed program was:" >&5
4719   cat conftest.$ac_ext >&5
4720   rm -rf conftest*
4721   eval "ac_cv_func_strtoul=no"
4722 fi
4723 rm -f conftest*
4724 fi
4725
4726 if eval "test \"`echo '$ac_cv_func_'strtoul`\" = yes"; then
4727   echo "$ac_t""yes" 1>&6
4728   cat >> confdefs.h <<\EOF
4729 #define HAVE_STRTOUL 1
4730 EOF
4731
4732 else
4733   echo "$ac_t""no" 1>&6
4734 STRTOL='strtoul.o'
4735 fi
4736
4737
4738 echo $ac_n "checking for strcasecmp""... $ac_c" 1>&6
4739 echo "configure:4740: checking for strcasecmp" >&5
4740 if eval "test \"`echo '$''{'ac_cv_func_strcasecmp'+set}'`\" = set"; then
4741   echo $ac_n "(cached) $ac_c" 1>&6
4742 else
4743   cat > conftest.$ac_ext <<EOF
4744 #line 4745 "configure"
4745 #include "confdefs.h"
4746 /* System header to define __stub macros and hopefully few prototypes,
4747     which can conflict with char strcasecmp(); below.  */
4748 #include <assert.h>
4749 /* Override any gcc2 internal prototype to avoid an error.  */
4750 /* We use char because int might match the return type of a gcc2
4751     builtin and then its argument prototype would still apply.  */
4752 char strcasecmp();
4753
4754 int main() {
4755
4756 /* The GNU C library defines this for functions which it implements
4757     to always fail with ENOSYS.  Some functions are actually named
4758     something starting with __ and the normal name is an alias.  */
4759 #if defined (__stub_strcasecmp) || defined (__stub___strcasecmp)
4760 choke me
4761 #else
4762 strcasecmp();
4763 #endif
4764
4765 ; return 0; }
4766 EOF
4767 if { (eval echo configure:4768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4768   rm -rf conftest*
4769   eval "ac_cv_func_strcasecmp=yes"
4770 else
4771   echo "configure: failed program was:" >&5
4772   cat conftest.$ac_ext >&5
4773   rm -rf conftest*
4774   eval "ac_cv_func_strcasecmp=no"
4775 fi
4776 rm -f conftest*
4777 fi
4778
4779 if eval "test \"`echo '$ac_cv_func_'strcasecmp`\" = yes"; then
4780   echo "$ac_t""yes" 1>&6
4781   cat >> confdefs.h <<\EOF
4782 #define HAVE_STRCASECMP 1
4783 EOF
4784
4785 else
4786   echo "$ac_t""no" 1>&6
4787 STRCASECMP='strcasecmp.o'
4788 fi
4789
4790
4791 echo $ac_n "checking for cbrt""... $ac_c" 1>&6
4792 echo "configure:4793: checking for cbrt" >&5
4793 if eval "test \"`echo '$''{'ac_cv_func_cbrt'+set}'`\" = set"; then
4794   echo $ac_n "(cached) $ac_c" 1>&6
4795 else
4796   cat > conftest.$ac_ext <<EOF
4797 #line 4798 "configure"
4798 #include "confdefs.h"
4799 /* System header to define __stub macros and hopefully few prototypes,
4800     which can conflict with char cbrt(); below.  */
4801 #include <assert.h>
4802 /* Override any gcc2 internal prototype to avoid an error.  */
4803 /* We use char because int might match the return type of a gcc2
4804     builtin and then its argument prototype would still apply.  */
4805 char cbrt();
4806
4807 int main() {
4808
4809 /* The GNU C library defines this for functions which it implements
4810     to always fail with ENOSYS.  Some functions are actually named
4811     something starting with __ and the normal name is an alias.  */
4812 #if defined (__stub_cbrt) || defined (__stub___cbrt)
4813 choke me
4814 #else
4815 cbrt();
4816 #endif
4817
4818 ; return 0; }
4819 EOF
4820 if { (eval echo configure:4821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4821   rm -rf conftest*
4822   eval "ac_cv_func_cbrt=yes"
4823 else
4824   echo "configure: failed program was:" >&5
4825   cat conftest.$ac_ext >&5
4826   rm -rf conftest*
4827   eval "ac_cv_func_cbrt=no"
4828 fi
4829 rm -f conftest*
4830 fi
4831
4832 if eval "test \"`echo '$ac_cv_func_'cbrt`\" = yes"; then
4833   echo "$ac_t""yes" 1>&6
4834   cat >> confdefs.h <<\EOF
4835 #define HAVE_CBRT 1
4836 EOF
4837
4838 else
4839   echo "$ac_t""no" 1>&6
4840 echo $ac_n "checking for cbrt in -lm""... $ac_c" 1>&6
4841 echo "configure:4842: checking for cbrt in -lm" >&5
4842 ac_lib_var=`echo m'_'cbrt | sed 'y%./+-%__p_%'`
4843 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4844   echo $ac_n "(cached) $ac_c" 1>&6
4845 else
4846   ac_save_LIBS="$LIBS"
4847 LIBS="-lm  $LIBS"
4848 cat > conftest.$ac_ext <<EOF
4849 #line 4850 "configure"
4850 #include "confdefs.h"
4851 /* Override any gcc2 internal prototype to avoid an error.  */
4852 /* We use char because int might match the return type of a gcc2
4853     builtin and then its argument prototype would still apply.  */
4854 char cbrt();
4855
4856 int main() {
4857 cbrt()
4858 ; return 0; }
4859 EOF
4860 if { (eval echo configure:4861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4861   rm -rf conftest*
4862   eval "ac_cv_lib_$ac_lib_var=yes"
4863 else
4864   echo "configure: failed program was:" >&5
4865   cat conftest.$ac_ext >&5
4866   rm -rf conftest*
4867   eval "ac_cv_lib_$ac_lib_var=no"
4868 fi
4869 rm -f conftest*
4870 LIBS="$ac_save_LIBS"
4871
4872 fi
4873 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4874   echo "$ac_t""yes" 1>&6
4875   cat >> confdefs.h <<\EOF
4876 #define HAVE_CBRT 1
4877 EOF
4878
4879 else
4880   echo "$ac_t""no" 1>&6
4881 fi
4882
4883 fi
4884
4885 echo $ac_n "checking for rint""... $ac_c" 1>&6
4886 echo "configure:4887: checking for rint" >&5
4887 if eval "test \"`echo '$''{'ac_cv_func_rint'+set}'`\" = set"; then
4888   echo $ac_n "(cached) $ac_c" 1>&6
4889 else
4890   cat > conftest.$ac_ext <<EOF
4891 #line 4892 "configure"
4892 #include "confdefs.h"
4893 /* System header to define __stub macros and hopefully few prototypes,
4894     which can conflict with char rint(); below.  */
4895 #include <assert.h>
4896 /* Override any gcc2 internal prototype to avoid an error.  */
4897 /* We use char because int might match the return type of a gcc2
4898     builtin and then its argument prototype would still apply.  */
4899 char rint();
4900
4901 int main() {
4902
4903 /* The GNU C library defines this for functions which it implements
4904     to always fail with ENOSYS.  Some functions are actually named
4905     something starting with __ and the normal name is an alias.  */
4906 #if defined (__stub_rint) || defined (__stub___rint)
4907 choke me
4908 #else
4909 rint();
4910 #endif
4911
4912 ; return 0; }
4913 EOF
4914 if { (eval echo configure:4915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4915   rm -rf conftest*
4916   eval "ac_cv_func_rint=yes"
4917 else
4918   echo "configure: failed program was:" >&5
4919   cat conftest.$ac_ext >&5
4920   rm -rf conftest*
4921   eval "ac_cv_func_rint=no"
4922 fi
4923 rm -f conftest*
4924 fi
4925
4926 if eval "test \"`echo '$ac_cv_func_'rint`\" = yes"; then
4927   echo "$ac_t""yes" 1>&6
4928   cat >> confdefs.h <<\EOF
4929 #define HAVE_RINT 1
4930 EOF
4931
4932 else
4933   echo "$ac_t""no" 1>&6
4934
4935 # On HPUX 9, rint() is not in regular libm.a but in /lib/pa1.1/libm.a
4936 SPECIALMATHLIB=""
4937 if [ -r /lib/pa1.1/libm.a ] ; then
4938     SPECIALMATHLIB="-L /lib/pa1.1 -lm"
4939 fi
4940               echo $ac_n "checking for rint in -lm""... $ac_c" 1>&6
4941 echo "configure:4942: checking for rint in -lm" >&5
4942 ac_lib_var=`echo m'_'rint | sed 'y%./+-%__p_%'`
4943 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4944   echo $ac_n "(cached) $ac_c" 1>&6
4945 else
4946   ac_save_LIBS="$LIBS"
4947 LIBS="-lm $SPECIALMATHLIB $LIBS"
4948 cat > conftest.$ac_ext <<EOF
4949 #line 4950 "configure"
4950 #include "confdefs.h"
4951 /* Override any gcc2 internal prototype to avoid an error.  */
4952 /* We use char because int might match the return type of a gcc2
4953     builtin and then its argument prototype would still apply.  */
4954 char rint();
4955
4956 int main() {
4957 rint()
4958 ; return 0; }
4959 EOF
4960 if { (eval echo configure:4961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4961   rm -rf conftest*
4962   eval "ac_cv_lib_$ac_lib_var=yes"
4963 else
4964   echo "configure: failed program was:" >&5
4965   cat conftest.$ac_ext >&5
4966   rm -rf conftest*
4967   eval "ac_cv_lib_$ac_lib_var=no"
4968 fi
4969 rm -f conftest*
4970 LIBS="$ac_save_LIBS"
4971
4972 fi
4973 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4974   echo "$ac_t""yes" 1>&6
4975   cat >> confdefs.h <<\EOF
4976 #define HAVE_RINT 1
4977 EOF
4978
4979 else
4980   echo "$ac_t""no" 1>&6
4981 fi
4982
4983
4984 fi
4985
4986
4987
4988 if test "$USE_X" = true; then
4989
4990         ice_save_LIBS="$LIBS"
4991         ice_save_CFLAGS="$CFLAGS"
4992         ice_save_CPPFLAGS="$CPPFLAGS"
4993         ice_save_LDFLAGS="$LDFLAGS"
4994
4995         # If we find X, set shell vars x_includes and x_libraries to the
4996 # paths, otherwise set no_x=yes.
4997 # Uses ac_ vars as temps to allow command line to override cache and checks.
4998 # --without-x overrides everything else, but does not touch the cache.
4999 echo $ac_n "checking for X""... $ac_c" 1>&6
5000 echo "configure:5001: checking for X" >&5
5001
5002 # Check whether --with-x or --without-x was given.
5003 if test "${with_x+set}" = set; then
5004   withval="$with_x"
5005   :
5006 fi
5007
5008 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5009 if test "x$with_x" = xno; then
5010   # The user explicitly disabled X.
5011   have_x=disabled
5012 else
5013   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5014     # Both variables are already set.
5015     have_x=yes
5016   else
5017 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
5018   echo $ac_n "(cached) $ac_c" 1>&6
5019 else
5020   # One or both of the vars are not set, and there is no cached value.
5021 ac_x_includes=NO ac_x_libraries=NO
5022 rm -fr conftestdir
5023 if mkdir conftestdir; then
5024   cd conftestdir
5025   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5026   cat > Imakefile <<'EOF'
5027 acfindx:
5028         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5029 EOF
5030   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5031     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5032     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5033     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5034     for ac_extension in a so sl; do
5035       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5036         test -f $ac_im_libdir/libX11.$ac_extension; then
5037         ac_im_usrlibdir=$ac_im_libdir; break
5038       fi
5039     done
5040     # Screen out bogus values from the imake configuration.  They are
5041     # bogus both because they are the default anyway, and because
5042     # using them would break gcc on systems where it needs fixed includes.
5043     case "$ac_im_incroot" in
5044         /usr/include) ;;
5045         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5046     esac
5047     case "$ac_im_usrlibdir" in
5048         /usr/lib | /lib) ;;
5049         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5050     esac
5051   fi
5052   cd ..
5053   rm -fr conftestdir
5054 fi
5055
5056 if test "$ac_x_includes" = NO; then
5057   # Guess where to find include files, by looking for this one X11 .h file.
5058   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5059
5060   # First, try using that file with no special directory specified.
5061 cat > conftest.$ac_ext <<EOF
5062 #line 5063 "configure"
5063 #include "confdefs.h"
5064 #include <$x_direct_test_include>
5065 EOF
5066 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5067 { (eval echo configure:5068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5068 ac_err=`grep -v '^ *+' conftest.out`
5069 if test -z "$ac_err"; then
5070   rm -rf conftest*
5071   # We can compile using X headers with no special include directory.
5072 ac_x_includes=
5073 else
5074   echo "$ac_err" >&5
5075   echo "configure: failed program was:" >&5
5076   cat conftest.$ac_ext >&5
5077   rm -rf conftest*
5078   # Look for the header file in a standard set of common directories.
5079 # Check X11 before X11Rn because it is often a symlink to the current release.
5080   for ac_dir in               \
5081     /usr/X11/include          \
5082     /usr/X11R6/include        \
5083     /usr/X11R5/include        \
5084     /usr/X11R4/include        \
5085                               \
5086     /usr/include/X11          \
5087     /usr/include/X11R6        \
5088     /usr/include/X11R5        \
5089     /usr/include/X11R4        \
5090                               \
5091     /usr/local/X11/include    \
5092     /usr/local/X11R6/include  \
5093     /usr/local/X11R5/include  \
5094     /usr/local/X11R4/include  \
5095                               \
5096     /usr/local/include/X11    \
5097     /usr/local/include/X11R6  \
5098     /usr/local/include/X11R5  \
5099     /usr/local/include/X11R4  \
5100                               \
5101     /usr/X386/include         \
5102     /usr/x386/include         \
5103     /usr/XFree86/include/X11  \
5104                               \
5105     /usr/include              \
5106     /usr/local/include        \
5107     /usr/unsupported/include  \
5108     /usr/athena/include       \
5109     /usr/local/x11r5/include  \
5110     /usr/lpp/Xamples/include  \
5111                               \
5112     /usr/openwin/include      \
5113     /usr/openwin/share/include \
5114     ; \
5115   do
5116     if test -r "$ac_dir/$x_direct_test_include"; then
5117       ac_x_includes=$ac_dir
5118       break
5119     fi
5120   done
5121 fi
5122 rm -f conftest*
5123 fi # $ac_x_includes = NO
5124
5125 if test "$ac_x_libraries" = NO; then
5126   # Check for the libraries.
5127
5128   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5129   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5130
5131   # See if we find them without any special options.
5132   # Don't add to $LIBS permanently.
5133   ac_save_LIBS="$LIBS"
5134   LIBS="-l$x_direct_test_library $LIBS"
5135 cat > conftest.$ac_ext <<EOF
5136 #line 5137 "configure"
5137 #include "confdefs.h"
5138
5139 int main() {
5140 ${x_direct_test_function}()
5141 ; return 0; }
5142 EOF
5143 if { (eval echo configure:5144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5144   rm -rf conftest*
5145   LIBS="$ac_save_LIBS"
5146 # We can link X programs with no special library path.
5147 ac_x_libraries=
5148 else
5149   echo "configure: failed program was:" >&5
5150   cat conftest.$ac_ext >&5
5151   rm -rf conftest*
5152   LIBS="$ac_save_LIBS"
5153 # First see if replacing the include by lib works.
5154 # Check X11 before X11Rn because it is often a symlink to the current release.
5155 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5156     /usr/X11/lib          \
5157     /usr/X11R6/lib        \
5158     /usr/X11R5/lib        \
5159     /usr/X11R4/lib        \
5160                           \
5161     /usr/lib/X11          \
5162     /usr/lib/X11R6        \
5163     /usr/lib/X11R5        \
5164     /usr/lib/X11R4        \
5165                           \
5166     /usr/local/X11/lib    \
5167     /usr/local/X11R6/lib  \
5168     /usr/local/X11R5/lib  \
5169     /usr/local/X11R4/lib  \
5170                           \
5171     /usr/local/lib/X11    \
5172     /usr/local/lib/X11R6  \
5173     /usr/local/lib/X11R5  \
5174     /usr/local/lib/X11R4  \
5175                           \
5176     /usr/X386/lib         \
5177     /usr/x386/lib         \
5178     /usr/XFree86/lib/X11  \
5179                           \
5180     /usr/lib              \
5181     /usr/local/lib        \
5182     /usr/unsupported/lib  \
5183     /usr/athena/lib       \
5184     /usr/local/x11r5/lib  \
5185     /usr/lpp/Xamples/lib  \
5186     /lib/usr/lib/X11      \
5187                           \
5188     /usr/openwin/lib      \
5189     /usr/openwin/share/lib \
5190     ; \
5191 do
5192   for ac_extension in a so sl; do
5193     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5194       ac_x_libraries=$ac_dir
5195       break 2
5196     fi
5197   done
5198 done
5199 fi
5200 rm -f conftest*
5201 fi # $ac_x_libraries = NO
5202
5203 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5204   # Didn't find X anywhere.  Cache the known absence of X.
5205   ac_cv_have_x="have_x=no"
5206 else
5207   # Record where we found X for the cache.
5208   ac_cv_have_x="have_x=yes \
5209                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5210 fi
5211 fi
5212   fi
5213   eval "$ac_cv_have_x"
5214 fi # $with_x != no
5215
5216 if test "$have_x" != yes; then
5217   echo "$ac_t""$have_x" 1>&6
5218   no_x=yes
5219 else
5220   # If each of the values was on the command line, it overrides each guess.
5221   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5222   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5223   # Update the cache value to reflect the command line values.
5224   ac_cv_have_x="have_x=yes \
5225                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5226   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5227 fi
5228
5229 if test "$no_x" = yes; then
5230   # Not all programs may use this symbol, but it does not hurt to define it.
5231   cat >> confdefs.h <<\EOF
5232 #define X_DISPLAY_MISSING 1
5233 EOF
5234
5235   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5236 else
5237   if test -n "$x_includes"; then
5238     X_CFLAGS="$X_CFLAGS -I$x_includes"
5239   fi
5240
5241   # It would also be nice to do this for all -L options, not just this one.
5242   if test -n "$x_libraries"; then
5243     X_LIBS="$X_LIBS -L$x_libraries"
5244     # For Solaris; some versions of Sun CC require a space after -R and
5245     # others require no space.  Words are not sufficient . . . .
5246     case "`(uname -sr) 2>/dev/null`" in
5247     "SunOS 5"*)
5248       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5249 echo "configure:5250: checking whether -R must be followed by a space" >&5
5250       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5251       cat > conftest.$ac_ext <<EOF
5252 #line 5253 "configure"
5253 #include "confdefs.h"
5254
5255 int main() {
5256
5257 ; return 0; }
5258 EOF
5259 if { (eval echo configure:5260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5260   rm -rf conftest*
5261   ac_R_nospace=yes
5262 else
5263   echo "configure: failed program was:" >&5
5264   cat conftest.$ac_ext >&5
5265   rm -rf conftest*
5266   ac_R_nospace=no
5267 fi
5268 rm -f conftest*
5269       if test $ac_R_nospace = yes; then
5270         echo "$ac_t""no" 1>&6
5271         X_LIBS="$X_LIBS -R$x_libraries"
5272       else
5273         LIBS="$ac_xsave_LIBS -R $x_libraries"
5274         cat > conftest.$ac_ext <<EOF
5275 #line 5276 "configure"
5276 #include "confdefs.h"
5277
5278 int main() {
5279
5280 ; return 0; }
5281 EOF
5282 if { (eval echo configure:5283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5283   rm -rf conftest*
5284   ac_R_space=yes
5285 else
5286   echo "configure: failed program was:" >&5
5287   cat conftest.$ac_ext >&5
5288   rm -rf conftest*
5289   ac_R_space=no
5290 fi
5291 rm -f conftest*
5292         if test $ac_R_space = yes; then
5293           echo "$ac_t""yes" 1>&6
5294           X_LIBS="$X_LIBS -R $x_libraries"
5295         else
5296           echo "$ac_t""neither works" 1>&6
5297         fi
5298       fi
5299       LIBS="$ac_xsave_LIBS"
5300     esac
5301   fi
5302
5303   # Check for system-dependent libraries X programs must link with.
5304   # Do this before checking for the system-independent R6 libraries
5305   # (-lICE), since we may need -lsocket or whatever for X linking.
5306
5307   if test "$ISC" = yes; then
5308     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5309   else
5310     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5311     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5312     # the Alpha needs dnet_stub (dnet does not exist).
5313     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5314 echo "configure:5315: checking for dnet_ntoa in -ldnet" >&5
5315 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5316 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5317   echo $ac_n "(cached) $ac_c" 1>&6
5318 else
5319   ac_save_LIBS="$LIBS"
5320 LIBS="-ldnet  $LIBS"
5321 cat > conftest.$ac_ext <<EOF
5322 #line 5323 "configure"
5323 #include "confdefs.h"
5324 /* Override any gcc2 internal prototype to avoid an error.  */
5325 /* We use char because int might match the return type of a gcc2
5326     builtin and then its argument prototype would still apply.  */
5327 char dnet_ntoa();
5328
5329 int main() {
5330 dnet_ntoa()
5331 ; return 0; }
5332 EOF
5333 if { (eval echo configure:5334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5334   rm -rf conftest*
5335   eval "ac_cv_lib_$ac_lib_var=yes"
5336 else
5337   echo "configure: failed program was:" >&5
5338   cat conftest.$ac_ext >&5
5339   rm -rf conftest*
5340   eval "ac_cv_lib_$ac_lib_var=no"
5341 fi
5342 rm -f conftest*
5343 LIBS="$ac_save_LIBS"
5344
5345 fi
5346 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5347   echo "$ac_t""yes" 1>&6
5348   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5349 else
5350   echo "$ac_t""no" 1>&6
5351 fi
5352
5353     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5354       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5355 echo "configure:5356: checking for dnet_ntoa in -ldnet_stub" >&5
5356 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5357 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5358   echo $ac_n "(cached) $ac_c" 1>&6
5359 else
5360   ac_save_LIBS="$LIBS"
5361 LIBS="-ldnet_stub  $LIBS"
5362 cat > conftest.$ac_ext <<EOF
5363 #line 5364 "configure"
5364 #include "confdefs.h"
5365 /* Override any gcc2 internal prototype to avoid an error.  */
5366 /* We use char because int might match the return type of a gcc2
5367     builtin and then its argument prototype would still apply.  */
5368 char dnet_ntoa();
5369
5370 int main() {
5371 dnet_ntoa()
5372 ; return 0; }
5373 EOF
5374 if { (eval echo configure:5375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5375   rm -rf conftest*
5376   eval "ac_cv_lib_$ac_lib_var=yes"
5377 else
5378   echo "configure: failed program was:" >&5
5379   cat conftest.$ac_ext >&5
5380   rm -rf conftest*
5381   eval "ac_cv_lib_$ac_lib_var=no"
5382 fi
5383 rm -f conftest*
5384 LIBS="$ac_save_LIBS"
5385
5386 fi
5387 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5388   echo "$ac_t""yes" 1>&6
5389   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5390 else
5391   echo "$ac_t""no" 1>&6
5392 fi
5393
5394     fi
5395
5396     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5397     # to get the SysV transport functions.
5398     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5399     # needs -lnsl.
5400     # The nsl library prevents programs from opening the X display
5401     # on Irix 5.2, according to dickey@clark.net.
5402     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5403 echo "configure:5404: checking for gethostbyname" >&5
5404 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
5405   echo $ac_n "(cached) $ac_c" 1>&6
5406 else
5407   cat > conftest.$ac_ext <<EOF
5408 #line 5409 "configure"
5409 #include "confdefs.h"
5410 /* System header to define __stub macros and hopefully few prototypes,
5411     which can conflict with char gethostbyname(); below.  */
5412 #include <assert.h>
5413 /* Override any gcc2 internal prototype to avoid an error.  */
5414 /* We use char because int might match the return type of a gcc2
5415     builtin and then its argument prototype would still apply.  */
5416 char gethostbyname();
5417
5418 int main() {
5419
5420 /* The GNU C library defines this for functions which it implements
5421     to always fail with ENOSYS.  Some functions are actually named
5422     something starting with __ and the normal name is an alias.  */
5423 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5424 choke me
5425 #else
5426 gethostbyname();
5427 #endif
5428
5429 ; return 0; }
5430 EOF
5431 if { (eval echo configure:5432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5432   rm -rf conftest*
5433   eval "ac_cv_func_gethostbyname=yes"
5434 else
5435   echo "configure: failed program was:" >&5
5436   cat conftest.$ac_ext >&5
5437   rm -rf conftest*
5438   eval "ac_cv_func_gethostbyname=no"
5439 fi
5440 rm -f conftest*
5441 fi
5442
5443 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5444   echo "$ac_t""yes" 1>&6
5445   :
5446 else
5447   echo "$ac_t""no" 1>&6
5448 fi
5449
5450     if test $ac_cv_func_gethostbyname = no; then
5451       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5452 echo "configure:5453: checking for gethostbyname in -lnsl" >&5
5453 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5454 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5455   echo $ac_n "(cached) $ac_c" 1>&6
5456 else
5457   ac_save_LIBS="$LIBS"
5458 LIBS="-lnsl  $LIBS"
5459 cat > conftest.$ac_ext <<EOF
5460 #line 5461 "configure"
5461 #include "confdefs.h"
5462 /* Override any gcc2 internal prototype to avoid an error.  */
5463 /* We use char because int might match the return type of a gcc2
5464     builtin and then its argument prototype would still apply.  */
5465 char gethostbyname();
5466
5467 int main() {
5468 gethostbyname()
5469 ; return 0; }
5470 EOF
5471 if { (eval echo configure:5472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5472   rm -rf conftest*
5473   eval "ac_cv_lib_$ac_lib_var=yes"
5474 else
5475   echo "configure: failed program was:" >&5
5476   cat conftest.$ac_ext >&5
5477   rm -rf conftest*
5478   eval "ac_cv_lib_$ac_lib_var=no"
5479 fi
5480 rm -f conftest*
5481 LIBS="$ac_save_LIBS"
5482
5483 fi
5484 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5485   echo "$ac_t""yes" 1>&6
5486   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5487 else
5488   echo "$ac_t""no" 1>&6
5489 fi
5490
5491     fi
5492
5493     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5494     # socket/setsockopt and other routines are undefined under SCO ODT
5495     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5496     # on later versions), says simon@lia.di.epfl.ch: it contains
5497     # gethostby* variants that don't use the nameserver (or something).
5498     # -lsocket must be given before -lnsl if both are needed.
5499     # We assume that if connect needs -lnsl, so does gethostbyname.
5500     echo $ac_n "checking for connect""... $ac_c" 1>&6
5501 echo "configure:5502: checking for connect" >&5
5502 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
5503   echo $ac_n "(cached) $ac_c" 1>&6
5504 else
5505   cat > conftest.$ac_ext <<EOF
5506 #line 5507 "configure"
5507 #include "confdefs.h"
5508 /* System header to define __stub macros and hopefully few prototypes,
5509     which can conflict with char connect(); below.  */
5510 #include <assert.h>
5511 /* Override any gcc2 internal prototype to avoid an error.  */
5512 /* We use char because int might match the return type of a gcc2
5513     builtin and then its argument prototype would still apply.  */
5514 char connect();
5515
5516 int main() {
5517
5518 /* The GNU C library defines this for functions which it implements
5519     to always fail with ENOSYS.  Some functions are actually named
5520     something starting with __ and the normal name is an alias.  */
5521 #if defined (__stub_connect) || defined (__stub___connect)
5522 choke me
5523 #else
5524 connect();
5525 #endif
5526
5527 ; return 0; }
5528 EOF
5529 if { (eval echo configure:5530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5530   rm -rf conftest*
5531   eval "ac_cv_func_connect=yes"
5532 else
5533   echo "configure: failed program was:" >&5
5534   cat conftest.$ac_ext >&5
5535   rm -rf conftest*
5536   eval "ac_cv_func_connect=no"
5537 fi
5538 rm -f conftest*
5539 fi
5540
5541 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5542   echo "$ac_t""yes" 1>&6
5543   :
5544 else
5545   echo "$ac_t""no" 1>&6
5546 fi
5547
5548     if test $ac_cv_func_connect = no; then
5549       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
5550 echo "configure:5551: checking for connect in -lsocket" >&5
5551 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5552 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5553   echo $ac_n "(cached) $ac_c" 1>&6
5554 else
5555   ac_save_LIBS="$LIBS"
5556 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
5557 cat > conftest.$ac_ext <<EOF
5558 #line 5559 "configure"
5559 #include "confdefs.h"
5560 /* Override any gcc2 internal prototype to avoid an error.  */
5561 /* We use char because int might match the return type of a gcc2
5562     builtin and then its argument prototype would still apply.  */
5563 char connect();
5564
5565 int main() {
5566 connect()
5567 ; return 0; }
5568 EOF
5569 if { (eval echo configure:5570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5570   rm -rf conftest*
5571   eval "ac_cv_lib_$ac_lib_var=yes"
5572 else
5573   echo "configure: failed program was:" >&5
5574   cat conftest.$ac_ext >&5
5575   rm -rf conftest*
5576   eval "ac_cv_lib_$ac_lib_var=no"
5577 fi
5578 rm -f conftest*
5579 LIBS="$ac_save_LIBS"
5580
5581 fi
5582 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5583   echo "$ac_t""yes" 1>&6
5584   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5585 else
5586   echo "$ac_t""no" 1>&6
5587 fi
5588
5589     fi
5590
5591     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5592     echo $ac_n "checking for remove""... $ac_c" 1>&6
5593 echo "configure:5594: checking for remove" >&5
5594 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
5595   echo $ac_n "(cached) $ac_c" 1>&6
5596 else
5597   cat > conftest.$ac_ext <<EOF
5598 #line 5599 "configure"
5599 #include "confdefs.h"
5600 /* System header to define __stub macros and hopefully few prototypes,
5601     which can conflict with char remove(); below.  */
5602 #include <assert.h>
5603 /* Override any gcc2 internal prototype to avoid an error.  */
5604 /* We use char because int might match the return type of a gcc2
5605     builtin and then its argument prototype would still apply.  */
5606 char remove();
5607
5608 int main() {
5609
5610 /* The GNU C library defines this for functions which it implements
5611     to always fail with ENOSYS.  Some functions are actually named
5612     something starting with __ and the normal name is an alias.  */
5613 #if defined (__stub_remove) || defined (__stub___remove)
5614 choke me
5615 #else
5616 remove();
5617 #endif
5618
5619 ; return 0; }
5620 EOF
5621 if { (eval echo configure:5622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5622   rm -rf conftest*
5623   eval "ac_cv_func_remove=yes"
5624 else
5625   echo "configure: failed program was:" >&5
5626   cat conftest.$ac_ext >&5
5627   rm -rf conftest*
5628   eval "ac_cv_func_remove=no"
5629 fi
5630 rm -f conftest*
5631 fi
5632
5633 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5634   echo "$ac_t""yes" 1>&6
5635   :
5636 else
5637   echo "$ac_t""no" 1>&6
5638 fi
5639
5640     if test $ac_cv_func_remove = no; then
5641       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5642 echo "configure:5643: checking for remove in -lposix" >&5
5643 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5644 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5645   echo $ac_n "(cached) $ac_c" 1>&6
5646 else
5647   ac_save_LIBS="$LIBS"
5648 LIBS="-lposix  $LIBS"
5649 cat > conftest.$ac_ext <<EOF
5650 #line 5651 "configure"
5651 #include "confdefs.h"
5652 /* Override any gcc2 internal prototype to avoid an error.  */
5653 /* We use char because int might match the return type of a gcc2
5654     builtin and then its argument prototype would still apply.  */
5655 char remove();
5656
5657 int main() {
5658 remove()
5659 ; return 0; }
5660 EOF
5661 if { (eval echo configure:5662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5662   rm -rf conftest*
5663   eval "ac_cv_lib_$ac_lib_var=yes"
5664 else
5665   echo "configure: failed program was:" >&5
5666   cat conftest.$ac_ext >&5
5667   rm -rf conftest*
5668   eval "ac_cv_lib_$ac_lib_var=no"
5669 fi
5670 rm -f conftest*
5671 LIBS="$ac_save_LIBS"
5672
5673 fi
5674 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5675   echo "$ac_t""yes" 1>&6
5676   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5677 else
5678   echo "$ac_t""no" 1>&6
5679 fi
5680
5681     fi
5682
5683     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5684     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5685 echo "configure:5686: checking for shmat" >&5
5686 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
5687   echo $ac_n "(cached) $ac_c" 1>&6
5688 else
5689   cat > conftest.$ac_ext <<EOF
5690 #line 5691 "configure"
5691 #include "confdefs.h"
5692 /* System header to define __stub macros and hopefully few prototypes,
5693     which can conflict with char shmat(); below.  */
5694 #include <assert.h>
5695 /* Override any gcc2 internal prototype to avoid an error.  */
5696 /* We use char because int might match the return type of a gcc2
5697     builtin and then its argument prototype would still apply.  */
5698 char shmat();
5699
5700 int main() {
5701
5702 /* The GNU C library defines this for functions which it implements
5703     to always fail with ENOSYS.  Some functions are actually named
5704     something starting with __ and the normal name is an alias.  */
5705 #if defined (__stub_shmat) || defined (__stub___shmat)
5706 choke me
5707 #else
5708 shmat();
5709 #endif
5710
5711 ; return 0; }
5712 EOF
5713 if { (eval echo configure:5714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5714   rm -rf conftest*
5715   eval "ac_cv_func_shmat=yes"
5716 else
5717   echo "configure: failed program was:" >&5
5718   cat conftest.$ac_ext >&5
5719   rm -rf conftest*
5720   eval "ac_cv_func_shmat=no"
5721 fi
5722 rm -f conftest*
5723 fi
5724
5725 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5726   echo "$ac_t""yes" 1>&6
5727   :
5728 else
5729   echo "$ac_t""no" 1>&6
5730 fi
5731
5732     if test $ac_cv_func_shmat = no; then
5733       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5734 echo "configure:5735: checking for shmat in -lipc" >&5
5735 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5736 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5737   echo $ac_n "(cached) $ac_c" 1>&6
5738 else
5739   ac_save_LIBS="$LIBS"
5740 LIBS="-lipc  $LIBS"
5741 cat > conftest.$ac_ext <<EOF
5742 #line 5743 "configure"
5743 #include "confdefs.h"
5744 /* Override any gcc2 internal prototype to avoid an error.  */
5745 /* We use char because int might match the return type of a gcc2
5746     builtin and then its argument prototype would still apply.  */
5747 char shmat();
5748
5749 int main() {
5750 shmat()
5751 ; return 0; }
5752 EOF
5753 if { (eval echo configure:5754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5754   rm -rf conftest*
5755   eval "ac_cv_lib_$ac_lib_var=yes"
5756 else
5757   echo "configure: failed program was:" >&5
5758   cat conftest.$ac_ext >&5
5759   rm -rf conftest*
5760   eval "ac_cv_lib_$ac_lib_var=no"
5761 fi
5762 rm -f conftest*
5763 LIBS="$ac_save_LIBS"
5764
5765 fi
5766 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5767   echo "$ac_t""yes" 1>&6
5768   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5769 else
5770   echo "$ac_t""no" 1>&6
5771 fi
5772
5773     fi
5774   fi
5775
5776   # Check for libraries that X11R6 Xt/Xaw programs need.
5777   ac_save_LDFLAGS="$LDFLAGS"
5778   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5779   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5780   # check for ICE first), but we must link in the order -lSM -lICE or
5781   # we get undefined symbols.  So assume we have SM if we have ICE.
5782   # These have to be linked with before -lX11, unlike the other
5783   # libraries we check for below, so use a different variable.
5784   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5785   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
5786 echo "configure:5787: checking for IceConnectionNumber in -lICE" >&5
5787 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5788 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5789   echo $ac_n "(cached) $ac_c" 1>&6
5790 else
5791   ac_save_LIBS="$LIBS"
5792 LIBS="-lICE  $LIBS"
5793 cat > conftest.$ac_ext <<EOF
5794 #line 5795 "configure"
5795 #include "confdefs.h"
5796 /* Override any gcc2 internal prototype to avoid an error.  */
5797 /* We use char because int might match the return type of a gcc2
5798     builtin and then its argument prototype would still apply.  */
5799 char IceConnectionNumber();
5800
5801 int main() {
5802 IceConnectionNumber()
5803 ; return 0; }
5804 EOF
5805 if { (eval echo configure:5806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5806   rm -rf conftest*
5807   eval "ac_cv_lib_$ac_lib_var=yes"
5808 else
5809   echo "configure: failed program was:" >&5
5810   cat conftest.$ac_ext >&5
5811   rm -rf conftest*
5812   eval "ac_cv_lib_$ac_lib_var=no"
5813 fi
5814 rm -f conftest*
5815 LIBS="$ac_save_LIBS"
5816
5817 fi
5818 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5819   echo "$ac_t""yes" 1>&6
5820   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5821 else
5822   echo "$ac_t""no" 1>&6
5823 fi
5824
5825   LDFLAGS="$ac_save_LDFLAGS"
5826
5827 fi
5828
5829
5830         LIBS="$LIBS $X_EXTRA_LIBS"
5831         CFLAGS="$CFLAGS $X_CFLAGS"
5832         CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5833         LDFLAGS="$LDFLAGS $X_LIBS"
5834
5835         
5836         X11_LIBS=""
5837         echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
5838 echo "configure:5839: checking for XOpenDisplay in -lX11" >&5
5839 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
5840 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5841   echo $ac_n "(cached) $ac_c" 1>&6
5842 else
5843   ac_save_LIBS="$LIBS"
5844 LIBS="-lX11 ${X_PRE_LIBS} $LIBS"
5845 cat > conftest.$ac_ext <<EOF
5846 #line 5847 "configure"
5847 #include "confdefs.h"
5848 /* Override any gcc2 internal prototype to avoid an error.  */
5849 /* We use char because int might match the return type of a gcc2
5850     builtin and then its argument prototype would still apply.  */
5851 char XOpenDisplay();
5852
5853 int main() {
5854 XOpenDisplay()
5855 ; return 0; }
5856 EOF
5857 if { (eval echo configure:5858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5858   rm -rf conftest*
5859   eval "ac_cv_lib_$ac_lib_var=yes"
5860 else
5861   echo "configure: failed program was:" >&5
5862   cat conftest.$ac_ext >&5
5863   rm -rf conftest*
5864   eval "ac_cv_lib_$ac_lib_var=no"
5865 fi
5866 rm -f conftest*
5867 LIBS="$ac_save_LIBS"
5868
5869 fi
5870 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5871   echo "$ac_t""yes" 1>&6
5872   X11_LIBS="-lX11"
5873 else
5874   echo "$ac_t""no" 1>&6
5875 fi
5876
5877         if test "$X11_LIBS" = ""; then
5878                                 echo "configure: warning: The X11 library '-lX11' could not be found.
5879                             Please use the configure options '--x-includes=DIR'
5880                             and '--x-libraries=DIR' to specify the X location.
5881                             See the file 'config.log' for further diagnostics." 1>&2
5882         fi
5883         
5884         
5885         
5886
5887         LIBS="$ice_save_LIBS"
5888         CFLAGS="$ice_save_CFLAGS"
5889         CPPFLAGS="$ice_save_CPPFLAGS"
5890         LDFLAGS="$ice_save_LDFLAGS"
5891 fi
5892
5893
5894 if test "$USE_TCL" = "true"
5895 then
5896         TCL_INCDIR=no
5897         ac_safe=`echo "tcl.h" | sed 'y%./+-%__p_%'`
5898 echo $ac_n "checking for tcl.h""... $ac_c" 1>&6
5899 echo "configure:5900: checking for tcl.h" >&5
5900 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5901   echo $ac_n "(cached) $ac_c" 1>&6
5902 else
5903   cat > conftest.$ac_ext <<EOF
5904 #line 5905 "configure"
5905 #include "confdefs.h"
5906 #include <tcl.h>
5907 EOF
5908 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5909 { (eval echo configure:5910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5910 ac_err=`grep -v '^ *+' conftest.out`
5911 if test -z "$ac_err"; then
5912   rm -rf conftest*
5913   eval "ac_cv_header_$ac_safe=yes"
5914 else
5915   echo "$ac_err" >&5
5916   echo "configure: failed program was:" >&5
5917   cat conftest.$ac_ext >&5
5918   rm -rf conftest*
5919   eval "ac_cv_header_$ac_safe=no"
5920 fi
5921 rm -f conftest*
5922 fi
5923 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5924   echo "$ac_t""yes" 1>&6
5925   TCL_INCDIR=yes
5926 else
5927   echo "$ac_t""no" 1>&6
5928 fi
5929
5930         if test "$TCL_INCDIR" = "no"; then
5931                 echo "configure: warning: tcl support disabled; tcl.h missing" 1>&2
5932                 USE_TCL=
5933         fi
5934 fi
5935
5936 if test "$USE_TCL" = "true"; then
5937         TCL_LIB=
5938         tcl_libs="tcl8.0 tcl80 tcl7.6 tcl76 tcl"
5939         for tcl_lib in $tcl_libs; do
5940                 if test -z "$TCL_LIB"; then
5941                         echo $ac_n "checking for main in -l$tcl_lib""... $ac_c" 1>&6
5942 echo "configure:5943: checking for main in -l$tcl_lib" >&5
5943 ac_lib_var=`echo $tcl_lib'_'main | sed 'y%./+-%__p_%'`
5944 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5945   echo $ac_n "(cached) $ac_c" 1>&6
5946 else
5947   ac_save_LIBS="$LIBS"
5948 LIBS="-l$tcl_lib  $LIBS"
5949 cat > conftest.$ac_ext <<EOF
5950 #line 5951 "configure"
5951 #include "confdefs.h"
5952
5953 int main() {
5954 main()
5955 ; return 0; }
5956 EOF
5957 if { (eval echo configure:5958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5958   rm -rf conftest*
5959   eval "ac_cv_lib_$ac_lib_var=yes"
5960 else
5961   echo "configure: failed program was:" >&5
5962   cat conftest.$ac_ext >&5
5963   rm -rf conftest*
5964   eval "ac_cv_lib_$ac_lib_var=no"
5965 fi
5966 rm -f conftest*
5967 LIBS="$ac_save_LIBS"
5968
5969 fi
5970 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5971   echo "$ac_t""yes" 1>&6
5972   TCL_LIB=$tcl_lib
5973 else
5974   echo "$ac_t""no" 1>&6
5975 fi
5976
5977                 fi
5978         done
5979         if test -z "$TCL_LIB"; then
5980                 echo "configure: warning: tcl support disabled; Tcl library missing" 1>&2
5981                 USE_TCL=
5982         else
5983                 TCL_LIB=-l$TCL_LIB
5984         fi
5985         
5986 fi
5987
5988
5989 if test "$USE_TCL" = "true"
5990 then
5991         ice_save_LIBS="$LIBS"
5992         ice_save_CFLAGS="$CFLAGS"
5993         ice_save_CPPFLAGS="$CPPFLAGS"
5994         ice_save_LDFLAGS="$LDFLAGS"
5995
5996         CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5997
5998         TK_INCDIR=no
5999         ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
6000 echo $ac_n "checking for tk.h""... $ac_c" 1>&6
6001 echo "configure:6002: checking for tk.h" >&5
6002 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6003   echo $ac_n "(cached) $ac_c" 1>&6
6004 else
6005   cat > conftest.$ac_ext <<EOF
6006 #line 6007 "configure"
6007 #include "confdefs.h"
6008 #include <tk.h>
6009 EOF
6010 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6011 { (eval echo configure:6012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6012 ac_err=`grep -v '^ *+' conftest.out`
6013 if test -z "$ac_err"; then
6014   rm -rf conftest*
6015   eval "ac_cv_header_$ac_safe=yes"
6016 else
6017   echo "$ac_err" >&5
6018   echo "configure: failed program was:" >&5
6019   cat conftest.$ac_ext >&5
6020   rm -rf conftest*
6021   eval "ac_cv_header_$ac_safe=no"
6022 fi
6023 rm -f conftest*
6024 fi
6025 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6026   echo "$ac_t""yes" 1>&6
6027   TK_INCDIR=yes
6028 else
6029   echo "$ac_t""no" 1>&6
6030 fi
6031
6032         if test "$TK_INCDIR" = "no"; then
6033                 echo "configure: warning: tcl support disabled; tk.h missing" 1>&2
6034                 USE_TCL=
6035         fi
6036
6037         LIBS="$ice_save_LIBS"
6038         CFLAGS="$ice_save_CFLAGS"
6039         CPPFLAGS="$ice_save_CPPFLAGS"
6040         LDFLAGS="$ice_save_LDFLAGS"
6041 fi
6042
6043 if test "$USE_TCL" = "true"
6044 then
6045         ice_save_LIBS="$LIBS"
6046         ice_save_CFLAGS="$CFLAGS"
6047         ice_save_CPPFLAGS="$CPPFLAGS"
6048         ice_save_LDFLAGS="$LDFLAGS"
6049
6050         LIBS="$TCL_LIB $X_PRE_LIBS $X11_LIBS $X_EXTRA_LIBS $LIBS"
6051         CFLAGS="$CFLAGS $X_CFLAGS"
6052         CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6053         LDFLAGS="$LDFLAGS $X_LIBS"
6054
6055         TK_LIB=
6056         tk_libs="tk8.0 tk80 tk4.2 tk42 tk"
6057         for tk_lib in $tk_libs; do
6058                 if test -z "$TK_LIB"; then
6059                         echo $ac_n "checking for main in -l$tk_lib""... $ac_c" 1>&6
6060 echo "configure:6061: checking for main in -l$tk_lib" >&5
6061 ac_lib_var=`echo $tk_lib'_'main | sed 'y%./+-%__p_%'`
6062 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6063   echo $ac_n "(cached) $ac_c" 1>&6
6064 else
6065   ac_save_LIBS="$LIBS"
6066 LIBS="-l$tk_lib  $LIBS"
6067 cat > conftest.$ac_ext <<EOF
6068 #line 6069 "configure"
6069 #include "confdefs.h"
6070
6071 int main() {
6072 main()
6073 ; return 0; }
6074 EOF
6075 if { (eval echo configure:6076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6076   rm -rf conftest*
6077   eval "ac_cv_lib_$ac_lib_var=yes"
6078 else
6079   echo "configure: failed program was:" >&5
6080   cat conftest.$ac_ext >&5
6081   rm -rf conftest*
6082   eval "ac_cv_lib_$ac_lib_var=no"
6083 fi
6084 rm -f conftest*
6085 LIBS="$ac_save_LIBS"
6086
6087 fi
6088 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6089   echo "$ac_t""yes" 1>&6
6090   TK_LIB=$tk_lib
6091 else
6092   echo "$ac_t""no" 1>&6
6093 fi
6094
6095                 fi
6096         done
6097         if test -z "$TK_LIB"; then
6098                 echo "configure: warning: tk support disabled; Tk library missing" 1>&2
6099                 USE_TCL=
6100         else
6101                 TK_LIB=-l$TK_LIB
6102         fi
6103
6104         
6105
6106         LIBS="$ice_save_LIBS"
6107         CFLAGS="$ice_save_CFLAGS"
6108         CPPFLAGS="$ice_save_CPPFLAGS"
6109         LDFLAGS="$ice_save_LDFLAGS"
6110 fi
6111
6112 trap '' 1 2 15
6113 cat > confcache <<\EOF
6114 # This file is a shell script that caches the results of configure
6115 # tests run on this system so they can be shared between configure
6116 # scripts and configure runs.  It is not useful on other systems.
6117 # If it contains results you don't want to keep, you may remove or edit it.
6118 #
6119 # By default, configure uses ./config.cache as the cache file,
6120 # creating it if it does not exist already.  You can give configure
6121 # the --cache-file=FILE option to use a different cache file; that is
6122 # what configure does when it calls configure scripts in
6123 # subdirectories, so they share the cache.
6124 # Giving --cache-file=/dev/null disables caching, for debugging configure.
6125 # config.status only pays attention to the cache file if you give it the
6126 # --recheck option to rerun configure.
6127 #
6128 EOF
6129 # The following way of writing the cache mishandles newlines in values,
6130 # but we know of no workaround that is simple, portable, and efficient.
6131 # So, don't put newlines in cache variables' values.
6132 # Ultrix sh set writes to stderr and can't be redirected directly,
6133 # and sets the high bit in the cache file unless we assign to the vars.
6134 (set) 2>&1 |
6135   case `(ac_space=' '; set) 2>&1` in
6136   *ac_space=\ *)
6137     # `set' does not quote correctly, so add quotes (double-quote substitution
6138     # turns \\\\ into \\, and sed turns \\ into \).
6139     sed -n \
6140       -e "s/'/'\\\\''/g" \
6141       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6142     ;;
6143   *)
6144     # `set' quotes correctly as required by POSIX, so do not add quotes.
6145     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6146     ;;
6147   esac >> confcache
6148 if cmp -s $cache_file confcache; then
6149   :
6150 else
6151   if test -w $cache_file; then
6152     echo "updating cache $cache_file"
6153     cat confcache > $cache_file
6154   else
6155     echo "not updating unwritable cache $cache_file"
6156   fi
6157 fi
6158 rm -f confcache
6159
6160 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6161
6162 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6163 # Let make expand exec_prefix.
6164 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6165
6166 # Any assignment to VPATH causes Sun make to only execute
6167 # the first set of double-colon rules, so remove it if not needed.
6168 # If there is a colon in the path, we need to keep it.
6169 if test "x$srcdir" = x.; then
6170   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
6171 fi
6172
6173 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6174
6175 DEFS=-DHAVE_CONFIG_H
6176
6177 # Without the "./", some shells look in PATH for config.status.
6178 : ${CONFIG_STATUS=./config.status}
6179
6180 echo creating $CONFIG_STATUS
6181 rm -f $CONFIG_STATUS
6182 cat > $CONFIG_STATUS <<EOF
6183 #! /bin/sh
6184 # Generated automatically by configure.
6185 # Run this file to recreate the current configuration.
6186 # This directory was configured as follows,
6187 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6188 #
6189 # $0 $ac_configure_args
6190 #
6191 # Compiler output produced by configure, useful for debugging
6192 # configure, is in ./config.log if it exists.
6193
6194 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6195 for ac_option
6196 do
6197   case "\$ac_option" in
6198   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6199     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6200     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6201   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6202     echo "$CONFIG_STATUS generated by autoconf version 2.12"
6203     exit 0 ;;
6204   -help | --help | --hel | --he | --h)
6205     echo "\$ac_cs_usage"; exit 0 ;;
6206   *) echo "\$ac_cs_usage"; exit 1 ;;
6207   esac
6208 done
6209
6210 ac_given_srcdir=$srcdir
6211
6212 trap 'rm -fr `echo "GNUmakefile Makefile.global backend/port/Makefile bin/pg_version/Makefile bin/psql/Makefile bin/pg_dump/Makefile backend/utils/Gen_fmgrtab.sh interfaces/libpq/Makefile interfaces/libpgtcl/Makefile interfaces/ecpg/lib/Makefile include/version.h include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6213 EOF
6214 cat >> $CONFIG_STATUS <<EOF
6215
6216 # Protect against being on the right side of a sed subst in config.status.
6217 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6218  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6219 $ac_vpsub
6220 $extrasub
6221 s%@CFLAGS@%$CFLAGS%g
6222 s%@CPPFLAGS@%$CPPFLAGS%g
6223 s%@CXXFLAGS@%$CXXFLAGS%g
6224 s%@DEFS@%$DEFS%g
6225 s%@LDFLAGS@%$LDFLAGS%g
6226 s%@LIBS@%$LIBS%g
6227 s%@exec_prefix@%$exec_prefix%g
6228 s%@prefix@%$prefix%g
6229 s%@program_transform_name@%$program_transform_name%g
6230 s%@bindir@%$bindir%g
6231 s%@sbindir@%$sbindir%g
6232 s%@libexecdir@%$libexecdir%g
6233 s%@datadir@%$datadir%g
6234 s%@sysconfdir@%$sysconfdir%g
6235 s%@sharedstatedir@%$sharedstatedir%g
6236 s%@localstatedir@%$localstatedir%g
6237 s%@libdir@%$libdir%g
6238 s%@includedir@%$includedir%g
6239 s%@oldincludedir@%$oldincludedir%g
6240 s%@infodir@%$infodir%g
6241 s%@mandir@%$mandir%g
6242 s%@host@%$host%g
6243 s%@host_alias@%$host_alias%g
6244 s%@host_cpu@%$host_cpu%g
6245 s%@host_vendor@%$host_vendor%g
6246 s%@host_os@%$host_os%g
6247 s%@TAS@%$TAS%g
6248 s%@PORTNAME@%$PORTNAME%g
6249 s%@CC@%$CC%g
6250 s%@CC_VERSION@%$CC_VERSION%g
6251 s%@CPP@%$CPP%g
6252 s%@AROPT@%$AROPT%g
6253 s%@SHARED_LIB@%$SHARED_LIB%g
6254 s%@DLSUFFIX@%$DLSUFFIX%g
6255 s%@DL_LIB@%$DL_LIB%g
6256 s%@USE_TCL@%$USE_TCL%g
6257 s%@USE_PERL@%$USE_PERL%g
6258 s%@MULTIBYTE@%$MULTIBYTE%g
6259 s%@CXX@%$CXX%g
6260 s%@HAVECXX@%$HAVECXX%g
6261 s%@INSTALL@%$INSTALL%g
6262 s%@INSTLOPTS@%$INSTLOPTS%g
6263 s%@INSTL_LIB_OPTS@%$INSTL_LIB_OPTS%g
6264 s%@INSTL_SHLIB_OPTS@%$INSTL_SHLIB_OPTS%g
6265 s%@INSTL_EXE_OPTS@%$INSTL_EXE_OPTS%g
6266 s%@DASH_N@%$DASH_N%g
6267 s%@BACKSLASH_C@%$BACKSLASH_C%g
6268 s%@LEX@%$LEX%g
6269 s%@LEXLIB@%$LEXLIB%g
6270 s%@LN_S@%$LN_S%g
6271 s%@SET_MAKE@%$SET_MAKE%g
6272 s%@RANLIB@%$RANLIB%g
6273 s%@find@%$find%g
6274 s%@tar@%$tar%g
6275 s%@split@%$split%g
6276 s%@etags@%$etags%g
6277 s%@xargs@%$xargs%g
6278 s%@ipcs@%$ipcs%g
6279 s%@ipcrm@%$ipcrm%g
6280 s%@TR@%$TR%g
6281 s%@TRARGS@%$TRARGS%g
6282 s%@YACC@%$YACC%g
6283 s%@YFLAGS@%$YFLAGS%g
6284 s%@yacc@%$yacc%g
6285 s%@bison@%$bison%g
6286 s%@LIBOBJS@%$LIBOBJS%g
6287 s%@SNPRINTF@%$SNPRINTF%g
6288 s%@ISINF@%$ISINF%g
6289 s%@GETRUSAGE@%$GETRUSAGE%g
6290 s%@SRANDOM@%$SRANDOM%g
6291 s%@GETHOSTNAME@%$GETHOSTNAME%g
6292 s%@MISSING_RANDOM@%$MISSING_RANDOM%g
6293 s%@INET_ATON@%$INET_ATON%g
6294 s%@STRERROR@%$STRERROR%g
6295 s%@STRERROR2@%$STRERROR2%g
6296 s%@STRDUP@%$STRDUP%g
6297 s%@STRTOL@%$STRTOL%g
6298 s%@STRTOUL@%$STRTOUL%g
6299 s%@STRCASECMP@%$STRCASECMP%g
6300 s%@X_CFLAGS@%$X_CFLAGS%g
6301 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
6302 s%@X_LIBS@%$X_LIBS%g
6303 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
6304 s%@X11_LIBS@%$X11_LIBS%g
6305 s%@TCL_LIB@%$TCL_LIB%g
6306 s%@TK_LIB@%$TK_LIB%g
6307
6308 CEOF
6309 EOF
6310
6311 cat >> $CONFIG_STATUS <<\EOF
6312
6313 # Split the substitutions into bite-sized pieces for seds with
6314 # small command number limits, like on Digital OSF/1 and HP-UX.
6315 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6316 ac_file=1 # Number of current file.
6317 ac_beg=1 # First line for current file.
6318 ac_end=$ac_max_sed_cmds # Line after last line for current file.
6319 ac_more_lines=:
6320 ac_sed_cmds=""
6321 while $ac_more_lines; do
6322   if test $ac_beg -gt 1; then
6323     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6324   else
6325     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6326   fi
6327   if test ! -s conftest.s$ac_file; then
6328     ac_more_lines=false
6329     rm -f conftest.s$ac_file
6330   else
6331     if test -z "$ac_sed_cmds"; then
6332       ac_sed_cmds="sed -f conftest.s$ac_file"
6333     else
6334       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6335     fi
6336     ac_file=`expr $ac_file + 1`
6337     ac_beg=$ac_end
6338     ac_end=`expr $ac_end + $ac_max_sed_cmds`
6339   fi
6340 done
6341 if test -z "$ac_sed_cmds"; then
6342   ac_sed_cmds=cat
6343 fi
6344 EOF
6345
6346 cat >> $CONFIG_STATUS <<EOF
6347
6348 CONFIG_FILES=\${CONFIG_FILES-"GNUmakefile Makefile.global backend/port/Makefile bin/pg_version/Makefile bin/psql/Makefile bin/pg_dump/Makefile backend/utils/Gen_fmgrtab.sh interfaces/libpq/Makefile interfaces/libpgtcl/Makefile interfaces/ecpg/lib/Makefile include/version.h"}
6349 EOF
6350 cat >> $CONFIG_STATUS <<\EOF
6351 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6352   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6353   case "$ac_file" in
6354   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6355        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6356   *) ac_file_in="${ac_file}.in" ;;
6357   esac
6358
6359   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6360
6361   # Remove last slash and all that follows it.  Not all systems have dirname.
6362   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6363   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6364     # The file is in a subdirectory.
6365     test ! -d "$ac_dir" && mkdir "$ac_dir"
6366     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6367     # A "../" for each directory in $ac_dir_suffix.
6368     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6369   else
6370     ac_dir_suffix= ac_dots=
6371   fi
6372
6373   case "$ac_given_srcdir" in
6374   .)  srcdir=.
6375       if test -z "$ac_dots"; then top_srcdir=.
6376       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6377   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6378   *) # Relative path.
6379     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6380     top_srcdir="$ac_dots$ac_given_srcdir" ;;
6381   esac
6382
6383
6384   echo creating "$ac_file"
6385   rm -f "$ac_file"
6386   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6387   case "$ac_file" in
6388   *Makefile*) ac_comsub="1i\\
6389 # $configure_input" ;;
6390   *) ac_comsub= ;;
6391   esac
6392
6393   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6394   sed -e "$ac_comsub
6395 s%@configure_input@%$configure_input%g
6396 s%@srcdir@%$srcdir%g
6397 s%@top_srcdir@%$top_srcdir%g
6398 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
6399 fi; done
6400 rm -f conftest.s*
6401
6402 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6403 # NAME is the cpp macro being defined and VALUE is the value it is being given.
6404 #
6405 # ac_d sets the value in "#define NAME VALUE" lines.
6406 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
6407 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
6408 ac_dC='\3'
6409 ac_dD='%g'
6410 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
6411 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
6412 ac_uB='\([      ]\)%\1#\2define\3'
6413 ac_uC=' '
6414 ac_uD='\4%g'
6415 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
6416 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
6417 ac_eB='$%\1#\2define\3'
6418 ac_eC=' '
6419 ac_eD='%g'
6420
6421 if test "${CONFIG_HEADERS+set}" != set; then
6422 EOF
6423 cat >> $CONFIG_STATUS <<EOF
6424   CONFIG_HEADERS="include/config.h"
6425 EOF
6426 cat >> $CONFIG_STATUS <<\EOF
6427 fi
6428 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
6429   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6430   case "$ac_file" in
6431   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6432        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6433   *) ac_file_in="${ac_file}.in" ;;
6434   esac
6435
6436   echo creating $ac_file
6437
6438   rm -f conftest.frag conftest.in conftest.out
6439   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6440   cat $ac_file_inputs > conftest.in
6441
6442 EOF
6443
6444 # Transform confdefs.h into a sed script conftest.vals that substitutes
6445 # the proper values into config.h.in to produce config.h.  And first:
6446 # Protect against being on the right side of a sed subst in config.status.
6447 # Protect against being in an unquoted here document in config.status.
6448 rm -f conftest.vals
6449 cat > conftest.hdr <<\EOF
6450 s/[\\&%]/\\&/g
6451 s%[\\$`]%\\&%g
6452 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
6453 s%ac_d%ac_u%gp
6454 s%ac_u%ac_e%gp
6455 EOF
6456 sed -n -f conftest.hdr confdefs.h > conftest.vals
6457 rm -f conftest.hdr
6458
6459 # This sed command replaces #undef with comments.  This is necessary, for
6460 # example, in the case of _POSIX_SOURCE, which is predefined and required
6461 # on some systems where configure will not decide to define it.
6462 cat >> conftest.vals <<\EOF
6463 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6464 EOF
6465
6466 # Break up conftest.vals because some shells have a limit on
6467 # the size of here documents, and old seds have small limits too.
6468
6469 rm -f conftest.tail
6470 while :
6471 do
6472   ac_lines=`grep -c . conftest.vals`
6473   # grep -c gives empty output for an empty file on some AIX systems.
6474   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6475   # Write a limited-size here document to conftest.frag.
6476   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6477   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6478   echo 'CEOF
6479   sed -f conftest.frag conftest.in > conftest.out
6480   rm -f conftest.in
6481   mv conftest.out conftest.in
6482 ' >> $CONFIG_STATUS
6483   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6484   rm -f conftest.vals
6485   mv conftest.tail conftest.vals
6486 done
6487 rm -f conftest.vals
6488
6489 cat >> $CONFIG_STATUS <<\EOF
6490   rm -f conftest.frag conftest.h
6491   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
6492   cat conftest.in >> conftest.h
6493   rm -f conftest.in
6494   if cmp -s $ac_file conftest.h 2>/dev/null; then
6495     echo "$ac_file is unchanged"
6496     rm -f conftest.h
6497   else
6498     # Remove last slash and all that follows it.  Not all systems have dirname.
6499       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6500       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6501       # The file is in a subdirectory.
6502       test ! -d "$ac_dir" && mkdir "$ac_dir"
6503     fi
6504     rm -f $ac_file
6505     mv conftest.h $ac_file
6506   fi
6507 fi; done
6508
6509 EOF
6510
6511 cat >> $CONFIG_STATUS <<EOF
6512 ac_sources="backend/port/tas/${tas_file} backend/port/dynloader/${os}.c backend/port/dynloader/${os}.h include/port/${os}.h makefiles/Makefile.${os}"
6513 ac_dests="backend/port/tas.s backend/port/dynloader.c include/dynloader.h include/os.h Makefile.port"
6514 EOF
6515
6516 cat >> $CONFIG_STATUS <<\EOF
6517 srcdir=$ac_given_srcdir
6518 while test -n "$ac_sources"; do
6519   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
6520   set $ac_sources; ac_source=$1; shift; ac_sources=$*
6521
6522   echo "linking $srcdir/$ac_source to $ac_dest"
6523
6524   if test ! -r $srcdir/$ac_source; then
6525     { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
6526   fi
6527   rm -f $ac_dest
6528
6529   # Make relative symlinks.
6530   # Remove last slash and all that follows it.  Not all systems have dirname.
6531   ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
6532   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
6533     # The dest file is in a subdirectory.
6534     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
6535     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
6536     # A "../" for each directory in $ac_dest_dir_suffix.
6537     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
6538   else
6539     ac_dest_dir_suffix= ac_dots=
6540   fi
6541
6542   case "$srcdir" in
6543   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
6544   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
6545   esac
6546
6547   # Make a symlink if possible; otherwise try a hard link.
6548   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
6549     ln $srcdir/$ac_source $ac_dest; then :
6550   else
6551     { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
6552   fi
6553 done
6554 EOF
6555 cat >> $CONFIG_STATUS <<EOF
6556
6557 EOF
6558 cat >> $CONFIG_STATUS <<\EOF
6559
6560 exit 0
6561 EOF
6562 chmod +x $CONFIG_STATUS
6563 rm -fr confdefs* $ac_clean_files
6564 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
6565