OSDN Git Service

> Tatsuo Ishii wrote:
[pg-rex/syncrep.git] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local/pgsql
15 ac_help="$ac_help
16   --with-includes=DIRS    look for additional header files in DIRS"
17 ac_help="$ac_help
18   --with-libraries=DIRS   look for additional libraries in DIRS"
19 ac_help="$ac_help
20   --with-libs=DIRS        alternative spelling of --with-libraries"
21 ac_help="$ac_help
22   --enable-locale         enable locale support"
23 ac_help="$ac_help
24   --enable-recode         enable character set recode support"
25 ac_help="$ac_help
26   --enable-multibyte      enable multibyte character support"
27 ac_help="$ac_help
28   --enable-nls[=LANGUAGES]  enable Native Language Support"
29 ac_help="$ac_help
30   --with-pgport=PORTNUM   change default port number [5432]"
31 ac_help="$ac_help
32   --with-maxbackends=N    set default maximum number of connections [32]"
33 ac_help="$ac_help
34   --disable-shared        do not build shared libraries"
35 ac_help="$ac_help
36   --disable-rpath         do not embed shared library search path in executables"
37 ac_help="$ac_help
38   --enable-debug          build with debugging symbols (-g)"
39 ac_help="$ac_help
40   --enable-depend         turn on automatic dependency tracking"
41 ac_help="$ac_help
42   --enable-cassert        enable assertion checks (for debugging)"
43 ac_help="$ac_help
44   --with-tcl              build Tcl and Tk interfaces"
45 ac_help="$ac_help
46   --without-tk            do not build Tk interfaces if Tcl is enabled"
47 ac_help="$ac_help
48   --with-tclconfig=DIR    tclConfig.sh and tkConfig.sh are in DIR"
49 ac_help="$ac_help
50   --with-tkconfig=DIR     tkConfig.sh is in DIR"
51 ac_help="$ac_help
52   --with-perl             build Perl interface and PL/Perl"
53 ac_help="$ac_help
54   --with-python           build Python interface module"
55 ac_help="$ac_help
56   --with-java             build JDBC interface and Java tools"
57 ac_help="$ac_help
58   --with-krb4[=DIR]       build with Kerberos 4 support [/usr/athena]"
59 ac_help="$ac_help
60   --with-krb5[=DIR]       build with Kerberos 5 support [/usr/athena]"
61 ac_help="$ac_help
62   --with-krb-srvnam=NAME  name of the service principal in Kerberos [postgres]"
63 ac_help="$ac_help
64   --with-pam              build with PAM support"
65 ac_help="$ac_help
66   --with-openssl[=DIR]    build with OpenSSL support [/usr/local/ssl]"
67 ac_help="$ac_help
68   --enable-odbc           build the ODBC driver package"
69 ac_help="$ac_help
70   --with-unixodbc         build ODBC driver for unixODBC"
71 ac_help="$ac_help
72   --with-iodbc            build ODBC driver for iODBC"
73 ac_help="$ac_help
74   --with-odbcinst=DIR     default directory for odbcinst.ini [sysconfdir]"
75 ac_help="$ac_help
76   --with-CXX              build C++ modules (libpq++)"
77 ac_help="$ac_help
78   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
79 ac_help="$ac_help
80   --enable-syslog         enable logging to syslog"
81
82 # Initialize some variables set by options.
83 # The variables have the same names as the options, with
84 # dashes changed to underlines.
85 build=NONE
86 cache_file=./config.cache
87 exec_prefix=NONE
88 host=NONE
89 no_create=
90 nonopt=NONE
91 no_recursion=
92 prefix=NONE
93 program_prefix=NONE
94 program_suffix=NONE
95 program_transform_name=s,x,x,
96 silent=
97 site=
98 srcdir=
99 target=NONE
100 verbose=
101 x_includes=NONE
102 x_libraries=NONE
103 bindir='${exec_prefix}/bin'
104 sbindir='${exec_prefix}/sbin'
105 libexecdir='${exec_prefix}/libexec'
106 datadir='${prefix}/share'
107 sysconfdir='${prefix}/etc'
108 sharedstatedir='${prefix}/com'
109 localstatedir='${prefix}/var'
110 libdir='${exec_prefix}/lib'
111 includedir='${prefix}/include'
112 oldincludedir='/usr/include'
113 docdir='${prefix}/doc'
114 mandir='${prefix}/man'
115
116 # Initialize some other variables.
117 subdirs=
118 MFLAGS= MAKEFLAGS=
119 SHELL=${CONFIG_SHELL-/bin/sh}
120 # Maximum number of lines to put in a shell here document.
121 ac_max_here_lines=12
122
123 ac_prev=
124 for ac_option
125 do
126
127   # If the previous option needs an argument, assign it.
128   if test -n "$ac_prev"; then
129     eval "$ac_prev=\$ac_option"
130     ac_prev=
131     continue
132   fi
133
134   case "$ac_option" in
135   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
136   *) ac_optarg= ;;
137   esac
138
139   # Accept the important Cygnus configure options, so we can diagnose typos.
140
141   case "$ac_option" in
142
143   -bindir | --bindir | --bindi | --bind | --bin | --bi)
144     ac_prev=bindir ;;
145   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
146     bindir="$ac_optarg" ;;
147
148   -build | --build | --buil | --bui | --bu)
149     ac_prev=build ;;
150   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
151     build="$ac_optarg" ;;
152
153   -cache-file | --cache-file | --cache-fil | --cache-fi \
154   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
155     ac_prev=cache_file ;;
156   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
157   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
158     cache_file="$ac_optarg" ;;
159
160   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
161     ac_prev=datadir ;;
162   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
163   | --da=*)
164     datadir="$ac_optarg" ;;
165
166   -disable-* | --disable-*)
167     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
168     # Reject names that are not valid shell variable names.
169     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
170       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
171     fi
172     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
173     eval "enable_${ac_feature}=no" ;;
174
175   -enable-* | --enable-*)
176     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
177     # Reject names that are not valid shell variable names.
178     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
179       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
180     fi
181     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
182     case "$ac_option" in
183       *=*) ;;
184       *) ac_optarg=yes ;;
185     esac
186     eval "enable_${ac_feature}='$ac_optarg'" ;;
187
188   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
189   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
190   | --exec | --exe | --ex)
191     ac_prev=exec_prefix ;;
192   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
193   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
194   | --exec=* | --exe=* | --ex=*)
195     exec_prefix="$ac_optarg" ;;
196
197   -gas | --gas | --ga | --g)
198     # Obsolete; use --with-gas.
199     with_gas=yes ;;
200
201   -help | --help | --hel | --he)
202     # Omit some internal or obsolete options to make the list less imposing.
203     # This message is too long to be a string in the A/UX 3.1 sh.
204     cat << EOF
205 Usage: configure [options] [host]
206 Options: [defaults in brackets after descriptions]
207 Configuration:
208   --cache-file=FILE       cache test results in FILE
209   --help                  print this message
210   --no-create             do not create output files
211   --quiet, --silent       do not print \`checking...' messages
212   --version               print the version of autoconf that created configure
213 Directory and file names:
214   --prefix=PREFIX         install architecture-independent files in PREFIX
215                           [$ac_default_prefix]
216   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
217                           [same as prefix]
218   --bindir=DIR            user executables in DIR [EPREFIX/bin]
219   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
220   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
221   --datadir=DIR           read-only architecture-independent data in DIR
222                           [PREFIX/share]
223   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
224   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
225                           [PREFIX/com]
226   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
227   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
228   --includedir=DIR        C header files in DIR [PREFIX/include]
229   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
230   --docdir=DIR           doc documentation in DIR [PREFIX/doc]
231   --mandir=DIR            man documentation in DIR [PREFIX/man]
232   --srcdir=DIR            find the sources in DIR [configure dir or ..]
233   --program-prefix=PREFIX prepend PREFIX to installed program names
234   --program-suffix=SUFFIX append SUFFIX to installed program names
235   --program-transform-name=PROGRAM
236                           run sed PROGRAM on installed program names
237 EOF
238     cat << EOF
239 Host type:
240   --build=BUILD           configure for building on BUILD [BUILD=HOST]
241   --host=HOST             configure for HOST [guessed]
242   --target=TARGET         configure for TARGET [TARGET=HOST]
243 Features and packages:
244   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
245   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
246   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
247   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
248   --x-includes=DIR        X include files are in DIR
249   --x-libraries=DIR       X library files are in DIR
250 EOF
251     if test -n "$ac_help"; then
252       echo "--enable and --with options recognized:$ac_help"
253     fi
254     exit 0 ;;
255
256   -host | --host | --hos | --ho)
257     ac_prev=host ;;
258   -host=* | --host=* | --hos=* | --ho=*)
259     host="$ac_optarg" ;;
260
261   -includedir | --includedir | --includedi | --included | --include \
262   | --includ | --inclu | --incl | --inc)
263     ac_prev=includedir ;;
264   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
265   | --includ=* | --inclu=* | --incl=* | --inc=*)
266     includedir="$ac_optarg" ;;
267
268   -docdir | --docdir | --infodi | --infod | --doc | --inf)
269     ac_prev=docdir ;;
270   -docdir=* | --docdir=* | --infodi=* | --infod=* | --doc=* | --inf=*)
271     docdir="$ac_optarg" ;;
272
273   -libdir | --libdir | --libdi | --libd)
274     ac_prev=libdir ;;
275   -libdir=* | --libdir=* | --libdi=* | --libd=*)
276     libdir="$ac_optarg" ;;
277
278   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
279   | --libexe | --libex | --libe)
280     ac_prev=libexecdir ;;
281   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
282   | --libexe=* | --libex=* | --libe=*)
283     libexecdir="$ac_optarg" ;;
284
285   -localstatedir | --localstatedir | --localstatedi | --localstated \
286   | --localstate | --localstat | --localsta | --localst \
287   | --locals | --local | --loca | --loc | --lo)
288     ac_prev=localstatedir ;;
289   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
290   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
291   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
292     localstatedir="$ac_optarg" ;;
293
294   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
295     ac_prev=mandir ;;
296   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
297     mandir="$ac_optarg" ;;
298
299   -nfp | --nfp | --nf)
300     # Obsolete; use --without-fp.
301     with_fp=no ;;
302
303   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
304   | --no-cr | --no-c)
305     no_create=yes ;;
306
307   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
308   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
309     no_recursion=yes ;;
310
311   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
312   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
313   | --oldin | --oldi | --old | --ol | --o)
314     ac_prev=oldincludedir ;;
315   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
316   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
317   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
318     oldincludedir="$ac_optarg" ;;
319
320   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
321     ac_prev=prefix ;;
322   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
323     prefix="$ac_optarg" ;;
324
325   -program-prefix | --program-prefix | --program-prefi | --program-pref \
326   | --program-pre | --program-pr | --program-p)
327     ac_prev=program_prefix ;;
328   -program-prefix=* | --program-prefix=* | --program-prefi=* \
329   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
330     program_prefix="$ac_optarg" ;;
331
332   -program-suffix | --program-suffix | --program-suffi | --program-suff \
333   | --program-suf | --program-su | --program-s)
334     ac_prev=program_suffix ;;
335   -program-suffix=* | --program-suffix=* | --program-suffi=* \
336   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
337     program_suffix="$ac_optarg" ;;
338
339   -program-transform-name | --program-transform-name \
340   | --program-transform-nam | --program-transform-na \
341   | --program-transform-n | --program-transform- \
342   | --program-transform | --program-transfor \
343   | --program-transfo | --program-transf \
344   | --program-trans | --program-tran \
345   | --progr-tra | --program-tr | --program-t)
346     ac_prev=program_transform_name ;;
347   -program-transform-name=* | --program-transform-name=* \
348   | --program-transform-nam=* | --program-transform-na=* \
349   | --program-transform-n=* | --program-transform-=* \
350   | --program-transform=* | --program-transfor=* \
351   | --program-transfo=* | --program-transf=* \
352   | --program-trans=* | --program-tran=* \
353   | --progr-tra=* | --program-tr=* | --program-t=*)
354     program_transform_name="$ac_optarg" ;;
355
356   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
357   | -silent | --silent | --silen | --sile | --sil)
358     silent=yes ;;
359
360   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
361     ac_prev=sbindir ;;
362   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
363   | --sbi=* | --sb=*)
364     sbindir="$ac_optarg" ;;
365
366   -sharedstatedir | --sharedstatedir | --sharedstatedi \
367   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
368   | --sharedst | --shareds | --shared | --share | --shar \
369   | --sha | --sh)
370     ac_prev=sharedstatedir ;;
371   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
372   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
373   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
374   | --sha=* | --sh=*)
375     sharedstatedir="$ac_optarg" ;;
376
377   -site | --site | --sit)
378     ac_prev=site ;;
379   -site=* | --site=* | --sit=*)
380     site="$ac_optarg" ;;
381
382   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
383     ac_prev=srcdir ;;
384   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
385     srcdir="$ac_optarg" ;;
386
387   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
388   | --syscon | --sysco | --sysc | --sys | --sy)
389     ac_prev=sysconfdir ;;
390   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
391   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
392     sysconfdir="$ac_optarg" ;;
393
394   -target | --target | --targe | --targ | --tar | --ta | --t)
395     ac_prev=target ;;
396   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
397     target="$ac_optarg" ;;
398
399   -v | -verbose | --verbose | --verbos | --verbo | --verb)
400     verbose=yes ;;
401
402   -version | --version | --versio | --versi | --vers)
403     echo "configure generated by autoconf version 2.13"
404     exit 0 ;;
405
406   -with-* | --with-*)
407     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
408     # Reject names that are not valid shell variable names.
409     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
410       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
411     fi
412     ac_package=`echo $ac_package| sed 's/-/_/g'`
413     case "$ac_option" in
414       *=*) ;;
415       *) ac_optarg=yes ;;
416     esac
417     eval "with_${ac_package}='$ac_optarg'" ;;
418
419   -without-* | --without-*)
420     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
421     # Reject names that are not valid shell variable names.
422     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
423       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
424     fi
425     ac_package=`echo $ac_package| sed 's/-/_/g'`
426     eval "with_${ac_package}=no" ;;
427
428   --x)
429     # Obsolete; use --with-x.
430     with_x=yes ;;
431
432   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
433   | --x-incl | --x-inc | --x-in | --x-i)
434     ac_prev=x_includes ;;
435   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
436   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
437     x_includes="$ac_optarg" ;;
438
439   -x-libraries | --x-libraries | --x-librarie | --x-librari \
440   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
441     ac_prev=x_libraries ;;
442   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
443   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
444     x_libraries="$ac_optarg" ;;
445
446   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
447     ;;
448
449   *)
450     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
451       echo "configure: warning: $ac_option: invalid host type" 1>&2
452     fi
453     if test "x$nonopt" != xNONE; then
454       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
455     fi
456     nonopt="$ac_option"
457     ;;
458
459   esac
460 done
461
462 if test -n "$ac_prev"; then
463   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
464 fi
465
466 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
467
468 # File descriptor usage:
469 # 0 standard input
470 # 1 file creation
471 # 2 errors and warnings
472 # 3 some systems may open it to /dev/tty
473 # 4 used on the Kubota Titan
474 # 6 checking for... messages and results
475 # 5 compiler messages saved in config.log
476 if test "$silent" = yes; then
477   exec 6>/dev/null
478 else
479   exec 6>&1
480 fi
481 exec 5>./config.log
482
483 echo "\
484 This file contains any messages produced by compilers while
485 running configure, to aid debugging if configure makes a mistake.
486 " 1>&5
487
488 # Strip out --no-create and --no-recursion so they do not pile up.
489 # Also quote any args containing shell metacharacters.
490 ac_configure_args=
491 for ac_arg
492 do
493   case "$ac_arg" in
494   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
495   | --no-cr | --no-c) ;;
496   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
497   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
498   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
499   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
500   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
501   esac
502 done
503
504 # NLS nuisances.
505 # Only set these to C if already set.  These must not be set unconditionally
506 # because not all systems understand e.g. LANG=C (notably SCO).
507 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
508 # Non-C LC_CTYPE values break the ctype check.
509 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
510 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
511 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
512 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
513
514 # confdefs.h avoids OS command line length limits that DEFS can exceed.
515 rm -rf conftest* confdefs.h
516 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
517 echo > confdefs.h
518
519 # A filename unique to this package, relative to the directory that
520 # configure is in, which we can look for to find out if srcdir is correct.
521 ac_unique_file=src/backend/access/common/heaptuple.c
522
523 # Find the source files, if location was not specified.
524 if test -z "$srcdir"; then
525   ac_srcdir_defaulted=yes
526   # Try the directory containing this script, then its parent.
527   ac_prog=$0
528   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
529   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
530   srcdir=$ac_confdir
531   if test ! -r $srcdir/$ac_unique_file; then
532     srcdir=..
533   fi
534 else
535   ac_srcdir_defaulted=no
536 fi
537 if test ! -r $srcdir/$ac_unique_file; then
538   if test "$ac_srcdir_defaulted" = yes; then
539     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
540   else
541     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
542   fi
543 fi
544 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
545
546 # Prefer explicitly selected file to automatically selected ones.
547 if test -z "$CONFIG_SITE"; then
548   if test "x$prefix" != xNONE; then
549     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
550   else
551     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
552   fi
553 fi
554 for ac_site_file in $CONFIG_SITE; do
555   if test -r "$ac_site_file"; then
556     echo "loading site script $ac_site_file"
557     . "$ac_site_file"
558   fi
559 done
560
561 if test -r "$cache_file"; then
562   echo "loading cache $cache_file"
563   . $cache_file
564 else
565   echo "creating cache $cache_file"
566   > $cache_file
567 fi
568
569 ac_ext=c
570 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
571 ac_cpp='$CPP $CPPFLAGS'
572 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
573 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
574 cross_compiling=$ac_cv_prog_cc_cross
575
576 ac_exeext=
577 ac_objext=o
578 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
579   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
580   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
581     ac_n= ac_c='
582 ' ac_t='        '
583   else
584     ac_n=-n ac_c= ac_t=
585   fi
586 else
587   ac_n= ac_c='\c' ac_t=
588 fi
589
590
591
592
593
594
595
596
597
598 ac_aux_dir=
599 for ac_dir in config $srcdir/config; do
600   if test -f $ac_dir/install-sh; then
601     ac_aux_dir=$ac_dir
602     ac_install_sh="$ac_aux_dir/install-sh -c"
603     break
604   elif test -f $ac_dir/install.sh; then
605     ac_aux_dir=$ac_dir
606     ac_install_sh="$ac_aux_dir/install.sh -c"
607     break
608   fi
609 done
610 if test -z "$ac_aux_dir"; then
611   { echo "configure: error: can not find install-sh or install.sh in config $srcdir/config" 1>&2; exit 1; }
612 fi
613 ac_config_guess=$ac_aux_dir/config.guess
614 ac_config_sub=$ac_aux_dir/config.sub
615 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
616
617
618 VERSION='7.3devel'
619
620 cat >> confdefs.h <<EOF
621 #define PG_VERSION "$VERSION"
622 EOF
623
624
625 unset CDPATH
626
627
628 # Make sure we can run config.sub.
629 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
630 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
631 fi
632
633 echo $ac_n "checking host system type""... $ac_c" 1>&6
634 echo "configure:635: checking host system type" >&5
635
636 host_alias=$host
637 case "$host_alias" in
638 NONE)
639   case $nonopt in
640   NONE)
641     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
642     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
643     fi ;;
644   *) host_alias=$nonopt ;;
645   esac ;;
646 esac
647
648 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
649 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
650 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
651 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
652 echo "$ac_t""$host" 1>&6
653
654
655
656
657
658 template=
659 echo $ac_n "checking which template to use""... $ac_c" 1>&6
660 echo "configure:661: checking which template to use" >&5
661
662 # Check whether --with-template was given
663 if test x"${with_template+set}" = xset; then
664   case $with_template in
665     yes)
666       { echo "configure: error: argument required for --with-template option" 1>&2; exit 1; }
667       ;;
668     no)
669       { echo "configure: error: argument required for --with-template option" 1>&2; exit 1; }
670       ;;
671     *)
672       withval=$with_template
673       
674   case $withval in
675     list)   echo; ls "$srcdir/src/template"; exit;;
676     *)      if test -f "$srcdir/src/template/$with_template" ; then
677               template=$withval
678             else
679               { echo "configure: error: '$withval' is not a valid template name. Use 'list' for a list." 1>&2; exit 1; }
680             fi;;
681   esac
682
683       ;;
684   esac # $with_template
685 else
686   
687   # --with-template not given
688
689 case $host_os in
690      aix*) template=aix ;;
691     beos*) template=beos ;;
692     bsdi*) template=bsdi ;;
693   cygwin*) template=win ;;
694   darwin*) template=darwin ;;
695     dgux*) template=dgux ;;
696  freebsd*) template=freebsd ;;
697     hpux*) template=hpux ;;
698     irix*) template=irix5 ;;
699    linux*) template=linux ;;
700   netbsd*) template=netbsd ;;
701 nextstep*) template=nextstep ;;
702  openbsd*) template=openbsd ;;
703      osf*) template=osf ;;
704      qnx*) template=qnx4 ;;
705      sco*) template=sco ;;
706  solaris*) template=solaris ;;
707    sunos*) template=sunos4 ;;
708  sysv4.2*)
709         case $host_vendor in
710           univel) template=univel ;;
711         esac ;;
712    sysv4*) template=svr4 ;;
713    sysv5*) template=unixware ;;
714   ultrix*) template=ultrix4 ;;
715 esac
716
717   if test x"$template" = x"" ; then
718     { echo "configure: error: 
719 *******************************************************************
720 PostgreSQL has apparently not been ported to your platform yet.
721 To try a manual configuration, look into the src/template directory
722 for a similar platform and use the '--with-template=' option.
723
724 Please also contact <pgsql-ports@postgresql.org> to see about
725 rectifying this.  Include the above 'checking host system type...'
726 line.
727 *******************************************************************
728 " 1>&2; exit 1; }
729   fi
730
731
732 fi
733
734 echo "$ac_t""$template" 1>&6
735
736 PORTNAME=$template
737
738
739
740
741
742
743
744 # Pick right test-and-set (TAS) code.  Most platforms have inline
745 # assembler code in src/include/storage/s_lock.h, so we just use
746 # a dummy file here.
747 case $host in
748   *-*-hpux*)        need_tas=yes; tas_file=hpux.s ;;
749   sparc-*-solaris*) need_tas=yes; tas_file=solaris_sparc.s ;;
750   i?86-*-solaris*)   need_tas=yes; tas_file=solaris_i386.s ;;
751   *)                need_tas=no;  tas_file=dummy.s ;;
752 esac
753
754
755 if test "$need_tas" = yes ; then
756   TAS=tas.o
757 fi
758
759
760
761
762 ##
763 ## Command line options
764 ##
765
766
767 #
768 # Add non-standard directories to the include path
769 #
770 # Check whether --with-includes was given
771 if test x"${with_includes+set}" = xset; then
772   case $with_includes in
773     yes)
774       { echo "configure: error: argument required for --with-includes option" 1>&2; exit 1; }
775       ;;
776     no)
777       { echo "configure: error: argument required for --with-includes option" 1>&2; exit 1; }
778       ;;
779   esac # $with_includes
780 fi
781
782
783 #
784 # Add non-standard directories to the library search path
785 #
786 # Check whether --with-libraries was given
787 if test x"${with_libraries+set}" = xset; then
788   case $with_libraries in
789     yes)
790       { echo "configure: error: argument required for --with-libraries option" 1>&2; exit 1; }
791       ;;
792     no)
793       { echo "configure: error: argument required for --with-libraries option" 1>&2; exit 1; }
794       ;;
795     *)
796       withval=$with_libraries
797       LIBRARY_DIRS=$withval
798       ;;
799   esac # $with_libraries
800 fi
801
802 # Check whether --with-libs was given
803 if test x"${with_libs+set}" = xset; then
804   case $with_libs in
805     yes)
806       { echo "configure: error: argument required for --with-libs option" 1>&2; exit 1; }
807       ;;
808     no)
809       { echo "configure: error: argument required for --with-libs option" 1>&2; exit 1; }
810       ;;
811     *)
812       withval=$with_libs
813       LIBRARY_DIRS=$withval
814       ;;
815   esac # $with_libs
816 fi
817
818
819 #
820 # Locale (--enable-locale)
821 #
822 echo $ac_n "checking whether to build with locale support""... $ac_c" 1>&6
823 echo "configure:824: checking whether to build with locale support" >&5
824 # Check whether --enable-locale was given
825 if test x"${enable_locale+set}" = xset; then
826   case $enable_locale in
827     yes)
828       cat >> confdefs.h <<\EOF
829 #define USE_LOCALE 1
830 EOF
831
832       ;;
833     no)
834       :
835       ;;
836     *)
837       enableval=$enable_locale
838       { echo "configure: error: no argument expected for --enable-locale option" 1>&2; exit 1; }
839       ;;
840   esac # $enable_locale
841 else
842   enable_locale=no
843
844 fi
845 echo "$ac_t""$enable_locale" 1>&6
846
847
848 #
849 # Character set recode (--enable-recode)
850 #
851 echo $ac_n "checking whether to build with recode support""... $ac_c" 1>&6
852 echo "configure:853: checking whether to build with recode support" >&5
853 # Check whether --enable-recode was given
854 if test x"${enable_recode+set}" = xset; then
855   case $enable_recode in
856     yes)
857       cat >> confdefs.h <<\EOF
858 #define CYR_RECODE 1
859 EOF
860
861       ;;
862     no)
863       :
864       ;;
865     *)
866       enableval=$enable_recode
867       { echo "configure: error: no argument expected for --enable-recode option" 1>&2; exit 1; }
868       ;;
869   esac # $enable_recode
870 else
871   enable_recode=no
872
873 fi
874 echo "$ac_t""$enable_recode" 1>&6
875
876
877 #
878 # Multibyte support
879 #
880 MULTIBYTE=
881 echo $ac_n "checking whether to build with multibyte character support""... $ac_c" 1>&6
882 echo "configure:883: checking whether to build with multibyte character support" >&5
883
884 # Check whether --enable-multibyte was given
885 if test x"${enable_multibyte+set}" = xset; then
886   case $enable_multibyte in
887     yes)
888       MULTIBYTE=SQL_ASCII
889       ;;
890     no)
891       :
892       ;;
893     *)
894       enableval=$enable_multibyte
895       enable_multibyte=yes
896
897   case $enableval in
898     SQL_ASCII|EUC_JP|EUC_CN|EUC_KR|EUC_TW|JOHAB|UNICODE|MULE_INTERNAL|LATIN1|LATIN2|LATIN3|LATIN4|LATIN5|LATIN6|LATIN7|LATIN8|LATIN9|LATIN10|WIN1256|TCVN|WIN874|KOI8|WIN|ALT|ISO_8859_5|ISO_8859_6|ISO_8859_7|ISO_8859_8)
899       MULTIBYTE=$enableval;;
900     *)
901       { echo "configure: error: argument to --enable-multibyte must be one of:
902   SQL_ASCII, EUC_JP, EUC_CN, EUC_KR, EUC_TW, JOHAB,
903   UNICODE, MULE_INTERNAL,
904   LATIN1, LATIN2, LATIN3, LATIN4, LATIN5,
905   LATIN6, LATIN7, LATIN8, LATIN9, LATIN10,
906   WIN1256, TCVN, WIN874,
907   KOI8, WIN, ALT,
908   ISO_8859_5, ISO_8859_6, ISO_8859_7, ISO_8859_8
909 Or do not specify an argument to the option to use the default." 1>&2; exit 1; };;
910   esac
911
912       ;;
913   esac # $enable_multibyte
914 else
915   enable_multibyte=no
916 fi
917
918 if test "$enable_multibyte" = yes; then
919   
920   cat >> confdefs.h <<\EOF
921 #define MULTIBYTE 1
922 EOF
923
924   echo "$ac_t""yes, default $MULTIBYTE" 1>&6
925
926 else
927   echo "$ac_t""no" 1>&6
928 fi
929
930
931
932
933 #
934 # NLS
935 #
936 echo $ac_n "checking whether NLS is wanted""... $ac_c" 1>&6
937 echo "configure:937: checking whether NLS is wanted" >&5
938 # Check whether --enable-nls was given
939 if test x"${enable_nls+set}" = xset; then
940   case $enable_nls in
941     yes)
942       :
943       ;;
944     no)
945       :
946       ;;
947     *)
948       enableval=$enable_nls
949       enable_nls=yes
950 WANTED_LANGUAGES=$enableval
951       ;;
952   esac # $enable_nls
953 else
954   enable_nls=no
955 fi
956
957 if test "$enable_nls" = yes; then
958   cat >> confdefs.h <<\EOF
959 #define ENABLE_NLS 1
960 EOF
961
962 fi
963
964 echo "$ac_t""$enable_nls" 1>&6
965
966
967
968 #
969 # Default port number (--with-pgport), default 5432
970 #
971 echo $ac_n "checking for default port number""... $ac_c" 1>&6
972 echo "configure:972: checking for default port number" >&5
973 # Check whether --with-pgport was given
974 if test x"${with_pgport+set}" = xset; then
975   case $with_pgport in
976     yes)
977       { echo "configure: error: argument required for --with-pgport option" 1>&2; exit 1; }
978       ;;
979     no)
980       { echo "configure: error: argument required for --with-pgport option" 1>&2; exit 1; }
981       ;;
982     *)
983       withval=$with_pgport
984       default_port=$withval
985       ;;
986   esac # $with_pgport
987 else
988   default_port=5432
989 fi
990 echo "$ac_t""$default_port" 1>&6
991 # Need both of these because some places want an integer and some a string
992 cat >> confdefs.h <<EOF
993 #define DEF_PGPORT ${default_port}
994 EOF
995
996 cat >> confdefs.h <<EOF
997 #define DEF_PGPORT_STR "${default_port}"
998 EOF
999
1000
1001
1002 #
1003 # Maximum number of allowed connections (--with-maxbackends), default 32
1004 #
1005 echo $ac_n "checking for default soft limit on number of connections""... $ac_c" 1>&6
1006 echo "configure:1006: checking for default soft limit on number of connections" >&5
1007 # Check whether --with-maxbackends was given
1008 if test x"${with_maxbackends+set}" = xset; then
1009   case $with_maxbackends in
1010     yes)
1011       { echo "configure: error: argument required for --with-maxbackends option" 1>&2; exit 1; }
1012       ;;
1013     no)
1014       { echo "configure: error: argument required for --with-maxbackends option" 1>&2; exit 1; }
1015       ;;
1016   esac # $with_maxbackends
1017 else
1018   with_maxbackends=32
1019 fi
1020 echo "$ac_t""$with_maxbackends" 1>&6
1021 cat >> confdefs.h <<EOF
1022 #define DEF_MAXBACKENDS $with_maxbackends
1023 EOF
1024
1025
1026
1027 #
1028 # Option to disable shared libraries
1029 #
1030 # Check whether --enable-shared was given
1031 if test x"${enable_shared+set}" = xset; then
1032   case $enable_shared in
1033     yes)
1034       :
1035       ;;
1036     no)
1037       :
1038       ;;
1039     *)
1040       enableval=$enable_shared
1041       { echo "configure: error: no argument expected for --enable-shared option" 1>&2; exit 1; }
1042       ;;
1043   esac # $enable_shared
1044 else
1045   enable_shared=yes
1046
1047 fi
1048
1049
1050 #
1051 # '-rpath'-like feature can be disabled
1052 #
1053 # Check whether --enable-rpath was given
1054 if test x"${enable_rpath+set}" = xset; then
1055   case $enable_rpath in
1056     yes)
1057       :
1058       ;;
1059     no)
1060       :
1061       ;;
1062     *)
1063       enableval=$enable_rpath
1064       { echo "configure: error: no argument expected for --enable-rpath option" 1>&2; exit 1; }
1065       ;;
1066   esac # $enable_rpath
1067 else
1068   enable_rpath=yes
1069
1070 fi
1071
1072
1073
1074 #
1075 # --enable-debug adds -g to compiler flags
1076 #
1077 # Check whether --enable-debug was given
1078 if test x"${enable_debug+set}" = xset; then
1079   case $enable_debug in
1080     yes)
1081       :
1082       ;;
1083     no)
1084       :
1085       ;;
1086     *)
1087       enableval=$enable_debug
1088       { echo "configure: error: no argument expected for --enable-debug option" 1>&2; exit 1; }
1089       ;;
1090   esac # $enable_debug
1091 else
1092   enable_debug=no
1093
1094 fi
1095
1096
1097 #
1098 # C compiler
1099 #
1100
1101 # For historical reasons you can also use --with-CC to specify the C compiler
1102 # to use, although the standard way to do this is to set the CC environment
1103 # variable.
1104 # Check whether --with-CC was given
1105 if test x"${with_CC+set}" = xset; then
1106   case $with_CC in
1107     yes)
1108       { echo "configure: error: argument required for --with-CC option" 1>&2; exit 1; }
1109       ;;
1110     no)
1111       { echo "configure: error: argument required for --with-CC option" 1>&2; exit 1; }
1112       ;;
1113     *)
1114       withval=$with_CC
1115       CC=$with_CC
1116       ;;
1117   esac # $with_CC
1118 fi
1119
1120 # On AIX, default compiler to xlc.
1121 if test "$template" = aix && test -z "$CC" ; then CC=xlc; fi
1122
1123 # Save CFLAGS from the environment
1124 has_environ_CFLAGS="${CFLAGS+yes}"
1125 save_CFLAGS=$CFLAGS
1126
1127 # Extract the first word of "gcc", so it can be a program name with args.
1128 set dummy gcc; ac_word=$2
1129 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1130 echo "configure:1130: checking for $ac_word" >&5
1131 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1132   echo $ac_n "(cached) $ac_c" 1>&6
1133 else
1134   if test -n "$CC"; then
1135   ac_cv_prog_CC="$CC" # Let the user override the test.
1136 else
1137   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1138   ac_dummy="$PATH"
1139   for ac_dir in $ac_dummy; do
1140     test -z "$ac_dir" && ac_dir=.
1141     if test -f $ac_dir/$ac_word; then
1142       ac_cv_prog_CC="gcc"
1143       break
1144     fi
1145   done
1146   IFS="$ac_save_ifs"
1147 fi
1148 fi
1149 CC="$ac_cv_prog_CC"
1150 if test -n "$CC"; then
1151   echo "$ac_t""$CC" 1>&6
1152 else
1153   echo "$ac_t""no" 1>&6
1154 fi
1155
1156 if test -z "$CC"; then
1157   # Extract the first word of "cc", so it can be a program name with args.
1158 set dummy cc; ac_word=$2
1159 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1160 echo "configure:1160: checking for $ac_word" >&5
1161 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1162   echo $ac_n "(cached) $ac_c" 1>&6
1163 else
1164   if test -n "$CC"; then
1165   ac_cv_prog_CC="$CC" # Let the user override the test.
1166 else
1167   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1168   ac_prog_rejected=no
1169   ac_dummy="$PATH"
1170   for ac_dir in $ac_dummy; do
1171     test -z "$ac_dir" && ac_dir=.
1172     if test -f $ac_dir/$ac_word; then
1173       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1174         ac_prog_rejected=yes
1175         continue
1176       fi
1177       ac_cv_prog_CC="cc"
1178       break
1179     fi
1180   done
1181   IFS="$ac_save_ifs"
1182 if test $ac_prog_rejected = yes; then
1183   # We found a bogon in the path, so make sure we never use it.
1184   set dummy $ac_cv_prog_CC
1185   shift
1186   if test $# -gt 0; then
1187     # We chose a different compiler from the bogus one.
1188     # However, it has the same basename, so the bogon will be chosen
1189     # first if we set CC to just the basename; use the full file name.
1190     shift
1191     set dummy "$ac_dir/$ac_word" "$@"
1192     shift
1193     ac_cv_prog_CC="$@"
1194   fi
1195 fi
1196 fi
1197 fi
1198 CC="$ac_cv_prog_CC"
1199 if test -n "$CC"; then
1200   echo "$ac_t""$CC" 1>&6
1201 else
1202   echo "$ac_t""no" 1>&6
1203 fi
1204
1205   if test -z "$CC"; then
1206     case "`uname -s`" in
1207     *win32* | *WIN32*)
1208       # Extract the first word of "cl", so it can be a program name with args.
1209 set dummy cl; ac_word=$2
1210 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1211 echo "configure:1211: checking for $ac_word" >&5
1212 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1213   echo $ac_n "(cached) $ac_c" 1>&6
1214 else
1215   if test -n "$CC"; then
1216   ac_cv_prog_CC="$CC" # Let the user override the test.
1217 else
1218   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1219   ac_dummy="$PATH"
1220   for ac_dir in $ac_dummy; do
1221     test -z "$ac_dir" && ac_dir=.
1222     if test -f $ac_dir/$ac_word; then
1223       ac_cv_prog_CC="cl"
1224       break
1225     fi
1226   done
1227   IFS="$ac_save_ifs"
1228 fi
1229 fi
1230 CC="$ac_cv_prog_CC"
1231 if test -n "$CC"; then
1232   echo "$ac_t""$CC" 1>&6
1233 else
1234   echo "$ac_t""no" 1>&6
1235 fi
1236  ;;
1237     esac
1238   fi
1239   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1240 fi
1241
1242 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1243 echo "configure:1243: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1244
1245 ac_ext=c
1246 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1247 ac_cpp='$CPP $CPPFLAGS'
1248 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1249 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1250 cross_compiling=$ac_cv_prog_cc_cross
1251
1252 cat > conftest.$ac_ext << EOF
1253
1254 #line 1254 "configure"
1255 #include "confdefs.h"
1256
1257 main(){return(0);}
1258 EOF
1259 if { (eval echo configure:1259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1260   ac_cv_prog_cc_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_cc_cross=no
1264   else
1265     ac_cv_prog_cc_cross=yes
1266   fi
1267 else
1268   echo "configure: failed program was:" >&5
1269   cat conftest.$ac_ext >&5
1270   ac_cv_prog_cc_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${ac_exeext} $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_cc_works" 1>&6
1281 if test $ac_cv_prog_cc_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 ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1285 echo "configure:1285: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1286 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1287 cross_compiling=$ac_cv_prog_cc_cross
1288
1289 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1290 echo "configure:1290: checking whether we are using GNU C" >&5
1291 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+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='${CC-cc} -E conftest.c'; { (eval echo configure:1299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1300   ac_cv_prog_gcc=yes
1301 else
1302   ac_cv_prog_gcc=no
1303 fi
1304 fi
1305
1306 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1307
1308 if test $ac_cv_prog_gcc = yes; then
1309   GCC=yes
1310 else
1311   GCC=
1312 fi
1313
1314 ac_test_CFLAGS="${CFLAGS+set}"
1315 ac_save_CFLAGS="$CFLAGS"
1316 CFLAGS=
1317 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1318 echo "configure:1318: checking whether ${CC-cc} accepts -g" >&5
1319 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1320   echo $ac_n "(cached) $ac_c" 1>&6
1321 else
1322   echo 'void f(){}' > conftest.c
1323 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1324   ac_cv_prog_cc_g=yes
1325 else
1326   ac_cv_prog_cc_g=no
1327 fi
1328 rm -f conftest*
1329
1330 fi
1331
1332 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1333 if test "$ac_test_CFLAGS" = set; then
1334   CFLAGS="$ac_save_CFLAGS"
1335 elif test $ac_cv_prog_cc_g = yes; then
1336   if test "$GCC" = yes; then
1337     CFLAGS="-g -O2"
1338   else
1339     CFLAGS="-g"
1340   fi
1341 else
1342   if test "$GCC" = yes; then
1343     CFLAGS="-O2"
1344   else
1345     CFLAGS=
1346   fi
1347 fi
1348
1349 # Read the template
1350 . "$srcdir/src/template/$template" || exit
1351
1352 if test "$has_environ_CFLAGS" = yes; then
1353   CFLAGS=$save_CFLAGS
1354 fi
1355 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
1356   CFLAGS="$CFLAGS -g"
1357 fi
1358 echo "using CFLAGS=$CFLAGS"
1359 # Check if the compiler still works with the template settings
1360 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1361 echo "configure:1361: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1362
1363 ac_ext=c
1364 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1365 ac_cpp='$CPP $CPPFLAGS'
1366 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1367 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1368 cross_compiling=$ac_cv_prog_cc_cross
1369
1370 cat > conftest.$ac_ext << EOF
1371
1372 #line 1372 "configure"
1373 #include "confdefs.h"
1374
1375 main(){return(0);}
1376 EOF
1377 if { (eval echo configure:1377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1378   ac_cv_prog_cc_works=yes
1379   # If we can't run a trivial program, we are probably using a cross compiler.
1380   if (./conftest; exit) 2>/dev/null; then
1381     ac_cv_prog_cc_cross=no
1382   else
1383     ac_cv_prog_cc_cross=yes
1384   fi
1385 else
1386   echo "configure: failed program was:" >&5
1387   cat conftest.$ac_ext >&5
1388   ac_cv_prog_cc_works=no
1389 fi
1390 rm -fr conftest*
1391 ac_ext=c
1392 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1393 ac_cpp='$CPP $CPPFLAGS'
1394 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1395 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1396 cross_compiling=$ac_cv_prog_cc_cross
1397
1398 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1399 if test $ac_cv_prog_cc_works = no; then
1400   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1401 fi
1402 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1403 echo "configure:1403: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1404 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1405 cross_compiling=$ac_cv_prog_cc_cross
1406
1407 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1408 echo "configure:1408: checking for Cygwin environment" >&5
1409 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1410   echo $ac_n "(cached) $ac_c" 1>&6
1411 else
1412   cat > conftest.$ac_ext <<EOF
1413 #line 1413 "configure"
1414 #include "confdefs.h"
1415
1416 int main() {
1417
1418 #ifndef __CYGWIN__
1419 #define __CYGWIN__ __CYGWIN32__
1420 #endif
1421 return __CYGWIN__;
1422 ; return 0; }
1423 EOF
1424 if { (eval echo configure:1424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1425   rm -rf conftest*
1426   ac_cv_cygwin=yes
1427 else
1428   echo "configure: failed program was:" >&5
1429   cat conftest.$ac_ext >&5
1430   rm -rf conftest*
1431   ac_cv_cygwin=no
1432 fi
1433 rm -f conftest*
1434 rm -f conftest*
1435 fi
1436
1437 echo "$ac_t""$ac_cv_cygwin" 1>&6
1438 CYGWIN=
1439 test "$ac_cv_cygwin" = yes && CYGWIN=yes
1440 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1441 echo "configure:1441: checking for mingw32 environment" >&5
1442 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1443   echo $ac_n "(cached) $ac_c" 1>&6
1444 else
1445   cat > conftest.$ac_ext <<EOF
1446 #line 1446 "configure"
1447 #include "confdefs.h"
1448
1449 int main() {
1450 return __MINGW32__;
1451 ; return 0; }
1452 EOF
1453 if { (eval echo configure:1453: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1454   rm -rf conftest*
1455   ac_cv_mingw32=yes
1456 else
1457   echo "configure: failed program was:" >&5
1458   cat conftest.$ac_ext >&5
1459   rm -rf conftest*
1460   ac_cv_mingw32=no
1461 fi
1462 rm -f conftest*
1463 rm -f conftest*
1464 fi
1465
1466 echo "$ac_t""$ac_cv_mingw32" 1>&6
1467 MINGW32=
1468 test "$ac_cv_mingw32" = yes && MINGW32=yes
1469
1470
1471 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1472 echo "configure:1472: checking for executable suffix" >&5
1473 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1474   echo $ac_n "(cached) $ac_c" 1>&6
1475 else
1476   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1477   ac_cv_exeext=.exe
1478 else
1479   rm -f conftest*
1480   echo 'int main () { return 0; }' > conftest.$ac_ext
1481   ac_cv_exeext=
1482   if { (eval echo configure:1482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1483     for file in conftest.*; do
1484       case $file in
1485       *.c | *.o | *.obj) ;;
1486       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1487       esac
1488     done
1489   else
1490     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1491   fi
1492   rm -f conftest*
1493   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1494 fi
1495 fi
1496
1497 EXEEXT=""
1498 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1499 echo "$ac_t""${ac_cv_exeext}" 1>&6
1500 ac_exeext=$EXEEXT
1501
1502 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1503 echo "configure:1503: checking how to run the C preprocessor" >&5
1504 # On Suns, sometimes $CPP names a directory.
1505 if test -n "$CPP" && test -d "$CPP"; then
1506   CPP=
1507 fi
1508 if test -z "$CPP"; then
1509 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1510   echo $ac_n "(cached) $ac_c" 1>&6
1511 else
1512     # This must be in double quotes, not single quotes, because CPP may get
1513   # substituted into the Makefile and "${CC-cc}" will confuse make.
1514   CPP="${CC-cc} -E"
1515   # On the NeXT, cc -E runs the code through the compiler's parser,
1516   # not just through cpp.
1517   cat > conftest.$ac_ext <<EOF
1518 #line 1518 "configure"
1519 #include "confdefs.h"
1520 #include <assert.h>
1521 Syntax Error
1522 EOF
1523 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1524 { (eval echo configure:1524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1525 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1526 if test -z "$ac_err"; then
1527   :
1528 else
1529   echo "$ac_err" >&5
1530   echo "configure: failed program was:" >&5
1531   cat conftest.$ac_ext >&5
1532   rm -rf conftest*
1533   CPP="${CC-cc} -E -traditional-cpp"
1534   cat > conftest.$ac_ext <<EOF
1535 #line 1535 "configure"
1536 #include "confdefs.h"
1537 #include <assert.h>
1538 Syntax Error
1539 EOF
1540 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1541 { (eval echo configure:1541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1542 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1543 if test -z "$ac_err"; then
1544   :
1545 else
1546   echo "$ac_err" >&5
1547   echo "configure: failed program was:" >&5
1548   cat conftest.$ac_ext >&5
1549   rm -rf conftest*
1550   CPP="${CC-cc} -nologo -E"
1551   cat > conftest.$ac_ext <<EOF
1552 #line 1552 "configure"
1553 #include "confdefs.h"
1554 #include <assert.h>
1555 Syntax Error
1556 EOF
1557 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1558 { (eval echo configure:1558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1559 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1560 if test -z "$ac_err"; then
1561   :
1562 else
1563   echo "$ac_err" >&5
1564   echo "configure: failed program was:" >&5
1565   cat conftest.$ac_ext >&5
1566   rm -rf conftest*
1567   CPP=/lib/cpp
1568 fi
1569 rm -f conftest*
1570 fi
1571 rm -f conftest*
1572 fi
1573 rm -f conftest*
1574   ac_cv_prog_CPP="$CPP"
1575 fi
1576   CPP="$ac_cv_prog_CPP"
1577 else
1578   ac_cv_prog_CPP="$CPP"
1579 fi
1580 echo "$ac_t""$CPP" 1>&6
1581
1582 if test $ac_cv_prog_gcc = yes; then
1583     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
1584 echo "configure:1584: checking whether ${CC-cc} needs -traditional" >&5
1585 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
1586   echo $ac_n "(cached) $ac_c" 1>&6
1587 else
1588     ac_pattern="Autoconf.*'x'"
1589   cat > conftest.$ac_ext <<EOF
1590 #line 1590 "configure"
1591 #include "confdefs.h"
1592 #include <sgtty.h>
1593 Autoconf TIOCGETP
1594 EOF
1595 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1596   egrep "$ac_pattern" >/dev/null 2>&1; then
1597   rm -rf conftest*
1598   ac_cv_prog_gcc_traditional=yes
1599 else
1600   rm -rf conftest*
1601   ac_cv_prog_gcc_traditional=no
1602 fi
1603 rm -f conftest*
1604
1605
1606   if test $ac_cv_prog_gcc_traditional = no; then
1607     cat > conftest.$ac_ext <<EOF
1608 #line 1608 "configure"
1609 #include "confdefs.h"
1610 #include <termio.h>
1611 Autoconf TCGETA
1612 EOF
1613 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1614   egrep "$ac_pattern" >/dev/null 2>&1; then
1615   rm -rf conftest*
1616   ac_cv_prog_gcc_traditional=yes
1617 fi
1618 rm -f conftest*
1619
1620   fi
1621 fi
1622
1623 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
1624   if test $ac_cv_prog_gcc_traditional = yes; then
1625     CC="$CC -traditional"
1626   fi
1627 fi
1628
1629
1630
1631 # Create compiler version string
1632 if test x"$GCC" = x"yes" ; then
1633   cc_string="GCC `${CC} --version | head -1`"
1634 else
1635   cc_string=$CC
1636 fi
1637 cat >> confdefs.h <<EOF
1638 #define PG_VERSION_STR "PostgreSQL $VERSION on $host, compiled by $cc_string"
1639 EOF
1640
1641
1642
1643 #
1644 # Automatic dependency tracking
1645 #
1646 # Check whether --enable-depend was given
1647 if test x"${enable_depend+set}" = xset; then
1648   case $enable_depend in
1649     yes)
1650       autodepend=yes
1651       ;;
1652     no)
1653       :
1654       ;;
1655     *)
1656       enableval=$enable_depend
1657       { echo "configure: error: no argument expected for --enable-depend option" 1>&2; exit 1; }
1658       ;;
1659   esac # $enable_depend
1660 else
1661   enable_depend=no
1662
1663 fi
1664
1665
1666
1667 #
1668 # Enable assert checks
1669 #
1670 # Check whether --enable-cassert was given
1671 if test x"${enable_cassert+set}" = xset; then
1672   case $enable_cassert in
1673     yes)
1674       cat >> confdefs.h <<\EOF
1675 #define USE_ASSERT_CHECKING 1
1676 EOF
1677
1678       ;;
1679     no)
1680       :
1681       ;;
1682     *)
1683       enableval=$enable_cassert
1684       { echo "configure: error: no argument expected for --enable-cassert option" 1>&2; exit 1; }
1685       ;;
1686   esac # $enable_cassert
1687 else
1688   enable_cassert=no
1689
1690 fi
1691
1692
1693 #
1694 # Include directories
1695 #
1696 ac_save_IFS=$IFS
1697 IFS="${IFS}:"
1698 # SRCH_INC comes from the template file
1699 for dir in $with_includes $SRCH_INC; do
1700   if test -d "$dir"; then
1701     INCLUDES="$INCLUDES -I$dir"
1702   else
1703     echo "configure: warning: *** Include directory $dir does not exist." 1>&2
1704   fi
1705 done
1706 IFS=$ac_save_IFS
1707
1708
1709
1710 #
1711 # Library directories
1712 #
1713 ac_save_IFS=$IFS
1714 IFS="${IFS}:"
1715 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
1716 for dir in $LIBRARY_DIRS $SRCH_LIB; do
1717   if test -d "$dir"; then
1718     LIBDIRS="$LIBDIRS -L$dir"
1719   else
1720     echo "configure: warning: *** Library directory $dir does not exist." 1>&2
1721   fi
1722 done
1723 IFS=$ac_save_IFS
1724
1725
1726 #
1727 # Tcl/Tk
1728 #
1729 echo $ac_n "checking whether to build with Tcl""... $ac_c" 1>&6
1730 echo "configure:1730: checking whether to build with Tcl" >&5
1731 # Check whether --with-tcl was given
1732 if test x"${with_tcl+set}" = xset; then
1733   case $with_tcl in
1734     yes)
1735       :
1736       ;;
1737     no)
1738       :
1739       ;;
1740     *)
1741       withval=$with_tcl
1742       { echo "configure: error: no argument expected for --with-tcl option" 1>&2; exit 1; }
1743       ;;
1744   esac # $with_tcl
1745 else
1746   with_tcl=no
1747
1748 fi
1749 echo "$ac_t""$with_tcl" 1>&6
1750
1751
1752 # If Tcl is enabled (above) then Tk is also, unless the user disables it using --without-tk
1753 echo $ac_n "checking whether to build with Tk""... $ac_c" 1>&6
1754 echo "configure:1754: checking whether to build with Tk" >&5
1755 if test "$with_tcl" = yes; then
1756   # Check whether --with-tk was given
1757 if test x"${with_tk+set}" = xset; then
1758   case $with_tk in
1759     yes)
1760       :
1761       ;;
1762     no)
1763       :
1764       ;;
1765     *)
1766       withval=$with_tk
1767       { echo "configure: error: no argument expected for --with-tk option" 1>&2; exit 1; }
1768       ;;
1769   esac # $with_tk
1770 else
1771   with_tk=yes
1772
1773 fi
1774 else
1775   with_tk=no
1776 fi
1777 echo "$ac_t""$with_tk" 1>&6
1778
1779
1780
1781 # We see if the path to the TCL/TK configuration scripts is specified.
1782 # This will override the use of tclsh to find the paths to search.
1783
1784 # Check whether --with-tclconfig was given
1785 if test x"${with_tclconfig+set}" = xset; then
1786   case $with_tclconfig in
1787     yes)
1788       { echo "configure: error: argument required for --with-tclconfig option" 1>&2; exit 1; }
1789       ;;
1790     no)
1791       { echo "configure: error: argument required for --with-tclconfig option" 1>&2; exit 1; }
1792       ;;
1793   esac # $with_tclconfig
1794 fi
1795
1796 # We see if the path to the TK configuration scripts is specified.
1797 # This will override the use of tclsh to find the paths to search.
1798
1799 # Check whether --with-tkconfig was given
1800 if test x"${with_tkconfig+set}" = xset; then
1801   case $with_tkconfig in
1802     yes)
1803       { echo "configure: error: argument required for --with-tkconfig option" 1>&2; exit 1; }
1804       ;;
1805     no)
1806       { echo "configure: error: argument required for --with-tkconfig option" 1>&2; exit 1; }
1807       ;;
1808   esac # $with_tkconfig
1809 fi
1810
1811 #
1812 # Optionally build Perl modules (Pg.pm and PL/Perl)
1813 #
1814 echo $ac_n "checking whether to build Perl modules""... $ac_c" 1>&6
1815 echo "configure:1815: checking whether to build Perl modules" >&5
1816 # Check whether --with-perl was given
1817 if test x"${with_perl+set}" = xset; then
1818   case $with_perl in
1819     yes)
1820       :
1821       ;;
1822     no)
1823       :
1824       ;;
1825     *)
1826       withval=$with_perl
1827       { echo "configure: error: no argument expected for --with-perl option" 1>&2; exit 1; }
1828       ;;
1829   esac # $with_perl
1830 else
1831   with_perl=no
1832
1833 fi
1834 echo "$ac_t""$with_perl" 1>&6
1835
1836
1837 #
1838 # Optionally build Python interface module
1839 #
1840 echo $ac_n "checking whether to build Python modules""... $ac_c" 1>&6
1841 echo "configure:1841: checking whether to build Python modules" >&5
1842 # Check whether --with-python was given
1843 if test x"${with_python+set}" = xset; then
1844   case $with_python in
1845     yes)
1846       :
1847       ;;
1848     no)
1849       :
1850       ;;
1851     *)
1852       withval=$with_python
1853       { echo "configure: error: no argument expected for --with-python option" 1>&2; exit 1; }
1854       ;;
1855   esac # $with_python
1856 else
1857   with_python=no
1858
1859 fi
1860 echo "$ac_t""$with_python" 1>&6
1861
1862
1863 #
1864 # Optionally build the Java/JDBC tools
1865 #
1866 echo $ac_n "checking whether to build Java/JDBC tools""... $ac_c" 1>&6
1867 echo "configure:1867: checking whether to build Java/JDBC tools" >&5
1868 # Check whether --with-java was given
1869 if test x"${with_java+set}" = xset; then
1870   case $with_java in
1871     yes)
1872       echo "$ac_t""yes" 1>&6
1873
1874   for ac_prog in jakarta-ant ant ant.sh ant.bat
1875 do
1876 # Extract the first word of "$ac_prog", so it can be a program name with args.
1877 set dummy $ac_prog; ac_word=$2
1878 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1879 echo "configure:1879: checking for $ac_word" >&5
1880 if eval "test \"`echo '$''{'ac_cv_path_ANT'+set}'`\" = set"; then
1881   echo $ac_n "(cached) $ac_c" 1>&6
1882 else
1883   case "$ANT" in
1884   /*)
1885   ac_cv_path_ANT="$ANT" # Let the user override the test with a path.
1886   ;;
1887   ?:/*)                  
1888   ac_cv_path_ANT="$ANT" # Let the user override the test with a dos path.
1889   ;;
1890   *)
1891   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1892   ac_dummy="$PATH"
1893   for ac_dir in $ac_dummy; do 
1894     test -z "$ac_dir" && ac_dir=.
1895     if test -f $ac_dir/$ac_word; then
1896       ac_cv_path_ANT="$ac_dir/$ac_word"
1897       break
1898     fi
1899   done
1900   IFS="$ac_save_ifs"
1901   ;;
1902 esac
1903 fi
1904 ANT="$ac_cv_path_ANT"
1905 if test -n "$ANT"; then
1906   echo "$ac_t""$ANT" 1>&6
1907 else
1908   echo "$ac_t""no" 1>&6
1909 fi
1910
1911 test -n "$ANT" && break
1912 done
1913
1914   
1915   echo $ac_n "checking whether $ANT works""... $ac_c" 1>&6
1916 echo "configure:1916: checking whether $ANT works" >&5
1917 if eval "test \"`echo '$''{'pgac_cv_prog_ant_works'+set}'`\" = set"; then
1918   echo $ac_n "(cached) $ac_c" 1>&6
1919 else
1920   
1921     cat > conftest.java << EOF
1922 public class conftest {
1923     int testmethod(int a, int b) {
1924         return a + b;
1925     }
1926 }
1927 EOF
1928
1929     cat > conftest.xml << EOF
1930 <project name="conftest" default="conftest">
1931  <target name="conftest">
1932   <javac srcdir="." includes="conftest.java">
1933   </javac>
1934  </target>
1935 </project>
1936 EOF
1937
1938     pgac_cmd='$ANT -buildfile conftest.xml 1>&2'
1939     { (eval echo configure:1939: \"$pgac_cmd\") 1>&5; (eval $pgac_cmd) 2>&5; }
1940     pgac_save_status=$?
1941     if test $? = 0 && test -f ./conftest.class ; then
1942       pgac_cv_prog_ant_works=yes
1943     else
1944       echo "configure: failed java program was:" >&5
1945       cat conftest.java >&5
1946       echo "configure: failed build file was:" >&5
1947       cat conftest.xml >&5
1948       pgac_cv_prog_ant_works=no
1949     fi
1950
1951     rm -f conftest* core core.* *.core
1952   
1953 fi
1954
1955 echo "$ac_t""$pgac_cv_prog_ant_works" 1>&6
1956
1957   if test "$pgac_cv_prog_ant_works" != yes; then
1958     { echo "configure: error: ant does not work" 1>&2; exit 1; }
1959   fi
1960
1961
1962 if test -z "$ANT"; then
1963   { echo "configure: error: Ant is required to build Java components" 1>&2; exit 1; }
1964 fi
1965       ;;
1966     no)
1967       echo "$ac_t""no" 1>&6
1968       ;;
1969     *)
1970       withval=$with_java
1971       { echo "configure: error: no argument expected for --with-java option" 1>&2; exit 1; }
1972       ;;
1973   esac # $with_java
1974 else
1975   with_java=no
1976 echo "$ac_t""no" 1>&6
1977 fi
1978
1979
1980
1981 #
1982 # Kerberos 4
1983 #
1984 # Check whether --with-krb4 was given
1985 if test x"${with_krb4+set}" = xset; then
1986   case $with_krb4 in
1987     yes)
1988       krb4_prefix=/usr/athena
1989       ;;
1990     no)
1991       :
1992       ;;
1993     *)
1994       withval=$with_krb4
1995       with_krb4=yes
1996 krb4_prefix=$withval
1997       ;;
1998   esac # $with_krb4
1999 else
2000   with_krb4=no
2001 fi
2002
2003 if test "$with_krb4" = yes; then
2004   
2005   echo "$ac_t""building with Kerberos 4 support" 1>&6
2006   cat >> confdefs.h <<\EOF
2007 #define KRB4 1
2008 EOF
2009
2010
2011   if test -d "$krb4_prefix/include"; then
2012     INCLUDES="$INCLUDES -I$krb4_prefix/include"
2013   fi
2014   if test -d "$krb4_prefix/lib"; then
2015     LIBDIRS="$LIBDIRS -L$krb4_prefix/lib"
2016   fi
2017
2018   krb_srvtab="/etc/srvtab"
2019
2020 fi
2021
2022
2023
2024
2025
2026 #
2027 # Kerberos 5
2028 #
2029 # Check whether --with-krb5 was given
2030 if test x"${with_krb5+set}" = xset; then
2031   case $with_krb5 in
2032     yes)
2033       krb5_prefix=/usr/athena
2034       ;;
2035     no)
2036       :
2037       ;;
2038     *)
2039       withval=$with_krb5
2040       with_krb5=yes
2041 krb5_prefix=$withval
2042       ;;
2043   esac # $with_krb5
2044 else
2045   with_krb5=no
2046 fi
2047
2048 if test "$with_krb5" = yes; then
2049   
2050   echo "$ac_t""building with Kerberos 5 support" 1>&6
2051   cat >> confdefs.h <<\EOF
2052 #define KRB5 1
2053 EOF
2054
2055
2056   if test -d "$krb5_prefix/include"; then
2057     INCLUDES="$INCLUDES -I$krb5_prefix/include"
2058   fi
2059   if test -d "$krb5_prefix/lib"; then
2060     LIBDIRS="$LIBDIRS -L$krb5_prefix/lib"
2061   fi
2062
2063   krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
2064
2065 fi
2066
2067
2068
2069
2070
2071 # Using both Kerberos 4 and Kerberos 5 at the same time isn't going to work.
2072 if test "$with_krb4" = yes && test "$with_krb5" = yes ; then
2073   { echo "configure: error: Kerberos 4 and Kerberos 5 support cannot be combined" 1>&2; exit 1; }
2074 fi
2075
2076
2077
2078
2079 #
2080 # Kerberos configuration parameters
2081 #
2082 # Check whether --with-krb-srvnam was given
2083 if test x"${with_krb_srvnam+set}" = xset; then
2084   case $with_krb_srvnam in
2085     yes)
2086       { echo "configure: error: argument required for --with-krb-srvnam option" 1>&2; exit 1; }
2087       ;;
2088     no)
2089       { echo "configure: error: argument required for --with-krb-srvnam option" 1>&2; exit 1; }
2090       ;;
2091   esac # $with_krb_srvnam
2092 else
2093   with_krb_srvnam="postgres"
2094 fi
2095 cat >> confdefs.h <<EOF
2096 #define PG_KRB_SRVNAM "$with_krb_srvnam"
2097 EOF
2098
2099
2100
2101 #
2102 # PAM
2103 #
2104 echo $ac_n "checking whether to build with PAM support""... $ac_c" 1>&6
2105 echo "configure:2105: checking whether to build with PAM support" >&5
2106 # Check whether --with-pam was given
2107 if test x"${with_pam+set}" = xset; then
2108   case $with_pam in
2109     yes)
2110       cat >> confdefs.h <<\EOF
2111 #define USE_PAM 1
2112 EOF
2113
2114       ;;
2115     no)
2116       :
2117       ;;
2118     *)
2119       withval=$with_pam
2120       { echo "configure: error: no argument expected for --with-pam option" 1>&2; exit 1; }
2121       ;;
2122   esac # $with_pam
2123 else
2124   with_pam=no
2125
2126 fi
2127 echo "$ac_t""$with_pam" 1>&6
2128
2129
2130
2131 #
2132 # OpenSSL
2133 #
2134 # Check whether --with-openssl was given
2135 if test x"${with_openssl+set}" = xset; then
2136   case $with_openssl in
2137     yes)
2138       openssl_prefix=/usr/local/ssl
2139       ;;
2140     no)
2141       :
2142       ;;
2143     *)
2144       withval=$with_openssl
2145       with_openssl=yes
2146 openssl_prefix=$withval
2147       ;;
2148   esac # $with_openssl
2149 else
2150   with_openssl=no
2151 fi
2152
2153 if test "$with_openssl" = yes; then
2154   
2155   echo "$ac_t""building with OpenSSL support" 1>&6
2156   cat >> confdefs.h <<\EOF
2157 #define USE_SSL 1
2158 EOF
2159
2160
2161   if test -d "${openssl_prefix}/include" ; then
2162     INCLUDES="$INCLUDES -I${openssl_prefix}/include"
2163   fi
2164   if test -d "${openssl_prefix}/lib" ; then
2165     LIBDIRS="$LIBDIRS -L${openssl_prefix}/lib"
2166   fi
2167
2168 fi
2169
2170
2171
2172
2173
2174
2175 #
2176 # Optionally enable the building of the ODBC driver
2177 #
2178  
2179 # Old option name
2180 if test "${with_odbc+set}" = set && test "${enable_odbc+set}" != set; then
2181   enable_odbc=$with_odbc
2182 fi
2183  
2184 echo $ac_n "checking whether to build the ODBC driver""... $ac_c" 1>&6
2185 echo "configure:2185: checking whether to build the ODBC driver" >&5
2186 # Check whether --enable-odbc was given
2187 if test x"${enable_odbc+set}" = xset; then
2188   case $enable_odbc in
2189     yes)
2190       :
2191       ;;
2192     no)
2193       :
2194       ;;
2195     *)
2196       enableval=$enable_odbc
2197       { echo "configure: error: no argument expected for --enable-odbc option" 1>&2; exit 1; }
2198       ;;
2199   esac # $enable_odbc
2200 else
2201   enable_odbc=no
2202
2203 fi
2204 # Check whether --with-unixodbc was given
2205 if test x"${with_unixodbc+set}" = xset; then
2206   case $with_unixodbc in
2207     yes)
2208       :
2209       ;;
2210     no)
2211       :
2212       ;;
2213     *)
2214       withval=$with_unixodbc
2215       { echo "configure: error: no argument expected for --with-unixodbc option" 1>&2; exit 1; }
2216       ;;
2217   esac # $with_unixodbc
2218 else
2219   with_unixodbc=no
2220
2221 fi
2222 # Check whether --with-iodbc was given
2223 if test x"${with_iodbc+set}" = xset; then
2224   case $with_iodbc in
2225     yes)
2226       :
2227       ;;
2228     no)
2229       :
2230       ;;
2231     *)
2232       withval=$with_iodbc
2233       { echo "configure: error: no argument expected for --with-iodbc option" 1>&2; exit 1; }
2234       ;;
2235   esac # $with_iodbc
2236 else
2237   with_iodbc=no
2238
2239 fi
2240 if test "$with_unixodbc" = yes && test "$with_iodbc" = yes; then
2241   { echo "configure: error: ODBC driver cannot be built for both unixODBC and iODBC" 1>&2; exit 1; }
2242 fi
2243 if test "$with_unixodbc" = yes || test "$with_iodbc" = yes; then
2244   enable_odbc=yes
2245 fi
2246 case $enable_odbc:$with_unixodbc:$with_iodbc in
2247   yes:no:no)    echo "$ac_t""yes (stand-alone)" 1>&6;;
2248   yes:yes:no)   echo "$ac_t""yes (unixODBC)" 1>&6; cat >> confdefs.h <<\EOF
2249 #define WITH_UNIXODBC 1
2250 EOF
2251 ;;
2252   yes:no:yes)   echo "$ac_t""yes (iODBC)" 1>&6; cat >> confdefs.h <<\EOF
2253 #define WITH_IODBC 1
2254 EOF
2255 ;;
2256   no:*)         echo "$ac_t""no" 1>&6;;
2257 esac
2258
2259
2260
2261
2262
2263 # Allow for overriding the default location of the odbcinst.ini
2264 # file which is normally ${sysconfdir} (i.e., ${prefix}/etc).
2265 # Check whether --with-odbcinst was given
2266 if test x"${with_odbcinst+set}" = xset; then
2267   case $with_odbcinst in
2268     yes)
2269       { echo "configure: error: argument required for --with-odbcinst option" 1>&2; exit 1; }
2270       ;;
2271     no)
2272       { echo "configure: error: argument required for --with-odbcinst option" 1>&2; exit 1; }
2273       ;;
2274     *)
2275       withval=$with_odbcinst
2276       odbcinst_ini_dir=$withval
2277       ;;
2278   esac # $with_odbcinst
2279 else
2280   odbcinst_ini_dir="\${sysconfdir}"
2281 fi
2282
2283
2284
2285
2286 # Assume system is ELF if it predefines __ELF__ as 1,
2287 # otherwise believe host_os based default.
2288 case $host_os in
2289     freebsd1*|freebsd2*) elf=no;;
2290     freebsd3*|freebsd4*) elf=yes;;
2291 esac
2292
2293 cat > conftest.$ac_ext <<EOF
2294 #line 2294 "configure"
2295 #include "confdefs.h"
2296 #if __ELF__
2297   yes
2298 #endif
2299
2300 EOF
2301 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2302   egrep "yes" >/dev/null 2>&1; then
2303   rm -rf conftest*
2304   ELF_SYS=true
2305 else
2306   rm -rf conftest*
2307   if test "X$elf" = "Xyes" ; then
2308   ELF_SYS=true
2309 else
2310   ELF_SYS=
2311 fi
2312 fi
2313 rm -f conftest*
2314
2315
2316
2317
2318
2319 #
2320 # Optionally build C++ code (i.e., libpq++)
2321 #
2322 echo $ac_n "checking whether to build C++ modules""... $ac_c" 1>&6
2323 echo "configure:2323: checking whether to build C++ modules" >&5
2324 # Check whether --with-CXX was given
2325 if test x"${with_CXX+set}" = xset; then
2326   case $with_CXX in
2327     yes)
2328       :
2329       ;;
2330     no)
2331       :
2332       ;;
2333     *)
2334       withval=$with_CXX
2335       with_CXX=yes
2336 CXX=$withval
2337       ;;
2338   esac # $with_CXX
2339 else
2340   with_CXX=no
2341 fi
2342
2343 if test "$with_CXX" = yes; then
2344   
2345   echo "$ac_t""yes" 1>&6
2346
2347   # If the user has specified CXXFLAGS in the environment, leave it
2348   # alone, else use a default.
2349
2350   has_environ_CXXFLAGS="${CXXFLAGS+yes}"
2351   for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
2352 do
2353 # Extract the first word of "$ac_prog", so it can be a program name with args.
2354 set dummy $ac_prog; ac_word=$2
2355 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2356 echo "configure:2356: checking for $ac_word" >&5
2357 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
2358   echo $ac_n "(cached) $ac_c" 1>&6
2359 else
2360   if test -n "$CXX"; then
2361   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2362 else
2363   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2364   ac_dummy="$PATH"
2365   for ac_dir in $ac_dummy; do
2366     test -z "$ac_dir" && ac_dir=.
2367     if test -f $ac_dir/$ac_word; then
2368       ac_cv_prog_CXX="$ac_prog"
2369       break
2370     fi
2371   done
2372   IFS="$ac_save_ifs"
2373 fi
2374 fi
2375 CXX="$ac_cv_prog_CXX"
2376 if test -n "$CXX"; then
2377   echo "$ac_t""$CXX" 1>&6
2378 else
2379   echo "$ac_t""no" 1>&6
2380 fi
2381
2382 test -n "$CXX" && break
2383 done
2384 test -n "$CXX" || CXX="gcc"
2385
2386
2387 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2388 echo "configure:2388: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
2389
2390 ac_ext=C
2391 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2392 ac_cpp='$CXXCPP $CPPFLAGS'
2393 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2394 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2395 cross_compiling=$ac_cv_prog_cxx_cross
2396
2397 cat > conftest.$ac_ext << EOF
2398
2399 #line 2399 "configure"
2400 #include "confdefs.h"
2401
2402 int main(){return(0);}
2403 EOF
2404 if { (eval echo configure:2404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2405   ac_cv_prog_cxx_works=yes
2406   # If we can't run a trivial program, we are probably using a cross compiler.
2407   if (./conftest; exit) 2>/dev/null; then
2408     ac_cv_prog_cxx_cross=no
2409   else
2410     ac_cv_prog_cxx_cross=yes
2411   fi
2412 else
2413   echo "configure: failed program was:" >&5
2414   cat conftest.$ac_ext >&5
2415   ac_cv_prog_cxx_works=no
2416 fi
2417 rm -fr conftest*
2418 ac_ext=c
2419 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2420 ac_cpp='$CPP $CPPFLAGS'
2421 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2422 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2423 cross_compiling=$ac_cv_prog_cc_cross
2424
2425 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
2426 if test $ac_cv_prog_cxx_works = no; then
2427   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
2428 fi
2429 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2430 echo "configure:2430: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
2431 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
2432 cross_compiling=$ac_cv_prog_cxx_cross
2433
2434 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
2435 echo "configure:2435: checking whether we are using GNU C++" >&5
2436 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
2437   echo $ac_n "(cached) $ac_c" 1>&6
2438 else
2439   cat > conftest.C <<EOF
2440 #ifdef __GNUC__
2441   yes;
2442 #endif
2443 EOF
2444 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2445   ac_cv_prog_gxx=yes
2446 else
2447   ac_cv_prog_gxx=no
2448 fi
2449 fi
2450
2451 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
2452
2453 if test $ac_cv_prog_gxx = yes; then
2454   GXX=yes
2455 else
2456   GXX=
2457 fi
2458
2459 ac_test_CXXFLAGS="${CXXFLAGS+set}"
2460 ac_save_CXXFLAGS="$CXXFLAGS"
2461 CXXFLAGS=
2462 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
2463 echo "configure:2463: checking whether ${CXX-g++} accepts -g" >&5
2464 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
2465   echo $ac_n "(cached) $ac_c" 1>&6
2466 else
2467   echo 'void f(){}' > conftest.cc
2468 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
2469   ac_cv_prog_cxx_g=yes
2470 else
2471   ac_cv_prog_cxx_g=no
2472 fi
2473 rm -f conftest*
2474
2475 fi
2476
2477 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
2478 if test "$ac_test_CXXFLAGS" = set; then
2479   CXXFLAGS="$ac_save_CXXFLAGS"
2480 elif test $ac_cv_prog_cxx_g = yes; then
2481   if test "$GXX" = yes; then
2482     CXXFLAGS="-g -O2"
2483   else
2484     CXXFLAGS="-g"
2485   fi
2486 else
2487   if test "$GXX" = yes; then
2488     CXXFLAGS="-O2"
2489   else
2490     CXXFLAGS=
2491   fi
2492 fi
2493
2494   if test "$has_environ_CXXFLAGS" != yes; then
2495     if test "$GXX" = yes; then
2496       CXXFLAGS=-O2
2497     else
2498       case $template in
2499         osf)            CXXFLAGS='-O4 -Olimit 2000' ;;
2500         unixware)       CXXFLAGS='-O' ;;
2501         *)              CXXFLAGS= ;;
2502       esac
2503     fi
2504   fi
2505   if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
2506     CXXFLAGS="$CXXFLAGS -g"
2507   fi
2508   echo "using CXXFLAGS=$CXXFLAGS"
2509
2510   echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
2511 echo "configure:2511: checking how to run the C++ preprocessor" >&5
2512 if test -z "$CXXCPP"; then
2513 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
2514   echo $ac_n "(cached) $ac_c" 1>&6
2515 else
2516   ac_ext=C
2517 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2518 ac_cpp='$CXXCPP $CPPFLAGS'
2519 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2520 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2521 cross_compiling=$ac_cv_prog_cxx_cross
2522   CXXCPP="${CXX-g++} -E"
2523   cat > conftest.$ac_ext <<EOF
2524 #line 2524 "configure"
2525 #include "confdefs.h"
2526 #include <stdlib.h>
2527 EOF
2528 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2529 { (eval echo configure:2529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2530 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2531 if test -z "$ac_err"; then
2532   :
2533 else
2534   echo "$ac_err" >&5
2535   echo "configure: failed program was:" >&5
2536   cat conftest.$ac_ext >&5
2537   rm -rf conftest*
2538   CXXCPP=/lib/cpp
2539 fi
2540 rm -f conftest*
2541   ac_cv_prog_CXXCPP="$CXXCPP"
2542 ac_ext=c
2543 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2544 ac_cpp='$CPP $CPPFLAGS'
2545 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2546 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2547 cross_compiling=$ac_cv_prog_cc_cross
2548 fi
2549 fi
2550 CXXCPP="$ac_cv_prog_CXXCPP"
2551 echo "$ac_t""$CXXCPP" 1>&6
2552
2553   
2554   
2555 ac_ext=C
2556 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2557 ac_cpp='$CXXCPP $CPPFLAGS'
2558 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2559 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2560 cross_compiling=$ac_cv_prog_cxx_cross
2561
2562 ac_safe=`echo "string" | sed 'y%./+-%__p_%'`
2563 echo $ac_n "checking for string""... $ac_c" 1>&6
2564 echo "configure:2564: checking for string" >&5
2565 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2566   echo $ac_n "(cached) $ac_c" 1>&6
2567 else
2568   cat > conftest.$ac_ext <<EOF
2569 #line 2569 "configure"
2570 #include "confdefs.h"
2571 #include <string>
2572 EOF
2573 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2574 { (eval echo configure:2574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2575 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2576 if test -z "$ac_err"; then
2577   rm -rf conftest*
2578   eval "ac_cv_header_$ac_safe=yes"
2579 else
2580   echo "$ac_err" >&5
2581   echo "configure: failed program was:" >&5
2582   cat conftest.$ac_ext >&5
2583   rm -rf conftest*
2584   eval "ac_cv_header_$ac_safe=no"
2585 fi
2586 rm -f conftest*
2587 fi
2588 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2589   echo "$ac_t""yes" 1>&6
2590   cat >> confdefs.h <<\EOF
2591 #define HAVE_CXX_STRING_HEADER 1
2592 EOF
2593
2594 else
2595   echo "$ac_t""no" 1>&6
2596 fi
2597
2598
2599 if test x"$ac_cv_header_string" != xyes ; then
2600   echo $ac_n "checking for class string in <string.h>""... $ac_c" 1>&6
2601 echo "configure:2601: checking for class string in <string.h>" >&5
2602 if eval "test \"`echo '$''{'pgac_cv_class_string_in_string_h'+set}'`\" = set"; then
2603   echo $ac_n "(cached) $ac_c" 1>&6
2604 else
2605   cat > conftest.$ac_ext <<EOF
2606 #line 2606 "configure"
2607 #include "confdefs.h"
2608 #include <stdio.h>
2609 #include <stdlib.h>
2610 #include <string.h>
2611
2612 int main() {
2613 string foo = "test"
2614 ; return 0; }
2615 EOF
2616 if { (eval echo configure:2616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2617   rm -rf conftest*
2618   pgac_cv_class_string_in_string_h=yes
2619 else
2620   echo "configure: failed program was:" >&5
2621   cat conftest.$ac_ext >&5
2622   rm -rf conftest*
2623   pgac_cv_class_string_in_string_h=no
2624 fi
2625 rm -f conftest*
2626 fi
2627
2628 echo "$ac_t""$pgac_cv_class_string_in_string_h" 1>&6
2629
2630   if test x"$pgac_cv_class_string_in_string_h" != xyes ; then
2631     { echo "configure: error: neither <string> nor <string.h> seem to define the C++ class \`string\'" 1>&2; exit 1; }
2632   fi
2633 fi
2634 ac_ext=c
2635 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2636 ac_cpp='$CPP $CPPFLAGS'
2637 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2638 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2639 cross_compiling=$ac_cv_prog_cc_cross
2640
2641   
2642 echo $ac_n "checking for namespace std in C++""... $ac_c" 1>&6
2643 echo "configure:2643: checking for namespace std in C++" >&5
2644 if eval "test \"`echo '$''{'pgac_cv_cxx_namespace_std'+set}'`\" = set"; then
2645   echo $ac_n "(cached) $ac_c" 1>&6
2646 else
2647   
2648
2649 ac_ext=C
2650 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2651 ac_cpp='$CXXCPP $CPPFLAGS'
2652 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2653 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2654 cross_compiling=$ac_cv_prog_cxx_cross
2655
2656 cat > conftest.$ac_ext <<EOF
2657 #line 2657 "configure"
2658 #include "confdefs.h"
2659 #include <stdio.h>
2660 #include <stdlib.h>
2661 #ifdef HAVE_CXX_STRING_HEADER
2662 #include <string>
2663 #endif
2664 using namespace std;
2665
2666 int main() {
2667
2668 ; return 0; }
2669 EOF
2670 if { (eval echo configure:2670: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2671   rm -rf conftest*
2672   pgac_cv_cxx_namespace_std=yes
2673 else
2674   echo "configure: failed program was:" >&5
2675   cat conftest.$ac_ext >&5
2676   rm -rf conftest*
2677   pgac_cv_cxx_namespace_std=no
2678 fi
2679 rm -f conftest*
2680 ac_ext=c
2681 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2682 ac_cpp='$CPP $CPPFLAGS'
2683 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2684 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2685 cross_compiling=$ac_cv_prog_cc_cross
2686
2687 fi
2688
2689 echo "$ac_t""$pgac_cv_cxx_namespace_std" 1>&6
2690
2691 if test $pgac_cv_cxx_namespace_std = yes ; then
2692     cat >> confdefs.h <<\EOF
2693 #define HAVE_NAMESPACE_STD 1
2694 EOF
2695
2696 fi
2697
2698 else
2699   echo "$ac_t""no" 1>&6
2700 fi
2701
2702
2703
2704 CPPFLAGS="$CPPFLAGS $INCLUDES"
2705 LDFLAGS="$LDFLAGS $LIBDIRS"
2706
2707 echo "using CPPFLAGS=$CPPFLAGS"
2708 echo "using LDFLAGS=$LDFLAGS"
2709
2710
2711 for ac_prog in mawk gawk nawk awk
2712 do
2713 # Extract the first word of "$ac_prog", so it can be a program name with args.
2714 set dummy $ac_prog; ac_word=$2
2715 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2716 echo "configure:2716: checking for $ac_word" >&5
2717 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2718   echo $ac_n "(cached) $ac_c" 1>&6
2719 else
2720   if test -n "$AWK"; then
2721   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2722 else
2723   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2724   ac_dummy="$PATH"
2725   for ac_dir in $ac_dummy; do
2726     test -z "$ac_dir" && ac_dir=.
2727     if test -f $ac_dir/$ac_word; then
2728       ac_cv_prog_AWK="$ac_prog"
2729       break
2730     fi
2731   done
2732   IFS="$ac_save_ifs"
2733 fi
2734 fi
2735 AWK="$ac_cv_prog_AWK"
2736 if test -n "$AWK"; then
2737   echo "$ac_t""$AWK" 1>&6
2738 else
2739   echo "$ac_t""no" 1>&6
2740 fi
2741
2742 test -n "$AWK" && break
2743 done
2744
2745 echo $ac_n "checking for flex""... $ac_c" 1>&6
2746 echo "configure:2746: checking for flex" >&5
2747 if eval "test \"`echo '$''{'pgac_cv_path_flex'+set}'`\" = set"; then
2748   echo $ac_n "(cached) $ac_c" 1>&6
2749 else
2750   # Let the user override the test
2751 if test -n "$FLEX"; then
2752   pgac_cv_path_flex=$FLEX
2753 else
2754   pgac_save_IFS=$IFS
2755   IFS=:
2756   for pgac_dir in $PATH; do
2757     if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
2758       pgac_dir=`pwd`
2759     fi
2760     for pgac_prog in flex lex; do
2761       pgac_candidate="$pgac_dir/$pgac_prog"
2762       if test -f "$pgac_candidate" \
2763         && $pgac_candidate --version </dev/null >/dev/null 2>&1
2764       then
2765         echo '%%'  > conftest.l
2766         if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
2767           if $pgac_candidate --version | grep '2\.5\.3' >/dev/null 2>&1; then
2768             pgac_broken_flex=$pgac_candidate
2769             continue
2770           fi
2771
2772           pgac_cv_path_flex=$pgac_candidate
2773           break 2
2774         fi
2775       fi
2776     done
2777   done
2778   IFS=$pgac_save_IFS
2779   rm -f conftest.l
2780   : ${pgac_cv_path_flex=no}
2781 fi
2782
2783 fi
2784
2785 echo "$ac_t""$pgac_cv_path_flex" 1>&6
2786 if test x"$pgac_cv_path_flex" = x"no"; then
2787   if test -n "$pgac_broken_flex"; then
2788     echo "configure: warning: 
2789 *** The Flex version 2.5.3 you have at $pgac_broken_flex contains a bug. You
2790 *** should get version 2.5.4 or later." 1>&2
2791   fi
2792
2793   echo "configure: warning: 
2794 *** Without Flex you will not be able to build PostgreSQL from CVS or
2795 *** change any of the scanner definition files.  You can obtain Flex from
2796 *** a GNU mirror site.  (If you are using the official distribution of
2797 *** PostgreSQL then you do not need to worry about this because the Flex
2798 *** output is pre-generated.)" 1>&2
2799 fi
2800
2801 if test x"$pgac_cv_path_flex" = x"no"; then
2802   FLEX=
2803 else
2804   FLEX=$pgac_cv_path_flex
2805 fi
2806
2807
2808
2809
2810 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
2811 echo "configure:2811: checking whether ln -s works" >&5
2812 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
2813   echo $ac_n "(cached) $ac_c" 1>&6
2814 else
2815   rm -f conftestdata
2816 if ln -s X conftestdata 2>/dev/null
2817 then
2818   rm -f conftestdata
2819   ac_cv_prog_LN_S="ln -s"
2820 else
2821   ac_cv_prog_LN_S=ln
2822 fi
2823 fi
2824 LN_S="$ac_cv_prog_LN_S"
2825 if test "$ac_cv_prog_LN_S" = "ln -s"; then
2826   echo "$ac_t""yes" 1>&6
2827 else
2828   echo "$ac_t""no" 1>&6
2829 fi
2830
2831 # Check whether --with-gnu-ld or --without-gnu-ld was given.
2832 if test "${with_gnu_ld+set}" = set; then
2833   withval="$with_gnu_ld"
2834   test "$withval" = no || with_gnu_ld=yes
2835 else
2836   with_gnu_ld=no
2837 fi
2838
2839 ac_prog=ld
2840 if test "$ac_cv_prog_gcc" = yes; then
2841   # Check if gcc -print-prog-name=ld gives a path.
2842   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
2843 echo "configure:2843: checking for ld used by GCC" >&5
2844   case $host in
2845   *-*-mingw*)
2846     # gcc leaves a trailing carriage return which upsets mingw
2847     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2848   *)
2849     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2850   esac
2851   case "$ac_prog" in
2852     # Accept absolute paths.
2853     [\\/]* | [A-Za-z]:[\\/]*)
2854       re_direlt='/[^/][^/]*/\.\./'
2855       # Canonicalize the path of ld
2856       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2857       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2858         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2859       done
2860       test -z "$LD" && LD="$ac_prog"
2861       ;;
2862   "")
2863     # If it fails, then pretend we aren't using GCC.
2864     ac_prog=ld
2865     ;;
2866   *)
2867     # If it is relative, then search for the first ld in PATH.
2868     with_gnu_ld=unknown
2869     ;;
2870   esac
2871 elif test "$with_gnu_ld" = yes; then
2872   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
2873 echo "configure:2873: checking for GNU ld" >&5
2874 else
2875   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
2876 echo "configure:2876: checking for non-GNU ld" >&5
2877 fi
2878 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
2879   echo $ac_n "(cached) $ac_c" 1>&6
2880 else
2881   if test -z "$LD"; then
2882   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2883   for ac_dir in $PATH; do
2884     test -z "$ac_dir" && ac_dir=.
2885     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2886       ac_cv_path_LD="$ac_dir/$ac_prog"
2887       # Check to see if the program is GNU ld.  I'd rather use --version,
2888       # but apparently some GNU ld's only accept -v.
2889       # Break only if it was the GNU/non-GNU ld that we prefer.
2890       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2891         test "$with_gnu_ld" != no && break
2892       else
2893         test "$with_gnu_ld" != yes && break
2894       fi
2895     fi
2896   done
2897   IFS="$ac_save_ifs"
2898 else
2899   ac_cv_path_LD="$LD" # Let the user override the test with a path.
2900 fi
2901 fi
2902
2903 LD="$ac_cv_path_LD"
2904 if test -n "$LD"; then
2905   echo "$ac_t""$LD" 1>&6
2906 else
2907   echo "$ac_t""no" 1>&6
2908 fi
2909 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
2910 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
2911 echo "configure:2911: checking if the linker ($LD) is GNU ld" >&5
2912 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
2913   echo $ac_n "(cached) $ac_c" 1>&6
2914 else
2915   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
2916 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2917   ac_cv_prog_gnu_ld=yes
2918 else
2919   ac_cv_prog_gnu_ld=no
2920 fi
2921 fi
2922
2923 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
2924 with_gnu_ld=$ac_cv_prog_gnu_ld
2925
2926
2927
2928
2929 case $host_os in sysv5*)
2930   echo $ac_n "checking whether ld -R works""... $ac_c" 1>&6
2931 echo "configure:2931: checking whether ld -R works" >&5
2932 if eval "test \"`echo '$''{'pgac_cv_prog_ld_R'+set}'`\" = set"; then
2933   echo $ac_n "(cached) $ac_c" 1>&6
2934 else
2935   
2936     pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
2937     cat > conftest.$ac_ext <<EOF
2938 #line 2938 "configure"
2939 #include "confdefs.h"
2940
2941 int main() {
2942
2943 ; return 0; }
2944 EOF
2945 if { (eval echo configure:2945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2946   rm -rf conftest*
2947   pgac_cv_prog_ld_R=yes
2948 else
2949   echo "configure: failed program was:" >&5
2950   cat conftest.$ac_ext >&5
2951   rm -rf conftest*
2952   pgac_cv_prog_ld_R=no
2953 fi
2954 rm -f conftest*
2955     LDFLAGS=$pgac_save_LDFLAGS
2956   
2957 fi
2958
2959 echo "$ac_t""$pgac_cv_prog_ld_R" 1>&6
2960   ld_R_works=$pgac_cv_prog_ld_R
2961   
2962 esac
2963 # Extract the first word of "ranlib", so it can be a program name with args.
2964 set dummy ranlib; ac_word=$2
2965 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2966 echo "configure:2966: checking for $ac_word" >&5
2967 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2968   echo $ac_n "(cached) $ac_c" 1>&6
2969 else
2970   if test -n "$RANLIB"; then
2971   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2972 else
2973   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2974   ac_dummy="$PATH"
2975   for ac_dir in $ac_dummy; do
2976     test -z "$ac_dir" && ac_dir=.
2977     if test -f $ac_dir/$ac_word; then
2978       ac_cv_prog_RANLIB="ranlib"
2979       break
2980     fi
2981   done
2982   IFS="$ac_save_ifs"
2983   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2984 fi
2985 fi
2986 RANLIB="$ac_cv_prog_RANLIB"
2987 if test -n "$RANLIB"; then
2988   echo "$ac_t""$RANLIB" 1>&6
2989 else
2990   echo "$ac_t""no" 1>&6
2991 fi
2992
2993 for ac_prog in lorder
2994 do
2995 # Extract the first word of "$ac_prog", so it can be a program name with args.
2996 set dummy $ac_prog; ac_word=$2
2997 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2998 echo "configure:2998: checking for $ac_word" >&5
2999 if eval "test \"`echo '$''{'ac_cv_prog_LORDER'+set}'`\" = set"; then
3000   echo $ac_n "(cached) $ac_c" 1>&6
3001 else
3002   if test -n "$LORDER"; then
3003   ac_cv_prog_LORDER="$LORDER" # Let the user override the test.
3004 else
3005   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3006   ac_dummy="$PATH"
3007   for ac_dir in $ac_dummy; do
3008     test -z "$ac_dir" && ac_dir=.
3009     if test -f $ac_dir/$ac_word; then
3010       ac_cv_prog_LORDER="$ac_prog"
3011       break
3012     fi
3013   done
3014   IFS="$ac_save_ifs"
3015 fi
3016 fi
3017 LORDER="$ac_cv_prog_LORDER"
3018 if test -n "$LORDER"; then
3019   echo "$ac_t""$LORDER" 1>&6
3020 else
3021   echo "$ac_t""no" 1>&6
3022 fi
3023
3024 test -n "$LORDER" && break
3025 done
3026
3027 # Extract the first word of "tar", so it can be a program name with args.
3028 set dummy tar; ac_word=$2
3029 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3030 echo "configure:3030: checking for $ac_word" >&5
3031 if eval "test \"`echo '$''{'ac_cv_path_TAR'+set}'`\" = set"; then
3032   echo $ac_n "(cached) $ac_c" 1>&6
3033 else
3034   case "$TAR" in
3035   /*)
3036   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
3037   ;;
3038   ?:/*)                  
3039   ac_cv_path_TAR="$TAR" # Let the user override the test with a dos path.
3040   ;;
3041   *)
3042   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3043   ac_dummy="$PATH"
3044   for ac_dir in $ac_dummy; do 
3045     test -z "$ac_dir" && ac_dir=.
3046     if test -f $ac_dir/$ac_word; then
3047       ac_cv_path_TAR="$ac_dir/$ac_word"
3048       break
3049     fi
3050   done
3051   IFS="$ac_save_ifs"
3052   ;;
3053 esac
3054 fi
3055 TAR="$ac_cv_path_TAR"
3056 if test -n "$TAR"; then
3057   echo "$ac_t""$TAR" 1>&6
3058 else
3059   echo "$ac_t""no" 1>&6
3060 fi
3061
3062
3063 for ac_prog in 'bison -y'
3064 do
3065 # Extract the first word of "$ac_prog", so it can be a program name with args.
3066 set dummy $ac_prog; ac_word=$2
3067 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3068 echo "configure:3068: checking for $ac_word" >&5
3069 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
3070   echo $ac_n "(cached) $ac_c" 1>&6
3071 else
3072   if test -n "$YACC"; then
3073   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3074 else
3075   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3076   ac_dummy="$PATH"
3077   for ac_dir in $ac_dummy; do
3078     test -z "$ac_dir" && ac_dir=.
3079     if test -f $ac_dir/$ac_word; then
3080       ac_cv_prog_YACC="$ac_prog"
3081       break
3082     fi
3083   done
3084   IFS="$ac_save_ifs"
3085 fi
3086 fi
3087 YACC="$ac_cv_prog_YACC"
3088 if test -n "$YACC"; then
3089   echo "$ac_t""$YACC" 1>&6
3090 else
3091   echo "$ac_t""no" 1>&6
3092 fi
3093
3094 test -n "$YACC" && break
3095 done
3096
3097 if test -z "$YACC"; then
3098   echo "configure: warning: 
3099 *** Without Bison you will not be able to build PostgreSQL from CVS or
3100 *** change any of the parser definition files.  You can obtain Bison from
3101 *** a GNU mirror site.  (If you are using the official distribution of
3102 *** PostgreSQL then you do not need to worry about this because the Bison
3103 *** output is pre-generated.)  To use a different yacc program (possible,
3104 *** but not recommended), set the environment variable YACC before running
3105 *** 'configure'." 1>&2
3106 fi
3107
3108
3109 if test "$with_tk" = yes; then
3110     # Extract the first word of "wish", so it can be a program name with args.
3111 set dummy wish; ac_word=$2
3112 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3113 echo "configure:3113: checking for $ac_word" >&5
3114 if eval "test \"`echo '$''{'ac_cv_path_WISH'+set}'`\" = set"; then
3115   echo $ac_n "(cached) $ac_c" 1>&6
3116 else
3117   case "$WISH" in
3118   /*)
3119   ac_cv_path_WISH="$WISH" # Let the user override the test with a path.
3120   ;;
3121   ?:/*)                  
3122   ac_cv_path_WISH="$WISH" # Let the user override the test with a dos path.
3123   ;;
3124   *)
3125   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3126   ac_dummy="$PATH"
3127   for ac_dir in $ac_dummy; do 
3128     test -z "$ac_dir" && ac_dir=.
3129     if test -f $ac_dir/$ac_word; then
3130       ac_cv_path_WISH="$ac_dir/$ac_word"
3131       break
3132     fi
3133   done
3134   IFS="$ac_save_ifs"
3135   ;;
3136 esac
3137 fi
3138 WISH="$ac_cv_path_WISH"
3139 if test -n "$WISH"; then
3140   echo "$ac_t""$WISH" 1>&6
3141 else
3142   echo "$ac_t""no" 1>&6
3143 fi
3144
3145     test -z "$WISH" && { echo "configure: error: 'wish' is required for Tk support" 1>&2; exit 1; }
3146 fi
3147
3148 # Extract the first word of "perl", so it can be a program name with args.
3149 set dummy perl; ac_word=$2
3150 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3151 echo "configure:3151: checking for $ac_word" >&5
3152 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
3153   echo $ac_n "(cached) $ac_c" 1>&6
3154 else
3155   case "$PERL" in
3156   /*)
3157   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
3158   ;;
3159   ?:/*)                  
3160   ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
3161   ;;
3162   *)
3163   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3164   ac_dummy="$PATH"
3165   for ac_dir in $ac_dummy; do 
3166     test -z "$ac_dir" && ac_dir=.
3167     if test -f $ac_dir/$ac_word; then
3168       ac_cv_path_PERL="$ac_dir/$ac_word"
3169       break
3170     fi
3171   done
3172   IFS="$ac_save_ifs"
3173   ;;
3174 esac
3175 fi
3176 PERL="$ac_cv_path_PERL"
3177 if test -n "$PERL"; then
3178   echo "$ac_t""$PERL" 1>&6
3179 else
3180   echo "$ac_t""no" 1>&6
3181 fi
3182
3183 if test "$with_perl" = yes; then
3184   
3185
3186 echo $ac_n "checking Perl installation directories""... $ac_c" 1>&6
3187 echo "configure:3187: checking Perl installation directories" >&5
3188
3189 # These are the ones we currently need.  Others can be added easily.
3190 perl_installsitearch=`$PERL -MConfig -e 'print $Config{installsitearch}'`
3191 perl_installsitelib=`$PERL -MConfig -e 'print $Config{installsitelib}'`
3192 perl_installman3dir=`$PERL -MConfig -e 'print $Config{installman3dir}'`
3193
3194
3195 echo "$ac_t""done" 1>&6
3196
3197 fi
3198
3199 if test "$with_python" = yes; then
3200   # Extract the first word of "python", so it can be a program name with args.
3201 set dummy python; ac_word=$2
3202 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3203 echo "configure:3203: checking for $ac_word" >&5
3204 if eval "test \"`echo '$''{'ac_cv_path_PYTHON'+set}'`\" = set"; then
3205   echo $ac_n "(cached) $ac_c" 1>&6
3206 else
3207   case "$PYTHON" in
3208   /*)
3209   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
3210   ;;
3211   ?:/*)                  
3212   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a dos path.
3213   ;;
3214   *)
3215   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3216   ac_dummy="$PATH"
3217   for ac_dir in $ac_dummy; do 
3218     test -z "$ac_dir" && ac_dir=.
3219     if test -f $ac_dir/$ac_word; then
3220       ac_cv_path_PYTHON="$ac_dir/$ac_word"
3221       break
3222     fi
3223   done
3224   IFS="$ac_save_ifs"
3225   ;;
3226 esac
3227 fi
3228 PYTHON="$ac_cv_path_PYTHON"
3229 if test -n "$PYTHON"; then
3230   echo "$ac_t""$PYTHON" 1>&6
3231 else
3232   echo "$ac_t""no" 1>&6
3233 fi
3234
3235 if test x"$PYTHON" = x""; then
3236   { echo "configure: error: Python not found" 1>&2; exit 1; }
3237 fi
3238
3239   
3240 echo $ac_n "checking Python installation directories""... $ac_c" 1>&6
3241 echo "configure:3241: checking Python installation directories" >&5
3242 python_version=`${PYTHON} -c "import sys; print sys.version[:3]"`
3243 python_prefix=`${PYTHON} -c "import sys; print sys.prefix"`
3244 python_execprefix=`${PYTHON} -c "import sys; print sys.exec_prefix"`
3245 python_configdir="${python_execprefix}/lib/python${python_version}/config"
3246 python_moduledir="${python_prefix}/lib/python${python_version}/site-packages"
3247 python_moduleexecdir="${python_execprefix}/lib/python${python_version}/site-packages"
3248 python_includespec="-I${python_prefix}/include/python${python_version}"
3249 if test "$python_prefix" != "$python_execprefix"; then
3250   python_includespec="-I${python_execprefix}/include/python${python_version} $python_includespec"
3251 fi
3252
3253 # This should be enough of a message.
3254 if test "$python_prefix" != "$python_execprefix"; then
3255   echo "$ac_t""$python_prefix/lib/python${python_version} and $python_execprefix/lib/python${python_version}" 1>&6
3256 else
3257   echo "$ac_t""$python_prefix/lib/python${python_version}" 1>&6
3258 fi
3259
3260
3261   
3262
3263   
3264 echo $ac_n "checking how to link an embedded Python application""... $ac_c" 1>&6
3265 echo "configure:3265: checking how to link an embedded Python application" >&5
3266
3267 _python_libs=`grep '^LIBS=' $python_configdir/Makefile | sed 's/^.*=//'`
3268 _python_libc=`grep '^LIBC=' $python_configdir/Makefile | sed 's/^.*=//'`
3269 _python_libm=`grep '^LIBM=' $python_configdir/Makefile | sed 's/^.*=//'`
3270 _python_liblocalmod=`grep '^LOCALMODLIBS=' $python_configdir/Makefile | sed 's/^.*=//'`
3271 _python_libbasemod=`grep '^BASEMODLIBS=' $python_configdir/Makefile | sed 's/^.*=//'`
3272
3273 pgac_tab="      " # tab character
3274 python_libspec=`echo X"-L$python_configdir $_python_libs $_python_libc $_python_libm -lpython$python_version $_python_liblocalmod $_python_libbasemod" | sed -e 's/^X//' -e "s/[ $pgac_tab][ $pgac_tab]*/ /g"`
3275
3276 echo "$ac_t""${python_libspec}" 1>&6
3277
3278
3279 fi
3280
3281
3282 ##
3283 ## Libraries
3284 ##
3285
3286
3287 echo $ac_n "checking for readline""... $ac_c" 1>&6
3288 echo "configure:3288: checking for readline" >&5
3289
3290 if eval "test \"`echo '$''{'pgac_cv_check_readline'+set}'`\" = set"; then
3291   echo $ac_n "(cached) $ac_c" 1>&6
3292 else
3293   pgac_cv_check_readline=no
3294 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
3295   for pgac_rllib in -lreadline -ledit ; do
3296     pgac_save_LIBS=$LIBS
3297     LIBS="${pgac_rllib}${pgac_lib} $LIBS"
3298     cat > conftest.$ac_ext <<EOF
3299 #line 3299 "configure"
3300 #include "confdefs.h"
3301 /* Override any gcc2 internal prototype to avoid an error.  */
3302 /* We use char because int might match the return type of a gcc2
3303     builtin and then its argument prototype would still apply.  */
3304 char readline();
3305
3306 int main() {
3307 readline()
3308 ; return 0; }
3309 EOF
3310 if { (eval echo configure:3310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3311   rm -rf conftest*
3312   
3313       # NetBSD and OpenBSD have a broken linker that does not
3314       # recognize dependent libraries
3315       case $host_os in netbsd* | openbsd* )
3316         case $pgac_lib in
3317           *curses*) ;;
3318           *) pgac_lib=" -lcurses" ;;
3319         esac
3320       esac
3321
3322       pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
3323       break 2
3324     
3325 else
3326   echo "configure: failed program was:" >&5
3327   cat conftest.$ac_ext >&5
3328 fi
3329 rm -f conftest*
3330     LIBS=$pgac_save_LIBS
3331   done
3332 done
3333 LIBS=$pgac_save_LIBS
3334
3335 fi
3336
3337 if test "$pgac_cv_check_readline" != no ; then
3338   cat >> confdefs.h <<\EOF
3339 #define HAVE_LIBREADLINE 1
3340 EOF
3341
3342   LIBS="$pgac_cv_check_readline $LIBS"
3343   echo "$ac_t""yes ($pgac_cv_check_readline)" 1>&6
3344 else
3345   echo "$ac_t""no" 1>&6
3346 fi
3347
3348 echo $ac_n "checking for library containing using_history""... $ac_c" 1>&6
3349 echo "configure:3349: checking for library containing using_history" >&5
3350 if eval "test \"`echo '$''{'ac_cv_search_using_history'+set}'`\" = set"; then
3351   echo $ac_n "(cached) $ac_c" 1>&6
3352 else
3353   ac_func_search_save_LIBS="$LIBS"
3354 ac_cv_search_using_history="no"
3355 cat > conftest.$ac_ext <<EOF
3356 #line 3356 "configure"
3357 #include "confdefs.h"
3358 /* Override any gcc2 internal prototype to avoid an error.  */
3359 /* We use char because int might match the return type of a gcc2
3360     builtin and then its argument prototype would still apply.  */
3361 char using_history();
3362
3363 int main() {
3364 using_history()
3365 ; return 0; }
3366 EOF
3367 if { (eval echo configure:3367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3368   rm -rf conftest*
3369   ac_cv_search_using_history="none required"
3370 else
3371   echo "configure: failed program was:" >&5
3372   cat conftest.$ac_ext >&5
3373 fi
3374 rm -f conftest*
3375 test "$ac_cv_search_using_history" = "no" && for i in history; do
3376 LIBS="-l$i  $ac_func_search_save_LIBS"
3377 cat > conftest.$ac_ext <<EOF
3378 #line 3378 "configure"
3379 #include "confdefs.h"
3380 /* Override any gcc2 internal prototype to avoid an error.  */
3381 /* We use char because int might match the return type of a gcc2
3382     builtin and then its argument prototype would still apply.  */
3383 char using_history();
3384
3385 int main() {
3386 using_history()
3387 ; return 0; }
3388 EOF
3389 if { (eval echo configure:3389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3390   rm -rf conftest*
3391   ac_cv_search_using_history="-l$i"
3392 break
3393 else
3394   echo "configure: failed program was:" >&5
3395   cat conftest.$ac_ext >&5
3396 fi
3397 rm -f conftest*
3398 done
3399 LIBS="$ac_func_search_save_LIBS"
3400 fi
3401
3402 echo "$ac_t""$ac_cv_search_using_history" 1>&6
3403 if test "$ac_cv_search_using_history" != "no"; then
3404   test "$ac_cv_search_using_history" = "none required" || LIBS="$ac_cv_search_using_history $LIBS"
3405   cat >> confdefs.h <<\EOF
3406 #define HAVE_HISTORY_FUNCTIONS 1
3407 EOF
3408
3409 else :
3410   
3411 fi
3412
3413 if test "$PORTNAME" != "aix" -a "$PORTNAME" != "alpha"
3414 then
3415         echo $ac_n "checking for main in -lbsd""... $ac_c" 1>&6
3416 echo "configure:3416: checking for main in -lbsd" >&5
3417 ac_lib_var=`echo bsd'_'main | sed 'y%./+-%__p_%'`
3418 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3419   echo $ac_n "(cached) $ac_c" 1>&6
3420 else
3421   ac_save_LIBS="$LIBS"
3422 LIBS="-lbsd  $LIBS"
3423 cat > conftest.$ac_ext <<EOF
3424 #line 3424 "configure"
3425 #include "confdefs.h"
3426
3427 int main() {
3428 main()
3429 ; return 0; }
3430 EOF
3431 if { (eval echo configure:3431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3432   rm -rf conftest*
3433   eval "ac_cv_lib_$ac_lib_var=yes"
3434 else
3435   echo "configure: failed program was:" >&5
3436   cat conftest.$ac_ext >&5
3437   rm -rf conftest*
3438   eval "ac_cv_lib_$ac_lib_var=no"
3439 fi
3440 rm -f conftest*
3441 LIBS="$ac_save_LIBS"
3442
3443 fi
3444 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3445   echo "$ac_t""yes" 1>&6
3446     ac_tr_lib=HAVE_LIB`echo bsd | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3447     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3448   cat >> confdefs.h <<EOF
3449 #define $ac_tr_lib 1
3450 EOF
3451
3452   LIBS="-lbsd $LIBS"
3453
3454 else
3455   echo "$ac_t""no" 1>&6
3456 fi
3457
3458 fi
3459 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
3460 echo "configure:3460: checking for setproctitle in -lutil" >&5
3461 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
3462 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3463   echo $ac_n "(cached) $ac_c" 1>&6
3464 else
3465   ac_save_LIBS="$LIBS"
3466 LIBS="-lutil  $LIBS"
3467 cat > conftest.$ac_ext <<EOF
3468 #line 3468 "configure"
3469 #include "confdefs.h"
3470 /* Override any gcc2 internal prototype to avoid an error.  */
3471 /* We use char because int might match the return type of a gcc2
3472     builtin and then its argument prototype would still apply.  */
3473 char setproctitle();
3474
3475 int main() {
3476 setproctitle()
3477 ; return 0; }
3478 EOF
3479 if { (eval echo configure:3479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3480   rm -rf conftest*
3481   eval "ac_cv_lib_$ac_lib_var=yes"
3482 else
3483   echo "configure: failed program was:" >&5
3484   cat conftest.$ac_ext >&5
3485   rm -rf conftest*
3486   eval "ac_cv_lib_$ac_lib_var=no"
3487 fi
3488 rm -f conftest*
3489 LIBS="$ac_save_LIBS"
3490
3491 fi
3492 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3493   echo "$ac_t""yes" 1>&6
3494     ac_tr_lib=HAVE_LIB`echo util | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3495     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3496   cat >> confdefs.h <<EOF
3497 #define $ac_tr_lib 1
3498 EOF
3499
3500   LIBS="-lutil $LIBS"
3501
3502 else
3503   echo "$ac_t""no" 1>&6
3504 fi
3505
3506 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
3507 echo "configure:3507: checking for main in -lm" >&5
3508 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
3509 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3510   echo $ac_n "(cached) $ac_c" 1>&6
3511 else
3512   ac_save_LIBS="$LIBS"
3513 LIBS="-lm  $LIBS"
3514 cat > conftest.$ac_ext <<EOF
3515 #line 3515 "configure"
3516 #include "confdefs.h"
3517
3518 int main() {
3519 main()
3520 ; return 0; }
3521 EOF
3522 if { (eval echo configure:3522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3523   rm -rf conftest*
3524   eval "ac_cv_lib_$ac_lib_var=yes"
3525 else
3526   echo "configure: failed program was:" >&5
3527   cat conftest.$ac_ext >&5
3528   rm -rf conftest*
3529   eval "ac_cv_lib_$ac_lib_var=no"
3530 fi
3531 rm -f conftest*
3532 LIBS="$ac_save_LIBS"
3533
3534 fi
3535 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3536   echo "$ac_t""yes" 1>&6
3537     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3538     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3539   cat >> confdefs.h <<EOF
3540 #define $ac_tr_lib 1
3541 EOF
3542
3543   LIBS="-lm $LIBS"
3544
3545 else
3546   echo "$ac_t""no" 1>&6
3547 fi
3548
3549 echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
3550 echo "configure:3550: checking for main in -ldl" >&5
3551 ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
3552 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3553   echo $ac_n "(cached) $ac_c" 1>&6
3554 else
3555   ac_save_LIBS="$LIBS"
3556 LIBS="-ldl  $LIBS"
3557 cat > conftest.$ac_ext <<EOF
3558 #line 3558 "configure"
3559 #include "confdefs.h"
3560
3561 int main() {
3562 main()
3563 ; return 0; }
3564 EOF
3565 if { (eval echo configure:3565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3566   rm -rf conftest*
3567   eval "ac_cv_lib_$ac_lib_var=yes"
3568 else
3569   echo "configure: failed program was:" >&5
3570   cat conftest.$ac_ext >&5
3571   rm -rf conftest*
3572   eval "ac_cv_lib_$ac_lib_var=no"
3573 fi
3574 rm -f conftest*
3575 LIBS="$ac_save_LIBS"
3576
3577 fi
3578 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3579   echo "$ac_t""yes" 1>&6
3580     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3581     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3582   cat >> confdefs.h <<EOF
3583 #define $ac_tr_lib 1
3584 EOF
3585
3586   LIBS="-ldl $LIBS"
3587
3588 else
3589   echo "$ac_t""no" 1>&6
3590 fi
3591
3592 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
3593 echo "configure:3593: checking for main in -lsocket" >&5
3594 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
3595 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3596   echo $ac_n "(cached) $ac_c" 1>&6
3597 else
3598   ac_save_LIBS="$LIBS"
3599 LIBS="-lsocket  $LIBS"
3600 cat > conftest.$ac_ext <<EOF
3601 #line 3601 "configure"
3602 #include "confdefs.h"
3603
3604 int main() {
3605 main()
3606 ; return 0; }
3607 EOF
3608 if { (eval echo configure:3608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3609   rm -rf conftest*
3610   eval "ac_cv_lib_$ac_lib_var=yes"
3611 else
3612   echo "configure: failed program was:" >&5
3613   cat conftest.$ac_ext >&5
3614   rm -rf conftest*
3615   eval "ac_cv_lib_$ac_lib_var=no"
3616 fi
3617 rm -f conftest*
3618 LIBS="$ac_save_LIBS"
3619
3620 fi
3621 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3622   echo "$ac_t""yes" 1>&6
3623     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3624     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3625   cat >> confdefs.h <<EOF
3626 #define $ac_tr_lib 1
3627 EOF
3628
3629   LIBS="-lsocket $LIBS"
3630
3631 else
3632   echo "$ac_t""no" 1>&6
3633 fi
3634
3635 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
3636 echo "configure:3636: checking for main in -lnsl" >&5
3637 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
3638 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3639   echo $ac_n "(cached) $ac_c" 1>&6
3640 else
3641   ac_save_LIBS="$LIBS"
3642 LIBS="-lnsl  $LIBS"
3643 cat > conftest.$ac_ext <<EOF
3644 #line 3644 "configure"
3645 #include "confdefs.h"
3646
3647 int main() {
3648 main()
3649 ; return 0; }
3650 EOF
3651 if { (eval echo configure:3651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3652   rm -rf conftest*
3653   eval "ac_cv_lib_$ac_lib_var=yes"
3654 else
3655   echo "configure: failed program was:" >&5
3656   cat conftest.$ac_ext >&5
3657   rm -rf conftest*
3658   eval "ac_cv_lib_$ac_lib_var=no"
3659 fi
3660 rm -f conftest*
3661 LIBS="$ac_save_LIBS"
3662
3663 fi
3664 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3665   echo "$ac_t""yes" 1>&6
3666     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3667     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3668   cat >> confdefs.h <<EOF
3669 #define $ac_tr_lib 1
3670 EOF
3671
3672   LIBS="-lnsl $LIBS"
3673
3674 else
3675   echo "$ac_t""no" 1>&6
3676 fi
3677
3678 echo $ac_n "checking for main in -lipc""... $ac_c" 1>&6
3679 echo "configure:3679: checking for main in -lipc" >&5
3680 ac_lib_var=`echo ipc'_'main | sed 'y%./+-%__p_%'`
3681 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3682   echo $ac_n "(cached) $ac_c" 1>&6
3683 else
3684   ac_save_LIBS="$LIBS"
3685 LIBS="-lipc  $LIBS"
3686 cat > conftest.$ac_ext <<EOF
3687 #line 3687 "configure"
3688 #include "confdefs.h"
3689
3690 int main() {
3691 main()
3692 ; return 0; }
3693 EOF
3694 if { (eval echo configure:3694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3695   rm -rf conftest*
3696   eval "ac_cv_lib_$ac_lib_var=yes"
3697 else
3698   echo "configure: failed program was:" >&5
3699   cat conftest.$ac_ext >&5
3700   rm -rf conftest*
3701   eval "ac_cv_lib_$ac_lib_var=no"
3702 fi
3703 rm -f conftest*
3704 LIBS="$ac_save_LIBS"
3705
3706 fi
3707 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3708   echo "$ac_t""yes" 1>&6
3709     ac_tr_lib=HAVE_LIB`echo ipc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3710     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3711   cat >> confdefs.h <<EOF
3712 #define $ac_tr_lib 1
3713 EOF
3714
3715   LIBS="-lipc $LIBS"
3716
3717 else
3718   echo "$ac_t""no" 1>&6
3719 fi
3720
3721 echo $ac_n "checking for main in -lIPC""... $ac_c" 1>&6
3722 echo "configure:3722: checking for main in -lIPC" >&5
3723 ac_lib_var=`echo IPC'_'main | sed 'y%./+-%__p_%'`
3724 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3725   echo $ac_n "(cached) $ac_c" 1>&6
3726 else
3727   ac_save_LIBS="$LIBS"
3728 LIBS="-lIPC  $LIBS"
3729 cat > conftest.$ac_ext <<EOF
3730 #line 3730 "configure"
3731 #include "confdefs.h"
3732
3733 int main() {
3734 main()
3735 ; return 0; }
3736 EOF
3737 if { (eval echo configure:3737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3738   rm -rf conftest*
3739   eval "ac_cv_lib_$ac_lib_var=yes"
3740 else
3741   echo "configure: failed program was:" >&5
3742   cat conftest.$ac_ext >&5
3743   rm -rf conftest*
3744   eval "ac_cv_lib_$ac_lib_var=no"
3745 fi
3746 rm -f conftest*
3747 LIBS="$ac_save_LIBS"
3748
3749 fi
3750 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3751   echo "$ac_t""yes" 1>&6
3752     ac_tr_lib=HAVE_LIB`echo IPC | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3753     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3754   cat >> confdefs.h <<EOF
3755 #define $ac_tr_lib 1
3756 EOF
3757
3758   LIBS="-lIPC $LIBS"
3759
3760 else
3761   echo "$ac_t""no" 1>&6
3762 fi
3763
3764 echo $ac_n "checking for main in -llc""... $ac_c" 1>&6
3765 echo "configure:3765: checking for main in -llc" >&5
3766 ac_lib_var=`echo lc'_'main | sed 'y%./+-%__p_%'`
3767 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3768   echo $ac_n "(cached) $ac_c" 1>&6
3769 else
3770   ac_save_LIBS="$LIBS"
3771 LIBS="-llc  $LIBS"
3772 cat > conftest.$ac_ext <<EOF
3773 #line 3773 "configure"
3774 #include "confdefs.h"
3775
3776 int main() {
3777 main()
3778 ; return 0; }
3779 EOF
3780 if { (eval echo configure:3780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3781   rm -rf conftest*
3782   eval "ac_cv_lib_$ac_lib_var=yes"
3783 else
3784   echo "configure: failed program was:" >&5
3785   cat conftest.$ac_ext >&5
3786   rm -rf conftest*
3787   eval "ac_cv_lib_$ac_lib_var=no"
3788 fi
3789 rm -f conftest*
3790 LIBS="$ac_save_LIBS"
3791
3792 fi
3793 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3794   echo "$ac_t""yes" 1>&6
3795     ac_tr_lib=HAVE_LIB`echo lc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3796     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3797   cat >> confdefs.h <<EOF
3798 #define $ac_tr_lib 1
3799 EOF
3800
3801   LIBS="-llc $LIBS"
3802
3803 else
3804   echo "$ac_t""no" 1>&6
3805 fi
3806
3807 echo $ac_n "checking for main in -ldld""... $ac_c" 1>&6
3808 echo "configure:3808: checking for main in -ldld" >&5
3809 ac_lib_var=`echo dld'_'main | sed 'y%./+-%__p_%'`
3810 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3811   echo $ac_n "(cached) $ac_c" 1>&6
3812 else
3813   ac_save_LIBS="$LIBS"
3814 LIBS="-ldld  $LIBS"
3815 cat > conftest.$ac_ext <<EOF
3816 #line 3816 "configure"
3817 #include "confdefs.h"
3818
3819 int main() {
3820 main()
3821 ; return 0; }
3822 EOF
3823 if { (eval echo configure:3823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3824   rm -rf conftest*
3825   eval "ac_cv_lib_$ac_lib_var=yes"
3826 else
3827   echo "configure: failed program was:" >&5
3828   cat conftest.$ac_ext >&5
3829   rm -rf conftest*
3830   eval "ac_cv_lib_$ac_lib_var=no"
3831 fi
3832 rm -f conftest*
3833 LIBS="$ac_save_LIBS"
3834
3835 fi
3836 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3837   echo "$ac_t""yes" 1>&6
3838     ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3839     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3840   cat >> confdefs.h <<EOF
3841 #define $ac_tr_lib 1
3842 EOF
3843
3844   LIBS="-ldld $LIBS"
3845
3846 else
3847   echo "$ac_t""no" 1>&6
3848 fi
3849
3850 echo $ac_n "checking for main in -lld""... $ac_c" 1>&6
3851 echo "configure:3851: checking for main in -lld" >&5
3852 ac_lib_var=`echo ld'_'main | sed 'y%./+-%__p_%'`
3853 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3854   echo $ac_n "(cached) $ac_c" 1>&6
3855 else
3856   ac_save_LIBS="$LIBS"
3857 LIBS="-lld  $LIBS"
3858 cat > conftest.$ac_ext <<EOF
3859 #line 3859 "configure"
3860 #include "confdefs.h"
3861
3862 int main() {
3863 main()
3864 ; return 0; }
3865 EOF
3866 if { (eval echo configure:3866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3867   rm -rf conftest*
3868   eval "ac_cv_lib_$ac_lib_var=yes"
3869 else
3870   echo "configure: failed program was:" >&5
3871   cat conftest.$ac_ext >&5
3872   rm -rf conftest*
3873   eval "ac_cv_lib_$ac_lib_var=no"
3874 fi
3875 rm -f conftest*
3876 LIBS="$ac_save_LIBS"
3877
3878 fi
3879 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3880   echo "$ac_t""yes" 1>&6
3881     ac_tr_lib=HAVE_LIB`echo ld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3882     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3883   cat >> confdefs.h <<EOF
3884 #define $ac_tr_lib 1
3885 EOF
3886
3887   LIBS="-lld $LIBS"
3888
3889 else
3890   echo "$ac_t""no" 1>&6
3891 fi
3892
3893 echo $ac_n "checking for main in -lcompat""... $ac_c" 1>&6
3894 echo "configure:3894: checking for main in -lcompat" >&5
3895 ac_lib_var=`echo compat'_'main | sed 'y%./+-%__p_%'`
3896 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3897   echo $ac_n "(cached) $ac_c" 1>&6
3898 else
3899   ac_save_LIBS="$LIBS"
3900 LIBS="-lcompat  $LIBS"
3901 cat > conftest.$ac_ext <<EOF
3902 #line 3902 "configure"
3903 #include "confdefs.h"
3904
3905 int main() {
3906 main()
3907 ; return 0; }
3908 EOF
3909 if { (eval echo configure:3909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3910   rm -rf conftest*
3911   eval "ac_cv_lib_$ac_lib_var=yes"
3912 else
3913   echo "configure: failed program was:" >&5
3914   cat conftest.$ac_ext >&5
3915   rm -rf conftest*
3916   eval "ac_cv_lib_$ac_lib_var=no"
3917 fi
3918 rm -f conftest*
3919 LIBS="$ac_save_LIBS"
3920
3921 fi
3922 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3923   echo "$ac_t""yes" 1>&6
3924     ac_tr_lib=HAVE_LIB`echo compat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3925     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3926   cat >> confdefs.h <<EOF
3927 #define $ac_tr_lib 1
3928 EOF
3929
3930   LIBS="-lcompat $LIBS"
3931
3932 else
3933   echo "$ac_t""no" 1>&6
3934 fi
3935
3936 echo $ac_n "checking for main in -lBSD""... $ac_c" 1>&6
3937 echo "configure:3937: checking for main in -lBSD" >&5
3938 ac_lib_var=`echo BSD'_'main | sed 'y%./+-%__p_%'`
3939 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3940   echo $ac_n "(cached) $ac_c" 1>&6
3941 else
3942   ac_save_LIBS="$LIBS"
3943 LIBS="-lBSD  $LIBS"
3944 cat > conftest.$ac_ext <<EOF
3945 #line 3945 "configure"
3946 #include "confdefs.h"
3947
3948 int main() {
3949 main()
3950 ; return 0; }
3951 EOF
3952 if { (eval echo configure:3952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3953   rm -rf conftest*
3954   eval "ac_cv_lib_$ac_lib_var=yes"
3955 else
3956   echo "configure: failed program was:" >&5
3957   cat conftest.$ac_ext >&5
3958   rm -rf conftest*
3959   eval "ac_cv_lib_$ac_lib_var=no"
3960 fi
3961 rm -f conftest*
3962 LIBS="$ac_save_LIBS"
3963
3964 fi
3965 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3966   echo "$ac_t""yes" 1>&6
3967     ac_tr_lib=HAVE_LIB`echo BSD | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3968     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3969   cat >> confdefs.h <<EOF
3970 #define $ac_tr_lib 1
3971 EOF
3972
3973   LIBS="-lBSD $LIBS"
3974
3975 else
3976   echo "$ac_t""no" 1>&6
3977 fi
3978
3979 echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
3980 echo "configure:3980: checking for main in -lgen" >&5
3981 ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'`
3982 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3983   echo $ac_n "(cached) $ac_c" 1>&6
3984 else
3985   ac_save_LIBS="$LIBS"
3986 LIBS="-lgen  $LIBS"
3987 cat > conftest.$ac_ext <<EOF
3988 #line 3988 "configure"
3989 #include "confdefs.h"
3990
3991 int main() {
3992 main()
3993 ; return 0; }
3994 EOF
3995 if { (eval echo configure:3995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3996   rm -rf conftest*
3997   eval "ac_cv_lib_$ac_lib_var=yes"
3998 else
3999   echo "configure: failed program was:" >&5
4000   cat conftest.$ac_ext >&5
4001   rm -rf conftest*
4002   eval "ac_cv_lib_$ac_lib_var=no"
4003 fi
4004 rm -f conftest*
4005 LIBS="$ac_save_LIBS"
4006
4007 fi
4008 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4009   echo "$ac_t""yes" 1>&6
4010     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4011     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4012   cat >> confdefs.h <<EOF
4013 #define $ac_tr_lib 1
4014 EOF
4015
4016   LIBS="-lgen $LIBS"
4017
4018 else
4019   echo "$ac_t""no" 1>&6
4020 fi
4021
4022 echo $ac_n "checking for main in -lPW""... $ac_c" 1>&6
4023 echo "configure:4023: checking for main in -lPW" >&5
4024 ac_lib_var=`echo PW'_'main | sed 'y%./+-%__p_%'`
4025 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4026   echo $ac_n "(cached) $ac_c" 1>&6
4027 else
4028   ac_save_LIBS="$LIBS"
4029 LIBS="-lPW  $LIBS"
4030 cat > conftest.$ac_ext <<EOF
4031 #line 4031 "configure"
4032 #include "confdefs.h"
4033
4034 int main() {
4035 main()
4036 ; return 0; }
4037 EOF
4038 if { (eval echo configure:4038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4039   rm -rf conftest*
4040   eval "ac_cv_lib_$ac_lib_var=yes"
4041 else
4042   echo "configure: failed program was:" >&5
4043   cat conftest.$ac_ext >&5
4044   rm -rf conftest*
4045   eval "ac_cv_lib_$ac_lib_var=no"
4046 fi
4047 rm -f conftest*
4048 LIBS="$ac_save_LIBS"
4049
4050 fi
4051 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4052   echo "$ac_t""yes" 1>&6
4053     ac_tr_lib=HAVE_LIB`echo PW | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4054     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4055   cat >> confdefs.h <<EOF
4056 #define $ac_tr_lib 1
4057 EOF
4058
4059   LIBS="-lPW $LIBS"
4060
4061 else
4062   echo "$ac_t""no" 1>&6
4063 fi
4064
4065 echo $ac_n "checking for main in -lresolv""... $ac_c" 1>&6
4066 echo "configure:4066: checking for main in -lresolv" >&5
4067 ac_lib_var=`echo resolv'_'main | sed 'y%./+-%__p_%'`
4068 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4069   echo $ac_n "(cached) $ac_c" 1>&6
4070 else
4071   ac_save_LIBS="$LIBS"
4072 LIBS="-lresolv  $LIBS"
4073 cat > conftest.$ac_ext <<EOF
4074 #line 4074 "configure"
4075 #include "confdefs.h"
4076
4077 int main() {
4078 main()
4079 ; return 0; }
4080 EOF
4081 if { (eval echo configure:4081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4082   rm -rf conftest*
4083   eval "ac_cv_lib_$ac_lib_var=yes"
4084 else
4085   echo "configure: failed program was:" >&5
4086   cat conftest.$ac_ext >&5
4087   rm -rf conftest*
4088   eval "ac_cv_lib_$ac_lib_var=no"
4089 fi
4090 rm -f conftest*
4091 LIBS="$ac_save_LIBS"
4092
4093 fi
4094 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4095   echo "$ac_t""yes" 1>&6
4096     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4097     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4098   cat >> confdefs.h <<EOF
4099 #define $ac_tr_lib 1
4100 EOF
4101
4102   LIBS="-lresolv $LIBS"
4103
4104 else
4105   echo "$ac_t""no" 1>&6
4106 fi
4107
4108 # QNX:
4109 echo $ac_n "checking for main in -lunix""... $ac_c" 1>&6
4110 echo "configure:4110: checking for main in -lunix" >&5
4111 ac_lib_var=`echo unix'_'main | sed 'y%./+-%__p_%'`
4112 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4113   echo $ac_n "(cached) $ac_c" 1>&6
4114 else
4115   ac_save_LIBS="$LIBS"
4116 LIBS="-lunix  $LIBS"
4117 cat > conftest.$ac_ext <<EOF
4118 #line 4118 "configure"
4119 #include "confdefs.h"
4120
4121 int main() {
4122 main()
4123 ; return 0; }
4124 EOF
4125 if { (eval echo configure:4125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4126   rm -rf conftest*
4127   eval "ac_cv_lib_$ac_lib_var=yes"
4128 else
4129   echo "configure: failed program was:" >&5
4130   cat conftest.$ac_ext >&5
4131   rm -rf conftest*
4132   eval "ac_cv_lib_$ac_lib_var=no"
4133 fi
4134 rm -f conftest*
4135 LIBS="$ac_save_LIBS"
4136
4137 fi
4138 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4139   echo "$ac_t""yes" 1>&6
4140     ac_tr_lib=HAVE_LIB`echo [unix] | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4141     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4142   cat >> confdefs.h <<EOF
4143 #define $ac_tr_lib 1
4144 EOF
4145
4146   LIBS="-lunix $LIBS"
4147
4148 else
4149   echo "$ac_t""no" 1>&6
4150 fi
4151
4152
4153 echo $ac_n "checking for library containing crypt""... $ac_c" 1>&6
4154 echo "configure:4154: checking for library containing crypt" >&5
4155 if eval "test \"`echo '$''{'ac_cv_search_crypt'+set}'`\" = set"; then
4156   echo $ac_n "(cached) $ac_c" 1>&6
4157 else
4158   ac_func_search_save_LIBS="$LIBS"
4159 ac_cv_search_crypt="no"
4160 cat > conftest.$ac_ext <<EOF
4161 #line 4161 "configure"
4162 #include "confdefs.h"
4163 /* Override any gcc2 internal prototype to avoid an error.  */
4164 /* We use char because int might match the return type of a gcc2
4165     builtin and then its argument prototype would still apply.  */
4166 char crypt();
4167
4168 int main() {
4169 crypt()
4170 ; return 0; }
4171 EOF
4172 if { (eval echo configure:4172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4173   rm -rf conftest*
4174   ac_cv_search_crypt="none required"
4175 else
4176   echo "configure: failed program was:" >&5
4177   cat conftest.$ac_ext >&5
4178 fi
4179 rm -f conftest*
4180 test "$ac_cv_search_crypt" = "no" && for i in crypt; do
4181 LIBS="-l$i  $ac_func_search_save_LIBS"
4182 cat > conftest.$ac_ext <<EOF
4183 #line 4183 "configure"
4184 #include "confdefs.h"
4185 /* Override any gcc2 internal prototype to avoid an error.  */
4186 /* We use char because int might match the return type of a gcc2
4187     builtin and then its argument prototype would still apply.  */
4188 char crypt();
4189
4190 int main() {
4191 crypt()
4192 ; return 0; }
4193 EOF
4194 if { (eval echo configure:4194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4195   rm -rf conftest*
4196   ac_cv_search_crypt="-l$i"
4197 break
4198 else
4199   echo "configure: failed program was:" >&5
4200   cat conftest.$ac_ext >&5
4201 fi
4202 rm -f conftest*
4203 done
4204 LIBS="$ac_func_search_save_LIBS"
4205 fi
4206
4207 echo "$ac_t""$ac_cv_search_crypt" 1>&6
4208 if test "$ac_cv_search_crypt" != "no"; then
4209   test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"
4210   
4211 else :
4212   
4213 fi
4214 # BeOS:
4215 echo $ac_n "checking for __inet_ntoa in -lbind""... $ac_c" 1>&6
4216 echo "configure:4216: checking for __inet_ntoa in -lbind" >&5
4217 ac_lib_var=`echo bind'_'__inet_ntoa | sed 'y%./+-%__p_%'`
4218 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4219   echo $ac_n "(cached) $ac_c" 1>&6
4220 else
4221   ac_save_LIBS="$LIBS"
4222 LIBS="-lbind  $LIBS"
4223 cat > conftest.$ac_ext <<EOF
4224 #line 4224 "configure"
4225 #include "confdefs.h"
4226 /* Override any gcc2 internal prototype to avoid an error.  */
4227 /* We use char because int might match the return type of a gcc2
4228     builtin and then its argument prototype would still apply.  */
4229 char __inet_ntoa();
4230
4231 int main() {
4232 __inet_ntoa()
4233 ; return 0; }
4234 EOF
4235 if { (eval echo configure:4235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4236   rm -rf conftest*
4237   eval "ac_cv_lib_$ac_lib_var=yes"
4238 else
4239   echo "configure: failed program was:" >&5
4240   cat conftest.$ac_ext >&5
4241   rm -rf conftest*
4242   eval "ac_cv_lib_$ac_lib_var=no"
4243 fi
4244 rm -f conftest*
4245 LIBS="$ac_save_LIBS"
4246
4247 fi
4248 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4249   echo "$ac_t""yes" 1>&6
4250     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4251     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4252   cat >> confdefs.h <<EOF
4253 #define $ac_tr_lib 1
4254 EOF
4255
4256   LIBS="-lbind $LIBS"
4257
4258 else
4259   echo "$ac_t""no" 1>&6
4260 fi
4261
4262 # Only consider libz to be present if we find <zlib.h> as well;
4263 # furthermore, check that <zlib.h> defines z_streamp (versions before
4264 # about 1.0.4 did not).  While we could work around the lack of z_streamp,
4265 # it seems unwise to encourage people to use such old zlib versions...
4266 cat > conftest.$ac_ext <<EOF
4267 #line 4267 "configure"
4268 #include "confdefs.h"
4269 #include <zlib.h>
4270 EOF
4271 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4272   egrep "z_streamp" >/dev/null 2>&1; then
4273   rm -rf conftest*
4274   
4275 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
4276 echo "configure:4276: checking for inflate in -lz" >&5
4277 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
4278 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4279   echo $ac_n "(cached) $ac_c" 1>&6
4280 else
4281   ac_save_LIBS="$LIBS"
4282 LIBS="-lz  $LIBS"
4283 cat > conftest.$ac_ext <<EOF
4284 #line 4284 "configure"
4285 #include "confdefs.h"
4286 /* Override any gcc2 internal prototype to avoid an error.  */
4287 /* We use char because int might match the return type of a gcc2
4288     builtin and then its argument prototype would still apply.  */
4289 char inflate();
4290
4291 int main() {
4292 inflate()
4293 ; return 0; }
4294 EOF
4295 if { (eval echo configure:4295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4296   rm -rf conftest*
4297   eval "ac_cv_lib_$ac_lib_var=yes"
4298 else
4299   echo "configure: failed program was:" >&5
4300   cat conftest.$ac_ext >&5
4301   rm -rf conftest*
4302   eval "ac_cv_lib_$ac_lib_var=no"
4303 fi
4304 rm -f conftest*
4305 LIBS="$ac_save_LIBS"
4306
4307 fi
4308 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4309   echo "$ac_t""yes" 1>&6
4310     ac_tr_lib=HAVE_LIB`echo z | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4311     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4312   cat >> confdefs.h <<EOF
4313 #define $ac_tr_lib 1
4314 EOF
4315
4316   LIBS="-lz $LIBS"
4317
4318 else
4319   echo "$ac_t""no" 1>&6
4320 fi
4321
4322
4323 fi
4324 rm -f conftest*
4325
4326 # Solaris:
4327
4328 echo $ac_n "checking for library containing fdatasync""... $ac_c" 1>&6
4329 echo "configure:4329: checking for library containing fdatasync" >&5
4330 if eval "test \"`echo '$''{'ac_cv_search_fdatasync'+set}'`\" = set"; then
4331   echo $ac_n "(cached) $ac_c" 1>&6
4332 else
4333   ac_func_search_save_LIBS="$LIBS"
4334 ac_cv_search_fdatasync="no"
4335 cat > conftest.$ac_ext <<EOF
4336 #line 4336 "configure"
4337 #include "confdefs.h"
4338 /* Override any gcc2 internal prototype to avoid an error.  */
4339 /* We use char because int might match the return type of a gcc2
4340     builtin and then its argument prototype would still apply.  */
4341 char fdatasync();
4342
4343 int main() {
4344 fdatasync()
4345 ; return 0; }
4346 EOF
4347 if { (eval echo configure:4347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4348   rm -rf conftest*
4349   ac_cv_search_fdatasync="none required"
4350 else
4351   echo "configure: failed program was:" >&5
4352   cat conftest.$ac_ext >&5
4353 fi
4354 rm -f conftest*
4355 test "$ac_cv_search_fdatasync" = "no" && for i in rt posix4; do
4356 LIBS="-l$i  $ac_func_search_save_LIBS"
4357 cat > conftest.$ac_ext <<EOF
4358 #line 4358 "configure"
4359 #include "confdefs.h"
4360 /* Override any gcc2 internal prototype to avoid an error.  */
4361 /* We use char because int might match the return type of a gcc2
4362     builtin and then its argument prototype would still apply.  */
4363 char fdatasync();
4364
4365 int main() {
4366 fdatasync()
4367 ; return 0; }
4368 EOF
4369 if { (eval echo configure:4369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4370   rm -rf conftest*
4371   ac_cv_search_fdatasync="-l$i"
4372 break
4373 else
4374   echo "configure: failed program was:" >&5
4375   cat conftest.$ac_ext >&5
4376 fi
4377 rm -f conftest*
4378 done
4379 LIBS="$ac_func_search_save_LIBS"
4380 fi
4381
4382 echo "$ac_t""$ac_cv_search_fdatasync" 1>&6
4383 if test "$ac_cv_search_fdatasync" != "no"; then
4384   test "$ac_cv_search_fdatasync" = "none required" || LIBS="$ac_cv_search_fdatasync $LIBS"
4385   
4386 else :
4387   
4388 fi
4389
4390 if test "$with_krb4" = yes ; then
4391   echo $ac_n "checking for des_encrypt in -ldes""... $ac_c" 1>&6
4392 echo "configure:4392: checking for des_encrypt in -ldes" >&5
4393 ac_lib_var=`echo des'_'des_encrypt | sed 'y%./+-%__p_%'`
4394 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4395   echo $ac_n "(cached) $ac_c" 1>&6
4396 else
4397   ac_save_LIBS="$LIBS"
4398 LIBS="-ldes  $LIBS"
4399 cat > conftest.$ac_ext <<EOF
4400 #line 4400 "configure"
4401 #include "confdefs.h"
4402 /* Override any gcc2 internal prototype to avoid an error.  */
4403 /* We use char because int might match the return type of a gcc2
4404     builtin and then its argument prototype would still apply.  */
4405 char des_encrypt();
4406
4407 int main() {
4408 des_encrypt()
4409 ; return 0; }
4410 EOF
4411 if { (eval echo configure:4411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4412   rm -rf conftest*
4413   eval "ac_cv_lib_$ac_lib_var=yes"
4414 else
4415   echo "configure: failed program was:" >&5
4416   cat conftest.$ac_ext >&5
4417   rm -rf conftest*
4418   eval "ac_cv_lib_$ac_lib_var=no"
4419 fi
4420 rm -f conftest*
4421 LIBS="$ac_save_LIBS"
4422
4423 fi
4424 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4425   echo "$ac_t""yes" 1>&6
4426     ac_tr_lib=HAVE_LIB`echo des | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4427     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4428   cat >> confdefs.h <<EOF
4429 #define $ac_tr_lib 1
4430 EOF
4431
4432   LIBS="-ldes $LIBS"
4433
4434 else
4435   echo "$ac_t""no" 1>&6
4436 { echo "configure: error: library 'des' is required for Kerberos 4" 1>&2; exit 1; }
4437 fi
4438
4439   echo $ac_n "checking for krb_sendauth in -lkrb""... $ac_c" 1>&6
4440 echo "configure:4440: checking for krb_sendauth in -lkrb" >&5
4441 ac_lib_var=`echo krb'_'krb_sendauth | sed 'y%./+-%__p_%'`
4442 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4443   echo $ac_n "(cached) $ac_c" 1>&6
4444 else
4445   ac_save_LIBS="$LIBS"
4446 LIBS="-lkrb  $LIBS"
4447 cat > conftest.$ac_ext <<EOF
4448 #line 4448 "configure"
4449 #include "confdefs.h"
4450 /* Override any gcc2 internal prototype to avoid an error.  */
4451 /* We use char because int might match the return type of a gcc2
4452     builtin and then its argument prototype would still apply.  */
4453 char krb_sendauth();
4454
4455 int main() {
4456 krb_sendauth()
4457 ; return 0; }
4458 EOF
4459 if { (eval echo configure:4459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4460   rm -rf conftest*
4461   eval "ac_cv_lib_$ac_lib_var=yes"
4462 else
4463   echo "configure: failed program was:" >&5
4464   cat conftest.$ac_ext >&5
4465   rm -rf conftest*
4466   eval "ac_cv_lib_$ac_lib_var=no"
4467 fi
4468 rm -f conftest*
4469 LIBS="$ac_save_LIBS"
4470
4471 fi
4472 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4473   echo "$ac_t""yes" 1>&6
4474     ac_tr_lib=HAVE_LIB`echo krb | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4475     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4476   cat >> confdefs.h <<EOF
4477 #define $ac_tr_lib 1
4478 EOF
4479
4480   LIBS="-lkrb $LIBS"
4481
4482 else
4483   echo "$ac_t""no" 1>&6
4484 { echo "configure: error: library 'krb' is required for Kerberos 4" 1>&2; exit 1; }
4485 fi
4486
4487 fi
4488
4489 if test "$with_krb5" = yes ; then
4490   
4491 echo $ac_n "checking for library containing com_err""... $ac_c" 1>&6
4492 echo "configure:4492: checking for library containing com_err" >&5
4493 if eval "test \"`echo '$''{'ac_cv_search_com_err'+set}'`\" = set"; then
4494   echo $ac_n "(cached) $ac_c" 1>&6
4495 else
4496   ac_func_search_save_LIBS="$LIBS"
4497 ac_cv_search_com_err="no"
4498 cat > conftest.$ac_ext <<EOF
4499 #line 4499 "configure"
4500 #include "confdefs.h"
4501 /* Override any gcc2 internal prototype to avoid an error.  */
4502 /* We use char because int might match the return type of a gcc2
4503     builtin and then its argument prototype would still apply.  */
4504 char com_err();
4505
4506 int main() {
4507 com_err()
4508 ; return 0; }
4509 EOF
4510 if { (eval echo configure:4510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4511   rm -rf conftest*
4512   ac_cv_search_com_err="none required"
4513 else
4514   echo "configure: failed program was:" >&5
4515   cat conftest.$ac_ext >&5
4516 fi
4517 rm -f conftest*
4518 test "$ac_cv_search_com_err" = "no" && for i in krb5 'krb5 -ldes -lasn1 -lroken' com_err; do
4519 LIBS="-l$i  $ac_func_search_save_LIBS"
4520 cat > conftest.$ac_ext <<EOF
4521 #line 4521 "configure"
4522 #include "confdefs.h"
4523 /* Override any gcc2 internal prototype to avoid an error.  */
4524 /* We use char because int might match the return type of a gcc2
4525     builtin and then its argument prototype would still apply.  */
4526 char com_err();
4527
4528 int main() {
4529 com_err()
4530 ; return 0; }
4531 EOF
4532 if { (eval echo configure:4532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4533   rm -rf conftest*
4534   ac_cv_search_com_err="-l$i"
4535 break
4536 else
4537   echo "configure: failed program was:" >&5
4538   cat conftest.$ac_ext >&5
4539 fi
4540 rm -f conftest*
4541 done
4542 LIBS="$ac_func_search_save_LIBS"
4543 fi
4544
4545 echo "$ac_t""$ac_cv_search_com_err" 1>&6
4546 if test "$ac_cv_search_com_err" != "no"; then
4547   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
4548   
4549 else :
4550   { echo "configure: error: could not find function 'com_err' required for Kerberos 5" 1>&2; exit 1; }
4551 fi
4552   
4553 echo $ac_n "checking for library containing krb5_encrypt""... $ac_c" 1>&6
4554 echo "configure:4554: checking for library containing krb5_encrypt" >&5
4555 if eval "test \"`echo '$''{'ac_cv_search_krb5_encrypt'+set}'`\" = set"; then
4556   echo $ac_n "(cached) $ac_c" 1>&6
4557 else
4558   ac_func_search_save_LIBS="$LIBS"
4559 ac_cv_search_krb5_encrypt="no"
4560 cat > conftest.$ac_ext <<EOF
4561 #line 4561 "configure"
4562 #include "confdefs.h"
4563 /* Override any gcc2 internal prototype to avoid an error.  */
4564 /* We use char because int might match the return type of a gcc2
4565     builtin and then its argument prototype would still apply.  */
4566 char krb5_encrypt();
4567
4568 int main() {
4569 krb5_encrypt()
4570 ; return 0; }
4571 EOF
4572 if { (eval echo configure:4572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4573   rm -rf conftest*
4574   ac_cv_search_krb5_encrypt="none required"
4575 else
4576   echo "configure: failed program was:" >&5
4577   cat conftest.$ac_ext >&5
4578 fi
4579 rm -f conftest*
4580 test "$ac_cv_search_krb5_encrypt" = "no" && for i in krb5 'krb5 -ldes -lasn1 -lroken' crypto k5crypto; do
4581 LIBS="-l$i  $ac_func_search_save_LIBS"
4582 cat > conftest.$ac_ext <<EOF
4583 #line 4583 "configure"
4584 #include "confdefs.h"
4585 /* Override any gcc2 internal prototype to avoid an error.  */
4586 /* We use char because int might match the return type of a gcc2
4587     builtin and then its argument prototype would still apply.  */
4588 char krb5_encrypt();
4589
4590 int main() {
4591 krb5_encrypt()
4592 ; return 0; }
4593 EOF
4594 if { (eval echo configure:4594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4595   rm -rf conftest*
4596   ac_cv_search_krb5_encrypt="-l$i"
4597 break
4598 else
4599   echo "configure: failed program was:" >&5
4600   cat conftest.$ac_ext >&5
4601 fi
4602 rm -f conftest*
4603 done
4604 LIBS="$ac_func_search_save_LIBS"
4605 fi
4606
4607 echo "$ac_t""$ac_cv_search_krb5_encrypt" 1>&6
4608 if test "$ac_cv_search_krb5_encrypt" != "no"; then
4609   test "$ac_cv_search_krb5_encrypt" = "none required" || LIBS="$ac_cv_search_krb5_encrypt $LIBS"
4610   
4611 else :
4612   { echo "configure: error: could not find function 'krb5_encrypt' required for Kerberos 5" 1>&2; exit 1; }
4613 fi
4614   
4615 echo $ac_n "checking for library containing krb5_sendauth""... $ac_c" 1>&6
4616 echo "configure:4616: checking for library containing krb5_sendauth" >&5
4617 if eval "test \"`echo '$''{'ac_cv_search_krb5_sendauth'+set}'`\" = set"; then
4618   echo $ac_n "(cached) $ac_c" 1>&6
4619 else
4620   ac_func_search_save_LIBS="$LIBS"
4621 ac_cv_search_krb5_sendauth="no"
4622 cat > conftest.$ac_ext <<EOF
4623 #line 4623 "configure"
4624 #include "confdefs.h"
4625 /* Override any gcc2 internal prototype to avoid an error.  */
4626 /* We use char because int might match the return type of a gcc2
4627     builtin and then its argument prototype would still apply.  */
4628 char krb5_sendauth();
4629
4630 int main() {
4631 krb5_sendauth()
4632 ; return 0; }
4633 EOF
4634 if { (eval echo configure:4634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4635   rm -rf conftest*
4636   ac_cv_search_krb5_sendauth="none required"
4637 else
4638   echo "configure: failed program was:" >&5
4639   cat conftest.$ac_ext >&5
4640 fi
4641 rm -f conftest*
4642 test "$ac_cv_search_krb5_sendauth" = "no" && for i in krb5 'krb5 -ldes -lasn1 -lroken'; do
4643 LIBS="-l$i  $ac_func_search_save_LIBS"
4644 cat > conftest.$ac_ext <<EOF
4645 #line 4645 "configure"
4646 #include "confdefs.h"
4647 /* Override any gcc2 internal prototype to avoid an error.  */
4648 /* We use char because int might match the return type of a gcc2
4649     builtin and then its argument prototype would still apply.  */
4650 char krb5_sendauth();
4651
4652 int main() {
4653 krb5_sendauth()
4654 ; return 0; }
4655 EOF
4656 if { (eval echo configure:4656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4657   rm -rf conftest*
4658   ac_cv_search_krb5_sendauth="-l$i"
4659 break
4660 else
4661   echo "configure: failed program was:" >&5
4662   cat conftest.$ac_ext >&5
4663 fi
4664 rm -f conftest*
4665 done
4666 LIBS="$ac_func_search_save_LIBS"
4667 fi
4668
4669 echo "$ac_t""$ac_cv_search_krb5_sendauth" 1>&6
4670 if test "$ac_cv_search_krb5_sendauth" != "no"; then
4671   test "$ac_cv_search_krb5_sendauth" = "none required" || LIBS="$ac_cv_search_krb5_sendauth $LIBS"
4672   
4673 else :
4674   { echo "configure: error: could not find function 'krb5_sendauth' required for Kerberos 5" 1>&2; exit 1; }
4675 fi
4676 fi
4677
4678 if test "$with_openssl" = yes ; then
4679     echo $ac_n "checking for CRYPTO_new_ex_data in -lcrypto""... $ac_c" 1>&6
4680 echo "configure:4680: checking for CRYPTO_new_ex_data in -lcrypto" >&5
4681 ac_lib_var=`echo crypto'_'CRYPTO_new_ex_data | sed 'y%./+-%__p_%'`
4682 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4683   echo $ac_n "(cached) $ac_c" 1>&6
4684 else
4685   ac_save_LIBS="$LIBS"
4686 LIBS="-lcrypto  $LIBS"
4687 cat > conftest.$ac_ext <<EOF
4688 #line 4688 "configure"
4689 #include "confdefs.h"
4690 /* Override any gcc2 internal prototype to avoid an error.  */
4691 /* We use char because int might match the return type of a gcc2
4692     builtin and then its argument prototype would still apply.  */
4693 char CRYPTO_new_ex_data();
4694
4695 int main() {
4696 CRYPTO_new_ex_data()
4697 ; return 0; }
4698 EOF
4699 if { (eval echo configure:4699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4700   rm -rf conftest*
4701   eval "ac_cv_lib_$ac_lib_var=yes"
4702 else
4703   echo "configure: failed program was:" >&5
4704   cat conftest.$ac_ext >&5
4705   rm -rf conftest*
4706   eval "ac_cv_lib_$ac_lib_var=no"
4707 fi
4708 rm -f conftest*
4709 LIBS="$ac_save_LIBS"
4710
4711 fi
4712 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4713   echo "$ac_t""yes" 1>&6
4714     ac_tr_lib=HAVE_LIB`echo crypto | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4715     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4716   cat >> confdefs.h <<EOF
4717 #define $ac_tr_lib 1
4718 EOF
4719
4720   LIBS="-lcrypto $LIBS"
4721
4722 else
4723   echo "$ac_t""no" 1>&6
4724 { echo "configure: error: library 'crypto' is required for OpenSSL" 1>&2; exit 1; }
4725 fi
4726
4727   echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
4728 echo "configure:4728: checking for SSL_library_init in -lssl" >&5
4729 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-%__p_%'`
4730 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4731   echo $ac_n "(cached) $ac_c" 1>&6
4732 else
4733   ac_save_LIBS="$LIBS"
4734 LIBS="-lssl  $LIBS"
4735 cat > conftest.$ac_ext <<EOF
4736 #line 4736 "configure"
4737 #include "confdefs.h"
4738 /* Override any gcc2 internal prototype to avoid an error.  */
4739 /* We use char because int might match the return type of a gcc2
4740     builtin and then its argument prototype would still apply.  */
4741 char SSL_library_init();
4742
4743 int main() {
4744 SSL_library_init()
4745 ; return 0; }
4746 EOF
4747 if { (eval echo configure:4747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4748   rm -rf conftest*
4749   eval "ac_cv_lib_$ac_lib_var=yes"
4750 else
4751   echo "configure: failed program was:" >&5
4752   cat conftest.$ac_ext >&5
4753   rm -rf conftest*
4754   eval "ac_cv_lib_$ac_lib_var=no"
4755 fi
4756 rm -f conftest*
4757 LIBS="$ac_save_LIBS"
4758
4759 fi
4760 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4761   echo "$ac_t""yes" 1>&6
4762     ac_tr_lib=HAVE_LIB`echo ssl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4763     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4764   cat >> confdefs.h <<EOF
4765 #define $ac_tr_lib 1
4766 EOF
4767
4768   LIBS="-lssl $LIBS"
4769
4770 else
4771   echo "$ac_t""no" 1>&6
4772 { echo "configure: error: library 'ssl' is required for OpenSSL" 1>&2; exit 1; }
4773 fi
4774
4775 fi
4776
4777 if test "$with_pam" = yes ; then
4778   echo $ac_n "checking for pam_start in -lpam""... $ac_c" 1>&6
4779 echo "configure:4779: checking for pam_start in -lpam" >&5
4780 ac_lib_var=`echo pam'_'pam_start | sed 'y%./+-%__p_%'`
4781 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4782   echo $ac_n "(cached) $ac_c" 1>&6
4783 else
4784   ac_save_LIBS="$LIBS"
4785 LIBS="-lpam  $LIBS"
4786 cat > conftest.$ac_ext <<EOF
4787 #line 4787 "configure"
4788 #include "confdefs.h"
4789 /* Override any gcc2 internal prototype to avoid an error.  */
4790 /* We use char because int might match the return type of a gcc2
4791     builtin and then its argument prototype would still apply.  */
4792 char pam_start();
4793
4794 int main() {
4795 pam_start()
4796 ; return 0; }
4797 EOF
4798 if { (eval echo configure:4798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4799   rm -rf conftest*
4800   eval "ac_cv_lib_$ac_lib_var=yes"
4801 else
4802   echo "configure: failed program was:" >&5
4803   cat conftest.$ac_ext >&5
4804   rm -rf conftest*
4805   eval "ac_cv_lib_$ac_lib_var=no"
4806 fi
4807 rm -f conftest*
4808 LIBS="$ac_save_LIBS"
4809
4810 fi
4811 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4812   echo "$ac_t""yes" 1>&6
4813     ac_tr_lib=HAVE_LIB`echo pam | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4814     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4815   cat >> confdefs.h <<EOF
4816 #define $ac_tr_lib 1
4817 EOF
4818
4819   LIBS="-lpam $LIBS"
4820
4821 else
4822   echo "$ac_t""no" 1>&6
4823 { echo "configure: error: library 'pam' is required for PAM" 1>&2; exit 1; }
4824 fi
4825
4826 fi
4827
4828 if test "$enable_nls" = yes ; then
4829   
4830   
4831 echo $ac_n "checking for library containing gettext""... $ac_c" 1>&6
4832 echo "configure:4832: checking for library containing gettext" >&5
4833 if eval "test \"`echo '$''{'ac_cv_search_gettext'+set}'`\" = set"; then
4834   echo $ac_n "(cached) $ac_c" 1>&6
4835 else
4836   ac_func_search_save_LIBS="$LIBS"
4837 ac_cv_search_gettext="no"
4838 cat > conftest.$ac_ext <<EOF
4839 #line 4839 "configure"
4840 #include "confdefs.h"
4841 /* Override any gcc2 internal prototype to avoid an error.  */
4842 /* We use char because int might match the return type of a gcc2
4843     builtin and then its argument prototype would still apply.  */
4844 char gettext();
4845
4846 int main() {
4847 gettext()
4848 ; return 0; }
4849 EOF
4850 if { (eval echo configure:4850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4851   rm -rf conftest*
4852   ac_cv_search_gettext="none required"
4853 else
4854   echo "configure: failed program was:" >&5
4855   cat conftest.$ac_ext >&5
4856 fi
4857 rm -f conftest*
4858 test "$ac_cv_search_gettext" = "no" && for i in intl; do
4859 LIBS="-l$i  $ac_func_search_save_LIBS"
4860 cat > conftest.$ac_ext <<EOF
4861 #line 4861 "configure"
4862 #include "confdefs.h"
4863 /* Override any gcc2 internal prototype to avoid an error.  */
4864 /* We use char because int might match the return type of a gcc2
4865     builtin and then its argument prototype would still apply.  */
4866 char gettext();
4867
4868 int main() {
4869 gettext()
4870 ; return 0; }
4871 EOF
4872 if { (eval echo configure:4872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4873   rm -rf conftest*
4874   ac_cv_search_gettext="-l$i"
4875 break
4876 else
4877   echo "configure: failed program was:" >&5
4878   cat conftest.$ac_ext >&5
4879 fi
4880 rm -f conftest*
4881 done
4882 LIBS="$ac_func_search_save_LIBS"
4883 fi
4884
4885 echo "$ac_t""$ac_cv_search_gettext" 1>&6
4886 if test "$ac_cv_search_gettext" != "no"; then
4887   test "$ac_cv_search_gettext" = "none required" || LIBS="$ac_cv_search_gettext $LIBS"
4888   
4889 else :
4890   { echo "configure: error: a gettext implementation is required for NLS" 1>&2; exit 1; }
4891 fi
4892   ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
4893 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
4894 echo "configure:4894: checking for libintl.h" >&5
4895 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4896   echo $ac_n "(cached) $ac_c" 1>&6
4897 else
4898   cat > conftest.$ac_ext <<EOF
4899 #line 4899 "configure"
4900 #include "confdefs.h"
4901 #include <libintl.h>
4902 EOF
4903 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4904 { (eval echo configure:4904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4905 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4906 if test -z "$ac_err"; then
4907   rm -rf conftest*
4908   eval "ac_cv_header_$ac_safe=yes"
4909 else
4910   echo "$ac_err" >&5
4911   echo "configure: failed program was:" >&5
4912   cat conftest.$ac_ext >&5
4913   rm -rf conftest*
4914   eval "ac_cv_header_$ac_safe=no"
4915 fi
4916 rm -f conftest*
4917 fi
4918 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4919   echo "$ac_t""yes" 1>&6
4920   :
4921 else
4922   echo "$ac_t""no" 1>&6
4923 { echo "configure: error: header file <libintl.h> is required for NLS" 1>&2; exit 1; }
4924 fi
4925
4926   for ac_prog in msgfmt
4927 do
4928 # Extract the first word of "$ac_prog", so it can be a program name with args.
4929 set dummy $ac_prog; ac_word=$2
4930 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4931 echo "configure:4931: checking for $ac_word" >&5
4932 if eval "test \"`echo '$''{'ac_cv_prog_MSGFMT'+set}'`\" = set"; then
4933   echo $ac_n "(cached) $ac_c" 1>&6
4934 else
4935   if test -n "$MSGFMT"; then
4936   ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
4937 else
4938   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4939   ac_dummy="$PATH"
4940   for ac_dir in $ac_dummy; do
4941     test -z "$ac_dir" && ac_dir=.
4942     if test -f $ac_dir/$ac_word; then
4943       ac_cv_prog_MSGFMT="$ac_prog"
4944       break
4945     fi
4946   done
4947   IFS="$ac_save_ifs"
4948 fi
4949 fi
4950 MSGFMT="$ac_cv_prog_MSGFMT"
4951 if test -n "$MSGFMT"; then
4952   echo "$ac_t""$MSGFMT" 1>&6
4953 else
4954   echo "$ac_t""no" 1>&6
4955 fi
4956
4957 test -n "$MSGFMT" && break
4958 done
4959
4960   if test -z "$MSGFMT"; then
4961     { echo "configure: error: msgfmt is required for NLS" 1>&2; exit 1; }
4962   fi
4963   for ac_prog in msgmerge
4964 do
4965 # Extract the first word of "$ac_prog", so it can be a program name with args.
4966 set dummy $ac_prog; ac_word=$2
4967 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4968 echo "configure:4968: checking for $ac_word" >&5
4969 if eval "test \"`echo '$''{'ac_cv_prog_MSGMERGE'+set}'`\" = set"; then
4970   echo $ac_n "(cached) $ac_c" 1>&6
4971 else
4972   if test -n "$MSGMERGE"; then
4973   ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
4974 else
4975   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4976   ac_dummy="$PATH"
4977   for ac_dir in $ac_dummy; do
4978     test -z "$ac_dir" && ac_dir=.
4979     if test -f $ac_dir/$ac_word; then
4980       ac_cv_prog_MSGMERGE="$ac_prog"
4981       break
4982     fi
4983   done
4984   IFS="$ac_save_ifs"
4985 fi
4986 fi
4987 MSGMERGE="$ac_cv_prog_MSGMERGE"
4988 if test -n "$MSGMERGE"; then
4989   echo "$ac_t""$MSGMERGE" 1>&6
4990 else
4991   echo "$ac_t""no" 1>&6
4992 fi
4993
4994 test -n "$MSGMERGE" && break
4995 done
4996
4997   for ac_prog in xgettext
4998 do
4999 # Extract the first word of "$ac_prog", so it can be a program name with args.
5000 set dummy $ac_prog; ac_word=$2
5001 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5002 echo "configure:5002: checking for $ac_word" >&5
5003 if eval "test \"`echo '$''{'ac_cv_prog_XGETTEXT'+set}'`\" = set"; then
5004   echo $ac_n "(cached) $ac_c" 1>&6
5005 else
5006   if test -n "$XGETTEXT"; then
5007   ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
5008 else
5009   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5010   ac_dummy="$PATH"
5011   for ac_dir in $ac_dummy; do
5012     test -z "$ac_dir" && ac_dir=.
5013     if test -f $ac_dir/$ac_word; then
5014       ac_cv_prog_XGETTEXT="$ac_prog"
5015       break
5016     fi
5017   done
5018   IFS="$ac_save_ifs"
5019 fi
5020 fi
5021 XGETTEXT="$ac_cv_prog_XGETTEXT"
5022 if test -n "$XGETTEXT"; then
5023   echo "$ac_t""$XGETTEXT" 1>&6
5024 else
5025   echo "$ac_t""no" 1>&6
5026 fi
5027
5028 test -n "$XGETTEXT" && break
5029 done
5030
5031
5032   # Note: share/locale is always the default, independent of $datadir
5033   localedir='${prefix}/share/locale'
5034   if test x"$prefix" = x"NONE"; then
5035     exp_localedir="$ac_default_prefix/share/locale"
5036   else
5037     exp_localedir="$prefix/share/locale"
5038   fi
5039
5040   
5041   cat >> confdefs.h <<EOF
5042 #define LOCALEDIR "$exp_localedir"
5043 EOF
5044
5045
5046 fi
5047
5048 ##
5049 ## Header files
5050 ##
5051 for ac_hdr in crypt.h dld.h endian.h fp_class.h getopt.h ieeefp.h pwd.h sys/ipc.h sys/pstat.h sys/select.h sys/sem.h sys/socket.h sys/shm.h sys/types.h sys/un.h termios.h kernel/OS.h kernel/image.h SupportDefs.h
5052 do
5053 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5054 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5055 echo "configure:5055: checking for $ac_hdr" >&5
5056 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5057   echo $ac_n "(cached) $ac_c" 1>&6
5058 else
5059   cat > conftest.$ac_ext <<EOF
5060 #line 5060 "configure"
5061 #include "confdefs.h"
5062 #include <$ac_hdr>
5063 EOF
5064 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5065 { (eval echo configure:5065: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5066 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5067 if test -z "$ac_err"; then
5068   rm -rf conftest*
5069   eval "ac_cv_header_$ac_safe=yes"
5070 else
5071   echo "$ac_err" >&5
5072   echo "configure: failed program was:" >&5
5073   cat conftest.$ac_ext >&5
5074   rm -rf conftest*
5075   eval "ac_cv_header_$ac_safe=no"
5076 fi
5077 rm -f conftest*
5078 fi
5079 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5080   echo "$ac_t""yes" 1>&6
5081     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5082   cat >> confdefs.h <<EOF
5083 #define $ac_tr_hdr 1
5084 EOF
5085  
5086 else
5087   echo "$ac_t""no" 1>&6
5088 fi
5089 done
5090
5091
5092 for ac_hdr in netinet/in.h
5093 do
5094 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5095 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5096 echo "configure:5096: checking for $ac_hdr" >&5
5097 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5098   echo $ac_n "(cached) $ac_c" 1>&6
5099 else
5100   cat > conftest.$ac_ext <<EOF
5101 #line 5101 "configure"
5102 #include "confdefs.h"
5103 #include <$ac_hdr>
5104 EOF
5105 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5106 { (eval echo configure:5106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5107 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5108 if test -z "$ac_err"; then
5109   rm -rf conftest*
5110   eval "ac_cv_header_$ac_safe=yes"
5111 else
5112   echo "$ac_err" >&5
5113   echo "configure: failed program was:" >&5
5114   cat conftest.$ac_ext >&5
5115   rm -rf conftest*
5116   eval "ac_cv_header_$ac_safe=no"
5117 fi
5118 rm -f conftest*
5119 fi
5120 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5121   echo "$ac_t""yes" 1>&6
5122     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5123   cat >> confdefs.h <<EOF
5124 #define $ac_tr_hdr 1
5125 EOF
5126  
5127 else
5128   echo "$ac_t""no" 1>&6
5129 fi
5130 done
5131
5132 echo $ac_n "checking for netinet/tcp.h""... $ac_c" 1>&6
5133 echo "configure:5133: checking for netinet/tcp.h" >&5
5134 cat > conftest.$ac_ext <<EOF
5135 #line 5135 "configure"
5136 #include "confdefs.h"
5137
5138 #ifdef HAVE_NETINET_IN_H
5139 #include <netinet/in.h>
5140 #endif
5141 #include <netinet/tcp.h>
5142
5143 EOF
5144 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5145 { (eval echo configure:5145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5146 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5147 if test -z "$ac_err"; then
5148   rm -rf conftest*
5149   cat >> confdefs.h <<\EOF
5150 #define HAVE_NETINET_TCP_H 1
5151 EOF
5152  echo "$ac_t""yes" 1>&6
5153 else
5154   echo "$ac_err" >&5
5155   echo "configure: failed program was:" >&5
5156   cat conftest.$ac_ext >&5
5157   rm -rf conftest*
5158   echo "$ac_t""no" 1>&6
5159 fi
5160 rm -f conftest*
5161
5162 echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
5163 echo "configure:5163: checking whether string.h and strings.h may both be included" >&5
5164 if eval "test \"`echo '$''{'pgac_cv_header_strings_both'+set}'`\" = set"; then
5165   echo $ac_n "(cached) $ac_c" 1>&6
5166 else
5167   cat > conftest.$ac_ext <<EOF
5168 #line 5168 "configure"
5169 #include "confdefs.h"
5170 #include <string.h>
5171 #include <strings.h>
5172
5173 EOF
5174 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5175 { (eval echo configure:5175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5176 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5177 if test -z "$ac_err"; then
5178   rm -rf conftest*
5179   cat > conftest.$ac_ext <<EOF
5180 #line 5180 "configure"
5181 #include "confdefs.h"
5182 #include <string.h>
5183 #include <strings.h>
5184
5185 int main() {
5186 int n = strcasecmp("a", "b");
5187 ; return 0; }
5188 EOF
5189 if { (eval echo configure:5189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5190   rm -rf conftest*
5191   pgac_cv_header_strings_both=yes
5192 else
5193   echo "configure: failed program was:" >&5
5194   cat conftest.$ac_ext >&5
5195   rm -rf conftest*
5196   pgac_cv_header_strings_both=no
5197 fi
5198 rm -f conftest*
5199 else
5200   echo "$ac_err" >&5
5201   echo "configure: failed program was:" >&5
5202   cat conftest.$ac_ext >&5
5203   rm -rf conftest*
5204   pgac_cv_header_strings_both=no
5205 fi
5206 rm -f conftest*
5207 fi
5208
5209 echo "$ac_t""$pgac_cv_header_strings_both" 1>&6
5210 if test x"$pgac_cv_header_strings_both" = x"yes"; then
5211   cat >> confdefs.h <<\EOF
5212 #define STRING_H_WITH_STRINGS_H 1
5213 EOF
5214
5215 fi
5216
5217 for ac_hdr in readline/readline.h readline.h
5218 do
5219 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5220 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5221 echo "configure:5221: checking for $ac_hdr" >&5
5222 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5223   echo $ac_n "(cached) $ac_c" 1>&6
5224 else
5225   cat > conftest.$ac_ext <<EOF
5226 #line 5226 "configure"
5227 #include "confdefs.h"
5228 #include <$ac_hdr>
5229 EOF
5230 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5231 { (eval echo configure:5231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5232 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5233 if test -z "$ac_err"; then
5234   rm -rf conftest*
5235   eval "ac_cv_header_$ac_safe=yes"
5236 else
5237   echo "$ac_err" >&5
5238   echo "configure: failed program was:" >&5
5239   cat conftest.$ac_ext >&5
5240   rm -rf conftest*
5241   eval "ac_cv_header_$ac_safe=no"
5242 fi
5243 rm -f conftest*
5244 fi
5245 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5246   echo "$ac_t""yes" 1>&6
5247     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5248   cat >> confdefs.h <<EOF
5249 #define $ac_tr_hdr 1
5250 EOF
5251  break
5252 else
5253   echo "$ac_t""no" 1>&6
5254 fi
5255 done
5256
5257 for ac_hdr in readline/history.h history.h
5258 do
5259 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5260 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5261 echo "configure:5261: checking for $ac_hdr" >&5
5262 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5263   echo $ac_n "(cached) $ac_c" 1>&6
5264 else
5265   cat > conftest.$ac_ext <<EOF
5266 #line 5266 "configure"
5267 #include "confdefs.h"
5268 #include <$ac_hdr>
5269 EOF
5270 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5271 { (eval echo configure:5271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5272 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5273 if test -z "$ac_err"; then
5274   rm -rf conftest*
5275   eval "ac_cv_header_$ac_safe=yes"
5276 else
5277   echo "$ac_err" >&5
5278   echo "configure: failed program was:" >&5
5279   cat conftest.$ac_ext >&5
5280   rm -rf conftest*
5281   eval "ac_cv_header_$ac_safe=no"
5282 fi
5283 rm -f conftest*
5284 fi
5285 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5286   echo "$ac_t""yes" 1>&6
5287     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5288   cat >> confdefs.h <<EOF
5289 #define $ac_tr_hdr 1
5290 EOF
5291  break
5292 else
5293   echo "$ac_t""no" 1>&6
5294 fi
5295 done
5296
5297
5298 if test "$with_krb4" = yes ; then
5299   ac_safe=`echo "krb.h" | sed 'y%./+-%__p_%'`
5300 echo $ac_n "checking for krb.h""... $ac_c" 1>&6
5301 echo "configure:5301: checking for krb.h" >&5
5302 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5303   echo $ac_n "(cached) $ac_c" 1>&6
5304 else
5305   cat > conftest.$ac_ext <<EOF
5306 #line 5306 "configure"
5307 #include "confdefs.h"
5308 #include <krb.h>
5309 EOF
5310 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5311 { (eval echo configure:5311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5312 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5313 if test -z "$ac_err"; then
5314   rm -rf conftest*
5315   eval "ac_cv_header_$ac_safe=yes"
5316 else
5317   echo "$ac_err" >&5
5318   echo "configure: failed program was:" >&5
5319   cat conftest.$ac_ext >&5
5320   rm -rf conftest*
5321   eval "ac_cv_header_$ac_safe=no"
5322 fi
5323 rm -f conftest*
5324 fi
5325 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5326   echo "$ac_t""yes" 1>&6
5327   :
5328 else
5329   echo "$ac_t""no" 1>&6
5330 { echo "configure: error: header file <krb.h> is required for Kerberos 4" 1>&2; exit 1; }
5331 fi
5332
5333 fi
5334
5335 if test "$with_krb5" = yes ; then
5336   ac_safe=`echo "krb5.h" | sed 'y%./+-%__p_%'`
5337 echo $ac_n "checking for krb5.h""... $ac_c" 1>&6
5338 echo "configure:5338: checking for krb5.h" >&5
5339 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5340   echo $ac_n "(cached) $ac_c" 1>&6
5341 else
5342   cat > conftest.$ac_ext <<EOF
5343 #line 5343 "configure"
5344 #include "confdefs.h"
5345 #include <krb5.h>
5346 EOF
5347 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5348 { (eval echo configure:5348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5349 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5350 if test -z "$ac_err"; then
5351   rm -rf conftest*
5352   eval "ac_cv_header_$ac_safe=yes"
5353 else
5354   echo "$ac_err" >&5
5355   echo "configure: failed program was:" >&5
5356   cat conftest.$ac_ext >&5
5357   rm -rf conftest*
5358   eval "ac_cv_header_$ac_safe=no"
5359 fi
5360 rm -f conftest*
5361 fi
5362 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5363   echo "$ac_t""yes" 1>&6
5364   :
5365 else
5366   echo "$ac_t""no" 1>&6
5367 { echo "configure: error: header file <krb5.h> is required for Kerberos 5" 1>&2; exit 1; }
5368 fi
5369
5370   ac_safe=`echo "com_err.h" | sed 'y%./+-%__p_%'`
5371 echo $ac_n "checking for com_err.h""... $ac_c" 1>&6
5372 echo "configure:5372: checking for com_err.h" >&5
5373 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5374   echo $ac_n "(cached) $ac_c" 1>&6
5375 else
5376   cat > conftest.$ac_ext <<EOF
5377 #line 5377 "configure"
5378 #include "confdefs.h"
5379 #include <com_err.h>
5380 EOF
5381 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5382 { (eval echo configure:5382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5383 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5384 if test -z "$ac_err"; then
5385   rm -rf conftest*
5386   eval "ac_cv_header_$ac_safe=yes"
5387 else
5388   echo "$ac_err" >&5
5389   echo "configure: failed program was:" >&5
5390   cat conftest.$ac_ext >&5
5391   rm -rf conftest*
5392   eval "ac_cv_header_$ac_safe=no"
5393 fi
5394 rm -f conftest*
5395 fi
5396 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5397   echo "$ac_t""yes" 1>&6
5398   :
5399 else
5400   echo "$ac_t""no" 1>&6
5401 { echo "configure: error: header file <com_err.h> is required for Kerberos 5" 1>&2; exit 1; }
5402 fi
5403
5404 fi
5405
5406 if test "$with_openssl" = yes ; then
5407   ac_safe=`echo "openssl/ssl.h" | sed 'y%./+-%__p_%'`
5408 echo $ac_n "checking for openssl/ssl.h""... $ac_c" 1>&6
5409 echo "configure:5409: checking for openssl/ssl.h" >&5
5410 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5411   echo $ac_n "(cached) $ac_c" 1>&6
5412 else
5413   cat > conftest.$ac_ext <<EOF
5414 #line 5414 "configure"
5415 #include "confdefs.h"
5416 #include <openssl/ssl.h>
5417 EOF
5418 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5419 { (eval echo configure:5419: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5420 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5421 if test -z "$ac_err"; then
5422   rm -rf conftest*
5423   eval "ac_cv_header_$ac_safe=yes"
5424 else
5425   echo "$ac_err" >&5
5426   echo "configure: failed program was:" >&5
5427   cat conftest.$ac_ext >&5
5428   rm -rf conftest*
5429   eval "ac_cv_header_$ac_safe=no"
5430 fi
5431 rm -f conftest*
5432 fi
5433 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5434   echo "$ac_t""yes" 1>&6
5435   :
5436 else
5437   echo "$ac_t""no" 1>&6
5438 { echo "configure: error: header file <openssl/ssl.h> is required for OpenSSL" 1>&2; exit 1; }
5439 fi
5440
5441   ac_safe=`echo "openssl/err.h" | sed 'y%./+-%__p_%'`
5442 echo $ac_n "checking for openssl/err.h""... $ac_c" 1>&6
5443 echo "configure:5443: checking for openssl/err.h" >&5
5444 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5445   echo $ac_n "(cached) $ac_c" 1>&6
5446 else
5447   cat > conftest.$ac_ext <<EOF
5448 #line 5448 "configure"
5449 #include "confdefs.h"
5450 #include <openssl/err.h>
5451 EOF
5452 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5453 { (eval echo configure:5453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5454 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5455 if test -z "$ac_err"; then
5456   rm -rf conftest*
5457   eval "ac_cv_header_$ac_safe=yes"
5458 else
5459   echo "$ac_err" >&5
5460   echo "configure: failed program was:" >&5
5461   cat conftest.$ac_ext >&5
5462   rm -rf conftest*
5463   eval "ac_cv_header_$ac_safe=no"
5464 fi
5465 rm -f conftest*
5466 fi
5467 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5468   echo "$ac_t""yes" 1>&6
5469   :
5470 else
5471   echo "$ac_t""no" 1>&6
5472 { echo "configure: error: header file <openssl/err.h> is required for OpenSSL" 1>&2; exit 1; }
5473 fi
5474
5475 fi
5476
5477 if test "$with_pam" = yes ; then
5478   ac_safe=`echo "security/pam_appl.h" | sed 'y%./+-%__p_%'`
5479 echo $ac_n "checking for security/pam_appl.h""... $ac_c" 1>&6
5480 echo "configure:5480: checking for security/pam_appl.h" >&5
5481 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5482   echo $ac_n "(cached) $ac_c" 1>&6
5483 else
5484   cat > conftest.$ac_ext <<EOF
5485 #line 5485 "configure"
5486 #include "confdefs.h"
5487 #include <security/pam_appl.h>
5488 EOF
5489 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5490 { (eval echo configure:5490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5491 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5492 if test -z "$ac_err"; then
5493   rm -rf conftest*
5494   eval "ac_cv_header_$ac_safe=yes"
5495 else
5496   echo "$ac_err" >&5
5497   echo "configure: failed program was:" >&5
5498   cat conftest.$ac_ext >&5
5499   rm -rf conftest*
5500   eval "ac_cv_header_$ac_safe=no"
5501 fi
5502 rm -f conftest*
5503 fi
5504 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5505   echo "$ac_t""yes" 1>&6
5506   :
5507 else
5508   echo "$ac_t""no" 1>&6
5509 { echo "configure: error: header file <security/pam_appl.h> is required for PAM" 1>&2; exit 1; }
5510 fi
5511
5512 fi
5513
5514
5515 ##
5516 ## Types, structures, compiler characteristics
5517 ##
5518 echo $ac_n "checking for working const""... $ac_c" 1>&6
5519 echo "configure:5519: checking for working const" >&5
5520 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5521   echo $ac_n "(cached) $ac_c" 1>&6
5522 else
5523   cat > conftest.$ac_ext <<EOF
5524 #line 5524 "configure"
5525 #include "confdefs.h"
5526
5527 int main() {
5528
5529 /* Ultrix mips cc rejects this.  */
5530 typedef int charset[2]; const charset x;
5531 /* SunOS 4.1.1 cc rejects this.  */
5532 char const *const *ccp;
5533 char **p;
5534 /* NEC SVR4.0.2 mips cc rejects this.  */
5535 struct point {int x, y;};
5536 static struct point const zero = {0,0};
5537 /* AIX XL C 1.02.0.0 rejects this.
5538    It does not let you subtract one const X* pointer from another in an arm
5539    of an if-expression whose if-part is not a constant expression */
5540 const char *g = "string";
5541 ccp = &g + (g ? g-g : 0);
5542 /* HPUX 7.0 cc rejects these. */
5543 ++ccp;
5544 p = (char**) ccp;
5545 ccp = (char const *const *) p;
5546 { /* SCO 3.2v4 cc rejects this.  */
5547   char *t;
5548   char const *s = 0 ? (char *) 0 : (char const *) 0;
5549
5550   *t++ = 0;
5551 }
5552 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
5553   int x[] = {25, 17};
5554   const int *foo = &x[0];
5555   ++foo;
5556 }
5557 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5558   typedef const int *iptr;
5559   iptr p = 0;
5560   ++p;
5561 }
5562 { /* AIX XL C 1.02.0.0 rejects this saying
5563      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5564   struct s { int j; const int *ap[3]; };
5565   struct s *b; b->j = 5;
5566 }
5567 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5568   const int foo = 10;
5569 }
5570
5571 ; return 0; }
5572 EOF
5573 if { (eval echo configure:5573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5574   rm -rf conftest*
5575   ac_cv_c_const=yes
5576 else
5577   echo "configure: failed program was:" >&5
5578   cat conftest.$ac_ext >&5
5579   rm -rf conftest*
5580   ac_cv_c_const=no
5581 fi
5582 rm -f conftest*
5583 fi
5584
5585 echo "$ac_t""$ac_cv_c_const" 1>&6
5586 if test $ac_cv_c_const = no; then
5587   cat >> confdefs.h <<\EOF
5588 #define const 
5589 EOF
5590
5591 fi
5592
5593 echo $ac_n "checking for inline""... $ac_c" 1>&6
5594 echo "configure:5594: checking for inline" >&5
5595 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5596   echo $ac_n "(cached) $ac_c" 1>&6
5597 else
5598   ac_cv_c_inline=no
5599 for ac_kw in inline __inline__ __inline; do
5600   cat > conftest.$ac_ext <<EOF
5601 #line 5601 "configure"
5602 #include "confdefs.h"
5603
5604 int main() {
5605 } $ac_kw foo() {
5606 ; return 0; }
5607 EOF
5608 if { (eval echo configure:5608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5609   rm -rf conftest*
5610   ac_cv_c_inline=$ac_kw; break
5611 else
5612   echo "configure: failed program was:" >&5
5613   cat conftest.$ac_ext >&5
5614 fi
5615 rm -f conftest*
5616 done
5617
5618 fi
5619
5620 echo "$ac_t""$ac_cv_c_inline" 1>&6
5621 case "$ac_cv_c_inline" in
5622   inline | yes) ;;
5623   no) cat >> confdefs.h <<\EOF
5624 #define inline 
5625 EOF
5626  ;;
5627   *)  cat >> confdefs.h <<EOF
5628 #define inline $ac_cv_c_inline
5629 EOF
5630  ;;
5631 esac
5632
5633
5634
5635 echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
5636 echo "configure:5636: checking for preprocessor stringizing operator" >&5
5637 if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
5638   echo $ac_n "(cached) $ac_c" 1>&6
5639 else
5640   cat > conftest.$ac_ext <<EOF
5641 #line 5641 "configure"
5642 #include "confdefs.h"
5643
5644 #define x(y) #y
5645
5646 char *s = x(teststring);
5647
5648 EOF
5649 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5650   egrep "#teststring" >/dev/null 2>&1; then
5651   rm -rf conftest*
5652   ac_cv_c_stringize=no
5653 else
5654   rm -rf conftest*
5655   ac_cv_c_stringize=yes
5656 fi
5657 rm -f conftest*
5658
5659 fi
5660
5661 if test "${ac_cv_c_stringize}" = yes
5662 then
5663         cat >> confdefs.h <<\EOF
5664 #define HAVE_STRINGIZE 1
5665 EOF
5666
5667 fi
5668 echo "$ac_t""${ac_cv_c_stringize}" 1>&6
5669
5670 echo $ac_n "checking for signed types""... $ac_c" 1>&6
5671 echo "configure:5671: checking for signed types" >&5
5672 if eval "test \"`echo '$''{'pgac_cv_c_signed'+set}'`\" = set"; then
5673   echo $ac_n "(cached) $ac_c" 1>&6
5674 else
5675   cat > conftest.$ac_ext <<EOF
5676 #line 5676 "configure"
5677 #include "confdefs.h"
5678
5679 int main() {
5680 signed char c; signed short s; signed int i;
5681 ; return 0; }
5682 EOF
5683 if { (eval echo configure:5683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5684   rm -rf conftest*
5685   pgac_cv_c_signed=yes
5686 else
5687   echo "configure: failed program was:" >&5
5688   cat conftest.$ac_ext >&5
5689   rm -rf conftest*
5690   pgac_cv_c_signed=no
5691 fi
5692 rm -f conftest*
5693 fi
5694
5695 echo "$ac_t""$pgac_cv_c_signed" 1>&6
5696 if test x"$pgac_cv_c_signed" = xno ; then
5697   cat >> confdefs.h <<\EOF
5698 #define signed 
5699 EOF
5700
5701 fi
5702 echo $ac_n "checking for volatile""... $ac_c" 1>&6
5703 echo "configure:5703: checking for volatile" >&5
5704 if eval "test \"`echo '$''{'pgac_cv_c_volatile'+set}'`\" = set"; then
5705   echo $ac_n "(cached) $ac_c" 1>&6
5706 else
5707   cat > conftest.$ac_ext <<EOF
5708 #line 5708 "configure"
5709 #include "confdefs.h"
5710
5711 int main() {
5712 extern volatile int i;
5713 ; return 0; }
5714 EOF
5715 if { (eval echo configure:5715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5716   rm -rf conftest*
5717   pgac_cv_c_volatile=yes
5718 else
5719   echo "configure: failed program was:" >&5
5720   cat conftest.$ac_ext >&5
5721   rm -rf conftest*
5722   pgac_cv_c_volatile=no
5723 fi
5724 rm -f conftest*
5725 fi
5726
5727 echo "$ac_t""$pgac_cv_c_volatile" 1>&6
5728 if test x"$pgac_cv_c_volatile" = xno ; then
5729   cat >> confdefs.h <<\EOF
5730 #define volatile 
5731 EOF
5732
5733 fi
5734 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
5735 echo "configure:5735: checking whether struct tm is in sys/time.h or time.h" >&5
5736 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
5737   echo $ac_n "(cached) $ac_c" 1>&6
5738 else
5739   cat > conftest.$ac_ext <<EOF
5740 #line 5740 "configure"
5741 #include "confdefs.h"
5742 #include <sys/types.h>
5743 #include <time.h>
5744 int main() {
5745 struct tm *tp; tp->tm_sec;
5746 ; return 0; }
5747 EOF
5748 if { (eval echo configure:5748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5749   rm -rf conftest*
5750   ac_cv_struct_tm=time.h
5751 else
5752   echo "configure: failed program was:" >&5
5753   cat conftest.$ac_ext >&5
5754   rm -rf conftest*
5755   ac_cv_struct_tm=sys/time.h
5756 fi
5757 rm -f conftest*
5758 fi
5759
5760 echo "$ac_t""$ac_cv_struct_tm" 1>&6
5761 if test $ac_cv_struct_tm = sys/time.h; then
5762   cat >> confdefs.h <<\EOF
5763 #define TM_IN_SYS_TIME 1
5764 EOF
5765
5766 fi
5767
5768 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
5769 echo "configure:5769: checking for tm_zone in struct tm" >&5
5770 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
5771   echo $ac_n "(cached) $ac_c" 1>&6
5772 else
5773   cat > conftest.$ac_ext <<EOF
5774 #line 5774 "configure"
5775 #include "confdefs.h"
5776 #include <sys/types.h>
5777 #include <$ac_cv_struct_tm>
5778 int main() {
5779 struct tm tm; tm.tm_zone;
5780 ; return 0; }
5781 EOF
5782 if { (eval echo configure:5782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5783   rm -rf conftest*
5784   ac_cv_struct_tm_zone=yes
5785 else
5786   echo "configure: failed program was:" >&5
5787   cat conftest.$ac_ext >&5
5788   rm -rf conftest*
5789   ac_cv_struct_tm_zone=no
5790 fi
5791 rm -f conftest*
5792 fi
5793
5794 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5795 if test "$ac_cv_struct_tm_zone" = yes; then
5796   cat >> confdefs.h <<\EOF
5797 #define HAVE_TM_ZONE 1
5798 EOF
5799
5800 else
5801   echo $ac_n "checking for tzname""... $ac_c" 1>&6
5802 echo "configure:5802: checking for tzname" >&5
5803 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
5804   echo $ac_n "(cached) $ac_c" 1>&6
5805 else
5806   cat > conftest.$ac_ext <<EOF
5807 #line 5807 "configure"
5808 #include "confdefs.h"
5809 #include <time.h>
5810 #ifndef tzname /* For SGI.  */
5811 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
5812 #endif
5813 int main() {
5814 atoi(*tzname);
5815 ; return 0; }
5816 EOF
5817 if { (eval echo configure:5817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5818   rm -rf conftest*
5819   ac_cv_var_tzname=yes
5820 else
5821   echo "configure: failed program was:" >&5
5822   cat conftest.$ac_ext >&5
5823   rm -rf conftest*
5824   ac_cv_var_tzname=no
5825 fi
5826 rm -f conftest*
5827 fi
5828
5829 echo "$ac_t""$ac_cv_var_tzname" 1>&6
5830   if test $ac_cv_var_tzname = yes; then
5831     cat >> confdefs.h <<\EOF
5832 #define HAVE_TZNAME 1
5833 EOF
5834
5835   fi
5836 fi
5837
5838 echo $ac_n "checking for union semun""... $ac_c" 1>&6
5839 echo "configure:5839: checking for union semun" >&5
5840 if eval "test \"`echo '$''{'pgac_cv_union_semun'+set}'`\" = set"; then
5841   echo $ac_n "(cached) $ac_c" 1>&6
5842 else
5843   cat > conftest.$ac_ext <<EOF
5844 #line 5844 "configure"
5845 #include "confdefs.h"
5846 #include <sys/types.h>
5847 #include <sys/ipc.h>
5848 #include <sys/sem.h>
5849 int main() {
5850 union semun semun;
5851 ; return 0; }
5852 EOF
5853 if { (eval echo configure:5853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5854   rm -rf conftest*
5855   pgac_cv_union_semun=yes
5856 else
5857   echo "configure: failed program was:" >&5
5858   cat conftest.$ac_ext >&5
5859   rm -rf conftest*
5860   pgac_cv_union_semun=no
5861 fi
5862 rm -f conftest*
5863 fi
5864
5865 echo "$ac_t""$pgac_cv_union_semun" 1>&6
5866 if test x"$pgac_cv_union_semun" = xyes ; then
5867   cat >> confdefs.h <<\EOF
5868 #define HAVE_UNION_SEMUN 1
5869 EOF
5870
5871 fi
5872 echo $ac_n "checking for struct cmsgcred""... $ac_c" 1>&6
5873 echo "configure:5873: checking for struct cmsgcred" >&5
5874 if eval "test \"`echo '$''{'pgac_cv_struct_cmsgcred'+set}'`\" = set"; then
5875   echo $ac_n "(cached) $ac_c" 1>&6
5876 else
5877   cat > conftest.$ac_ext <<EOF
5878 #line 5878 "configure"
5879 #include "confdefs.h"
5880 #include <sys/param.h>
5881 #include <sys/socket.h>
5882 #include <sys/ucred.h>
5883 int main() {
5884 struct cmsgcred sockcred;
5885 ; return 0; }
5886 EOF
5887 if { (eval echo configure:5887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5888   rm -rf conftest*
5889   pgac_cv_struct_cmsgcred=yes
5890 else
5891   echo "configure: failed program was:" >&5
5892   cat conftest.$ac_ext >&5
5893   rm -rf conftest*
5894   pgac_cv_struct_cmsgcred=no
5895 fi
5896 rm -f conftest*
5897 fi
5898
5899 echo "$ac_t""$pgac_cv_struct_cmsgcred" 1>&6
5900 if test x"$pgac_cv_struct_cmsgcred" = xyes ; then
5901   cat >> confdefs.h <<\EOF
5902 #define HAVE_STRUCT_CMSGCRED 1
5903 EOF
5904
5905 fi
5906 echo $ac_n "checking for struct fcred""... $ac_c" 1>&6
5907 echo "configure:5907: checking for struct fcred" >&5
5908 if eval "test \"`echo '$''{'pgac_cv_struct_fcred'+set}'`\" = set"; then
5909   echo $ac_n "(cached) $ac_c" 1>&6
5910 else
5911   cat > conftest.$ac_ext <<EOF
5912 #line 5912 "configure"
5913 #include "confdefs.h"
5914 #include <sys/param.h>
5915 #include <sys/socket.h>
5916 #include <sys/ucred.h>
5917 int main() {
5918 struct fcred sockcred;
5919 ; return 0; }
5920 EOF
5921 if { (eval echo configure:5921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5922   rm -rf conftest*
5923   pgac_cv_struct_fcred=yes
5924 else
5925   echo "configure: failed program was:" >&5
5926   cat conftest.$ac_ext >&5
5927   rm -rf conftest*
5928   pgac_cv_struct_fcred=no
5929 fi
5930 rm -f conftest*
5931 fi
5932
5933 echo "$ac_t""$pgac_cv_struct_fcred" 1>&6
5934 if test x"$pgac_cv_struct_fcred" = xyes ; then
5935   cat >> confdefs.h <<\EOF
5936 #define HAVE_STRUCT_FCRED 1
5937 EOF
5938
5939 fi
5940 echo $ac_n "checking for struct sockcred""... $ac_c" 1>&6
5941 echo "configure:5941: checking for struct sockcred" >&5
5942 if eval "test \"`echo '$''{'pgac_cv_struct_sockcred'+set}'`\" = set"; then
5943   echo $ac_n "(cached) $ac_c" 1>&6
5944 else
5945   cat > conftest.$ac_ext <<EOF
5946 #line 5946 "configure"
5947 #include "confdefs.h"
5948 #include <sys/param.h>
5949 #include <sys/socket.h>
5950 #include <sys/ucred.h>
5951 int main() {
5952 struct sockcred sockcred;
5953 ; return 0; }
5954 EOF
5955 if { (eval echo configure:5955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5956   rm -rf conftest*
5957   pgac_cv_struct_sockcred=yes
5958 else
5959   echo "configure: failed program was:" >&5
5960   cat conftest.$ac_ext >&5
5961   rm -rf conftest*
5962   pgac_cv_struct_sockcred=no
5963 fi
5964 rm -f conftest*
5965 fi
5966
5967 echo "$ac_t""$pgac_cv_struct_sockcred" 1>&6
5968 if test x"$pgac_cv_struct_sockcred" = xyes ; then
5969   cat >> confdefs.h <<\EOF
5970 #define HAVE_STRUCT_SOCKCRED 1
5971 EOF
5972
5973 fi
5974 echo $ac_n "checking for struct sockaddr_un""... $ac_c" 1>&6
5975 echo "configure:5975: checking for struct sockaddr_un" >&5
5976 if eval "test \"`echo '$''{'pgac_cv_struct_sockaddr_un'+set}'`\" = set"; then
5977   echo $ac_n "(cached) $ac_c" 1>&6
5978 else
5979   cat > conftest.$ac_ext <<EOF
5980 #line 5980 "configure"
5981 #include "confdefs.h"
5982 #include <sys/types.h>
5983 #ifdef HAVE_SYS_UN_H
5984 #include <sys/un.h>
5985 #endif
5986 int main() {
5987 struct sockaddr_un un;
5988 ; return 0; }
5989 EOF
5990 if { (eval echo configure:5990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5991   rm -rf conftest*
5992   pgac_cv_struct_sockaddr_un=yes
5993 else
5994   echo "configure: failed program was:" >&5
5995   cat conftest.$ac_ext >&5
5996   rm -rf conftest*
5997   pgac_cv_struct_sockaddr_un=no
5998 fi
5999 rm -f conftest*
6000 fi
6001
6002 echo "$ac_t""$pgac_cv_struct_sockaddr_un" 1>&6
6003 if test x"$pgac_cv_struct_sockaddr_un" = xyes; then
6004   cat >> confdefs.h <<\EOF
6005 #define HAVE_STRUCT_SOCKADDR_UN 1
6006 EOF
6007
6008 fi
6009
6010 if test "$with_krb5" = yes; then
6011 # Check for differences between MIT and Heimdal (KTH) releases
6012   echo $ac_n "checking for krb5_ticket.enc_part2""... $ac_c" 1>&6
6013 echo "configure:6013: checking for krb5_ticket.enc_part2" >&5
6014 if eval "test \"`echo '$''{'pgac_cv_member_krb5_ticket_enc_part2'+set}'`\" = set"; then
6015   echo $ac_n "(cached) $ac_c" 1>&6
6016 else
6017   cat > conftest.$ac_ext <<EOF
6018 #line 6018 "configure"
6019 #include "confdefs.h"
6020 #include <krb5.h>
6021 int main() {
6022 static krb5_ticket pgac_var;
6023 if (pgac_var.enc_part2)
6024 return 0;
6025 ; return 0; }
6026 EOF
6027 if { (eval echo configure:6027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6028   rm -rf conftest*
6029   pgac_cv_member_krb5_ticket_enc_part2=yes
6030 else
6031   echo "configure: failed program was:" >&5
6032   cat conftest.$ac_ext >&5
6033   rm -rf conftest*
6034   pgac_cv_member_krb5_ticket_enc_part2=no
6035 fi
6036 rm -f conftest*
6037 fi
6038
6039 echo "$ac_t""$pgac_cv_member_krb5_ticket_enc_part2" 1>&6
6040
6041 if test x"$pgac_cv_member_krb5_ticket_enc_part2" = x"yes"; then
6042   cat >> confdefs.h <<EOF
6043 #define HAVE_KRB5_TICKET_ENC_PART2 1
6044 EOF
6045
6046   
6047 else
6048   echo $ac_n "checking for krb5_ticket.client""... $ac_c" 1>&6
6049 echo "configure:6049: checking for krb5_ticket.client" >&5
6050 if eval "test \"`echo '$''{'pgac_cv_member_krb5_ticket_client'+set}'`\" = set"; then
6051   echo $ac_n "(cached) $ac_c" 1>&6
6052 else
6053   cat > conftest.$ac_ext <<EOF
6054 #line 6054 "configure"
6055 #include "confdefs.h"
6056 #include <krb5.h>
6057 int main() {
6058 static krb5_ticket pgac_var;
6059 if (pgac_var.client)
6060 return 0;
6061 ; return 0; }
6062 EOF
6063 if { (eval echo configure:6063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6064   rm -rf conftest*
6065   pgac_cv_member_krb5_ticket_client=yes
6066 else
6067   echo "configure: failed program was:" >&5
6068   cat conftest.$ac_ext >&5
6069   rm -rf conftest*
6070   pgac_cv_member_krb5_ticket_client=no
6071 fi
6072 rm -f conftest*
6073 fi
6074
6075 echo "$ac_t""$pgac_cv_member_krb5_ticket_client" 1>&6
6076
6077 if test x"$pgac_cv_member_krb5_ticket_client" = x"yes"; then
6078   cat >> confdefs.h <<EOF
6079 #define HAVE_KRB5_TICKET_CLIENT 1
6080 EOF
6081
6082   
6083 else
6084   { echo "configure: error: could not determine how to get client name from Kerberos 5 ticket" 1>&2; exit 1; }
6085 fi
6086
6087 fi
6088
6089   echo $ac_n "checking for krb5_error.text.data""... $ac_c" 1>&6
6090 echo "configure:6090: checking for krb5_error.text.data" >&5
6091 if eval "test \"`echo '$''{'pgac_cv_member_krb5_error_text_data'+set}'`\" = set"; then
6092   echo $ac_n "(cached) $ac_c" 1>&6
6093 else
6094   cat > conftest.$ac_ext <<EOF
6095 #line 6095 "configure"
6096 #include "confdefs.h"
6097 #include <krb5.h>
6098 int main() {
6099 static krb5_error pgac_var;
6100 if (pgac_var.text.data)
6101 return 0;
6102 ; return 0; }
6103 EOF
6104 if { (eval echo configure:6104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6105   rm -rf conftest*
6106   pgac_cv_member_krb5_error_text_data=yes
6107 else
6108   echo "configure: failed program was:" >&5
6109   cat conftest.$ac_ext >&5
6110   rm -rf conftest*
6111   pgac_cv_member_krb5_error_text_data=no
6112 fi
6113 rm -f conftest*
6114 fi
6115
6116 echo "$ac_t""$pgac_cv_member_krb5_error_text_data" 1>&6
6117
6118 if test x"$pgac_cv_member_krb5_error_text_data" = x"yes"; then
6119   cat >> confdefs.h <<EOF
6120 #define HAVE_KRB5_ERROR_TEXT_DATA 1
6121 EOF
6122
6123   
6124 else
6125   echo $ac_n "checking for krb5_error.e_data""... $ac_c" 1>&6
6126 echo "configure:6126: checking for krb5_error.e_data" >&5
6127 if eval "test \"`echo '$''{'pgac_cv_member_krb5_error_e_data'+set}'`\" = set"; then
6128   echo $ac_n "(cached) $ac_c" 1>&6
6129 else
6130   cat > conftest.$ac_ext <<EOF
6131 #line 6131 "configure"
6132 #include "confdefs.h"
6133 #include <krb5.h>
6134 int main() {
6135 static krb5_error pgac_var;
6136 if (pgac_var.e_data)
6137 return 0;
6138 ; return 0; }
6139 EOF
6140 if { (eval echo configure:6140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6141   rm -rf conftest*
6142   pgac_cv_member_krb5_error_e_data=yes
6143 else
6144   echo "configure: failed program was:" >&5
6145   cat conftest.$ac_ext >&5
6146   rm -rf conftest*
6147   pgac_cv_member_krb5_error_e_data=no
6148 fi
6149 rm -f conftest*
6150 fi
6151
6152 echo "$ac_t""$pgac_cv_member_krb5_error_e_data" 1>&6
6153
6154 if test x"$pgac_cv_member_krb5_error_e_data" = x"yes"; then
6155   cat >> confdefs.h <<EOF
6156 #define HAVE_KRB5_ERROR_E_DATA 1
6157 EOF
6158
6159   
6160 else
6161   { echo "configure: error: could not determine how to extract Kerberos 5 error messages" 1>&2; exit 1; }
6162 fi
6163
6164 fi
6165
6166 fi
6167
6168
6169 ##
6170 ## Functions, global variables
6171 ##
6172 echo $ac_n "checking for int timezone""... $ac_c" 1>&6
6173 echo "configure:6173: checking for int timezone" >&5
6174 if eval "test \"`echo '$''{'pgac_cv_var_int_timezone'+set}'`\" = set"; then
6175   echo $ac_n "(cached) $ac_c" 1>&6
6176 else
6177   cat > conftest.$ac_ext <<EOF
6178 #line 6178 "configure"
6179 #include "confdefs.h"
6180 #include <time.h>
6181 int res;
6182 int main() {
6183 res = timezone / 60;
6184 ; return 0; }
6185 EOF
6186 if { (eval echo configure:6186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6187   rm -rf conftest*
6188   pgac_cv_var_int_timezone=yes
6189 else
6190   echo "configure: failed program was:" >&5
6191   cat conftest.$ac_ext >&5
6192   rm -rf conftest*
6193   pgac_cv_var_int_timezone=no
6194 fi
6195 rm -f conftest*
6196 fi
6197
6198 echo "$ac_t""$pgac_cv_var_int_timezone" 1>&6
6199 if test x"$pgac_cv_var_int_timezone" = xyes ; then
6200   cat >> confdefs.h <<\EOF
6201 #define HAVE_INT_TIMEZONE 
6202 EOF
6203
6204 fi
6205 echo $ac_n "checking types of arguments for accept()""... $ac_c" 1>&6
6206 echo "configure:6206: checking types of arguments for accept()" >&5
6207  if eval "test \"`echo '$''{'ac_cv_func_accept_arg1'+set}'`\" = set"; then
6208   echo $ac_n "(cached) $ac_c" 1>&6
6209 else
6210    if eval "test \"`echo '$''{'ac_cv_func_accept_arg2'+set}'`\" = set"; then
6211   echo $ac_n "(cached) $ac_c" 1>&6
6212 else
6213     if eval "test \"`echo '$''{'ac_cv_func_accept_arg3'+set}'`\" = set"; then
6214   echo $ac_n "(cached) $ac_c" 1>&6
6215 else
6216      for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
6217      for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
6218       for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
6219        cat > conftest.$ac_ext <<EOF
6220 #line 6220 "configure"
6221 #include "confdefs.h"
6222 #ifdef HAVE_SYS_TYPES_H
6223 #include <sys/types.h>
6224 #endif
6225 #ifdef HAVE_SYS_SOCKET_H
6226 #include <sys/socket.h>
6227 #endif
6228 extern int accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
6229 int main() {
6230
6231 ; return 0; }
6232 EOF
6233 if { (eval echo configure:6233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6234   rm -rf conftest*
6235   ac_not_found=no; break 3
6236 else
6237   echo "configure: failed program was:" >&5
6238   cat conftest.$ac_ext >&5
6239   rm -rf conftest*
6240   ac_not_found=yes
6241 fi
6242 rm -f conftest*
6243       done
6244      done
6245     done
6246     if test "$ac_not_found" = yes; then
6247       { echo "configure: error: could not determine argument types" 1>&2; exit 1; }
6248     fi
6249     if test "$ac_cv_func_accept_arg3" = "void"; then
6250       ac_cv_func_accept_arg3=int
6251     fi
6252    
6253 fi
6254   
6255 fi
6256  
6257 fi
6258  echo "$ac_t""$ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" 1>&6
6259  cat >> confdefs.h <<EOF
6260 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
6261 EOF
6262
6263  cat >> confdefs.h <<EOF
6264 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
6265 EOF
6266
6267  cat >> confdefs.h <<EOF
6268 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
6269 EOF
6270
6271
6272 echo $ac_n "checking whether gettimeofday takes only one argument""... $ac_c" 1>&6
6273 echo "configure:6273: checking whether gettimeofday takes only one argument" >&5
6274 if eval "test \"`echo '$''{'pgac_cv_func_gettimeofday_1arg'+set}'`\" = set"; then
6275   echo $ac_n "(cached) $ac_c" 1>&6
6276 else
6277   cat > conftest.$ac_ext <<EOF
6278 #line 6278 "configure"
6279 #include "confdefs.h"
6280 #include <sys/time.h>
6281 int main() {
6282 struct timeval *tp;
6283 struct timezone *tzp;
6284 gettimeofday(tp,tzp);
6285 ; return 0; }
6286 EOF
6287 if { (eval echo configure:6287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6288   rm -rf conftest*
6289   pgac_cv_func_gettimeofday_1arg=no
6290 else
6291   echo "configure: failed program was:" >&5
6292   cat conftest.$ac_ext >&5
6293   rm -rf conftest*
6294   pgac_cv_func_gettimeofday_1arg=yes
6295 fi
6296 rm -f conftest*
6297 fi
6298
6299 echo "$ac_t""$pgac_cv_func_gettimeofday_1arg" 1>&6
6300 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
6301   cat >> confdefs.h <<\EOF
6302 #define GETTIMEOFDAY_1ARG 
6303 EOF
6304
6305 fi
6306
6307 # SunOS doesn't handle negative byte comparisons properly with +/- return
6308 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
6309 echo "configure:6309: checking for 8-bit clean memcmp" >&5
6310 if eval "test \"`echo '$''{'pgac_cv_func_memcmp_clean'+set}'`\" = set"; then
6311   echo $ac_n "(cached) $ac_c" 1>&6
6312 else
6313   if test "$cross_compiling" = yes; then
6314   pgac_cv_func_memcmp_clean=no
6315 else
6316   cat > conftest.$ac_ext <<EOF
6317 #line 6317 "configure"
6318 #include "confdefs.h"
6319
6320 main()
6321 {
6322   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
6323   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
6324 }
6325
6326 EOF
6327 if { (eval echo configure:6327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6328 then
6329   pgac_cv_func_memcmp_clean=yes
6330 else
6331   echo "configure: failed program was:" >&5
6332   cat conftest.$ac_ext >&5
6333   rm -fr conftest*
6334   pgac_cv_func_memcmp_clean=no
6335 fi
6336 rm -fr conftest*
6337 fi
6338
6339 fi
6340
6341 echo "$ac_t""$pgac_cv_func_memcmp_clean" 1>&6
6342 if test $pgac_cv_func_memcmp_clean = no ; then
6343   MEMCMP=memcmp.o
6344 else
6345   MEMCMP=
6346 fi
6347
6348
6349 for ac_func in fcvt getopt_long memmove pstat setproctitle setsid sigprocmask sysconf waitpid dlopen fdatasync
6350 do
6351 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6352 echo "configure:6352: checking for $ac_func" >&5
6353 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6354   echo $ac_n "(cached) $ac_c" 1>&6
6355 else
6356   cat > conftest.$ac_ext <<EOF
6357 #line 6357 "configure"
6358 #include "confdefs.h"
6359 /* System header to define __stub macros and hopefully few prototypes,
6360     which can conflict with char $ac_func(); below.  */
6361 #include <assert.h>
6362 /* Override any gcc2 internal prototype to avoid an error.  */
6363 /* We use char because int might match the return type of a gcc2
6364     builtin and then its argument prototype would still apply.  */
6365 char $ac_func();
6366
6367 int main() {
6368
6369 /* The GNU C library defines this for functions which it implements
6370     to always fail with ENOSYS.  Some functions are actually named
6371     something starting with __ and the normal name is an alias.  */
6372 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6373 choke me
6374 #else
6375 $ac_func();
6376 #endif
6377
6378 ; return 0; }
6379 EOF
6380 if { (eval echo configure:6380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6381   rm -rf conftest*
6382   eval "ac_cv_func_$ac_func=yes"
6383 else
6384   echo "configure: failed program was:" >&5
6385   cat conftest.$ac_ext >&5
6386   rm -rf conftest*
6387   eval "ac_cv_func_$ac_func=no"
6388 fi
6389 rm -f conftest*
6390 fi
6391
6392 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6393   echo "$ac_t""yes" 1>&6
6394     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6395   cat >> confdefs.h <<EOF
6396 #define $ac_tr_func 1
6397 EOF
6398  
6399 else
6400   echo "$ac_t""no" 1>&6
6401 fi
6402 done
6403
6404
6405 cat > conftest.$ac_ext <<EOF
6406 #line 6406 "configure"
6407 #include "confdefs.h"
6408 #include <unistd.h>
6409 EOF
6410 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6411   egrep "fdatasync" >/dev/null 2>&1; then
6412   rm -rf conftest*
6413   cat >> confdefs.h <<\EOF
6414 #define HAVE_FDATASYNC_DECL 1
6415 EOF
6416
6417 fi
6418 rm -f conftest*
6419
6420
6421 echo $ac_n "checking for PS_STRINGS""... $ac_c" 1>&6
6422 echo "configure:6422: checking for PS_STRINGS" >&5
6423 if eval "test \"`echo '$''{'pgac_cv_var_PS_STRINGS'+set}'`\" = set"; then
6424   echo $ac_n "(cached) $ac_c" 1>&6
6425 else
6426   cat > conftest.$ac_ext <<EOF
6427 #line 6427 "configure"
6428 #include "confdefs.h"
6429 #include <machine/vmparam.h>
6430 #include <sys/exec.h>
6431
6432 int main() {
6433 PS_STRINGS->ps_nargvstr = 1;
6434 PS_STRINGS->ps_argvstr = "foo";
6435 ; return 0; }
6436 EOF
6437 if { (eval echo configure:6437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6438   rm -rf conftest*
6439   pgac_cv_var_PS_STRINGS=yes
6440 else
6441   echo "configure: failed program was:" >&5
6442   cat conftest.$ac_ext >&5
6443   rm -rf conftest*
6444   pgac_cv_var_PS_STRINGS=no
6445 fi
6446 rm -f conftest*
6447 fi
6448
6449 echo "$ac_t""$pgac_cv_var_PS_STRINGS" 1>&6
6450 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
6451   cat >> confdefs.h <<\EOF
6452 #define HAVE_PS_STRINGS 
6453 EOF
6454
6455 fi
6456
6457 SNPRINTF=''
6458 echo $ac_n "checking for snprintf""... $ac_c" 1>&6
6459 echo "configure:6459: checking for snprintf" >&5
6460 if eval "test \"`echo '$''{'ac_cv_func_snprintf'+set}'`\" = set"; then
6461   echo $ac_n "(cached) $ac_c" 1>&6
6462 else
6463   cat > conftest.$ac_ext <<EOF
6464 #line 6464 "configure"
6465 #include "confdefs.h"
6466 /* System header to define __stub macros and hopefully few prototypes,
6467     which can conflict with char snprintf(); below.  */
6468 #include <assert.h>
6469 /* Override any gcc2 internal prototype to avoid an error.  */
6470 /* We use char because int might match the return type of a gcc2
6471     builtin and then its argument prototype would still apply.  */
6472 char snprintf();
6473
6474 int main() {
6475
6476 /* The GNU C library defines this for functions which it implements
6477     to always fail with ENOSYS.  Some functions are actually named
6478     something starting with __ and the normal name is an alias.  */
6479 #if defined (__stub_snprintf) || defined (__stub___snprintf)
6480 choke me
6481 #else
6482 snprintf();
6483 #endif
6484
6485 ; return 0; }
6486 EOF
6487 if { (eval echo configure:6487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6488   rm -rf conftest*
6489   eval "ac_cv_func_snprintf=yes"
6490 else
6491   echo "configure: failed program was:" >&5
6492   cat conftest.$ac_ext >&5
6493   rm -rf conftest*
6494   eval "ac_cv_func_snprintf=no"
6495 fi
6496 rm -f conftest*
6497 fi
6498
6499 if eval "test \"`echo '$ac_cv_func_'snprintf`\" = yes"; then
6500   echo "$ac_t""yes" 1>&6
6501   cat >> confdefs.h <<\EOF
6502 #define HAVE_SNPRINTF 1
6503 EOF
6504
6505 else
6506   echo "$ac_t""no" 1>&6
6507 SNPRINTF='snprintf.o'
6508 fi
6509
6510 echo $ac_n "checking for vsnprintf""... $ac_c" 1>&6
6511 echo "configure:6511: checking for vsnprintf" >&5
6512 if eval "test \"`echo '$''{'ac_cv_func_vsnprintf'+set}'`\" = set"; then
6513   echo $ac_n "(cached) $ac_c" 1>&6
6514 else
6515   cat > conftest.$ac_ext <<EOF
6516 #line 6516 "configure"
6517 #include "confdefs.h"
6518 /* System header to define __stub macros and hopefully few prototypes,
6519     which can conflict with char vsnprintf(); below.  */
6520 #include <assert.h>
6521 /* Override any gcc2 internal prototype to avoid an error.  */
6522 /* We use char because int might match the return type of a gcc2
6523     builtin and then its argument prototype would still apply.  */
6524 char vsnprintf();
6525
6526 int main() {
6527
6528 /* The GNU C library defines this for functions which it implements
6529     to always fail with ENOSYS.  Some functions are actually named
6530     something starting with __ and the normal name is an alias.  */
6531 #if defined (__stub_vsnprintf) || defined (__stub___vsnprintf)
6532 choke me
6533 #else
6534 vsnprintf();
6535 #endif
6536
6537 ; return 0; }
6538 EOF
6539 if { (eval echo configure:6539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6540   rm -rf conftest*
6541   eval "ac_cv_func_vsnprintf=yes"
6542 else
6543   echo "configure: failed program was:" >&5
6544   cat conftest.$ac_ext >&5
6545   rm -rf conftest*
6546   eval "ac_cv_func_vsnprintf=no"
6547 fi
6548 rm -f conftest*
6549 fi
6550
6551 if eval "test \"`echo '$ac_cv_func_'vsnprintf`\" = yes"; then
6552   echo "$ac_t""yes" 1>&6
6553   cat >> confdefs.h <<\EOF
6554 #define HAVE_VSNPRINTF 1
6555 EOF
6556
6557 else
6558   echo "$ac_t""no" 1>&6
6559 SNPRINTF='snprintf.o'
6560 fi
6561
6562
6563 cat > conftest.$ac_ext <<EOF
6564 #line 6564 "configure"
6565 #include "confdefs.h"
6566 #include <stdio.h>
6567 EOF
6568 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6569   egrep "snprintf" >/dev/null 2>&1; then
6570   rm -rf conftest*
6571   cat >> confdefs.h <<\EOF
6572 #define HAVE_SNPRINTF_DECL 1
6573 EOF
6574
6575 fi
6576 rm -f conftest*
6577
6578 cat > conftest.$ac_ext <<EOF
6579 #line 6579 "configure"
6580 #include "confdefs.h"
6581 #include <stdio.h>
6582 EOF
6583 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6584   egrep "vsnprintf" >/dev/null 2>&1; then
6585   rm -rf conftest*
6586   cat >> confdefs.h <<\EOF
6587 #define HAVE_VSNPRINTF_DECL 1
6588 EOF
6589
6590 fi
6591 rm -f conftest*
6592
6593
6594 # do this one the hard way in case isinf() is a macro
6595 echo $ac_n "checking for isinf""... $ac_c" 1>&6
6596 echo "configure:6596: checking for isinf" >&5
6597 if eval "test \"`echo '$''{'ac_cv_func_isinf'+set}'`\" = set"; then
6598   echo $ac_n "(cached) $ac_c" 1>&6
6599 else
6600   cat > conftest.$ac_ext <<EOF
6601 #line 6601 "configure"
6602 #include "confdefs.h"
6603 #include <math.h>
6604
6605 int main() {
6606 double x = 0.0; int res = isinf(x);
6607 ; return 0; }
6608 EOF
6609 if { (eval echo configure:6609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6610   rm -rf conftest*
6611   ac_cv_func_isinf=yes
6612 else
6613   echo "configure: failed program was:" >&5
6614   cat conftest.$ac_ext >&5
6615   rm -rf conftest*
6616   ac_cv_func_isinf=no
6617 fi
6618 rm -f conftest*
6619 fi
6620
6621 echo "$ac_t""$ac_cv_func_isinf" 1>&6
6622
6623 if test $ac_cv_func_isinf = yes ; then
6624   cat >> confdefs.h <<\EOF
6625 #define HAVE_ISINF 1
6626 EOF
6627
6628   ISINF=
6629 else
6630   ISINF='isinf.o'
6631   # Look for a way to implement a substitute for isinf()
6632   for ac_func in fpclass fp_class fp_class_d class
6633 do
6634 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6635 echo "configure:6635: checking for $ac_func" >&5
6636 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6637   echo $ac_n "(cached) $ac_c" 1>&6
6638 else
6639   cat > conftest.$ac_ext <<EOF
6640 #line 6640 "configure"
6641 #include "confdefs.h"
6642 /* System header to define __stub macros and hopefully few prototypes,
6643     which can conflict with char $ac_func(); below.  */
6644 #include <assert.h>
6645 /* Override any gcc2 internal prototype to avoid an error.  */
6646 /* We use char because int might match the return type of a gcc2
6647     builtin and then its argument prototype would still apply.  */
6648 char $ac_func();
6649
6650 int main() {
6651
6652 /* The GNU C library defines this for functions which it implements
6653     to always fail with ENOSYS.  Some functions are actually named
6654     something starting with __ and the normal name is an alias.  */
6655 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6656 choke me
6657 #else
6658 $ac_func();
6659 #endif
6660
6661 ; return 0; }
6662 EOF
6663 if { (eval echo configure:6663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6664   rm -rf conftest*
6665   eval "ac_cv_func_$ac_func=yes"
6666 else
6667   echo "configure: failed program was:" >&5
6668   cat conftest.$ac_ext >&5
6669   rm -rf conftest*
6670   eval "ac_cv_func_$ac_func=no"
6671 fi
6672 rm -f conftest*
6673 fi
6674
6675 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6676   echo "$ac_t""yes" 1>&6
6677     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6678   cat >> confdefs.h <<EOF
6679 #define $ac_tr_func 1
6680 EOF
6681  break
6682 else
6683   echo "$ac_t""no" 1>&6
6684 fi
6685 done
6686
6687 fi
6688
6689
6690 echo $ac_n "checking for getrusage""... $ac_c" 1>&6
6691 echo "configure:6691: checking for getrusage" >&5
6692 if eval "test \"`echo '$''{'ac_cv_func_getrusage'+set}'`\" = set"; then
6693   echo $ac_n "(cached) $ac_c" 1>&6
6694 else
6695   cat > conftest.$ac_ext <<EOF
6696 #line 6696 "configure"
6697 #include "confdefs.h"
6698 /* System header to define __stub macros and hopefully few prototypes,
6699     which can conflict with char getrusage(); below.  */
6700 #include <assert.h>
6701 /* Override any gcc2 internal prototype to avoid an error.  */
6702 /* We use char because int might match the return type of a gcc2
6703     builtin and then its argument prototype would still apply.  */
6704 char getrusage();
6705
6706 int main() {
6707
6708 /* The GNU C library defines this for functions which it implements
6709     to always fail with ENOSYS.  Some functions are actually named
6710     something starting with __ and the normal name is an alias.  */
6711 #if defined (__stub_getrusage) || defined (__stub___getrusage)
6712 choke me
6713 #else
6714 getrusage();
6715 #endif
6716
6717 ; return 0; }
6718 EOF
6719 if { (eval echo configure:6719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6720   rm -rf conftest*
6721   eval "ac_cv_func_getrusage=yes"
6722 else
6723   echo "configure: failed program was:" >&5
6724   cat conftest.$ac_ext >&5
6725   rm -rf conftest*
6726   eval "ac_cv_func_getrusage=no"
6727 fi
6728 rm -f conftest*
6729 fi
6730
6731 if eval "test \"`echo '$ac_cv_func_'getrusage`\" = yes"; then
6732   echo "$ac_t""yes" 1>&6
6733   cat >> confdefs.h <<\EOF
6734 #define HAVE_GETRUSAGE 1
6735 EOF
6736
6737 else
6738   echo "$ac_t""no" 1>&6
6739 GETRUSAGE='getrusage.o'
6740 fi
6741
6742
6743 echo $ac_n "checking for srandom""... $ac_c" 1>&6
6744 echo "configure:6744: checking for srandom" >&5
6745 if eval "test \"`echo '$''{'ac_cv_func_srandom'+set}'`\" = set"; then
6746   echo $ac_n "(cached) $ac_c" 1>&6
6747 else
6748   cat > conftest.$ac_ext <<EOF
6749 #line 6749 "configure"
6750 #include "confdefs.h"
6751 /* System header to define __stub macros and hopefully few prototypes,
6752     which can conflict with char srandom(); below.  */
6753 #include <assert.h>
6754 /* Override any gcc2 internal prototype to avoid an error.  */
6755 /* We use char because int might match the return type of a gcc2
6756     builtin and then its argument prototype would still apply.  */
6757 char srandom();
6758
6759 int main() {
6760
6761 /* The GNU C library defines this for functions which it implements
6762     to always fail with ENOSYS.  Some functions are actually named
6763     something starting with __ and the normal name is an alias.  */
6764 #if defined (__stub_srandom) || defined (__stub___srandom)
6765 choke me
6766 #else
6767 srandom();
6768 #endif
6769
6770 ; return 0; }
6771 EOF
6772 if { (eval echo configure:6772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6773   rm -rf conftest*
6774   eval "ac_cv_func_srandom=yes"
6775 else
6776   echo "configure: failed program was:" >&5
6777   cat conftest.$ac_ext >&5
6778   rm -rf conftest*
6779   eval "ac_cv_func_srandom=no"
6780 fi
6781 rm -f conftest*
6782 fi
6783
6784 if eval "test \"`echo '$ac_cv_func_'srandom`\" = yes"; then
6785   echo "$ac_t""yes" 1>&6
6786   cat >> confdefs.h <<\EOF
6787 #define HAVE_SRANDOM 1
6788 EOF
6789
6790 else
6791   echo "$ac_t""no" 1>&6
6792 SRANDOM='srandom.o'
6793 fi
6794
6795
6796 echo $ac_n "checking for gethostname""... $ac_c" 1>&6
6797 echo "configure:6797: checking for gethostname" >&5
6798 if eval "test \"`echo '$''{'ac_cv_func_gethostname'+set}'`\" = set"; then
6799   echo $ac_n "(cached) $ac_c" 1>&6
6800 else
6801   cat > conftest.$ac_ext <<EOF
6802 #line 6802 "configure"
6803 #include "confdefs.h"
6804 /* System header to define __stub macros and hopefully few prototypes,
6805     which can conflict with char gethostname(); below.  */
6806 #include <assert.h>
6807 /* Override any gcc2 internal prototype to avoid an error.  */
6808 /* We use char because int might match the return type of a gcc2
6809     builtin and then its argument prototype would still apply.  */
6810 char gethostname();
6811
6812 int main() {
6813
6814 /* The GNU C library defines this for functions which it implements
6815     to always fail with ENOSYS.  Some functions are actually named
6816     something starting with __ and the normal name is an alias.  */
6817 #if defined (__stub_gethostname) || defined (__stub___gethostname)
6818 choke me
6819 #else
6820 gethostname();
6821 #endif
6822
6823 ; return 0; }
6824 EOF
6825 if { (eval echo configure:6825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6826   rm -rf conftest*
6827   eval "ac_cv_func_gethostname=yes"
6828 else
6829   echo "configure: failed program was:" >&5
6830   cat conftest.$ac_ext >&5
6831   rm -rf conftest*
6832   eval "ac_cv_func_gethostname=no"
6833 fi
6834 rm -f conftest*
6835 fi
6836
6837 if eval "test \"`echo '$ac_cv_func_'gethostname`\" = yes"; then
6838   echo "$ac_t""yes" 1>&6
6839   cat >> confdefs.h <<\EOF
6840 #define HAVE_GETHOSTNAME 1
6841 EOF
6842
6843 else
6844   echo "$ac_t""no" 1>&6
6845 GETHOSTNAME='gethostname.o'
6846 fi
6847
6848
6849 echo $ac_n "checking for random""... $ac_c" 1>&6
6850 echo "configure:6850: checking for random" >&5
6851 if eval "test \"`echo '$''{'ac_cv_func_random'+set}'`\" = set"; then
6852   echo $ac_n "(cached) $ac_c" 1>&6
6853 else
6854   cat > conftest.$ac_ext <<EOF
6855 #line 6855 "configure"
6856 #include "confdefs.h"
6857 /* System header to define __stub macros and hopefully few prototypes,
6858     which can conflict with char random(); below.  */
6859 #include <assert.h>
6860 /* Override any gcc2 internal prototype to avoid an error.  */
6861 /* We use char because int might match the return type of a gcc2
6862     builtin and then its argument prototype would still apply.  */
6863 char random();
6864
6865 int main() {
6866
6867 /* The GNU C library defines this for functions which it implements
6868     to always fail with ENOSYS.  Some functions are actually named
6869     something starting with __ and the normal name is an alias.  */
6870 #if defined (__stub_random) || defined (__stub___random)
6871 choke me
6872 #else
6873 random();
6874 #endif
6875
6876 ; return 0; }
6877 EOF
6878 if { (eval echo configure:6878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6879   rm -rf conftest*
6880   eval "ac_cv_func_random=yes"
6881 else
6882   echo "configure: failed program was:" >&5
6883   cat conftest.$ac_ext >&5
6884   rm -rf conftest*
6885   eval "ac_cv_func_random=no"
6886 fi
6887 rm -f conftest*
6888 fi
6889
6890 if eval "test \"`echo '$ac_cv_func_'random`\" = yes"; then
6891   echo "$ac_t""yes" 1>&6
6892   cat >> confdefs.h <<\EOF
6893 #define HAVE_RANDOM 1
6894 EOF
6895
6896 else
6897   echo "$ac_t""no" 1>&6
6898 MISSING_RANDOM='random.o'
6899 fi
6900
6901
6902 echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
6903 echo "configure:6903: checking for inet_aton" >&5
6904 if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
6905   echo $ac_n "(cached) $ac_c" 1>&6
6906 else
6907   cat > conftest.$ac_ext <<EOF
6908 #line 6908 "configure"
6909 #include "confdefs.h"
6910 /* System header to define __stub macros and hopefully few prototypes,
6911     which can conflict with char inet_aton(); below.  */
6912 #include <assert.h>
6913 /* Override any gcc2 internal prototype to avoid an error.  */
6914 /* We use char because int might match the return type of a gcc2
6915     builtin and then its argument prototype would still apply.  */
6916 char inet_aton();
6917
6918 int main() {
6919
6920 /* The GNU C library defines this for functions which it implements
6921     to always fail with ENOSYS.  Some functions are actually named
6922     something starting with __ and the normal name is an alias.  */
6923 #if defined (__stub_inet_aton) || defined (__stub___inet_aton)
6924 choke me
6925 #else
6926 inet_aton();
6927 #endif
6928
6929 ; return 0; }
6930 EOF
6931 if { (eval echo configure:6931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6932   rm -rf conftest*
6933   eval "ac_cv_func_inet_aton=yes"
6934 else
6935   echo "configure: failed program was:" >&5
6936   cat conftest.$ac_ext >&5
6937   rm -rf conftest*
6938   eval "ac_cv_func_inet_aton=no"
6939 fi
6940 rm -f conftest*
6941 fi
6942
6943 if eval "test \"`echo '$ac_cv_func_'inet_aton`\" = yes"; then
6944   echo "$ac_t""yes" 1>&6
6945   cat >> confdefs.h <<\EOF
6946 #define HAVE_INET_ATON 1
6947 EOF
6948
6949 else
6950   echo "$ac_t""no" 1>&6
6951 INET_ATON='inet_aton.o'
6952 fi
6953
6954
6955 echo $ac_n "checking for strerror""... $ac_c" 1>&6
6956 echo "configure:6956: checking for strerror" >&5
6957 if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then
6958   echo $ac_n "(cached) $ac_c" 1>&6
6959 else
6960   cat > conftest.$ac_ext <<EOF
6961 #line 6961 "configure"
6962 #include "confdefs.h"
6963 /* System header to define __stub macros and hopefully few prototypes,
6964     which can conflict with char strerror(); below.  */
6965 #include <assert.h>
6966 /* Override any gcc2 internal prototype to avoid an error.  */
6967 /* We use char because int might match the return type of a gcc2
6968     builtin and then its argument prototype would still apply.  */
6969 char strerror();
6970
6971 int main() {
6972
6973 /* The GNU C library defines this for functions which it implements
6974     to always fail with ENOSYS.  Some functions are actually named
6975     something starting with __ and the normal name is an alias.  */
6976 #if defined (__stub_strerror) || defined (__stub___strerror)
6977 choke me
6978 #else
6979 strerror();
6980 #endif
6981
6982 ; return 0; }
6983 EOF
6984 if { (eval echo configure:6984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6985   rm -rf conftest*
6986   eval "ac_cv_func_strerror=yes"
6987 else
6988   echo "configure: failed program was:" >&5
6989   cat conftest.$ac_ext >&5
6990   rm -rf conftest*
6991   eval "ac_cv_func_strerror=no"
6992 fi
6993 rm -f conftest*
6994 fi
6995
6996 if eval "test \"`echo '$ac_cv_func_'strerror`\" = yes"; then
6997   echo "$ac_t""yes" 1>&6
6998   cat >> confdefs.h <<\EOF
6999 #define HAVE_STRERROR 1
7000 EOF
7001
7002 else
7003   echo "$ac_t""no" 1>&6
7004 STRERROR='strerror.o'
7005 fi
7006
7007
7008 echo $ac_n "checking for strdup""... $ac_c" 1>&6
7009 echo "configure:7009: checking for strdup" >&5
7010 if eval "test \"`echo '$''{'ac_cv_func_strdup'+set}'`\" = set"; then
7011   echo $ac_n "(cached) $ac_c" 1>&6
7012 else
7013   cat > conftest.$ac_ext <<EOF
7014 #line 7014 "configure"
7015 #include "confdefs.h"
7016 /* System header to define __stub macros and hopefully few prototypes,
7017     which can conflict with char strdup(); below.  */
7018 #include <assert.h>
7019 /* Override any gcc2 internal prototype to avoid an error.  */
7020 /* We use char because int might match the return type of a gcc2
7021     builtin and then its argument prototype would still apply.  */
7022 char strdup();
7023
7024 int main() {
7025
7026 /* The GNU C library defines this for functions which it implements
7027     to always fail with ENOSYS.  Some functions are actually named
7028     something starting with __ and the normal name is an alias.  */
7029 #if defined (__stub_strdup) || defined (__stub___strdup)
7030 choke me
7031 #else
7032 strdup();
7033 #endif
7034
7035 ; return 0; }
7036 EOF
7037 if { (eval echo configure:7037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7038   rm -rf conftest*
7039   eval "ac_cv_func_strdup=yes"
7040 else
7041   echo "configure: failed program was:" >&5
7042   cat conftest.$ac_ext >&5
7043   rm -rf conftest*
7044   eval "ac_cv_func_strdup=no"
7045 fi
7046 rm -f conftest*
7047 fi
7048
7049 if eval "test \"`echo '$ac_cv_func_'strdup`\" = yes"; then
7050   echo "$ac_t""yes" 1>&6
7051   cat >> confdefs.h <<\EOF
7052 #define HAVE_STRDUP 1
7053 EOF
7054
7055 else
7056   echo "$ac_t""no" 1>&6
7057 STRDUP='../../utils/strdup.o'
7058 fi
7059
7060
7061 echo $ac_n "checking for strtol""... $ac_c" 1>&6
7062 echo "configure:7062: checking for strtol" >&5
7063 if eval "test \"`echo '$''{'ac_cv_func_strtol'+set}'`\" = set"; then
7064   echo $ac_n "(cached) $ac_c" 1>&6
7065 else
7066   cat > conftest.$ac_ext <<EOF
7067 #line 7067 "configure"
7068 #include "confdefs.h"
7069 /* System header to define __stub macros and hopefully few prototypes,
7070     which can conflict with char strtol(); below.  */
7071 #include <assert.h>
7072 /* Override any gcc2 internal prototype to avoid an error.  */
7073 /* We use char because int might match the return type of a gcc2
7074     builtin and then its argument prototype would still apply.  */
7075 char strtol();
7076
7077 int main() {
7078
7079 /* The GNU C library defines this for functions which it implements
7080     to always fail with ENOSYS.  Some functions are actually named
7081     something starting with __ and the normal name is an alias.  */
7082 #if defined (__stub_strtol) || defined (__stub___strtol)
7083 choke me
7084 #else
7085 strtol();
7086 #endif
7087
7088 ; return 0; }
7089 EOF
7090 if { (eval echo configure:7090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7091   rm -rf conftest*
7092   eval "ac_cv_func_strtol=yes"
7093 else
7094   echo "configure: failed program was:" >&5
7095   cat conftest.$ac_ext >&5
7096   rm -rf conftest*
7097   eval "ac_cv_func_strtol=no"
7098 fi
7099 rm -f conftest*
7100 fi
7101
7102 if eval "test \"`echo '$ac_cv_func_'strtol`\" = yes"; then
7103   echo "$ac_t""yes" 1>&6
7104   cat >> confdefs.h <<\EOF
7105 #define HAVE_STRTOL 1
7106 EOF
7107
7108 else
7109   echo "$ac_t""no" 1>&6
7110 STRTOL='strtol.o'
7111 fi
7112
7113
7114 echo $ac_n "checking for strtoul""... $ac_c" 1>&6
7115 echo "configure:7115: checking for strtoul" >&5
7116 if eval "test \"`echo '$''{'ac_cv_func_strtoul'+set}'`\" = set"; then
7117   echo $ac_n "(cached) $ac_c" 1>&6
7118 else
7119   cat > conftest.$ac_ext <<EOF
7120 #line 7120 "configure"
7121 #include "confdefs.h"
7122 /* System header to define __stub macros and hopefully few prototypes,
7123     which can conflict with char strtoul(); below.  */
7124 #include <assert.h>
7125 /* Override any gcc2 internal prototype to avoid an error.  */
7126 /* We use char because int might match the return type of a gcc2
7127     builtin and then its argument prototype would still apply.  */
7128 char strtoul();
7129
7130 int main() {
7131
7132 /* The GNU C library defines this for functions which it implements
7133     to always fail with ENOSYS.  Some functions are actually named
7134     something starting with __ and the normal name is an alias.  */
7135 #if defined (__stub_strtoul) || defined (__stub___strtoul)
7136 choke me
7137 #else
7138 strtoul();
7139 #endif
7140
7141 ; return 0; }
7142 EOF
7143 if { (eval echo configure:7143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7144   rm -rf conftest*
7145   eval "ac_cv_func_strtoul=yes"
7146 else
7147   echo "configure: failed program was:" >&5
7148   cat conftest.$ac_ext >&5
7149   rm -rf conftest*
7150   eval "ac_cv_func_strtoul=no"
7151 fi
7152 rm -f conftest*
7153 fi
7154
7155 if eval "test \"`echo '$ac_cv_func_'strtoul`\" = yes"; then
7156   echo "$ac_t""yes" 1>&6
7157   cat >> confdefs.h <<\EOF
7158 #define HAVE_STRTOUL 1
7159 EOF
7160
7161 else
7162   echo "$ac_t""no" 1>&6
7163 STRTOUL='strtoul.o'
7164 fi
7165
7166
7167 echo $ac_n "checking for strcasecmp""... $ac_c" 1>&6
7168 echo "configure:7168: checking for strcasecmp" >&5
7169 if eval "test \"`echo '$''{'ac_cv_func_strcasecmp'+set}'`\" = set"; then
7170   echo $ac_n "(cached) $ac_c" 1>&6
7171 else
7172   cat > conftest.$ac_ext <<EOF
7173 #line 7173 "configure"
7174 #include "confdefs.h"
7175 /* System header to define __stub macros and hopefully few prototypes,
7176     which can conflict with char strcasecmp(); below.  */
7177 #include <assert.h>
7178 /* Override any gcc2 internal prototype to avoid an error.  */
7179 /* We use char because int might match the return type of a gcc2
7180     builtin and then its argument prototype would still apply.  */
7181 char strcasecmp();
7182
7183 int main() {
7184
7185 /* The GNU C library defines this for functions which it implements
7186     to always fail with ENOSYS.  Some functions are actually named
7187     something starting with __ and the normal name is an alias.  */
7188 #if defined (__stub_strcasecmp) || defined (__stub___strcasecmp)
7189 choke me
7190 #else
7191 strcasecmp();
7192 #endif
7193
7194 ; return 0; }
7195 EOF
7196 if { (eval echo configure:7196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7197   rm -rf conftest*
7198   eval "ac_cv_func_strcasecmp=yes"
7199 else
7200   echo "configure: failed program was:" >&5
7201   cat conftest.$ac_ext >&5
7202   rm -rf conftest*
7203   eval "ac_cv_func_strcasecmp=no"
7204 fi
7205 rm -f conftest*
7206 fi
7207
7208 if eval "test \"`echo '$ac_cv_func_'strcasecmp`\" = yes"; then
7209   echo "$ac_t""yes" 1>&6
7210   cat >> confdefs.h <<\EOF
7211 #define HAVE_STRCASECMP 1
7212 EOF
7213
7214 else
7215   echo "$ac_t""no" 1>&6
7216 STRCASECMP='strcasecmp.o'
7217 fi
7218
7219
7220 echo $ac_n "checking for cbrt""... $ac_c" 1>&6
7221 echo "configure:7221: checking for cbrt" >&5
7222 if eval "test \"`echo '$''{'ac_cv_func_cbrt'+set}'`\" = set"; then
7223   echo $ac_n "(cached) $ac_c" 1>&6
7224 else
7225   cat > conftest.$ac_ext <<EOF
7226 #line 7226 "configure"
7227 #include "confdefs.h"
7228 /* System header to define __stub macros and hopefully few prototypes,
7229     which can conflict with char cbrt(); below.  */
7230 #include <assert.h>
7231 /* Override any gcc2 internal prototype to avoid an error.  */
7232 /* We use char because int might match the return type of a gcc2
7233     builtin and then its argument prototype would still apply.  */
7234 char cbrt();
7235
7236 int main() {
7237
7238 /* The GNU C library defines this for functions which it implements
7239     to always fail with ENOSYS.  Some functions are actually named
7240     something starting with __ and the normal name is an alias.  */
7241 #if defined (__stub_cbrt) || defined (__stub___cbrt)
7242 choke me
7243 #else
7244 cbrt();
7245 #endif
7246
7247 ; return 0; }
7248 EOF
7249 if { (eval echo configure:7249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7250   rm -rf conftest*
7251   eval "ac_cv_func_cbrt=yes"
7252 else
7253   echo "configure: failed program was:" >&5
7254   cat conftest.$ac_ext >&5
7255   rm -rf conftest*
7256   eval "ac_cv_func_cbrt=no"
7257 fi
7258 rm -f conftest*
7259 fi
7260
7261 if eval "test \"`echo '$ac_cv_func_'cbrt`\" = yes"; then
7262   echo "$ac_t""yes" 1>&6
7263   cat >> confdefs.h <<\EOF
7264 #define HAVE_CBRT 1
7265 EOF
7266
7267 else
7268   echo "$ac_t""no" 1>&6
7269 echo $ac_n "checking for cbrt in -lm""... $ac_c" 1>&6
7270 echo "configure:7270: checking for cbrt in -lm" >&5
7271 ac_lib_var=`echo m'_'cbrt | sed 'y%./+-%__p_%'`
7272 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7273   echo $ac_n "(cached) $ac_c" 1>&6
7274 else
7275   ac_save_LIBS="$LIBS"
7276 LIBS="-lm  $LIBS"
7277 cat > conftest.$ac_ext <<EOF
7278 #line 7278 "configure"
7279 #include "confdefs.h"
7280 /* Override any gcc2 internal prototype to avoid an error.  */
7281 /* We use char because int might match the return type of a gcc2
7282     builtin and then its argument prototype would still apply.  */
7283 char cbrt();
7284
7285 int main() {
7286 cbrt()
7287 ; return 0; }
7288 EOF
7289 if { (eval echo configure:7289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7290   rm -rf conftest*
7291   eval "ac_cv_lib_$ac_lib_var=yes"
7292 else
7293   echo "configure: failed program was:" >&5
7294   cat conftest.$ac_ext >&5
7295   rm -rf conftest*
7296   eval "ac_cv_lib_$ac_lib_var=no"
7297 fi
7298 rm -f conftest*
7299 LIBS="$ac_save_LIBS"
7300
7301 fi
7302 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7303   echo "$ac_t""yes" 1>&6
7304   cat >> confdefs.h <<\EOF
7305 #define HAVE_CBRT 1
7306 EOF
7307
7308 else
7309   echo "$ac_t""no" 1>&6
7310 fi
7311
7312 fi
7313
7314
7315 # On HPUX 9, rint() is not in regular libm.a but in /lib/pa1.1/libm.a;
7316 # this hackery with HPUXMATHLIB allows us to cope.
7317 HPUXMATHLIB=""
7318 case $host_cpu in
7319   hppa1.1) 
7320         if [ -r /lib/pa1.1/libm.a ] ; then
7321             HPUXMATHLIB="-L /lib/pa1.1 -lm"
7322         fi ;;
7323 esac
7324
7325
7326 echo $ac_n "checking for rint""... $ac_c" 1>&6
7327 echo "configure:7327: checking for rint" >&5
7328 if eval "test \"`echo '$''{'ac_cv_func_rint'+set}'`\" = set"; then
7329   echo $ac_n "(cached) $ac_c" 1>&6
7330 else
7331   cat > conftest.$ac_ext <<EOF
7332 #line 7332 "configure"
7333 #include "confdefs.h"
7334 /* System header to define __stub macros and hopefully few prototypes,
7335     which can conflict with char rint(); below.  */
7336 #include <assert.h>
7337 /* Override any gcc2 internal prototype to avoid an error.  */
7338 /* We use char because int might match the return type of a gcc2
7339     builtin and then its argument prototype would still apply.  */
7340 char rint();
7341
7342 int main() {
7343
7344 /* The GNU C library defines this for functions which it implements
7345     to always fail with ENOSYS.  Some functions are actually named
7346     something starting with __ and the normal name is an alias.  */
7347 #if defined (__stub_rint) || defined (__stub___rint)
7348 choke me
7349 #else
7350 rint();
7351 #endif
7352
7353 ; return 0; }
7354 EOF
7355 if { (eval echo configure:7355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7356   rm -rf conftest*
7357   eval "ac_cv_func_rint=yes"
7358 else
7359   echo "configure: failed program was:" >&5
7360   cat conftest.$ac_ext >&5
7361   rm -rf conftest*
7362   eval "ac_cv_func_rint=no"
7363 fi
7364 rm -f conftest*
7365 fi
7366
7367 if eval "test \"`echo '$ac_cv_func_'rint`\" = yes"; then
7368   echo "$ac_t""yes" 1>&6
7369   cat >> confdefs.h <<\EOF
7370 #define HAVE_RINT 1
7371 EOF
7372
7373 else
7374   echo "$ac_t""no" 1>&6
7375 echo $ac_n "checking for rint in -lm""... $ac_c" 1>&6
7376 echo "configure:7376: checking for rint in -lm" >&5
7377 ac_lib_var=`echo m'_'rint | sed 'y%./+-%__p_%'`
7378 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7379   echo $ac_n "(cached) $ac_c" 1>&6
7380 else
7381   ac_save_LIBS="$LIBS"
7382 LIBS="-lm $HPUXMATHLIB $LIBS"
7383 cat > conftest.$ac_ext <<EOF
7384 #line 7384 "configure"
7385 #include "confdefs.h"
7386 /* Override any gcc2 internal prototype to avoid an error.  */
7387 /* We use char because int might match the return type of a gcc2
7388     builtin and then its argument prototype would still apply.  */
7389 char rint();
7390
7391 int main() {
7392 rint()
7393 ; return 0; }
7394 EOF
7395 if { (eval echo configure:7395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7396   rm -rf conftest*
7397   eval "ac_cv_lib_$ac_lib_var=yes"
7398 else
7399   echo "configure: failed program was:" >&5
7400   cat conftest.$ac_ext >&5
7401   rm -rf conftest*
7402   eval "ac_cv_lib_$ac_lib_var=no"
7403 fi
7404 rm -f conftest*
7405 LIBS="$ac_save_LIBS"
7406
7407 fi
7408 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7409   echo "$ac_t""yes" 1>&6
7410   cat >> confdefs.h <<\EOF
7411 #define HAVE_RINT 1
7412 EOF
7413
7414 else
7415   echo "$ac_t""no" 1>&6
7416 fi
7417
7418 fi
7419
7420
7421
7422 # Readline versions < 2.1 don't have rl_completion_append_character
7423 echo $ac_n "checking for rl_completion_append_character""... $ac_c" 1>&6
7424 echo "configure:7424: checking for rl_completion_append_character" >&5
7425 cat > conftest.$ac_ext <<EOF
7426 #line 7426 "configure"
7427 #include "confdefs.h"
7428 #include <stdio.h>
7429 #ifdef HAVE_READLINE_READLINE_H
7430 # include <readline/readline.h>
7431 #elif defined(HAVE_READLINE_H)
7432 # include <readline.h>
7433 #endif
7434
7435 int main() {
7436 rl_completion_append_character = 'x';
7437 ; return 0; }
7438 EOF
7439 if { (eval echo configure:7439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7440   rm -rf conftest*
7441   echo "$ac_t""yes" 1>&6
7442 cat >> confdefs.h <<\EOF
7443 #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
7444 EOF
7445
7446 else
7447   echo "configure: failed program was:" >&5
7448   cat conftest.$ac_ext >&5
7449   rm -rf conftest*
7450   echo "$ac_t""no" 1>&6
7451 fi
7452 rm -f conftest*
7453
7454 for ac_func in rl_completion_matches rl_filename_completion_function
7455 do
7456 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7457 echo "configure:7457: checking for $ac_func" >&5
7458 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7459   echo $ac_n "(cached) $ac_c" 1>&6
7460 else
7461   cat > conftest.$ac_ext <<EOF
7462 #line 7462 "configure"
7463 #include "confdefs.h"
7464 /* System header to define __stub macros and hopefully few prototypes,
7465     which can conflict with char $ac_func(); below.  */
7466 #include <assert.h>
7467 /* Override any gcc2 internal prototype to avoid an error.  */
7468 /* We use char because int might match the return type of a gcc2
7469     builtin and then its argument prototype would still apply.  */
7470 char $ac_func();
7471
7472 int main() {
7473
7474 /* The GNU C library defines this for functions which it implements
7475     to always fail with ENOSYS.  Some functions are actually named
7476     something starting with __ and the normal name is an alias.  */
7477 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7478 choke me
7479 #else
7480 $ac_func();
7481 #endif
7482
7483 ; return 0; }
7484 EOF
7485 if { (eval echo configure:7485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7486   rm -rf conftest*
7487   eval "ac_cv_func_$ac_func=yes"
7488 else
7489   echo "configure: failed program was:" >&5
7490   cat conftest.$ac_ext >&5
7491   rm -rf conftest*
7492   eval "ac_cv_func_$ac_func=no"
7493 fi
7494 rm -f conftest*
7495 fi
7496
7497 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7498   echo "$ac_t""yes" 1>&6
7499     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7500   cat >> confdefs.h <<EOF
7501 #define $ac_tr_func 1
7502 EOF
7503  
7504 else
7505   echo "$ac_t""no" 1>&6
7506 fi
7507 done
7508
7509
7510
7511 echo $ac_n "checking for finite""... $ac_c" 1>&6
7512 echo "configure:7512: checking for finite" >&5
7513 cat > conftest.$ac_ext <<EOF
7514 #line 7514 "configure"
7515 #include "confdefs.h"
7516 #include <math.h>
7517 int main() {
7518 int dummy=finite(1.0);
7519 ; return 0; }
7520 EOF
7521 if { (eval echo configure:7521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7522   rm -rf conftest*
7523   cat >> confdefs.h <<\EOF
7524 #define HAVE_FINITE 1
7525 EOF
7526  echo "$ac_t""yes" 1>&6
7527 else
7528   echo "configure: failed program was:" >&5
7529   cat conftest.$ac_ext >&5
7530   rm -rf conftest*
7531   echo "$ac_t""no" 1>&6
7532 fi
7533 rm -f conftest*
7534
7535 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
7536 echo "configure:7536: checking for sigsetjmp" >&5
7537 cat > conftest.$ac_ext <<EOF
7538 #line 7538 "configure"
7539 #include "confdefs.h"
7540 #include <setjmp.h>
7541 int main() {
7542 sigjmp_buf x; sigsetjmp(x, 1);
7543 ; return 0; }
7544 EOF
7545 if { (eval echo configure:7545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7546   rm -rf conftest*
7547   cat >> confdefs.h <<\EOF
7548 #define HAVE_SIGSETJMP 1
7549 EOF
7550  echo "$ac_t""yes" 1>&6
7551 else
7552   echo "configure: failed program was:" >&5
7553   cat conftest.$ac_ext >&5
7554   rm -rf conftest*
7555   echo "$ac_t""no" 1>&6
7556 fi
7557 rm -f conftest*
7558
7559
7560 # Check whether --enable-syslog was given
7561 if test x"${enable_syslog+set}" = xset; then
7562   case $enable_syslog in
7563     yes)
7564       echo $ac_n "checking for syslog""... $ac_c" 1>&6
7565 echo "configure:7565: checking for syslog" >&5
7566 if eval "test \"`echo '$''{'ac_cv_func_syslog'+set}'`\" = set"; then
7567   echo $ac_n "(cached) $ac_c" 1>&6
7568 else
7569   cat > conftest.$ac_ext <<EOF
7570 #line 7570 "configure"
7571 #include "confdefs.h"
7572 /* System header to define __stub macros and hopefully few prototypes,
7573     which can conflict with char syslog(); below.  */
7574 #include <assert.h>
7575 /* Override any gcc2 internal prototype to avoid an error.  */
7576 /* We use char because int might match the return type of a gcc2
7577     builtin and then its argument prototype would still apply.  */
7578 char syslog();
7579
7580 int main() {
7581
7582 /* The GNU C library defines this for functions which it implements
7583     to always fail with ENOSYS.  Some functions are actually named
7584     something starting with __ and the normal name is an alias.  */
7585 #if defined (__stub_syslog) || defined (__stub___syslog)
7586 choke me
7587 #else
7588 syslog();
7589 #endif
7590
7591 ; return 0; }
7592 EOF
7593 if { (eval echo configure:7593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7594   rm -rf conftest*
7595   eval "ac_cv_func_syslog=yes"
7596 else
7597   echo "configure: failed program was:" >&5
7598   cat conftest.$ac_ext >&5
7599   rm -rf conftest*
7600   eval "ac_cv_func_syslog=no"
7601 fi
7602 rm -f conftest*
7603 fi
7604
7605 if eval "test \"`echo '$ac_cv_func_'syslog`\" = yes"; then
7606   echo "$ac_t""yes" 1>&6
7607   cat >> confdefs.h <<\EOF
7608 #define ENABLE_SYSLOG 1
7609 EOF
7610
7611 else
7612   echo "$ac_t""no" 1>&6
7613 { echo "configure: error: no syslog interface found" 1>&2; exit 1; }
7614 fi
7615
7616       ;;
7617     no)
7618       :
7619       ;;
7620     *)
7621       enableval=$enable_syslog
7622       { echo "configure: error: no argument expected for --enable-syslog option" 1>&2; exit 1; }
7623       ;;
7624   esac # $enable_syslog
7625 else
7626   enable_syslog=no
7627
7628 fi
7629
7630
7631 echo $ac_n "checking for optreset""... $ac_c" 1>&6
7632 echo "configure:7632: checking for optreset" >&5
7633 if eval "test \"`echo '$''{'pgac_cv_var_int_optreset'+set}'`\" = set"; then
7634   echo $ac_n "(cached) $ac_c" 1>&6
7635 else
7636   cat > conftest.$ac_ext <<EOF
7637 #line 7637 "configure"
7638 #include "confdefs.h"
7639 #include <unistd.h>
7640 int main() {
7641 extern int optreset; optreset = 1;
7642 ; return 0; }
7643 EOF
7644 if { (eval echo configure:7644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7645   rm -rf conftest*
7646   pgac_cv_var_int_optreset=yes
7647 else
7648   echo "configure: failed program was:" >&5
7649   cat conftest.$ac_ext >&5
7650   rm -rf conftest*
7651   pgac_cv_var_int_optreset=no
7652 fi
7653 rm -f conftest*
7654 fi
7655
7656 echo "$ac_t""$pgac_cv_var_int_optreset" 1>&6
7657 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
7658   cat >> confdefs.h <<\EOF
7659 #define HAVE_INT_OPTRESET 1
7660 EOF
7661
7662 fi
7663
7664
7665 # This test makes sure that run tests work at all.  Sometimes a shared
7666 # library is found by the linker, but the runtime linker can't find it.
7667 # This check should come after all modifications of compiler or linker
7668 # variables, and before any other run tests.
7669 echo $ac_n "checking test program""... $ac_c" 1>&6
7670 echo "configure:7670: checking test program" >&5
7671 if test "$cross_compiling" = yes; then
7672   echo "$ac_t""cross-compiling" 1>&6
7673 else
7674   cat > conftest.$ac_ext <<EOF
7675 #line 7675 "configure"
7676 #include "confdefs.h"
7677 int main() { return 0; }
7678 EOF
7679 if { (eval echo configure:7679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7680 then
7681   echo "$ac_t""ok" 1>&6
7682 else
7683   echo "configure: failed program was:" >&5
7684   cat conftest.$ac_ext >&5
7685   rm -fr conftest*
7686   echo "$ac_t""failed" 1>&6
7687 { echo "configure: error: 
7688 *** Could not execute a simple test program.  This may be a problem
7689 *** related to locating shared libraries.  Check the file 'config.log'
7690 *** for the exact reason." 1>&2; exit 1; }
7691 fi
7692 rm -fr conftest*
7693 fi
7694
7695
7696
7697
7698 echo $ac_n "checking whether long int is 64 bits""... $ac_c" 1>&6
7699 echo "configure:7699: checking whether long int is 64 bits" >&5
7700 if eval "test \"`echo '$''{'pgac_cv_type_long_int_64'+set}'`\" = set"; then
7701   echo $ac_n "(cached) $ac_c" 1>&6
7702 else
7703   if test "$cross_compiling" = yes; then
7704   pgac_cv_type_long_int_64=no
7705 echo "configure: warning: 64 bit arithmetic disabled when cross-compiling" 1>&2
7706 else
7707   cat > conftest.$ac_ext <<EOF
7708 #line 7708 "configure"
7709 #include "confdefs.h"
7710 typedef long int int64;
7711
7712 /*
7713  * These are globals to discourage the compiler from folding all the
7714  * arithmetic tests down to compile-time constants.
7715  */
7716 int64 a = 20000001;
7717 int64 b = 40000005;
7718
7719 int does_int64_work()
7720 {
7721   int64 c,d;
7722
7723   if (sizeof(int64) != 8)
7724     return 0;                   /* definitely not the right size */
7725
7726   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
7727   c = a * b;
7728   d = (c + b) / b;
7729   if (d != a+1)
7730     return 0;
7731   return 1;
7732 }
7733 main() {
7734   exit(! does_int64_work());
7735 }
7736 EOF
7737 if { (eval echo configure:7737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7738 then
7739   pgac_cv_type_long_int_64=yes
7740 else
7741   echo "configure: failed program was:" >&5
7742   cat conftest.$ac_ext >&5
7743   rm -fr conftest*
7744   pgac_cv_type_long_int_64=no
7745 fi
7746 rm -fr conftest*
7747 fi
7748
7749 fi
7750
7751 echo "$ac_t""$pgac_cv_type_long_int_64" 1>&6
7752
7753 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
7754 if test x"$pgac_cv_type_long_int_64" = xyes ; then
7755   cat >> confdefs.h <<\EOF
7756 #define HAVE_LONG_INT_64 
7757 EOF
7758
7759 fi
7760
7761
7762 if test x"$HAVE_LONG_INT_64" = x"no" ; then
7763   echo $ac_n "checking whether long long int is 64 bits""... $ac_c" 1>&6
7764 echo "configure:7764: checking whether long long int is 64 bits" >&5
7765 if eval "test \"`echo '$''{'pgac_cv_type_long_long_int_64'+set}'`\" = set"; then
7766   echo $ac_n "(cached) $ac_c" 1>&6
7767 else
7768   if test "$cross_compiling" = yes; then
7769   pgac_cv_type_long_long_int_64=no
7770 echo "configure: warning: 64 bit arithmetic disabled when cross-compiling" 1>&2
7771 else
7772   cat > conftest.$ac_ext <<EOF
7773 #line 7773 "configure"
7774 #include "confdefs.h"
7775 typedef long long int int64;
7776
7777 /*
7778  * These are globals to discourage the compiler from folding all the
7779  * arithmetic tests down to compile-time constants.
7780  */
7781 int64 a = 20000001;
7782 int64 b = 40000005;
7783
7784 int does_int64_work()
7785 {
7786   int64 c,d;
7787
7788   if (sizeof(int64) != 8)
7789     return 0;                   /* definitely not the right size */
7790
7791   /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
7792   c = a * b;
7793   d = (c + b) / b;
7794   if (d != a+1)
7795     return 0;
7796   return 1;
7797 }
7798 main() {
7799   exit(! does_int64_work());
7800 }
7801 EOF
7802 if { (eval echo configure:7802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7803 then
7804   pgac_cv_type_long_long_int_64=yes
7805 else
7806   echo "configure: failed program was:" >&5
7807   cat conftest.$ac_ext >&5
7808   rm -fr conftest*
7809   pgac_cv_type_long_long_int_64=no
7810 fi
7811 rm -fr conftest*
7812 fi
7813
7814 fi
7815
7816 echo "$ac_t""$pgac_cv_type_long_long_int_64" 1>&6
7817
7818 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
7819 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
7820   cat >> confdefs.h <<\EOF
7821 #define HAVE_LONG_LONG_INT_64 
7822 EOF
7823
7824 fi
7825
7826 fi
7827
7828
7829
7830 if [ x"$HAVE_LONG_LONG_INT_64" = xyes ] ; then
7831   cat > conftest.$ac_ext <<EOF
7832 #line 7832 "configure"
7833 #include "confdefs.h"
7834
7835 #define INT64CONST(x)  x##LL
7836 long long int foo = INT64CONST(0x1234567890123456);
7837
7838 int main() {
7839
7840 ; return 0; }
7841 EOF
7842 if { (eval echo configure:7842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7843   rm -rf conftest*
7844   cat >> confdefs.h <<\EOF
7845 #define HAVE_LL_CONSTANTS 1
7846 EOF
7847
7848 else
7849   echo "configure: failed program was:" >&5
7850   cat conftest.$ac_ext >&5
7851 fi
7852 rm -f conftest*
7853 fi
7854
7855
7856
7857 if [ x"$HAVE_LONG_LONG_INT_64" = xyes ] ; then
7858   if [ x$SNPRINTF = x ] ; then
7859     echo $ac_n "checking whether snprintf handles 'long long int' as %lld""... $ac_c" 1>&6
7860 echo "configure:7860: checking whether snprintf handles 'long long int' as %lld" >&5
7861     if test "$cross_compiling" = yes; then
7862    echo "$ac_t""assuming not on target machine" 1>&6
7863         # Force usage of our own snprintf, since we cannot test foreign snprintf
7864         SNPRINTF='snprintf.o'
7865         INT64_FORMAT='"%lld"'
7866   
7867 else
7868   cat > conftest.$ac_ext <<EOF
7869 #line 7869 "configure"
7870 #include "confdefs.h"
7871 #include <stdio.h>
7872 typedef long long int int64;
7873 #define INT64_FORMAT "%lld"
7874
7875 int64 a = 20000001;
7876 int64 b = 40000005;
7877
7878 int does_int64_snprintf_work()
7879 {
7880   int64 c;
7881   char buf[100];
7882
7883   if (sizeof(int64) != 8)
7884     return 0;                   /* doesn't look like the right size */
7885
7886   c = a * b;
7887   snprintf(buf, 100, INT64_FORMAT, c);
7888   if (strcmp(buf, "800000140000005") != 0)
7889     return 0;                   /* either multiply or snprintf is busted */
7890   return 1;
7891 }
7892 main() {
7893   exit(! does_int64_snprintf_work());
7894 }
7895 EOF
7896 if { (eval echo configure:7896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7897 then
7898    echo "$ac_t""yes" 1>&6
7899           INT64_FORMAT='"%lld"'
7900         
7901 else
7902   echo "configure: failed program was:" >&5
7903   cat conftest.$ac_ext >&5
7904   rm -fr conftest*
7905    echo "$ac_t""no" 1>&6
7906     echo $ac_n "checking whether snprintf handles 'long long int' as %qd""... $ac_c" 1>&6
7907 echo "configure:7907: checking whether snprintf handles 'long long int' as %qd" >&5 
7908     if test "$cross_compiling" = yes; then
7909    echo "$ac_t""assuming not on target machine" 1>&6
7910         # Force usage of our own snprintf, since we cannot test foreign snprintf
7911         SNPRINTF='snprintf.o'
7912         INT64_FORMAT='"%lld"'
7913   
7914 else
7915   cat > conftest.$ac_ext <<EOF
7916 #line 7916 "configure"
7917 #include "confdefs.h"
7918 #include <stdio.h>
7919 typedef long long int int64;
7920 #define INT64_FORMAT "%qd"
7921    
7922 int64 a = 20000001;
7923 int64 b = 40000005;
7924    
7925 int does_int64_snprintf_work()
7926 {  
7927   int64 c;
7928   char buf[100];
7929
7930   if (sizeof(int64) != 8)
7931     return 0;     /* doesn't look like the right size */
7932
7933   c = a * b;
7934   snprintf(buf, 100, INT64_FORMAT, c);
7935   if (strcmp(buf, "800000140000005") != 0)
7936     return 0;     /* either multiply or snprintf is busted */
7937   return 1;
7938 }
7939 main() {
7940   exit(! does_int64_snprintf_work());
7941 }
7942 EOF
7943 if { (eval echo configure:7943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7944 then
7945    echo "$ac_t""yes" 1>&6
7946     INT64_FORMAT='"%qd"'
7947   
7948 else
7949   echo "configure: failed program was:" >&5
7950   cat conftest.$ac_ext >&5
7951   rm -fr conftest*
7952    echo "$ac_t""no" 1>&6
7953         # Force usage of our own snprintf, since system snprintf is broken
7954         SNPRINTF='snprintf.o'
7955         INT64_FORMAT='"%lld"'
7956   
7957 fi
7958 rm -fr conftest*
7959 fi
7960  
7961 fi
7962 rm -fr conftest*
7963 fi
7964
7965   else
7966     # here if we previously decided we needed to use our own snprintf
7967     INT64_FORMAT='"%lld"'
7968   fi
7969 else
7970   # Here if we are not using 'long long int' at all
7971   INT64_FORMAT='"%ld"'
7972 fi
7973
7974 cat >> confdefs.h <<EOF
7975 #define INT64_FORMAT $INT64_FORMAT
7976 EOF
7977
7978
7979
7980 for ac_func in strtoll strtoq
7981 do
7982 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7983 echo "configure:7983: checking for $ac_func" >&5
7984 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7985   echo $ac_n "(cached) $ac_c" 1>&6
7986 else
7987   cat > conftest.$ac_ext <<EOF
7988 #line 7988 "configure"
7989 #include "confdefs.h"
7990 /* System header to define __stub macros and hopefully few prototypes,
7991     which can conflict with char $ac_func(); below.  */
7992 #include <assert.h>
7993 /* Override any gcc2 internal prototype to avoid an error.  */
7994 /* We use char because int might match the return type of a gcc2
7995     builtin and then its argument prototype would still apply.  */
7996 char $ac_func();
7997
7998 int main() {
7999
8000 /* The GNU C library defines this for functions which it implements
8001     to always fail with ENOSYS.  Some functions are actually named
8002     something starting with __ and the normal name is an alias.  */
8003 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8004 choke me
8005 #else
8006 $ac_func();
8007 #endif
8008
8009 ; return 0; }
8010 EOF
8011 if { (eval echo configure:8011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8012   rm -rf conftest*
8013   eval "ac_cv_func_$ac_func=yes"
8014 else
8015   echo "configure: failed program was:" >&5
8016   cat conftest.$ac_ext >&5
8017   rm -rf conftest*
8018   eval "ac_cv_func_$ac_func=no"
8019 fi
8020 rm -f conftest*
8021 fi
8022
8023 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8024   echo "$ac_t""yes" 1>&6
8025     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8026   cat >> confdefs.h <<EOF
8027 #define $ac_tr_func 1
8028 EOF
8029  break
8030 else
8031   echo "$ac_t""no" 1>&6
8032 fi
8033 done
8034
8035 for ac_func in strtoull strtouq
8036 do
8037 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8038 echo "configure:8038: checking for $ac_func" >&5
8039 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8040   echo $ac_n "(cached) $ac_c" 1>&6
8041 else
8042   cat > conftest.$ac_ext <<EOF
8043 #line 8043 "configure"
8044 #include "confdefs.h"
8045 /* System header to define __stub macros and hopefully few prototypes,
8046     which can conflict with char $ac_func(); below.  */
8047 #include <assert.h>
8048 /* Override any gcc2 internal prototype to avoid an error.  */
8049 /* We use char because int might match the return type of a gcc2
8050     builtin and then its argument prototype would still apply.  */
8051 char $ac_func();
8052
8053 int main() {
8054
8055 /* The GNU C library defines this for functions which it implements
8056     to always fail with ENOSYS.  Some functions are actually named
8057     something starting with __ and the normal name is an alias.  */
8058 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8059 choke me
8060 #else
8061 $ac_func();
8062 #endif
8063
8064 ; return 0; }
8065 EOF
8066 if { (eval echo configure:8066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8067   rm -rf conftest*
8068   eval "ac_cv_func_$ac_func=yes"
8069 else
8070   echo "configure: failed program was:" >&5
8071   cat conftest.$ac_ext >&5
8072   rm -rf conftest*
8073   eval "ac_cv_func_$ac_func=no"
8074 fi
8075 rm -f conftest*
8076 fi
8077
8078 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8079   echo "$ac_t""yes" 1>&6
8080     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8081   cat >> confdefs.h <<EOF
8082 #define $ac_tr_func 1
8083 EOF
8084  break
8085 else
8086   echo "$ac_t""no" 1>&6
8087 fi
8088 done
8089
8090
8091 echo $ac_n "checking for atexit""... $ac_c" 1>&6
8092 echo "configure:8092: checking for atexit" >&5
8093 if eval "test \"`echo '$''{'ac_cv_func_atexit'+set}'`\" = set"; then
8094   echo $ac_n "(cached) $ac_c" 1>&6
8095 else
8096   cat > conftest.$ac_ext <<EOF
8097 #line 8097 "configure"
8098 #include "confdefs.h"
8099 /* System header to define __stub macros and hopefully few prototypes,
8100     which can conflict with char atexit(); below.  */
8101 #include <assert.h>
8102 /* Override any gcc2 internal prototype to avoid an error.  */
8103 /* We use char because int might match the return type of a gcc2
8104     builtin and then its argument prototype would still apply.  */
8105 char atexit();
8106
8107 int main() {
8108
8109 /* The GNU C library defines this for functions which it implements
8110     to always fail with ENOSYS.  Some functions are actually named
8111     something starting with __ and the normal name is an alias.  */
8112 #if defined (__stub_atexit) || defined (__stub___atexit)
8113 choke me
8114 #else
8115 atexit();
8116 #endif
8117
8118 ; return 0; }
8119 EOF
8120 if { (eval echo configure:8120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8121   rm -rf conftest*
8122   eval "ac_cv_func_atexit=yes"
8123 else
8124   echo "configure: failed program was:" >&5
8125   cat conftest.$ac_ext >&5
8126   rm -rf conftest*
8127   eval "ac_cv_func_atexit=no"
8128 fi
8129 rm -f conftest*
8130 fi
8131
8132 if eval "test \"`echo '$ac_cv_func_'atexit`\" = yes"; then
8133   echo "$ac_t""yes" 1>&6
8134   cat >> confdefs.h <<\EOF
8135 #define HAVE_ATEXIT 1
8136 EOF
8137
8138 else
8139   echo "$ac_t""no" 1>&6
8140 for ac_func in on_exit
8141 do
8142 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8143 echo "configure:8143: checking for $ac_func" >&5
8144 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8145   echo $ac_n "(cached) $ac_c" 1>&6
8146 else
8147   cat > conftest.$ac_ext <<EOF
8148 #line 8148 "configure"
8149 #include "confdefs.h"
8150 /* System header to define __stub macros and hopefully few prototypes,
8151     which can conflict with char $ac_func(); below.  */
8152 #include <assert.h>
8153 /* Override any gcc2 internal prototype to avoid an error.  */
8154 /* We use char because int might match the return type of a gcc2
8155     builtin and then its argument prototype would still apply.  */
8156 char $ac_func();
8157
8158 int main() {
8159
8160 /* The GNU C library defines this for functions which it implements
8161     to always fail with ENOSYS.  Some functions are actually named
8162     something starting with __ and the normal name is an alias.  */
8163 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8164 choke me
8165 #else
8166 $ac_func();
8167 #endif
8168
8169 ; return 0; }
8170 EOF
8171 if { (eval echo configure:8171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8172   rm -rf conftest*
8173   eval "ac_cv_func_$ac_func=yes"
8174 else
8175   echo "configure: failed program was:" >&5
8176   cat conftest.$ac_ext >&5
8177   rm -rf conftest*
8178   eval "ac_cv_func_$ac_func=no"
8179 fi
8180 rm -f conftest*
8181 fi
8182
8183 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8184   echo "$ac_t""yes" 1>&6
8185     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8186   cat >> confdefs.h <<EOF
8187 #define $ac_tr_func 1
8188 EOF
8189  cat >> confdefs.h <<\EOF
8190 #define HAVE_ON_EXIT 1
8191 EOF
8192
8193 else
8194   echo "$ac_t""no" 1>&6
8195 { echo "configure: error: neither atexit() nor on_exit() found" 1>&2; exit 1; }
8196 fi
8197 done
8198
8199 fi
8200
8201
8202
8203 echo $ac_n "checking size of unsigned long""... $ac_c" 1>&6
8204 echo "configure:8204: checking size of unsigned long" >&5
8205 if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long'+set}'`\" = set"; then
8206   echo $ac_n "(cached) $ac_c" 1>&6
8207 else
8208   if test "$cross_compiling" = yes; then
8209   ac_cv_sizeof_unsigned_long=4
8210 else
8211   cat > conftest.$ac_ext <<EOF
8212 #line 8212 "configure"
8213 #include "confdefs.h"
8214 #include <stdio.h>
8215 main()
8216 {
8217   FILE *f=fopen("conftestval", "w");
8218   if (!f) exit(1);
8219   fprintf(f, "%d\n", sizeof(unsigned long));
8220   exit(0);
8221 }
8222 EOF
8223 if { (eval echo configure:8223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8224 then
8225   ac_cv_sizeof_unsigned_long=`cat conftestval`
8226 else
8227   echo "configure: failed program was:" >&5
8228   cat conftest.$ac_ext >&5
8229   rm -fr conftest*
8230   ac_cv_sizeof_unsigned_long=0
8231 fi
8232 rm -fr conftest*
8233 fi
8234
8235 fi
8236 echo "$ac_t""$ac_cv_sizeof_unsigned_long" 1>&6
8237 cat >> confdefs.h <<EOF
8238 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
8239 EOF
8240
8241
8242 cat >> confdefs.h <<EOF
8243 #define SIZEOF_DATUM $ac_cv_sizeof_unsigned_long
8244 EOF
8245
8246
8247
8248 echo $ac_n "checking alignment of short""... $ac_c" 1>&6
8249 echo "configure:8249: checking alignment of short" >&5
8250 if eval "test \"`echo '$''{'pgac_cv_alignof_short'+set}'`\" = set"; then
8251   echo $ac_n "(cached) $ac_c" 1>&6
8252 else
8253   if test "$cross_compiling" = yes; then
8254   pgac_cv_alignof_short='sizeof(short)'
8255 else
8256   cat > conftest.$ac_ext <<EOF
8257 #line 8257 "configure"
8258 #include "confdefs.h"
8259 #include <stdio.h>
8260 struct { char filler; short field; } mystruct;
8261 main()
8262 {
8263   FILE *f=fopen("conftestval", "w");
8264   if (!f) exit(1);
8265   fprintf(f, "%d\n", ((char*) & mystruct.field) - ((char*) & mystruct));
8266   exit(0);
8267 }
8268 EOF
8269 if { (eval echo configure:8269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8270 then
8271   pgac_cv_alignof_short=`cat conftestval`
8272 else
8273   echo "configure: failed program was:" >&5
8274   cat conftest.$ac_ext >&5
8275   rm -fr conftest*
8276   pgac_cv_alignof_short='sizeof(short)'
8277 fi
8278 rm -fr conftest*
8279 fi
8280
8281 fi
8282 echo "$ac_t""$pgac_cv_alignof_short" 1>&6
8283 cat >> confdefs.h <<EOF
8284 #define ALIGNOF_SHORT $pgac_cv_alignof_short
8285 EOF
8286
8287
8288 echo $ac_n "checking alignment of int""... $ac_c" 1>&6
8289 echo "configure:8289: checking alignment of int" >&5
8290 if eval "test \"`echo '$''{'pgac_cv_alignof_int'+set}'`\" = set"; then
8291   echo $ac_n "(cached) $ac_c" 1>&6
8292 else
8293   if test "$cross_compiling" = yes; then
8294   pgac_cv_alignof_int='sizeof(int)'
8295 else
8296   cat > conftest.$ac_ext <<EOF
8297 #line 8297 "configure"
8298 #include "confdefs.h"
8299 #include <stdio.h>
8300 struct { char filler; int field; } mystruct;
8301 main()
8302 {
8303   FILE *f=fopen("conftestval", "w");
8304   if (!f) exit(1);
8305   fprintf(f, "%d\n", ((char*) & mystruct.field) - ((char*) & mystruct));
8306   exit(0);
8307 }
8308 EOF
8309 if { (eval echo configure:8309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8310 then
8311   pgac_cv_alignof_int=`cat conftestval`
8312 else
8313   echo "configure: failed program was:" >&5
8314   cat conftest.$ac_ext >&5
8315   rm -fr conftest*
8316   pgac_cv_alignof_int='sizeof(int)'
8317 fi
8318 rm -fr conftest*
8319 fi
8320
8321 fi
8322 echo "$ac_t""$pgac_cv_alignof_int" 1>&6
8323 cat >> confdefs.h <<EOF
8324 #define ALIGNOF_INT $pgac_cv_alignof_int
8325 EOF
8326
8327
8328 echo $ac_n "checking alignment of long""... $ac_c" 1>&6
8329 echo "configure:8329: checking alignment of long" >&5
8330 if eval "test \"`echo '$''{'pgac_cv_alignof_long'+set}'`\" = set"; then
8331   echo $ac_n "(cached) $ac_c" 1>&6
8332 else
8333   if test "$cross_compiling" = yes; then
8334   pgac_cv_alignof_long='sizeof(long)'
8335 else
8336   cat > conftest.$ac_ext <<EOF
8337 #line 8337 "configure"
8338 #include "confdefs.h"
8339 #include <stdio.h>
8340 struct { char filler; long field; } mystruct;
8341 main()
8342 {
8343   FILE *f=fopen("conftestval", "w");
8344   if (!f) exit(1);
8345   fprintf(f, "%d\n", ((char*) & mystruct.field) - ((char*) & mystruct));
8346   exit(0);
8347 }
8348 EOF
8349 if { (eval echo configure:8349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8350 then
8351   pgac_cv_alignof_long=`cat conftestval`
8352 else
8353   echo "configure: failed program was:" >&5
8354   cat conftest.$ac_ext >&5
8355   rm -fr conftest*
8356   pgac_cv_alignof_long='sizeof(long)'
8357 fi
8358 rm -fr conftest*
8359 fi
8360
8361 fi
8362 echo "$ac_t""$pgac_cv_alignof_long" 1>&6
8363 cat >> confdefs.h <<EOF
8364 #define ALIGNOF_LONG $pgac_cv_alignof_long
8365 EOF
8366
8367
8368 if [ x"$HAVE_LONG_LONG_INT_64" = xyes ] ; then
8369   echo $ac_n "checking alignment of long long int""... $ac_c" 1>&6
8370 echo "configure:8370: checking alignment of long long int" >&5
8371 if eval "test \"`echo '$''{'pgac_cv_alignof_long_long_int'+set}'`\" = set"; then
8372   echo $ac_n "(cached) $ac_c" 1>&6
8373 else
8374   if test "$cross_compiling" = yes; then
8375   pgac_cv_alignof_long_long_int='sizeof(long long int)'
8376 else
8377   cat > conftest.$ac_ext <<EOF
8378 #line 8378 "configure"
8379 #include "confdefs.h"
8380 #include <stdio.h>
8381 struct { char filler; long long int field; } mystruct;
8382 main()
8383 {
8384   FILE *f=fopen("conftestval", "w");
8385   if (!f) exit(1);
8386   fprintf(f, "%d\n", ((char*) & mystruct.field) - ((char*) & mystruct));
8387   exit(0);
8388 }
8389 EOF
8390 if { (eval echo configure:8390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8391 then
8392   pgac_cv_alignof_long_long_int=`cat conftestval`
8393 else
8394   echo "configure: failed program was:" >&5
8395   cat conftest.$ac_ext >&5
8396   rm -fr conftest*
8397   pgac_cv_alignof_long_long_int='sizeof(long long int)'
8398 fi
8399 rm -fr conftest*
8400 fi
8401
8402 fi
8403 echo "$ac_t""$pgac_cv_alignof_long_long_int" 1>&6
8404 cat >> confdefs.h <<EOF
8405 #define ALIGNOF_LONG_LONG_INT $pgac_cv_alignof_long_long_int
8406 EOF
8407
8408
8409 fi
8410 echo $ac_n "checking alignment of double""... $ac_c" 1>&6
8411 echo "configure:8411: checking alignment of double" >&5
8412 if eval "test \"`echo '$''{'pgac_cv_alignof_double'+set}'`\" = set"; then
8413   echo $ac_n "(cached) $ac_c" 1>&6
8414 else
8415   if test "$cross_compiling" = yes; then
8416   pgac_cv_alignof_double='sizeof(double)'
8417 else
8418   cat > conftest.$ac_ext <<EOF
8419 #line 8419 "configure"
8420 #include "confdefs.h"
8421 #include <stdio.h>
8422 struct { char filler; double field; } mystruct;
8423 main()
8424 {
8425   FILE *f=fopen("conftestval", "w");
8426   if (!f) exit(1);
8427   fprintf(f, "%d\n", ((char*) & mystruct.field) - ((char*) & mystruct));
8428   exit(0);
8429 }
8430 EOF
8431 if { (eval echo configure:8431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8432 then
8433   pgac_cv_alignof_double=`cat conftestval`
8434 else
8435   echo "configure: failed program was:" >&5
8436   cat conftest.$ac_ext >&5
8437   rm -fr conftest*
8438   pgac_cv_alignof_double='sizeof(double)'
8439 fi
8440 rm -fr conftest*
8441 fi
8442
8443 fi
8444 echo "$ac_t""$pgac_cv_alignof_double" 1>&6
8445 cat >> confdefs.h <<EOF
8446 #define ALIGNOF_DOUBLE $pgac_cv_alignof_double
8447 EOF
8448
8449
8450
8451
8452 if test $pgac_cv_alignof_double != 'sizeof(double)' ; then
8453   MAX_ALIGNOF=$pgac_cv_alignof_long
8454   if test $MAX_ALIGNOF -lt $pgac_cv_alignof_double ; then
8455     MAX_ALIGNOF=$pgac_cv_alignof_double
8456   fi
8457   if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $pgac_cv_alignof_long_long_int ; then
8458     MAX_ALIGNOF="$pgac_cv_alignof_long_long_int"
8459   fi
8460 else
8461     MAX_ALIGNOF="$pgac_cv_alignof_double"
8462 fi
8463 cat >> confdefs.h <<EOF
8464 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
8465 EOF
8466
8467
8468
8469 # Some platforms predefine the types int8, int16, etc.  Only check
8470 # a (hopefully) representative subset.  We also check for sig_atomic_t,
8471 # which *should* be defined per ANSI C, but is missing on some old platforms.
8472
8473 pgac_type_includes="\
8474 #include <stdio.h>
8475 #include <signal.h>
8476 #ifdef HAVE_SUPPORTDEFS_H
8477 #include <SupportDefs.h>
8478 #endif"
8479
8480 echo $ac_n "checking for int8""... $ac_c" 1>&6
8481 echo "configure:8481: checking for int8" >&5
8482 if eval "test \"`echo '$''{'pgac_cv_have_int8'+set}'`\" = set"; then
8483   echo $ac_n "(cached) $ac_c" 1>&6
8484 else
8485   cat > conftest.$ac_ext <<EOF
8486 #line 8486 "configure"
8487 #include "confdefs.h"
8488 $pgac_type_includes
8489 int main() {
8490 if ((int8 *) 0)
8491   return 0;
8492 if (sizeof (int8))
8493   return 0;
8494 ; return 0; }
8495 EOF
8496 if { (eval echo configure:8496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8497   rm -rf conftest*
8498   pgac_cv_have_int8=yes
8499 else
8500   echo "configure: failed program was:" >&5
8501   cat conftest.$ac_ext >&5
8502   rm -rf conftest*
8503   pgac_cv_have_int8=no
8504 fi
8505 rm -f conftest*
8506 fi
8507
8508 echo "$ac_t""$pgac_cv_have_int8" 1>&6
8509 if test "$pgac_cv_have_int8" = yes; then
8510   cat >> confdefs.h <<\EOF
8511 #define HAVE_INT8 1
8512 EOF
8513
8514   fi
8515
8516 echo $ac_n "checking for uint8""... $ac_c" 1>&6
8517 echo "configure:8517: checking for uint8" >&5
8518 if eval "test \"`echo '$''{'pgac_cv_have_uint8'+set}'`\" = set"; then
8519   echo $ac_n "(cached) $ac_c" 1>&6
8520 else
8521   cat > conftest.$ac_ext <<EOF
8522 #line 8522 "configure"
8523 #include "confdefs.h"
8524 $pgac_type_includes
8525 int main() {
8526 if ((uint8 *) 0)
8527   return 0;
8528 if (sizeof (uint8))
8529   return 0;
8530 ; return 0; }
8531 EOF
8532 if { (eval echo configure:8532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8533   rm -rf conftest*
8534   pgac_cv_have_uint8=yes
8535 else
8536   echo "configure: failed program was:" >&5
8537   cat conftest.$ac_ext >&5
8538   rm -rf conftest*
8539   pgac_cv_have_uint8=no
8540 fi
8541 rm -f conftest*
8542 fi
8543
8544 echo "$ac_t""$pgac_cv_have_uint8" 1>&6
8545 if test "$pgac_cv_have_uint8" = yes; then
8546   cat >> confdefs.h <<\EOF
8547 #define HAVE_UINT8 1
8548 EOF
8549
8550   fi
8551
8552 echo $ac_n "checking for int64""... $ac_c" 1>&6
8553 echo "configure:8553: checking for int64" >&5
8554 if eval "test \"`echo '$''{'pgac_cv_have_int64'+set}'`\" = set"; then
8555   echo $ac_n "(cached) $ac_c" 1>&6
8556 else
8557   cat > conftest.$ac_ext <<EOF
8558 #line 8558 "configure"
8559 #include "confdefs.h"
8560 $pgac_type_includes
8561 int main() {
8562 if ((int64 *) 0)
8563   return 0;
8564 if (sizeof (int64))
8565   return 0;
8566 ; return 0; }
8567 EOF
8568 if { (eval echo configure:8568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8569   rm -rf conftest*
8570   pgac_cv_have_int64=yes
8571 else
8572   echo "configure: failed program was:" >&5
8573   cat conftest.$ac_ext >&5
8574   rm -rf conftest*
8575   pgac_cv_have_int64=no
8576 fi
8577 rm -f conftest*
8578 fi
8579
8580 echo "$ac_t""$pgac_cv_have_int64" 1>&6
8581 if test "$pgac_cv_have_int64" = yes; then
8582   cat >> confdefs.h <<\EOF
8583 #define HAVE_INT64 1
8584 EOF
8585
8586   fi
8587
8588 echo $ac_n "checking for uint64""... $ac_c" 1>&6
8589 echo "configure:8589: checking for uint64" >&5
8590 if eval "test \"`echo '$''{'pgac_cv_have_uint64'+set}'`\" = set"; then
8591   echo $ac_n "(cached) $ac_c" 1>&6
8592 else
8593   cat > conftest.$ac_ext <<EOF
8594 #line 8594 "configure"
8595 #include "confdefs.h"
8596 $pgac_type_includes
8597 int main() {
8598 if ((uint64 *) 0)
8599   return 0;
8600 if (sizeof (uint64))
8601   return 0;
8602 ; return 0; }
8603 EOF
8604 if { (eval echo configure:8604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8605   rm -rf conftest*
8606   pgac_cv_have_uint64=yes
8607 else
8608   echo "configure: failed program was:" >&5
8609   cat conftest.$ac_ext >&5
8610   rm -rf conftest*
8611   pgac_cv_have_uint64=no
8612 fi
8613 rm -f conftest*
8614 fi
8615
8616 echo "$ac_t""$pgac_cv_have_uint64" 1>&6
8617 if test "$pgac_cv_have_uint64" = yes; then
8618   cat >> confdefs.h <<\EOF
8619 #define HAVE_UINT64 1
8620 EOF
8621
8622   fi
8623
8624 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
8625 echo "configure:8625: checking for sig_atomic_t" >&5
8626 if eval "test \"`echo '$''{'pgac_cv_have_sig_atomic_t'+set}'`\" = set"; then
8627   echo $ac_n "(cached) $ac_c" 1>&6
8628 else
8629   cat > conftest.$ac_ext <<EOF
8630 #line 8630 "configure"
8631 #include "confdefs.h"
8632 $pgac_type_includes
8633 int main() {
8634 if ((sig_atomic_t *) 0)
8635   return 0;
8636 if (sizeof (sig_atomic_t))
8637   return 0;
8638 ; return 0; }
8639 EOF
8640 if { (eval echo configure:8640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8641   rm -rf conftest*
8642   pgac_cv_have_sig_atomic_t=yes
8643 else
8644   echo "configure: failed program was:" >&5
8645   cat conftest.$ac_ext >&5
8646   rm -rf conftest*
8647   pgac_cv_have_sig_atomic_t=no
8648 fi
8649 rm -f conftest*
8650 fi
8651
8652 echo "$ac_t""$pgac_cv_have_sig_atomic_t" 1>&6
8653 if test "$pgac_cv_have_sig_atomic_t" = yes; then
8654   cat >> confdefs.h <<\EOF
8655 #define HAVE_SIG_ATOMIC_T 1
8656 EOF
8657
8658   fi
8659
8660
8661
8662 echo $ac_n "checking for POSIX signal interface""... $ac_c" 1>&6
8663 echo "configure:8663: checking for POSIX signal interface" >&5
8664 if eval "test \"`echo '$''{'pgac_cv_func_posix_signals'+set}'`\" = set"; then
8665   echo $ac_n "(cached) $ac_c" 1>&6
8666 else
8667   cat > conftest.$ac_ext <<EOF
8668 #line 8668 "configure"
8669 #include "confdefs.h"
8670 #include <signal.h>
8671
8672 int main() {
8673 struct sigaction act, oact;
8674 sigemptyset(&act.sa_mask);
8675 act.sa_flags = SA_RESTART;
8676 sigaction(0, &act, &oact);
8677 ; return 0; }
8678 EOF
8679 if { (eval echo configure:8679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8680   rm -rf conftest*
8681   pgac_cv_func_posix_signals=yes
8682 else
8683   echo "configure: failed program was:" >&5
8684   cat conftest.$ac_ext >&5
8685   rm -rf conftest*
8686   pgac_cv_func_posix_signals=no
8687 fi
8688 rm -f conftest*
8689 fi
8690
8691 echo "$ac_t""$pgac_cv_func_posix_signals" 1>&6
8692 if test x"$pgac_cv_func_posix_signals" = xyes ; then
8693   cat >> confdefs.h <<\EOF
8694 #define HAVE_POSIX_SIGNALS 
8695 EOF
8696
8697 fi
8698 HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
8699
8700
8701
8702 # Check for Tcl configuration script tclConfig.sh
8703 if test "$with_tcl" = yes; then
8704     for ac_prog in tclsh tcl
8705 do
8706 # Extract the first word of "$ac_prog", so it can be a program name with args.
8707 set dummy $ac_prog; ac_word=$2
8708 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8709 echo "configure:8709: checking for $ac_word" >&5
8710 if eval "test \"`echo '$''{'ac_cv_path_TCLSH'+set}'`\" = set"; then
8711   echo $ac_n "(cached) $ac_c" 1>&6
8712 else
8713   case "$TCLSH" in
8714   /*)
8715   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
8716   ;;
8717   ?:/*)                  
8718   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a dos path.
8719   ;;
8720   *)
8721   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8722   ac_dummy="$PATH"
8723   for ac_dir in $ac_dummy; do 
8724     test -z "$ac_dir" && ac_dir=.
8725     if test -f $ac_dir/$ac_word; then
8726       ac_cv_path_TCLSH="$ac_dir/$ac_word"
8727       break
8728     fi
8729   done
8730   IFS="$ac_save_ifs"
8731   ;;
8732 esac
8733 fi
8734 TCLSH="$ac_cv_path_TCLSH"
8735 if test -n "$TCLSH"; then
8736   echo "$ac_t""$TCLSH" 1>&6
8737 else
8738   echo "$ac_t""no" 1>&6
8739 fi
8740
8741 test -n "$TCLSH" && break
8742 done
8743
8744 echo $ac_n "checking for tclConfig.sh""... $ac_c" 1>&6
8745 echo "configure:8745: checking for tclConfig.sh" >&5
8746 # Let user override test
8747 if test -z "$TCL_CONFIG_SH"; then
8748     pgac_test_dirs="$with_tclconfig"
8749
8750     set X $pgac_test_dirs; shift
8751     if test $# -eq 0; then
8752         test -z "$TCLSH" && { echo "configure: error: unable to locate tclConfig.sh because no Tcl shell was found" 1>&2; exit 1; }
8753         set X `echo 'puts $auto_path' | $TCLSH`; shift
8754     fi
8755
8756     for pgac_dir do
8757         if test -r "$pgac_dir/tclConfig.sh"; then
8758             TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
8759             break
8760         fi
8761     done
8762 fi
8763
8764 if test -z "$TCL_CONFIG_SH"; then
8765     echo "$ac_t""no" 1>&6
8766     { echo "configure: error: file \`tclConfig.sh' is required for Tcl" 1>&2; exit 1; }
8767 else
8768     echo "$ac_t""$TCL_CONFIG_SH" 1>&6
8769 fi
8770
8771
8772
8773 fi
8774
8775 # Check for Tk configuration script tkConfig.sh
8776 if test "$with_tk" = yes; then
8777     echo $ac_n "checking for tkConfig.sh""... $ac_c" 1>&6
8778 echo "configure:8778: checking for tkConfig.sh" >&5
8779 # Let user override test
8780 if test -z "$TK_CONFIG_SH"; then
8781     pgac_test_dirs="$with_tkconfig $with_tclconfig"
8782
8783     set X $pgac_test_dirs; shift
8784     if test $# -eq 0; then
8785         test -z "$TCLSH" && { echo "configure: error: unable to locate tkConfig.sh because no Tcl shell was found" 1>&2; exit 1; }
8786         set X `echo 'puts $auto_path' | $TCLSH`; shift
8787     fi
8788
8789     for pgac_dir do
8790         if test -r "$pgac_dir/tkConfig.sh"; then
8791             TK_CONFIG_SH=$pgac_dir/tkConfig.sh
8792             break
8793         fi
8794     done
8795 fi
8796
8797 if test -z "$TK_CONFIG_SH"; then
8798     echo "$ac_t""no" 1>&6
8799     { echo "configure: error: file \`tkConfig.sh' is required for Tk" 1>&2; exit 1; }
8800 else
8801     echo "$ac_t""$TK_CONFIG_SH" 1>&6
8802 fi
8803
8804
8805
8806 fi
8807
8808
8809 #
8810 # Check for DocBook and tools
8811 #
8812 for ac_prog in onsgmls nsgmls
8813 do
8814 # Extract the first word of "$ac_prog", so it can be a program name with args.
8815 set dummy $ac_prog; ac_word=$2
8816 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8817 echo "configure:8817: checking for $ac_word" >&5
8818 if eval "test \"`echo '$''{'ac_cv_prog_NSGMLS'+set}'`\" = set"; then
8819   echo $ac_n "(cached) $ac_c" 1>&6
8820 else
8821   if test -n "$NSGMLS"; then
8822   ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
8823 else
8824   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8825   ac_dummy="$PATH"
8826   for ac_dir in $ac_dummy; do
8827     test -z "$ac_dir" && ac_dir=.
8828     if test -f $ac_dir/$ac_word; then
8829       ac_cv_prog_NSGMLS="$ac_prog"
8830       break
8831     fi
8832   done
8833   IFS="$ac_save_ifs"
8834 fi
8835 fi
8836 NSGMLS="$ac_cv_prog_NSGMLS"
8837 if test -n "$NSGMLS"; then
8838   echo "$ac_t""$NSGMLS" 1>&6
8839 else
8840   echo "$ac_t""no" 1>&6
8841 fi
8842
8843 test -n "$NSGMLS" && break
8844 done
8845
8846 # If you don't have nsgmls you won't get very far, so save the cycles.
8847 if test -n "$NSGMLS"; then
8848   for ac_prog in openjade jade
8849 do
8850 # Extract the first word of "$ac_prog", so it can be a program name with args.
8851 set dummy $ac_prog; ac_word=$2
8852 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8853 echo "configure:8853: checking for $ac_word" >&5
8854 if eval "test \"`echo '$''{'ac_cv_prog_JADE'+set}'`\" = set"; then
8855   echo $ac_n "(cached) $ac_c" 1>&6
8856 else
8857   if test -n "$JADE"; then
8858   ac_cv_prog_JADE="$JADE" # Let the user override the test.
8859 else
8860   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8861   ac_dummy="$PATH"
8862   for ac_dir in $ac_dummy; do
8863     test -z "$ac_dir" && ac_dir=.
8864     if test -f $ac_dir/$ac_word; then
8865       ac_cv_prog_JADE="$ac_prog"
8866       break
8867     fi
8868   done
8869   IFS="$ac_save_ifs"
8870 fi
8871 fi
8872 JADE="$ac_cv_prog_JADE"
8873 if test -n "$JADE"; then
8874   echo "$ac_t""$JADE" 1>&6
8875 else
8876   echo "$ac_t""no" 1>&6
8877 fi
8878
8879 test -n "$JADE" && break
8880 done
8881
8882   
8883 echo $ac_n "checking for DocBook V3.1""... $ac_c" 1>&6
8884 echo "configure:8884: checking for DocBook V3.1" >&5
8885 if eval "test \"`echo '$''{'pgac_cv_check_docbook'+set}'`\" = set"; then
8886   echo $ac_n "(cached) $ac_c" 1>&6
8887 else
8888   cat >conftest.sgml <<EOF
8889 <!doctype book PUBLIC "-//OASIS//DTD DocBook V3.1//EN">
8890 <book>
8891  <title>test</title>
8892  <chapter>
8893   <title>random</title>
8894    <sect1>
8895     <title>testsect</title>
8896     <para>text</para>
8897   </sect1>
8898  </chapter>
8899 </book>
8900 EOF
8901
8902 ${NSGMLS-false} -s conftest.sgml 1>&5 2>&1
8903 if test $? -eq 0; then
8904   pgac_cv_check_docbook=yes
8905 else
8906   pgac_cv_check_docbook=no
8907 fi
8908 rm -f conftest.sgml
8909 fi
8910
8911 echo "$ac_t""$pgac_cv_check_docbook" 1>&6
8912
8913 have_docbook=$pgac_cv_check_docbook
8914
8915
8916   echo $ac_n "checking for DocBook stylesheets""... $ac_c" 1>&6
8917 echo "configure:8917: checking for DocBook stylesheets" >&5
8918 if eval "test \"`echo '$''{'pgac_cv_path_stylesheets'+set}'`\" = set"; then
8919   echo $ac_n "(cached) $ac_c" 1>&6
8920 else
8921   if test -n "$DOCBOOKSTYLE"; then
8922   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
8923 else
8924   for pgac_prefix in /usr /usr/local /opt; do
8925     for pgac_infix in share lib; do
8926       for pgac_postfix in \
8927         sgml/stylesheets/nwalsh-modular \
8928         sgml/stylesheets/docbook \
8929         sgml/docbook/dsssl/modular
8930       do
8931         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
8932         if test -r "$pgac_candidate/html/docbook.dsl" \
8933            && test -r "$pgac_candidate/print/docbook.dsl"
8934         then
8935           pgac_cv_path_stylesheets=$pgac_candidate
8936           break 3
8937         fi
8938       done
8939     done
8940   done
8941 fi
8942 fi
8943
8944 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
8945
8946 if test -n "$DOCBOOKSTYLE"; then
8947   echo "$ac_t""$DOCBOOKSTYLE" 1>&6
8948 else
8949   echo "$ac_t""no" 1>&6
8950 fi
8951   for ac_prog in sgmlspl
8952 do
8953 # Extract the first word of "$ac_prog", so it can be a program name with args.
8954 set dummy $ac_prog; ac_word=$2
8955 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8956 echo "configure:8956: checking for $ac_word" >&5
8957 if eval "test \"`echo '$''{'ac_cv_prog_SGMLSPL'+set}'`\" = set"; then
8958   echo $ac_n "(cached) $ac_c" 1>&6
8959 else
8960   if test -n "$SGMLSPL"; then
8961   ac_cv_prog_SGMLSPL="$SGMLSPL" # Let the user override the test.
8962 else
8963   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8964   ac_dummy="$PATH"
8965   for ac_dir in $ac_dummy; do
8966     test -z "$ac_dir" && ac_dir=.
8967     if test -f $ac_dir/$ac_word; then
8968       ac_cv_prog_SGMLSPL="$ac_prog"
8969       break
8970     fi
8971   done
8972   IFS="$ac_save_ifs"
8973 fi
8974 fi
8975 SGMLSPL="$ac_cv_prog_SGMLSPL"
8976 if test -n "$SGMLSPL"; then
8977   echo "$ac_t""$SGMLSPL" 1>&6
8978 else
8979   echo "$ac_t""no" 1>&6
8980 fi
8981
8982 test -n "$SGMLSPL" && break
8983 done
8984
8985 fi
8986
8987 abs_top_srcdir=
8988
8989
8990 # prepare build tree if outside source tree
8991 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
8992 # Note 2: /bin/pwd might be better than shell's built-in at getting
8993 #         a symlink-free name.
8994 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
8995     :
8996 else
8997     abs_top_srcdir=`cd $srcdir && pwd`
8998     echo $ac_n "preparing build tree... $ac_c" 1>&6
8999     /bin/sh "$srcdir/config/prep_buildtree" "$abs_top_srcdir" "." \
9000       || { echo "configure: error: failed" 1>&2; exit 1; }
9001     echo "$ac_t""done" 1>&6
9002 fi
9003
9004 trap '' 1 2 15
9005 cat > confcache <<\EOF
9006 # This file is a shell script that caches the results of configure
9007 # tests run on this system so they can be shared between configure
9008 # scripts and configure runs.  It is not useful on other systems.
9009 # If it contains results you don't want to keep, you may remove or edit it.
9010 #
9011 # By default, configure uses ./config.cache as the cache file,
9012 # creating it if it does not exist already.  You can give configure
9013 # the --cache-file=FILE option to use a different cache file; that is
9014 # what configure does when it calls configure scripts in
9015 # subdirectories, so they share the cache.
9016 # Giving --cache-file=/dev/null disables caching, for debugging configure.
9017 # config.status only pays attention to the cache file if you give it the
9018 # --recheck option to rerun configure.
9019 #
9020 EOF
9021 # The following way of writing the cache mishandles newlines in values,
9022 # but we know of no workaround that is simple, portable, and efficient.
9023 # So, don't put newlines in cache variables' values.
9024 # Ultrix sh set writes to stderr and can't be redirected directly,
9025 # and sets the high bit in the cache file unless we assign to the vars.
9026 (set) 2>&1 |
9027   case `(ac_space=' '; set | grep ac_space) 2>&1` in
9028   *ac_space=\ *)
9029     # `set' does not quote correctly, so add quotes (double-quote substitution
9030     # turns \\\\ into \\, and sed turns \\ into \).
9031     sed -n \
9032       -e "s/'/'\\\\''/g" \
9033       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9034     ;;
9035   *)
9036     # `set' quotes correctly as required by POSIX, so do not add quotes.
9037     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9038     ;;
9039   esac >> confcache
9040 if cmp -s $cache_file confcache; then
9041   :
9042 else
9043   if test -w $cache_file; then
9044     echo "updating cache $cache_file"
9045     cat confcache > $cache_file
9046   else
9047     echo "not updating unwritable cache $cache_file"
9048   fi
9049 fi
9050 rm -f confcache
9051
9052 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9053
9054 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9055 # Let make expand exec_prefix.
9056 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9057
9058 # Any assignment to VPATH causes Sun make to only execute
9059 # the first set of double-colon rules, so remove it if not needed.
9060 # If there is a colon in the path, we need to keep it.
9061 if test "x$srcdir" = x.; then
9062   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
9063 fi
9064
9065 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9066
9067 DEFS=-DHAVE_CONFIG_H
9068
9069 # Without the "./", some shells look in PATH for config.status.
9070 : ${CONFIG_STATUS=./config.status}
9071
9072 echo creating $CONFIG_STATUS
9073 rm -f $CONFIG_STATUS
9074 cat > $CONFIG_STATUS <<EOF
9075 #! /bin/sh
9076 # Generated automatically by configure.
9077 # Run this file to recreate the current configuration.
9078 # This directory was configured as follows,
9079 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9080 #
9081 # $0 $ac_configure_args
9082 #
9083 # Compiler output produced by configure, useful for debugging
9084 # configure, is in ./config.log if it exists.
9085
9086 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9087 for ac_option
9088 do
9089   case "\$ac_option" in
9090   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9091     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9092     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9093   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9094     echo "$CONFIG_STATUS generated by autoconf version 2.13"
9095     exit 0 ;;
9096   -help | --help | --hel | --he | --h)
9097     echo "\$ac_cs_usage"; exit 0 ;;
9098   *) echo "\$ac_cs_usage"; exit 1 ;;
9099   esac
9100 done
9101
9102 ac_given_srcdir=$srcdir
9103
9104 trap 'rm -fr `echo "
9105   GNUmakefile
9106   src/GNUmakefile
9107   src/Makefile.global
9108   src/backend/port/Makefile
9109  src/include/pg_config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9110 EOF
9111 cat >> $CONFIG_STATUS <<EOF
9112
9113 # Protect against being on the right side of a sed subst in config.status.
9114 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9115  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9116 $ac_vpsub
9117 $extrasub
9118 s%@SHELL@%$SHELL%g
9119 s%@CFLAGS@%$CFLAGS%g
9120 s%@CPPFLAGS@%$CPPFLAGS%g
9121 s%@CXXFLAGS@%$CXXFLAGS%g
9122 s%@FFLAGS@%$FFLAGS%g
9123 s%@DEFS@%$DEFS%g
9124 s%@LDFLAGS@%$LDFLAGS%g
9125 s%@LIBS@%$LIBS%g
9126 s%@exec_prefix@%$exec_prefix%g
9127 s%@prefix@%$prefix%g
9128 s%@program_transform_name@%$program_transform_name%g
9129 s%@bindir@%$bindir%g
9130 s%@sbindir@%$sbindir%g
9131 s%@libexecdir@%$libexecdir%g
9132 s%@datadir@%$datadir%g
9133 s%@sysconfdir@%$sysconfdir%g
9134 s%@sharedstatedir@%$sharedstatedir%g
9135 s%@localstatedir@%$localstatedir%g
9136 s%@libdir@%$libdir%g
9137 s%@includedir@%$includedir%g
9138 s%@oldincludedir@%$oldincludedir%g
9139 s%@docdir@%$docdir%g
9140 s%@mandir@%$mandir%g
9141 s%@VERSION@%$VERSION%g
9142 s%@host@%$host%g
9143 s%@host_alias@%$host_alias%g
9144 s%@host_cpu@%$host_cpu%g
9145 s%@host_vendor@%$host_vendor%g
9146 s%@host_os@%$host_os%g
9147 s%@PORTNAME@%$PORTNAME%g
9148 s%@TAS@%$TAS%g
9149 s%@MULTIBYTE@%$MULTIBYTE%g
9150 s%@enable_nls@%$enable_nls%g
9151 s%@WANTED_LANGUAGES@%$WANTED_LANGUAGES%g
9152 s%@default_port@%$default_port%g
9153 s%@enable_shared@%$enable_shared%g
9154 s%@enable_rpath@%$enable_rpath%g
9155 s%@CC@%$CC%g
9156 s%@EXEEXT@%$EXEEXT%g
9157 s%@CPP@%$CPP%g
9158 s%@GCC@%$GCC%g
9159 s%@autodepend@%$autodepend%g
9160 s%@INCLUDES@%$INCLUDES%g
9161 s%@with_tcl@%$with_tcl%g
9162 s%@with_tk@%$with_tk%g
9163 s%@with_perl@%$with_perl%g
9164 s%@with_python@%$with_python%g
9165 s%@ANT@%$ANT%g
9166 s%@with_java@%$with_java%g
9167 s%@with_krb4@%$with_krb4%g
9168 s%@with_krb5@%$with_krb5%g
9169 s%@krb_srvtab@%$krb_srvtab%g
9170 s%@with_pam@%$with_pam%g
9171 s%@with_openssl@%$with_openssl%g
9172 s%@enable_odbc@%$enable_odbc%g
9173 s%@with_unixodbc@%$with_unixodbc%g
9174 s%@with_iodbc@%$with_iodbc%g
9175 s%@odbcinst_ini_dir@%$odbcinst_ini_dir%g
9176 s%@ELF_SYS@%$ELF_SYS%g
9177 s%@CXX@%$CXX%g
9178 s%@CXXCPP@%$CXXCPP%g
9179 s%@GXX@%$GXX%g
9180 s%@with_CXX@%$with_CXX%g
9181 s%@AWK@%$AWK%g
9182 s%@FLEX@%$FLEX%g
9183 s%@FLEXFLAGS@%$FLEXFLAGS%g
9184 s%@LN_S@%$LN_S%g
9185 s%@LD@%$LD%g
9186 s%@with_gnu_ld@%$with_gnu_ld%g
9187 s%@ld_R_works@%$ld_R_works%g
9188 s%@RANLIB@%$RANLIB%g
9189 s%@LORDER@%$LORDER%g
9190 s%@TAR@%$TAR%g
9191 s%@YACC@%$YACC%g
9192 s%@YFLAGS@%$YFLAGS%g
9193 s%@WISH@%$WISH%g
9194 s%@PERL@%$PERL%g
9195 s%@perl_installsitearch@%$perl_installsitearch%g
9196 s%@perl_installsitelib@%$perl_installsitelib%g
9197 s%@perl_installman3dir@%$perl_installman3dir%g
9198 s%@PYTHON@%$PYTHON%g
9199 s%@python_version@%$python_version%g
9200 s%@python_prefix@%$python_prefix%g
9201 s%@python_execprefix@%$python_execprefix%g
9202 s%@python_configdir@%$python_configdir%g
9203 s%@python_moduledir@%$python_moduledir%g
9204 s%@python_moduleexecdir@%$python_moduleexecdir%g
9205 s%@python_includespec@%$python_includespec%g
9206 s%@python_libspec@%$python_libspec%g
9207 s%@MSGFMT@%$MSGFMT%g
9208 s%@MSGMERGE@%$MSGMERGE%g
9209 s%@XGETTEXT@%$XGETTEXT%g
9210 s%@localedir@%$localedir%g
9211 s%@MEMCMP@%$MEMCMP%g
9212 s%@SNPRINTF@%$SNPRINTF%g
9213 s%@ISINF@%$ISINF%g
9214 s%@GETRUSAGE@%$GETRUSAGE%g
9215 s%@SRANDOM@%$SRANDOM%g
9216 s%@GETHOSTNAME@%$GETHOSTNAME%g
9217 s%@MISSING_RANDOM@%$MISSING_RANDOM%g
9218 s%@INET_ATON@%$INET_ATON%g
9219 s%@STRERROR@%$STRERROR%g
9220 s%@STRDUP@%$STRDUP%g
9221 s%@STRTOL@%$STRTOL%g
9222 s%@STRTOUL@%$STRTOUL%g
9223 s%@STRCASECMP@%$STRCASECMP%g
9224 s%@HPUXMATHLIB@%$HPUXMATHLIB%g
9225 s%@HAVE_POSIX_SIGNALS@%$HAVE_POSIX_SIGNALS%g
9226 s%@TCLSH@%$TCLSH%g
9227 s%@TCL_CONFIG_SH@%$TCL_CONFIG_SH%g
9228 s%@TK_CONFIG_SH@%$TK_CONFIG_SH%g
9229 s%@NSGMLS@%$NSGMLS%g
9230 s%@JADE@%$JADE%g
9231 s%@have_docbook@%$have_docbook%g
9232 s%@DOCBOOKSTYLE@%$DOCBOOKSTYLE%g
9233 s%@SGMLSPL@%$SGMLSPL%g
9234 s%@abs_top_srcdir@%$abs_top_srcdir%g
9235
9236 CEOF
9237 EOF
9238
9239 cat >> $CONFIG_STATUS <<\EOF
9240
9241 # Split the substitutions into bite-sized pieces for seds with
9242 # small command number limits, like on Digital OSF/1 and HP-UX.
9243 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9244 ac_file=1 # Number of current file.
9245 ac_beg=1 # First line for current file.
9246 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9247 ac_more_lines=:
9248 ac_sed_cmds=""
9249 while $ac_more_lines; do
9250   if test $ac_beg -gt 1; then
9251     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9252   else
9253     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9254   fi
9255   if test ! -s conftest.s$ac_file; then
9256     ac_more_lines=false
9257     rm -f conftest.s$ac_file
9258   else
9259     if test -z "$ac_sed_cmds"; then
9260       ac_sed_cmds="sed -f conftest.s$ac_file"
9261     else
9262       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9263     fi
9264     ac_file=`expr $ac_file + 1`
9265     ac_beg=$ac_end
9266     ac_end=`expr $ac_end + $ac_max_sed_cmds`
9267   fi
9268 done
9269 if test -z "$ac_sed_cmds"; then
9270   ac_sed_cmds=cat
9271 fi
9272 EOF
9273
9274 cat >> $CONFIG_STATUS <<EOF
9275
9276 CONFIG_FILES=\${CONFIG_FILES-"GNUmakefile
9277   src/GNUmakefile
9278   src/Makefile.global
9279   src/backend/port/Makefile
9280 "}
9281 EOF
9282 cat >> $CONFIG_STATUS <<\EOF
9283 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9284   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9285   case "$ac_file" in
9286   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9287        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9288   *) ac_file_in="${ac_file}.in" ;;
9289   esac
9290
9291   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9292
9293   # Remove last slash and all that follows it.  Not all systems have dirname.
9294   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9295   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9296     # The file is in a subdirectory.
9297     test ! -d "$ac_dir" && mkdir "$ac_dir"
9298     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9299     # A "../" for each directory in $ac_dir_suffix.
9300     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9301   else
9302     ac_dir_suffix= ac_dots=
9303   fi
9304
9305   case "$ac_given_srcdir" in
9306   .)  srcdir=.
9307       if test -z "$ac_dots"; then top_srcdir=.
9308       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9309   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9310   *) # Relative path.
9311     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9312     top_srcdir="$ac_dots$ac_given_srcdir" ;;
9313   esac
9314
9315
9316   echo creating "$ac_file"
9317   rm -f "$ac_file"
9318   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9319   case "$ac_file" in
9320   *Makefile*) ac_comsub="1i\\
9321 # $configure_input" ;;
9322   *) ac_comsub= ;;
9323   esac
9324
9325   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9326   sed -e "$ac_comsub
9327 s%@configure_input@%$configure_input%g
9328 s%@srcdir@%$srcdir%g
9329 s%@top_srcdir@%$top_srcdir%g
9330 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9331 fi; done
9332 rm -f conftest.s*
9333
9334 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9335 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9336 #
9337 # ac_d sets the value in "#define NAME VALUE" lines.
9338 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
9339 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
9340 ac_dC='\3'
9341 ac_dD='%g'
9342 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9343 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
9344 ac_uB='\([      ]\)%\1#\2define\3'
9345 ac_uC=' '
9346 ac_uD='\4%g'
9347 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9348 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
9349 ac_eB='$%\1#\2define\3'
9350 ac_eC=' '
9351 ac_eD='%g'
9352
9353 if test "${CONFIG_HEADERS+set}" != set; then
9354 EOF
9355 cat >> $CONFIG_STATUS <<EOF
9356   CONFIG_HEADERS="src/include/pg_config.h"
9357 EOF
9358 cat >> $CONFIG_STATUS <<\EOF
9359 fi
9360 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9361   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9362   case "$ac_file" in
9363   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9364        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9365   *) ac_file_in="${ac_file}.in" ;;
9366   esac
9367
9368   echo creating $ac_file
9369
9370   rm -f conftest.frag conftest.in conftest.out
9371   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9372   cat $ac_file_inputs > conftest.in
9373
9374 EOF
9375
9376 # Transform confdefs.h into a sed script conftest.vals that substitutes
9377 # the proper values into config.h.in to produce config.h.  And first:
9378 # Protect against being on the right side of a sed subst in config.status.
9379 # Protect against being in an unquoted here document in config.status.
9380 rm -f conftest.vals
9381 cat > conftest.hdr <<\EOF
9382 s/[\\&%]/\\&/g
9383 s%[\\$`]%\\&%g
9384 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9385 s%ac_d%ac_u%gp
9386 s%ac_u%ac_e%gp
9387 EOF
9388 sed -n -f conftest.hdr confdefs.h > conftest.vals
9389 rm -f conftest.hdr
9390
9391 # This sed command replaces #undef with comments.  This is necessary, for
9392 # example, in the case of _POSIX_SOURCE, which is predefined and required
9393 # on some systems where configure will not decide to define it.
9394 cat >> conftest.vals <<\EOF
9395 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9396 EOF
9397
9398 # Break up conftest.vals because some shells have a limit on
9399 # the size of here documents, and old seds have small limits too.
9400
9401 rm -f conftest.tail
9402 while :
9403 do
9404   ac_lines=`grep -c . conftest.vals`
9405   # grep -c gives empty output for an empty file on some AIX systems.
9406   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9407   # Write a limited-size here document to conftest.frag.
9408   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9409   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9410   echo 'CEOF
9411   sed -f conftest.frag conftest.in > conftest.out
9412   rm -f conftest.in
9413   mv conftest.out conftest.in
9414 ' >> $CONFIG_STATUS
9415   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9416   rm -f conftest.vals
9417   mv conftest.tail conftest.vals
9418 done
9419 rm -f conftest.vals
9420
9421 cat >> $CONFIG_STATUS <<\EOF
9422   rm -f conftest.frag conftest.h
9423   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
9424   cat conftest.in >> conftest.h
9425   rm -f conftest.in
9426   if cmp -s $ac_file conftest.h 2>/dev/null; then
9427     echo "$ac_file is unchanged"
9428     rm -f conftest.h
9429   else
9430     # Remove last slash and all that follows it.  Not all systems have dirname.
9431       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9432       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9433       # The file is in a subdirectory.
9434       test ! -d "$ac_dir" && mkdir "$ac_dir"
9435     fi
9436     rm -f $ac_file
9437     mv conftest.h $ac_file
9438   fi
9439 fi; done
9440
9441 EOF
9442
9443 cat >> $CONFIG_STATUS <<EOF
9444 ac_sources="src/backend/port/dynloader/${template}.c src/backend/port/dynloader/${template}.h src/include/port/${template}.h src/makefiles/Makefile.${template} src/backend/port/tas/${tas_file}"
9445 ac_dests="src/backend/port/dynloader.c src/include/dynloader.h src/include/pg_config_os.h src/Makefile.port src/backend/port/tas.s"
9446 EOF
9447
9448 cat >> $CONFIG_STATUS <<\EOF
9449 srcdir=$ac_given_srcdir
9450 while test -n "$ac_sources"; do
9451   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
9452   set $ac_sources; ac_source=$1; shift; ac_sources=$*
9453
9454   echo "linking $srcdir/$ac_source to $ac_dest"
9455
9456   if test ! -r $srcdir/$ac_source; then
9457     { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
9458   fi
9459   rm -f $ac_dest
9460
9461   # Make relative symlinks.
9462   # Remove last slash and all that follows it.  Not all systems have dirname.
9463   ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
9464   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
9465     # The dest file is in a subdirectory.
9466     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
9467     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
9468     # A "../" for each directory in $ac_dest_dir_suffix.
9469     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
9470   else
9471     ac_dest_dir_suffix= ac_dots=
9472   fi
9473
9474   case "$srcdir" in
9475   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
9476   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
9477   esac
9478
9479   # Make a symlink if possible; otherwise try a hard link.
9480   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
9481     ln $srcdir/$ac_source $ac_dest; then :
9482   else
9483     { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
9484   fi
9485 done
9486 EOF
9487 cat >> $CONFIG_STATUS <<EOF
9488
9489 EOF
9490 cat >> $CONFIG_STATUS <<\EOF
9491
9492 # Update timestamp for pg_config.h (see Makefile.global)
9493 test x"$CONFIG_HEADERS" != x"" && echo >src/include/stamp-h
9494
9495 exit 0
9496 EOF
9497 chmod +x $CONFIG_STATUS
9498 rm -fr confdefs* $ac_clean_files
9499 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9500