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