1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for PostgreSQL 9.6.24.
4#
5# Report bugs to <pgsql-bugs@postgresql.org>.
6#
7#
8# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9#
10#
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
13#
14# Copyright (c) 1996-2016, PostgreSQL Global Development Group
15## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
18
19# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
21if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22  emulate sh
23  NULLCMD=:
24  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25  # is contrary to our usage.  Disable this feature.
26  alias -g '${1+"$@"}'='"$@"'
27  setopt NO_GLOB_SUBST
28else
29  case `(set -o) 2>/dev/null` in #(
30  *posix*) :
31    set -o posix ;; #(
32  *) :
33     ;;
34esac
35fi
36
37
38as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49  as_echo='print -r --'
50  as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52  as_echo='printf %s\n'
53  as_echo_n='printf %s'
54else
55  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57    as_echo_n='/usr/ucb/echo -n'
58  else
59    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60    as_echo_n_body='eval
61      arg=$1;
62      case $arg in #(
63      *"$as_nl"*)
64	expr "X$arg" : "X\\(.*\\)$as_nl";
65	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66      esac;
67      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68    '
69    export as_echo_n_body
70    as_echo_n='sh -c $as_echo_n_body as_echo'
71  fi
72  export as_echo_body
73  as_echo='sh -c $as_echo_body as_echo'
74fi
75
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
78  PATH_SEPARATOR=:
79  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81      PATH_SEPARATOR=';'
82  }
83fi
84
85
86# IFS
87# We need space, tab and new line, in precisely that order.  Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
91IFS=" ""	$as_nl"
92
93# Find who we are.  Look in the path if we contain no directory separator.
94as_myself=
95case $0 in #((
96  *[\\/]* ) as_myself=$0 ;;
97  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
98for as_dir in $PATH
99do
100  IFS=$as_save_IFS
101  test -z "$as_dir" && as_dir=.
102    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103  done
104IFS=$as_save_IFS
105
106     ;;
107esac
108# We did not find ourselves, most probably we were run as `sh COMMAND'
109# in which case we are not to be found in the path.
110if test "x$as_myself" = x; then
111  as_myself=$0
112fi
113if test ! -f "$as_myself"; then
114  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115  exit 1
116fi
117
118# Unset variables that we do not need and which cause bugs (e.g. in
119# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
120# suppresses any "Segmentation fault" message there.  '((' could
121# trigger a bug in pdksh 5.2.14.
122for as_var in BASH_ENV ENV MAIL MAILPATH
123do eval test x\${$as_var+set} = xset \
124  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
125done
126PS1='$ '
127PS2='> '
128PS4='+ '
129
130# NLS nuisances.
131LC_ALL=C
132export LC_ALL
133LANGUAGE=C
134export LANGUAGE
135
136# CDPATH.
137(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139# Use a proper internal environment variable to ensure we don't fall
140  # into an infinite loop, continuously re-executing ourselves.
141  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
142    _as_can_reexec=no; export _as_can_reexec;
143    # We cannot yet assume a decent shell, so we have to provide a
144# neutralization value for shells without unset; and this also
145# works around shells that cannot unset nonexistent variables.
146# Preserve -v and -x to the replacement shell.
147BASH_ENV=/dev/null
148ENV=/dev/null
149(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
150case $- in # ((((
151  *v*x* | *x*v* ) as_opts=-vx ;;
152  *v* ) as_opts=-v ;;
153  *x* ) as_opts=-x ;;
154  * ) as_opts= ;;
155esac
156exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
157# Admittedly, this is quite paranoid, since all the known shells bail
158# out after a failed `exec'.
159$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
160as_fn_exit 255
161  fi
162  # We don't want this to propagate to other subprocesses.
163          { _as_can_reexec=; unset _as_can_reexec;}
164if test "x$CONFIG_SHELL" = x; then
165  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
166  emulate sh
167  NULLCMD=:
168  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
169  # is contrary to our usage.  Disable this feature.
170  alias -g '\${1+\"\$@\"}'='\"\$@\"'
171  setopt NO_GLOB_SUBST
172else
173  case \`(set -o) 2>/dev/null\` in #(
174  *posix*) :
175    set -o posix ;; #(
176  *) :
177     ;;
178esac
179fi
180"
181  as_required="as_fn_return () { (exit \$1); }
182as_fn_success () { as_fn_return 0; }
183as_fn_failure () { as_fn_return 1; }
184as_fn_ret_success () { return 0; }
185as_fn_ret_failure () { return 1; }
186
187exitcode=0
188as_fn_success || { exitcode=1; echo as_fn_success failed.; }
189as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
190as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
191as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
192if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
193
194else
195  exitcode=1; echo positional parameters were not saved.
196fi
197test x\$exitcode = x0 || exit 1
198test -x / || exit 1"
199  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
200  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
201  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
202  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
203test \$(( 1 + 1 )) = 2 || exit 1"
204  if (eval "$as_required") 2>/dev/null; then :
205  as_have_required=yes
206else
207  as_have_required=no
208fi
209  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
210
211else
212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
213as_found=false
214for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
215do
216  IFS=$as_save_IFS
217  test -z "$as_dir" && as_dir=.
218  as_found=:
219  case $as_dir in #(
220	 /*)
221	   for as_base in sh bash ksh sh5; do
222	     # Try only shells that exist, to save several forks.
223	     as_shell=$as_dir/$as_base
224	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
225		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
226  CONFIG_SHELL=$as_shell as_have_required=yes
227		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
228  break 2
229fi
230fi
231	   done;;
232       esac
233  as_found=false
234done
235$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
236	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
237  CONFIG_SHELL=$SHELL as_have_required=yes
238fi; }
239IFS=$as_save_IFS
240
241
242      if test "x$CONFIG_SHELL" != x; then :
243  export CONFIG_SHELL
244             # We cannot yet assume a decent shell, so we have to provide a
245# neutralization value for shells without unset; and this also
246# works around shells that cannot unset nonexistent variables.
247# Preserve -v and -x to the replacement shell.
248BASH_ENV=/dev/null
249ENV=/dev/null
250(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
251case $- in # ((((
252  *v*x* | *x*v* ) as_opts=-vx ;;
253  *v* ) as_opts=-v ;;
254  *x* ) as_opts=-x ;;
255  * ) as_opts= ;;
256esac
257exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
258# Admittedly, this is quite paranoid, since all the known shells bail
259# out after a failed `exec'.
260$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
261exit 255
262fi
263
264    if test x$as_have_required = xno; then :
265  $as_echo "$0: This script requires a shell more modern than all"
266  $as_echo "$0: the shells that I found on your system."
267  if test x${ZSH_VERSION+set} = xset ; then
268    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
269    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
270  else
271    $as_echo "$0: Please tell bug-autoconf@gnu.org and
272$0: pgsql-bugs@postgresql.org about your system, including
273$0: any error possibly output before this message. Then
274$0: install a modern shell, or manually run the script
275$0: under such a shell if you do have one."
276  fi
277  exit 1
278fi
279fi
280fi
281SHELL=${CONFIG_SHELL-/bin/sh}
282export SHELL
283# Unset more variables known to interfere with behavior of common tools.
284CLICOLOR_FORCE= GREP_OPTIONS=
285unset CLICOLOR_FORCE GREP_OPTIONS
286
287## --------------------- ##
288## M4sh Shell Functions. ##
289## --------------------- ##
290# as_fn_unset VAR
291# ---------------
292# Portably unset VAR.
293as_fn_unset ()
294{
295  { eval $1=; unset $1;}
296}
297as_unset=as_fn_unset
298
299# as_fn_set_status STATUS
300# -----------------------
301# Set $? to STATUS, without forking.
302as_fn_set_status ()
303{
304  return $1
305} # as_fn_set_status
306
307# as_fn_exit STATUS
308# -----------------
309# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
310as_fn_exit ()
311{
312  set +e
313  as_fn_set_status $1
314  exit $1
315} # as_fn_exit
316
317# as_fn_mkdir_p
318# -------------
319# Create "$as_dir" as a directory, including parents if necessary.
320as_fn_mkdir_p ()
321{
322
323  case $as_dir in #(
324  -*) as_dir=./$as_dir;;
325  esac
326  test -d "$as_dir" || eval $as_mkdir_p || {
327    as_dirs=
328    while :; do
329      case $as_dir in #(
330      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
331      *) as_qdir=$as_dir;;
332      esac
333      as_dirs="'$as_qdir' $as_dirs"
334      as_dir=`$as_dirname -- "$as_dir" ||
335$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
336	 X"$as_dir" : 'X\(//\)[^/]' \| \
337	 X"$as_dir" : 'X\(//\)$' \| \
338	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
339$as_echo X"$as_dir" |
340    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
341	    s//\1/
342	    q
343	  }
344	  /^X\(\/\/\)[^/].*/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)$/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\).*/{
353	    s//\1/
354	    q
355	  }
356	  s/.*/./; q'`
357      test -d "$as_dir" && break
358    done
359    test -z "$as_dirs" || eval "mkdir $as_dirs"
360  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
361
362
363} # as_fn_mkdir_p
364
365# as_fn_executable_p FILE
366# -----------------------
367# Test if FILE is an executable regular file.
368as_fn_executable_p ()
369{
370  test -f "$1" && test -x "$1"
371} # as_fn_executable_p
372# as_fn_append VAR VALUE
373# ----------------------
374# Append the text in VALUE to the end of the definition contained in VAR. Take
375# advantage of any shell optimizations that allow amortized linear growth over
376# repeated appends, instead of the typical quadratic growth present in naive
377# implementations.
378if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
379  eval 'as_fn_append ()
380  {
381    eval $1+=\$2
382  }'
383else
384  as_fn_append ()
385  {
386    eval $1=\$$1\$2
387  }
388fi # as_fn_append
389
390# as_fn_arith ARG...
391# ------------------
392# Perform arithmetic evaluation on the ARGs, and store the result in the
393# global $as_val. Take advantage of shells that can avoid forks. The arguments
394# must be portable across $(()) and expr.
395if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
396  eval 'as_fn_arith ()
397  {
398    as_val=$(( $* ))
399  }'
400else
401  as_fn_arith ()
402  {
403    as_val=`expr "$@" || test $? -eq 1`
404  }
405fi # as_fn_arith
406
407
408# as_fn_error STATUS ERROR [LINENO LOG_FD]
409# ----------------------------------------
410# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
411# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
412# script with STATUS, using 1 if that was 0.
413as_fn_error ()
414{
415  as_status=$1; test $as_status -eq 0 && as_status=1
416  if test "$4"; then
417    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
418    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
419  fi
420  $as_echo "$as_me: error: $2" >&2
421  as_fn_exit $as_status
422} # as_fn_error
423
424if expr a : '\(a\)' >/dev/null 2>&1 &&
425   test "X`expr 00001 : '.*\(...\)'`" = X001; then
426  as_expr=expr
427else
428  as_expr=false
429fi
430
431if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
432  as_basename=basename
433else
434  as_basename=false
435fi
436
437if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
438  as_dirname=dirname
439else
440  as_dirname=false
441fi
442
443as_me=`$as_basename -- "$0" ||
444$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
445	 X"$0" : 'X\(//\)$' \| \
446	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
447$as_echo X/"$0" |
448    sed '/^.*\/\([^/][^/]*\)\/*$/{
449	    s//\1/
450	    q
451	  }
452	  /^X\/\(\/\/\)$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\).*/{
457	    s//\1/
458	    q
459	  }
460	  s/.*/./; q'`
461
462# Avoid depending upon Character Ranges.
463as_cr_letters='abcdefghijklmnopqrstuvwxyz'
464as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
465as_cr_Letters=$as_cr_letters$as_cr_LETTERS
466as_cr_digits='0123456789'
467as_cr_alnum=$as_cr_Letters$as_cr_digits
468
469
470  as_lineno_1=$LINENO as_lineno_1a=$LINENO
471  as_lineno_2=$LINENO as_lineno_2a=$LINENO
472  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
473  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
474  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
475  sed -n '
476    p
477    /[$]LINENO/=
478  ' <$as_myself |
479    sed '
480      s/[$]LINENO.*/&-/
481      t lineno
482      b
483      :lineno
484      N
485      :loop
486      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
487      t loop
488      s/-\n.*//
489    ' >$as_me.lineno &&
490  chmod +x "$as_me.lineno" ||
491    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
492
493  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
494  # already done that, so ensure we don't try to do so again and fall
495  # in an infinite loop.  This has already happened in practice.
496  _as_can_reexec=no; export _as_can_reexec
497  # Don't try to exec as it changes $[0], causing all sort of problems
498  # (the dirname of $[0] is not the place where we might find the
499  # original and so on.  Autoconf is especially sensitive to this).
500  . "./$as_me.lineno"
501  # Exit status is that of the last command.
502  exit
503}
504
505ECHO_C= ECHO_N= ECHO_T=
506case `echo -n x` in #(((((
507-n*)
508  case `echo 'xy\c'` in
509  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
510  xy)  ECHO_C='\c';;
511  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
512       ECHO_T='	';;
513  esac;;
514*)
515  ECHO_N='-n';;
516esac
517
518rm -f conf$$ conf$$.exe conf$$.file
519if test -d conf$$.dir; then
520  rm -f conf$$.dir/conf$$.file
521else
522  rm -f conf$$.dir
523  mkdir conf$$.dir 2>/dev/null
524fi
525if (echo >conf$$.file) 2>/dev/null; then
526  if ln -s conf$$.file conf$$ 2>/dev/null; then
527    as_ln_s='ln -s'
528    # ... but there are two gotchas:
529    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
530    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
531    # In both cases, we have to default to `cp -pR'.
532    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
533      as_ln_s='cp -pR'
534  elif ln conf$$.file conf$$ 2>/dev/null; then
535    as_ln_s=ln
536  else
537    as_ln_s='cp -pR'
538  fi
539else
540  as_ln_s='cp -pR'
541fi
542rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
543rmdir conf$$.dir 2>/dev/null
544
545if mkdir -p . 2>/dev/null; then
546  as_mkdir_p='mkdir -p "$as_dir"'
547else
548  test -d ./-p && rmdir ./-p
549  as_mkdir_p=false
550fi
551
552as_test_x='test -x'
553as_executable_p=as_fn_executable_p
554
555# Sed expression to map a string onto a valid CPP name.
556as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
557
558# Sed expression to map a string onto a valid variable name.
559as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
560
561
562test -n "$DJDIR" || exec 7<&0 </dev/null
563exec 6>&1
564
565# Name of the host.
566# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
567# so uname gets run too.
568ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
569
570#
571# Initializations.
572#
573ac_default_prefix=/usr/local
574ac_clean_files=
575ac_config_libobj_dir=.
576LIBOBJS=
577cross_compiling=no
578subdirs=
579MFLAGS=
580MAKEFLAGS=
581
582# Identity of this package.
583PACKAGE_NAME='PostgreSQL'
584PACKAGE_TARNAME='postgresql'
585PACKAGE_VERSION='9.6.24'
586PACKAGE_STRING='PostgreSQL 9.6.24'
587PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org'
588PACKAGE_URL=''
589
590ac_unique_file="src/backend/access/common/heaptuple.c"
591ac_default_prefix=/usr/local/pgsql
592# Factoring default headers for most tests.
593ac_includes_default="\
594#include <stdio.h>
595#ifdef HAVE_SYS_TYPES_H
596# include <sys/types.h>
597#endif
598#ifdef HAVE_SYS_STAT_H
599# include <sys/stat.h>
600#endif
601#ifdef STDC_HEADERS
602# include <stdlib.h>
603# include <stddef.h>
604#else
605# ifdef HAVE_STDLIB_H
606#  include <stdlib.h>
607# endif
608#endif
609#ifdef HAVE_STRING_H
610# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
611#  include <memory.h>
612# endif
613# include <string.h>
614#endif
615#ifdef HAVE_STRINGS_H
616# include <strings.h>
617#endif
618#ifdef HAVE_INTTYPES_H
619# include <inttypes.h>
620#endif
621#ifdef HAVE_STDINT_H
622# include <stdint.h>
623#endif
624#ifdef HAVE_UNISTD_H
625# include <unistd.h>
626#endif"
627
628ac_subst_vars='LTLIBOBJS
629vpath_build
630PG_SYSROOT
631PG_VERSION_NUM
632PROVE
633OSX
634XSLTPROC
635XMLLINT
636DBTOEPUB
637COLLATEINDEX
638DOCBOOKSTYLE
639have_docbook
640JADE
641NSGMLS
642TCL_SHLIB_LD_LIBS
643TCL_SHARED_BUILD
644TCL_LIB_SPEC
645TCL_LIBS
646TCL_INCLUDE_SPEC
647TCL_CONFIG_SH
648TCLSH
649XGETTEXT
650MSGMERGE
651MSGFMT_FLAGS
652MSGFMT
653PG_CRC32C_OBJS
654CFLAGS_SSE42
655have_win32_dbghelp
656HAVE_IPV6
657LIBOBJS
658UUID_LIBS
659LDAP_LIBS_BE
660LDAP_LIBS_FE
661PTHREAD_CFLAGS
662PTHREAD_LIBS
663PTHREAD_CC
664ax_pthread_config
665ZIC
666python_additional_libs
667python_libspec
668python_libdir
669python_includespec
670python_version
671python_majorversion
672PYTHON
673perl_embed_ldflags
674perl_embed_ccflags
675perl_includespec
676perl_useshrplib
677perl_privlibexp
678perl_archlibexp
679PERL
680FLEXFLAGS
681FLEX
682BISONFLAGS
683BISON
684MKDIR_P
685AWK
686LN_S
687TAR
688install_bin
689INSTALL_DATA
690INSTALL_SCRIPT
691INSTALL_PROGRAM
692WINDRES
693DLLWRAP
694DLLTOOL
695AR
696STRIP_SHARED_LIB
697STRIP_STATIC_LIB
698STRIP
699RANLIB
700ld_R_works
701with_gnu_ld
702LD
703LDFLAGS_SL
704LDFLAGS_EX
705ELF_SYS
706EGREP
707GREP
708with_zlib
709with_system_tzdata
710with_libxslt
711with_libxml
712XML2_CONFIG
713UUID_EXTRA_OBJS
714with_uuid
715with_systemd
716with_selinux
717with_openssl
718krb_srvtab
719with_python
720with_perl
721with_tcl
722enable_thread_safety
723INCLUDES
724autodepend
725TAS
726GCC
727CPP
728CFLAGS_SL
729CFLAGS_VECTOR
730SUN_STUDIO_CC
731OBJEXT
732EXEEXT
733ac_ct_CC
734CPPFLAGS
735LDFLAGS
736CFLAGS
737CC
738enable_tap_tests
739enable_dtrace
740DTRACEFLAGS
741DTRACE
742enable_coverage
743GENHTML
744LCOV
745GCOV
746enable_debug
747enable_rpath
748default_port
749WANTED_LANGUAGES
750enable_nls
751PORTNAME
752host_os
753host_vendor
754host_cpu
755host
756build_os
757build_vendor
758build_cpu
759build
760PG_MAJORVERSION
761configure_args
762target_alias
763host_alias
764build_alias
765LIBS
766ECHO_T
767ECHO_N
768ECHO_C
769DEFS
770mandir
771localedir
772libdir
773psdir
774pdfdir
775dvidir
776htmldir
777infodir
778docdir
779oldincludedir
780includedir
781localstatedir
782sharedstatedir
783sysconfdir
784datadir
785datarootdir
786libexecdir
787sbindir
788bindir
789program_transform_name
790prefix
791exec_prefix
792PACKAGE_URL
793PACKAGE_BUGREPORT
794PACKAGE_STRING
795PACKAGE_VERSION
796PACKAGE_TARNAME
797PACKAGE_NAME
798PATH_SEPARATOR
799SHELL'
800ac_subst_files=''
801ac_user_opts='
802enable_option_checking
803with_extra_version
804with_template
805with_includes
806with_libraries
807with_libs
808enable_integer_datetimes
809enable_nls
810with_pgport
811enable_rpath
812enable_spinlocks
813enable_atomics
814enable_debug
815enable_profiling
816enable_coverage
817enable_dtrace
818enable_tap_tests
819with_blocksize
820with_segsize
821with_wal_blocksize
822with_wal_segsize
823with_CC
824enable_depend
825enable_cassert
826enable_thread_safety
827with_tcl
828with_tclconfig
829with_perl
830with_python
831with_gssapi
832with_krb_srvnam
833with_pam
834with_bsd_auth
835with_ldap
836with_bonjour
837with_openssl
838with_selinux
839with_systemd
840with_readline
841with_libedit_preferred
842with_uuid
843with_ossp_uuid
844with_libxml
845with_libxslt
846with_system_tzdata
847with_zlib
848with_gnu_ld
849enable_largefile
850enable_float4_byval
851enable_float8_byval
852'
853      ac_precious_vars='build_alias
854host_alias
855target_alias
856CC
857CFLAGS
858LDFLAGS
859LIBS
860CPPFLAGS
861CPP
862LDFLAGS_EX
863LDFLAGS_SL
864DOCBOOKSTYLE'
865
866
867# Initialize some variables set by options.
868ac_init_help=
869ac_init_version=false
870ac_unrecognized_opts=
871ac_unrecognized_sep=
872# The variables have the same names as the options, with
873# dashes changed to underlines.
874cache_file=/dev/null
875exec_prefix=NONE
876no_create=
877no_recursion=
878prefix=NONE
879program_prefix=NONE
880program_suffix=NONE
881program_transform_name=s,x,x,
882silent=
883site=
884srcdir=
885verbose=
886x_includes=NONE
887x_libraries=NONE
888
889# Installation directory options.
890# These are left unexpanded so users can "make install exec_prefix=/foo"
891# and all the variables that are supposed to be based on exec_prefix
892# by default will actually change.
893# Use braces instead of parens because sh, perl, etc. also accept them.
894# (The list follows the same order as the GNU Coding Standards.)
895bindir='${exec_prefix}/bin'
896sbindir='${exec_prefix}/sbin'
897libexecdir='${exec_prefix}/libexec'
898datarootdir='${prefix}/share'
899datadir='${datarootdir}'
900sysconfdir='${prefix}/etc'
901sharedstatedir='${prefix}/com'
902localstatedir='${prefix}/var'
903includedir='${prefix}/include'
904oldincludedir='/usr/include'
905docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
906infodir='${datarootdir}/info'
907htmldir='${docdir}'
908dvidir='${docdir}'
909pdfdir='${docdir}'
910psdir='${docdir}'
911libdir='${exec_prefix}/lib'
912localedir='${datarootdir}/locale'
913mandir='${datarootdir}/man'
914
915ac_prev=
916ac_dashdash=
917for ac_option
918do
919  # If the previous option needs an argument, assign it.
920  if test -n "$ac_prev"; then
921    eval $ac_prev=\$ac_option
922    ac_prev=
923    continue
924  fi
925
926  case $ac_option in
927  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
928  *=)   ac_optarg= ;;
929  *)    ac_optarg=yes ;;
930  esac
931
932  # Accept the important Cygnus configure options, so we can diagnose typos.
933
934  case $ac_dashdash$ac_option in
935  --)
936    ac_dashdash=yes ;;
937
938  -bindir | --bindir | --bindi | --bind | --bin | --bi)
939    ac_prev=bindir ;;
940  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
941    bindir=$ac_optarg ;;
942
943  -build | --build | --buil | --bui | --bu)
944    ac_prev=build_alias ;;
945  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
946    build_alias=$ac_optarg ;;
947
948  -cache-file | --cache-file | --cache-fil | --cache-fi \
949  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
950    ac_prev=cache_file ;;
951  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
952  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
953    cache_file=$ac_optarg ;;
954
955  --config-cache | -C)
956    cache_file=config.cache ;;
957
958  -datadir | --datadir | --datadi | --datad)
959    ac_prev=datadir ;;
960  -datadir=* | --datadir=* | --datadi=* | --datad=*)
961    datadir=$ac_optarg ;;
962
963  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
964  | --dataroo | --dataro | --datar)
965    ac_prev=datarootdir ;;
966  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
967  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
968    datarootdir=$ac_optarg ;;
969
970  -disable-* | --disable-*)
971    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
972    # Reject names that are not valid shell variable names.
973    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
974      as_fn_error $? "invalid feature name: $ac_useropt"
975    ac_useropt_orig=$ac_useropt
976    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
977    case $ac_user_opts in
978      *"
979"enable_$ac_useropt"
980"*) ;;
981      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
982	 ac_unrecognized_sep=', ';;
983    esac
984    eval enable_$ac_useropt=no ;;
985
986  -docdir | --docdir | --docdi | --doc | --do)
987    ac_prev=docdir ;;
988  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
989    docdir=$ac_optarg ;;
990
991  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
992    ac_prev=dvidir ;;
993  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
994    dvidir=$ac_optarg ;;
995
996  -enable-* | --enable-*)
997    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
998    # Reject names that are not valid shell variable names.
999    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1000      as_fn_error $? "invalid feature name: $ac_useropt"
1001    ac_useropt_orig=$ac_useropt
1002    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1003    case $ac_user_opts in
1004      *"
1005"enable_$ac_useropt"
1006"*) ;;
1007      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1008	 ac_unrecognized_sep=', ';;
1009    esac
1010    eval enable_$ac_useropt=\$ac_optarg ;;
1011
1012  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1013  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1014  | --exec | --exe | --ex)
1015    ac_prev=exec_prefix ;;
1016  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1017  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1018  | --exec=* | --exe=* | --ex=*)
1019    exec_prefix=$ac_optarg ;;
1020
1021  -gas | --gas | --ga | --g)
1022    # Obsolete; use --with-gas.
1023    with_gas=yes ;;
1024
1025  -help | --help | --hel | --he | -h)
1026    ac_init_help=long ;;
1027  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1028    ac_init_help=recursive ;;
1029  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1030    ac_init_help=short ;;
1031
1032  -host | --host | --hos | --ho)
1033    ac_prev=host_alias ;;
1034  -host=* | --host=* | --hos=* | --ho=*)
1035    host_alias=$ac_optarg ;;
1036
1037  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1038    ac_prev=htmldir ;;
1039  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1040  | --ht=*)
1041    htmldir=$ac_optarg ;;
1042
1043  -includedir | --includedir | --includedi | --included | --include \
1044  | --includ | --inclu | --incl | --inc)
1045    ac_prev=includedir ;;
1046  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1047  | --includ=* | --inclu=* | --incl=* | --inc=*)
1048    includedir=$ac_optarg ;;
1049
1050  -infodir | --infodir | --infodi | --infod | --info | --inf)
1051    ac_prev=infodir ;;
1052  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1053    infodir=$ac_optarg ;;
1054
1055  -libdir | --libdir | --libdi | --libd)
1056    ac_prev=libdir ;;
1057  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1058    libdir=$ac_optarg ;;
1059
1060  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1061  | --libexe | --libex | --libe)
1062    ac_prev=libexecdir ;;
1063  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1064  | --libexe=* | --libex=* | --libe=*)
1065    libexecdir=$ac_optarg ;;
1066
1067  -localedir | --localedir | --localedi | --localed | --locale)
1068    ac_prev=localedir ;;
1069  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1070    localedir=$ac_optarg ;;
1071
1072  -localstatedir | --localstatedir | --localstatedi | --localstated \
1073  | --localstate | --localstat | --localsta | --localst | --locals)
1074    ac_prev=localstatedir ;;
1075  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1076  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1077    localstatedir=$ac_optarg ;;
1078
1079  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1080    ac_prev=mandir ;;
1081  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1082    mandir=$ac_optarg ;;
1083
1084  -nfp | --nfp | --nf)
1085    # Obsolete; use --without-fp.
1086    with_fp=no ;;
1087
1088  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1089  | --no-cr | --no-c | -n)
1090    no_create=yes ;;
1091
1092  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1093  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1094    no_recursion=yes ;;
1095
1096  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1097  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1098  | --oldin | --oldi | --old | --ol | --o)
1099    ac_prev=oldincludedir ;;
1100  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1101  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1102  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1103    oldincludedir=$ac_optarg ;;
1104
1105  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1106    ac_prev=prefix ;;
1107  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1108    prefix=$ac_optarg ;;
1109
1110  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1111  | --program-pre | --program-pr | --program-p)
1112    ac_prev=program_prefix ;;
1113  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1114  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1115    program_prefix=$ac_optarg ;;
1116
1117  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1118  | --program-suf | --program-su | --program-s)
1119    ac_prev=program_suffix ;;
1120  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1121  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1122    program_suffix=$ac_optarg ;;
1123
1124  -program-transform-name | --program-transform-name \
1125  | --program-transform-nam | --program-transform-na \
1126  | --program-transform-n | --program-transform- \
1127  | --program-transform | --program-transfor \
1128  | --program-transfo | --program-transf \
1129  | --program-trans | --program-tran \
1130  | --progr-tra | --program-tr | --program-t)
1131    ac_prev=program_transform_name ;;
1132  -program-transform-name=* | --program-transform-name=* \
1133  | --program-transform-nam=* | --program-transform-na=* \
1134  | --program-transform-n=* | --program-transform-=* \
1135  | --program-transform=* | --program-transfor=* \
1136  | --program-transfo=* | --program-transf=* \
1137  | --program-trans=* | --program-tran=* \
1138  | --progr-tra=* | --program-tr=* | --program-t=*)
1139    program_transform_name=$ac_optarg ;;
1140
1141  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1142    ac_prev=pdfdir ;;
1143  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1144    pdfdir=$ac_optarg ;;
1145
1146  -psdir | --psdir | --psdi | --psd | --ps)
1147    ac_prev=psdir ;;
1148  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1149    psdir=$ac_optarg ;;
1150
1151  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1152  | -silent | --silent | --silen | --sile | --sil)
1153    silent=yes ;;
1154
1155  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1156    ac_prev=sbindir ;;
1157  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1158  | --sbi=* | --sb=*)
1159    sbindir=$ac_optarg ;;
1160
1161  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1162  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1163  | --sharedst | --shareds | --shared | --share | --shar \
1164  | --sha | --sh)
1165    ac_prev=sharedstatedir ;;
1166  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1167  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1168  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1169  | --sha=* | --sh=*)
1170    sharedstatedir=$ac_optarg ;;
1171
1172  -site | --site | --sit)
1173    ac_prev=site ;;
1174  -site=* | --site=* | --sit=*)
1175    site=$ac_optarg ;;
1176
1177  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1178    ac_prev=srcdir ;;
1179  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1180    srcdir=$ac_optarg ;;
1181
1182  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1183  | --syscon | --sysco | --sysc | --sys | --sy)
1184    ac_prev=sysconfdir ;;
1185  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1186  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1187    sysconfdir=$ac_optarg ;;
1188
1189  -target | --target | --targe | --targ | --tar | --ta | --t)
1190    ac_prev=target_alias ;;
1191  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1192    target_alias=$ac_optarg ;;
1193
1194  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1195    verbose=yes ;;
1196
1197  -version | --version | --versio | --versi | --vers | -V)
1198    ac_init_version=: ;;
1199
1200  -with-* | --with-*)
1201    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1202    # Reject names that are not valid shell variable names.
1203    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1204      as_fn_error $? "invalid package name: $ac_useropt"
1205    ac_useropt_orig=$ac_useropt
1206    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1207    case $ac_user_opts in
1208      *"
1209"with_$ac_useropt"
1210"*) ;;
1211      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1212	 ac_unrecognized_sep=', ';;
1213    esac
1214    eval with_$ac_useropt=\$ac_optarg ;;
1215
1216  -without-* | --without-*)
1217    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1218    # Reject names that are not valid shell variable names.
1219    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1220      as_fn_error $? "invalid package name: $ac_useropt"
1221    ac_useropt_orig=$ac_useropt
1222    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1223    case $ac_user_opts in
1224      *"
1225"with_$ac_useropt"
1226"*) ;;
1227      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1228	 ac_unrecognized_sep=', ';;
1229    esac
1230    eval with_$ac_useropt=no ;;
1231
1232  --x)
1233    # Obsolete; use --with-x.
1234    with_x=yes ;;
1235
1236  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1237  | --x-incl | --x-inc | --x-in | --x-i)
1238    ac_prev=x_includes ;;
1239  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1240  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1241    x_includes=$ac_optarg ;;
1242
1243  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1244  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1245    ac_prev=x_libraries ;;
1246  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1247  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1248    x_libraries=$ac_optarg ;;
1249
1250  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1251Try \`$0 --help' for more information"
1252    ;;
1253
1254  *=*)
1255    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1256    # Reject names that are not valid shell variable names.
1257    case $ac_envvar in #(
1258      '' | [0-9]* | *[!_$as_cr_alnum]* )
1259      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1260    esac
1261    eval $ac_envvar=\$ac_optarg
1262    export $ac_envvar ;;
1263
1264  *)
1265    # FIXME: should be removed in autoconf 3.0.
1266    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1267    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1268      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1269    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1270    ;;
1271
1272  esac
1273done
1274
1275if test -n "$ac_prev"; then
1276  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1277  as_fn_error $? "missing argument to $ac_option"
1278fi
1279
1280if test -n "$ac_unrecognized_opts"; then
1281  case $enable_option_checking in
1282    no) ;;
1283    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1284    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1285  esac
1286fi
1287
1288# Check all directory arguments for consistency.
1289for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1290		datadir sysconfdir sharedstatedir localstatedir includedir \
1291		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1292		libdir localedir mandir
1293do
1294  eval ac_val=\$$ac_var
1295  # Remove trailing slashes.
1296  case $ac_val in
1297    */ )
1298      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1299      eval $ac_var=\$ac_val;;
1300  esac
1301  # Be sure to have absolute directory names.
1302  case $ac_val in
1303    [\\/$]* | ?:[\\/]* )  continue;;
1304    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1305  esac
1306  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1307done
1308
1309# There might be people who depend on the old broken behavior: `$host'
1310# used to hold the argument of --host etc.
1311# FIXME: To remove some day.
1312build=$build_alias
1313host=$host_alias
1314target=$target_alias
1315
1316# FIXME: To remove some day.
1317if test "x$host_alias" != x; then
1318  if test "x$build_alias" = x; then
1319    cross_compiling=maybe
1320  elif test "x$build_alias" != "x$host_alias"; then
1321    cross_compiling=yes
1322  fi
1323fi
1324
1325ac_tool_prefix=
1326test -n "$host_alias" && ac_tool_prefix=$host_alias-
1327
1328test "$silent" = yes && exec 6>/dev/null
1329
1330
1331ac_pwd=`pwd` && test -n "$ac_pwd" &&
1332ac_ls_di=`ls -di .` &&
1333ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1334  as_fn_error $? "working directory cannot be determined"
1335test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1336  as_fn_error $? "pwd does not report name of working directory"
1337
1338
1339# Find the source files, if location was not specified.
1340if test -z "$srcdir"; then
1341  ac_srcdir_defaulted=yes
1342  # Try the directory containing this script, then the parent directory.
1343  ac_confdir=`$as_dirname -- "$as_myself" ||
1344$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1345	 X"$as_myself" : 'X\(//\)[^/]' \| \
1346	 X"$as_myself" : 'X\(//\)$' \| \
1347	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1348$as_echo X"$as_myself" |
1349    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1350	    s//\1/
1351	    q
1352	  }
1353	  /^X\(\/\/\)[^/].*/{
1354	    s//\1/
1355	    q
1356	  }
1357	  /^X\(\/\/\)$/{
1358	    s//\1/
1359	    q
1360	  }
1361	  /^X\(\/\).*/{
1362	    s//\1/
1363	    q
1364	  }
1365	  s/.*/./; q'`
1366  srcdir=$ac_confdir
1367  if test ! -r "$srcdir/$ac_unique_file"; then
1368    srcdir=..
1369  fi
1370else
1371  ac_srcdir_defaulted=no
1372fi
1373if test ! -r "$srcdir/$ac_unique_file"; then
1374  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1375  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1376fi
1377ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1378ac_abs_confdir=`(
1379	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1380	pwd)`
1381# When building in place, set srcdir=.
1382if test "$ac_abs_confdir" = "$ac_pwd"; then
1383  srcdir=.
1384fi
1385# Remove unnecessary trailing slashes from srcdir.
1386# Double slashes in file names in object file debugging info
1387# mess up M-x gdb in Emacs.
1388case $srcdir in
1389*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1390esac
1391for ac_var in $ac_precious_vars; do
1392  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1393  eval ac_env_${ac_var}_value=\$${ac_var}
1394  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1395  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1396done
1397
1398#
1399# Report the --help message.
1400#
1401if test "$ac_init_help" = "long"; then
1402  # Omit some internal or obsolete options to make the list less imposing.
1403  # This message is too long to be a string in the A/UX 3.1 sh.
1404  cat <<_ACEOF
1405\`configure' configures PostgreSQL 9.6.24 to adapt to many kinds of systems.
1406
1407Usage: $0 [OPTION]... [VAR=VALUE]...
1408
1409To assign environment variables (e.g., CC, CFLAGS...), specify them as
1410VAR=VALUE.  See below for descriptions of some of the useful variables.
1411
1412Defaults for the options are specified in brackets.
1413
1414Configuration:
1415  -h, --help              display this help and exit
1416      --help=short        display options specific to this package
1417      --help=recursive    display the short help of all the included packages
1418  -V, --version           display version information and exit
1419  -q, --quiet, --silent   do not print \`checking ...' messages
1420      --cache-file=FILE   cache test results in FILE [disabled]
1421  -C, --config-cache      alias for \`--cache-file=config.cache'
1422  -n, --no-create         do not create output files
1423      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1424
1425Installation directories:
1426  --prefix=PREFIX         install architecture-independent files in PREFIX
1427                          [$ac_default_prefix]
1428  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1429                          [PREFIX]
1430
1431By default, \`make install' will install all the files in
1432\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1433an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1434for instance \`--prefix=\$HOME'.
1435
1436For better control, use the options below.
1437
1438Fine tuning of the installation directories:
1439  --bindir=DIR            user executables [EPREFIX/bin]
1440  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1441  --libexecdir=DIR        program executables [EPREFIX/libexec]
1442  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1443  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1444  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1445  --libdir=DIR            object code libraries [EPREFIX/lib]
1446  --includedir=DIR        C header files [PREFIX/include]
1447  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1448  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1449  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1450  --infodir=DIR           info documentation [DATAROOTDIR/info]
1451  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1452  --mandir=DIR            man documentation [DATAROOTDIR/man]
1453  --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1454  --htmldir=DIR           html documentation [DOCDIR]
1455  --dvidir=DIR            dvi documentation [DOCDIR]
1456  --pdfdir=DIR            pdf documentation [DOCDIR]
1457  --psdir=DIR             ps documentation [DOCDIR]
1458_ACEOF
1459
1460  cat <<\_ACEOF
1461
1462System types:
1463  --build=BUILD     configure for building on BUILD [guessed]
1464  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1465_ACEOF
1466fi
1467
1468if test -n "$ac_init_help"; then
1469  case $ac_init_help in
1470     short | recursive ) echo "Configuration of PostgreSQL 9.6.24:";;
1471   esac
1472  cat <<\_ACEOF
1473
1474Optional Features:
1475  --disable-option-checking  ignore unrecognized --enable/--with options
1476  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1477  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1478  --disable-integer-datetimes
1479                          disable 64-bit integer date/time support
1480  --enable-nls[=LANGUAGES]
1481                          enable Native Language Support
1482  --disable-rpath         do not embed shared library search path in
1483                          executables
1484  --disable-spinlocks     do not use spinlocks
1485  --disable-atomics       do not use atomic operations
1486  --enable-debug          build with debugging symbols (-g)
1487  --enable-profiling      build with profiling enabled
1488  --enable-coverage       build with coverage testing instrumentation
1489  --enable-dtrace         build with DTrace support
1490  --enable-tap-tests      enable TAP tests (requires Perl and IPC::Run)
1491  --enable-depend         turn on automatic dependency tracking
1492  --enable-cassert        enable assertion checks (for debugging)
1493  --disable-thread-safety disable thread-safety in client libraries
1494  --disable-largefile     omit support for large files
1495  --disable-float4-byval  disable float4 passed by value
1496  --disable-float8-byval  disable float8 passed by value
1497
1498Optional Packages:
1499  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1500  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1501  --with-extra-version=STRING
1502                          append STRING to version
1503  --with-template=NAME    override operating system template
1504  --with-includes=DIRS    look for additional header files in DIRS
1505  --with-libraries=DIRS   look for additional libraries in DIRS
1506  --with-libs=DIRS        alternative spelling of --with-libraries
1507  --with-pgport=PORTNUM   set default port number [5432]
1508  --with-blocksize=BLOCKSIZE
1509                          set table block size in kB [8]
1510  --with-segsize=SEGSIZE  set table segment size in GB [1]
1511  --with-wal-blocksize=BLOCKSIZE
1512                          set WAL block size in kB [8]
1513  --with-wal-segsize=SEGSIZE
1514                          set WAL segment size in MB [16]
1515  --with-CC=CMD           set compiler (deprecated)
1516  --with-tcl              build Tcl modules (PL/Tcl)
1517  --with-tclconfig=DIR    tclConfig.sh is in DIR
1518  --with-perl             build Perl modules (PL/Perl)
1519  --with-python           build Python modules (PL/Python)
1520  --with-gssapi           build with GSSAPI support
1521  --with-krb-srvnam=NAME  default service principal name in Kerberos (GSSAPI)
1522                          [postgres]
1523  --with-pam              build with PAM support
1524  --with-bsd-auth         build with BSD Authentication support
1525  --with-ldap             build with LDAP support
1526  --with-bonjour          build with Bonjour support
1527  --with-openssl          build with OpenSSL support
1528  --with-selinux          build with SELinux support
1529  --with-systemd          build with systemd support
1530  --without-readline      do not use GNU Readline nor BSD Libedit for editing
1531  --with-libedit-preferred
1532                          prefer BSD Libedit over GNU Readline
1533  --with-uuid=LIB         build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1534  --with-ossp-uuid        obsolete spelling of --with-uuid=ossp
1535  --with-libxml           build with XML support
1536  --with-libxslt          use XSLT support when building contrib/xml2
1537  --with-system-tzdata=DIR
1538                          use system time zone data in DIR
1539  --without-zlib          do not use Zlib
1540  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1541
1542Some influential environment variables:
1543  CC          C compiler command
1544  CFLAGS      C compiler flags
1545  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1546              nonstandard directory <lib dir>
1547  LIBS        libraries to pass to the linker, e.g. -l<library>
1548  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1549              you have headers in a nonstandard directory <include dir>
1550  CPP         C preprocessor
1551  LDFLAGS_EX  extra linker flags for linking executables only
1552  LDFLAGS_SL  extra linker flags for linking shared libraries only
1553  DOCBOOKSTYLE
1554              location of DocBook stylesheets
1555
1556Use these variables to override the choices made by `configure' or to help
1557it to find libraries and programs with nonstandard names/locations.
1558
1559Report bugs to <pgsql-bugs@postgresql.org>.
1560_ACEOF
1561ac_status=$?
1562fi
1563
1564if test "$ac_init_help" = "recursive"; then
1565  # If there are subdirs, report their specific --help.
1566  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1567    test -d "$ac_dir" ||
1568      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1569      continue
1570    ac_builddir=.
1571
1572case "$ac_dir" in
1573.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1574*)
1575  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1576  # A ".." for each directory in $ac_dir_suffix.
1577  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1578  case $ac_top_builddir_sub in
1579  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1580  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1581  esac ;;
1582esac
1583ac_abs_top_builddir=$ac_pwd
1584ac_abs_builddir=$ac_pwd$ac_dir_suffix
1585# for backward compatibility:
1586ac_top_builddir=$ac_top_build_prefix
1587
1588case $srcdir in
1589  .)  # We are building in place.
1590    ac_srcdir=.
1591    ac_top_srcdir=$ac_top_builddir_sub
1592    ac_abs_top_srcdir=$ac_pwd ;;
1593  [\\/]* | ?:[\\/]* )  # Absolute name.
1594    ac_srcdir=$srcdir$ac_dir_suffix;
1595    ac_top_srcdir=$srcdir
1596    ac_abs_top_srcdir=$srcdir ;;
1597  *) # Relative name.
1598    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1599    ac_top_srcdir=$ac_top_build_prefix$srcdir
1600    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1601esac
1602ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1603
1604    cd "$ac_dir" || { ac_status=$?; continue; }
1605    # Check for guested configure.
1606    if test -f "$ac_srcdir/configure.gnu"; then
1607      echo &&
1608      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1609    elif test -f "$ac_srcdir/configure"; then
1610      echo &&
1611      $SHELL "$ac_srcdir/configure" --help=recursive
1612    else
1613      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1614    fi || ac_status=$?
1615    cd "$ac_pwd" || { ac_status=$?; break; }
1616  done
1617fi
1618
1619test -n "$ac_init_help" && exit $ac_status
1620if $ac_init_version; then
1621  cat <<\_ACEOF
1622PostgreSQL configure 9.6.24
1623generated by GNU Autoconf 2.69
1624
1625Copyright (C) 2012 Free Software Foundation, Inc.
1626This configure script is free software; the Free Software Foundation
1627gives unlimited permission to copy, distribute and modify it.
1628
1629Copyright (c) 1996-2016, PostgreSQL Global Development Group
1630_ACEOF
1631  exit
1632fi
1633
1634## ------------------------ ##
1635## Autoconf initialization. ##
1636## ------------------------ ##
1637
1638# ac_fn_c_try_compile LINENO
1639# --------------------------
1640# Try to compile conftest.$ac_ext, and return whether this succeeded.
1641ac_fn_c_try_compile ()
1642{
1643  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1644  rm -f conftest.$ac_objext
1645  if { { ac_try="$ac_compile"
1646case "(($ac_try" in
1647  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1648  *) ac_try_echo=$ac_try;;
1649esac
1650eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1651$as_echo "$ac_try_echo"; } >&5
1652  (eval "$ac_compile") 2>conftest.err
1653  ac_status=$?
1654  if test -s conftest.err; then
1655    grep -v '^ *+' conftest.err >conftest.er1
1656    cat conftest.er1 >&5
1657    mv -f conftest.er1 conftest.err
1658  fi
1659  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1660  test $ac_status = 0; } && {
1661	 test -z "$ac_c_werror_flag" ||
1662	 test ! -s conftest.err
1663       } && test -s conftest.$ac_objext; then :
1664  ac_retval=0
1665else
1666  $as_echo "$as_me: failed program was:" >&5
1667sed 's/^/| /' conftest.$ac_ext >&5
1668
1669	ac_retval=1
1670fi
1671  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1672  as_fn_set_status $ac_retval
1673
1674} # ac_fn_c_try_compile
1675
1676# ac_fn_c_try_link LINENO
1677# -----------------------
1678# Try to link conftest.$ac_ext, and return whether this succeeded.
1679ac_fn_c_try_link ()
1680{
1681  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1682  rm -f conftest.$ac_objext conftest$ac_exeext
1683  if { { ac_try="$ac_link"
1684case "(($ac_try" in
1685  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1686  *) ac_try_echo=$ac_try;;
1687esac
1688eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1689$as_echo "$ac_try_echo"; } >&5
1690  (eval "$ac_link") 2>conftest.err
1691  ac_status=$?
1692  if test -s conftest.err; then
1693    grep -v '^ *+' conftest.err >conftest.er1
1694    cat conftest.er1 >&5
1695    mv -f conftest.er1 conftest.err
1696  fi
1697  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1698  test $ac_status = 0; } && {
1699	 test -z "$ac_c_werror_flag" ||
1700	 test ! -s conftest.err
1701       } && test -s conftest$ac_exeext && {
1702	 test "$cross_compiling" = yes ||
1703	 test -x conftest$ac_exeext
1704       }; then :
1705  ac_retval=0
1706else
1707  $as_echo "$as_me: failed program was:" >&5
1708sed 's/^/| /' conftest.$ac_ext >&5
1709
1710	ac_retval=1
1711fi
1712  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1713  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1714  # interfere with the next link command; also delete a directory that is
1715  # left behind by Apple's compiler.  We do this before executing the actions.
1716  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1717  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1718  as_fn_set_status $ac_retval
1719
1720} # ac_fn_c_try_link
1721
1722# ac_fn_c_try_cpp LINENO
1723# ----------------------
1724# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1725ac_fn_c_try_cpp ()
1726{
1727  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1728  if { { ac_try="$ac_cpp conftest.$ac_ext"
1729case "(($ac_try" in
1730  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1731  *) ac_try_echo=$ac_try;;
1732esac
1733eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1734$as_echo "$ac_try_echo"; } >&5
1735  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1736  ac_status=$?
1737  if test -s conftest.err; then
1738    grep -v '^ *+' conftest.err >conftest.er1
1739    cat conftest.er1 >&5
1740    mv -f conftest.er1 conftest.err
1741  fi
1742  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1743  test $ac_status = 0; } > conftest.i && {
1744	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1745	 test ! -s conftest.err
1746       }; then :
1747  ac_retval=0
1748else
1749  $as_echo "$as_me: failed program was:" >&5
1750sed 's/^/| /' conftest.$ac_ext >&5
1751
1752    ac_retval=1
1753fi
1754  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1755  as_fn_set_status $ac_retval
1756
1757} # ac_fn_c_try_cpp
1758
1759# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1760# -------------------------------------------------------
1761# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1762# the include files in INCLUDES and setting the cache variable VAR
1763# accordingly.
1764ac_fn_c_check_header_mongrel ()
1765{
1766  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1767  if eval \${$3+:} false; then :
1768  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1769$as_echo_n "checking for $2... " >&6; }
1770if eval \${$3+:} false; then :
1771  $as_echo_n "(cached) " >&6
1772fi
1773eval ac_res=\$$3
1774	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1775$as_echo "$ac_res" >&6; }
1776else
1777  # Is the header compilable?
1778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1779$as_echo_n "checking $2 usability... " >&6; }
1780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1781/* end confdefs.h.  */
1782$4
1783#include <$2>
1784_ACEOF
1785if ac_fn_c_try_compile "$LINENO"; then :
1786  ac_header_compiler=yes
1787else
1788  ac_header_compiler=no
1789fi
1790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1792$as_echo "$ac_header_compiler" >&6; }
1793
1794# Is the header present?
1795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1796$as_echo_n "checking $2 presence... " >&6; }
1797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1798/* end confdefs.h.  */
1799#include <$2>
1800_ACEOF
1801if ac_fn_c_try_cpp "$LINENO"; then :
1802  ac_header_preproc=yes
1803else
1804  ac_header_preproc=no
1805fi
1806rm -f conftest.err conftest.i conftest.$ac_ext
1807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1808$as_echo "$ac_header_preproc" >&6; }
1809
1810# So?  What about this header?
1811case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1812  yes:no: )
1813    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1814$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1815    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1816$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1817    ;;
1818  no:yes:* )
1819    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1820$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1821    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1822$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1823    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1824$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1825    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1826$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1827    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1828$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1829( $as_echo "## ---------------------------------------- ##
1830## Report this to pgsql-bugs@postgresql.org ##
1831## ---------------------------------------- ##"
1832     ) | sed "s/^/$as_me: WARNING:     /" >&2
1833    ;;
1834esac
1835  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1836$as_echo_n "checking for $2... " >&6; }
1837if eval \${$3+:} false; then :
1838  $as_echo_n "(cached) " >&6
1839else
1840  eval "$3=\$ac_header_compiler"
1841fi
1842eval ac_res=\$$3
1843	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1844$as_echo "$ac_res" >&6; }
1845fi
1846  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1847
1848} # ac_fn_c_check_header_mongrel
1849
1850# ac_fn_c_try_run LINENO
1851# ----------------------
1852# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1853# that executables *can* be run.
1854ac_fn_c_try_run ()
1855{
1856  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1857  if { { ac_try="$ac_link"
1858case "(($ac_try" in
1859  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1860  *) ac_try_echo=$ac_try;;
1861esac
1862eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1863$as_echo "$ac_try_echo"; } >&5
1864  (eval "$ac_link") 2>&5
1865  ac_status=$?
1866  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1867  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1868  { { case "(($ac_try" in
1869  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1870  *) ac_try_echo=$ac_try;;
1871esac
1872eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1873$as_echo "$ac_try_echo"; } >&5
1874  (eval "$ac_try") 2>&5
1875  ac_status=$?
1876  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1877  test $ac_status = 0; }; }; then :
1878  ac_retval=0
1879else
1880  $as_echo "$as_me: program exited with status $ac_status" >&5
1881       $as_echo "$as_me: failed program was:" >&5
1882sed 's/^/| /' conftest.$ac_ext >&5
1883
1884       ac_retval=$ac_status
1885fi
1886  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1887  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1888  as_fn_set_status $ac_retval
1889
1890} # ac_fn_c_try_run
1891
1892# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1893# -------------------------------------------------------
1894# Tests whether HEADER exists and can be compiled using the include files in
1895# INCLUDES, setting the cache variable VAR accordingly.
1896ac_fn_c_check_header_compile ()
1897{
1898  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1899  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1900$as_echo_n "checking for $2... " >&6; }
1901if eval \${$3+:} false; then :
1902  $as_echo_n "(cached) " >&6
1903else
1904  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1905/* end confdefs.h.  */
1906$4
1907#include <$2>
1908_ACEOF
1909if ac_fn_c_try_compile "$LINENO"; then :
1910  eval "$3=yes"
1911else
1912  eval "$3=no"
1913fi
1914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1915fi
1916eval ac_res=\$$3
1917	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1918$as_echo "$ac_res" >&6; }
1919  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1920
1921} # ac_fn_c_check_header_compile
1922
1923# ac_fn_c_check_func LINENO FUNC VAR
1924# ----------------------------------
1925# Tests whether FUNC exists, setting the cache variable VAR accordingly
1926ac_fn_c_check_func ()
1927{
1928  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1929  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1930$as_echo_n "checking for $2... " >&6; }
1931if eval \${$3+:} false; then :
1932  $as_echo_n "(cached) " >&6
1933else
1934  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1935/* end confdefs.h.  */
1936/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1937   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1938#define $2 innocuous_$2
1939
1940/* System header to define __stub macros and hopefully few prototypes,
1941    which can conflict with char $2 (); below.
1942    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1943    <limits.h> exists even on freestanding compilers.  */
1944
1945#ifdef __STDC__
1946# include <limits.h>
1947#else
1948# include <assert.h>
1949#endif
1950
1951#undef $2
1952
1953/* Override any GCC internal prototype to avoid an error.
1954   Use char because int might match the return type of a GCC
1955   builtin and then its argument prototype would still apply.  */
1956#ifdef __cplusplus
1957extern "C"
1958#endif
1959char $2 ();
1960/* The GNU C library defines this for functions which it implements
1961    to always fail with ENOSYS.  Some functions are actually named
1962    something starting with __ and the normal name is an alias.  */
1963#if defined __stub_$2 || defined __stub___$2
1964choke me
1965#endif
1966
1967int
1968main ()
1969{
1970return $2 ();
1971  ;
1972  return 0;
1973}
1974_ACEOF
1975if ac_fn_c_try_link "$LINENO"; then :
1976  eval "$3=yes"
1977else
1978  eval "$3=no"
1979fi
1980rm -f core conftest.err conftest.$ac_objext \
1981    conftest$ac_exeext conftest.$ac_ext
1982fi
1983eval ac_res=\$$3
1984	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1985$as_echo "$ac_res" >&6; }
1986  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1987
1988} # ac_fn_c_check_func
1989
1990# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
1991# ----------------------------------------------------
1992# Tries to find if the field MEMBER exists in type AGGR, after including
1993# INCLUDES, setting cache variable VAR accordingly.
1994ac_fn_c_check_member ()
1995{
1996  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1997  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
1998$as_echo_n "checking for $2.$3... " >&6; }
1999if eval \${$4+:} false; then :
2000  $as_echo_n "(cached) " >&6
2001else
2002  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2003/* end confdefs.h.  */
2004$5
2005int
2006main ()
2007{
2008static $2 ac_aggr;
2009if (ac_aggr.$3)
2010return 0;
2011  ;
2012  return 0;
2013}
2014_ACEOF
2015if ac_fn_c_try_compile "$LINENO"; then :
2016  eval "$4=yes"
2017else
2018  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2019/* end confdefs.h.  */
2020$5
2021int
2022main ()
2023{
2024static $2 ac_aggr;
2025if (sizeof ac_aggr.$3)
2026return 0;
2027  ;
2028  return 0;
2029}
2030_ACEOF
2031if ac_fn_c_try_compile "$LINENO"; then :
2032  eval "$4=yes"
2033else
2034  eval "$4=no"
2035fi
2036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2037fi
2038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2039fi
2040eval ac_res=\$$4
2041	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2042$as_echo "$ac_res" >&6; }
2043  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2044
2045} # ac_fn_c_check_member
2046
2047# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2048# -------------------------------------------
2049# Tests whether TYPE exists after having included INCLUDES, setting cache
2050# variable VAR accordingly.
2051ac_fn_c_check_type ()
2052{
2053  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2054  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2055$as_echo_n "checking for $2... " >&6; }
2056if eval \${$3+:} false; then :
2057  $as_echo_n "(cached) " >&6
2058else
2059  eval "$3=no"
2060  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2061/* end confdefs.h.  */
2062$4
2063int
2064main ()
2065{
2066if (sizeof ($2))
2067	 return 0;
2068  ;
2069  return 0;
2070}
2071_ACEOF
2072if ac_fn_c_try_compile "$LINENO"; then :
2073  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2074/* end confdefs.h.  */
2075$4
2076int
2077main ()
2078{
2079if (sizeof (($2)))
2080	    return 0;
2081  ;
2082  return 0;
2083}
2084_ACEOF
2085if ac_fn_c_try_compile "$LINENO"; then :
2086
2087else
2088  eval "$3=yes"
2089fi
2090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2091fi
2092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2093fi
2094eval ac_res=\$$3
2095	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2096$as_echo "$ac_res" >&6; }
2097  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2098
2099} # ac_fn_c_check_type
2100
2101# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2102# --------------------------------------------
2103# Tries to find the compile-time value of EXPR in a program that includes
2104# INCLUDES, setting VAR accordingly. Returns whether the value could be
2105# computed
2106ac_fn_c_compute_int ()
2107{
2108  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2109  if test "$cross_compiling" = yes; then
2110    # Depending upon the size, compute the lo and hi bounds.
2111cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2112/* end confdefs.h.  */
2113$4
2114int
2115main ()
2116{
2117static int test_array [1 - 2 * !(($2) >= 0)];
2118test_array [0] = 0;
2119return test_array [0];
2120
2121  ;
2122  return 0;
2123}
2124_ACEOF
2125if ac_fn_c_try_compile "$LINENO"; then :
2126  ac_lo=0 ac_mid=0
2127  while :; do
2128    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2129/* end confdefs.h.  */
2130$4
2131int
2132main ()
2133{
2134static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2135test_array [0] = 0;
2136return test_array [0];
2137
2138  ;
2139  return 0;
2140}
2141_ACEOF
2142if ac_fn_c_try_compile "$LINENO"; then :
2143  ac_hi=$ac_mid; break
2144else
2145  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2146			if test $ac_lo -le $ac_mid; then
2147			  ac_lo= ac_hi=
2148			  break
2149			fi
2150			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2151fi
2152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2153  done
2154else
2155  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2156/* end confdefs.h.  */
2157$4
2158int
2159main ()
2160{
2161static int test_array [1 - 2 * !(($2) < 0)];
2162test_array [0] = 0;
2163return test_array [0];
2164
2165  ;
2166  return 0;
2167}
2168_ACEOF
2169if ac_fn_c_try_compile "$LINENO"; then :
2170  ac_hi=-1 ac_mid=-1
2171  while :; do
2172    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2173/* end confdefs.h.  */
2174$4
2175int
2176main ()
2177{
2178static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2179test_array [0] = 0;
2180return test_array [0];
2181
2182  ;
2183  return 0;
2184}
2185_ACEOF
2186if ac_fn_c_try_compile "$LINENO"; then :
2187  ac_lo=$ac_mid; break
2188else
2189  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2190			if test $ac_mid -le $ac_hi; then
2191			  ac_lo= ac_hi=
2192			  break
2193			fi
2194			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2195fi
2196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2197  done
2198else
2199  ac_lo= ac_hi=
2200fi
2201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2202fi
2203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2204# Binary search between lo and hi bounds.
2205while test "x$ac_lo" != "x$ac_hi"; do
2206  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2207  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2208/* end confdefs.h.  */
2209$4
2210int
2211main ()
2212{
2213static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2214test_array [0] = 0;
2215return test_array [0];
2216
2217  ;
2218  return 0;
2219}
2220_ACEOF
2221if ac_fn_c_try_compile "$LINENO"; then :
2222  ac_hi=$ac_mid
2223else
2224  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2225fi
2226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2227done
2228case $ac_lo in #((
2229?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2230'') ac_retval=1 ;;
2231esac
2232  else
2233    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2234/* end confdefs.h.  */
2235$4
2236static long int longval () { return $2; }
2237static unsigned long int ulongval () { return $2; }
2238#include <stdio.h>
2239#include <stdlib.h>
2240int
2241main ()
2242{
2243
2244  FILE *f = fopen ("conftest.val", "w");
2245  if (! f)
2246    return 1;
2247  if (($2) < 0)
2248    {
2249      long int i = longval ();
2250      if (i != ($2))
2251	return 1;
2252      fprintf (f, "%ld", i);
2253    }
2254  else
2255    {
2256      unsigned long int i = ulongval ();
2257      if (i != ($2))
2258	return 1;
2259      fprintf (f, "%lu", i);
2260    }
2261  /* Do not output a trailing newline, as this causes \r\n confusion
2262     on some platforms.  */
2263  return ferror (f) || fclose (f) != 0;
2264
2265  ;
2266  return 0;
2267}
2268_ACEOF
2269if ac_fn_c_try_run "$LINENO"; then :
2270  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2271else
2272  ac_retval=1
2273fi
2274rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2275  conftest.$ac_objext conftest.beam conftest.$ac_ext
2276rm -f conftest.val
2277
2278  fi
2279  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2280  as_fn_set_status $ac_retval
2281
2282} # ac_fn_c_compute_int
2283
2284# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2285# ---------------------------------------------
2286# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2287# accordingly.
2288ac_fn_c_check_decl ()
2289{
2290  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2291  # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2292      as_decl_name=`echo $2|sed 's/ *(.*//'`
2293  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2294  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2295$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2296if eval \${$3+:} false; then :
2297  $as_echo_n "(cached) " >&6
2298else
2299  ac_save_werror_flag=$ac_c_werror_flag
2300  ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2301  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2302/* end confdefs.h.  */
2303$4
2304int
2305main ()
2306{
2307#ifndef $as_decl_name
2308#ifdef __cplusplus
2309  (void) $as_decl_use;
2310#else
2311  (void) $as_decl_name;
2312#endif
2313#endif
2314
2315  ;
2316  return 0;
2317}
2318_ACEOF
2319if ac_fn_c_try_compile "$LINENO"; then :
2320  eval "$3=yes"
2321else
2322  eval "$3=no"
2323fi
2324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2325  ac_c_werror_flag=$ac_save_werror_flag
2326fi
2327eval ac_res=\$$3
2328	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2329$as_echo "$ac_res" >&6; }
2330  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2331
2332} # ac_fn_c_check_decl
2333cat >config.log <<_ACEOF
2334This file contains any messages produced by compilers while
2335running configure, to aid debugging if configure makes a mistake.
2336
2337It was created by PostgreSQL $as_me 9.6.24, which was
2338generated by GNU Autoconf 2.69.  Invocation command line was
2339
2340  $ $0 $@
2341
2342_ACEOF
2343exec 5>>config.log
2344{
2345cat <<_ASUNAME
2346## --------- ##
2347## Platform. ##
2348## --------- ##
2349
2350hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2351uname -m = `(uname -m) 2>/dev/null || echo unknown`
2352uname -r = `(uname -r) 2>/dev/null || echo unknown`
2353uname -s = `(uname -s) 2>/dev/null || echo unknown`
2354uname -v = `(uname -v) 2>/dev/null || echo unknown`
2355
2356/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2357/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2358
2359/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2360/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2361/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2362/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2363/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2364/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2365/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2366
2367_ASUNAME
2368
2369as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2370for as_dir in $PATH
2371do
2372  IFS=$as_save_IFS
2373  test -z "$as_dir" && as_dir=.
2374    $as_echo "PATH: $as_dir"
2375  done
2376IFS=$as_save_IFS
2377
2378} >&5
2379
2380cat >&5 <<_ACEOF
2381
2382
2383## ----------- ##
2384## Core tests. ##
2385## ----------- ##
2386
2387_ACEOF
2388
2389
2390# Keep a trace of the command line.
2391# Strip out --no-create and --no-recursion so they do not pile up.
2392# Strip out --silent because we don't want to record it for future runs.
2393# Also quote any args containing shell meta-characters.
2394# Make two passes to allow for proper duplicate-argument suppression.
2395ac_configure_args=
2396ac_configure_args0=
2397ac_configure_args1=
2398ac_must_keep_next=false
2399for ac_pass in 1 2
2400do
2401  for ac_arg
2402  do
2403    case $ac_arg in
2404    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2405    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2406    | -silent | --silent | --silen | --sile | --sil)
2407      continue ;;
2408    *\'*)
2409      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2410    esac
2411    case $ac_pass in
2412    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2413    2)
2414      as_fn_append ac_configure_args1 " '$ac_arg'"
2415      if test $ac_must_keep_next = true; then
2416	ac_must_keep_next=false # Got value, back to normal.
2417      else
2418	case $ac_arg in
2419	  *=* | --config-cache | -C | -disable-* | --disable-* \
2420	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2421	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2422	  | -with-* | --with-* | -without-* | --without-* | --x)
2423	    case "$ac_configure_args0 " in
2424	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2425	    esac
2426	    ;;
2427	  -* ) ac_must_keep_next=true ;;
2428	esac
2429      fi
2430      as_fn_append ac_configure_args " '$ac_arg'"
2431      ;;
2432    esac
2433  done
2434done
2435{ ac_configure_args0=; unset ac_configure_args0;}
2436{ ac_configure_args1=; unset ac_configure_args1;}
2437
2438# When interrupted or exit'd, cleanup temporary files, and complete
2439# config.log.  We remove comments because anyway the quotes in there
2440# would cause problems or look ugly.
2441# WARNING: Use '\'' to represent an apostrophe within the trap.
2442# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2443trap 'exit_status=$?
2444  # Save into config.log some information that might help in debugging.
2445  {
2446    echo
2447
2448    $as_echo "## ---------------- ##
2449## Cache variables. ##
2450## ---------------- ##"
2451    echo
2452    # The following way of writing the cache mishandles newlines in values,
2453(
2454  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2455    eval ac_val=\$$ac_var
2456    case $ac_val in #(
2457    *${as_nl}*)
2458      case $ac_var in #(
2459      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2460$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2461      esac
2462      case $ac_var in #(
2463      _ | IFS | as_nl) ;; #(
2464      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2465      *) { eval $ac_var=; unset $ac_var;} ;;
2466      esac ;;
2467    esac
2468  done
2469  (set) 2>&1 |
2470    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2471    *${as_nl}ac_space=\ *)
2472      sed -n \
2473	"s/'\''/'\''\\\\'\'''\''/g;
2474	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2475      ;; #(
2476    *)
2477      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2478      ;;
2479    esac |
2480    sort
2481)
2482    echo
2483
2484    $as_echo "## ----------------- ##
2485## Output variables. ##
2486## ----------------- ##"
2487    echo
2488    for ac_var in $ac_subst_vars
2489    do
2490      eval ac_val=\$$ac_var
2491      case $ac_val in
2492      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2493      esac
2494      $as_echo "$ac_var='\''$ac_val'\''"
2495    done | sort
2496    echo
2497
2498    if test -n "$ac_subst_files"; then
2499      $as_echo "## ------------------- ##
2500## File substitutions. ##
2501## ------------------- ##"
2502      echo
2503      for ac_var in $ac_subst_files
2504      do
2505	eval ac_val=\$$ac_var
2506	case $ac_val in
2507	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2508	esac
2509	$as_echo "$ac_var='\''$ac_val'\''"
2510      done | sort
2511      echo
2512    fi
2513
2514    if test -s confdefs.h; then
2515      $as_echo "## ----------- ##
2516## confdefs.h. ##
2517## ----------- ##"
2518      echo
2519      cat confdefs.h
2520      echo
2521    fi
2522    test "$ac_signal" != 0 &&
2523      $as_echo "$as_me: caught signal $ac_signal"
2524    $as_echo "$as_me: exit $exit_status"
2525  } >&5
2526  rm -f core *.core core.conftest.* &&
2527    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2528    exit $exit_status
2529' 0
2530for ac_signal in 1 2 13 15; do
2531  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2532done
2533ac_signal=0
2534
2535# confdefs.h avoids OS command line length limits that DEFS can exceed.
2536rm -f -r conftest* confdefs.h
2537
2538$as_echo "/* confdefs.h */" > confdefs.h
2539
2540# Predefined preprocessor variables.
2541
2542cat >>confdefs.h <<_ACEOF
2543#define PACKAGE_NAME "$PACKAGE_NAME"
2544_ACEOF
2545
2546cat >>confdefs.h <<_ACEOF
2547#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2548_ACEOF
2549
2550cat >>confdefs.h <<_ACEOF
2551#define PACKAGE_VERSION "$PACKAGE_VERSION"
2552_ACEOF
2553
2554cat >>confdefs.h <<_ACEOF
2555#define PACKAGE_STRING "$PACKAGE_STRING"
2556_ACEOF
2557
2558cat >>confdefs.h <<_ACEOF
2559#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2560_ACEOF
2561
2562cat >>confdefs.h <<_ACEOF
2563#define PACKAGE_URL "$PACKAGE_URL"
2564_ACEOF
2565
2566
2567# Let the site file select an alternate cache file if it wants to.
2568# Prefer an explicitly selected file to automatically selected ones.
2569ac_site_file1=NONE
2570ac_site_file2=NONE
2571if test -n "$CONFIG_SITE"; then
2572  # We do not want a PATH search for config.site.
2573  case $CONFIG_SITE in #((
2574    -*)  ac_site_file1=./$CONFIG_SITE;;
2575    */*) ac_site_file1=$CONFIG_SITE;;
2576    *)   ac_site_file1=./$CONFIG_SITE;;
2577  esac
2578elif test "x$prefix" != xNONE; then
2579  ac_site_file1=$prefix/share/config.site
2580  ac_site_file2=$prefix/etc/config.site
2581else
2582  ac_site_file1=$ac_default_prefix/share/config.site
2583  ac_site_file2=$ac_default_prefix/etc/config.site
2584fi
2585for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2586do
2587  test "x$ac_site_file" = xNONE && continue
2588  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2589    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2590$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2591    sed 's/^/| /' "$ac_site_file" >&5
2592    . "$ac_site_file" \
2593      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2594$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2595as_fn_error $? "failed to load site script $ac_site_file
2596See \`config.log' for more details" "$LINENO" 5; }
2597  fi
2598done
2599
2600if test -r "$cache_file"; then
2601  # Some versions of bash will fail to source /dev/null (special files
2602  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2603  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2604    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2605$as_echo "$as_me: loading cache $cache_file" >&6;}
2606    case $cache_file in
2607      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2608      *)                      . "./$cache_file";;
2609    esac
2610  fi
2611else
2612  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2613$as_echo "$as_me: creating cache $cache_file" >&6;}
2614  >$cache_file
2615fi
2616
2617# Check that the precious variables saved in the cache have kept the same
2618# value.
2619ac_cache_corrupted=false
2620for ac_var in $ac_precious_vars; do
2621  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2622  eval ac_new_set=\$ac_env_${ac_var}_set
2623  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2624  eval ac_new_val=\$ac_env_${ac_var}_value
2625  case $ac_old_set,$ac_new_set in
2626    set,)
2627      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2628$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2629      ac_cache_corrupted=: ;;
2630    ,set)
2631      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2632$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2633      ac_cache_corrupted=: ;;
2634    ,);;
2635    *)
2636      if test "x$ac_old_val" != "x$ac_new_val"; then
2637	# differences in whitespace do not lead to failure.
2638	ac_old_val_w=`echo x $ac_old_val`
2639	ac_new_val_w=`echo x $ac_new_val`
2640	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2641	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2642$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2643	  ac_cache_corrupted=:
2644	else
2645	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2646$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2647	  eval $ac_var=\$ac_old_val
2648	fi
2649	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2650$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2651	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2652$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2653      fi;;
2654  esac
2655  # Pass precious variables to config.status.
2656  if test "$ac_new_set" = set; then
2657    case $ac_new_val in
2658    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2659    *) ac_arg=$ac_var=$ac_new_val ;;
2660    esac
2661    case " $ac_configure_args " in
2662      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2663      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2664    esac
2665  fi
2666done
2667if $ac_cache_corrupted; then
2668  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2669$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2670  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2671$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2672  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2673fi
2674## -------------------- ##
2675## Main body of script. ##
2676## -------------------- ##
2677
2678ac_ext=c
2679ac_cpp='$CPP $CPPFLAGS'
2680ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2681ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2682ac_compiler_gnu=$ac_cv_c_compiler_gnu
2683
2684
2685
2686
2687
2688
2689ac_aux_dir=
2690for ac_dir in config "$srcdir"/config; do
2691  if test -f "$ac_dir/install-sh"; then
2692    ac_aux_dir=$ac_dir
2693    ac_install_sh="$ac_aux_dir/install-sh -c"
2694    break
2695  elif test -f "$ac_dir/install.sh"; then
2696    ac_aux_dir=$ac_dir
2697    ac_install_sh="$ac_aux_dir/install.sh -c"
2698    break
2699  elif test -f "$ac_dir/shtool"; then
2700    ac_aux_dir=$ac_dir
2701    ac_install_sh="$ac_aux_dir/shtool install -c"
2702    break
2703  fi
2704done
2705if test -z "$ac_aux_dir"; then
2706  as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2707fi
2708
2709# These three variables are undocumented and unsupported,
2710# and are intended to be withdrawn in a future Autoconf release.
2711# They can cause serious problems if a builder's source tree is in a directory
2712# whose full name contains unusual characters.
2713ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2714ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2715ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2716
2717
2718
2719configure_args=$ac_configure_args
2720
2721
2722PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\.[0-9][0-9]*\)'`
2723
2724
2725cat >>confdefs.h <<_ACEOF
2726#define PG_MAJORVERSION "$PG_MAJORVERSION"
2727_ACEOF
2728
2729
2730
2731
2732
2733# Check whether --with-extra-version was given.
2734if test "${with_extra_version+set}" = set; then :
2735  withval=$with_extra_version;
2736  case $withval in
2737    yes)
2738      as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2739      ;;
2740    no)
2741      as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2742      ;;
2743    *)
2744      PG_VERSION="$PACKAGE_VERSION$withval"
2745      ;;
2746  esac
2747
2748else
2749  PG_VERSION="$PACKAGE_VERSION"
2750fi
2751
2752
2753
2754cat >>confdefs.h <<_ACEOF
2755#define PG_VERSION "$PG_VERSION"
2756_ACEOF
2757
2758
2759# Make sure we can run config.sub.
2760$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2761  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2762
2763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2764$as_echo_n "checking build system type... " >&6; }
2765if ${ac_cv_build+:} false; then :
2766  $as_echo_n "(cached) " >&6
2767else
2768  ac_build_alias=$build_alias
2769test "x$ac_build_alias" = x &&
2770  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2771test "x$ac_build_alias" = x &&
2772  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2773ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2774  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2775
2776fi
2777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2778$as_echo "$ac_cv_build" >&6; }
2779case $ac_cv_build in
2780*-*-*) ;;
2781*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2782esac
2783build=$ac_cv_build
2784ac_save_IFS=$IFS; IFS='-'
2785set x $ac_cv_build
2786shift
2787build_cpu=$1
2788build_vendor=$2
2789shift; shift
2790# Remember, the first character of IFS is used to create $*,
2791# except with old shells:
2792build_os=$*
2793IFS=$ac_save_IFS
2794case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2795
2796
2797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2798$as_echo_n "checking host system type... " >&6; }
2799if ${ac_cv_host+:} false; then :
2800  $as_echo_n "(cached) " >&6
2801else
2802  if test "x$host_alias" = x; then
2803  ac_cv_host=$ac_cv_build
2804else
2805  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2806    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2807fi
2808
2809fi
2810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2811$as_echo "$ac_cv_host" >&6; }
2812case $ac_cv_host in
2813*-*-*) ;;
2814*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2815esac
2816host=$ac_cv_host
2817ac_save_IFS=$IFS; IFS='-'
2818set x $ac_cv_host
2819shift
2820host_cpu=$1
2821host_vendor=$2
2822shift; shift
2823# Remember, the first character of IFS is used to create $*,
2824# except with old shells:
2825host_os=$*
2826IFS=$ac_save_IFS
2827case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2828
2829
2830
2831template=
2832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2833$as_echo_n "checking which template to use... " >&6; }
2834
2835
2836
2837
2838# Check whether --with-template was given.
2839if test "${with_template+set}" = set; then :
2840  withval=$with_template;
2841  case $withval in
2842    yes)
2843      as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2844      ;;
2845    no)
2846      as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2847      ;;
2848    *)
2849
2850  case $withval in
2851    list)   echo; ls "$srcdir/src/template"; exit;;
2852    *)      if test -f "$srcdir/src/template/$with_template" ; then
2853              template=$withval
2854            else
2855              as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2856            fi;;
2857  esac
2858
2859      ;;
2860  esac
2861
2862else
2863
2864# --with-template not given
2865
2866case $host_os in
2867     aix*) template=aix ;;
2868  cygwin*) template=cygwin ;;
2869  darwin*) template=darwin ;;
2870dragonfly*) template=netbsd ;;
2871 freebsd*) template=freebsd ;;
2872    hpux*) template=hpux ;;
2873 linux*|gnu*|k*bsd*-gnu)
2874           template=linux ;;
2875   mingw*) template=win32 ;;
2876  netbsd*) template=netbsd ;;
2877 openbsd*) template=openbsd ;;
2878     sco*) template=sco ;;
2879 solaris*) template=solaris ;;
2880   sysv5*) template=unixware ;;
2881esac
2882
2883  if test x"$template" = x"" ; then
2884    as_fn_error $? "
2885*******************************************************************
2886PostgreSQL has apparently not been ported to your platform yet.
2887To try a manual configuration, look into the src/template directory
2888for a similar platform and use the '--with-template=' option.
2889
2890Please also contact <pgsql-bugs@postgresql.org> to see about
2891rectifying this.  Include the above 'checking host system type...'
2892line.
2893*******************************************************************
2894" "$LINENO" 5
2895  fi
2896
2897
2898fi
2899
2900
2901
2902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2903$as_echo "$template" >&6; }
2904
2905PORTNAME=$template
2906
2907
2908# Initialize default assumption that we do not need separate assembly code
2909# for TAS (test-and-set).  This can be overridden by the template file
2910# when it's executed.
2911need_tas=no
2912tas_file=dummy.s
2913
2914
2915
2916##
2917## Command line options
2918##
2919
2920#
2921# Add non-standard directories to the include path
2922#
2923
2924
2925
2926# Check whether --with-includes was given.
2927if test "${with_includes+set}" = set; then :
2928  withval=$with_includes;
2929  case $withval in
2930    yes)
2931      as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2932      ;;
2933    no)
2934      as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2935      ;;
2936    *)
2937
2938      ;;
2939  esac
2940
2941fi
2942
2943
2944
2945
2946#
2947# Add non-standard directories to the library search path
2948#
2949
2950
2951
2952# Check whether --with-libraries was given.
2953if test "${with_libraries+set}" = set; then :
2954  withval=$with_libraries;
2955  case $withval in
2956    yes)
2957      as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2958      ;;
2959    no)
2960      as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2961      ;;
2962    *)
2963      LIBRARY_DIRS=$withval
2964      ;;
2965  esac
2966
2967fi
2968
2969
2970
2971
2972
2973
2974# Check whether --with-libs was given.
2975if test "${with_libs+set}" = set; then :
2976  withval=$with_libs;
2977  case $withval in
2978    yes)
2979      as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2980      ;;
2981    no)
2982      as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2983      ;;
2984    *)
2985      LIBRARY_DIRS=$withval
2986      ;;
2987  esac
2988
2989fi
2990
2991
2992
2993
2994#
2995# 64-bit integer date/time storage: enabled by default.
2996#
2997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with 64-bit integer date/time support" >&5
2998$as_echo_n "checking whether to build with 64-bit integer date/time support... " >&6; }
2999
3000
3001# Check whether --enable-integer-datetimes was given.
3002if test "${enable_integer_datetimes+set}" = set; then :
3003  enableval=$enable_integer_datetimes;
3004  case $enableval in
3005    yes)
3006
3007$as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h
3008
3009      ;;
3010    no)
3011      :
3012      ;;
3013    *)
3014      as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3015      ;;
3016  esac
3017
3018else
3019  enable_integer_datetimes=yes
3020
3021$as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h
3022
3023fi
3024
3025
3026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_integer_datetimes" >&5
3027$as_echo "$enable_integer_datetimes" >&6; }
3028
3029
3030#
3031# NLS
3032#
3033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3034$as_echo_n "checking whether NLS is wanted... " >&6; }
3035
3036
3037# Check whether --enable-nls was given.
3038if test "${enable_nls+set}" = set; then :
3039  enableval=$enable_nls;
3040  case $enableval in
3041    yes)
3042      :
3043      ;;
3044    no)
3045      :
3046      ;;
3047    *)
3048      enable_nls=yes
3049WANTED_LANGUAGES=$enableval
3050      ;;
3051  esac
3052
3053else
3054  enable_nls=no
3055fi
3056
3057
3058
3059if test "$enable_nls" = yes; then
3060
3061$as_echo "#define ENABLE_NLS 1" >>confdefs.h
3062
3063fi
3064
3065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3066$as_echo "$enable_nls" >&6; }
3067
3068
3069
3070#
3071# Default port number (--with-pgport), default 5432
3072#
3073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3074$as_echo_n "checking for default port number... " >&6; }
3075
3076
3077
3078# Check whether --with-pgport was given.
3079if test "${with_pgport+set}" = set; then :
3080  withval=$with_pgport;
3081  case $withval in
3082    yes)
3083      as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3084      ;;
3085    no)
3086      as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3087      ;;
3088    *)
3089      default_port=$withval
3090      ;;
3091  esac
3092
3093else
3094  default_port=5432
3095fi
3096
3097
3098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3099$as_echo "$default_port" >&6; }
3100# Need both of these because some places want an integer and some a string
3101
3102cat >>confdefs.h <<_ACEOF
3103#define DEF_PGPORT ${default_port}
3104_ACEOF
3105
3106
3107cat >>confdefs.h <<_ACEOF
3108#define DEF_PGPORT_STR "${default_port}"
3109_ACEOF
3110
3111
3112
3113# It's worth validating port; you can get very confusing errors otherwise
3114if test x"$default_port" = x""; then
3115  as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3116elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3117  as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3118elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3119  as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3120elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3121  as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3122fi
3123
3124#
3125# '-rpath'-like feature can be disabled
3126#
3127
3128
3129# Check whether --enable-rpath was given.
3130if test "${enable_rpath+set}" = set; then :
3131  enableval=$enable_rpath;
3132  case $enableval in
3133    yes)
3134      :
3135      ;;
3136    no)
3137      :
3138      ;;
3139    *)
3140      as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3141      ;;
3142  esac
3143
3144else
3145  enable_rpath=yes
3146
3147fi
3148
3149
3150
3151
3152#
3153# Spinlocks
3154#
3155
3156
3157# Check whether --enable-spinlocks was given.
3158if test "${enable_spinlocks+set}" = set; then :
3159  enableval=$enable_spinlocks;
3160  case $enableval in
3161    yes)
3162      :
3163      ;;
3164    no)
3165      :
3166      ;;
3167    *)
3168      as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3169      ;;
3170  esac
3171
3172else
3173  enable_spinlocks=yes
3174
3175fi
3176
3177
3178
3179#
3180# Atomic operations
3181#
3182
3183
3184# Check whether --enable-atomics was given.
3185if test "${enable_atomics+set}" = set; then :
3186  enableval=$enable_atomics;
3187  case $enableval in
3188    yes)
3189      :
3190      ;;
3191    no)
3192      :
3193      ;;
3194    *)
3195      as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3196      ;;
3197  esac
3198
3199else
3200  enable_atomics=yes
3201
3202fi
3203
3204
3205
3206#
3207# --enable-debug adds -g to compiler flags
3208#
3209
3210
3211# Check whether --enable-debug was given.
3212if test "${enable_debug+set}" = set; then :
3213  enableval=$enable_debug;
3214  case $enableval in
3215    yes)
3216      :
3217      ;;
3218    no)
3219      :
3220      ;;
3221    *)
3222      as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3223      ;;
3224  esac
3225
3226else
3227  enable_debug=no
3228
3229fi
3230
3231
3232
3233
3234#
3235# --enable-profiling enables gcc profiling
3236#
3237
3238
3239# Check whether --enable-profiling was given.
3240if test "${enable_profiling+set}" = set; then :
3241  enableval=$enable_profiling;
3242  case $enableval in
3243    yes)
3244      :
3245      ;;
3246    no)
3247      :
3248      ;;
3249    *)
3250      as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3251      ;;
3252  esac
3253
3254else
3255  enable_profiling=no
3256
3257fi
3258
3259
3260
3261#
3262# --enable-coverage enables generation of code coverage metrics with gcov
3263#
3264
3265
3266# Check whether --enable-coverage was given.
3267if test "${enable_coverage+set}" = set; then :
3268  enableval=$enable_coverage;
3269  case $enableval in
3270    yes)
3271      for ac_prog in gcov
3272do
3273  # Extract the first word of "$ac_prog", so it can be a program name with args.
3274set dummy $ac_prog; ac_word=$2
3275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3276$as_echo_n "checking for $ac_word... " >&6; }
3277if ${ac_cv_prog_GCOV+:} false; then :
3278  $as_echo_n "(cached) " >&6
3279else
3280  if test -n "$GCOV"; then
3281  ac_cv_prog_GCOV="$GCOV" # Let the user override the test.
3282else
3283as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3284for as_dir in $PATH
3285do
3286  IFS=$as_save_IFS
3287  test -z "$as_dir" && as_dir=.
3288    for ac_exec_ext in '' $ac_executable_extensions; do
3289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3290    ac_cv_prog_GCOV="$ac_prog"
3291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3292    break 2
3293  fi
3294done
3295  done
3296IFS=$as_save_IFS
3297
3298fi
3299fi
3300GCOV=$ac_cv_prog_GCOV
3301if test -n "$GCOV"; then
3302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3303$as_echo "$GCOV" >&6; }
3304else
3305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3306$as_echo "no" >&6; }
3307fi
3308
3309
3310  test -n "$GCOV" && break
3311done
3312
3313if test -z "$GCOV"; then
3314  as_fn_error $? "gcov not found" "$LINENO" 5
3315fi
3316for ac_prog in lcov
3317do
3318  # Extract the first word of "$ac_prog", so it can be a program name with args.
3319set dummy $ac_prog; ac_word=$2
3320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3321$as_echo_n "checking for $ac_word... " >&6; }
3322if ${ac_cv_prog_LCOV+:} false; then :
3323  $as_echo_n "(cached) " >&6
3324else
3325  if test -n "$LCOV"; then
3326  ac_cv_prog_LCOV="$LCOV" # Let the user override the test.
3327else
3328as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3329for as_dir in $PATH
3330do
3331  IFS=$as_save_IFS
3332  test -z "$as_dir" && as_dir=.
3333    for ac_exec_ext in '' $ac_executable_extensions; do
3334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3335    ac_cv_prog_LCOV="$ac_prog"
3336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3337    break 2
3338  fi
3339done
3340  done
3341IFS=$as_save_IFS
3342
3343fi
3344fi
3345LCOV=$ac_cv_prog_LCOV
3346if test -n "$LCOV"; then
3347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3348$as_echo "$LCOV" >&6; }
3349else
3350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3351$as_echo "no" >&6; }
3352fi
3353
3354
3355  test -n "$LCOV" && break
3356done
3357
3358if test -z "$LCOV"; then
3359  as_fn_error $? "lcov not found" "$LINENO" 5
3360fi
3361for ac_prog in genhtml
3362do
3363  # Extract the first word of "$ac_prog", so it can be a program name with args.
3364set dummy $ac_prog; ac_word=$2
3365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3366$as_echo_n "checking for $ac_word... " >&6; }
3367if ${ac_cv_prog_GENHTML+:} false; then :
3368  $as_echo_n "(cached) " >&6
3369else
3370  if test -n "$GENHTML"; then
3371  ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test.
3372else
3373as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3374for as_dir in $PATH
3375do
3376  IFS=$as_save_IFS
3377  test -z "$as_dir" && as_dir=.
3378    for ac_exec_ext in '' $ac_executable_extensions; do
3379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3380    ac_cv_prog_GENHTML="$ac_prog"
3381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3382    break 2
3383  fi
3384done
3385  done
3386IFS=$as_save_IFS
3387
3388fi
3389fi
3390GENHTML=$ac_cv_prog_GENHTML
3391if test -n "$GENHTML"; then
3392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3393$as_echo "$GENHTML" >&6; }
3394else
3395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3396$as_echo "no" >&6; }
3397fi
3398
3399
3400  test -n "$GENHTML" && break
3401done
3402
3403if test -z "$GENHTML"; then
3404  as_fn_error $? "genhtml not found" "$LINENO" 5
3405fi
3406      ;;
3407    no)
3408      :
3409      ;;
3410    *)
3411      as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3412      ;;
3413  esac
3414
3415else
3416  enable_coverage=no
3417
3418fi
3419
3420
3421
3422
3423#
3424# DTrace
3425#
3426
3427
3428# Check whether --enable-dtrace was given.
3429if test "${enable_dtrace+set}" = set; then :
3430  enableval=$enable_dtrace;
3431  case $enableval in
3432    yes)
3433      for ac_prog in dtrace
3434do
3435  # Extract the first word of "$ac_prog", so it can be a program name with args.
3436set dummy $ac_prog; ac_word=$2
3437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3438$as_echo_n "checking for $ac_word... " >&6; }
3439if ${ac_cv_prog_DTRACE+:} false; then :
3440  $as_echo_n "(cached) " >&6
3441else
3442  if test -n "$DTRACE"; then
3443  ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
3444else
3445as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3446for as_dir in $PATH
3447do
3448  IFS=$as_save_IFS
3449  test -z "$as_dir" && as_dir=.
3450    for ac_exec_ext in '' $ac_executable_extensions; do
3451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3452    ac_cv_prog_DTRACE="$ac_prog"
3453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3454    break 2
3455  fi
3456done
3457  done
3458IFS=$as_save_IFS
3459
3460fi
3461fi
3462DTRACE=$ac_cv_prog_DTRACE
3463if test -n "$DTRACE"; then
3464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3465$as_echo "$DTRACE" >&6; }
3466else
3467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3468$as_echo "no" >&6; }
3469fi
3470
3471
3472  test -n "$DTRACE" && break
3473done
3474
3475if test -z "$DTRACE"; then
3476  as_fn_error $? "dtrace not found" "$LINENO" 5
3477fi
3478
3479      ;;
3480    no)
3481      :
3482      ;;
3483    *)
3484      as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3485      ;;
3486  esac
3487
3488else
3489  enable_dtrace=no
3490
3491fi
3492
3493
3494
3495
3496#
3497# TAP tests
3498#
3499
3500
3501# Check whether --enable-tap-tests was given.
3502if test "${enable_tap_tests+set}" = set; then :
3503  enableval=$enable_tap_tests;
3504  case $enableval in
3505    yes)
3506      :
3507      ;;
3508    no)
3509      :
3510      ;;
3511    *)
3512      as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3513      ;;
3514  esac
3515
3516else
3517  enable_tap_tests=no
3518
3519fi
3520
3521
3522
3523
3524#
3525# Block size
3526#
3527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3528$as_echo_n "checking for block size... " >&6; }
3529
3530
3531
3532# Check whether --with-blocksize was given.
3533if test "${with_blocksize+set}" = set; then :
3534  withval=$with_blocksize;
3535  case $withval in
3536    yes)
3537      as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3538      ;;
3539    no)
3540      as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3541      ;;
3542    *)
3543      blocksize=$withval
3544      ;;
3545  esac
3546
3547else
3548  blocksize=8
3549fi
3550
3551
3552case ${blocksize} in
3553  1) BLCKSZ=1024;;
3554  2) BLCKSZ=2048;;
3555  4) BLCKSZ=4096;;
3556  8) BLCKSZ=8192;;
3557 16) BLCKSZ=16384;;
3558 32) BLCKSZ=32768;;
3559  *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3560esac
3561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3562$as_echo "${blocksize}kB" >&6; }
3563
3564
3565cat >>confdefs.h <<_ACEOF
3566#define BLCKSZ ${BLCKSZ}
3567_ACEOF
3568
3569
3570#
3571# Relation segment size
3572#
3573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3574$as_echo_n "checking for segment size... " >&6; }
3575
3576
3577
3578# Check whether --with-segsize was given.
3579if test "${with_segsize+set}" = set; then :
3580  withval=$with_segsize;
3581  case $withval in
3582    yes)
3583      as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3584      ;;
3585    no)
3586      as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3587      ;;
3588    *)
3589      segsize=$withval
3590      ;;
3591  esac
3592
3593else
3594  segsize=1
3595fi
3596
3597
3598# this expression is set up to avoid unnecessary integer overflow
3599# blocksize is already guaranteed to be a factor of 1024
3600RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3601test $? -eq 0 || exit 1
3602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3603$as_echo "${segsize}GB" >&6; }
3604
3605
3606cat >>confdefs.h <<_ACEOF
3607#define RELSEG_SIZE ${RELSEG_SIZE}
3608_ACEOF
3609
3610
3611#
3612# WAL block size
3613#
3614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3615$as_echo_n "checking for WAL block size... " >&6; }
3616
3617
3618
3619# Check whether --with-wal-blocksize was given.
3620if test "${with_wal_blocksize+set}" = set; then :
3621  withval=$with_wal_blocksize;
3622  case $withval in
3623    yes)
3624      as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3625      ;;
3626    no)
3627      as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3628      ;;
3629    *)
3630      wal_blocksize=$withval
3631      ;;
3632  esac
3633
3634else
3635  wal_blocksize=8
3636fi
3637
3638
3639case ${wal_blocksize} in
3640  1) XLOG_BLCKSZ=1024;;
3641  2) XLOG_BLCKSZ=2048;;
3642  4) XLOG_BLCKSZ=4096;;
3643  8) XLOG_BLCKSZ=8192;;
3644 16) XLOG_BLCKSZ=16384;;
3645 32) XLOG_BLCKSZ=32768;;
3646 64) XLOG_BLCKSZ=65536;;
3647  *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3648esac
3649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3650$as_echo "${wal_blocksize}kB" >&6; }
3651
3652
3653cat >>confdefs.h <<_ACEOF
3654#define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3655_ACEOF
3656
3657
3658#
3659# WAL segment size
3660#
3661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL segment size" >&5
3662$as_echo_n "checking for WAL segment size... " >&6; }
3663
3664
3665
3666# Check whether --with-wal-segsize was given.
3667if test "${with_wal_segsize+set}" = set; then :
3668  withval=$with_wal_segsize;
3669  case $withval in
3670    yes)
3671      as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3672      ;;
3673    no)
3674      as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3675      ;;
3676    *)
3677      wal_segsize=$withval
3678      ;;
3679  esac
3680
3681else
3682  wal_segsize=16
3683fi
3684
3685
3686case ${wal_segsize} in
3687  1) ;;
3688  2) ;;
3689  4) ;;
3690  8) ;;
3691 16) ;;
3692 32) ;;
3693 64) ;;
3694  *) as_fn_error $? "Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3695esac
3696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_segsize}MB" >&5
3697$as_echo "${wal_segsize}MB" >&6; }
3698
3699
3700cat >>confdefs.h <<_ACEOF
3701#define XLOG_SEG_SIZE (${wal_segsize} * 1024 * 1024)
3702_ACEOF
3703
3704
3705#
3706# C compiler
3707#
3708
3709# For historical reasons you can also use --with-CC to specify the C compiler
3710# to use, although the standard way to do this is to set the CC environment
3711# variable.
3712
3713
3714
3715# Check whether --with-CC was given.
3716if test "${with_CC+set}" = set; then :
3717  withval=$with_CC;
3718  case $withval in
3719    yes)
3720      as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3721      ;;
3722    no)
3723      as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3724      ;;
3725    *)
3726      CC=$with_CC
3727      ;;
3728  esac
3729
3730fi
3731
3732
3733
3734case $template in
3735  aix) pgac_cc_list="gcc xlc";;
3736    *) pgac_cc_list="gcc cc";;
3737esac
3738
3739ac_ext=c
3740ac_cpp='$CPP $CPPFLAGS'
3741ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3742ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3743ac_compiler_gnu=$ac_cv_c_compiler_gnu
3744if test -n "$ac_tool_prefix"; then
3745  for ac_prog in $pgac_cc_list
3746  do
3747    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3748set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3750$as_echo_n "checking for $ac_word... " >&6; }
3751if ${ac_cv_prog_CC+:} false; then :
3752  $as_echo_n "(cached) " >&6
3753else
3754  if test -n "$CC"; then
3755  ac_cv_prog_CC="$CC" # Let the user override the test.
3756else
3757as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3758for as_dir in $PATH
3759do
3760  IFS=$as_save_IFS
3761  test -z "$as_dir" && as_dir=.
3762    for ac_exec_ext in '' $ac_executable_extensions; do
3763  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3764    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3765    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3766    break 2
3767  fi
3768done
3769  done
3770IFS=$as_save_IFS
3771
3772fi
3773fi
3774CC=$ac_cv_prog_CC
3775if test -n "$CC"; then
3776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3777$as_echo "$CC" >&6; }
3778else
3779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3780$as_echo "no" >&6; }
3781fi
3782
3783
3784    test -n "$CC" && break
3785  done
3786fi
3787if test -z "$CC"; then
3788  ac_ct_CC=$CC
3789  for ac_prog in $pgac_cc_list
3790do
3791  # Extract the first word of "$ac_prog", so it can be a program name with args.
3792set dummy $ac_prog; ac_word=$2
3793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3794$as_echo_n "checking for $ac_word... " >&6; }
3795if ${ac_cv_prog_ac_ct_CC+:} false; then :
3796  $as_echo_n "(cached) " >&6
3797else
3798  if test -n "$ac_ct_CC"; then
3799  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3800else
3801as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3802for as_dir in $PATH
3803do
3804  IFS=$as_save_IFS
3805  test -z "$as_dir" && as_dir=.
3806    for ac_exec_ext in '' $ac_executable_extensions; do
3807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3808    ac_cv_prog_ac_ct_CC="$ac_prog"
3809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3810    break 2
3811  fi
3812done
3813  done
3814IFS=$as_save_IFS
3815
3816fi
3817fi
3818ac_ct_CC=$ac_cv_prog_ac_ct_CC
3819if test -n "$ac_ct_CC"; then
3820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3821$as_echo "$ac_ct_CC" >&6; }
3822else
3823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3824$as_echo "no" >&6; }
3825fi
3826
3827
3828  test -n "$ac_ct_CC" && break
3829done
3830
3831  if test "x$ac_ct_CC" = x; then
3832    CC=""
3833  else
3834    case $cross_compiling:$ac_tool_warned in
3835yes:)
3836{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3837$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3838ac_tool_warned=yes ;;
3839esac
3840    CC=$ac_ct_CC
3841  fi
3842fi
3843
3844
3845test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3846$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3847as_fn_error $? "no acceptable C compiler found in \$PATH
3848See \`config.log' for more details" "$LINENO" 5; }
3849
3850# Provide some information about the compiler.
3851$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3852set X $ac_compile
3853ac_compiler=$2
3854for ac_option in --version -v -V -qversion; do
3855  { { ac_try="$ac_compiler $ac_option >&5"
3856case "(($ac_try" in
3857  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3858  *) ac_try_echo=$ac_try;;
3859esac
3860eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3861$as_echo "$ac_try_echo"; } >&5
3862  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3863  ac_status=$?
3864  if test -s conftest.err; then
3865    sed '10a\
3866... rest of stderr output deleted ...
3867         10q' conftest.err >conftest.er1
3868    cat conftest.er1 >&5
3869  fi
3870  rm -f conftest.er1 conftest.err
3871  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3872  test $ac_status = 0; }
3873done
3874
3875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3876/* end confdefs.h.  */
3877
3878int
3879main ()
3880{
3881
3882  ;
3883  return 0;
3884}
3885_ACEOF
3886ac_clean_files_save=$ac_clean_files
3887ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3888# Try to create an executable without -o first, disregard a.out.
3889# It will help us diagnose broken compilers, and finding out an intuition
3890# of exeext.
3891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3892$as_echo_n "checking whether the C compiler works... " >&6; }
3893ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3894
3895# The possible output files:
3896ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3897
3898ac_rmfiles=
3899for ac_file in $ac_files
3900do
3901  case $ac_file in
3902    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3903    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3904  esac
3905done
3906rm -f $ac_rmfiles
3907
3908if { { ac_try="$ac_link_default"
3909case "(($ac_try" in
3910  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3911  *) ac_try_echo=$ac_try;;
3912esac
3913eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3914$as_echo "$ac_try_echo"; } >&5
3915  (eval "$ac_link_default") 2>&5
3916  ac_status=$?
3917  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3918  test $ac_status = 0; }; then :
3919  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3920# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3921# in a Makefile.  We should not override ac_cv_exeext if it was cached,
3922# so that the user can short-circuit this test for compilers unknown to
3923# Autoconf.
3924for ac_file in $ac_files ''
3925do
3926  test -f "$ac_file" || continue
3927  case $ac_file in
3928    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3929	;;
3930    [ab].out )
3931	# We found the default executable, but exeext='' is most
3932	# certainly right.
3933	break;;
3934    *.* )
3935	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3936	then :; else
3937	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3938	fi
3939	# We set ac_cv_exeext here because the later test for it is not
3940	# safe: cross compilers may not add the suffix if given an `-o'
3941	# argument, so we may need to know it at that point already.
3942	# Even if this section looks crufty: it has the advantage of
3943	# actually working.
3944	break;;
3945    * )
3946	break;;
3947  esac
3948done
3949test "$ac_cv_exeext" = no && ac_cv_exeext=
3950
3951else
3952  ac_file=''
3953fi
3954if test -z "$ac_file"; then :
3955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3956$as_echo "no" >&6; }
3957$as_echo "$as_me: failed program was:" >&5
3958sed 's/^/| /' conftest.$ac_ext >&5
3959
3960{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3961$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3962as_fn_error 77 "C compiler cannot create executables
3963See \`config.log' for more details" "$LINENO" 5; }
3964else
3965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3966$as_echo "yes" >&6; }
3967fi
3968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3969$as_echo_n "checking for C compiler default output file name... " >&6; }
3970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3971$as_echo "$ac_file" >&6; }
3972ac_exeext=$ac_cv_exeext
3973
3974rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3975ac_clean_files=$ac_clean_files_save
3976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3977$as_echo_n "checking for suffix of executables... " >&6; }
3978if { { ac_try="$ac_link"
3979case "(($ac_try" in
3980  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3981  *) ac_try_echo=$ac_try;;
3982esac
3983eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3984$as_echo "$ac_try_echo"; } >&5
3985  (eval "$ac_link") 2>&5
3986  ac_status=$?
3987  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3988  test $ac_status = 0; }; then :
3989  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3990# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3991# work properly (i.e., refer to `conftest.exe'), while it won't with
3992# `rm'.
3993for ac_file in conftest.exe conftest conftest.*; do
3994  test -f "$ac_file" || continue
3995  case $ac_file in
3996    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3997    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3998	  break;;
3999    * ) break;;
4000  esac
4001done
4002else
4003  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4004$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4005as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4006See \`config.log' for more details" "$LINENO" 5; }
4007fi
4008rm -f conftest conftest$ac_cv_exeext
4009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4010$as_echo "$ac_cv_exeext" >&6; }
4011
4012rm -f conftest.$ac_ext
4013EXEEXT=$ac_cv_exeext
4014ac_exeext=$EXEEXT
4015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4016/* end confdefs.h.  */
4017#include <stdio.h>
4018int
4019main ()
4020{
4021FILE *f = fopen ("conftest.out", "w");
4022 return ferror (f) || fclose (f) != 0;
4023
4024  ;
4025  return 0;
4026}
4027_ACEOF
4028ac_clean_files="$ac_clean_files conftest.out"
4029# Check that the compiler produces executables we can run.  If not, either
4030# the compiler is broken, or we cross compile.
4031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4032$as_echo_n "checking whether we are cross compiling... " >&6; }
4033if test "$cross_compiling" != yes; then
4034  { { ac_try="$ac_link"
4035case "(($ac_try" in
4036  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4037  *) ac_try_echo=$ac_try;;
4038esac
4039eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4040$as_echo "$ac_try_echo"; } >&5
4041  (eval "$ac_link") 2>&5
4042  ac_status=$?
4043  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4044  test $ac_status = 0; }
4045  if { ac_try='./conftest$ac_cv_exeext'
4046  { { case "(($ac_try" in
4047  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4048  *) ac_try_echo=$ac_try;;
4049esac
4050eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4051$as_echo "$ac_try_echo"; } >&5
4052  (eval "$ac_try") 2>&5
4053  ac_status=$?
4054  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4055  test $ac_status = 0; }; }; then
4056    cross_compiling=no
4057  else
4058    if test "$cross_compiling" = maybe; then
4059	cross_compiling=yes
4060    else
4061	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4062$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4063as_fn_error $? "cannot run C compiled programs.
4064If you meant to cross compile, use \`--host'.
4065See \`config.log' for more details" "$LINENO" 5; }
4066    fi
4067  fi
4068fi
4069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4070$as_echo "$cross_compiling" >&6; }
4071
4072rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4073ac_clean_files=$ac_clean_files_save
4074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4075$as_echo_n "checking for suffix of object files... " >&6; }
4076if ${ac_cv_objext+:} false; then :
4077  $as_echo_n "(cached) " >&6
4078else
4079  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4080/* end confdefs.h.  */
4081
4082int
4083main ()
4084{
4085
4086  ;
4087  return 0;
4088}
4089_ACEOF
4090rm -f conftest.o conftest.obj
4091if { { ac_try="$ac_compile"
4092case "(($ac_try" in
4093  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4094  *) ac_try_echo=$ac_try;;
4095esac
4096eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4097$as_echo "$ac_try_echo"; } >&5
4098  (eval "$ac_compile") 2>&5
4099  ac_status=$?
4100  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4101  test $ac_status = 0; }; then :
4102  for ac_file in conftest.o conftest.obj conftest.*; do
4103  test -f "$ac_file" || continue;
4104  case $ac_file in
4105    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4106    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4107       break;;
4108  esac
4109done
4110else
4111  $as_echo "$as_me: failed program was:" >&5
4112sed 's/^/| /' conftest.$ac_ext >&5
4113
4114{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4115$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4116as_fn_error $? "cannot compute suffix of object files: cannot compile
4117See \`config.log' for more details" "$LINENO" 5; }
4118fi
4119rm -f conftest.$ac_cv_objext conftest.$ac_ext
4120fi
4121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4122$as_echo "$ac_cv_objext" >&6; }
4123OBJEXT=$ac_cv_objext
4124ac_objext=$OBJEXT
4125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4126$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4127if ${ac_cv_c_compiler_gnu+:} false; then :
4128  $as_echo_n "(cached) " >&6
4129else
4130  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4131/* end confdefs.h.  */
4132
4133int
4134main ()
4135{
4136#ifndef __GNUC__
4137       choke me
4138#endif
4139
4140  ;
4141  return 0;
4142}
4143_ACEOF
4144if ac_fn_c_try_compile "$LINENO"; then :
4145  ac_compiler_gnu=yes
4146else
4147  ac_compiler_gnu=no
4148fi
4149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4150ac_cv_c_compiler_gnu=$ac_compiler_gnu
4151
4152fi
4153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4154$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4155if test $ac_compiler_gnu = yes; then
4156  GCC=yes
4157else
4158  GCC=
4159fi
4160ac_test_CFLAGS=${CFLAGS+set}
4161ac_save_CFLAGS=$CFLAGS
4162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4163$as_echo_n "checking whether $CC accepts -g... " >&6; }
4164if ${ac_cv_prog_cc_g+:} false; then :
4165  $as_echo_n "(cached) " >&6
4166else
4167  ac_save_c_werror_flag=$ac_c_werror_flag
4168   ac_c_werror_flag=yes
4169   ac_cv_prog_cc_g=no
4170   CFLAGS="-g"
4171   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4172/* end confdefs.h.  */
4173
4174int
4175main ()
4176{
4177
4178  ;
4179  return 0;
4180}
4181_ACEOF
4182if ac_fn_c_try_compile "$LINENO"; then :
4183  ac_cv_prog_cc_g=yes
4184else
4185  CFLAGS=""
4186      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4187/* end confdefs.h.  */
4188
4189int
4190main ()
4191{
4192
4193  ;
4194  return 0;
4195}
4196_ACEOF
4197if ac_fn_c_try_compile "$LINENO"; then :
4198
4199else
4200  ac_c_werror_flag=$ac_save_c_werror_flag
4201	 CFLAGS="-g"
4202	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4203/* end confdefs.h.  */
4204
4205int
4206main ()
4207{
4208
4209  ;
4210  return 0;
4211}
4212_ACEOF
4213if ac_fn_c_try_compile "$LINENO"; then :
4214  ac_cv_prog_cc_g=yes
4215fi
4216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4217fi
4218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4219fi
4220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4221   ac_c_werror_flag=$ac_save_c_werror_flag
4222fi
4223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4224$as_echo "$ac_cv_prog_cc_g" >&6; }
4225if test "$ac_test_CFLAGS" = set; then
4226  CFLAGS=$ac_save_CFLAGS
4227elif test $ac_cv_prog_cc_g = yes; then
4228  if test "$GCC" = yes; then
4229    CFLAGS="-g -O2"
4230  else
4231    CFLAGS="-g"
4232  fi
4233else
4234  if test "$GCC" = yes; then
4235    CFLAGS="-O2"
4236  else
4237    CFLAGS=
4238  fi
4239fi
4240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4241$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4242if ${ac_cv_prog_cc_c89+:} false; then :
4243  $as_echo_n "(cached) " >&6
4244else
4245  ac_cv_prog_cc_c89=no
4246ac_save_CC=$CC
4247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4248/* end confdefs.h.  */
4249#include <stdarg.h>
4250#include <stdio.h>
4251struct stat;
4252/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4253struct buf { int x; };
4254FILE * (*rcsopen) (struct buf *, struct stat *, int);
4255static char *e (p, i)
4256     char **p;
4257     int i;
4258{
4259  return p[i];
4260}
4261static char *f (char * (*g) (char **, int), char **p, ...)
4262{
4263  char *s;
4264  va_list v;
4265  va_start (v,p);
4266  s = g (p, va_arg (v,int));
4267  va_end (v);
4268  return s;
4269}
4270
4271/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4272   function prototypes and stuff, but not '\xHH' hex character constants.
4273   These don't provoke an error unfortunately, instead are silently treated
4274   as 'x'.  The following induces an error, until -std is added to get
4275   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4276   array size at least.  It's necessary to write '\x00'==0 to get something
4277   that's true only with -std.  */
4278int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4279
4280/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4281   inside strings and character constants.  */
4282#define FOO(x) 'x'
4283int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4284
4285int test (int i, double x);
4286struct s1 {int (*f) (int a);};
4287struct s2 {int (*f) (double a);};
4288int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4289int argc;
4290char **argv;
4291int
4292main ()
4293{
4294return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4295  ;
4296  return 0;
4297}
4298_ACEOF
4299for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4300	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4301do
4302  CC="$ac_save_CC $ac_arg"
4303  if ac_fn_c_try_compile "$LINENO"; then :
4304  ac_cv_prog_cc_c89=$ac_arg
4305fi
4306rm -f core conftest.err conftest.$ac_objext
4307  test "x$ac_cv_prog_cc_c89" != "xno" && break
4308done
4309rm -f conftest.$ac_ext
4310CC=$ac_save_CC
4311
4312fi
4313# AC_CACHE_VAL
4314case "x$ac_cv_prog_cc_c89" in
4315  x)
4316    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4317$as_echo "none needed" >&6; } ;;
4318  xno)
4319    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4320$as_echo "unsupported" >&6; } ;;
4321  *)
4322    CC="$CC $ac_cv_prog_cc_c89"
4323    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4324$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4325esac
4326if test "x$ac_cv_prog_cc_c89" != xno; then :
4327
4328fi
4329
4330ac_ext=c
4331ac_cpp='$CPP $CPPFLAGS'
4332ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4333ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4334ac_compiler_gnu=$ac_cv_c_compiler_gnu
4335
4336
4337# Check if it's Intel's compiler, which (usually) pretends to be gcc,
4338# but has idiosyncrasies of its own.  We assume icc will define
4339# __INTEL_COMPILER regardless of CFLAGS.
4340
4341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4342/* end confdefs.h.  */
4343
4344int
4345main ()
4346{
4347#ifndef __INTEL_COMPILER
4348choke me
4349#endif
4350  ;
4351  return 0;
4352}
4353_ACEOF
4354if ac_fn_c_try_compile "$LINENO"; then :
4355  ICC=yes
4356else
4357  ICC=no
4358fi
4359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4360
4361# Check if it's Sun Studio compiler. We assume that
4362# __SUNPRO_C will be defined for Sun Studio compilers
4363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4364/* end confdefs.h.  */
4365
4366int
4367main ()
4368{
4369#ifndef __SUNPRO_C
4370choke me
4371#endif
4372  ;
4373  return 0;
4374}
4375_ACEOF
4376if ac_fn_c_try_compile "$LINENO"; then :
4377  SUN_STUDIO_CC=yes
4378else
4379  SUN_STUDIO_CC=no
4380fi
4381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4382
4383
4384
4385unset CFLAGS
4386
4387#
4388# Read the template
4389#
4390. "$srcdir/src/template/$template" || exit
4391
4392# CFLAGS are selected so:
4393# If the user specifies something in the environment, that is used.
4394# else:  If the template file set something, that is used.
4395# else:  If coverage was enabled, don't set anything.
4396# else:  If the compiler is GCC, then we use -O2.
4397# else:  If the compiler is something else, then we use -O, unless debugging.
4398
4399if test "$ac_env_CFLAGS_set" = set; then
4400  CFLAGS=$ac_env_CFLAGS_value
4401elif test "${CFLAGS+set}" = set; then
4402  : # (keep what template set)
4403elif test "$enable_coverage" = yes; then
4404  : # no optimization by default
4405elif test "$GCC" = yes; then
4406  CFLAGS="-O2"
4407else
4408  # if the user selected debug mode, don't use -O
4409  if test "$enable_debug" != yes; then
4410    CFLAGS="-O"
4411  fi
4412fi
4413
4414# CFLAGS we determined above will be added back at the end
4415user_CFLAGS=$CFLAGS
4416CFLAGS=""
4417
4418# set CFLAGS_VECTOR from the environment, if available
4419if test "$ac_env_CFLAGS_VECTOR_set" = set; then
4420  CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
4421fi
4422
4423# Some versions of GCC support some additional useful warning flags.
4424# Check whether they are supported, and add them to CFLAGS if so.
4425# ICC pretends to be GCC but it's lying; it doesn't support these flags,
4426# but has its own.  Also check other compiler-specific flags here.
4427
4428if test "$GCC" = yes -a "$ICC" = no; then
4429  CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
4430  # These work in some but not all gcc versions
4431  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
4432$as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
4433if ${pgac_cv_prog_cc_cflags__Wdeclaration_after_statement+:} false; then :
4434  $as_echo_n "(cached) " >&6
4435else
4436  pgac_save_CFLAGS=$CFLAGS
4437CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
4438ac_save_c_werror_flag=$ac_c_werror_flag
4439ac_c_werror_flag=yes
4440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4441/* end confdefs.h.  */
4442
4443int
4444main ()
4445{
4446
4447  ;
4448  return 0;
4449}
4450_ACEOF
4451if ac_fn_c_try_compile "$LINENO"; then :
4452  pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=yes
4453else
4454  pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=no
4455fi
4456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4457ac_c_werror_flag=$ac_save_c_werror_flag
4458CFLAGS="$pgac_save_CFLAGS"
4459fi
4460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&5
4461$as_echo "$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&6; }
4462if test x"$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" = x"yes"; then
4463  CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4464fi
4465
4466  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wendif-labels" >&5
4467$as_echo_n "checking whether $CC supports -Wendif-labels... " >&6; }
4468if ${pgac_cv_prog_cc_cflags__Wendif_labels+:} false; then :
4469  $as_echo_n "(cached) " >&6
4470else
4471  pgac_save_CFLAGS=$CFLAGS
4472CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
4473ac_save_c_werror_flag=$ac_c_werror_flag
4474ac_c_werror_flag=yes
4475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4476/* end confdefs.h.  */
4477
4478int
4479main ()
4480{
4481
4482  ;
4483  return 0;
4484}
4485_ACEOF
4486if ac_fn_c_try_compile "$LINENO"; then :
4487  pgac_cv_prog_cc_cflags__Wendif_labels=yes
4488else
4489  pgac_cv_prog_cc_cflags__Wendif_labels=no
4490fi
4491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4492ac_c_werror_flag=$ac_save_c_werror_flag
4493CFLAGS="$pgac_save_CFLAGS"
4494fi
4495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wendif_labels" >&5
4496$as_echo "$pgac_cv_prog_cc_cflags__Wendif_labels" >&6; }
4497if test x"$pgac_cv_prog_cc_cflags__Wendif_labels" = x"yes"; then
4498  CFLAGS="$CFLAGS -Wendif-labels"
4499fi
4500
4501  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wmissing-format-attribute" >&5
4502$as_echo_n "checking whether $CC supports -Wmissing-format-attribute... " >&6; }
4503if ${pgac_cv_prog_cc_cflags__Wmissing_format_attribute+:} false; then :
4504  $as_echo_n "(cached) " >&6
4505else
4506  pgac_save_CFLAGS=$CFLAGS
4507CFLAGS="$pgac_save_CFLAGS -Wmissing-format-attribute"
4508ac_save_c_werror_flag=$ac_c_werror_flag
4509ac_c_werror_flag=yes
4510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4511/* end confdefs.h.  */
4512
4513int
4514main ()
4515{
4516
4517  ;
4518  return 0;
4519}
4520_ACEOF
4521if ac_fn_c_try_compile "$LINENO"; then :
4522  pgac_cv_prog_cc_cflags__Wmissing_format_attribute=yes
4523else
4524  pgac_cv_prog_cc_cflags__Wmissing_format_attribute=no
4525fi
4526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4527ac_c_werror_flag=$ac_save_c_werror_flag
4528CFLAGS="$pgac_save_CFLAGS"
4529fi
4530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&5
4531$as_echo "$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&6; }
4532if test x"$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" = x"yes"; then
4533  CFLAGS="$CFLAGS -Wmissing-format-attribute"
4534fi
4535
4536  # This was included in -Wall/-Wformat in older GCC versions
4537  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wformat-security" >&5
4538$as_echo_n "checking whether $CC supports -Wformat-security... " >&6; }
4539if ${pgac_cv_prog_cc_cflags__Wformat_security+:} false; then :
4540  $as_echo_n "(cached) " >&6
4541else
4542  pgac_save_CFLAGS=$CFLAGS
4543CFLAGS="$pgac_save_CFLAGS -Wformat-security"
4544ac_save_c_werror_flag=$ac_c_werror_flag
4545ac_c_werror_flag=yes
4546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4547/* end confdefs.h.  */
4548
4549int
4550main ()
4551{
4552
4553  ;
4554  return 0;
4555}
4556_ACEOF
4557if ac_fn_c_try_compile "$LINENO"; then :
4558  pgac_cv_prog_cc_cflags__Wformat_security=yes
4559else
4560  pgac_cv_prog_cc_cflags__Wformat_security=no
4561fi
4562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4563ac_c_werror_flag=$ac_save_c_werror_flag
4564CFLAGS="$pgac_save_CFLAGS"
4565fi
4566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wformat_security" >&5
4567$as_echo "$pgac_cv_prog_cc_cflags__Wformat_security" >&6; }
4568if test x"$pgac_cv_prog_cc_cflags__Wformat_security" = x"yes"; then
4569  CFLAGS="$CFLAGS -Wformat-security"
4570fi
4571
4572  # Disable strict-aliasing rules; needed for gcc 3.3+
4573  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4574$as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4575if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4576  $as_echo_n "(cached) " >&6
4577else
4578  pgac_save_CFLAGS=$CFLAGS
4579CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4580ac_save_c_werror_flag=$ac_c_werror_flag
4581ac_c_werror_flag=yes
4582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4583/* end confdefs.h.  */
4584
4585int
4586main ()
4587{
4588
4589  ;
4590  return 0;
4591}
4592_ACEOF
4593if ac_fn_c_try_compile "$LINENO"; then :
4594  pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4595else
4596  pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4597fi
4598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4599ac_c_werror_flag=$ac_save_c_werror_flag
4600CFLAGS="$pgac_save_CFLAGS"
4601fi
4602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4603$as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4604if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4605  CFLAGS="$CFLAGS -fno-strict-aliasing"
4606fi
4607
4608  # Disable optimizations that assume no overflow; needed for gcc 4.3+
4609  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fwrapv" >&5
4610$as_echo_n "checking whether $CC supports -fwrapv... " >&6; }
4611if ${pgac_cv_prog_cc_cflags__fwrapv+:} false; then :
4612  $as_echo_n "(cached) " >&6
4613else
4614  pgac_save_CFLAGS=$CFLAGS
4615CFLAGS="$pgac_save_CFLAGS -fwrapv"
4616ac_save_c_werror_flag=$ac_c_werror_flag
4617ac_c_werror_flag=yes
4618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4619/* end confdefs.h.  */
4620
4621int
4622main ()
4623{
4624
4625  ;
4626  return 0;
4627}
4628_ACEOF
4629if ac_fn_c_try_compile "$LINENO"; then :
4630  pgac_cv_prog_cc_cflags__fwrapv=yes
4631else
4632  pgac_cv_prog_cc_cflags__fwrapv=no
4633fi
4634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4635ac_c_werror_flag=$ac_save_c_werror_flag
4636CFLAGS="$pgac_save_CFLAGS"
4637fi
4638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fwrapv" >&5
4639$as_echo "$pgac_cv_prog_cc_cflags__fwrapv" >&6; }
4640if test x"$pgac_cv_prog_cc_cflags__fwrapv" = x"yes"; then
4641  CFLAGS="$CFLAGS -fwrapv"
4642fi
4643
4644  # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
4645  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fexcess-precision=standard" >&5
4646$as_echo_n "checking whether $CC supports -fexcess-precision=standard... " >&6; }
4647if ${pgac_cv_prog_cc_cflags__fexcess_precision_standard+:} false; then :
4648  $as_echo_n "(cached) " >&6
4649else
4650  pgac_save_CFLAGS=$CFLAGS
4651CFLAGS="$pgac_save_CFLAGS -fexcess-precision=standard"
4652ac_save_c_werror_flag=$ac_c_werror_flag
4653ac_c_werror_flag=yes
4654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4655/* end confdefs.h.  */
4656
4657int
4658main ()
4659{
4660
4661  ;
4662  return 0;
4663}
4664_ACEOF
4665if ac_fn_c_try_compile "$LINENO"; then :
4666  pgac_cv_prog_cc_cflags__fexcess_precision_standard=yes
4667else
4668  pgac_cv_prog_cc_cflags__fexcess_precision_standard=no
4669fi
4670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4671ac_c_werror_flag=$ac_save_c_werror_flag
4672CFLAGS="$pgac_save_CFLAGS"
4673fi
4674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&5
4675$as_echo "$pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&6; }
4676if test x"$pgac_cv_prog_cc_cflags__fexcess_precision_standard" = x"yes"; then
4677  CFLAGS="$CFLAGS -fexcess-precision=standard"
4678fi
4679
4680  # Optimization flags for specific files that benefit from vectorization
4681  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -funroll-loops" >&5
4682$as_echo_n "checking whether $CC supports -funroll-loops... " >&6; }
4683if ${pgac_cv_prog_cc_cflags__funroll_loops+:} false; then :
4684  $as_echo_n "(cached) " >&6
4685else
4686  pgac_save_CFLAGS=$CFLAGS
4687CFLAGS="$pgac_save_CFLAGS -funroll-loops"
4688ac_save_c_werror_flag=$ac_c_werror_flag
4689ac_c_werror_flag=yes
4690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4691/* end confdefs.h.  */
4692
4693int
4694main ()
4695{
4696
4697  ;
4698  return 0;
4699}
4700_ACEOF
4701if ac_fn_c_try_compile "$LINENO"; then :
4702  pgac_cv_prog_cc_cflags__funroll_loops=yes
4703else
4704  pgac_cv_prog_cc_cflags__funroll_loops=no
4705fi
4706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4707ac_c_werror_flag=$ac_save_c_werror_flag
4708CFLAGS="$pgac_save_CFLAGS"
4709fi
4710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__funroll_loops" >&5
4711$as_echo "$pgac_cv_prog_cc_cflags__funroll_loops" >&6; }
4712if test x"$pgac_cv_prog_cc_cflags__funroll_loops" = x"yes"; then
4713  CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
4714fi
4715
4716  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -ftree-vectorize" >&5
4717$as_echo_n "checking whether $CC supports -ftree-vectorize... " >&6; }
4718if ${pgac_cv_prog_cc_cflags__ftree_vectorize+:} false; then :
4719  $as_echo_n "(cached) " >&6
4720else
4721  pgac_save_CFLAGS=$CFLAGS
4722CFLAGS="$pgac_save_CFLAGS -ftree-vectorize"
4723ac_save_c_werror_flag=$ac_c_werror_flag
4724ac_c_werror_flag=yes
4725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4726/* end confdefs.h.  */
4727
4728int
4729main ()
4730{
4731
4732  ;
4733  return 0;
4734}
4735_ACEOF
4736if ac_fn_c_try_compile "$LINENO"; then :
4737  pgac_cv_prog_cc_cflags__ftree_vectorize=yes
4738else
4739  pgac_cv_prog_cc_cflags__ftree_vectorize=no
4740fi
4741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4742ac_c_werror_flag=$ac_save_c_werror_flag
4743CFLAGS="$pgac_save_CFLAGS"
4744fi
4745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__ftree_vectorize" >&5
4746$as_echo "$pgac_cv_prog_cc_cflags__ftree_vectorize" >&6; }
4747if test x"$pgac_cv_prog_cc_cflags__ftree_vectorize" = x"yes"; then
4748  CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
4749fi
4750
4751  # We want to suppress clang's unhelpful unused-command-line-argument warnings
4752  # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
4753  # test for the positive form and if that works, add the negative form
4754  NOT_THE_CFLAGS=""
4755  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wunused-command-line-argument" >&5
4756$as_echo_n "checking whether $CC supports -Wunused-command-line-argument... " >&6; }
4757if ${pgac_cv_prog_cc_cflags__Wunused_command_line_argument+:} false; then :
4758  $as_echo_n "(cached) " >&6
4759else
4760  pgac_save_CFLAGS=$CFLAGS
4761CFLAGS="$pgac_save_CFLAGS -Wunused-command-line-argument"
4762ac_save_c_werror_flag=$ac_c_werror_flag
4763ac_c_werror_flag=yes
4764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4765/* end confdefs.h.  */
4766
4767int
4768main ()
4769{
4770
4771  ;
4772  return 0;
4773}
4774_ACEOF
4775if ac_fn_c_try_compile "$LINENO"; then :
4776  pgac_cv_prog_cc_cflags__Wunused_command_line_argument=yes
4777else
4778  pgac_cv_prog_cc_cflags__Wunused_command_line_argument=no
4779fi
4780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4781ac_c_werror_flag=$ac_save_c_werror_flag
4782CFLAGS="$pgac_save_CFLAGS"
4783fi
4784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wunused_command_line_argument" >&5
4785$as_echo "$pgac_cv_prog_cc_cflags__Wunused_command_line_argument" >&6; }
4786if test x"$pgac_cv_prog_cc_cflags__Wunused_command_line_argument" = x"yes"; then
4787  NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
4788fi
4789
4790  if test -n "$NOT_THE_CFLAGS"; then
4791    CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
4792  fi
4793  # Similarly disable useless truncation warnings from gcc 8+
4794  NOT_THE_CFLAGS=""
4795  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wformat-truncation" >&5
4796$as_echo_n "checking whether $CC supports -Wformat-truncation... " >&6; }
4797if ${pgac_cv_prog_cc_cflags__Wformat_truncation+:} false; then :
4798  $as_echo_n "(cached) " >&6
4799else
4800  pgac_save_CFLAGS=$CFLAGS
4801CFLAGS="$pgac_save_CFLAGS -Wformat-truncation"
4802ac_save_c_werror_flag=$ac_c_werror_flag
4803ac_c_werror_flag=yes
4804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4805/* end confdefs.h.  */
4806
4807int
4808main ()
4809{
4810
4811  ;
4812  return 0;
4813}
4814_ACEOF
4815if ac_fn_c_try_compile "$LINENO"; then :
4816  pgac_cv_prog_cc_cflags__Wformat_truncation=yes
4817else
4818  pgac_cv_prog_cc_cflags__Wformat_truncation=no
4819fi
4820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4821ac_c_werror_flag=$ac_save_c_werror_flag
4822CFLAGS="$pgac_save_CFLAGS"
4823fi
4824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wformat_truncation" >&5
4825$as_echo "$pgac_cv_prog_cc_cflags__Wformat_truncation" >&6; }
4826if test x"$pgac_cv_prog_cc_cflags__Wformat_truncation" = x"yes"; then
4827  NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
4828fi
4829
4830  if test -n "$NOT_THE_CFLAGS"; then
4831    CFLAGS="$CFLAGS -Wno-format-truncation"
4832  fi
4833  NOT_THE_CFLAGS=""
4834  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wstringop-truncation" >&5
4835$as_echo_n "checking whether $CC supports -Wstringop-truncation... " >&6; }
4836if ${pgac_cv_prog_cc_cflags__Wstringop_truncation+:} false; then :
4837  $as_echo_n "(cached) " >&6
4838else
4839  pgac_save_CFLAGS=$CFLAGS
4840CFLAGS="$pgac_save_CFLAGS -Wstringop-truncation"
4841ac_save_c_werror_flag=$ac_c_werror_flag
4842ac_c_werror_flag=yes
4843cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4844/* end confdefs.h.  */
4845
4846int
4847main ()
4848{
4849
4850  ;
4851  return 0;
4852}
4853_ACEOF
4854if ac_fn_c_try_compile "$LINENO"; then :
4855  pgac_cv_prog_cc_cflags__Wstringop_truncation=yes
4856else
4857  pgac_cv_prog_cc_cflags__Wstringop_truncation=no
4858fi
4859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4860ac_c_werror_flag=$ac_save_c_werror_flag
4861CFLAGS="$pgac_save_CFLAGS"
4862fi
4863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wstringop_truncation" >&5
4864$as_echo "$pgac_cv_prog_cc_cflags__Wstringop_truncation" >&6; }
4865if test x"$pgac_cv_prog_cc_cflags__Wstringop_truncation" = x"yes"; then
4866  NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
4867fi
4868
4869  if test -n "$NOT_THE_CFLAGS"; then
4870    CFLAGS="$CFLAGS -Wno-stringop-truncation"
4871  fi
4872elif test "$ICC" = yes; then
4873  # Intel's compiler has a bug/misoptimization in checking for
4874  # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
4875  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mp1" >&5
4876$as_echo_n "checking whether $CC supports -mp1... " >&6; }
4877if ${pgac_cv_prog_cc_cflags__mp1+:} false; then :
4878  $as_echo_n "(cached) " >&6
4879else
4880  pgac_save_CFLAGS=$CFLAGS
4881CFLAGS="$pgac_save_CFLAGS -mp1"
4882ac_save_c_werror_flag=$ac_c_werror_flag
4883ac_c_werror_flag=yes
4884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4885/* end confdefs.h.  */
4886
4887int
4888main ()
4889{
4890
4891  ;
4892  return 0;
4893}
4894_ACEOF
4895if ac_fn_c_try_compile "$LINENO"; then :
4896  pgac_cv_prog_cc_cflags__mp1=yes
4897else
4898  pgac_cv_prog_cc_cflags__mp1=no
4899fi
4900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4901ac_c_werror_flag=$ac_save_c_werror_flag
4902CFLAGS="$pgac_save_CFLAGS"
4903fi
4904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__mp1" >&5
4905$as_echo "$pgac_cv_prog_cc_cflags__mp1" >&6; }
4906if test x"$pgac_cv_prog_cc_cflags__mp1" = x"yes"; then
4907  CFLAGS="$CFLAGS -mp1"
4908fi
4909
4910  # Make sure strict aliasing is off (though this is said to be the default)
4911  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4912$as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4913if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4914  $as_echo_n "(cached) " >&6
4915else
4916  pgac_save_CFLAGS=$CFLAGS
4917CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4918ac_save_c_werror_flag=$ac_c_werror_flag
4919ac_c_werror_flag=yes
4920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4921/* end confdefs.h.  */
4922
4923int
4924main ()
4925{
4926
4927  ;
4928  return 0;
4929}
4930_ACEOF
4931if ac_fn_c_try_compile "$LINENO"; then :
4932  pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4933else
4934  pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4935fi
4936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4937ac_c_werror_flag=$ac_save_c_werror_flag
4938CFLAGS="$pgac_save_CFLAGS"
4939fi
4940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4941$as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4942if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4943  CFLAGS="$CFLAGS -fno-strict-aliasing"
4944fi
4945
4946elif test "$PORTNAME" = "aix"; then
4947  # AIX's xlc has to have strict aliasing turned off too
4948  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qnoansialias" >&5
4949$as_echo_n "checking whether $CC supports -qnoansialias... " >&6; }
4950if ${pgac_cv_prog_cc_cflags__qnoansialias+:} false; then :
4951  $as_echo_n "(cached) " >&6
4952else
4953  pgac_save_CFLAGS=$CFLAGS
4954CFLAGS="$pgac_save_CFLAGS -qnoansialias"
4955ac_save_c_werror_flag=$ac_c_werror_flag
4956ac_c_werror_flag=yes
4957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4958/* end confdefs.h.  */
4959
4960int
4961main ()
4962{
4963
4964  ;
4965  return 0;
4966}
4967_ACEOF
4968if ac_fn_c_try_compile "$LINENO"; then :
4969  pgac_cv_prog_cc_cflags__qnoansialias=yes
4970else
4971  pgac_cv_prog_cc_cflags__qnoansialias=no
4972fi
4973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4974ac_c_werror_flag=$ac_save_c_werror_flag
4975CFLAGS="$pgac_save_CFLAGS"
4976fi
4977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qnoansialias" >&5
4978$as_echo "$pgac_cv_prog_cc_cflags__qnoansialias" >&6; }
4979if test x"$pgac_cv_prog_cc_cflags__qnoansialias" = x"yes"; then
4980  CFLAGS="$CFLAGS -qnoansialias"
4981fi
4982
4983  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qlonglong" >&5
4984$as_echo_n "checking whether $CC supports -qlonglong... " >&6; }
4985if ${pgac_cv_prog_cc_cflags__qlonglong+:} false; then :
4986  $as_echo_n "(cached) " >&6
4987else
4988  pgac_save_CFLAGS=$CFLAGS
4989CFLAGS="$pgac_save_CFLAGS -qlonglong"
4990ac_save_c_werror_flag=$ac_c_werror_flag
4991ac_c_werror_flag=yes
4992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4993/* end confdefs.h.  */
4994
4995int
4996main ()
4997{
4998
4999  ;
5000  return 0;
5001}
5002_ACEOF
5003if ac_fn_c_try_compile "$LINENO"; then :
5004  pgac_cv_prog_cc_cflags__qlonglong=yes
5005else
5006  pgac_cv_prog_cc_cflags__qlonglong=no
5007fi
5008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5009ac_c_werror_flag=$ac_save_c_werror_flag
5010CFLAGS="$pgac_save_CFLAGS"
5011fi
5012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qlonglong" >&5
5013$as_echo "$pgac_cv_prog_cc_cflags__qlonglong" >&6; }
5014if test x"$pgac_cv_prog_cc_cflags__qlonglong" = x"yes"; then
5015  CFLAGS="$CFLAGS -qlonglong"
5016fi
5017
5018elif test "$PORTNAME" = "hpux"; then
5019  # On some versions of HP-UX, libm functions do not set errno by default.
5020  # Fix that by using +Olibmerrno if the compiler recognizes it.
5021  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports +Olibmerrno" >&5
5022$as_echo_n "checking whether $CC supports +Olibmerrno... " >&6; }
5023if ${pgac_cv_prog_cc_cflags_pOlibmerrno+:} false; then :
5024  $as_echo_n "(cached) " >&6
5025else
5026  pgac_save_CFLAGS=$CFLAGS
5027CFLAGS="$pgac_save_CFLAGS +Olibmerrno"
5028ac_save_c_werror_flag=$ac_c_werror_flag
5029ac_c_werror_flag=yes
5030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5031/* end confdefs.h.  */
5032
5033int
5034main ()
5035{
5036
5037  ;
5038  return 0;
5039}
5040_ACEOF
5041if ac_fn_c_try_compile "$LINENO"; then :
5042  pgac_cv_prog_cc_cflags_pOlibmerrno=yes
5043else
5044  pgac_cv_prog_cc_cflags_pOlibmerrno=no
5045fi
5046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5047ac_c_werror_flag=$ac_save_c_werror_flag
5048CFLAGS="$pgac_save_CFLAGS"
5049fi
5050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags_pOlibmerrno" >&5
5051$as_echo "$pgac_cv_prog_cc_cflags_pOlibmerrno" >&6; }
5052if test x"$pgac_cv_prog_cc_cflags_pOlibmerrno" = x"yes"; then
5053  CFLAGS="$CFLAGS +Olibmerrno"
5054fi
5055
5056fi
5057
5058
5059
5060# supply -g if --enable-debug
5061if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
5062  CFLAGS="$CFLAGS -g"
5063fi
5064
5065# enable code coverage if --enable-coverage
5066if test "$enable_coverage" = yes; then
5067  if test "$GCC" = yes; then
5068    CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
5069  else
5070    as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
5071  fi
5072fi
5073
5074# enable profiling if --enable-profiling
5075if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
5076  if test "$GCC" = yes; then
5077
5078$as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
5079
5080    CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
5081  else
5082    as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
5083  fi
5084fi
5085
5086# We already have this in Makefile.win32, but configure needs it too
5087if test "$PORTNAME" = "win32"; then
5088  CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
5089fi
5090
5091# Now that we're done automatically adding stuff to CFLAGS, put back the
5092# user-specified flags (if any) at the end.  This lets users override
5093# the automatic additions.
5094CFLAGS="$CFLAGS $user_CFLAGS"
5095
5096# The template file must set up CFLAGS_SL; we don't support user override
5097
5098
5099# Check if the compiler still works with the final flag settings
5100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
5101$as_echo_n "checking whether the C compiler still works... " >&6; }
5102cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5103/* end confdefs.h.  */
5104
5105int
5106main ()
5107{
5108return 0;
5109  ;
5110  return 0;
5111}
5112_ACEOF
5113if ac_fn_c_try_link "$LINENO"; then :
5114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5115$as_echo "yes" >&6; }
5116else
5117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5118$as_echo "no" >&6; }
5119   as_fn_error $? "cannot proceed" "$LINENO" 5
5120fi
5121rm -f core conftest.err conftest.$ac_objext \
5122    conftest$ac_exeext conftest.$ac_ext
5123
5124# Defend against gcc -ffast-math
5125if test "$GCC" = yes; then
5126cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5127/* end confdefs.h.  */
5128
5129int
5130main ()
5131{
5132#ifdef __FAST_MATH__
5133choke me
5134#endif
5135  ;
5136  return 0;
5137}
5138_ACEOF
5139if ac_fn_c_try_compile "$LINENO"; then :
5140
5141else
5142  as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
5143fi
5144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5145fi
5146
5147# Defend against clang being used on x86-32 without SSE2 enabled.  As current
5148# versions of clang do not understand -fexcess-precision=standard, the use of
5149# x87 floating point operations leads to problems like isinf possibly returning
5150# false for a value that is infinite when converted from the 80bit register to
5151# the 8byte memory representation.
5152#
5153# Only perform the test if the compiler doesn't understand
5154# -fexcess-precision=standard, that way a potentially fixed compiler will work
5155# automatically.
5156if test "$pgac_cv_prog_cc_cflags__fexcess_precision_standard" = no; then
5157cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5158/* end confdefs.h.  */
5159
5160int
5161main ()
5162{
5163
5164#if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
5165choke me
5166#endif
5167
5168  ;
5169  return 0;
5170}
5171_ACEOF
5172if ac_fn_c_try_compile "$LINENO"; then :
5173
5174else
5175  as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
5176fi
5177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5178fi
5179
5180ac_ext=c
5181ac_cpp='$CPP $CPPFLAGS'
5182ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5183ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5184ac_compiler_gnu=$ac_cv_c_compiler_gnu
5185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5186$as_echo_n "checking how to run the C preprocessor... " >&6; }
5187# On Suns, sometimes $CPP names a directory.
5188if test -n "$CPP" && test -d "$CPP"; then
5189  CPP=
5190fi
5191if test -z "$CPP"; then
5192  if ${ac_cv_prog_CPP+:} false; then :
5193  $as_echo_n "(cached) " >&6
5194else
5195      # Double quotes because CPP needs to be expanded
5196    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5197    do
5198      ac_preproc_ok=false
5199for ac_c_preproc_warn_flag in '' yes
5200do
5201  # Use a header file that comes with gcc, so configuring glibc
5202  # with a fresh cross-compiler works.
5203  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5204  # <limits.h> exists even on freestanding compilers.
5205  # On the NeXT, cc -E runs the code through the compiler's parser,
5206  # not just through cpp. "Syntax error" is here to catch this case.
5207  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5208/* end confdefs.h.  */
5209#ifdef __STDC__
5210# include <limits.h>
5211#else
5212# include <assert.h>
5213#endif
5214		     Syntax error
5215_ACEOF
5216if ac_fn_c_try_cpp "$LINENO"; then :
5217
5218else
5219  # Broken: fails on valid input.
5220continue
5221fi
5222rm -f conftest.err conftest.i conftest.$ac_ext
5223
5224  # OK, works on sane cases.  Now check whether nonexistent headers
5225  # can be detected and how.
5226  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5227/* end confdefs.h.  */
5228#include <ac_nonexistent.h>
5229_ACEOF
5230if ac_fn_c_try_cpp "$LINENO"; then :
5231  # Broken: success on invalid input.
5232continue
5233else
5234  # Passes both tests.
5235ac_preproc_ok=:
5236break
5237fi
5238rm -f conftest.err conftest.i conftest.$ac_ext
5239
5240done
5241# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5242rm -f conftest.i conftest.err conftest.$ac_ext
5243if $ac_preproc_ok; then :
5244  break
5245fi
5246
5247    done
5248    ac_cv_prog_CPP=$CPP
5249
5250fi
5251  CPP=$ac_cv_prog_CPP
5252else
5253  ac_cv_prog_CPP=$CPP
5254fi
5255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5256$as_echo "$CPP" >&6; }
5257ac_preproc_ok=false
5258for ac_c_preproc_warn_flag in '' yes
5259do
5260  # Use a header file that comes with gcc, so configuring glibc
5261  # with a fresh cross-compiler works.
5262  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5263  # <limits.h> exists even on freestanding compilers.
5264  # On the NeXT, cc -E runs the code through the compiler's parser,
5265  # not just through cpp. "Syntax error" is here to catch this case.
5266  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5267/* end confdefs.h.  */
5268#ifdef __STDC__
5269# include <limits.h>
5270#else
5271# include <assert.h>
5272#endif
5273		     Syntax error
5274_ACEOF
5275if ac_fn_c_try_cpp "$LINENO"; then :
5276
5277else
5278  # Broken: fails on valid input.
5279continue
5280fi
5281rm -f conftest.err conftest.i conftest.$ac_ext
5282
5283  # OK, works on sane cases.  Now check whether nonexistent headers
5284  # can be detected and how.
5285  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5286/* end confdefs.h.  */
5287#include <ac_nonexistent.h>
5288_ACEOF
5289if ac_fn_c_try_cpp "$LINENO"; then :
5290  # Broken: success on invalid input.
5291continue
5292else
5293  # Passes both tests.
5294ac_preproc_ok=:
5295break
5296fi
5297rm -f conftest.err conftest.i conftest.$ac_ext
5298
5299done
5300# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5301rm -f conftest.i conftest.err conftest.$ac_ext
5302if $ac_preproc_ok; then :
5303
5304else
5305  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5306$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5307as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5308See \`config.log' for more details" "$LINENO" 5; }
5309fi
5310
5311ac_ext=c
5312ac_cpp='$CPP $CPPFLAGS'
5313ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5314ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5315ac_compiler_gnu=$ac_cv_c_compiler_gnu
5316
5317
5318
5319
5320#
5321# Set up TAS assembly code if needed; the template file has now had its
5322# chance to request this.
5323#
5324ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
5325
5326
5327if test "$need_tas" = yes ; then
5328  TAS=tas.o
5329else
5330  TAS=""
5331fi
5332
5333
5334
5335#
5336# Automatic dependency tracking
5337#
5338
5339
5340# Check whether --enable-depend was given.
5341if test "${enable_depend+set}" = set; then :
5342  enableval=$enable_depend;
5343  case $enableval in
5344    yes)
5345      autodepend=yes
5346      ;;
5347    no)
5348      :
5349      ;;
5350    *)
5351      as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
5352      ;;
5353  esac
5354
5355else
5356  enable_depend=no
5357
5358fi
5359
5360
5361
5362
5363
5364#
5365# Enable assert checks
5366#
5367
5368
5369# Check whether --enable-cassert was given.
5370if test "${enable_cassert+set}" = set; then :
5371  enableval=$enable_cassert;
5372  case $enableval in
5373    yes)
5374
5375$as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
5376
5377      ;;
5378    no)
5379      :
5380      ;;
5381    *)
5382      as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
5383      ;;
5384  esac
5385
5386else
5387  enable_cassert=no
5388
5389fi
5390
5391
5392
5393
5394#
5395# Include directories
5396#
5397ac_save_IFS=$IFS
5398IFS="${IFS}${PATH_SEPARATOR}"
5399# SRCH_INC comes from the template file
5400for dir in $with_includes $SRCH_INC; do
5401  if test -d "$dir"; then
5402    INCLUDES="$INCLUDES -I$dir"
5403  else
5404    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
5405$as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
5406  fi
5407done
5408IFS=$ac_save_IFS
5409
5410
5411
5412#
5413# Library directories
5414#
5415ac_save_IFS=$IFS
5416IFS="${IFS}${PATH_SEPARATOR}"
5417# LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
5418for dir in $LIBRARY_DIRS $SRCH_LIB; do
5419  if test -d "$dir"; then
5420    LIBDIRS="$LIBDIRS -L$dir"
5421  else
5422    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
5423$as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
5424  fi
5425done
5426IFS=$ac_save_IFS
5427
5428#
5429# Enable thread-safe client libraries
5430#
5431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
5432$as_echo_n "checking allow thread-safe client libraries... " >&6; }
5433
5434
5435# Check whether --enable-thread-safety was given.
5436if test "${enable_thread_safety+set}" = set; then :
5437  enableval=$enable_thread_safety;
5438  case $enableval in
5439    yes)
5440      :
5441      ;;
5442    no)
5443      :
5444      ;;
5445    *)
5446      as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
5447      ;;
5448  esac
5449
5450else
5451  enable_thread_safety=yes
5452
5453fi
5454
5455
5456if test "$enable_thread_safety" = yes; then
5457
5458$as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
5459
5460fi
5461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
5462$as_echo "$enable_thread_safety" >&6; }
5463
5464
5465#
5466# Optionally build Tcl modules (PL/Tcl)
5467#
5468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
5469$as_echo_n "checking whether to build with Tcl... " >&6; }
5470
5471
5472
5473# Check whether --with-tcl was given.
5474if test "${with_tcl+set}" = set; then :
5475  withval=$with_tcl;
5476  case $withval in
5477    yes)
5478      :
5479      ;;
5480    no)
5481      :
5482      ;;
5483    *)
5484      as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
5485      ;;
5486  esac
5487
5488else
5489  with_tcl=no
5490
5491fi
5492
5493
5494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
5495$as_echo "$with_tcl" >&6; }
5496
5497
5498# We see if the path to the Tcl/Tk configuration scripts is specified.
5499# This will override the use of tclsh to find the paths to search.
5500
5501
5502
5503
5504# Check whether --with-tclconfig was given.
5505if test "${with_tclconfig+set}" = set; then :
5506  withval=$with_tclconfig;
5507  case $withval in
5508    yes)
5509      as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5510      ;;
5511    no)
5512      as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5513      ;;
5514    *)
5515
5516      ;;
5517  esac
5518
5519fi
5520
5521
5522
5523#
5524# Optionally build Perl modules (PL/Perl)
5525#
5526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
5527$as_echo_n "checking whether to build Perl modules... " >&6; }
5528
5529
5530
5531# Check whether --with-perl was given.
5532if test "${with_perl+set}" = set; then :
5533  withval=$with_perl;
5534  case $withval in
5535    yes)
5536      :
5537      ;;
5538    no)
5539      :
5540      ;;
5541    *)
5542      as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
5543      ;;
5544  esac
5545
5546else
5547  with_perl=no
5548
5549fi
5550
5551
5552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
5553$as_echo "$with_perl" >&6; }
5554
5555
5556#
5557# Optionally build Python modules (PL/Python)
5558#
5559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
5560$as_echo_n "checking whether to build Python modules... " >&6; }
5561
5562
5563
5564# Check whether --with-python was given.
5565if test "${with_python+set}" = set; then :
5566  withval=$with_python;
5567  case $withval in
5568    yes)
5569      :
5570      ;;
5571    no)
5572      :
5573      ;;
5574    *)
5575      as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
5576      ;;
5577  esac
5578
5579else
5580  with_python=no
5581
5582fi
5583
5584
5585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
5586$as_echo "$with_python" >&6; }
5587
5588
5589#
5590# GSSAPI
5591#
5592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
5593$as_echo_n "checking whether to build with GSSAPI support... " >&6; }
5594
5595
5596
5597# Check whether --with-gssapi was given.
5598if test "${with_gssapi+set}" = set; then :
5599  withval=$with_gssapi;
5600  case $withval in
5601    yes)
5602
5603
5604$as_echo "#define ENABLE_GSS 1" >>confdefs.h
5605
5606  krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5607
5608      ;;
5609    no)
5610      :
5611      ;;
5612    *)
5613      as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
5614      ;;
5615  esac
5616
5617else
5618  with_gssapi=no
5619
5620fi
5621
5622
5623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
5624$as_echo "$with_gssapi" >&6; }
5625
5626
5627
5628
5629
5630#
5631# Kerberos configuration parameters
5632#
5633
5634
5635
5636# Check whether --with-krb-srvnam was given.
5637if test "${with_krb_srvnam+set}" = set; then :
5638  withval=$with_krb_srvnam;
5639  case $withval in
5640    yes)
5641      as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5642      ;;
5643    no)
5644      as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5645      ;;
5646    *)
5647
5648      ;;
5649  esac
5650
5651else
5652  with_krb_srvnam="postgres"
5653fi
5654
5655
5656
5657cat >>confdefs.h <<_ACEOF
5658#define PG_KRB_SRVNAM "$with_krb_srvnam"
5659_ACEOF
5660
5661
5662
5663#
5664# PAM
5665#
5666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
5667$as_echo_n "checking whether to build with PAM support... " >&6; }
5668
5669
5670
5671# Check whether --with-pam was given.
5672if test "${with_pam+set}" = set; then :
5673  withval=$with_pam;
5674  case $withval in
5675    yes)
5676
5677$as_echo "#define USE_PAM 1" >>confdefs.h
5678
5679      ;;
5680    no)
5681      :
5682      ;;
5683    *)
5684      as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
5685      ;;
5686  esac
5687
5688else
5689  with_pam=no
5690
5691fi
5692
5693
5694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
5695$as_echo "$with_pam" >&6; }
5696
5697
5698#
5699# BSD AUTH
5700#
5701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
5702$as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
5703
5704
5705
5706# Check whether --with-bsd-auth was given.
5707if test "${with_bsd_auth+set}" = set; then :
5708  withval=$with_bsd_auth;
5709  case $withval in
5710    yes)
5711
5712$as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
5713
5714      ;;
5715    no)
5716      :
5717      ;;
5718    *)
5719      as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
5720      ;;
5721  esac
5722
5723else
5724  with_bsd_auth=no
5725
5726fi
5727
5728
5729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
5730$as_echo "$with_bsd_auth" >&6; }
5731
5732
5733#
5734# LDAP
5735#
5736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
5737$as_echo_n "checking whether to build with LDAP support... " >&6; }
5738
5739
5740
5741# Check whether --with-ldap was given.
5742if test "${with_ldap+set}" = set; then :
5743  withval=$with_ldap;
5744  case $withval in
5745    yes)
5746
5747$as_echo "#define USE_LDAP 1" >>confdefs.h
5748
5749      ;;
5750    no)
5751      :
5752      ;;
5753    *)
5754      as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
5755      ;;
5756  esac
5757
5758else
5759  with_ldap=no
5760
5761fi
5762
5763
5764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
5765$as_echo "$with_ldap" >&6; }
5766
5767
5768#
5769# Bonjour
5770#
5771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
5772$as_echo_n "checking whether to build with Bonjour support... " >&6; }
5773
5774
5775
5776# Check whether --with-bonjour was given.
5777if test "${with_bonjour+set}" = set; then :
5778  withval=$with_bonjour;
5779  case $withval in
5780    yes)
5781
5782$as_echo "#define USE_BONJOUR 1" >>confdefs.h
5783
5784      ;;
5785    no)
5786      :
5787      ;;
5788    *)
5789      as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
5790      ;;
5791  esac
5792
5793else
5794  with_bonjour=no
5795
5796fi
5797
5798
5799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
5800$as_echo "$with_bonjour" >&6; }
5801
5802
5803#
5804# OpenSSL
5805#
5806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
5807$as_echo_n "checking whether to build with OpenSSL support... " >&6; }
5808
5809
5810
5811# Check whether --with-openssl was given.
5812if test "${with_openssl+set}" = set; then :
5813  withval=$with_openssl;
5814  case $withval in
5815    yes)
5816
5817$as_echo "#define USE_OPENSSL 1" >>confdefs.h
5818
5819      ;;
5820    no)
5821      :
5822      ;;
5823    *)
5824      as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
5825      ;;
5826  esac
5827
5828else
5829  with_openssl=no
5830
5831fi
5832
5833
5834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
5835$as_echo "$with_openssl" >&6; }
5836
5837
5838#
5839# SELinux
5840#
5841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
5842$as_echo_n "checking whether to build with SELinux support... " >&6; }
5843
5844
5845
5846# Check whether --with-selinux was given.
5847if test "${with_selinux+set}" = set; then :
5848  withval=$with_selinux;
5849  case $withval in
5850    yes)
5851      :
5852      ;;
5853    no)
5854      :
5855      ;;
5856    *)
5857      as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
5858      ;;
5859  esac
5860
5861else
5862  with_selinux=no
5863
5864fi
5865
5866
5867
5868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
5869$as_echo "$with_selinux" >&6; }
5870
5871#
5872# Systemd
5873#
5874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
5875$as_echo_n "checking whether to build with systemd support... " >&6; }
5876
5877
5878
5879# Check whether --with-systemd was given.
5880if test "${with_systemd+set}" = set; then :
5881  withval=$with_systemd;
5882  case $withval in
5883    yes)
5884
5885$as_echo "#define USE_SYSTEMD 1" >>confdefs.h
5886
5887      ;;
5888    no)
5889      :
5890      ;;
5891    *)
5892      as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
5893      ;;
5894  esac
5895
5896else
5897  with_systemd=no
5898
5899fi
5900
5901
5902
5903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
5904$as_echo "$with_systemd" >&6; }
5905
5906#
5907# Readline
5908#
5909
5910
5911
5912# Check whether --with-readline was given.
5913if test "${with_readline+set}" = set; then :
5914  withval=$with_readline;
5915  case $withval in
5916    yes)
5917      :
5918      ;;
5919    no)
5920      :
5921      ;;
5922    *)
5923      as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
5924      ;;
5925  esac
5926
5927else
5928  with_readline=yes
5929
5930fi
5931
5932
5933# readline on MinGW has problems with backslashes in psql and other bugs.
5934# This is particularly a problem with non-US code pages.
5935# Therefore disable its use until we understand the cause. 2004-07-20
5936if test "$PORTNAME" = "win32"; then
5937  if test "$with_readline" = yes; then
5938    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
5939$as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
5940    with_readline=no
5941  fi
5942fi
5943
5944
5945#
5946# Prefer libedit
5947#
5948
5949
5950
5951# Check whether --with-libedit-preferred was given.
5952if test "${with_libedit_preferred+set}" = set; then :
5953  withval=$with_libedit_preferred;
5954  case $withval in
5955    yes)
5956      :
5957      ;;
5958    no)
5959      :
5960      ;;
5961    *)
5962      as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
5963      ;;
5964  esac
5965
5966else
5967  with_libedit_preferred=no
5968
5969fi
5970
5971
5972
5973
5974#
5975# UUID library
5976#
5977# There are at least three UUID libraries in common use: the FreeBSD/NetBSD
5978# library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
5979# UUID library.  More than one of these might be present on a given platform,
5980# so we make the user say which one she wants.
5981#
5982
5983
5984
5985# Check whether --with-uuid was given.
5986if test "${with_uuid+set}" = set; then :
5987  withval=$with_uuid;
5988  case $withval in
5989    yes)
5990      as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
5991      ;;
5992    no)
5993      as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
5994      ;;
5995    *)
5996
5997      ;;
5998  esac
5999
6000fi
6001
6002
6003if test x"$with_uuid" = x"" ; then
6004  with_uuid=no
6005fi
6006
6007
6008
6009# Check whether --with-ossp-uuid was given.
6010if test "${with_ossp_uuid+set}" = set; then :
6011  withval=$with_ossp_uuid;
6012  case $withval in
6013    yes)
6014      :
6015      ;;
6016    no)
6017      :
6018      ;;
6019    *)
6020      as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
6021      ;;
6022  esac
6023
6024else
6025  with_ossp_uuid=no
6026
6027fi
6028
6029
6030if test "$with_ossp_uuid" = yes ; then
6031  with_uuid=ossp
6032fi
6033
6034if test "$with_uuid" = bsd ; then
6035
6036$as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
6037
6038  UUID_EXTRA_OBJS="md5.o sha1.o"
6039elif test "$with_uuid" = e2fs ; then
6040
6041$as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
6042
6043  UUID_EXTRA_OBJS="md5.o sha1.o"
6044elif test "$with_uuid" = ossp ; then
6045
6046$as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
6047
6048  UUID_EXTRA_OBJS=""
6049elif test "$with_uuid" = no ; then
6050  UUID_EXTRA_OBJS=""
6051else
6052  as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
6053fi
6054
6055
6056
6057
6058#
6059# XML
6060#
6061
6062
6063
6064# Check whether --with-libxml was given.
6065if test "${with_libxml+set}" = set; then :
6066  withval=$with_libxml;
6067  case $withval in
6068    yes)
6069
6070$as_echo "#define USE_LIBXML 1" >>confdefs.h
6071
6072      ;;
6073    no)
6074      :
6075      ;;
6076    *)
6077      as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
6078      ;;
6079  esac
6080
6081else
6082  with_libxml=no
6083
6084fi
6085
6086
6087
6088if test "$with_libxml" = yes ; then
6089  for ac_prog in xml2-config
6090do
6091  # Extract the first word of "$ac_prog", so it can be a program name with args.
6092set dummy $ac_prog; ac_word=$2
6093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6094$as_echo_n "checking for $ac_word... " >&6; }
6095if ${ac_cv_prog_XML2_CONFIG+:} false; then :
6096  $as_echo_n "(cached) " >&6
6097else
6098  if test -n "$XML2_CONFIG"; then
6099  ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test.
6100else
6101as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6102for as_dir in $PATH
6103do
6104  IFS=$as_save_IFS
6105  test -z "$as_dir" && as_dir=.
6106    for ac_exec_ext in '' $ac_executable_extensions; do
6107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6108    ac_cv_prog_XML2_CONFIG="$ac_prog"
6109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6110    break 2
6111  fi
6112done
6113  done
6114IFS=$as_save_IFS
6115
6116fi
6117fi
6118XML2_CONFIG=$ac_cv_prog_XML2_CONFIG
6119if test -n "$XML2_CONFIG"; then
6120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
6121$as_echo "$XML2_CONFIG" >&6; }
6122else
6123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6124$as_echo "no" >&6; }
6125fi
6126
6127
6128  test -n "$XML2_CONFIG" && break
6129done
6130
6131  if test -n "$XML2_CONFIG"; then
6132    for pgac_option in `$XML2_CONFIG --cflags`; do
6133      case $pgac_option in
6134        -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
6135      esac
6136    done
6137    for pgac_option in `$XML2_CONFIG --libs`; do
6138      case $pgac_option in
6139        -L*) LDFLAGS="$LDFLAGS $pgac_option";;
6140      esac
6141    done
6142  fi
6143fi
6144
6145
6146
6147#
6148# XSLT
6149#
6150
6151
6152
6153# Check whether --with-libxslt was given.
6154if test "${with_libxslt+set}" = set; then :
6155  withval=$with_libxslt;
6156  case $withval in
6157    yes)
6158
6159$as_echo "#define USE_LIBXSLT 1" >>confdefs.h
6160
6161      ;;
6162    no)
6163      :
6164      ;;
6165    *)
6166      as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
6167      ;;
6168  esac
6169
6170else
6171  with_libxslt=no
6172
6173fi
6174
6175
6176
6177
6178
6179
6180#
6181# tzdata
6182#
6183
6184
6185
6186# Check whether --with-system-tzdata was given.
6187if test "${with_system_tzdata+set}" = set; then :
6188  withval=$with_system_tzdata;
6189  case $withval in
6190    yes)
6191      as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
6192      ;;
6193    no)
6194      as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
6195      ;;
6196    *)
6197
6198      ;;
6199  esac
6200
6201fi
6202
6203
6204
6205
6206#
6207# Zlib
6208#
6209
6210
6211
6212# Check whether --with-zlib was given.
6213if test "${with_zlib+set}" = set; then :
6214  withval=$with_zlib;
6215  case $withval in
6216    yes)
6217      :
6218      ;;
6219    no)
6220      :
6221      ;;
6222    *)
6223      as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
6224      ;;
6225  esac
6226
6227else
6228  with_zlib=yes
6229
6230fi
6231
6232
6233
6234
6235#
6236# Elf
6237#
6238
6239# Assume system is ELF if it predefines __ELF__ as 1,
6240# otherwise believe host_os based default.
6241case $host_os in
6242    freebsd1*|freebsd2*) elf=no;;
6243    freebsd3*|freebsd4*) elf=yes;;
6244esac
6245
6246
6247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6248$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6249if ${ac_cv_path_GREP+:} false; then :
6250  $as_echo_n "(cached) " >&6
6251else
6252  if test -z "$GREP"; then
6253  ac_path_GREP_found=false
6254  # Loop through the user's path and test for each of PROGNAME-LIST
6255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6256for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6257do
6258  IFS=$as_save_IFS
6259  test -z "$as_dir" && as_dir=.
6260    for ac_prog in grep ggrep; do
6261    for ac_exec_ext in '' $ac_executable_extensions; do
6262      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6263      as_fn_executable_p "$ac_path_GREP" || continue
6264# Check for GNU ac_path_GREP and select it if it is found.
6265  # Check for GNU $ac_path_GREP
6266case `"$ac_path_GREP" --version 2>&1` in
6267*GNU*)
6268  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6269*)
6270  ac_count=0
6271  $as_echo_n 0123456789 >"conftest.in"
6272  while :
6273  do
6274    cat "conftest.in" "conftest.in" >"conftest.tmp"
6275    mv "conftest.tmp" "conftest.in"
6276    cp "conftest.in" "conftest.nl"
6277    $as_echo 'GREP' >> "conftest.nl"
6278    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6279    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6280    as_fn_arith $ac_count + 1 && ac_count=$as_val
6281    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6282      # Best one so far, save it but keep looking for a better one
6283      ac_cv_path_GREP="$ac_path_GREP"
6284      ac_path_GREP_max=$ac_count
6285    fi
6286    # 10*(2^10) chars as input seems more than enough
6287    test $ac_count -gt 10 && break
6288  done
6289  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6290esac
6291
6292      $ac_path_GREP_found && break 3
6293    done
6294  done
6295  done
6296IFS=$as_save_IFS
6297  if test -z "$ac_cv_path_GREP"; then
6298    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6299  fi
6300else
6301  ac_cv_path_GREP=$GREP
6302fi
6303
6304fi
6305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6306$as_echo "$ac_cv_path_GREP" >&6; }
6307 GREP="$ac_cv_path_GREP"
6308
6309
6310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6311$as_echo_n "checking for egrep... " >&6; }
6312if ${ac_cv_path_EGREP+:} false; then :
6313  $as_echo_n "(cached) " >&6
6314else
6315  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6316   then ac_cv_path_EGREP="$GREP -E"
6317   else
6318     if test -z "$EGREP"; then
6319  ac_path_EGREP_found=false
6320  # Loop through the user's path and test for each of PROGNAME-LIST
6321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6322for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6323do
6324  IFS=$as_save_IFS
6325  test -z "$as_dir" && as_dir=.
6326    for ac_prog in egrep; do
6327    for ac_exec_ext in '' $ac_executable_extensions; do
6328      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6329      as_fn_executable_p "$ac_path_EGREP" || continue
6330# Check for GNU ac_path_EGREP and select it if it is found.
6331  # Check for GNU $ac_path_EGREP
6332case `"$ac_path_EGREP" --version 2>&1` in
6333*GNU*)
6334  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6335*)
6336  ac_count=0
6337  $as_echo_n 0123456789 >"conftest.in"
6338  while :
6339  do
6340    cat "conftest.in" "conftest.in" >"conftest.tmp"
6341    mv "conftest.tmp" "conftest.in"
6342    cp "conftest.in" "conftest.nl"
6343    $as_echo 'EGREP' >> "conftest.nl"
6344    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6345    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6346    as_fn_arith $ac_count + 1 && ac_count=$as_val
6347    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6348      # Best one so far, save it but keep looking for a better one
6349      ac_cv_path_EGREP="$ac_path_EGREP"
6350      ac_path_EGREP_max=$ac_count
6351    fi
6352    # 10*(2^10) chars as input seems more than enough
6353    test $ac_count -gt 10 && break
6354  done
6355  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6356esac
6357
6358      $ac_path_EGREP_found && break 3
6359    done
6360  done
6361  done
6362IFS=$as_save_IFS
6363  if test -z "$ac_cv_path_EGREP"; then
6364    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6365  fi
6366else
6367  ac_cv_path_EGREP=$EGREP
6368fi
6369
6370   fi
6371fi
6372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6373$as_echo "$ac_cv_path_EGREP" >&6; }
6374 EGREP="$ac_cv_path_EGREP"
6375
6376
6377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6378/* end confdefs.h.  */
6379#if __ELF__
6380  yes
6381#endif
6382
6383_ACEOF
6384if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6385  $EGREP "yes" >/dev/null 2>&1; then :
6386  ELF_SYS=true
6387else
6388  if test "X$elf" = "Xyes" ; then
6389  ELF_SYS=true
6390else
6391  ELF_SYS=
6392fi
6393fi
6394rm -f conftest*
6395
6396
6397
6398#
6399# Assignments
6400#
6401
6402CPPFLAGS="$CPPFLAGS $INCLUDES"
6403LDFLAGS="$LDFLAGS $LIBDIRS"
6404
6405
6406
6407
6408
6409# Check whether --with-gnu-ld was given.
6410if test "${with_gnu_ld+set}" = set; then :
6411  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6412else
6413  with_gnu_ld=no
6414fi
6415
6416ac_prog=ld
6417if test "$GCC" = yes; then
6418  # Check if gcc -print-prog-name=ld gives a path.
6419  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
6420$as_echo_n "checking for ld used by GCC... " >&6; }
6421  case $host in
6422  *-*-mingw*)
6423    # gcc leaves a trailing carriage return which upsets mingw
6424    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6425  *)
6426    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6427  esac
6428  case "$ac_prog" in
6429    # Accept absolute paths.
6430    [\\/]* | [A-Za-z]:[\\/]*)
6431      re_direlt='/[^/][^/]*/\.\./'
6432      # Canonicalize the path of ld
6433      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6434      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6435	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6436      done
6437      test -z "$LD" && LD="$ac_prog"
6438      ;;
6439  "")
6440    # If it fails, then pretend we aren't using GCC.
6441    ac_prog=ld
6442    ;;
6443  *)
6444    # If it is relative, then search for the first ld in PATH.
6445    with_gnu_ld=unknown
6446    ;;
6447  esac
6448elif test "$with_gnu_ld" = yes; then
6449  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6450$as_echo_n "checking for GNU ld... " >&6; }
6451else
6452  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6453$as_echo_n "checking for non-GNU ld... " >&6; }
6454fi
6455if ${ac_cv_path_LD+:} false; then :
6456  $as_echo_n "(cached) " >&6
6457else
6458  if test -z "$LD"; then
6459  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6460  for ac_dir in $PATH; do
6461    test -z "$ac_dir" && ac_dir=.
6462    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6463      ac_cv_path_LD="$ac_dir/$ac_prog"
6464      # Check to see if the program is GNU ld.  I'd rather use --version,
6465      # but apparently some GNU ld's only accept -v.
6466      # Break only if it was the GNU/non-GNU ld that we prefer.
6467      if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
6468	test "$with_gnu_ld" != no && break
6469      else
6470	test "$with_gnu_ld" != yes && break
6471      fi
6472    fi
6473  done
6474  IFS="$ac_save_ifs"
6475else
6476  ac_cv_path_LD="$LD" # Let the user override the test with a path.
6477fi
6478fi
6479
6480LD="$ac_cv_path_LD"
6481if test -n "$LD"; then
6482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6483$as_echo "$LD" >&6; }
6484else
6485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6486$as_echo "no" >&6; }
6487fi
6488test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6490$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6491if ${ac_cv_prog_gnu_ld+:} false; then :
6492  $as_echo_n "(cached) " >&6
6493else
6494  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
6495if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
6496  ac_cv_prog_gnu_ld=yes
6497else
6498  ac_cv_prog_gnu_ld=no
6499fi
6500fi
6501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
6502$as_echo "$ac_cv_prog_gnu_ld" >&6; }
6503with_gnu_ld=$ac_cv_prog_gnu_ld
6504
6505
6506
6507
6508case $host_os in sysv5*)
6509  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ld -R works" >&5
6510$as_echo_n "checking whether ld -R works... " >&6; }
6511if ${pgac_cv_prog_ld_R+:} false; then :
6512  $as_echo_n "(cached) " >&6
6513else
6514
6515    pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
6516    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6517/* end confdefs.h.  */
6518
6519int
6520main ()
6521{
6522
6523  ;
6524  return 0;
6525}
6526_ACEOF
6527if ac_fn_c_try_link "$LINENO"; then :
6528  pgac_cv_prog_ld_R=yes
6529else
6530  pgac_cv_prog_ld_R=no
6531fi
6532rm -f core conftest.err conftest.$ac_objext \
6533    conftest$ac_exeext conftest.$ac_ext
6534    LDFLAGS=$pgac_save_LDFLAGS
6535
6536fi
6537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_ld_R" >&5
6538$as_echo "$pgac_cv_prog_ld_R" >&6; }
6539  ld_R_works=$pgac_cv_prog_ld_R
6540
6541esac
6542if test -n "$ac_tool_prefix"; then
6543  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6544set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6546$as_echo_n "checking for $ac_word... " >&6; }
6547if ${ac_cv_prog_RANLIB+:} false; then :
6548  $as_echo_n "(cached) " >&6
6549else
6550  if test -n "$RANLIB"; then
6551  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6552else
6553as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6554for as_dir in $PATH
6555do
6556  IFS=$as_save_IFS
6557  test -z "$as_dir" && as_dir=.
6558    for ac_exec_ext in '' $ac_executable_extensions; do
6559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6560    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6562    break 2
6563  fi
6564done
6565  done
6566IFS=$as_save_IFS
6567
6568fi
6569fi
6570RANLIB=$ac_cv_prog_RANLIB
6571if test -n "$RANLIB"; then
6572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6573$as_echo "$RANLIB" >&6; }
6574else
6575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6576$as_echo "no" >&6; }
6577fi
6578
6579
6580fi
6581if test -z "$ac_cv_prog_RANLIB"; then
6582  ac_ct_RANLIB=$RANLIB
6583  # Extract the first word of "ranlib", so it can be a program name with args.
6584set dummy ranlib; ac_word=$2
6585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6586$as_echo_n "checking for $ac_word... " >&6; }
6587if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6588  $as_echo_n "(cached) " >&6
6589else
6590  if test -n "$ac_ct_RANLIB"; then
6591  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6592else
6593as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6594for as_dir in $PATH
6595do
6596  IFS=$as_save_IFS
6597  test -z "$as_dir" && as_dir=.
6598    for ac_exec_ext in '' $ac_executable_extensions; do
6599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6600    ac_cv_prog_ac_ct_RANLIB="ranlib"
6601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6602    break 2
6603  fi
6604done
6605  done
6606IFS=$as_save_IFS
6607
6608fi
6609fi
6610ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6611if test -n "$ac_ct_RANLIB"; then
6612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6613$as_echo "$ac_ct_RANLIB" >&6; }
6614else
6615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6616$as_echo "no" >&6; }
6617fi
6618
6619  if test "x$ac_ct_RANLIB" = x; then
6620    RANLIB=":"
6621  else
6622    case $cross_compiling:$ac_tool_warned in
6623yes:)
6624{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6625$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6626ac_tool_warned=yes ;;
6627esac
6628    RANLIB=$ac_ct_RANLIB
6629  fi
6630else
6631  RANLIB="$ac_cv_prog_RANLIB"
6632fi
6633
6634
6635  if test -n "$ac_tool_prefix"; then
6636  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6637set dummy ${ac_tool_prefix}strip; ac_word=$2
6638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6639$as_echo_n "checking for $ac_word... " >&6; }
6640if ${ac_cv_prog_STRIP+:} false; then :
6641  $as_echo_n "(cached) " >&6
6642else
6643  if test -n "$STRIP"; then
6644  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6645else
6646as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6647for as_dir in $PATH
6648do
6649  IFS=$as_save_IFS
6650  test -z "$as_dir" && as_dir=.
6651    for ac_exec_ext in '' $ac_executable_extensions; do
6652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6653    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6655    break 2
6656  fi
6657done
6658  done
6659IFS=$as_save_IFS
6660
6661fi
6662fi
6663STRIP=$ac_cv_prog_STRIP
6664if test -n "$STRIP"; then
6665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6666$as_echo "$STRIP" >&6; }
6667else
6668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6669$as_echo "no" >&6; }
6670fi
6671
6672
6673fi
6674if test -z "$ac_cv_prog_STRIP"; then
6675  ac_ct_STRIP=$STRIP
6676  # Extract the first word of "strip", so it can be a program name with args.
6677set dummy strip; ac_word=$2
6678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6679$as_echo_n "checking for $ac_word... " >&6; }
6680if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6681  $as_echo_n "(cached) " >&6
6682else
6683  if test -n "$ac_ct_STRIP"; then
6684  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6685else
6686as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6687for as_dir in $PATH
6688do
6689  IFS=$as_save_IFS
6690  test -z "$as_dir" && as_dir=.
6691    for ac_exec_ext in '' $ac_executable_extensions; do
6692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6693    ac_cv_prog_ac_ct_STRIP="strip"
6694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6695    break 2
6696  fi
6697done
6698  done
6699IFS=$as_save_IFS
6700
6701fi
6702fi
6703ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6704if test -n "$ac_ct_STRIP"; then
6705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6706$as_echo "$ac_ct_STRIP" >&6; }
6707else
6708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6709$as_echo "no" >&6; }
6710fi
6711
6712  if test "x$ac_ct_STRIP" = x; then
6713    STRIP=":"
6714  else
6715    case $cross_compiling:$ac_tool_warned in
6716yes:)
6717{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6718$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6719ac_tool_warned=yes ;;
6720esac
6721    STRIP=$ac_ct_STRIP
6722  fi
6723else
6724  STRIP="$ac_cv_prog_STRIP"
6725fi
6726
6727
6728  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
6729$as_echo_n "checking whether it is possible to strip libraries... " >&6; }
6730  if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
6731    STRIP_STATIC_LIB="$STRIP -x"
6732    STRIP_SHARED_LIB="$STRIP --strip-unneeded"
6733    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6734$as_echo "yes" >&6; }
6735  else
6736    case $host_os in
6737      darwin*)
6738        STRIP="$STRIP -x"
6739        STRIP_STATIC_LIB=$STRIP
6740        STRIP_SHARED_LIB=$STRIP
6741        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6742$as_echo "yes" >&6; }
6743        ;;
6744      *)
6745        STRIP_STATIC_LIB=:
6746        STRIP_SHARED_LIB=:
6747        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6748$as_echo "no" >&6; }
6749        ;;
6750    esac
6751  fi
6752
6753
6754
6755if test -n "$ac_tool_prefix"; then
6756  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6757set dummy ${ac_tool_prefix}ar; ac_word=$2
6758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6759$as_echo_n "checking for $ac_word... " >&6; }
6760if ${ac_cv_prog_AR+:} false; then :
6761  $as_echo_n "(cached) " >&6
6762else
6763  if test -n "$AR"; then
6764  ac_cv_prog_AR="$AR" # Let the user override the test.
6765else
6766as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6767for as_dir in $PATH
6768do
6769  IFS=$as_save_IFS
6770  test -z "$as_dir" && as_dir=.
6771    for ac_exec_ext in '' $ac_executable_extensions; do
6772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6773    ac_cv_prog_AR="${ac_tool_prefix}ar"
6774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6775    break 2
6776  fi
6777done
6778  done
6779IFS=$as_save_IFS
6780
6781fi
6782fi
6783AR=$ac_cv_prog_AR
6784if test -n "$AR"; then
6785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6786$as_echo "$AR" >&6; }
6787else
6788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6789$as_echo "no" >&6; }
6790fi
6791
6792
6793fi
6794if test -z "$ac_cv_prog_AR"; then
6795  ac_ct_AR=$AR
6796  # Extract the first word of "ar", so it can be a program name with args.
6797set dummy ar; ac_word=$2
6798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6799$as_echo_n "checking for $ac_word... " >&6; }
6800if ${ac_cv_prog_ac_ct_AR+:} false; then :
6801  $as_echo_n "(cached) " >&6
6802else
6803  if test -n "$ac_ct_AR"; then
6804  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6805else
6806as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6807for as_dir in $PATH
6808do
6809  IFS=$as_save_IFS
6810  test -z "$as_dir" && as_dir=.
6811    for ac_exec_ext in '' $ac_executable_extensions; do
6812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6813    ac_cv_prog_ac_ct_AR="ar"
6814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6815    break 2
6816  fi
6817done
6818  done
6819IFS=$as_save_IFS
6820
6821fi
6822fi
6823ac_ct_AR=$ac_cv_prog_ac_ct_AR
6824if test -n "$ac_ct_AR"; then
6825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6826$as_echo "$ac_ct_AR" >&6; }
6827else
6828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6829$as_echo "no" >&6; }
6830fi
6831
6832  if test "x$ac_ct_AR" = x; then
6833    AR="ar"
6834  else
6835    case $cross_compiling:$ac_tool_warned in
6836yes:)
6837{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6838$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6839ac_tool_warned=yes ;;
6840esac
6841    AR=$ac_ct_AR
6842  fi
6843else
6844  AR="$ac_cv_prog_AR"
6845fi
6846
6847if test "$PORTNAME" = "win32"; then
6848  if test -n "$ac_tool_prefix"; then
6849  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6850set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6852$as_echo_n "checking for $ac_word... " >&6; }
6853if ${ac_cv_prog_DLLTOOL+:} false; then :
6854  $as_echo_n "(cached) " >&6
6855else
6856  if test -n "$DLLTOOL"; then
6857  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6858else
6859as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6860for as_dir in $PATH
6861do
6862  IFS=$as_save_IFS
6863  test -z "$as_dir" && as_dir=.
6864    for ac_exec_ext in '' $ac_executable_extensions; do
6865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6866    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6868    break 2
6869  fi
6870done
6871  done
6872IFS=$as_save_IFS
6873
6874fi
6875fi
6876DLLTOOL=$ac_cv_prog_DLLTOOL
6877if test -n "$DLLTOOL"; then
6878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6879$as_echo "$DLLTOOL" >&6; }
6880else
6881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6882$as_echo "no" >&6; }
6883fi
6884
6885
6886fi
6887if test -z "$ac_cv_prog_DLLTOOL"; then
6888  ac_ct_DLLTOOL=$DLLTOOL
6889  # Extract the first word of "dlltool", so it can be a program name with args.
6890set dummy dlltool; ac_word=$2
6891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6892$as_echo_n "checking for $ac_word... " >&6; }
6893if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
6894  $as_echo_n "(cached) " >&6
6895else
6896  if test -n "$ac_ct_DLLTOOL"; then
6897  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6898else
6899as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6900for as_dir in $PATH
6901do
6902  IFS=$as_save_IFS
6903  test -z "$as_dir" && as_dir=.
6904    for ac_exec_ext in '' $ac_executable_extensions; do
6905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6906    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6908    break 2
6909  fi
6910done
6911  done
6912IFS=$as_save_IFS
6913
6914fi
6915fi
6916ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6917if test -n "$ac_ct_DLLTOOL"; then
6918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6919$as_echo "$ac_ct_DLLTOOL" >&6; }
6920else
6921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6922$as_echo "no" >&6; }
6923fi
6924
6925  if test "x$ac_ct_DLLTOOL" = x; then
6926    DLLTOOL="dlltool"
6927  else
6928    case $cross_compiling:$ac_tool_warned in
6929yes:)
6930{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6931$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6932ac_tool_warned=yes ;;
6933esac
6934    DLLTOOL=$ac_ct_DLLTOOL
6935  fi
6936else
6937  DLLTOOL="$ac_cv_prog_DLLTOOL"
6938fi
6939
6940  if test -n "$ac_tool_prefix"; then
6941  # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
6942set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
6943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6944$as_echo_n "checking for $ac_word... " >&6; }
6945if ${ac_cv_prog_DLLWRAP+:} false; then :
6946  $as_echo_n "(cached) " >&6
6947else
6948  if test -n "$DLLWRAP"; then
6949  ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
6950else
6951as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6952for as_dir in $PATH
6953do
6954  IFS=$as_save_IFS
6955  test -z "$as_dir" && as_dir=.
6956    for ac_exec_ext in '' $ac_executable_extensions; do
6957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6958    ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
6959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6960    break 2
6961  fi
6962done
6963  done
6964IFS=$as_save_IFS
6965
6966fi
6967fi
6968DLLWRAP=$ac_cv_prog_DLLWRAP
6969if test -n "$DLLWRAP"; then
6970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
6971$as_echo "$DLLWRAP" >&6; }
6972else
6973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6974$as_echo "no" >&6; }
6975fi
6976
6977
6978fi
6979if test -z "$ac_cv_prog_DLLWRAP"; then
6980  ac_ct_DLLWRAP=$DLLWRAP
6981  # Extract the first word of "dllwrap", so it can be a program name with args.
6982set dummy dllwrap; ac_word=$2
6983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6984$as_echo_n "checking for $ac_word... " >&6; }
6985if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
6986  $as_echo_n "(cached) " >&6
6987else
6988  if test -n "$ac_ct_DLLWRAP"; then
6989  ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
6990else
6991as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6992for as_dir in $PATH
6993do
6994  IFS=$as_save_IFS
6995  test -z "$as_dir" && as_dir=.
6996    for ac_exec_ext in '' $ac_executable_extensions; do
6997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6998    ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
6999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7000    break 2
7001  fi
7002done
7003  done
7004IFS=$as_save_IFS
7005
7006fi
7007fi
7008ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
7009if test -n "$ac_ct_DLLWRAP"; then
7010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
7011$as_echo "$ac_ct_DLLWRAP" >&6; }
7012else
7013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7014$as_echo "no" >&6; }
7015fi
7016
7017  if test "x$ac_ct_DLLWRAP" = x; then
7018    DLLWRAP="dllwrap"
7019  else
7020    case $cross_compiling:$ac_tool_warned in
7021yes:)
7022{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7023$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7024ac_tool_warned=yes ;;
7025esac
7026    DLLWRAP=$ac_ct_DLLWRAP
7027  fi
7028else
7029  DLLWRAP="$ac_cv_prog_DLLWRAP"
7030fi
7031
7032  if test -n "$ac_tool_prefix"; then
7033  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7034set dummy ${ac_tool_prefix}windres; ac_word=$2
7035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7036$as_echo_n "checking for $ac_word... " >&6; }
7037if ${ac_cv_prog_WINDRES+:} false; then :
7038  $as_echo_n "(cached) " >&6
7039else
7040  if test -n "$WINDRES"; then
7041  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7042else
7043as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7044for as_dir in $PATH
7045do
7046  IFS=$as_save_IFS
7047  test -z "$as_dir" && as_dir=.
7048    for ac_exec_ext in '' $ac_executable_extensions; do
7049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7050    ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
7051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7052    break 2
7053  fi
7054done
7055  done
7056IFS=$as_save_IFS
7057
7058fi
7059fi
7060WINDRES=$ac_cv_prog_WINDRES
7061if test -n "$WINDRES"; then
7062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7063$as_echo "$WINDRES" >&6; }
7064else
7065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7066$as_echo "no" >&6; }
7067fi
7068
7069
7070fi
7071if test -z "$ac_cv_prog_WINDRES"; then
7072  ac_ct_WINDRES=$WINDRES
7073  # Extract the first word of "windres", so it can be a program name with args.
7074set dummy windres; ac_word=$2
7075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7076$as_echo_n "checking for $ac_word... " >&6; }
7077if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
7078  $as_echo_n "(cached) " >&6
7079else
7080  if test -n "$ac_ct_WINDRES"; then
7081  ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7082else
7083as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7084for as_dir in $PATH
7085do
7086  IFS=$as_save_IFS
7087  test -z "$as_dir" && as_dir=.
7088    for ac_exec_ext in '' $ac_executable_extensions; do
7089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7090    ac_cv_prog_ac_ct_WINDRES="windres"
7091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7092    break 2
7093  fi
7094done
7095  done
7096IFS=$as_save_IFS
7097
7098fi
7099fi
7100ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7101if test -n "$ac_ct_WINDRES"; then
7102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7103$as_echo "$ac_ct_WINDRES" >&6; }
7104else
7105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7106$as_echo "no" >&6; }
7107fi
7108
7109  if test "x$ac_ct_WINDRES" = x; then
7110    WINDRES="windres"
7111  else
7112    case $cross_compiling:$ac_tool_warned in
7113yes:)
7114{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7115$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7116ac_tool_warned=yes ;;
7117esac
7118    WINDRES=$ac_ct_WINDRES
7119  fi
7120else
7121  WINDRES="$ac_cv_prog_WINDRES"
7122fi
7123
7124fi
7125
7126# Find a good install program.  We prefer a C program (faster),
7127# so one script is as good as another.  But avoid the broken or
7128# incompatible versions:
7129# SysV /etc/install, /usr/sbin/install
7130# SunOS /usr/etc/install
7131# IRIX /sbin/install
7132# AIX /bin/install
7133# AmigaOS /C/install, which installs bootblocks on floppy discs
7134# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7135# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7136# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7137# OS/2's system install, which has a completely different semantic
7138# ./install, which can be erroneously created by make from ./install.sh.
7139# Reject install programs that cannot install multiple files.
7140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7141$as_echo_n "checking for a BSD-compatible install... " >&6; }
7142if test -z "$INSTALL"; then
7143if ${ac_cv_path_install+:} false; then :
7144  $as_echo_n "(cached) " >&6
7145else
7146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7147for as_dir in $PATH
7148do
7149  IFS=$as_save_IFS
7150  test -z "$as_dir" && as_dir=.
7151    # Account for people who put trailing slashes in PATH elements.
7152case $as_dir/ in #((
7153  ./ | .// | /[cC]/* | \
7154  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7155  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7156  /usr/ucb/* ) ;;
7157  *)
7158    # OSF1 and SCO ODT 3.0 have their own names for install.
7159    # Don't use installbsd from OSF since it installs stuff as root
7160    # by default.
7161    for ac_prog in ginstall scoinst install; do
7162      for ac_exec_ext in '' $ac_executable_extensions; do
7163	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
7164	  if test $ac_prog = install &&
7165	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7166	    # AIX install.  It has an incompatible calling convention.
7167	    :
7168	  elif test $ac_prog = install &&
7169	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7170	    # program-specific install script used by HP pwplus--don't use.
7171	    :
7172	  else
7173	    rm -rf conftest.one conftest.two conftest.dir
7174	    echo one > conftest.one
7175	    echo two > conftest.two
7176	    mkdir conftest.dir
7177	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7178	      test -s conftest.one && test -s conftest.two &&
7179	      test -s conftest.dir/conftest.one &&
7180	      test -s conftest.dir/conftest.two
7181	    then
7182	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7183	      break 3
7184	    fi
7185	  fi
7186	fi
7187      done
7188    done
7189    ;;
7190esac
7191
7192  done
7193IFS=$as_save_IFS
7194
7195rm -rf conftest.one conftest.two conftest.dir
7196
7197fi
7198  if test "${ac_cv_path_install+set}" = set; then
7199    INSTALL=$ac_cv_path_install
7200  else
7201    # As a last resort, use the slow shell script.  Don't cache a
7202    # value for INSTALL within a source directory, because that will
7203    # break other packages using the cache if that directory is
7204    # removed, or if the value is a relative name.
7205    INSTALL=$ac_install_sh
7206  fi
7207fi
7208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7209$as_echo "$INSTALL" >&6; }
7210
7211# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7212# It thinks the first close brace ends the variable substitution.
7213test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7214
7215test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7216
7217test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7218
7219# When Autoconf chooses install-sh as install program it tries to generate
7220# a relative path to it in each makefile where it substitutes it. This clashes
7221# with our Makefile.global concept. This workaround helps.
7222case $INSTALL in
7223  *install-sh*) install_bin='';;
7224  *) install_bin=$INSTALL;;
7225esac
7226
7227
7228# Extract the first word of "tar", so it can be a program name with args.
7229set dummy tar; ac_word=$2
7230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7231$as_echo_n "checking for $ac_word... " >&6; }
7232if ${ac_cv_path_TAR+:} false; then :
7233  $as_echo_n "(cached) " >&6
7234else
7235  case $TAR in
7236  [\\/]* | ?:[\\/]*)
7237  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
7238  ;;
7239  *)
7240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7241for as_dir in $PATH
7242do
7243  IFS=$as_save_IFS
7244  test -z "$as_dir" && as_dir=.
7245    for ac_exec_ext in '' $ac_executable_extensions; do
7246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7247    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
7248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7249    break 2
7250  fi
7251done
7252  done
7253IFS=$as_save_IFS
7254
7255  ;;
7256esac
7257fi
7258TAR=$ac_cv_path_TAR
7259if test -n "$TAR"; then
7260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
7261$as_echo "$TAR" >&6; }
7262else
7263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7264$as_echo "no" >&6; }
7265fi
7266
7267
7268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7269$as_echo_n "checking whether ln -s works... " >&6; }
7270LN_S=$as_ln_s
7271if test "$LN_S" = "ln -s"; then
7272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7273$as_echo "yes" >&6; }
7274else
7275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7276$as_echo "no, using $LN_S" >&6; }
7277fi
7278
7279for ac_prog in gawk mawk nawk awk
7280do
7281  # Extract the first word of "$ac_prog", so it can be a program name with args.
7282set dummy $ac_prog; ac_word=$2
7283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7284$as_echo_n "checking for $ac_word... " >&6; }
7285if ${ac_cv_prog_AWK+:} false; then :
7286  $as_echo_n "(cached) " >&6
7287else
7288  if test -n "$AWK"; then
7289  ac_cv_prog_AWK="$AWK" # Let the user override the test.
7290else
7291as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7292for as_dir in $PATH
7293do
7294  IFS=$as_save_IFS
7295  test -z "$as_dir" && as_dir=.
7296    for ac_exec_ext in '' $ac_executable_extensions; do
7297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7298    ac_cv_prog_AWK="$ac_prog"
7299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7300    break 2
7301  fi
7302done
7303  done
7304IFS=$as_save_IFS
7305
7306fi
7307fi
7308AWK=$ac_cv_prog_AWK
7309if test -n "$AWK"; then
7310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7311$as_echo "$AWK" >&6; }
7312else
7313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7314$as_echo "no" >&6; }
7315fi
7316
7317
7318  test -n "$AWK" && break
7319done
7320
7321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7322$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7323if test -z "$MKDIR_P"; then
7324  if ${ac_cv_path_mkdir+:} false; then :
7325  $as_echo_n "(cached) " >&6
7326else
7327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7328for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7329do
7330  IFS=$as_save_IFS
7331  test -z "$as_dir" && as_dir=.
7332    for ac_prog in mkdir gmkdir; do
7333	 for ac_exec_ext in '' $ac_executable_extensions; do
7334	   as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
7335	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7336	     'mkdir (GNU coreutils) '* | \
7337	     'mkdir (coreutils) '* | \
7338	     'mkdir (fileutils) '4.1*)
7339	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7340	       break 3;;
7341	   esac
7342	 done
7343       done
7344  done
7345IFS=$as_save_IFS
7346
7347fi
7348
7349  test -d ./--version && rmdir ./--version
7350  if test "${ac_cv_path_mkdir+set}" = set; then
7351    MKDIR_P="$ac_cv_path_mkdir -p"
7352  else
7353    # As a last resort, use the slow shell script.  Don't cache a
7354    # value for MKDIR_P within a source directory, because that will
7355    # break other packages using the cache if that directory is
7356    # removed, or if the value is a relative name.
7357    MKDIR_P="$ac_install_sh -d"
7358  fi
7359fi
7360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7361$as_echo "$MKDIR_P" >&6; }
7362
7363# When Autoconf chooses install-sh as mkdir -p program it tries to generate
7364# a relative path to it in each makefile where it substitutes it. This clashes
7365# with our Makefile.global concept. This workaround helps.
7366case $MKDIR_P in
7367  *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
7368esac
7369
7370# Let the user override the search
7371if test -z "$BISON"; then
7372  for ac_prog in bison
7373do
7374  # Extract the first word of "$ac_prog", so it can be a program name with args.
7375set dummy $ac_prog; ac_word=$2
7376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7377$as_echo_n "checking for $ac_word... " >&6; }
7378if ${ac_cv_path_BISON+:} false; then :
7379  $as_echo_n "(cached) " >&6
7380else
7381  case $BISON in
7382  [\\/]* | ?:[\\/]*)
7383  ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
7384  ;;
7385  *)
7386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7387for as_dir in $PATH
7388do
7389  IFS=$as_save_IFS
7390  test -z "$as_dir" && as_dir=.
7391    for ac_exec_ext in '' $ac_executable_extensions; do
7392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7393    ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
7394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7395    break 2
7396  fi
7397done
7398  done
7399IFS=$as_save_IFS
7400
7401  ;;
7402esac
7403fi
7404BISON=$ac_cv_path_BISON
7405if test -n "$BISON"; then
7406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
7407$as_echo "$BISON" >&6; }
7408else
7409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7410$as_echo "no" >&6; }
7411fi
7412
7413
7414  test -n "$BISON" && break
7415done
7416
7417fi
7418
7419if test "$BISON"; then
7420  pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
7421  { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
7422$as_echo "$as_me: using $pgac_bison_version" >&6;}
7423  if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
7424  then
7425    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7426*** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7427*** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
7428$as_echo "$as_me: WARNING:
7429*** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7430*** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
7431    BISON=""
7432  fi
7433  # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
7434  # of the now preferred %name-prefix "base_yy", but the latter
7435  # doesn't work with Bison 2.3 or less.  So for now we silence the
7436  # deprecation warnings.
7437  if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
7438  then
7439    BISONFLAGS="$BISONFLAGS -Wno-deprecated"
7440  fi
7441fi
7442
7443if test -z "$BISON"; then
7444  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7445*** Without Bison you will not be able to build PostgreSQL from Git nor
7446*** change any of the parser definition files.  You can obtain Bison from
7447*** a GNU mirror site.  (If you are using the official distribution of
7448*** PostgreSQL then you do not need to worry about this, because the Bison
7449*** output is pre-generated.)" >&5
7450$as_echo "$as_me: WARNING:
7451*** Without Bison you will not be able to build PostgreSQL from Git nor
7452*** change any of the parser definition files.  You can obtain Bison from
7453*** a GNU mirror site.  (If you are using the official distribution of
7454*** PostgreSQL then you do not need to worry about this, because the Bison
7455*** output is pre-generated.)" >&2;}
7456fi
7457# We don't need AC_SUBST(BISON) because AC_PATH_PROG did it
7458
7459
7460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
7461$as_echo_n "checking for flex... " >&6; }
7462if ${pgac_cv_path_flex+:} false; then :
7463  $as_echo_n "(cached) " >&6
7464else
7465  # Let the user override the test
7466if test -n "$FLEX"; then
7467  pgac_cv_path_flex=$FLEX
7468else
7469  pgac_save_IFS=$IFS
7470  IFS=$PATH_SEPARATOR
7471  for pgac_dir in $PATH; do
7472    IFS=$pgac_save_IFS
7473    if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
7474      pgac_dir=`pwd`
7475    fi
7476    for pgac_prog in flex lex; do
7477      pgac_candidate="$pgac_dir/$pgac_prog"
7478      if test -f "$pgac_candidate" \
7479        && $pgac_candidate --version </dev/null >/dev/null 2>&1
7480      then
7481        echo '%%'  > conftest.l
7482        if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
7483          pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
7484          if echo "$pgac_flex_version" | sed 's/[.a-z]/ /g' | $AWK '{ if ($1 == 2 && ($2 > 5 || ($2 == 5 && $3 >= 31))) exit 0; else exit 1;}'
7485          then
7486            pgac_cv_path_flex=$pgac_candidate
7487            break 2
7488          else
7489            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7490*** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7491*** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
7492$as_echo "$as_me: WARNING:
7493*** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7494*** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
7495          fi
7496        fi
7497      fi
7498    done
7499  done
7500  rm -f conftest.l lex.yy.c
7501  : ${pgac_cv_path_flex=no}
7502fi
7503
7504fi
7505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
7506$as_echo "$pgac_cv_path_flex" >&6; }
7507if test x"$pgac_cv_path_flex" = x"no"; then
7508  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7509*** Without Flex you will not be able to build PostgreSQL from Git nor
7510*** change any of the scanner definition files.  You can obtain Flex from
7511*** a GNU mirror site.  (If you are using the official distribution of
7512*** PostgreSQL then you do not need to worry about this because the Flex
7513*** output is pre-generated.)" >&5
7514$as_echo "$as_me: WARNING:
7515*** Without Flex you will not be able to build PostgreSQL from Git nor
7516*** change any of the scanner definition files.  You can obtain Flex from
7517*** a GNU mirror site.  (If you are using the official distribution of
7518*** PostgreSQL then you do not need to worry about this because the Flex
7519*** output is pre-generated.)" >&2;}
7520
7521  FLEX=
7522else
7523  FLEX=$pgac_cv_path_flex
7524  pgac_flex_version=`$FLEX --version 2>/dev/null`
7525  { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
7526$as_echo "$as_me: using $pgac_flex_version" >&6;}
7527fi
7528
7529
7530
7531
7532
7533# Let the user override the search
7534if test -z "$PERL"; then
7535  # Extract the first word of "perl", so it can be a program name with args.
7536set dummy perl; ac_word=$2
7537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7538$as_echo_n "checking for $ac_word... " >&6; }
7539if ${ac_cv_path_PERL+:} false; then :
7540  $as_echo_n "(cached) " >&6
7541else
7542  case $PERL in
7543  [\\/]* | ?:[\\/]*)
7544  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
7545  ;;
7546  *)
7547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7548for as_dir in $PATH
7549do
7550  IFS=$as_save_IFS
7551  test -z "$as_dir" && as_dir=.
7552    for ac_exec_ext in '' $ac_executable_extensions; do
7553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7554    ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
7555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7556    break 2
7557  fi
7558done
7559  done
7560IFS=$as_save_IFS
7561
7562  ;;
7563esac
7564fi
7565PERL=$ac_cv_path_PERL
7566if test -n "$PERL"; then
7567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
7568$as_echo "$PERL" >&6; }
7569else
7570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7571$as_echo "no" >&6; }
7572fi
7573
7574
7575fi
7576
7577if test "$PERL"; then
7578  pgac_perl_version=`$PERL -v 2>/dev/null | sed -n 's/This is perl.*v[a-z ]*\([0-9]\.[0-9][0-9.]*\).*$/\1/p'`
7579  { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
7580$as_echo "$as_me: using perl $pgac_perl_version" >&6;}
7581  if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
7582    $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
7583  then
7584    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7585*** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7586*** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
7587$as_echo "$as_me: WARNING:
7588*** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7589*** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
7590    PERL=""
7591  fi
7592fi
7593
7594if test -z "$PERL"; then
7595  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7596*** Without Perl you will not be able to build PostgreSQL from Git.
7597*** You can obtain Perl from any CPAN mirror site.
7598*** (If you are using the official distribution of PostgreSQL then you do not
7599*** need to worry about this, because the Perl output is pre-generated.)" >&5
7600$as_echo "$as_me: WARNING:
7601*** Without Perl you will not be able to build PostgreSQL from Git.
7602*** You can obtain Perl from any CPAN mirror site.
7603*** (If you are using the official distribution of PostgreSQL then you do not
7604*** need to worry about this, because the Perl output is pre-generated.)" >&2;}
7605fi
7606
7607if test "$with_perl" = yes; then
7608  if test -z "$PERL"; then
7609    as_fn_error $? "Perl not found" "$LINENO" 5
7610  fi
7611
7612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
7613$as_echo_n "checking for Perl archlibexp... " >&6; }
7614perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
7615test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
7616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
7617$as_echo "$perl_archlibexp" >&6; }
7618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
7619$as_echo_n "checking for Perl privlibexp... " >&6; }
7620perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
7621test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
7622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
7623$as_echo "$perl_privlibexp" >&6; }
7624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
7625$as_echo_n "checking for Perl useshrplib... " >&6; }
7626perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
7627test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
7628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
7629$as_echo "$perl_useshrplib" >&6; }
7630  if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
7631    as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
7632You might have to rebuild your Perl installation.  Refer to the
7633documentation for details.  Use --without-perl to disable building
7634PL/Perl." "$LINENO" 5
7635  fi
7636  # On most platforms, archlibexp is also where the Perl include files live ...
7637  perl_includespec="-I$perl_archlibexp/CORE"
7638  # ... but on newer macOS versions, we must use -iwithsysroot to look
7639  # under $PG_SYSROOT
7640  if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
7641    if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
7642      perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
7643    fi
7644  fi
7645
7646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
7647$as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
7648perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
7649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
7650$as_echo "$perl_ccflags" >&6; }
7651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
7652$as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
7653perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
7654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
7655$as_echo "$perl_embed_ccflags" >&6; }
7656
7657
7658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
7659$as_echo_n "checking for flags to link embedded Perl... " >&6; }
7660if test "$PORTNAME" = "win32" ; then
7661	perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
7662	if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
7663		perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
7664	else
7665		perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
7666		if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
7667			perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
7668		fi
7669	fi
7670else
7671	pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
7672	pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
7673	perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
7674fi
7675if test -z "$perl_embed_ldflags" ; then
7676	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7677$as_echo "no" >&6; }
7678	as_fn_error $? "could not determine flags for linking embedded Perl.
7679This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
7680installed." "$LINENO" 5
7681else
7682	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
7683$as_echo "$perl_embed_ldflags" >&6; }
7684fi
7685
7686fi
7687
7688if test "$with_python" = yes; then
7689  for ac_prog in python python3 python2
7690do
7691  # Extract the first word of "$ac_prog", so it can be a program name with args.
7692set dummy $ac_prog; ac_word=$2
7693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7694$as_echo_n "checking for $ac_word... " >&6; }
7695if ${ac_cv_path_PYTHON+:} false; then :
7696  $as_echo_n "(cached) " >&6
7697else
7698  case $PYTHON in
7699  [\\/]* | ?:[\\/]*)
7700  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
7701  ;;
7702  *)
7703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7704for as_dir in $PATH
7705do
7706  IFS=$as_save_IFS
7707  test -z "$as_dir" && as_dir=.
7708    for ac_exec_ext in '' $ac_executable_extensions; do
7709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7710    ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
7711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7712    break 2
7713  fi
7714done
7715  done
7716IFS=$as_save_IFS
7717
7718  ;;
7719esac
7720fi
7721PYTHON=$ac_cv_path_PYTHON
7722if test -n "$PYTHON"; then
7723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
7724$as_echo "$PYTHON" >&6; }
7725else
7726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7727$as_echo "no" >&6; }
7728fi
7729
7730
7731  test -n "$PYTHON" && break
7732done
7733
7734if test x"$PYTHON" = x""; then
7735  as_fn_error $? "Python not found" "$LINENO" 5
7736fi
7737
7738
7739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
7740$as_echo_n "checking for Python distutils module... " >&6; }
7741if "${PYTHON}" -c 'import distutils' 2>&5
7742then
7743    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7744$as_echo "yes" >&6; }
7745else
7746    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7747$as_echo "no" >&6; }
7748    as_fn_error $? "distutils module not found" "$LINENO" 5
7749fi
7750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
7751$as_echo_n "checking Python configuration directory... " >&6; }
7752python_majorversion=`${PYTHON} -c "import sys; print(sys.version[0])"`
7753python_version=`${PYTHON} -c "import sys; print(sys.version[:3])"`
7754python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
7755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
7756$as_echo "$python_configdir" >&6; }
7757
7758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
7759$as_echo_n "checking Python include directories... " >&6; }
7760python_includespec=`${PYTHON} -c "
7761import distutils.sysconfig
7762a = '-I' + distutils.sysconfig.get_python_inc(False)
7763b = '-I' + distutils.sysconfig.get_python_inc(True)
7764if a == b:
7765    print(a)
7766else:
7767    print(a + ' ' + b)"`
7768if test "$PORTNAME" = win32 ; then
7769    python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
7770fi
7771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
7772$as_echo "$python_includespec" >&6; }
7773
7774
7775
7776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
7777$as_echo_n "checking how to link an embedded Python application... " >&6; }
7778
7779python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
7780python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
7781python_so=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('SO'))))"`
7782ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"`
7783python_enable_shared=`${PYTHON} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_vars().get('Py_ENABLE_SHARED',0))"`
7784
7785if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}"
7786then
7787	# New way: use the official shared library
7788	ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
7789	python_libspec="-L${python_libdir} -l${ldlibrary}"
7790else
7791	# Old way: use libpython from python_configdir
7792	python_libdir="${python_configdir}"
7793	# LDVERSION was introduced in Python 3.2.
7794	python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
7795	if test x"${python_ldversion}" = x""; then
7796		python_ldversion=$python_version
7797	fi
7798	python_libspec="-L${python_libdir} -lpython${python_ldversion}"
7799fi
7800
7801python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
7802
7803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
7804$as_echo "${python_libspec} ${python_additional_libs}" >&6; }
7805
7806
7807
7808
7809  # We need libpython as a shared library.  With Python >=2.5, we
7810  # check the Py_ENABLE_SHARED setting.  On Debian, the setting is not
7811  # correct before the jessie release (http://bugs.debian.org/695979).
7812  # We also want to support older Python versions.  So as a fallback
7813  # we see if there is a file that is named like a shared library.
7814
7815  if test "$python_enable_shared" != 1; then
7816    if test "$PORTNAME" = darwin; then
7817      # OS X does supply a .dylib even though Py_ENABLE_SHARED does
7818      # not get set.  The file detection logic below doesn't succeed
7819      # on older OS X versions, so make it explicit.
7820      python_enable_shared=1
7821    elif test "$PORTNAME" = win32; then
7822      # Windows also needs an explicit override.
7823      python_enable_shared=1
7824    else
7825      # We don't know the platform shared library extension here yet,
7826      # so we try some candidates.
7827      for dlsuffix in .so .sl; do
7828        if ls "$python_libdir"/libpython*${dlsuffix}* >/dev/null 2>&1; then
7829          python_enable_shared=1
7830          break
7831        fi
7832      done
7833    fi
7834  fi
7835
7836  if test "$python_enable_shared" != 1; then
7837    as_fn_error $? "cannot build PL/Python because libpython is not a shared library
7838You might have to rebuild your Python installation.  Refer to the
7839documentation for details.  Use --without-python to disable building
7840PL/Python." "$LINENO" 5
7841  fi
7842fi
7843
7844if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
7845  # Extract the first word of "zic", so it can be a program name with args.
7846set dummy zic; ac_word=$2
7847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7848$as_echo_n "checking for $ac_word... " >&6; }
7849if ${ac_cv_path_ZIC+:} false; then :
7850  $as_echo_n "(cached) " >&6
7851else
7852  case $ZIC in
7853  [\\/]* | ?:[\\/]*)
7854  ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
7855  ;;
7856  *)
7857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7858for as_dir in $PATH
7859do
7860  IFS=$as_save_IFS
7861  test -z "$as_dir" && as_dir=.
7862    for ac_exec_ext in '' $ac_executable_extensions; do
7863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7864    ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
7865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7866    break 2
7867  fi
7868done
7869  done
7870IFS=$as_save_IFS
7871
7872  ;;
7873esac
7874fi
7875ZIC=$ac_cv_path_ZIC
7876if test -n "$ZIC"; then
7877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
7878$as_echo "$ZIC" >&6; }
7879else
7880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7881$as_echo "no" >&6; }
7882fi
7883
7884
7885  if test -z "$ZIC"; then
7886    as_fn_error $? "
7887When cross-compiling, either use the option --with-system-tzdata to use
7888existing time-zone data, or set the environment variable ZIC to a zic
7889program to use during the build." "$LINENO" 5
7890  fi
7891fi
7892
7893#
7894# Pthreads
7895#
7896# For each platform, we need to know about any special compile and link
7897# libraries, and whether the normal C function names are thread-safe.
7898# See the comment at the top of src/port/thread.c for more information.
7899# WIN32 doesn't need the pthread tests;  it always uses threads
7900#
7901# These tests are run before the library-tests, because linking with the
7902# other libraries can pull in the pthread functions as a side-effect.  We
7903# want to use the -pthread or similar flags directly, and not rely on
7904# the side-effects of linking with some other library.
7905#
7906# note: We have to use AS_IF here rather than plain if. The AC_CHECK_HEADER
7907# invocation below is the first one in the script, and autoconf generates
7908# additional code for that, which must not be inside the if-block. AS_IF
7909# knows how to do that.
7910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7911$as_echo_n "checking for ANSI C header files... " >&6; }
7912if ${ac_cv_header_stdc+:} false; then :
7913  $as_echo_n "(cached) " >&6
7914else
7915  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7916/* end confdefs.h.  */
7917#include <stdlib.h>
7918#include <stdarg.h>
7919#include <string.h>
7920#include <float.h>
7921
7922int
7923main ()
7924{
7925
7926  ;
7927  return 0;
7928}
7929_ACEOF
7930if ac_fn_c_try_compile "$LINENO"; then :
7931  ac_cv_header_stdc=yes
7932else
7933  ac_cv_header_stdc=no
7934fi
7935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7936
7937if test $ac_cv_header_stdc = yes; then
7938  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7939  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7940/* end confdefs.h.  */
7941#include <string.h>
7942
7943_ACEOF
7944if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7945  $EGREP "memchr" >/dev/null 2>&1; then :
7946
7947else
7948  ac_cv_header_stdc=no
7949fi
7950rm -f conftest*
7951
7952fi
7953
7954if test $ac_cv_header_stdc = yes; then
7955  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7956  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7957/* end confdefs.h.  */
7958#include <stdlib.h>
7959
7960_ACEOF
7961if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7962  $EGREP "free" >/dev/null 2>&1; then :
7963
7964else
7965  ac_cv_header_stdc=no
7966fi
7967rm -f conftest*
7968
7969fi
7970
7971if test $ac_cv_header_stdc = yes; then
7972  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7973  if test "$cross_compiling" = yes; then :
7974  :
7975else
7976  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7977/* end confdefs.h.  */
7978#include <ctype.h>
7979#include <stdlib.h>
7980#if ((' ' & 0x0FF) == 0x020)
7981# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7982# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7983#else
7984# define ISLOWER(c) \
7985		   (('a' <= (c) && (c) <= 'i') \
7986		     || ('j' <= (c) && (c) <= 'r') \
7987		     || ('s' <= (c) && (c) <= 'z'))
7988# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7989#endif
7990
7991#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7992int
7993main ()
7994{
7995  int i;
7996  for (i = 0; i < 256; i++)
7997    if (XOR (islower (i), ISLOWER (i))
7998	|| toupper (i) != TOUPPER (i))
7999      return 2;
8000  return 0;
8001}
8002_ACEOF
8003if ac_fn_c_try_run "$LINENO"; then :
8004
8005else
8006  ac_cv_header_stdc=no
8007fi
8008rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8009  conftest.$ac_objext conftest.beam conftest.$ac_ext
8010fi
8011
8012fi
8013fi
8014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8015$as_echo "$ac_cv_header_stdc" >&6; }
8016if test $ac_cv_header_stdc = yes; then
8017
8018$as_echo "#define STDC_HEADERS 1" >>confdefs.h
8019
8020fi
8021
8022# On IRIX 5.3, sys/types and inttypes.h are conflicting.
8023for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8024		  inttypes.h stdint.h unistd.h
8025do :
8026  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8027ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
8028"
8029if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8030  cat >>confdefs.h <<_ACEOF
8031#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8032_ACEOF
8033
8034fi
8035
8036done
8037
8038
8039if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
8040   # then
8041
8042
8043
8044ac_ext=c
8045ac_cpp='$CPP $CPPFLAGS'
8046ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8047ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8048ac_compiler_gnu=$ac_cv_c_compiler_gnu
8049
8050ax_pthread_ok=no
8051
8052# We used to check for pthread.h first, but this fails if pthread.h
8053# requires special compiler flags (e.g. on Tru64 or Sequent).
8054# It gets checked for in the link test anyway.
8055
8056# First of all, check if the user has set any of the PTHREAD_LIBS,
8057# etcetera environment variables, and if threads linking works using
8058# them:
8059if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
8060        save_CFLAGS="$CFLAGS"
8061        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8062        save_LIBS="$LIBS"
8063        LIBS="$PTHREAD_LIBS $LIBS"
8064        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
8065$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
8066        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8067/* end confdefs.h.  */
8068
8069/* Override any GCC internal prototype to avoid an error.
8070   Use char because int might match the return type of a GCC
8071   builtin and then its argument prototype would still apply.  */
8072#ifdef __cplusplus
8073extern "C"
8074#endif
8075char pthread_join ();
8076int
8077main ()
8078{
8079return pthread_join ();
8080  ;
8081  return 0;
8082}
8083_ACEOF
8084if ac_fn_c_try_link "$LINENO"; then :
8085  ax_pthread_ok=yes
8086fi
8087rm -f core conftest.err conftest.$ac_objext \
8088    conftest$ac_exeext conftest.$ac_ext
8089        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
8090$as_echo "$ax_pthread_ok" >&6; }
8091        if test x"$ax_pthread_ok" = xno; then
8092                PTHREAD_LIBS=""
8093                PTHREAD_CFLAGS=""
8094        fi
8095        LIBS="$save_LIBS"
8096        CFLAGS="$save_CFLAGS"
8097fi
8098
8099# We must check for the threads library under a number of different
8100# names; the ordering is very important because some systems
8101# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
8102# libraries is broken (non-POSIX).
8103
8104# Create a list of thread flags to try.  Items starting with a "-" are
8105# C compiler flags, and other items are library names, except for "none"
8106# which indicates that we try without any flags at all, and "pthread-config"
8107# which is a program returning the flags for the Pth emulation library.
8108
8109ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt -mthreads pthread --thread-safe pthread-config"
8110
8111# The ordering *is* (sometimes) important.  Some notes on the
8112# individual items follow:
8113
8114# pthreads: AIX (must check this before -lpthread)
8115# none: in case threads are in libc; should be tried before -Kthread and
8116#       other compiler flags to prevent continual compiler warnings
8117# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
8118# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
8119# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
8120# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
8121# -pthreads: Solaris/gcc
8122# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
8123#      doesn't hurt to check since this sometimes defines pthreads and
8124#      -D_REENTRANT too), HP C (must be checked before -lpthread, which
8125#      is present but should not be used directly)
8126# -mthreads: Mingw32/gcc, Lynx/gcc
8127# pthread: Linux, etcetera
8128# --thread-safe: KAI C++
8129# pthread-config: use pthread-config program (for GNU Pth library)
8130
8131case $host_os in
8132
8133        hpux*)
8134
8135        # From the cc(1) man page: "[-mt] Sets various -D flags to enable
8136        # multi-threading and also sets -lpthread."
8137
8138        ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
8139        ;;
8140
8141        openedition*)
8142
8143        # IBM z/OS requires a feature-test macro to be defined in order to
8144        # enable POSIX threads at all, so give the user a hint if this is
8145        # not set. (We don't define these ourselves, as they can affect
8146        # other portions of the system API in unpredictable ways.)
8147
8148        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8149/* end confdefs.h.  */
8150
8151#            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
8152             AX_PTHREAD_ZOS_MISSING
8153#            endif
8154
8155_ACEOF
8156if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8157  $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
8158  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
8159$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
8160fi
8161rm -f conftest*
8162
8163        ;;
8164
8165        solaris*)
8166
8167        # Newer versions of Solaris require the "-mt -lpthread" pair, and we
8168        # check that first.  On some older versions, libc contains stubbed
8169        # (non-functional) versions of the pthreads routines, so link-based
8170        # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
8171        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
8172        # a function called by this macro, so we could check for that, but
8173        # who knows whether they'll stub that too in a future libc.)  So
8174        # we'll look for -pthreads and -lpthread shortly thereafter.
8175
8176        ax_pthread_flags="-mt,pthread -pthreads -pthread pthread $ax_pthread_flags"
8177        ;;
8178esac
8179
8180# Older versions of Clang only give a warning instead of an error for an
8181# unrecognized option, unless we specify -Werror. (We throw in some extra
8182# Clang warning flags for good measure.)
8183
8184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs certain flags to reject unknown flags" >&5
8185$as_echo_n "checking if compiler needs certain flags to reject unknown flags... " >&6; }
8186if ${ax_cv_PTHREAD_REJECT_UNKNOWN+:} false; then :
8187  $as_echo_n "(cached) " >&6
8188else
8189  ax_cv_PTHREAD_REJECT_UNKNOWN=unknown
8190     save_CFLAGS="$CFLAGS"
8191     ax_pthread_extra_flags="-Wunknown-warning-option -Wunused-command-line-argument"
8192     CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wfoobaz -foobaz"
8193     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8194/* end confdefs.h.  */
8195int foo(void);
8196int
8197main ()
8198{
8199foo()
8200  ;
8201  return 0;
8202}
8203_ACEOF
8204if ac_fn_c_try_compile "$LINENO"; then :
8205  ax_cv_PTHREAD_REJECT_UNKNOWN="-Werror $ax_pthread_extra_flags"
8206else
8207  ax_cv_PTHREAD_REJECT_UNKNOWN=no
8208fi
8209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8210     CFLAGS="$save_CFLAGS"
8211
8212fi
8213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_REJECT_UNKNOWN" >&5
8214$as_echo "$ax_cv_PTHREAD_REJECT_UNKNOWN" >&6; }
8215ax_pthread_extra_flags=
8216if test "x$ax_cv_PTHREAD_REJECT_UNKNOWN" != "xno"; then :
8217  ax_pthread_extra_flags="$ax_cv_PTHREAD_REJECT_UNKNOWN"
8218fi
8219
8220if test x"$ax_pthread_ok" = xno; then
8221for flag in $ax_pthread_flags; do
8222
8223        case $flag in
8224                none)
8225                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
8226$as_echo_n "checking whether pthreads work without any flags... " >&6; }
8227                ;;
8228
8229                -mt,pthread)
8230                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
8231$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
8232                PTHREAD_CFLAGS="-mt"
8233                PTHREAD_LIBS="-lpthread"
8234                ;;
8235
8236                -*)
8237                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
8238$as_echo_n "checking whether pthreads work with $flag... " >&6; }
8239                PTHREAD_CFLAGS="$flag"
8240                ;;
8241
8242                pthread-config)
8243                # Extract the first word of "pthread-config", so it can be a program name with args.
8244set dummy pthread-config; ac_word=$2
8245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8246$as_echo_n "checking for $ac_word... " >&6; }
8247if ${ac_cv_prog_ax_pthread_config+:} false; then :
8248  $as_echo_n "(cached) " >&6
8249else
8250  if test -n "$ax_pthread_config"; then
8251  ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
8252else
8253as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8254for as_dir in $PATH
8255do
8256  IFS=$as_save_IFS
8257  test -z "$as_dir" && as_dir=.
8258    for ac_exec_ext in '' $ac_executable_extensions; do
8259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8260    ac_cv_prog_ax_pthread_config="yes"
8261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8262    break 2
8263  fi
8264done
8265  done
8266IFS=$as_save_IFS
8267
8268  test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
8269fi
8270fi
8271ax_pthread_config=$ac_cv_prog_ax_pthread_config
8272if test -n "$ax_pthread_config"; then
8273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
8274$as_echo "$ax_pthread_config" >&6; }
8275else
8276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8277$as_echo "no" >&6; }
8278fi
8279
8280
8281                if test x"$ax_pthread_config" = xno; then continue; fi
8282                PTHREAD_CFLAGS="`pthread-config --cflags`"
8283                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
8284                ;;
8285
8286                *)
8287                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
8288$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
8289                PTHREAD_LIBS="-l$flag"
8290                ;;
8291        esac
8292
8293        save_LIBS="$LIBS"
8294        save_CFLAGS="$CFLAGS"
8295        LIBS="$PTHREAD_LIBS $LIBS"
8296        CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
8297
8298        # Check for various functions.  We must include pthread.h,
8299        # since some functions may be macros.  (On the Sequent, we
8300        # need a special flag -Kthread to make this header compile.)
8301        # We check for pthread_join because it is in -lpthread on IRIX
8302        # while pthread_create is in libc.  We check for pthread_attr_init
8303        # due to DEC craziness with -lpthreads.  We check for
8304        # pthread_cleanup_push because it is one of the few pthread
8305        # functions on Solaris that doesn't have a non-functional libc stub.
8306        # We try pthread_create on general principles.
8307        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8308/* end confdefs.h.  */
8309#include <pthread.h>
8310                        static void routine(void *a) { a = 0; }
8311                        static void *start_routine(void *a) { return a; }
8312int
8313main ()
8314{
8315pthread_t th; pthread_attr_t attr;
8316                        pthread_create(&th, 0, start_routine, 0);
8317                        pthread_join(th, 0);
8318                        pthread_attr_init(&attr);
8319                        pthread_cleanup_push(routine, 0);
8320                        pthread_cleanup_pop(0) /* ; */
8321  ;
8322  return 0;
8323}
8324_ACEOF
8325if ac_fn_c_try_link "$LINENO"; then :
8326  ax_pthread_ok=yes
8327fi
8328rm -f core conftest.err conftest.$ac_objext \
8329    conftest$ac_exeext conftest.$ac_ext
8330
8331        LIBS="$save_LIBS"
8332        CFLAGS="$save_CFLAGS"
8333
8334        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
8335$as_echo "$ax_pthread_ok" >&6; }
8336        if test "x$ax_pthread_ok" = xyes; then
8337                break;
8338        fi
8339
8340        PTHREAD_LIBS=""
8341        PTHREAD_CFLAGS=""
8342done
8343fi
8344
8345# Various other checks:
8346if test "x$ax_pthread_ok" = xyes; then
8347        save_LIBS="$LIBS"
8348        LIBS="$PTHREAD_LIBS $LIBS"
8349        save_CFLAGS="$CFLAGS"
8350        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8351
8352        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
8353        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
8354$as_echo_n "checking for joinable pthread attribute... " >&6; }
8355if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
8356  $as_echo_n "(cached) " >&6
8357else
8358  ax_cv_PTHREAD_JOINABLE_ATTR=unknown
8359             for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
8360                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8361/* end confdefs.h.  */
8362#include <pthread.h>
8363int
8364main ()
8365{
8366int attr = $attr; return attr /* ; */
8367  ;
8368  return 0;
8369}
8370_ACEOF
8371if ac_fn_c_try_link "$LINENO"; then :
8372  ax_cv_PTHREAD_JOINABLE_ATTR=$attr; break
8373fi
8374rm -f core conftest.err conftest.$ac_objext \
8375    conftest$ac_exeext conftest.$ac_ext
8376             done
8377
8378fi
8379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
8380$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
8381        if test "$ax_cv_PTHREAD_JOINABLE_ATTR" != unknown && \
8382               test "$ax_cv_PTHREAD_JOINABLE_ATTR" != PTHREAD_CREATE_JOINABLE; then :
8383
8384cat >>confdefs.h <<_ACEOF
8385#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
8386_ACEOF
8387
8388fi
8389
8390        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
8391$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
8392if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
8393  $as_echo_n "(cached) " >&6
8394else
8395  ax_cv_PTHREAD_SPECIAL_FLAGS=no
8396             ax_pthread_special_flags_added=no
8397             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8398/* end confdefs.h.  */
8399
8400#                 if !defined(_REENTRANT) && !defined(_THREAD_SAFE)
8401                  AX_PTHREAD_NEED_SPECIAL_FLAG
8402#                 endif
8403
8404_ACEOF
8405if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8406  $EGREP "AX_PTHREAD_NEED_SPECIAL_FLAG" >/dev/null 2>&1; then :
8407  case $host_os in
8408                  aix* | freebsd*)
8409                  ax_cv_PTHREAD_SPECIAL_FLAGS="-D_THREAD_SAFE"
8410                  ;;
8411                  darwin* | hpux* | osf* | solaris*)
8412                  ax_cv_PTHREAD_SPECIAL_FLAGS="-D_REENTRANT"
8413                  ;;
8414                  esac
8415
8416fi
8417rm -f conftest*
8418
8419
8420fi
8421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
8422$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
8423        if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
8424               test "x$ax_pthread_special_flags_added" != "xyes"; then :
8425  PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
8426               ax_pthread_special_flags_added=yes
8427fi
8428
8429        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
8430$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
8431if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
8432  $as_echo_n "(cached) " >&6
8433else
8434  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8435/* end confdefs.h.  */
8436#include <pthread.h>
8437int
8438main ()
8439{
8440int i = PTHREAD_PRIO_INHERIT;
8441  ;
8442  return 0;
8443}
8444_ACEOF
8445if ac_fn_c_try_link "$LINENO"; then :
8446  ax_cv_PTHREAD_PRIO_INHERIT=yes
8447else
8448  ax_cv_PTHREAD_PRIO_INHERIT=no
8449fi
8450rm -f core conftest.err conftest.$ac_objext \
8451    conftest$ac_exeext conftest.$ac_ext
8452
8453fi
8454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
8455$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
8456        if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
8457
8458$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
8459
8460fi
8461
8462        LIBS="$save_LIBS"
8463        CFLAGS="$save_CFLAGS"
8464
8465        # More AIX lossage: compile with *_r variant
8466        if test "x$GCC" != xyes; then
8467            case $host_os in
8468                aix*)
8469                case "x/$CC" in #(
8470  x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
8471    #handle absolute path differently from PATH based program lookup
8472                   case "x$CC" in #(
8473  x/*) :
8474    if as_fn_executable_p ${CC}_r; then :
8475  PTHREAD_CC="${CC}_r"
8476fi ;; #(
8477  *) :
8478    for ac_prog in ${CC}_r
8479do
8480  # Extract the first word of "$ac_prog", so it can be a program name with args.
8481set dummy $ac_prog; ac_word=$2
8482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8483$as_echo_n "checking for $ac_word... " >&6; }
8484if ${ac_cv_prog_PTHREAD_CC+:} false; then :
8485  $as_echo_n "(cached) " >&6
8486else
8487  if test -n "$PTHREAD_CC"; then
8488  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
8489else
8490as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8491for as_dir in $PATH
8492do
8493  IFS=$as_save_IFS
8494  test -z "$as_dir" && as_dir=.
8495    for ac_exec_ext in '' $ac_executable_extensions; do
8496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8497    ac_cv_prog_PTHREAD_CC="$ac_prog"
8498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8499    break 2
8500  fi
8501done
8502  done
8503IFS=$as_save_IFS
8504
8505fi
8506fi
8507PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
8508if test -n "$PTHREAD_CC"; then
8509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
8510$as_echo "$PTHREAD_CC" >&6; }
8511else
8512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8513$as_echo "no" >&6; }
8514fi
8515
8516
8517  test -n "$PTHREAD_CC" && break
8518done
8519test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
8520 ;;
8521esac ;; #(
8522  *) :
8523     ;;
8524esac
8525                ;;
8526            esac
8527        fi
8528fi
8529
8530test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
8531
8532
8533
8534
8535
8536# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
8537if test x"$ax_pthread_ok" = xyes; then
8538
8539$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
8540
8541        :
8542else
8543        ax_pthread_ok=no
8544
8545fi
8546ac_ext=c
8547ac_cpp='$CPP $CPPFLAGS'
8548ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8549ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8550ac_compiler_gnu=$ac_cv_c_compiler_gnu
8551
8552	# set thread flags
8553
8554# Some platforms use these, so just define them.  They can't hurt if they
8555# are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
8556# enables 5-arg getpwuid_r, among other things.
8557PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
8558
8559# Check for *_r functions
8560_CFLAGS="$CFLAGS"
8561_LIBS="$LIBS"
8562CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8563LIBS="$LIBS $PTHREAD_LIBS"
8564
8565ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
8566if test "x$ac_cv_header_pthread_h" = xyes; then :
8567
8568else
8569  as_fn_error $? "
8570pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
8571fi
8572
8573
8574
8575for ac_func in strerror_r getpwuid_r gethostbyname_r
8576do :
8577  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8578ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8579if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8580  cat >>confdefs.h <<_ACEOF
8581#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8582_ACEOF
8583
8584fi
8585done
8586
8587
8588# Do test here with the proper thread flags
8589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
8590$as_echo_n "checking whether strerror_r returns int... " >&6; }
8591if ${pgac_cv_func_strerror_r_int+:} false; then :
8592  $as_echo_n "(cached) " >&6
8593else
8594  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8595/* end confdefs.h.  */
8596#include <string.h>
8597int
8598main ()
8599{
8600char buf[100];
8601  switch (strerror_r(1, buf, sizeof(buf)))
8602  { case 0: break; default: break; }
8603
8604  ;
8605  return 0;
8606}
8607_ACEOF
8608if ac_fn_c_try_compile "$LINENO"; then :
8609  pgac_cv_func_strerror_r_int=yes
8610else
8611  pgac_cv_func_strerror_r_int=no
8612fi
8613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8614fi
8615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
8616$as_echo "$pgac_cv_func_strerror_r_int" >&6; }
8617if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
8618
8619$as_echo "#define STRERROR_R_INT 1" >>confdefs.h
8620
8621fi
8622
8623
8624CFLAGS="$_CFLAGS"
8625LIBS="$_LIBS"
8626
8627
8628else
8629   # else
8630# do not use values from template file
8631PTHREAD_CFLAGS=
8632PTHREAD_LIBS=
8633
8634fi # fi
8635
8636
8637
8638
8639
8640##
8641## Libraries
8642##
8643## Most libraries are included only if they demonstrably provide a function
8644## we need, but libm is an exception: always include it, because there are
8645## too many compilers that play cute optimization games that will break
8646## probes for standard functions such as pow().
8647##
8648
8649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
8650$as_echo_n "checking for main in -lm... " >&6; }
8651if ${ac_cv_lib_m_main+:} false; then :
8652  $as_echo_n "(cached) " >&6
8653else
8654  ac_check_lib_save_LIBS=$LIBS
8655LIBS="-lm  $LIBS"
8656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8657/* end confdefs.h.  */
8658
8659
8660int
8661main ()
8662{
8663return main ();
8664  ;
8665  return 0;
8666}
8667_ACEOF
8668if ac_fn_c_try_link "$LINENO"; then :
8669  ac_cv_lib_m_main=yes
8670else
8671  ac_cv_lib_m_main=no
8672fi
8673rm -f core conftest.err conftest.$ac_objext \
8674    conftest$ac_exeext conftest.$ac_ext
8675LIBS=$ac_check_lib_save_LIBS
8676fi
8677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
8678$as_echo "$ac_cv_lib_m_main" >&6; }
8679if test "x$ac_cv_lib_m_main" = xyes; then :
8680  cat >>confdefs.h <<_ACEOF
8681#define HAVE_LIBM 1
8682_ACEOF
8683
8684  LIBS="-lm $LIBS"
8685
8686fi
8687
8688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
8689$as_echo_n "checking for library containing setproctitle... " >&6; }
8690if ${ac_cv_search_setproctitle+:} false; then :
8691  $as_echo_n "(cached) " >&6
8692else
8693  ac_func_search_save_LIBS=$LIBS
8694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8695/* end confdefs.h.  */
8696
8697/* Override any GCC internal prototype to avoid an error.
8698   Use char because int might match the return type of a GCC
8699   builtin and then its argument prototype would still apply.  */
8700#ifdef __cplusplus
8701extern "C"
8702#endif
8703char setproctitle ();
8704int
8705main ()
8706{
8707return setproctitle ();
8708  ;
8709  return 0;
8710}
8711_ACEOF
8712for ac_lib in '' util; do
8713  if test -z "$ac_lib"; then
8714    ac_res="none required"
8715  else
8716    ac_res=-l$ac_lib
8717    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8718  fi
8719  if ac_fn_c_try_link "$LINENO"; then :
8720  ac_cv_search_setproctitle=$ac_res
8721fi
8722rm -f core conftest.err conftest.$ac_objext \
8723    conftest$ac_exeext
8724  if ${ac_cv_search_setproctitle+:} false; then :
8725  break
8726fi
8727done
8728if ${ac_cv_search_setproctitle+:} false; then :
8729
8730else
8731  ac_cv_search_setproctitle=no
8732fi
8733rm conftest.$ac_ext
8734LIBS=$ac_func_search_save_LIBS
8735fi
8736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
8737$as_echo "$ac_cv_search_setproctitle" >&6; }
8738ac_res=$ac_cv_search_setproctitle
8739if test "$ac_res" != no; then :
8740  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8741
8742fi
8743
8744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
8745$as_echo_n "checking for library containing dlopen... " >&6; }
8746if ${ac_cv_search_dlopen+:} false; then :
8747  $as_echo_n "(cached) " >&6
8748else
8749  ac_func_search_save_LIBS=$LIBS
8750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8751/* end confdefs.h.  */
8752
8753/* Override any GCC internal prototype to avoid an error.
8754   Use char because int might match the return type of a GCC
8755   builtin and then its argument prototype would still apply.  */
8756#ifdef __cplusplus
8757extern "C"
8758#endif
8759char dlopen ();
8760int
8761main ()
8762{
8763return dlopen ();
8764  ;
8765  return 0;
8766}
8767_ACEOF
8768for ac_lib in '' dl; do
8769  if test -z "$ac_lib"; then
8770    ac_res="none required"
8771  else
8772    ac_res=-l$ac_lib
8773    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8774  fi
8775  if ac_fn_c_try_link "$LINENO"; then :
8776  ac_cv_search_dlopen=$ac_res
8777fi
8778rm -f core conftest.err conftest.$ac_objext \
8779    conftest$ac_exeext
8780  if ${ac_cv_search_dlopen+:} false; then :
8781  break
8782fi
8783done
8784if ${ac_cv_search_dlopen+:} false; then :
8785
8786else
8787  ac_cv_search_dlopen=no
8788fi
8789rm conftest.$ac_ext
8790LIBS=$ac_func_search_save_LIBS
8791fi
8792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
8793$as_echo "$ac_cv_search_dlopen" >&6; }
8794ac_res=$ac_cv_search_dlopen
8795if test "$ac_res" != no; then :
8796  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8797
8798fi
8799
8800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
8801$as_echo_n "checking for library containing socket... " >&6; }
8802if ${ac_cv_search_socket+:} false; then :
8803  $as_echo_n "(cached) " >&6
8804else
8805  ac_func_search_save_LIBS=$LIBS
8806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8807/* end confdefs.h.  */
8808
8809/* Override any GCC internal prototype to avoid an error.
8810   Use char because int might match the return type of a GCC
8811   builtin and then its argument prototype would still apply.  */
8812#ifdef __cplusplus
8813extern "C"
8814#endif
8815char socket ();
8816int
8817main ()
8818{
8819return socket ();
8820  ;
8821  return 0;
8822}
8823_ACEOF
8824for ac_lib in '' socket ws2_32; do
8825  if test -z "$ac_lib"; then
8826    ac_res="none required"
8827  else
8828    ac_res=-l$ac_lib
8829    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8830  fi
8831  if ac_fn_c_try_link "$LINENO"; then :
8832  ac_cv_search_socket=$ac_res
8833fi
8834rm -f core conftest.err conftest.$ac_objext \
8835    conftest$ac_exeext
8836  if ${ac_cv_search_socket+:} false; then :
8837  break
8838fi
8839done
8840if ${ac_cv_search_socket+:} false; then :
8841
8842else
8843  ac_cv_search_socket=no
8844fi
8845rm conftest.$ac_ext
8846LIBS=$ac_func_search_save_LIBS
8847fi
8848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
8849$as_echo "$ac_cv_search_socket" >&6; }
8850ac_res=$ac_cv_search_socket
8851if test "$ac_res" != no; then :
8852  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8853
8854fi
8855
8856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
8857$as_echo_n "checking for library containing shl_load... " >&6; }
8858if ${ac_cv_search_shl_load+:} false; then :
8859  $as_echo_n "(cached) " >&6
8860else
8861  ac_func_search_save_LIBS=$LIBS
8862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8863/* end confdefs.h.  */
8864
8865/* Override any GCC internal prototype to avoid an error.
8866   Use char because int might match the return type of a GCC
8867   builtin and then its argument prototype would still apply.  */
8868#ifdef __cplusplus
8869extern "C"
8870#endif
8871char shl_load ();
8872int
8873main ()
8874{
8875return shl_load ();
8876  ;
8877  return 0;
8878}
8879_ACEOF
8880for ac_lib in '' dld; do
8881  if test -z "$ac_lib"; then
8882    ac_res="none required"
8883  else
8884    ac_res=-l$ac_lib
8885    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8886  fi
8887  if ac_fn_c_try_link "$LINENO"; then :
8888  ac_cv_search_shl_load=$ac_res
8889fi
8890rm -f core conftest.err conftest.$ac_objext \
8891    conftest$ac_exeext
8892  if ${ac_cv_search_shl_load+:} false; then :
8893  break
8894fi
8895done
8896if ${ac_cv_search_shl_load+:} false; then :
8897
8898else
8899  ac_cv_search_shl_load=no
8900fi
8901rm conftest.$ac_ext
8902LIBS=$ac_func_search_save_LIBS
8903fi
8904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
8905$as_echo "$ac_cv_search_shl_load" >&6; }
8906ac_res=$ac_cv_search_shl_load
8907if test "$ac_res" != no; then :
8908  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8909
8910fi
8911
8912# We only use libld in port/dynloader/aix.c
8913case $host_os in
8914     aix*)
8915	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldopen" >&5
8916$as_echo_n "checking for library containing ldopen... " >&6; }
8917if ${ac_cv_search_ldopen+:} false; then :
8918  $as_echo_n "(cached) " >&6
8919else
8920  ac_func_search_save_LIBS=$LIBS
8921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8922/* end confdefs.h.  */
8923
8924/* Override any GCC internal prototype to avoid an error.
8925   Use char because int might match the return type of a GCC
8926   builtin and then its argument prototype would still apply.  */
8927#ifdef __cplusplus
8928extern "C"
8929#endif
8930char ldopen ();
8931int
8932main ()
8933{
8934return ldopen ();
8935  ;
8936  return 0;
8937}
8938_ACEOF
8939for ac_lib in '' ld; do
8940  if test -z "$ac_lib"; then
8941    ac_res="none required"
8942  else
8943    ac_res=-l$ac_lib
8944    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8945  fi
8946  if ac_fn_c_try_link "$LINENO"; then :
8947  ac_cv_search_ldopen=$ac_res
8948fi
8949rm -f core conftest.err conftest.$ac_objext \
8950    conftest$ac_exeext
8951  if ${ac_cv_search_ldopen+:} false; then :
8952  break
8953fi
8954done
8955if ${ac_cv_search_ldopen+:} false; then :
8956
8957else
8958  ac_cv_search_ldopen=no
8959fi
8960rm conftest.$ac_ext
8961LIBS=$ac_func_search_save_LIBS
8962fi
8963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldopen" >&5
8964$as_echo "$ac_cv_search_ldopen" >&6; }
8965ac_res=$ac_cv_search_ldopen
8966if test "$ac_res" != no; then :
8967  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8968
8969fi
8970
8971	;;
8972esac
8973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
8974$as_echo_n "checking for library containing getopt_long... " >&6; }
8975if ${ac_cv_search_getopt_long+:} false; then :
8976  $as_echo_n "(cached) " >&6
8977else
8978  ac_func_search_save_LIBS=$LIBS
8979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8980/* end confdefs.h.  */
8981
8982/* Override any GCC internal prototype to avoid an error.
8983   Use char because int might match the return type of a GCC
8984   builtin and then its argument prototype would still apply.  */
8985#ifdef __cplusplus
8986extern "C"
8987#endif
8988char getopt_long ();
8989int
8990main ()
8991{
8992return getopt_long ();
8993  ;
8994  return 0;
8995}
8996_ACEOF
8997for ac_lib in '' getopt gnugetopt; do
8998  if test -z "$ac_lib"; then
8999    ac_res="none required"
9000  else
9001    ac_res=-l$ac_lib
9002    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9003  fi
9004  if ac_fn_c_try_link "$LINENO"; then :
9005  ac_cv_search_getopt_long=$ac_res
9006fi
9007rm -f core conftest.err conftest.$ac_objext \
9008    conftest$ac_exeext
9009  if ${ac_cv_search_getopt_long+:} false; then :
9010  break
9011fi
9012done
9013if ${ac_cv_search_getopt_long+:} false; then :
9014
9015else
9016  ac_cv_search_getopt_long=no
9017fi
9018rm conftest.$ac_ext
9019LIBS=$ac_func_search_save_LIBS
9020fi
9021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
9022$as_echo "$ac_cv_search_getopt_long" >&6; }
9023ac_res=$ac_cv_search_getopt_long
9024if test "$ac_res" != no; then :
9025  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9026
9027fi
9028
9029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
9030$as_echo_n "checking for library containing crypt... " >&6; }
9031if ${ac_cv_search_crypt+:} false; then :
9032  $as_echo_n "(cached) " >&6
9033else
9034  ac_func_search_save_LIBS=$LIBS
9035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9036/* end confdefs.h.  */
9037
9038/* Override any GCC internal prototype to avoid an error.
9039   Use char because int might match the return type of a GCC
9040   builtin and then its argument prototype would still apply.  */
9041#ifdef __cplusplus
9042extern "C"
9043#endif
9044char crypt ();
9045int
9046main ()
9047{
9048return crypt ();
9049  ;
9050  return 0;
9051}
9052_ACEOF
9053for ac_lib in '' crypt; do
9054  if test -z "$ac_lib"; then
9055    ac_res="none required"
9056  else
9057    ac_res=-l$ac_lib
9058    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9059  fi
9060  if ac_fn_c_try_link "$LINENO"; then :
9061  ac_cv_search_crypt=$ac_res
9062fi
9063rm -f core conftest.err conftest.$ac_objext \
9064    conftest$ac_exeext
9065  if ${ac_cv_search_crypt+:} false; then :
9066  break
9067fi
9068done
9069if ${ac_cv_search_crypt+:} false; then :
9070
9071else
9072  ac_cv_search_crypt=no
9073fi
9074rm conftest.$ac_ext
9075LIBS=$ac_func_search_save_LIBS
9076fi
9077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
9078$as_echo "$ac_cv_search_crypt" >&6; }
9079ac_res=$ac_cv_search_crypt
9080if test "$ac_res" != no; then :
9081  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9082
9083fi
9084
9085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
9086$as_echo_n "checking for library containing shm_open... " >&6; }
9087if ${ac_cv_search_shm_open+:} false; then :
9088  $as_echo_n "(cached) " >&6
9089else
9090  ac_func_search_save_LIBS=$LIBS
9091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9092/* end confdefs.h.  */
9093
9094/* Override any GCC internal prototype to avoid an error.
9095   Use char because int might match the return type of a GCC
9096   builtin and then its argument prototype would still apply.  */
9097#ifdef __cplusplus
9098extern "C"
9099#endif
9100char shm_open ();
9101int
9102main ()
9103{
9104return shm_open ();
9105  ;
9106  return 0;
9107}
9108_ACEOF
9109for ac_lib in '' rt; do
9110  if test -z "$ac_lib"; then
9111    ac_res="none required"
9112  else
9113    ac_res=-l$ac_lib
9114    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9115  fi
9116  if ac_fn_c_try_link "$LINENO"; then :
9117  ac_cv_search_shm_open=$ac_res
9118fi
9119rm -f core conftest.err conftest.$ac_objext \
9120    conftest$ac_exeext
9121  if ${ac_cv_search_shm_open+:} false; then :
9122  break
9123fi
9124done
9125if ${ac_cv_search_shm_open+:} false; then :
9126
9127else
9128  ac_cv_search_shm_open=no
9129fi
9130rm conftest.$ac_ext
9131LIBS=$ac_func_search_save_LIBS
9132fi
9133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
9134$as_echo "$ac_cv_search_shm_open" >&6; }
9135ac_res=$ac_cv_search_shm_open
9136if test "$ac_res" != no; then :
9137  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9138
9139fi
9140
9141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
9142$as_echo_n "checking for library containing shm_unlink... " >&6; }
9143if ${ac_cv_search_shm_unlink+:} false; then :
9144  $as_echo_n "(cached) " >&6
9145else
9146  ac_func_search_save_LIBS=$LIBS
9147cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9148/* end confdefs.h.  */
9149
9150/* Override any GCC internal prototype to avoid an error.
9151   Use char because int might match the return type of a GCC
9152   builtin and then its argument prototype would still apply.  */
9153#ifdef __cplusplus
9154extern "C"
9155#endif
9156char shm_unlink ();
9157int
9158main ()
9159{
9160return shm_unlink ();
9161  ;
9162  return 0;
9163}
9164_ACEOF
9165for ac_lib in '' rt; do
9166  if test -z "$ac_lib"; then
9167    ac_res="none required"
9168  else
9169    ac_res=-l$ac_lib
9170    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9171  fi
9172  if ac_fn_c_try_link "$LINENO"; then :
9173  ac_cv_search_shm_unlink=$ac_res
9174fi
9175rm -f core conftest.err conftest.$ac_objext \
9176    conftest$ac_exeext
9177  if ${ac_cv_search_shm_unlink+:} false; then :
9178  break
9179fi
9180done
9181if ${ac_cv_search_shm_unlink+:} false; then :
9182
9183else
9184  ac_cv_search_shm_unlink=no
9185fi
9186rm conftest.$ac_ext
9187LIBS=$ac_func_search_save_LIBS
9188fi
9189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
9190$as_echo "$ac_cv_search_shm_unlink" >&6; }
9191ac_res=$ac_cv_search_shm_unlink
9192if test "$ac_res" != no; then :
9193  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9194
9195fi
9196
9197# Solaris:
9198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
9199$as_echo_n "checking for library containing fdatasync... " >&6; }
9200if ${ac_cv_search_fdatasync+:} false; then :
9201  $as_echo_n "(cached) " >&6
9202else
9203  ac_func_search_save_LIBS=$LIBS
9204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9205/* end confdefs.h.  */
9206
9207/* Override any GCC internal prototype to avoid an error.
9208   Use char because int might match the return type of a GCC
9209   builtin and then its argument prototype would still apply.  */
9210#ifdef __cplusplus
9211extern "C"
9212#endif
9213char fdatasync ();
9214int
9215main ()
9216{
9217return fdatasync ();
9218  ;
9219  return 0;
9220}
9221_ACEOF
9222for ac_lib in '' rt posix4; do
9223  if test -z "$ac_lib"; then
9224    ac_res="none required"
9225  else
9226    ac_res=-l$ac_lib
9227    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9228  fi
9229  if ac_fn_c_try_link "$LINENO"; then :
9230  ac_cv_search_fdatasync=$ac_res
9231fi
9232rm -f core conftest.err conftest.$ac_objext \
9233    conftest$ac_exeext
9234  if ${ac_cv_search_fdatasync+:} false; then :
9235  break
9236fi
9237done
9238if ${ac_cv_search_fdatasync+:} false; then :
9239
9240else
9241  ac_cv_search_fdatasync=no
9242fi
9243rm conftest.$ac_ext
9244LIBS=$ac_func_search_save_LIBS
9245fi
9246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
9247$as_echo "$ac_cv_search_fdatasync" >&6; }
9248ac_res=$ac_cv_search_fdatasync
9249if test "$ac_res" != no; then :
9250  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9251
9252fi
9253
9254# Required for thread_test.c on Solaris
9255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
9256$as_echo_n "checking for library containing sched_yield... " >&6; }
9257if ${ac_cv_search_sched_yield+:} false; then :
9258  $as_echo_n "(cached) " >&6
9259else
9260  ac_func_search_save_LIBS=$LIBS
9261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9262/* end confdefs.h.  */
9263
9264/* Override any GCC internal prototype to avoid an error.
9265   Use char because int might match the return type of a GCC
9266   builtin and then its argument prototype would still apply.  */
9267#ifdef __cplusplus
9268extern "C"
9269#endif
9270char sched_yield ();
9271int
9272main ()
9273{
9274return sched_yield ();
9275  ;
9276  return 0;
9277}
9278_ACEOF
9279for ac_lib in '' rt; do
9280  if test -z "$ac_lib"; then
9281    ac_res="none required"
9282  else
9283    ac_res=-l$ac_lib
9284    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9285  fi
9286  if ac_fn_c_try_link "$LINENO"; then :
9287  ac_cv_search_sched_yield=$ac_res
9288fi
9289rm -f core conftest.err conftest.$ac_objext \
9290    conftest$ac_exeext
9291  if ${ac_cv_search_sched_yield+:} false; then :
9292  break
9293fi
9294done
9295if ${ac_cv_search_sched_yield+:} false; then :
9296
9297else
9298  ac_cv_search_sched_yield=no
9299fi
9300rm conftest.$ac_ext
9301LIBS=$ac_func_search_save_LIBS
9302fi
9303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
9304$as_echo "$ac_cv_search_sched_yield" >&6; }
9305ac_res=$ac_cv_search_sched_yield
9306if test "$ac_res" != no; then :
9307  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9308
9309fi
9310
9311# Required for thread_test.c on Solaris 2.5:
9312# Other ports use it too (HP-UX) so test unconditionally
9313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
9314$as_echo_n "checking for library containing gethostbyname_r... " >&6; }
9315if ${ac_cv_search_gethostbyname_r+:} false; then :
9316  $as_echo_n "(cached) " >&6
9317else
9318  ac_func_search_save_LIBS=$LIBS
9319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9320/* end confdefs.h.  */
9321
9322/* Override any GCC internal prototype to avoid an error.
9323   Use char because int might match the return type of a GCC
9324   builtin and then its argument prototype would still apply.  */
9325#ifdef __cplusplus
9326extern "C"
9327#endif
9328char gethostbyname_r ();
9329int
9330main ()
9331{
9332return gethostbyname_r ();
9333  ;
9334  return 0;
9335}
9336_ACEOF
9337for ac_lib in '' nsl; do
9338  if test -z "$ac_lib"; then
9339    ac_res="none required"
9340  else
9341    ac_res=-l$ac_lib
9342    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9343  fi
9344  if ac_fn_c_try_link "$LINENO"; then :
9345  ac_cv_search_gethostbyname_r=$ac_res
9346fi
9347rm -f core conftest.err conftest.$ac_objext \
9348    conftest$ac_exeext
9349  if ${ac_cv_search_gethostbyname_r+:} false; then :
9350  break
9351fi
9352done
9353if ${ac_cv_search_gethostbyname_r+:} false; then :
9354
9355else
9356  ac_cv_search_gethostbyname_r=no
9357fi
9358rm conftest.$ac_ext
9359LIBS=$ac_func_search_save_LIBS
9360fi
9361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
9362$as_echo "$ac_cv_search_gethostbyname_r" >&6; }
9363ac_res=$ac_cv_search_gethostbyname_r
9364if test "$ac_res" != no; then :
9365  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9366
9367fi
9368
9369# Cygwin:
9370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
9371$as_echo_n "checking for library containing shmget... " >&6; }
9372if ${ac_cv_search_shmget+:} false; then :
9373  $as_echo_n "(cached) " >&6
9374else
9375  ac_func_search_save_LIBS=$LIBS
9376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9377/* end confdefs.h.  */
9378
9379/* Override any GCC internal prototype to avoid an error.
9380   Use char because int might match the return type of a GCC
9381   builtin and then its argument prototype would still apply.  */
9382#ifdef __cplusplus
9383extern "C"
9384#endif
9385char shmget ();
9386int
9387main ()
9388{
9389return shmget ();
9390  ;
9391  return 0;
9392}
9393_ACEOF
9394for ac_lib in '' cygipc; do
9395  if test -z "$ac_lib"; then
9396    ac_res="none required"
9397  else
9398    ac_res=-l$ac_lib
9399    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9400  fi
9401  if ac_fn_c_try_link "$LINENO"; then :
9402  ac_cv_search_shmget=$ac_res
9403fi
9404rm -f core conftest.err conftest.$ac_objext \
9405    conftest$ac_exeext
9406  if ${ac_cv_search_shmget+:} false; then :
9407  break
9408fi
9409done
9410if ${ac_cv_search_shmget+:} false; then :
9411
9412else
9413  ac_cv_search_shmget=no
9414fi
9415rm conftest.$ac_ext
9416LIBS=$ac_func_search_save_LIBS
9417fi
9418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
9419$as_echo "$ac_cv_search_shmget" >&6; }
9420ac_res=$ac_cv_search_shmget
9421if test "$ac_res" != no; then :
9422  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9423
9424fi
9425
9426
9427if test "$with_readline" = yes; then
9428
9429
9430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
9431$as_echo_n "checking for library containing readline... " >&6; }
9432if ${pgac_cv_check_readline+:} false; then :
9433  $as_echo_n "(cached) " >&6
9434else
9435  pgac_cv_check_readline=no
9436pgac_save_LIBS=$LIBS
9437if test x"$with_libedit_preferred" != x"yes"
9438then	READLINE_ORDER="-lreadline -ledit"
9439else	READLINE_ORDER="-ledit -lreadline"
9440fi
9441for pgac_rllib in $READLINE_ORDER ; do
9442  for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
9443    LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
9444    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9445/* end confdefs.h.  */
9446
9447/* Override any GCC internal prototype to avoid an error.
9448   Use char because int might match the return type of a GCC
9449   builtin and then its argument prototype would still apply.  */
9450#ifdef __cplusplus
9451extern "C"
9452#endif
9453char readline ();
9454int
9455main ()
9456{
9457return readline ();
9458  ;
9459  return 0;
9460}
9461_ACEOF
9462if ac_fn_c_try_link "$LINENO"; then :
9463
9464      # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
9465      # recognize dependent libraries; assume curses is needed if we didn't
9466      # find any dependency.
9467      case $host_os in
9468        netbsd* | openbsd* | irix*)
9469          if test x"$pgac_lib" = x"" ; then
9470            pgac_lib=" -lcurses"
9471          fi ;;
9472      esac
9473
9474      pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
9475      break
9476
9477fi
9478rm -f core conftest.err conftest.$ac_objext \
9479    conftest$ac_exeext conftest.$ac_ext
9480  done
9481  if test "$pgac_cv_check_readline" != no ; then
9482    break
9483  fi
9484done
9485LIBS=$pgac_save_LIBS
9486
9487fi
9488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
9489$as_echo "$pgac_cv_check_readline" >&6; }
9490if test "$pgac_cv_check_readline" != no ; then
9491  LIBS="$pgac_cv_check_readline $LIBS"
9492
9493$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
9494
9495fi
9496
9497
9498  if test x"$pgac_cv_check_readline" = x"no"; then
9499    as_fn_error $? "readline library not found
9500If you have readline already installed, see config.log for details on the
9501failure.  It is possible the compiler isn't looking in the proper directory.
9502Use --without-readline to disable readline support." "$LINENO" 5
9503  fi
9504fi
9505
9506if test "$with_zlib" = yes; then
9507  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
9508$as_echo_n "checking for inflate in -lz... " >&6; }
9509if ${ac_cv_lib_z_inflate+:} false; then :
9510  $as_echo_n "(cached) " >&6
9511else
9512  ac_check_lib_save_LIBS=$LIBS
9513LIBS="-lz  $LIBS"
9514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9515/* end confdefs.h.  */
9516
9517/* Override any GCC internal prototype to avoid an error.
9518   Use char because int might match the return type of a GCC
9519   builtin and then its argument prototype would still apply.  */
9520#ifdef __cplusplus
9521extern "C"
9522#endif
9523char inflate ();
9524int
9525main ()
9526{
9527return inflate ();
9528  ;
9529  return 0;
9530}
9531_ACEOF
9532if ac_fn_c_try_link "$LINENO"; then :
9533  ac_cv_lib_z_inflate=yes
9534else
9535  ac_cv_lib_z_inflate=no
9536fi
9537rm -f core conftest.err conftest.$ac_objext \
9538    conftest$ac_exeext conftest.$ac_ext
9539LIBS=$ac_check_lib_save_LIBS
9540fi
9541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
9542$as_echo "$ac_cv_lib_z_inflate" >&6; }
9543if test "x$ac_cv_lib_z_inflate" = xyes; then :
9544  cat >>confdefs.h <<_ACEOF
9545#define HAVE_LIBZ 1
9546_ACEOF
9547
9548  LIBS="-lz $LIBS"
9549
9550else
9551  as_fn_error $? "zlib library not found
9552If you have zlib already installed, see config.log for details on the
9553failure.  It is possible the compiler isn't looking in the proper directory.
9554Use --without-zlib to disable zlib support." "$LINENO" 5
9555fi
9556
9557fi
9558
9559if test "$enable_spinlocks" = yes; then
9560
9561$as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
9562
9563else
9564  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9565*** Not using spinlocks will cause poor performance." >&5
9566$as_echo "$as_me: WARNING:
9567*** Not using spinlocks will cause poor performance." >&2;}
9568fi
9569
9570if test "$enable_atomics" = yes; then
9571
9572$as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
9573
9574else
9575  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9576*** Not using atomic operations will cause poor performance." >&5
9577$as_echo "$as_me: WARNING:
9578*** Not using atomic operations will cause poor performance." >&2;}
9579fi
9580
9581if test "$with_gssapi" = yes ; then
9582  if test "$PORTNAME" != "win32"; then
9583    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
9584$as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
9585if ${ac_cv_search_gss_init_sec_context+:} false; then :
9586  $as_echo_n "(cached) " >&6
9587else
9588  ac_func_search_save_LIBS=$LIBS
9589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9590/* end confdefs.h.  */
9591
9592/* Override any GCC internal prototype to avoid an error.
9593   Use char because int might match the return type of a GCC
9594   builtin and then its argument prototype would still apply.  */
9595#ifdef __cplusplus
9596extern "C"
9597#endif
9598char gss_init_sec_context ();
9599int
9600main ()
9601{
9602return gss_init_sec_context ();
9603  ;
9604  return 0;
9605}
9606_ACEOF
9607for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
9608  if test -z "$ac_lib"; then
9609    ac_res="none required"
9610  else
9611    ac_res=-l$ac_lib
9612    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9613  fi
9614  if ac_fn_c_try_link "$LINENO"; then :
9615  ac_cv_search_gss_init_sec_context=$ac_res
9616fi
9617rm -f core conftest.err conftest.$ac_objext \
9618    conftest$ac_exeext
9619  if ${ac_cv_search_gss_init_sec_context+:} false; then :
9620  break
9621fi
9622done
9623if ${ac_cv_search_gss_init_sec_context+:} false; then :
9624
9625else
9626  ac_cv_search_gss_init_sec_context=no
9627fi
9628rm conftest.$ac_ext
9629LIBS=$ac_func_search_save_LIBS
9630fi
9631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
9632$as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
9633ac_res=$ac_cv_search_gss_init_sec_context
9634if test "$ac_res" != no; then :
9635  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9636
9637else
9638  as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
9639fi
9640
9641  else
9642    LIBS="$LIBS -lgssapi32"
9643  fi
9644fi
9645
9646if test "$with_openssl" = yes ; then
9647    if test "$PORTNAME" != "win32"; then
9648     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
9649$as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
9650if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
9651  $as_echo_n "(cached) " >&6
9652else
9653  ac_check_lib_save_LIBS=$LIBS
9654LIBS="-lcrypto  $LIBS"
9655cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9656/* end confdefs.h.  */
9657
9658/* Override any GCC internal prototype to avoid an error.
9659   Use char because int might match the return type of a GCC
9660   builtin and then its argument prototype would still apply.  */
9661#ifdef __cplusplus
9662extern "C"
9663#endif
9664char CRYPTO_new_ex_data ();
9665int
9666main ()
9667{
9668return CRYPTO_new_ex_data ();
9669  ;
9670  return 0;
9671}
9672_ACEOF
9673if ac_fn_c_try_link "$LINENO"; then :
9674  ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
9675else
9676  ac_cv_lib_crypto_CRYPTO_new_ex_data=no
9677fi
9678rm -f core conftest.err conftest.$ac_objext \
9679    conftest$ac_exeext conftest.$ac_ext
9680LIBS=$ac_check_lib_save_LIBS
9681fi
9682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
9683$as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
9684if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
9685  cat >>confdefs.h <<_ACEOF
9686#define HAVE_LIBCRYPTO 1
9687_ACEOF
9688
9689  LIBS="-lcrypto $LIBS"
9690
9691else
9692  as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
9693fi
9694
9695     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
9696$as_echo_n "checking for SSL_new in -lssl... " >&6; }
9697if ${ac_cv_lib_ssl_SSL_new+:} false; then :
9698  $as_echo_n "(cached) " >&6
9699else
9700  ac_check_lib_save_LIBS=$LIBS
9701LIBS="-lssl  $LIBS"
9702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9703/* end confdefs.h.  */
9704
9705/* Override any GCC internal prototype to avoid an error.
9706   Use char because int might match the return type of a GCC
9707   builtin and then its argument prototype would still apply.  */
9708#ifdef __cplusplus
9709extern "C"
9710#endif
9711char SSL_new ();
9712int
9713main ()
9714{
9715return SSL_new ();
9716  ;
9717  return 0;
9718}
9719_ACEOF
9720if ac_fn_c_try_link "$LINENO"; then :
9721  ac_cv_lib_ssl_SSL_new=yes
9722else
9723  ac_cv_lib_ssl_SSL_new=no
9724fi
9725rm -f core conftest.err conftest.$ac_objext \
9726    conftest$ac_exeext conftest.$ac_ext
9727LIBS=$ac_check_lib_save_LIBS
9728fi
9729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
9730$as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
9731if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
9732  cat >>confdefs.h <<_ACEOF
9733#define HAVE_LIBSSL 1
9734_ACEOF
9735
9736  LIBS="-lssl $LIBS"
9737
9738else
9739  as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
9740fi
9741
9742  else
9743     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
9744$as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
9745if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
9746  $as_echo_n "(cached) " >&6
9747else
9748  ac_func_search_save_LIBS=$LIBS
9749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9750/* end confdefs.h.  */
9751
9752/* Override any GCC internal prototype to avoid an error.
9753   Use char because int might match the return type of a GCC
9754   builtin and then its argument prototype would still apply.  */
9755#ifdef __cplusplus
9756extern "C"
9757#endif
9758char CRYPTO_new_ex_data ();
9759int
9760main ()
9761{
9762return CRYPTO_new_ex_data ();
9763  ;
9764  return 0;
9765}
9766_ACEOF
9767for ac_lib in '' eay32 crypto; do
9768  if test -z "$ac_lib"; then
9769    ac_res="none required"
9770  else
9771    ac_res=-l$ac_lib
9772    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9773  fi
9774  if ac_fn_c_try_link "$LINENO"; then :
9775  ac_cv_search_CRYPTO_new_ex_data=$ac_res
9776fi
9777rm -f core conftest.err conftest.$ac_objext \
9778    conftest$ac_exeext
9779  if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
9780  break
9781fi
9782done
9783if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
9784
9785else
9786  ac_cv_search_CRYPTO_new_ex_data=no
9787fi
9788rm conftest.$ac_ext
9789LIBS=$ac_func_search_save_LIBS
9790fi
9791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
9792$as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
9793ac_res=$ac_cv_search_CRYPTO_new_ex_data
9794if test "$ac_res" != no; then :
9795  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9796
9797else
9798  as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
9799fi
9800
9801     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
9802$as_echo_n "checking for library containing SSL_new... " >&6; }
9803if ${ac_cv_search_SSL_new+:} false; then :
9804  $as_echo_n "(cached) " >&6
9805else
9806  ac_func_search_save_LIBS=$LIBS
9807cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9808/* end confdefs.h.  */
9809
9810/* Override any GCC internal prototype to avoid an error.
9811   Use char because int might match the return type of a GCC
9812   builtin and then its argument prototype would still apply.  */
9813#ifdef __cplusplus
9814extern "C"
9815#endif
9816char SSL_new ();
9817int
9818main ()
9819{
9820return SSL_new ();
9821  ;
9822  return 0;
9823}
9824_ACEOF
9825for ac_lib in '' ssleay32 ssl; do
9826  if test -z "$ac_lib"; then
9827    ac_res="none required"
9828  else
9829    ac_res=-l$ac_lib
9830    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9831  fi
9832  if ac_fn_c_try_link "$LINENO"; then :
9833  ac_cv_search_SSL_new=$ac_res
9834fi
9835rm -f core conftest.err conftest.$ac_objext \
9836    conftest$ac_exeext
9837  if ${ac_cv_search_SSL_new+:} false; then :
9838  break
9839fi
9840done
9841if ${ac_cv_search_SSL_new+:} false; then :
9842
9843else
9844  ac_cv_search_SSL_new=no
9845fi
9846rm conftest.$ac_ext
9847LIBS=$ac_func_search_save_LIBS
9848fi
9849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
9850$as_echo "$ac_cv_search_SSL_new" >&6; }
9851ac_res=$ac_cv_search_SSL_new
9852if test "$ac_res" != no; then :
9853  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9854
9855else
9856  as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
9857fi
9858
9859  fi
9860  for ac_func in SSL_get_current_compression
9861do :
9862  ac_fn_c_check_func "$LINENO" "SSL_get_current_compression" "ac_cv_func_SSL_get_current_compression"
9863if test "x$ac_cv_func_SSL_get_current_compression" = xyes; then :
9864  cat >>confdefs.h <<_ACEOF
9865#define HAVE_SSL_GET_CURRENT_COMPRESSION 1
9866_ACEOF
9867
9868fi
9869done
9870
9871  # Functions introduced in OpenSSL 1.1.0. We used to check for
9872  # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
9873  # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
9874  # doesn't have these OpenSSL 1.1.0 functions. So check for individual
9875  # functions.
9876  for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL
9877do :
9878  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9879ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9880if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9881  cat >>confdefs.h <<_ACEOF
9882#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9883_ACEOF
9884
9885fi
9886done
9887
9888  # OpenSSL versions before 1.1.0 required setting callback functions, for
9889  # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
9890  # function was removed.
9891  for ac_func in CRYPTO_lock
9892do :
9893  ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
9894if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
9895  cat >>confdefs.h <<_ACEOF
9896#define HAVE_CRYPTO_LOCK 1
9897_ACEOF
9898
9899fi
9900done
9901
9902fi
9903
9904if test "$with_pam" = yes ; then
9905  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
9906$as_echo_n "checking for pam_start in -lpam... " >&6; }
9907if ${ac_cv_lib_pam_pam_start+:} false; then :
9908  $as_echo_n "(cached) " >&6
9909else
9910  ac_check_lib_save_LIBS=$LIBS
9911LIBS="-lpam  $LIBS"
9912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9913/* end confdefs.h.  */
9914
9915/* Override any GCC internal prototype to avoid an error.
9916   Use char because int might match the return type of a GCC
9917   builtin and then its argument prototype would still apply.  */
9918#ifdef __cplusplus
9919extern "C"
9920#endif
9921char pam_start ();
9922int
9923main ()
9924{
9925return pam_start ();
9926  ;
9927  return 0;
9928}
9929_ACEOF
9930if ac_fn_c_try_link "$LINENO"; then :
9931  ac_cv_lib_pam_pam_start=yes
9932else
9933  ac_cv_lib_pam_pam_start=no
9934fi
9935rm -f core conftest.err conftest.$ac_objext \
9936    conftest$ac_exeext conftest.$ac_ext
9937LIBS=$ac_check_lib_save_LIBS
9938fi
9939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
9940$as_echo "$ac_cv_lib_pam_pam_start" >&6; }
9941if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
9942  cat >>confdefs.h <<_ACEOF
9943#define HAVE_LIBPAM 1
9944_ACEOF
9945
9946  LIBS="-lpam $LIBS"
9947
9948else
9949  as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
9950fi
9951
9952fi
9953
9954if test "$with_libxml" = yes ; then
9955  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
9956$as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
9957if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
9958  $as_echo_n "(cached) " >&6
9959else
9960  ac_check_lib_save_LIBS=$LIBS
9961LIBS="-lxml2  $LIBS"
9962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9963/* end confdefs.h.  */
9964
9965/* Override any GCC internal prototype to avoid an error.
9966   Use char because int might match the return type of a GCC
9967   builtin and then its argument prototype would still apply.  */
9968#ifdef __cplusplus
9969extern "C"
9970#endif
9971char xmlSaveToBuffer ();
9972int
9973main ()
9974{
9975return xmlSaveToBuffer ();
9976  ;
9977  return 0;
9978}
9979_ACEOF
9980if ac_fn_c_try_link "$LINENO"; then :
9981  ac_cv_lib_xml2_xmlSaveToBuffer=yes
9982else
9983  ac_cv_lib_xml2_xmlSaveToBuffer=no
9984fi
9985rm -f core conftest.err conftest.$ac_objext \
9986    conftest$ac_exeext conftest.$ac_ext
9987LIBS=$ac_check_lib_save_LIBS
9988fi
9989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
9990$as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
9991if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
9992  cat >>confdefs.h <<_ACEOF
9993#define HAVE_LIBXML2 1
9994_ACEOF
9995
9996  LIBS="-lxml2 $LIBS"
9997
9998else
9999  as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
10000fi
10001
10002fi
10003
10004if test "$with_libxslt" = yes ; then
10005  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
10006$as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
10007if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
10008  $as_echo_n "(cached) " >&6
10009else
10010  ac_check_lib_save_LIBS=$LIBS
10011LIBS="-lxslt  $LIBS"
10012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10013/* end confdefs.h.  */
10014
10015/* Override any GCC internal prototype to avoid an error.
10016   Use char because int might match the return type of a GCC
10017   builtin and then its argument prototype would still apply.  */
10018#ifdef __cplusplus
10019extern "C"
10020#endif
10021char xsltCleanupGlobals ();
10022int
10023main ()
10024{
10025return xsltCleanupGlobals ();
10026  ;
10027  return 0;
10028}
10029_ACEOF
10030if ac_fn_c_try_link "$LINENO"; then :
10031  ac_cv_lib_xslt_xsltCleanupGlobals=yes
10032else
10033  ac_cv_lib_xslt_xsltCleanupGlobals=no
10034fi
10035rm -f core conftest.err conftest.$ac_objext \
10036    conftest$ac_exeext conftest.$ac_ext
10037LIBS=$ac_check_lib_save_LIBS
10038fi
10039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
10040$as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
10041if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
10042  cat >>confdefs.h <<_ACEOF
10043#define HAVE_LIBXSLT 1
10044_ACEOF
10045
10046  LIBS="-lxslt $LIBS"
10047
10048else
10049  as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
10050fi
10051
10052fi
10053
10054# Note: We can test for libldap_r only after we know PTHREAD_LIBS;
10055# also, on AIX, we may need to have openssl in LIBS for this step.
10056if test "$with_ldap" = yes ; then
10057  _LIBS="$LIBS"
10058  if test "$PORTNAME" != "win32"; then
10059    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
10060$as_echo_n "checking for ldap_bind in -lldap... " >&6; }
10061if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
10062  $as_echo_n "(cached) " >&6
10063else
10064  ac_check_lib_save_LIBS=$LIBS
10065LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
10066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10067/* end confdefs.h.  */
10068
10069/* Override any GCC internal prototype to avoid an error.
10070   Use char because int might match the return type of a GCC
10071   builtin and then its argument prototype would still apply.  */
10072#ifdef __cplusplus
10073extern "C"
10074#endif
10075char ldap_bind ();
10076int
10077main ()
10078{
10079return ldap_bind ();
10080  ;
10081  return 0;
10082}
10083_ACEOF
10084if ac_fn_c_try_link "$LINENO"; then :
10085  ac_cv_lib_ldap_ldap_bind=yes
10086else
10087  ac_cv_lib_ldap_ldap_bind=no
10088fi
10089rm -f core conftest.err conftest.$ac_objext \
10090    conftest$ac_exeext conftest.$ac_ext
10091LIBS=$ac_check_lib_save_LIBS
10092fi
10093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
10094$as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
10095if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
10096  cat >>confdefs.h <<_ACEOF
10097#define HAVE_LIBLDAP 1
10098_ACEOF
10099
10100  LIBS="-lldap $LIBS"
10101
10102else
10103  as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
10104fi
10105
10106    LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
10107    if test "$enable_thread_safety" = yes; then
10108      # Use ldap_r for FE if available, else assume ldap is thread-safe.
10109      # On some platforms ldap_r fails to link without PTHREAD_LIBS.
10110      LIBS="$_LIBS"
10111      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap_r" >&5
10112$as_echo_n "checking for ldap_bind in -lldap_r... " >&6; }
10113if ${ac_cv_lib_ldap_r_ldap_bind+:} false; then :
10114  $as_echo_n "(cached) " >&6
10115else
10116  ac_check_lib_save_LIBS=$LIBS
10117LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
10118cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10119/* end confdefs.h.  */
10120
10121/* Override any GCC internal prototype to avoid an error.
10122   Use char because int might match the return type of a GCC
10123   builtin and then its argument prototype would still apply.  */
10124#ifdef __cplusplus
10125extern "C"
10126#endif
10127char ldap_bind ();
10128int
10129main ()
10130{
10131return ldap_bind ();
10132  ;
10133  return 0;
10134}
10135_ACEOF
10136if ac_fn_c_try_link "$LINENO"; then :
10137  ac_cv_lib_ldap_r_ldap_bind=yes
10138else
10139  ac_cv_lib_ldap_r_ldap_bind=no
10140fi
10141rm -f core conftest.err conftest.$ac_objext \
10142    conftest$ac_exeext conftest.$ac_ext
10143LIBS=$ac_check_lib_save_LIBS
10144fi
10145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_bind" >&5
10146$as_echo "$ac_cv_lib_ldap_r_ldap_bind" >&6; }
10147if test "x$ac_cv_lib_ldap_r_ldap_bind" = xyes; then :
10148  LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
10149else
10150  LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
10151fi
10152
10153    else
10154      LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
10155    fi
10156  else
10157    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
10158$as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
10159if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
10160  $as_echo_n "(cached) " >&6
10161else
10162  ac_check_lib_save_LIBS=$LIBS
10163LIBS="-lwldap32  $LIBS"
10164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10165/* end confdefs.h.  */
10166
10167/* Override any GCC internal prototype to avoid an error.
10168   Use char because int might match the return type of a GCC
10169   builtin and then its argument prototype would still apply.  */
10170#ifdef __cplusplus
10171extern "C"
10172#endif
10173char ldap_bind ();
10174int
10175main ()
10176{
10177return ldap_bind ();
10178  ;
10179  return 0;
10180}
10181_ACEOF
10182if ac_fn_c_try_link "$LINENO"; then :
10183  ac_cv_lib_wldap32_ldap_bind=yes
10184else
10185  ac_cv_lib_wldap32_ldap_bind=no
10186fi
10187rm -f core conftest.err conftest.$ac_objext \
10188    conftest$ac_exeext conftest.$ac_ext
10189LIBS=$ac_check_lib_save_LIBS
10190fi
10191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
10192$as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
10193if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
10194  cat >>confdefs.h <<_ACEOF
10195#define HAVE_LIBWLDAP32 1
10196_ACEOF
10197
10198  LIBS="-lwldap32 $LIBS"
10199
10200else
10201  as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
10202fi
10203
10204    LDAP_LIBS_FE="-lwldap32"
10205    LDAP_LIBS_BE="-lwldap32"
10206  fi
10207  LIBS="$_LIBS"
10208fi
10209
10210
10211
10212# for contrib/sepgsql
10213if test "$with_selinux" = yes; then
10214  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
10215$as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
10216if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
10217  $as_echo_n "(cached) " >&6
10218else
10219  ac_check_lib_save_LIBS=$LIBS
10220LIBS="-lselinux  $LIBS"
10221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10222/* end confdefs.h.  */
10223
10224/* Override any GCC internal prototype to avoid an error.
10225   Use char because int might match the return type of a GCC
10226   builtin and then its argument prototype would still apply.  */
10227#ifdef __cplusplus
10228extern "C"
10229#endif
10230char security_compute_create_name ();
10231int
10232main ()
10233{
10234return security_compute_create_name ();
10235  ;
10236  return 0;
10237}
10238_ACEOF
10239if ac_fn_c_try_link "$LINENO"; then :
10240  ac_cv_lib_selinux_security_compute_create_name=yes
10241else
10242  ac_cv_lib_selinux_security_compute_create_name=no
10243fi
10244rm -f core conftest.err conftest.$ac_objext \
10245    conftest$ac_exeext conftest.$ac_ext
10246LIBS=$ac_check_lib_save_LIBS
10247fi
10248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
10249$as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
10250if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
10251  cat >>confdefs.h <<_ACEOF
10252#define HAVE_LIBSELINUX 1
10253_ACEOF
10254
10255  LIBS="-lselinux $LIBS"
10256
10257else
10258  as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
10259fi
10260
10261fi
10262
10263# for contrib/uuid-ossp
10264if test "$with_uuid" = bsd ; then
10265  # On BSD, the UUID functions are in libc
10266  ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
10267if test "x$ac_cv_func_uuid_to_string" = xyes; then :
10268  UUID_LIBS=""
10269else
10270  as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
10271fi
10272
10273elif test "$with_uuid" = e2fs ; then
10274  # On OS X, the UUID functions are in libc
10275  ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
10276if test "x$ac_cv_func_uuid_generate" = xyes; then :
10277  UUID_LIBS=""
10278else
10279  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
10280$as_echo_n "checking for uuid_generate in -luuid... " >&6; }
10281if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
10282  $as_echo_n "(cached) " >&6
10283else
10284  ac_check_lib_save_LIBS=$LIBS
10285LIBS="-luuid  $LIBS"
10286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10287/* end confdefs.h.  */
10288
10289/* Override any GCC internal prototype to avoid an error.
10290   Use char because int might match the return type of a GCC
10291   builtin and then its argument prototype would still apply.  */
10292#ifdef __cplusplus
10293extern "C"
10294#endif
10295char uuid_generate ();
10296int
10297main ()
10298{
10299return uuid_generate ();
10300  ;
10301  return 0;
10302}
10303_ACEOF
10304if ac_fn_c_try_link "$LINENO"; then :
10305  ac_cv_lib_uuid_uuid_generate=yes
10306else
10307  ac_cv_lib_uuid_uuid_generate=no
10308fi
10309rm -f core conftest.err conftest.$ac_objext \
10310    conftest$ac_exeext conftest.$ac_ext
10311LIBS=$ac_check_lib_save_LIBS
10312fi
10313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
10314$as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
10315if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
10316  UUID_LIBS="-luuid"
10317else
10318  as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
10319fi
10320
10321fi
10322
10323elif test "$with_uuid" = ossp ; then
10324  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
10325$as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
10326if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
10327  $as_echo_n "(cached) " >&6
10328else
10329  ac_check_lib_save_LIBS=$LIBS
10330LIBS="-lossp-uuid  $LIBS"
10331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10332/* end confdefs.h.  */
10333
10334/* Override any GCC internal prototype to avoid an error.
10335   Use char because int might match the return type of a GCC
10336   builtin and then its argument prototype would still apply.  */
10337#ifdef __cplusplus
10338extern "C"
10339#endif
10340char uuid_export ();
10341int
10342main ()
10343{
10344return uuid_export ();
10345  ;
10346  return 0;
10347}
10348_ACEOF
10349if ac_fn_c_try_link "$LINENO"; then :
10350  ac_cv_lib_ossp_uuid_uuid_export=yes
10351else
10352  ac_cv_lib_ossp_uuid_uuid_export=no
10353fi
10354rm -f core conftest.err conftest.$ac_objext \
10355    conftest$ac_exeext conftest.$ac_ext
10356LIBS=$ac_check_lib_save_LIBS
10357fi
10358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
10359$as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
10360if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
10361  UUID_LIBS="-lossp-uuid"
10362else
10363  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
10364$as_echo_n "checking for uuid_export in -luuid... " >&6; }
10365if ${ac_cv_lib_uuid_uuid_export+:} false; then :
10366  $as_echo_n "(cached) " >&6
10367else
10368  ac_check_lib_save_LIBS=$LIBS
10369LIBS="-luuid  $LIBS"
10370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10371/* end confdefs.h.  */
10372
10373/* Override any GCC internal prototype to avoid an error.
10374   Use char because int might match the return type of a GCC
10375   builtin and then its argument prototype would still apply.  */
10376#ifdef __cplusplus
10377extern "C"
10378#endif
10379char uuid_export ();
10380int
10381main ()
10382{
10383return uuid_export ();
10384  ;
10385  return 0;
10386}
10387_ACEOF
10388if ac_fn_c_try_link "$LINENO"; then :
10389  ac_cv_lib_uuid_uuid_export=yes
10390else
10391  ac_cv_lib_uuid_uuid_export=no
10392fi
10393rm -f core conftest.err conftest.$ac_objext \
10394    conftest$ac_exeext conftest.$ac_ext
10395LIBS=$ac_check_lib_save_LIBS
10396fi
10397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
10398$as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
10399if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
10400  UUID_LIBS="-luuid"
10401else
10402  as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
10403fi
10404
10405fi
10406
10407fi
10408
10409
10410
10411##
10412## Header files
10413##
10414
10415for ac_header in atomic.h crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h pwd.h sys/epoll.h sys/ioctl.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/socket.h sys/sockio.h sys/tas.h sys/time.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h
10416do :
10417  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10418ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10419if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10420  cat >>confdefs.h <<_ACEOF
10421#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10422_ACEOF
10423
10424fi
10425
10426done
10427
10428
10429# On BSD, test for net/if.h will fail unless sys/socket.h
10430# is included first.
10431for ac_header in net/if.h
10432do :
10433  ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
10434#ifdef HAVE_SYS_SOCKET_H
10435#include <sys/socket.h>
10436#endif
10437
10438"
10439if test "x$ac_cv_header_net_if_h" = xyes; then :
10440  cat >>confdefs.h <<_ACEOF
10441#define HAVE_NET_IF_H 1
10442_ACEOF
10443
10444fi
10445
10446done
10447
10448
10449# On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
10450# is included first.
10451for ac_header in sys/ucred.h
10452do :
10453  ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
10454#include <sys/param.h>
10455
10456"
10457if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
10458  cat >>confdefs.h <<_ACEOF
10459#define HAVE_SYS_UCRED_H 1
10460_ACEOF
10461
10462fi
10463
10464done
10465
10466
10467# At least on IRIX, test for netinet/tcp.h will fail unless
10468# netinet/in.h is included first.
10469for ac_header in netinet/in.h
10470do :
10471  ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
10472if test "x$ac_cv_header_netinet_in_h" = xyes; then :
10473  cat >>confdefs.h <<_ACEOF
10474#define HAVE_NETINET_IN_H 1
10475_ACEOF
10476
10477fi
10478
10479done
10480
10481for ac_header in netinet/tcp.h
10482do :
10483  ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
10484#ifdef HAVE_NETINET_IN_H
10485#include <netinet/in.h>
10486#endif
10487
10488"
10489if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
10490  cat >>confdefs.h <<_ACEOF
10491#define HAVE_NETINET_TCP_H 1
10492_ACEOF
10493
10494fi
10495
10496done
10497
10498
10499if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
10500  for ac_header in readline/readline.h
10501do :
10502  ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
10503if test "x$ac_cv_header_readline_readline_h" = xyes; then :
10504  cat >>confdefs.h <<_ACEOF
10505#define HAVE_READLINE_READLINE_H 1
10506_ACEOF
10507
10508else
10509  for ac_header in readline.h
10510do :
10511  ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
10512if test "x$ac_cv_header_readline_h" = xyes; then :
10513  cat >>confdefs.h <<_ACEOF
10514#define HAVE_READLINE_H 1
10515_ACEOF
10516
10517else
10518  as_fn_error $? "readline header not found
10519If you have readline already installed, see config.log for details on the
10520failure.  It is possible the compiler isn't looking in the proper directory.
10521Use --without-readline to disable readline support." "$LINENO" 5
10522fi
10523
10524done
10525
10526fi
10527
10528done
10529
10530  for ac_header in readline/history.h
10531do :
10532  ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
10533if test "x$ac_cv_header_readline_history_h" = xyes; then :
10534  cat >>confdefs.h <<_ACEOF
10535#define HAVE_READLINE_HISTORY_H 1
10536_ACEOF
10537
10538else
10539  for ac_header in history.h
10540do :
10541  ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
10542if test "x$ac_cv_header_history_h" = xyes; then :
10543  cat >>confdefs.h <<_ACEOF
10544#define HAVE_HISTORY_H 1
10545_ACEOF
10546
10547else
10548  as_fn_error $? "history header not found
10549If you have readline already installed, see config.log for details on the
10550failure.  It is possible the compiler isn't looking in the proper directory.
10551Use --without-readline to disable readline support." "$LINENO" 5
10552fi
10553
10554done
10555
10556fi
10557
10558done
10559
10560fi
10561
10562if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
10563# Some installations of libedit usurp /usr/include/readline/, which seems
10564# bad practice, since in combined installations readline will have its headers
10565# there.  We might have to resort to AC_EGREP checks to make sure we found
10566# the proper header...
10567  for ac_header in editline/readline.h
10568do :
10569  ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
10570if test "x$ac_cv_header_editline_readline_h" = xyes; then :
10571  cat >>confdefs.h <<_ACEOF
10572#define HAVE_EDITLINE_READLINE_H 1
10573_ACEOF
10574
10575else
10576  for ac_header in readline.h
10577do :
10578  ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
10579if test "x$ac_cv_header_readline_h" = xyes; then :
10580  cat >>confdefs.h <<_ACEOF
10581#define HAVE_READLINE_H 1
10582_ACEOF
10583
10584else
10585  for ac_header in readline/readline.h
10586do :
10587  ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
10588if test "x$ac_cv_header_readline_readline_h" = xyes; then :
10589  cat >>confdefs.h <<_ACEOF
10590#define HAVE_READLINE_READLINE_H 1
10591_ACEOF
10592
10593else
10594  as_fn_error $? "readline header not found
10595If you have libedit already installed, see config.log for details on the
10596failure.  It is possible the compiler isn't looking in the proper directory.
10597Use --without-readline to disable libedit support." "$LINENO" 5
10598fi
10599
10600done
10601
10602fi
10603
10604done
10605
10606fi
10607
10608done
10609
10610# Note: in a libedit installation, history.h is sometimes a dummy, and may
10611# not be there at all.  Hence, don't complain if not found.  We must check
10612# though, since in yet other versions it is an independent header.
10613  for ac_header in editline/history.h
10614do :
10615  ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
10616if test "x$ac_cv_header_editline_history_h" = xyes; then :
10617  cat >>confdefs.h <<_ACEOF
10618#define HAVE_EDITLINE_HISTORY_H 1
10619_ACEOF
10620
10621else
10622  for ac_header in history.h
10623do :
10624  ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
10625if test "x$ac_cv_header_history_h" = xyes; then :
10626  cat >>confdefs.h <<_ACEOF
10627#define HAVE_HISTORY_H 1
10628_ACEOF
10629
10630else
10631  for ac_header in readline/history.h
10632do :
10633  ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
10634if test "x$ac_cv_header_readline_history_h" = xyes; then :
10635  cat >>confdefs.h <<_ACEOF
10636#define HAVE_READLINE_HISTORY_H 1
10637_ACEOF
10638
10639fi
10640
10641done
10642
10643fi
10644
10645done
10646
10647fi
10648
10649done
10650
10651fi
10652
10653if test "$with_zlib" = yes; then
10654  ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
10655if test "x$ac_cv_header_zlib_h" = xyes; then :
10656
10657else
10658  as_fn_error $? "zlib header not found
10659If you have zlib already installed, see config.log for details on the
10660failure.  It is possible the compiler isn't looking in the proper directory.
10661Use --without-zlib to disable zlib support." "$LINENO" 5
10662fi
10663
10664
10665fi
10666
10667if test "$with_gssapi" = yes ; then
10668  for ac_header in gssapi/gssapi.h
10669do :
10670  ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
10671if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
10672  cat >>confdefs.h <<_ACEOF
10673#define HAVE_GSSAPI_GSSAPI_H 1
10674_ACEOF
10675
10676else
10677  for ac_header in gssapi.h
10678do :
10679  ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
10680if test "x$ac_cv_header_gssapi_h" = xyes; then :
10681  cat >>confdefs.h <<_ACEOF
10682#define HAVE_GSSAPI_H 1
10683_ACEOF
10684
10685else
10686  as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
10687fi
10688
10689done
10690
10691fi
10692
10693done
10694
10695fi
10696
10697if test "$with_openssl" = yes ; then
10698  ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
10699if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
10700
10701else
10702  as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
10703fi
10704
10705
10706  ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
10707if test "x$ac_cv_header_openssl_err_h" = xyes; then :
10708
10709else
10710  as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
10711fi
10712
10713
10714fi
10715
10716if test "$with_pam" = yes ; then
10717  for ac_header in security/pam_appl.h
10718do :
10719  ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
10720if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
10721  cat >>confdefs.h <<_ACEOF
10722#define HAVE_SECURITY_PAM_APPL_H 1
10723_ACEOF
10724
10725else
10726  for ac_header in pam/pam_appl.h
10727do :
10728  ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
10729if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
10730  cat >>confdefs.h <<_ACEOF
10731#define HAVE_PAM_PAM_APPL_H 1
10732_ACEOF
10733
10734else
10735  as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
10736fi
10737
10738done
10739
10740fi
10741
10742done
10743
10744fi
10745
10746if test "$with_bsd_auth" = yes ; then
10747  ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
10748if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
10749
10750else
10751  as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
10752fi
10753
10754
10755fi
10756
10757if test "$with_systemd" = yes ; then
10758  ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
10759if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
10760
10761else
10762  as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
10763fi
10764
10765
10766fi
10767
10768if test "$with_libxml" = yes ; then
10769  ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
10770if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
10771
10772else
10773  as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
10774fi
10775
10776
10777fi
10778
10779if test "$with_libxslt" = yes ; then
10780  ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
10781if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
10782
10783else
10784  as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
10785fi
10786
10787
10788fi
10789
10790if test "$with_ldap" = yes ; then
10791  if test "$PORTNAME" != "win32"; then
10792     for ac_header in ldap.h
10793do :
10794  ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
10795if test "x$ac_cv_header_ldap_h" = xyes; then :
10796  cat >>confdefs.h <<_ACEOF
10797#define HAVE_LDAP_H 1
10798_ACEOF
10799
10800else
10801  as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
10802fi
10803
10804done
10805
10806     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
10807$as_echo_n "checking for compatible LDAP implementation... " >&6; }
10808if ${pgac_cv_ldap_safe+:} false; then :
10809  $as_echo_n "(cached) " >&6
10810else
10811  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10812/* end confdefs.h.  */
10813#include <ldap.h>
10814#if !defined(LDAP_VENDOR_VERSION) || \
10815     (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
10816      LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
10817choke me
10818#endif
10819int
10820main ()
10821{
10822
10823  ;
10824  return 0;
10825}
10826_ACEOF
10827if ac_fn_c_try_compile "$LINENO"; then :
10828  pgac_cv_ldap_safe=yes
10829else
10830  pgac_cv_ldap_safe=no
10831fi
10832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10833fi
10834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
10835$as_echo "$pgac_cv_ldap_safe" >&6; }
10836
10837if test "$pgac_cv_ldap_safe" != yes; then
10838  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10839*** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
10840*** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
10841*** also uses LDAP will crash on exit." >&5
10842$as_echo "$as_me: WARNING:
10843*** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
10844*** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
10845*** also uses LDAP will crash on exit." >&2;}
10846fi
10847  else
10848     for ac_header in winldap.h
10849do :
10850  ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
10851#include <windows.h>
10852
10853"
10854if test "x$ac_cv_header_winldap_h" = xyes; then :
10855  cat >>confdefs.h <<_ACEOF
10856#define HAVE_WINLDAP_H 1
10857_ACEOF
10858
10859else
10860  as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
10861fi
10862
10863done
10864
10865  fi
10866fi
10867
10868if test "$with_bonjour" = yes ; then
10869  ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
10870if test "x$ac_cv_header_dns_sd_h" = xyes; then :
10871
10872else
10873  as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
10874fi
10875
10876
10877fi
10878
10879# for contrib/uuid-ossp
10880if test "$with_uuid" = bsd ; then
10881  for ac_header in uuid.h
10882do :
10883  ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
10884if test "x$ac_cv_header_uuid_h" = xyes; then :
10885  cat >>confdefs.h <<_ACEOF
10886#define HAVE_UUID_H 1
10887_ACEOF
10888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10889/* end confdefs.h.  */
10890#include <uuid.h>
10891
10892_ACEOF
10893if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10894  $EGREP "uuid_to_string" >/dev/null 2>&1; then :
10895
10896else
10897  as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
10898fi
10899rm -f conftest*
10900
10901else
10902  as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
10903fi
10904
10905done
10906
10907elif test "$with_uuid" = e2fs ; then
10908  for ac_header in uuid/uuid.h
10909do :
10910  ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
10911if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
10912  cat >>confdefs.h <<_ACEOF
10913#define HAVE_UUID_UUID_H 1
10914_ACEOF
10915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10916/* end confdefs.h.  */
10917#include <uuid/uuid.h>
10918
10919_ACEOF
10920if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10921  $EGREP "uuid_generate" >/dev/null 2>&1; then :
10922
10923else
10924  as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
10925fi
10926rm -f conftest*
10927
10928else
10929  for ac_header in uuid.h
10930do :
10931  ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
10932if test "x$ac_cv_header_uuid_h" = xyes; then :
10933  cat >>confdefs.h <<_ACEOF
10934#define HAVE_UUID_H 1
10935_ACEOF
10936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10937/* end confdefs.h.  */
10938#include <uuid.h>
10939
10940_ACEOF
10941if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10942  $EGREP "uuid_generate" >/dev/null 2>&1; then :
10943
10944else
10945  as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
10946fi
10947rm -f conftest*
10948
10949else
10950  as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
10951fi
10952
10953done
10954
10955fi
10956
10957done
10958
10959elif test "$with_uuid" = ossp ; then
10960  for ac_header in ossp/uuid.h
10961do :
10962  ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
10963if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
10964  cat >>confdefs.h <<_ACEOF
10965#define HAVE_OSSP_UUID_H 1
10966_ACEOF
10967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10968/* end confdefs.h.  */
10969#include <ossp/uuid.h>
10970
10971_ACEOF
10972if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10973  $EGREP "uuid_export" >/dev/null 2>&1; then :
10974
10975else
10976  as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
10977fi
10978rm -f conftest*
10979
10980else
10981  for ac_header in uuid.h
10982do :
10983  ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
10984if test "x$ac_cv_header_uuid_h" = xyes; then :
10985  cat >>confdefs.h <<_ACEOF
10986#define HAVE_UUID_H 1
10987_ACEOF
10988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10989/* end confdefs.h.  */
10990#include <uuid.h>
10991
10992_ACEOF
10993if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10994  $EGREP "uuid_export" >/dev/null 2>&1; then :
10995
10996else
10997  as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
10998fi
10999rm -f conftest*
11000
11001else
11002  as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
11003fi
11004
11005done
11006
11007fi
11008
11009done
11010
11011fi
11012
11013if test "$PORTNAME" = "win32" ; then
11014   for ac_header in crtdefs.h
11015do :
11016  ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
11017if test "x$ac_cv_header_crtdefs_h" = xyes; then :
11018  cat >>confdefs.h <<_ACEOF
11019#define HAVE_CRTDEFS_H 1
11020_ACEOF
11021
11022fi
11023
11024done
11025
11026fi
11027
11028##
11029## Types, structures, compiler characteristics
11030##
11031
11032  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11033$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11034if ${ac_cv_c_bigendian+:} false; then :
11035  $as_echo_n "(cached) " >&6
11036else
11037  ac_cv_c_bigendian=unknown
11038    # See if we're dealing with a universal compiler.
11039    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11040/* end confdefs.h.  */
11041#ifndef __APPLE_CC__
11042	       not a universal capable compiler
11043	     #endif
11044	     typedef int dummy;
11045
11046_ACEOF
11047if ac_fn_c_try_compile "$LINENO"; then :
11048
11049	# Check for potential -arch flags.  It is not universal unless
11050	# there are at least two -arch flags with different values.
11051	ac_arch=
11052	ac_prev=
11053	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11054	 if test -n "$ac_prev"; then
11055	   case $ac_word in
11056	     i?86 | x86_64 | ppc | ppc64)
11057	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11058		 ac_arch=$ac_word
11059	       else
11060		 ac_cv_c_bigendian=universal
11061		 break
11062	       fi
11063	       ;;
11064	   esac
11065	   ac_prev=
11066	 elif test "x$ac_word" = "x-arch"; then
11067	   ac_prev=arch
11068	 fi
11069       done
11070fi
11071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11072    if test $ac_cv_c_bigendian = unknown; then
11073      # See if sys/param.h defines the BYTE_ORDER macro.
11074      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11075/* end confdefs.h.  */
11076#include <sys/types.h>
11077	     #include <sys/param.h>
11078
11079int
11080main ()
11081{
11082#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11083		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11084		     && LITTLE_ENDIAN)
11085	      bogus endian macros
11086	     #endif
11087
11088  ;
11089  return 0;
11090}
11091_ACEOF
11092if ac_fn_c_try_compile "$LINENO"; then :
11093  # It does; now see whether it defined to BIG_ENDIAN or not.
11094	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11095/* end confdefs.h.  */
11096#include <sys/types.h>
11097		#include <sys/param.h>
11098
11099int
11100main ()
11101{
11102#if BYTE_ORDER != BIG_ENDIAN
11103		 not big endian
11104		#endif
11105
11106  ;
11107  return 0;
11108}
11109_ACEOF
11110if ac_fn_c_try_compile "$LINENO"; then :
11111  ac_cv_c_bigendian=yes
11112else
11113  ac_cv_c_bigendian=no
11114fi
11115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11116fi
11117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11118    fi
11119    if test $ac_cv_c_bigendian = unknown; then
11120      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11121      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11122/* end confdefs.h.  */
11123#include <limits.h>
11124
11125int
11126main ()
11127{
11128#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11129	      bogus endian macros
11130	     #endif
11131
11132  ;
11133  return 0;
11134}
11135_ACEOF
11136if ac_fn_c_try_compile "$LINENO"; then :
11137  # It does; now see whether it defined to _BIG_ENDIAN or not.
11138	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11139/* end confdefs.h.  */
11140#include <limits.h>
11141
11142int
11143main ()
11144{
11145#ifndef _BIG_ENDIAN
11146		 not big endian
11147		#endif
11148
11149  ;
11150  return 0;
11151}
11152_ACEOF
11153if ac_fn_c_try_compile "$LINENO"; then :
11154  ac_cv_c_bigendian=yes
11155else
11156  ac_cv_c_bigendian=no
11157fi
11158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11159fi
11160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11161    fi
11162    if test $ac_cv_c_bigendian = unknown; then
11163      # Compile a test program.
11164      if test "$cross_compiling" = yes; then :
11165  # Try to guess by grepping values from an object file.
11166	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11167/* end confdefs.h.  */
11168short int ascii_mm[] =
11169		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11170		short int ascii_ii[] =
11171		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11172		int use_ascii (int i) {
11173		  return ascii_mm[i] + ascii_ii[i];
11174		}
11175		short int ebcdic_ii[] =
11176		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11177		short int ebcdic_mm[] =
11178		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11179		int use_ebcdic (int i) {
11180		  return ebcdic_mm[i] + ebcdic_ii[i];
11181		}
11182		extern int foo;
11183
11184int
11185main ()
11186{
11187return use_ascii (foo) == use_ebcdic (foo);
11188  ;
11189  return 0;
11190}
11191_ACEOF
11192if ac_fn_c_try_compile "$LINENO"; then :
11193  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11194	      ac_cv_c_bigendian=yes
11195	    fi
11196	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11197	      if test "$ac_cv_c_bigendian" = unknown; then
11198		ac_cv_c_bigendian=no
11199	      else
11200		# finding both strings is unlikely to happen, but who knows?
11201		ac_cv_c_bigendian=unknown
11202	      fi
11203	    fi
11204fi
11205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11206else
11207  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11208/* end confdefs.h.  */
11209$ac_includes_default
11210int
11211main ()
11212{
11213
11214	     /* Are we little or big endian?  From Harbison&Steele.  */
11215	     union
11216	     {
11217	       long int l;
11218	       char c[sizeof (long int)];
11219	     } u;
11220	     u.l = 1;
11221	     return u.c[sizeof (long int) - 1] == 1;
11222
11223  ;
11224  return 0;
11225}
11226_ACEOF
11227if ac_fn_c_try_run "$LINENO"; then :
11228  ac_cv_c_bigendian=no
11229else
11230  ac_cv_c_bigendian=yes
11231fi
11232rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11233  conftest.$ac_objext conftest.beam conftest.$ac_ext
11234fi
11235
11236    fi
11237fi
11238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11239$as_echo "$ac_cv_c_bigendian" >&6; }
11240 case $ac_cv_c_bigendian in #(
11241   yes)
11242     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11243;; #(
11244   no)
11245      ;; #(
11246   universal)
11247
11248$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11249
11250     ;; #(
11251   *)
11252     as_fn_error $? "unknown endianness
11253 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11254 esac
11255
11256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11257$as_echo_n "checking for inline... " >&6; }
11258if ${ac_cv_c_inline+:} false; then :
11259  $as_echo_n "(cached) " >&6
11260else
11261  ac_cv_c_inline=no
11262for ac_kw in inline __inline__ __inline; do
11263  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11264/* end confdefs.h.  */
11265#ifndef __cplusplus
11266typedef int foo_t;
11267static $ac_kw foo_t static_foo () {return 0; }
11268$ac_kw foo_t foo () {return 0; }
11269#endif
11270
11271_ACEOF
11272if ac_fn_c_try_compile "$LINENO"; then :
11273  ac_cv_c_inline=$ac_kw
11274fi
11275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11276  test "$ac_cv_c_inline" != no && break
11277done
11278
11279fi
11280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11281$as_echo "$ac_cv_c_inline" >&6; }
11282
11283case $ac_cv_c_inline in
11284  inline | yes) ;;
11285  *)
11286    case $ac_cv_c_inline in
11287      no) ac_val=;;
11288      *) ac_val=$ac_cv_c_inline;;
11289    esac
11290    cat >>confdefs.h <<_ACEOF
11291#ifndef __cplusplus
11292#define inline $ac_val
11293#endif
11294_ACEOF
11295    ;;
11296esac
11297
11298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
11299$as_echo_n "checking for printf format archetype... " >&6; }
11300if ${pgac_cv_printf_archetype+:} false; then :
11301  $as_echo_n "(cached) " >&6
11302else
11303  ac_save_c_werror_flag=$ac_c_werror_flag
11304ac_c_werror_flag=yes
11305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11306/* end confdefs.h.  */
11307extern int
11308pgac_write(int ignore, const char *fmt,...)
11309__attribute__((format(gnu_printf, 2, 3)));
11310int
11311main ()
11312{
11313
11314  ;
11315  return 0;
11316}
11317_ACEOF
11318if ac_fn_c_try_compile "$LINENO"; then :
11319  pgac_cv_printf_archetype=gnu_printf
11320else
11321  pgac_cv_printf_archetype=printf
11322fi
11323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11324ac_c_werror_flag=$ac_save_c_werror_flag
11325fi
11326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
11327$as_echo "$pgac_cv_printf_archetype" >&6; }
11328
11329cat >>confdefs.h <<_ACEOF
11330#define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
11331_ACEOF
11332
11333
11334
11335  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
11336$as_echo_n "checking for flexible array members... " >&6; }
11337if ${ac_cv_c_flexmember+:} false; then :
11338  $as_echo_n "(cached) " >&6
11339else
11340  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11341/* end confdefs.h.  */
11342#include <stdlib.h>
11343	    #include <stdio.h>
11344	    #include <stddef.h>
11345	    struct s { int n; double d[]; };
11346int
11347main ()
11348{
11349int m = getchar ();
11350	    struct s *p = malloc (offsetof (struct s, d)
11351				  + m * sizeof (double));
11352	    p->d[0] = 0.0;
11353	    return p->d != (double *) NULL;
11354  ;
11355  return 0;
11356}
11357_ACEOF
11358if ac_fn_c_try_compile "$LINENO"; then :
11359  ac_cv_c_flexmember=yes
11360else
11361  ac_cv_c_flexmember=no
11362fi
11363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11364fi
11365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
11366$as_echo "$ac_cv_c_flexmember" >&6; }
11367  if test $ac_cv_c_flexmember = yes; then
11368
11369$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
11370
11371  else
11372    $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
11373
11374  fi
11375
11376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
11377$as_echo_n "checking for signed types... " >&6; }
11378if ${pgac_cv_c_signed+:} false; then :
11379  $as_echo_n "(cached) " >&6
11380else
11381  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11382/* end confdefs.h.  */
11383
11384int
11385main ()
11386{
11387signed char c; signed short s; signed int i;
11388  ;
11389  return 0;
11390}
11391_ACEOF
11392if ac_fn_c_try_compile "$LINENO"; then :
11393  pgac_cv_c_signed=yes
11394else
11395  pgac_cv_c_signed=no
11396fi
11397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11398fi
11399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
11400$as_echo "$pgac_cv_c_signed" >&6; }
11401if test x"$pgac_cv_c_signed" = xno ; then
11402
11403$as_echo "#define signed /**/" >>confdefs.h
11404
11405fi
11406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
11407$as_echo_n "checking for __func__... " >&6; }
11408if ${pgac_cv_funcname_func_support+:} false; then :
11409  $as_echo_n "(cached) " >&6
11410else
11411  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11412/* end confdefs.h.  */
11413#include <stdio.h>
11414int
11415main ()
11416{
11417printf("%s\n", __func__);
11418  ;
11419  return 0;
11420}
11421_ACEOF
11422if ac_fn_c_try_compile "$LINENO"; then :
11423  pgac_cv_funcname_func_support=yes
11424else
11425  pgac_cv_funcname_func_support=no
11426fi
11427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11428fi
11429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
11430$as_echo "$pgac_cv_funcname_func_support" >&6; }
11431if test x"$pgac_cv_funcname_func_support" = xyes ; then
11432
11433$as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
11434
11435else
11436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
11437$as_echo_n "checking for __FUNCTION__... " >&6; }
11438if ${pgac_cv_funcname_function_support+:} false; then :
11439  $as_echo_n "(cached) " >&6
11440else
11441  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11442/* end confdefs.h.  */
11443#include <stdio.h>
11444int
11445main ()
11446{
11447printf("%s\n", __FUNCTION__);
11448  ;
11449  return 0;
11450}
11451_ACEOF
11452if ac_fn_c_try_compile "$LINENO"; then :
11453  pgac_cv_funcname_function_support=yes
11454else
11455  pgac_cv_funcname_function_support=no
11456fi
11457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11458fi
11459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
11460$as_echo "$pgac_cv_funcname_function_support" >&6; }
11461if test x"$pgac_cv_funcname_function_support" = xyes ; then
11462
11463$as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
11464
11465fi
11466fi
11467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
11468$as_echo_n "checking for _Static_assert... " >&6; }
11469if ${pgac_cv__static_assert+:} false; then :
11470  $as_echo_n "(cached) " >&6
11471else
11472  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11473/* end confdefs.h.  */
11474
11475int
11476main ()
11477{
11478({ _Static_assert(1, "foo"); })
11479  ;
11480  return 0;
11481}
11482_ACEOF
11483if ac_fn_c_try_link "$LINENO"; then :
11484  pgac_cv__static_assert=yes
11485else
11486  pgac_cv__static_assert=no
11487fi
11488rm -f core conftest.err conftest.$ac_objext \
11489    conftest$ac_exeext conftest.$ac_ext
11490fi
11491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
11492$as_echo "$pgac_cv__static_assert" >&6; }
11493if test x"$pgac_cv__static_assert" = xyes ; then
11494
11495$as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
11496
11497fi
11498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
11499$as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
11500if ${pgac_cv__types_compatible+:} false; then :
11501  $as_echo_n "(cached) " >&6
11502else
11503  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11504/* end confdefs.h.  */
11505
11506int
11507main ()
11508{
11509 int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
11510  ;
11511  return 0;
11512}
11513_ACEOF
11514if ac_fn_c_try_compile "$LINENO"; then :
11515  pgac_cv__types_compatible=yes
11516else
11517  pgac_cv__types_compatible=no
11518fi
11519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11520fi
11521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
11522$as_echo "$pgac_cv__types_compatible" >&6; }
11523if test x"$pgac_cv__types_compatible" = xyes ; then
11524
11525$as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
11526
11527fi
11528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
11529$as_echo_n "checking for __builtin_bswap32... " >&6; }
11530if ${pgac_cv__builtin_bswap32+:} false; then :
11531  $as_echo_n "(cached) " >&6
11532else
11533  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11534/* end confdefs.h.  */
11535static unsigned long int x = __builtin_bswap32(0xaabbccdd);
11536
11537_ACEOF
11538if ac_fn_c_try_compile "$LINENO"; then :
11539  pgac_cv__builtin_bswap32=yes
11540else
11541  pgac_cv__builtin_bswap32=no
11542fi
11543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11544fi
11545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
11546$as_echo "$pgac_cv__builtin_bswap32" >&6; }
11547if test x"$pgac_cv__builtin_bswap32" = xyes ; then
11548
11549$as_echo "#define HAVE__BUILTIN_BSWAP32 1" >>confdefs.h
11550
11551fi
11552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
11553$as_echo_n "checking for __builtin_bswap64... " >&6; }
11554if ${pgac_cv__builtin_bswap64+:} false; then :
11555  $as_echo_n "(cached) " >&6
11556else
11557  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11558/* end confdefs.h.  */
11559static unsigned long int x = __builtin_bswap64(0xaabbccddeeff0011);
11560
11561_ACEOF
11562if ac_fn_c_try_compile "$LINENO"; then :
11563  pgac_cv__builtin_bswap64=yes
11564else
11565  pgac_cv__builtin_bswap64=no
11566fi
11567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11568fi
11569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
11570$as_echo "$pgac_cv__builtin_bswap64" >&6; }
11571if test x"$pgac_cv__builtin_bswap64" = xyes ; then
11572
11573$as_echo "#define HAVE__BUILTIN_BSWAP64 1" >>confdefs.h
11574
11575fi
11576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
11577$as_echo_n "checking for __builtin_constant_p... " >&6; }
11578if ${pgac_cv__builtin_constant_p+:} false; then :
11579  $as_echo_n "(cached) " >&6
11580else
11581  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11582/* end confdefs.h.  */
11583static int x; static int y[__builtin_constant_p(x) ? x : 1];
11584
11585_ACEOF
11586if ac_fn_c_try_compile "$LINENO"; then :
11587  pgac_cv__builtin_constant_p=yes
11588else
11589  pgac_cv__builtin_constant_p=no
11590fi
11591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11592fi
11593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
11594$as_echo "$pgac_cv__builtin_constant_p" >&6; }
11595if test x"$pgac_cv__builtin_constant_p" = xyes ; then
11596
11597$as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
11598
11599fi
11600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
11601$as_echo_n "checking for __builtin_unreachable... " >&6; }
11602if ${pgac_cv__builtin_unreachable+:} false; then :
11603  $as_echo_n "(cached) " >&6
11604else
11605  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11606/* end confdefs.h.  */
11607
11608int
11609main ()
11610{
11611__builtin_unreachable();
11612  ;
11613  return 0;
11614}
11615_ACEOF
11616if ac_fn_c_try_link "$LINENO"; then :
11617  pgac_cv__builtin_unreachable=yes
11618else
11619  pgac_cv__builtin_unreachable=no
11620fi
11621rm -f core conftest.err conftest.$ac_objext \
11622    conftest$ac_exeext conftest.$ac_ext
11623fi
11624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
11625$as_echo "$pgac_cv__builtin_unreachable" >&6; }
11626if test x"$pgac_cv__builtin_unreachable" = xyes ; then
11627
11628$as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
11629
11630fi
11631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__" >&5
11632$as_echo_n "checking for __VA_ARGS__... " >&6; }
11633if ${pgac_cv__va_args+:} false; then :
11634  $as_echo_n "(cached) " >&6
11635else
11636  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11637/* end confdefs.h.  */
11638#include <stdio.h>
11639int
11640main ()
11641{
11642#define debug(...) fprintf(stderr, __VA_ARGS__)
11643debug("%s", "blarg");
11644
11645  ;
11646  return 0;
11647}
11648_ACEOF
11649if ac_fn_c_try_compile "$LINENO"; then :
11650  pgac_cv__va_args=yes
11651else
11652  pgac_cv__va_args=no
11653fi
11654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11655fi
11656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__va_args" >&5
11657$as_echo "$pgac_cv__va_args" >&6; }
11658if test x"$pgac_cv__va_args" = xyes ; then
11659
11660$as_echo "#define HAVE__VA_ARGS 1" >>confdefs.h
11661
11662fi
11663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11664$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
11665if ${ac_cv_struct_tm+:} false; then :
11666  $as_echo_n "(cached) " >&6
11667else
11668  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11669/* end confdefs.h.  */
11670#include <sys/types.h>
11671#include <time.h>
11672
11673int
11674main ()
11675{
11676struct tm tm;
11677				     int *p = &tm.tm_sec;
11678				     return !p;
11679  ;
11680  return 0;
11681}
11682_ACEOF
11683if ac_fn_c_try_compile "$LINENO"; then :
11684  ac_cv_struct_tm=time.h
11685else
11686  ac_cv_struct_tm=sys/time.h
11687fi
11688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11689fi
11690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11691$as_echo "$ac_cv_struct_tm" >&6; }
11692if test $ac_cv_struct_tm = sys/time.h; then
11693
11694$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
11695
11696fi
11697
11698ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
11699#include <$ac_cv_struct_tm>
11700
11701"
11702if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
11703
11704cat >>confdefs.h <<_ACEOF
11705#define HAVE_STRUCT_TM_TM_ZONE 1
11706_ACEOF
11707
11708
11709fi
11710
11711if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11712
11713$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
11714
11715fi
11716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11717$as_echo_n "checking for tzname... " >&6; }
11718if ${ac_cv_var_tzname+:} false; then :
11719  $as_echo_n "(cached) " >&6
11720else
11721  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11722/* end confdefs.h.  */
11723#include <time.h>
11724#ifndef tzname /* For SGI.  */
11725extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
11726#endif
11727
11728int
11729main ()
11730{
11731atoi(*tzname);
11732  ;
11733  return 0;
11734}
11735_ACEOF
11736if ac_fn_c_try_link "$LINENO"; then :
11737  ac_cv_var_tzname=yes
11738else
11739  ac_cv_var_tzname=no
11740fi
11741rm -f core conftest.err conftest.$ac_objext \
11742    conftest$ac_exeext conftest.$ac_ext
11743fi
11744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11745$as_echo "$ac_cv_var_tzname" >&6; }
11746if test $ac_cv_var_tzname = yes; then
11747
11748$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
11749
11750fi
11751
11752ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
11753#include <sys/ipc.h>
11754#include <sys/sem.h>
11755"
11756if test "x$ac_cv_type_union_semun" = xyes; then :
11757
11758cat >>confdefs.h <<_ACEOF
11759#define HAVE_UNION_SEMUN 1
11760_ACEOF
11761
11762
11763fi
11764
11765ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
11766#ifdef HAVE_SYS_UN_H
11767#include <sys/un.h>
11768#endif
11769
11770"
11771if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
11772
11773$as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
11774
11775fi
11776
11777ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
11778#ifdef HAVE_SYS_SOCKET_H
11779#include <sys/socket.h>
11780#endif
11781
11782"
11783if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
11784
11785cat >>confdefs.h <<_ACEOF
11786#define HAVE_STRUCT_SOCKADDR_STORAGE 1
11787_ACEOF
11788
11789
11790fi
11791
11792ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
11793#ifdef HAVE_SYS_SOCKET_H
11794#include <sys/socket.h>
11795#endif
11796
11797"
11798if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
11799
11800cat >>confdefs.h <<_ACEOF
11801#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
11802_ACEOF
11803
11804
11805fi
11806ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
11807#ifdef HAVE_SYS_SOCKET_H
11808#include <sys/socket.h>
11809#endif
11810
11811"
11812if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
11813
11814cat >>confdefs.h <<_ACEOF
11815#define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
11816_ACEOF
11817
11818
11819fi
11820ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
11821#ifdef HAVE_SYS_SOCKET_H
11822#include <sys/socket.h>
11823#endif
11824
11825"
11826if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
11827
11828cat >>confdefs.h <<_ACEOF
11829#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
11830_ACEOF
11831
11832
11833fi
11834ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
11835#ifdef HAVE_SYS_SOCKET_H
11836#include <sys/socket.h>
11837#endif
11838
11839"
11840if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
11841
11842cat >>confdefs.h <<_ACEOF
11843#define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
11844_ACEOF
11845
11846
11847fi
11848ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
11849#ifdef HAVE_SYS_SOCKET_H
11850#include <sys/socket.h>
11851#endif
11852
11853"
11854if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
11855
11856cat >>confdefs.h <<_ACEOF
11857#define HAVE_STRUCT_SOCKADDR_SA_LEN 1
11858_ACEOF
11859
11860
11861fi
11862
11863ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
11864#include <sys/socket.h>
11865#include <netdb.h>
11866
11867"
11868if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
11869
11870cat >>confdefs.h <<_ACEOF
11871#define HAVE_STRUCT_ADDRINFO 1
11872_ACEOF
11873
11874
11875fi
11876
11877
11878  ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
11879if test "x$ac_cv_type_intptr_t" = xyes; then :
11880
11881$as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
11882
11883else
11884  for ac_type in 'int' 'long int' 'long long int'; do
11885       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11886/* end confdefs.h.  */
11887$ac_includes_default
11888int
11889main ()
11890{
11891static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
11892test_array [0] = 0;
11893return test_array [0];
11894
11895  ;
11896  return 0;
11897}
11898_ACEOF
11899if ac_fn_c_try_compile "$LINENO"; then :
11900
11901cat >>confdefs.h <<_ACEOF
11902#define intptr_t $ac_type
11903_ACEOF
11904
11905	  ac_type=
11906fi
11907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11908       test -z "$ac_type" && break
11909     done
11910fi
11911
11912
11913
11914  ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
11915if test "x$ac_cv_type_uintptr_t" = xyes; then :
11916
11917$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
11918
11919else
11920  for ac_type in 'unsigned int' 'unsigned long int' \
11921	'unsigned long long int'; do
11922       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11923/* end confdefs.h.  */
11924$ac_includes_default
11925int
11926main ()
11927{
11928static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
11929test_array [0] = 0;
11930return test_array [0];
11931
11932  ;
11933  return 0;
11934}
11935_ACEOF
11936if ac_fn_c_try_compile "$LINENO"; then :
11937
11938cat >>confdefs.h <<_ACEOF
11939#define uintptr_t $ac_type
11940_ACEOF
11941
11942	  ac_type=
11943fi
11944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11945       test -z "$ac_type" && break
11946     done
11947fi
11948
11949
11950
11951  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
11952$as_echo_n "checking for unsigned long long int... " >&6; }
11953if ${ac_cv_type_unsigned_long_long_int+:} false; then :
11954  $as_echo_n "(cached) " >&6
11955else
11956  ac_cv_type_unsigned_long_long_int=yes
11957     if test "x${ac_cv_prog_cc_c99-no}" = xno; then
11958       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11959/* end confdefs.h.  */
11960
11961  /* For now, do not test the preprocessor; as of 2007 there are too many
11962	 implementations with broken preprocessors.  Perhaps this can
11963	 be revisited in 2012.  In the meantime, code should not expect
11964	 #if to work with literals wider than 32 bits.  */
11965      /* Test literals.  */
11966      long long int ll = 9223372036854775807ll;
11967      long long int nll = -9223372036854775807LL;
11968      unsigned long long int ull = 18446744073709551615ULL;
11969      /* Test constant expressions.   */
11970      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
11971		     ? 1 : -1)];
11972      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
11973		     ? 1 : -1)];
11974      int i = 63;
11975int
11976main ()
11977{
11978/* Test availability of runtime routines for shift and division.  */
11979      long long int llmax = 9223372036854775807ll;
11980      unsigned long long int ullmax = 18446744073709551615ull;
11981      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
11982	      | (llmax / ll) | (llmax % ll)
11983	      | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
11984	      | (ullmax / ull) | (ullmax % ull));
11985  ;
11986  return 0;
11987}
11988
11989_ACEOF
11990if ac_fn_c_try_link "$LINENO"; then :
11991
11992else
11993  ac_cv_type_unsigned_long_long_int=no
11994fi
11995rm -f core conftest.err conftest.$ac_objext \
11996    conftest$ac_exeext conftest.$ac_ext
11997     fi
11998fi
11999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
12000$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
12001  if test $ac_cv_type_unsigned_long_long_int = yes; then
12002
12003$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
12004
12005  fi
12006
12007
12008
12009  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
12010$as_echo_n "checking for long long int... " >&6; }
12011if ${ac_cv_type_long_long_int+:} false; then :
12012  $as_echo_n "(cached) " >&6
12013else
12014  ac_cv_type_long_long_int=yes
12015      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12016	ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
12017	if test $ac_cv_type_long_long_int = yes; then
12018	  	  	  	  if test "$cross_compiling" = yes; then :
12019  :
12020else
12021  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12022/* end confdefs.h.  */
12023#include <limits.h>
12024		 #ifndef LLONG_MAX
12025		 # define HALF \
12026			  (1LL << (sizeof (long long int) * CHAR_BIT - 2))
12027		 # define LLONG_MAX (HALF - 1 + HALF)
12028		 #endif
12029int
12030main ()
12031{
12032long long int n = 1;
12033		 int i;
12034		 for (i = 0; ; i++)
12035		   {
12036		     long long int m = n << i;
12037		     if (m >> i != n)
12038		       return 1;
12039		     if (LLONG_MAX / 2 < m)
12040		       break;
12041		   }
12042		 return 0;
12043  ;
12044  return 0;
12045}
12046_ACEOF
12047if ac_fn_c_try_run "$LINENO"; then :
12048
12049else
12050  ac_cv_type_long_long_int=no
12051fi
12052rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12053  conftest.$ac_objext conftest.beam conftest.$ac_ext
12054fi
12055
12056	fi
12057      fi
12058fi
12059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
12060$as_echo "$ac_cv_type_long_long_int" >&6; }
12061  if test $ac_cv_type_long_long_int = yes; then
12062
12063$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
12064
12065  fi
12066
12067
12068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
12069$as_echo_n "checking for locale_t... " >&6; }
12070if ${pgac_cv_type_locale_t+:} false; then :
12071  $as_echo_n "(cached) " >&6
12072else
12073  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12074/* end confdefs.h.  */
12075#include <locale.h>
12076locale_t x;
12077int
12078main ()
12079{
12080
12081  ;
12082  return 0;
12083}
12084_ACEOF
12085if ac_fn_c_try_compile "$LINENO"; then :
12086  pgac_cv_type_locale_t=yes
12087else
12088  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12089/* end confdefs.h.  */
12090#include <xlocale.h>
12091locale_t x;
12092int
12093main ()
12094{
12095
12096  ;
12097  return 0;
12098}
12099_ACEOF
12100if ac_fn_c_try_compile "$LINENO"; then :
12101  pgac_cv_type_locale_t='yes (in xlocale.h)'
12102else
12103  pgac_cv_type_locale_t=no
12104fi
12105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12106fi
12107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12108fi
12109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
12110$as_echo "$pgac_cv_type_locale_t" >&6; }
12111if test "$pgac_cv_type_locale_t" != no; then
12112
12113$as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
12114
12115fi
12116if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
12117
12118$as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
12119
12120fi
12121
12122ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
12123#include <sys/param.h>
12124#ifdef HAVE_SYS_UCRED_H
12125#include <sys/ucred.h>
12126#endif
12127"
12128if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
12129
12130cat >>confdefs.h <<_ACEOF
12131#define HAVE_STRUCT_CMSGCRED 1
12132_ACEOF
12133
12134
12135fi
12136
12137
12138ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
12139#include <getopt.h>
12140#endif
12141"
12142if test "x$ac_cv_type_struct_option" = xyes; then :
12143
12144cat >>confdefs.h <<_ACEOF
12145#define HAVE_STRUCT_OPTION 1
12146_ACEOF
12147
12148
12149fi
12150
12151
12152if test "$with_zlib" = yes; then
12153  # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
12154  # did not).  While we could work around the lack of z_streamp, it
12155  # seems unwise to encourage people to use such old zlib versions...
12156  ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
12157"
12158if test "x$ac_cv_type_z_streamp" = xyes; then :
12159
12160else
12161  as_fn_error $? "zlib version is too old
12162Use --without-zlib to disable zlib support." "$LINENO" 5
12163fi
12164
12165fi
12166
12167# On PPC, check if assembler supports LWARX instruction's mutex hint bit
12168case $host_cpu in
12169  ppc*|powerpc*)
12170    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
12171$as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
12172    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12173/* end confdefs.h.  */
12174
12175int
12176main ()
12177{
12178int a = 0; int *p = &a; int r;
12179	 __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
12180  ;
12181  return 0;
12182}
12183_ACEOF
12184if ac_fn_c_try_compile "$LINENO"; then :
12185  pgac_cv_have_ppc_mutex_hint=yes
12186else
12187  pgac_cv_have_ppc_mutex_hint=no
12188fi
12189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12190    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
12191$as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
12192    if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
12193
12194$as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
12195
12196    fi
12197  ;;
12198esac
12199
12200# Check largefile support.  You might think this is a system service not a
12201# compiler characteristic, but you'd be wrong.  We must check this before
12202# probing existence of related functions such as fseeko, since the largefile
12203# defines can affect what is generated for that.
12204if test "$PORTNAME" != "win32"; then
12205   # Check whether --enable-largefile was given.
12206if test "${enable_largefile+set}" = set; then :
12207  enableval=$enable_largefile;
12208fi
12209
12210if test "$enable_largefile" != no; then
12211
12212  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
12213$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
12214if ${ac_cv_sys_largefile_CC+:} false; then :
12215  $as_echo_n "(cached) " >&6
12216else
12217  ac_cv_sys_largefile_CC=no
12218     if test "$GCC" != yes; then
12219       ac_save_CC=$CC
12220       while :; do
12221	 # IRIX 6.2 and later do not support large files by default,
12222	 # so use the C compiler's -n32 option if that helps.
12223	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12224/* end confdefs.h.  */
12225#include <sys/types.h>
12226 /* Check that off_t can represent 2**63 - 1 correctly.
12227    We can't simply define LARGE_OFF_T to be 9223372036854775807,
12228    since some C++ compilers masquerading as C compilers
12229    incorrectly reject 9223372036854775807.  */
12230#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12231  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12232		       && LARGE_OFF_T % 2147483647 == 1)
12233		      ? 1 : -1];
12234int
12235main ()
12236{
12237
12238  ;
12239  return 0;
12240}
12241_ACEOF
12242	 if ac_fn_c_try_compile "$LINENO"; then :
12243  break
12244fi
12245rm -f core conftest.err conftest.$ac_objext
12246	 CC="$CC -n32"
12247	 if ac_fn_c_try_compile "$LINENO"; then :
12248  ac_cv_sys_largefile_CC=' -n32'; break
12249fi
12250rm -f core conftest.err conftest.$ac_objext
12251	 break
12252       done
12253       CC=$ac_save_CC
12254       rm -f conftest.$ac_ext
12255    fi
12256fi
12257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
12258$as_echo "$ac_cv_sys_largefile_CC" >&6; }
12259  if test "$ac_cv_sys_largefile_CC" != no; then
12260    CC=$CC$ac_cv_sys_largefile_CC
12261  fi
12262
12263  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12264$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
12265if ${ac_cv_sys_file_offset_bits+:} false; then :
12266  $as_echo_n "(cached) " >&6
12267else
12268  while :; do
12269  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12270/* end confdefs.h.  */
12271#include <sys/types.h>
12272 /* Check that off_t can represent 2**63 - 1 correctly.
12273    We can't simply define LARGE_OFF_T to be 9223372036854775807,
12274    since some C++ compilers masquerading as C compilers
12275    incorrectly reject 9223372036854775807.  */
12276#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12277  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12278		       && LARGE_OFF_T % 2147483647 == 1)
12279		      ? 1 : -1];
12280int
12281main ()
12282{
12283
12284  ;
12285  return 0;
12286}
12287_ACEOF
12288if ac_fn_c_try_compile "$LINENO"; then :
12289  ac_cv_sys_file_offset_bits=no; break
12290fi
12291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12292  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12293/* end confdefs.h.  */
12294#define _FILE_OFFSET_BITS 64
12295#include <sys/types.h>
12296 /* Check that off_t can represent 2**63 - 1 correctly.
12297    We can't simply define LARGE_OFF_T to be 9223372036854775807,
12298    since some C++ compilers masquerading as C compilers
12299    incorrectly reject 9223372036854775807.  */
12300#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12301  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12302		       && LARGE_OFF_T % 2147483647 == 1)
12303		      ? 1 : -1];
12304int
12305main ()
12306{
12307
12308  ;
12309  return 0;
12310}
12311_ACEOF
12312if ac_fn_c_try_compile "$LINENO"; then :
12313  ac_cv_sys_file_offset_bits=64; break
12314fi
12315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12316  ac_cv_sys_file_offset_bits=unknown
12317  break
12318done
12319fi
12320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
12321$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
12322case $ac_cv_sys_file_offset_bits in #(
12323  no | unknown) ;;
12324  *)
12325cat >>confdefs.h <<_ACEOF
12326#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12327_ACEOF
12328;;
12329esac
12330rm -rf conftest*
12331  if test $ac_cv_sys_file_offset_bits = unknown; then
12332    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
12333$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
12334if ${ac_cv_sys_large_files+:} false; then :
12335  $as_echo_n "(cached) " >&6
12336else
12337  while :; do
12338  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12339/* end confdefs.h.  */
12340#include <sys/types.h>
12341 /* Check that off_t can represent 2**63 - 1 correctly.
12342    We can't simply define LARGE_OFF_T to be 9223372036854775807,
12343    since some C++ compilers masquerading as C compilers
12344    incorrectly reject 9223372036854775807.  */
12345#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12346  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12347		       && LARGE_OFF_T % 2147483647 == 1)
12348		      ? 1 : -1];
12349int
12350main ()
12351{
12352
12353  ;
12354  return 0;
12355}
12356_ACEOF
12357if ac_fn_c_try_compile "$LINENO"; then :
12358  ac_cv_sys_large_files=no; break
12359fi
12360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12361  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12362/* end confdefs.h.  */
12363#define _LARGE_FILES 1
12364#include <sys/types.h>
12365 /* Check that off_t can represent 2**63 - 1 correctly.
12366    We can't simply define LARGE_OFF_T to be 9223372036854775807,
12367    since some C++ compilers masquerading as C compilers
12368    incorrectly reject 9223372036854775807.  */
12369#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12370  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12371		       && LARGE_OFF_T % 2147483647 == 1)
12372		      ? 1 : -1];
12373int
12374main ()
12375{
12376
12377  ;
12378  return 0;
12379}
12380_ACEOF
12381if ac_fn_c_try_compile "$LINENO"; then :
12382  ac_cv_sys_large_files=1; break
12383fi
12384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12385  ac_cv_sys_large_files=unknown
12386  break
12387done
12388fi
12389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
12390$as_echo "$ac_cv_sys_large_files" >&6; }
12391case $ac_cv_sys_large_files in #(
12392  no | unknown) ;;
12393  *)
12394cat >>confdefs.h <<_ACEOF
12395#define _LARGE_FILES $ac_cv_sys_large_files
12396_ACEOF
12397;;
12398esac
12399rm -rf conftest*
12400  fi
12401
12402
12403fi
12404
12405
12406fi
12407
12408# Check for largefile support (must be after AC_SYS_LARGEFILE)
12409# The cast to long int works around a bug in the HP C Compiler
12410# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12411# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12412# This bug is HP SR number 8606223364.
12413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
12414$as_echo_n "checking size of off_t... " >&6; }
12415if ${ac_cv_sizeof_off_t+:} false; then :
12416  $as_echo_n "(cached) " >&6
12417else
12418  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
12419
12420else
12421  if test "$ac_cv_type_off_t" = yes; then
12422     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12423$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12424as_fn_error 77 "cannot compute sizeof (off_t)
12425See \`config.log' for more details" "$LINENO" 5; }
12426   else
12427     ac_cv_sizeof_off_t=0
12428   fi
12429fi
12430
12431fi
12432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
12433$as_echo "$ac_cv_sizeof_off_t" >&6; }
12434
12435
12436
12437cat >>confdefs.h <<_ACEOF
12438#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
12439_ACEOF
12440
12441
12442
12443# If we don't have largefile support, can't handle segsize >= 2GB.
12444if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
12445   as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
12446fi
12447
12448
12449##
12450## Functions, global variables
12451##
12452
12453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
12454$as_echo_n "checking for int timezone... " >&6; }
12455if ${pgac_cv_var_int_timezone+:} false; then :
12456  $as_echo_n "(cached) " >&6
12457else
12458  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12459/* end confdefs.h.  */
12460#include <time.h>
12461int res;
12462int
12463main ()
12464{
12465#ifndef __CYGWIN__
12466res = timezone / 60;
12467#else
12468res = _timezone / 60;
12469#endif
12470  ;
12471  return 0;
12472}
12473_ACEOF
12474if ac_fn_c_try_link "$LINENO"; then :
12475  pgac_cv_var_int_timezone=yes
12476else
12477  pgac_cv_var_int_timezone=no
12478fi
12479rm -f core conftest.err conftest.$ac_objext \
12480    conftest$ac_exeext conftest.$ac_ext
12481fi
12482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
12483$as_echo "$pgac_cv_var_int_timezone" >&6; }
12484if test x"$pgac_cv_var_int_timezone" = xyes ; then
12485
12486$as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
12487
12488fi
12489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
12490$as_echo_n "checking types of arguments for accept()... " >&6; }
12491 if ${ac_cv_func_accept_return+:} false; then :
12492  $as_echo_n "(cached) " >&6
12493else
12494   if ${ac_cv_func_accept_arg1+:} false; then :
12495  $as_echo_n "(cached) " >&6
12496else
12497    if ${ac_cv_func_accept_arg2+:} false; then :
12498  $as_echo_n "(cached) " >&6
12499else
12500     if ${ac_cv_func_accept_arg3+:} false; then :
12501  $as_echo_n "(cached) " >&6
12502else
12503      for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
12504      for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
12505       for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
12506        for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
12507         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12508/* end confdefs.h.  */
12509#ifdef HAVE_SYS_TYPES_H
12510#include <sys/types.h>
12511#endif
12512#ifdef HAVE_SYS_SOCKET_H
12513#include <sys/socket.h>
12514#endif
12515extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
12516_ACEOF
12517if ac_fn_c_try_compile "$LINENO"; then :
12518  ac_not_found=no; break 4
12519else
12520  ac_not_found=yes
12521fi
12522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12523       done
12524      done
12525     done
12526    done
12527    if test "$ac_not_found" = yes; then
12528      as_fn_error $? "could not determine argument types" "$LINENO" 5
12529    fi
12530    if test "$ac_cv_func_accept_arg3" = "void"; then
12531      ac_cv_func_accept_arg3=int
12532    fi
12533
12534fi
12535
12536fi
12537
12538fi
12539
12540fi
12541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&5
12542$as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
12543
12544cat >>confdefs.h <<_ACEOF
12545#define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
12546_ACEOF
12547
12548
12549cat >>confdefs.h <<_ACEOF
12550#define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
12551_ACEOF
12552
12553
12554cat >>confdefs.h <<_ACEOF
12555#define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
12556_ACEOF
12557
12558
12559cat >>confdefs.h <<_ACEOF
12560#define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
12561_ACEOF
12562
12563
12564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
12565$as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
12566if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
12567  $as_echo_n "(cached) " >&6
12568else
12569  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12570/* end confdefs.h.  */
12571#include <sys/time.h>
12572int
12573main ()
12574{
12575struct timeval *tp;
12576struct timezone *tzp;
12577gettimeofday(tp,tzp);
12578  ;
12579  return 0;
12580}
12581_ACEOF
12582if ac_fn_c_try_compile "$LINENO"; then :
12583  pgac_cv_func_gettimeofday_1arg=no
12584else
12585  pgac_cv_func_gettimeofday_1arg=yes
12586fi
12587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12588fi
12589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
12590$as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
12591if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
12592
12593$as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
12594
12595fi
12596
12597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
12598$as_echo_n "checking for wcstombs_l declaration... " >&6; }
12599if ${pgac_cv_func_wcstombs_l+:} false; then :
12600  $as_echo_n "(cached) " >&6
12601else
12602  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12603/* end confdefs.h.  */
12604#include <stdlib.h>
12605#include <locale.h>
12606int
12607main ()
12608{
12609#ifndef wcstombs_l
12610(void) wcstombs_l;
12611#endif
12612  ;
12613  return 0;
12614}
12615_ACEOF
12616if ac_fn_c_try_compile "$LINENO"; then :
12617  pgac_cv_func_wcstombs_l='yes'
12618else
12619  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12620/* end confdefs.h.  */
12621#include <stdlib.h>
12622#include <locale.h>
12623#include <xlocale.h>
12624int
12625main ()
12626{
12627#ifndef wcstombs_l
12628(void) wcstombs_l;
12629#endif
12630  ;
12631  return 0;
12632}
12633_ACEOF
12634if ac_fn_c_try_compile "$LINENO"; then :
12635  pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
12636else
12637  pgac_cv_func_wcstombs_l='no'
12638fi
12639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12640fi
12641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12642fi
12643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
12644$as_echo "$pgac_cv_func_wcstombs_l" >&6; }
12645if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
12646
12647$as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
12648
12649fi
12650
12651# Some versions of libedit contain strlcpy(), setproctitle(), and other
12652# symbols that that library has no business exposing to the world.  Pending
12653# acquisition of a clue by those developers, ignore libedit (including its
12654# possible alias of libreadline) while checking for everything else.
12655LIBS_including_readline="$LIBS"
12656LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
12657
12658for ac_func in cbrt dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate pstat pthread_is_threaded_np readlink setproctitle setsid shm_open strsignal symlink sync_file_range towlower uselocale utime utimes wcstombs wcstombs_l
12659do :
12660  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12661ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12662if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12663  cat >>confdefs.h <<_ACEOF
12664#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12665_ACEOF
12666
12667fi
12668done
12669
12670
12671ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
12672if test "x$ac_cv_func_fseeko" = xyes; then :
12673  $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
12674
12675else
12676  case " $LIBOBJS " in
12677  *" fseeko.$ac_objext "* ) ;;
12678  *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
12679 ;;
12680esac
12681
12682fi
12683
12684
12685case $host_os in
12686	# NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
12687	# Mingw uses macros to access Win32 API calls
12688	netbsd*|mingw*)
12689
12690$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
12691
12692		ac_cv_func_fseeko=yes;;
12693	*)
12694		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12695$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
12696if ${ac_cv_sys_largefile_source+:} false; then :
12697  $as_echo_n "(cached) " >&6
12698else
12699  while :; do
12700  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12701/* end confdefs.h.  */
12702#include <sys/types.h> /* for off_t */
12703     #include <stdio.h>
12704int
12705main ()
12706{
12707int (*fp) (FILE *, off_t, int) = fseeko;
12708     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
12709  ;
12710  return 0;
12711}
12712_ACEOF
12713if ac_fn_c_try_link "$LINENO"; then :
12714  ac_cv_sys_largefile_source=no; break
12715fi
12716rm -f core conftest.err conftest.$ac_objext \
12717    conftest$ac_exeext conftest.$ac_ext
12718  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12719/* end confdefs.h.  */
12720#define _LARGEFILE_SOURCE 1
12721#include <sys/types.h> /* for off_t */
12722     #include <stdio.h>
12723int
12724main ()
12725{
12726int (*fp) (FILE *, off_t, int) = fseeko;
12727     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
12728  ;
12729  return 0;
12730}
12731_ACEOF
12732if ac_fn_c_try_link "$LINENO"; then :
12733  ac_cv_sys_largefile_source=1; break
12734fi
12735rm -f core conftest.err conftest.$ac_objext \
12736    conftest$ac_exeext conftest.$ac_ext
12737  ac_cv_sys_largefile_source=unknown
12738  break
12739done
12740fi
12741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
12742$as_echo "$ac_cv_sys_largefile_source" >&6; }
12743case $ac_cv_sys_largefile_source in #(
12744  no | unknown) ;;
12745  *)
12746cat >>confdefs.h <<_ACEOF
12747#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12748_ACEOF
12749;;
12750esac
12751rm -rf conftest*
12752
12753# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12754# in glibc 2.1.3, but that breaks too many other things.
12755# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12756if test $ac_cv_sys_largefile_source != unknown; then
12757
12758$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
12759
12760fi
12761;;
12762esac
12763
12764# posix_fadvise() is a no-op on Solaris, so don't incur function overhead
12765# by calling it, 2009-04-02
12766# http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
12767# The Clang compiler raises a warning for an undeclared identifier that matches
12768# a compiler builtin function.  All extant Clang versions are affected, as of
12769# Clang 3.6.0.  Test a builtin known to every version.  This problem affects the
12770# C and Objective C languages, but Clang does report an error under C++ and
12771# Objective C++.
12772#
12773# Passing -fno-builtin to the compiler would suppress this problem.  That
12774# strategy would have the advantage of being insensitive to stray warnings, but
12775# it would make tests less realistic.
12776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
12777$as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
12778if ${ac_cv_c_decl_report+:} false; then :
12779  $as_echo_n "(cached) " >&6
12780else
12781  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12782/* end confdefs.h.  */
12783
12784int
12785main ()
12786{
12787(void) strchr;
12788  ;
12789  return 0;
12790}
12791_ACEOF
12792if ac_fn_c_try_compile "$LINENO"; then :
12793  if test -s conftest.err; then :
12794      # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
12795    # valid AC_CHECK_DECL input.  No library function is consistently available
12796    # on freestanding implementations, so test against a dummy declaration.
12797    # Include always-available headers on the off chance that they somehow
12798    # elicit warnings.
12799    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12800/* end confdefs.h.  */
12801#include <float.h>
12802#include <limits.h>
12803#include <stdarg.h>
12804#include <stddef.h>
12805extern void ac_decl (int, char *);
12806int
12807main ()
12808{
12809#ifdef __cplusplus
12810  (void) ac_decl ((int) 0, (char *) 0);
12811  (void) ac_decl;
12812#else
12813  (void) ac_decl;
12814#endif
12815
12816  ;
12817  return 0;
12818}
12819_ACEOF
12820if ac_fn_c_try_compile "$LINENO"; then :
12821  if test -s conftest.err; then :
12822  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12823$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12824as_fn_error $? "cannot detect from compiler exit status or warnings
12825See \`config.log' for more details" "$LINENO" 5; }
12826else
12827  ac_cv_c_decl_report=warning
12828fi
12829else
12830  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12831$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12832as_fn_error $? "cannot compile a simple declaration test
12833See \`config.log' for more details" "$LINENO" 5; }
12834fi
12835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12836else
12837  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12838$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12839as_fn_error $? "compiler does not report undeclared identifiers
12840See \`config.log' for more details" "$LINENO" 5; }
12841fi
12842else
12843  ac_cv_c_decl_report=error
12844fi
12845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12846fi
12847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
12848$as_echo "$ac_cv_c_decl_report" >&6; }
12849
12850case $ac_cv_c_decl_report in
12851  warning) ac_c_decl_warn_flag=yes ;;
12852  *) ac_c_decl_warn_flag= ;;
12853esac
12854
12855if test "$PORTNAME" != "solaris"; then :
12856
12857for ac_func in posix_fadvise
12858do :
12859  ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
12860if test "x$ac_cv_func_posix_fadvise" = xyes; then :
12861  cat >>confdefs.h <<_ACEOF
12862#define HAVE_POSIX_FADVISE 1
12863_ACEOF
12864
12865fi
12866done
12867
12868ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
12869"
12870if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
12871  ac_have_decl=1
12872else
12873  ac_have_decl=0
12874fi
12875
12876cat >>confdefs.h <<_ACEOF
12877#define HAVE_DECL_POSIX_FADVISE $ac_have_decl
12878_ACEOF
12879
12880
12881fi # fi
12882
12883ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
12884"
12885if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
12886  ac_have_decl=1
12887else
12888  ac_have_decl=0
12889fi
12890
12891cat >>confdefs.h <<_ACEOF
12892#define HAVE_DECL_FDATASYNC $ac_have_decl
12893_ACEOF
12894
12895ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
12896if test "x$ac_cv_have_decl_strlcat" = xyes; then :
12897  ac_have_decl=1
12898else
12899  ac_have_decl=0
12900fi
12901
12902cat >>confdefs.h <<_ACEOF
12903#define HAVE_DECL_STRLCAT $ac_have_decl
12904_ACEOF
12905ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
12906if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
12907  ac_have_decl=1
12908else
12909  ac_have_decl=0
12910fi
12911
12912cat >>confdefs.h <<_ACEOF
12913#define HAVE_DECL_STRLCPY $ac_have_decl
12914_ACEOF
12915ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
12916if test "x$ac_cv_have_decl_strnlen" = xyes; then :
12917  ac_have_decl=1
12918else
12919  ac_have_decl=0
12920fi
12921
12922cat >>confdefs.h <<_ACEOF
12923#define HAVE_DECL_STRNLEN $ac_have_decl
12924_ACEOF
12925
12926# This is probably only present on Darwin, but may as well check always
12927ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
12928"
12929if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
12930  ac_have_decl=1
12931else
12932  ac_have_decl=0
12933fi
12934
12935cat >>confdefs.h <<_ACEOF
12936#define HAVE_DECL_F_FULLFSYNC $ac_have_decl
12937_ACEOF
12938
12939
12940HAVE_IPV6=no
12941ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
12942#include <netinet/in.h>
12943"
12944if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
12945
12946$as_echo "#define HAVE_IPV6 1" >>confdefs.h
12947
12948         HAVE_IPV6=yes
12949fi
12950
12951
12952
12953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
12954$as_echo_n "checking for PS_STRINGS... " >&6; }
12955if ${pgac_cv_var_PS_STRINGS+:} false; then :
12956  $as_echo_n "(cached) " >&6
12957else
12958  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12959/* end confdefs.h.  */
12960#include <machine/vmparam.h>
12961#include <sys/exec.h>
12962
12963int
12964main ()
12965{
12966PS_STRINGS->ps_nargvstr = 1;
12967PS_STRINGS->ps_argvstr = "foo";
12968  ;
12969  return 0;
12970}
12971_ACEOF
12972if ac_fn_c_try_link "$LINENO"; then :
12973  pgac_cv_var_PS_STRINGS=yes
12974else
12975  pgac_cv_var_PS_STRINGS=no
12976fi
12977rm -f core conftest.err conftest.$ac_objext \
12978    conftest$ac_exeext conftest.$ac_ext
12979fi
12980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
12981$as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
12982if test "$pgac_cv_var_PS_STRINGS" = yes ; then
12983
12984$as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
12985
12986fi
12987
12988
12989# We use our snprintf.c emulation if either snprintf() or vsnprintf()
12990# is missing.  Yes, there are machines that have only one.  We may
12991# also decide to use snprintf.c if snprintf() is present but does not
12992# have all the features we need --- see below.
12993
12994if test "$PORTNAME" = "win32"; then
12995  # Win32 gets snprintf.c built unconditionally.
12996  #
12997  # To properly translate all NLS languages strings, we must support the
12998  # *printf() %$ format, which allows *printf() arguments to be selected
12999  # by position in the translated string.
13000  #
13001  # libintl versions < 0.13 use the native *printf() functions, and Win32
13002  # *printf() doesn't understand %$, so we must use our /port versions,
13003  # which do understand %$. libintl versions >= 0.13 include their own
13004  # *printf versions on Win32.  The libintl 0.13 release note text is:
13005  #
13006  #   C format strings with positions, as they arise when a translator
13007  #   needs to reorder a sentence, are now supported on all platforms.
13008  #   On those few platforms (NetBSD and Woe32) for which the native
13009  #   printf()/fprintf()/... functions don't support such format
13010  #   strings, replacements are provided through <libintl.h>.
13011  #
13012  # We could use libintl >= 0.13's *printf() if we were sure that we had
13013  # a litint >= 0.13 at runtime, but seeing that there is no clean way
13014  # to guarantee that, it is best to just use our own, so we are sure to
13015  # get %$ support. In include/port.h we disable the *printf() macros
13016  # that might have been defined by libintl.
13017  #
13018  # We do this unconditionally whether NLS is used or not so we are sure
13019  # that all Win32 libraries and binaries behave the same.
13020  pgac_need_repl_snprintf=yes
13021else
13022  pgac_need_repl_snprintf=no
13023  for ac_func in snprintf
13024do :
13025  ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
13026if test "x$ac_cv_func_snprintf" = xyes; then :
13027  cat >>confdefs.h <<_ACEOF
13028#define HAVE_SNPRINTF 1
13029_ACEOF
13030
13031else
13032  pgac_need_repl_snprintf=yes
13033fi
13034done
13035
13036  for ac_func in vsnprintf
13037do :
13038  ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
13039if test "x$ac_cv_func_vsnprintf" = xyes; then :
13040  cat >>confdefs.h <<_ACEOF
13041#define HAVE_VSNPRINTF 1
13042_ACEOF
13043
13044else
13045  pgac_need_repl_snprintf=yes
13046fi
13047done
13048
13049fi
13050
13051
13052# Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
13053# include/c.h will provide declarations.  Note this is a separate test
13054# from whether the functions exist in the C library --- there are
13055# systems that have the functions but don't bother to declare them :-(
13056
13057ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
13058if test "x$ac_cv_have_decl_snprintf" = xyes; then :
13059  ac_have_decl=1
13060else
13061  ac_have_decl=0
13062fi
13063
13064cat >>confdefs.h <<_ACEOF
13065#define HAVE_DECL_SNPRINTF $ac_have_decl
13066_ACEOF
13067ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
13068if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
13069  ac_have_decl=1
13070else
13071  ac_have_decl=0
13072fi
13073
13074cat >>confdefs.h <<_ACEOF
13075#define HAVE_DECL_VSNPRINTF $ac_have_decl
13076_ACEOF
13077
13078
13079
13080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
13081$as_echo_n "checking for isinf... " >&6; }
13082if ${ac_cv_func_isinf+:} false; then :
13083  $as_echo_n "(cached) " >&6
13084else
13085  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13086/* end confdefs.h.  */
13087
13088#include <math.h>
13089double glob_double;
13090
13091int
13092main ()
13093{
13094return isinf(glob_double) ? 0 : 1;
13095  ;
13096  return 0;
13097}
13098_ACEOF
13099if ac_fn_c_try_link "$LINENO"; then :
13100  ac_cv_func_isinf=yes
13101else
13102  ac_cv_func_isinf=no
13103fi
13104rm -f core conftest.err conftest.$ac_objext \
13105    conftest$ac_exeext conftest.$ac_ext
13106fi
13107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
13108$as_echo "$ac_cv_func_isinf" >&6; }
13109
13110if test $ac_cv_func_isinf = yes ; then
13111
13112$as_echo "#define HAVE_ISINF 1" >>confdefs.h
13113
13114else
13115  case " $LIBOBJS " in
13116  *" isinf.$ac_objext "* ) ;;
13117  *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
13118 ;;
13119esac
13120
13121  # Look for a way to implement a substitute for isinf()
13122  for ac_func in fpclass fp_class fp_class_d class
13123do :
13124  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13125ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13126if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13127  cat >>confdefs.h <<_ACEOF
13128#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13129_ACEOF
13130 break
13131fi
13132done
13133
13134fi
13135
13136ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
13137if test "x$ac_cv_func_crypt" = xyes; then :
13138  $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
13139
13140else
13141  case " $LIBOBJS " in
13142  *" crypt.$ac_objext "* ) ;;
13143  *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
13144 ;;
13145esac
13146
13147fi
13148
13149ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
13150if test "x$ac_cv_func_fls" = xyes; then :
13151  $as_echo "#define HAVE_FLS 1" >>confdefs.h
13152
13153else
13154  case " $LIBOBJS " in
13155  *" fls.$ac_objext "* ) ;;
13156  *) LIBOBJS="$LIBOBJS fls.$ac_objext"
13157 ;;
13158esac
13159
13160fi
13161
13162ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
13163if test "x$ac_cv_func_getopt" = xyes; then :
13164  $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
13165
13166else
13167  case " $LIBOBJS " in
13168  *" getopt.$ac_objext "* ) ;;
13169  *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
13170 ;;
13171esac
13172
13173fi
13174
13175ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
13176if test "x$ac_cv_func_getrusage" = xyes; then :
13177  $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
13178
13179else
13180  case " $LIBOBJS " in
13181  *" getrusage.$ac_objext "* ) ;;
13182  *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
13183 ;;
13184esac
13185
13186fi
13187
13188ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
13189if test "x$ac_cv_func_inet_aton" = xyes; then :
13190  $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
13191
13192else
13193  case " $LIBOBJS " in
13194  *" inet_aton.$ac_objext "* ) ;;
13195  *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
13196 ;;
13197esac
13198
13199fi
13200
13201ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
13202if test "x$ac_cv_func_mkdtemp" = xyes; then :
13203  $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
13204
13205else
13206  case " $LIBOBJS " in
13207  *" mkdtemp.$ac_objext "* ) ;;
13208  *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
13209 ;;
13210esac
13211
13212fi
13213
13214ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
13215if test "x$ac_cv_func_random" = xyes; then :
13216  $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
13217
13218else
13219  case " $LIBOBJS " in
13220  *" random.$ac_objext "* ) ;;
13221  *) LIBOBJS="$LIBOBJS random.$ac_objext"
13222 ;;
13223esac
13224
13225fi
13226
13227ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
13228if test "x$ac_cv_func_rint" = xyes; then :
13229  $as_echo "#define HAVE_RINT 1" >>confdefs.h
13230
13231else
13232  case " $LIBOBJS " in
13233  *" rint.$ac_objext "* ) ;;
13234  *) LIBOBJS="$LIBOBJS rint.$ac_objext"
13235 ;;
13236esac
13237
13238fi
13239
13240ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
13241if test "x$ac_cv_func_srandom" = xyes; then :
13242  $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
13243
13244else
13245  case " $LIBOBJS " in
13246  *" srandom.$ac_objext "* ) ;;
13247  *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
13248 ;;
13249esac
13250
13251fi
13252
13253ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
13254if test "x$ac_cv_func_strerror" = xyes; then :
13255  $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
13256
13257else
13258  case " $LIBOBJS " in
13259  *" strerror.$ac_objext "* ) ;;
13260  *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
13261 ;;
13262esac
13263
13264fi
13265
13266ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
13267if test "x$ac_cv_func_strlcat" = xyes; then :
13268  $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
13269
13270else
13271  case " $LIBOBJS " in
13272  *" strlcat.$ac_objext "* ) ;;
13273  *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
13274 ;;
13275esac
13276
13277fi
13278
13279ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
13280if test "x$ac_cv_func_strlcpy" = xyes; then :
13281  $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
13282
13283else
13284  case " $LIBOBJS " in
13285  *" strlcpy.$ac_objext "* ) ;;
13286  *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
13287 ;;
13288esac
13289
13290fi
13291
13292ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
13293if test "x$ac_cv_func_strnlen" = xyes; then :
13294  $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
13295
13296else
13297  case " $LIBOBJS " in
13298  *" strnlen.$ac_objext "* ) ;;
13299  *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
13300 ;;
13301esac
13302
13303fi
13304
13305
13306
13307case $host_os in
13308
13309        # Windows uses a specialised env handler
13310        # and doesn't need a replacement getpeereid because it doesn't use
13311        # Unix sockets.
13312        mingw*)
13313
13314$as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
13315
13316
13317$as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
13318
13319                ac_cv_func_unsetenv=yes
13320                ac_cv_func_getpeereid=yes;;
13321        *)
13322                ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
13323if test "x$ac_cv_func_unsetenv" = xyes; then :
13324  $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
13325
13326else
13327  case " $LIBOBJS " in
13328  *" unsetenv.$ac_objext "* ) ;;
13329  *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
13330 ;;
13331esac
13332
13333fi
13334
13335ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
13336if test "x$ac_cv_func_getpeereid" = xyes; then :
13337  $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
13338
13339else
13340  case " $LIBOBJS " in
13341  *" getpeereid.$ac_objext "* ) ;;
13342  *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
13343 ;;
13344esac
13345
13346fi
13347
13348
13349		;;
13350esac
13351
13352# System's version of getaddrinfo(), if any, may be used only if we found
13353# a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
13354# We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
13355if test x"$ac_cv_type_struct_addrinfo" = xyes && \
13356   test "$PORTNAME" != "win32"; then
13357  ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
13358if test "x$ac_cv_func_getaddrinfo" = xyes; then :
13359  $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
13360
13361else
13362  case " $LIBOBJS " in
13363  *" getaddrinfo.$ac_objext "* ) ;;
13364  *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
13365 ;;
13366esac
13367
13368fi
13369
13370
13371else
13372  case " $LIBOBJS " in
13373  *" getaddrinfo.$ac_objext "* ) ;;
13374  *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
13375 ;;
13376esac
13377
13378fi
13379
13380# Similarly, use system's getopt_long() only if system provides struct option.
13381if test x"$ac_cv_type_struct_option" = xyes ; then
13382  ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
13383if test "x$ac_cv_func_getopt_long" = xyes; then :
13384  $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
13385
13386else
13387  case " $LIBOBJS " in
13388  *" getopt_long.$ac_objext "* ) ;;
13389  *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
13390 ;;
13391esac
13392
13393fi
13394
13395
13396else
13397  case " $LIBOBJS " in
13398  *" getopt_long.$ac_objext "* ) ;;
13399  *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
13400 ;;
13401esac
13402
13403fi
13404
13405# On OpenBSD and Solaris, getopt() doesn't do what we want for long options
13406# (i.e., allow '-' as a flag character), so use our version on those platforms.
13407if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
13408  case " $LIBOBJS " in
13409  *" getopt.$ac_objext "* ) ;;
13410  *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
13411 ;;
13412esac
13413
13414fi
13415
13416# mingw has adopted a GNU-centric interpretation of optind/optreset,
13417# so always use our version on Windows.
13418if test "$PORTNAME" = "win32"; then
13419  case " $LIBOBJS " in
13420  *" getopt.$ac_objext "* ) ;;
13421  *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
13422 ;;
13423esac
13424
13425  case " $LIBOBJS " in
13426  *" getopt_long.$ac_objext "* ) ;;
13427  *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
13428 ;;
13429esac
13430
13431fi
13432
13433# Win32 (really MinGW) support
13434if test "$PORTNAME" = "win32"; then
13435  for ac_func in _configthreadlocale
13436do :
13437  ac_fn_c_check_func "$LINENO" "_configthreadlocale" "ac_cv_func__configthreadlocale"
13438if test "x$ac_cv_func__configthreadlocale" = xyes; then :
13439  cat >>confdefs.h <<_ACEOF
13440#define HAVE__CONFIGTHREADLOCALE 1
13441_ACEOF
13442
13443fi
13444done
13445
13446  ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
13447if test "x$ac_cv_func_gettimeofday" = xyes; then :
13448  $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
13449
13450else
13451  case " $LIBOBJS " in
13452  *" gettimeofday.$ac_objext "* ) ;;
13453  *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
13454 ;;
13455esac
13456
13457fi
13458
13459
13460  case " $LIBOBJS " in
13461  *" dirmod.$ac_objext "* ) ;;
13462  *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
13463 ;;
13464esac
13465
13466  case " $LIBOBJS " in
13467  *" kill.$ac_objext "* ) ;;
13468  *) LIBOBJS="$LIBOBJS kill.$ac_objext"
13469 ;;
13470esac
13471
13472  case " $LIBOBJS " in
13473  *" open.$ac_objext "* ) ;;
13474  *) LIBOBJS="$LIBOBJS open.$ac_objext"
13475 ;;
13476esac
13477
13478  case " $LIBOBJS " in
13479  *" system.$ac_objext "* ) ;;
13480  *) LIBOBJS="$LIBOBJS system.$ac_objext"
13481 ;;
13482esac
13483
13484  case " $LIBOBJS " in
13485  *" win32env.$ac_objext "* ) ;;
13486  *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
13487 ;;
13488esac
13489
13490  case " $LIBOBJS " in
13491  *" win32error.$ac_objext "* ) ;;
13492  *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
13493 ;;
13494esac
13495
13496  case " $LIBOBJS " in
13497  *" win32security.$ac_objext "* ) ;;
13498  *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
13499 ;;
13500esac
13501
13502  case " $LIBOBJS " in
13503  *" win32setlocale.$ac_objext "* ) ;;
13504  *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
13505 ;;
13506esac
13507
13508
13509$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
13510
13511  ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
13512#define WIN32_LEAN_AND_MEAN
13513#include <windows.h>
13514#include <string.h>
13515#include <dbghelp.h>
13516"
13517if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
13518
13519cat >>confdefs.h <<_ACEOF
13520#define HAVE_MINIDUMP_TYPE 1
13521_ACEOF
13522
13523pgac_minidump_type=yes
13524else
13525  pgac_minidump_type=no
13526fi
13527
13528fi
13529if test x"$pgac_minidump_type" = x"yes" ; then
13530  have_win32_dbghelp=yes
13531
13532else
13533  have_win32_dbghelp=no
13534
13535fi
13536
13537# Cygwin needs only a bit of that
13538if test "$PORTNAME" = "cygwin"; then
13539  case " $LIBOBJS " in
13540  *" dirmod.$ac_objext "* ) ;;
13541  *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
13542 ;;
13543esac
13544
13545fi
13546
13547ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
13548if test "x$ac_cv_func_syslog" = xyes; then :
13549  ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
13550if test "x$ac_cv_header_syslog_h" = xyes; then :
13551
13552$as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
13553
13554fi
13555
13556
13557fi
13558
13559
13560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
13561$as_echo_n "checking for opterr... " >&6; }
13562if ${pgac_cv_var_int_opterr+:} false; then :
13563  $as_echo_n "(cached) " >&6
13564else
13565  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13566/* end confdefs.h.  */
13567#include <unistd.h>
13568int
13569main ()
13570{
13571extern int opterr; opterr = 1;
13572  ;
13573  return 0;
13574}
13575_ACEOF
13576if ac_fn_c_try_link "$LINENO"; then :
13577  pgac_cv_var_int_opterr=yes
13578else
13579  pgac_cv_var_int_opterr=no
13580fi
13581rm -f core conftest.err conftest.$ac_objext \
13582    conftest$ac_exeext conftest.$ac_ext
13583fi
13584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
13585$as_echo "$pgac_cv_var_int_opterr" >&6; }
13586if test x"$pgac_cv_var_int_opterr" = x"yes"; then
13587
13588$as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
13589
13590fi
13591
13592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
13593$as_echo_n "checking for optreset... " >&6; }
13594if ${pgac_cv_var_int_optreset+:} false; then :
13595  $as_echo_n "(cached) " >&6
13596else
13597  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13598/* end confdefs.h.  */
13599#include <unistd.h>
13600int
13601main ()
13602{
13603extern int optreset; optreset = 1;
13604  ;
13605  return 0;
13606}
13607_ACEOF
13608if ac_fn_c_try_link "$LINENO"; then :
13609  pgac_cv_var_int_optreset=yes
13610else
13611  pgac_cv_var_int_optreset=no
13612fi
13613rm -f core conftest.err conftest.$ac_objext \
13614    conftest$ac_exeext conftest.$ac_ext
13615fi
13616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
13617$as_echo "$pgac_cv_var_int_optreset" >&6; }
13618if test x"$pgac_cv_var_int_optreset" = x"yes"; then
13619
13620$as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
13621
13622fi
13623
13624for ac_func in strtoll __strtoll strtoq
13625do :
13626  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13627ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13628if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13629  cat >>confdefs.h <<_ACEOF
13630#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13631_ACEOF
13632 break
13633fi
13634done
13635
13636for ac_func in strtoull __strtoull strtouq
13637do :
13638  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13639ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13640if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13641  cat >>confdefs.h <<_ACEOF
13642#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13643_ACEOF
13644 break
13645fi
13646done
13647
13648# strto[u]ll may exist but not be declared
13649ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
13650if test "x$ac_cv_have_decl_strtoll" = xyes; then :
13651  ac_have_decl=1
13652else
13653  ac_have_decl=0
13654fi
13655
13656cat >>confdefs.h <<_ACEOF
13657#define HAVE_DECL_STRTOLL $ac_have_decl
13658_ACEOF
13659ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
13660if test "x$ac_cv_have_decl_strtoull" = xyes; then :
13661  ac_have_decl=1
13662else
13663  ac_have_decl=0
13664fi
13665
13666cat >>confdefs.h <<_ACEOF
13667#define HAVE_DECL_STRTOULL $ac_have_decl
13668_ACEOF
13669
13670
13671# Lastly, restore full LIBS list and check for readline/libedit symbols
13672LIBS="$LIBS_including_readline"
13673
13674if test "$with_readline" = yes; then
13675  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
13676$as_echo_n "checking for rl_completion_append_character... " >&6; }
13677if ${pgac_cv_var_rl_completion_append_character+:} false; then :
13678  $as_echo_n "(cached) " >&6
13679else
13680  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13681/* end confdefs.h.  */
13682#include <stdio.h>
13683#ifdef HAVE_READLINE_READLINE_H
13684# include <readline/readline.h>
13685#elif defined(HAVE_READLINE_H)
13686# include <readline.h>
13687#endif
13688
13689int
13690main ()
13691{
13692rl_completion_append_character = 'x';
13693  ;
13694  return 0;
13695}
13696_ACEOF
13697if ac_fn_c_try_link "$LINENO"; then :
13698  pgac_cv_var_rl_completion_append_character=yes
13699else
13700  pgac_cv_var_rl_completion_append_character=no
13701fi
13702rm -f core conftest.err conftest.$ac_objext \
13703    conftest$ac_exeext conftest.$ac_ext
13704fi
13705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
13706$as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
13707if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
13708
13709$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
13710
13711fi
13712  for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
13713do :
13714  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13715ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13716if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13717  cat >>confdefs.h <<_ACEOF
13718#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13719_ACEOF
13720
13721fi
13722done
13723
13724  for ac_func in append_history history_truncate_file
13725do :
13726  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13727ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13728if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13729  cat >>confdefs.h <<_ACEOF
13730#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13731_ACEOF
13732
13733fi
13734done
13735
13736fi
13737
13738
13739# This test makes sure that run tests work at all.  Sometimes a shared
13740# library is found by the linker, but the runtime linker can't find it.
13741# This check should come after all modifications of compiler or linker
13742# variables, and before any other run tests.
13743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
13744$as_echo_n "checking test program... " >&6; }
13745if test "$cross_compiling" = yes; then :
13746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
13747$as_echo "cross-compiling" >&6; }
13748else
13749  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13750/* end confdefs.h.  */
13751int main() { return 0; }
13752_ACEOF
13753if ac_fn_c_try_run "$LINENO"; then :
13754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
13755$as_echo "ok" >&6; }
13756else
13757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
13758$as_echo "failed" >&6; }
13759as_fn_error $? "
13760Could not execute a simple test program.  This may be a problem
13761related to locating shared libraries.  Check the file 'config.log'
13762for the exact reason." "$LINENO" 5
13763fi
13764rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13765  conftest.$ac_objext conftest.beam conftest.$ac_ext
13766fi
13767
13768
13769# --------------------
13770# Run tests below here
13771# --------------------
13772
13773# Force use of our snprintf if system's doesn't do arg control
13774# See comment above at snprintf test for details.
13775if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
13776  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports argument control" >&5
13777$as_echo_n "checking whether snprintf supports argument control... " >&6; }
13778if ${pgac_cv_snprintf_arg_control+:} false; then :
13779  $as_echo_n "(cached) " >&6
13780else
13781  if test "$cross_compiling" = yes; then :
13782  pgac_cv_snprintf_arg_control=cross
13783else
13784  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13785/* end confdefs.h.  */
13786#include <stdio.h>
13787#include <string.h>
13788
13789int main()
13790{
13791  char buf[100];
13792
13793  /* can it swap arguments? */
13794  snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
13795  if (strcmp(buf, "4 3") != 0)
13796    return 1;
13797  return 0;
13798}
13799_ACEOF
13800if ac_fn_c_try_run "$LINENO"; then :
13801  pgac_cv_snprintf_arg_control=yes
13802else
13803  pgac_cv_snprintf_arg_control=no
13804fi
13805rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13806  conftest.$ac_objext conftest.beam conftest.$ac_ext
13807fi
13808
13809
13810fi
13811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_arg_control" >&5
13812$as_echo "$pgac_cv_snprintf_arg_control" >&6; }
13813
13814  if test $pgac_cv_snprintf_arg_control != yes ; then
13815    pgac_need_repl_snprintf=yes
13816  fi
13817fi
13818
13819
13820
13821
13822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
13823$as_echo_n "checking whether long int is 64 bits... " >&6; }
13824if ${pgac_cv_type_long_int_64+:} false; then :
13825  $as_echo_n "(cached) " >&6
13826else
13827  if test "$cross_compiling" = yes; then :
13828  # If cross-compiling, check the size reported by the compiler and
13829# trust that the arithmetic works.
13830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13831/* end confdefs.h.  */
13832
13833int
13834main ()
13835{
13836static int test_array [1 - 2 * !(sizeof(long int) == 8)];
13837test_array [0] = 0;
13838return test_array [0];
13839
13840  ;
13841  return 0;
13842}
13843_ACEOF
13844if ac_fn_c_try_compile "$LINENO"; then :
13845  pgac_cv_type_long_int_64=yes
13846else
13847  pgac_cv_type_long_int_64=no
13848fi
13849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13850else
13851  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13852/* end confdefs.h.  */
13853typedef long int ac_int64;
13854
13855/*
13856 * These are globals to discourage the compiler from folding all the
13857 * arithmetic tests down to compile-time constants.
13858 */
13859ac_int64 a = 20000001;
13860ac_int64 b = 40000005;
13861
13862int does_int64_work()
13863{
13864  ac_int64 c,d;
13865
13866  if (sizeof(ac_int64) != 8)
13867    return 0;			/* definitely not the right size */
13868
13869  /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
13870  c = a * b;
13871  d = (c + b) / b;
13872  if (d != a+1)
13873    return 0;
13874  return 1;
13875}
13876
13877int
13878main() {
13879  return (! does_int64_work());
13880}
13881_ACEOF
13882if ac_fn_c_try_run "$LINENO"; then :
13883  pgac_cv_type_long_int_64=yes
13884else
13885  pgac_cv_type_long_int_64=no
13886fi
13887rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13888  conftest.$ac_objext conftest.beam conftest.$ac_ext
13889fi
13890
13891fi
13892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
13893$as_echo "$pgac_cv_type_long_int_64" >&6; }
13894
13895HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
13896if test x"$pgac_cv_type_long_int_64" = xyes ; then
13897
13898$as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
13899
13900fi
13901
13902
13903if test x"$HAVE_LONG_INT_64" = x"yes" ; then
13904  pg_int64_type="long int"
13905else
13906  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
13907$as_echo_n "checking whether long long int is 64 bits... " >&6; }
13908if ${pgac_cv_type_long_long_int_64+:} false; then :
13909  $as_echo_n "(cached) " >&6
13910else
13911  if test "$cross_compiling" = yes; then :
13912  # If cross-compiling, check the size reported by the compiler and
13913# trust that the arithmetic works.
13914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13915/* end confdefs.h.  */
13916
13917int
13918main ()
13919{
13920static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
13921test_array [0] = 0;
13922return test_array [0];
13923
13924  ;
13925  return 0;
13926}
13927_ACEOF
13928if ac_fn_c_try_compile "$LINENO"; then :
13929  pgac_cv_type_long_long_int_64=yes
13930else
13931  pgac_cv_type_long_long_int_64=no
13932fi
13933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13934else
13935  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13936/* end confdefs.h.  */
13937typedef long long int ac_int64;
13938
13939/*
13940 * These are globals to discourage the compiler from folding all the
13941 * arithmetic tests down to compile-time constants.
13942 */
13943ac_int64 a = 20000001;
13944ac_int64 b = 40000005;
13945
13946int does_int64_work()
13947{
13948  ac_int64 c,d;
13949
13950  if (sizeof(ac_int64) != 8)
13951    return 0;			/* definitely not the right size */
13952
13953  /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
13954  c = a * b;
13955  d = (c + b) / b;
13956  if (d != a+1)
13957    return 0;
13958  return 1;
13959}
13960
13961int
13962main() {
13963  return (! does_int64_work());
13964}
13965_ACEOF
13966if ac_fn_c_try_run "$LINENO"; then :
13967  pgac_cv_type_long_long_int_64=yes
13968else
13969  pgac_cv_type_long_long_int_64=no
13970fi
13971rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13972  conftest.$ac_objext conftest.beam conftest.$ac_ext
13973fi
13974
13975fi
13976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
13977$as_echo "$pgac_cv_type_long_long_int_64" >&6; }
13978
13979HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
13980if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
13981
13982$as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
13983
13984fi
13985
13986  if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
13987    pg_int64_type="long long int"
13988  else
13989    as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
13990  fi
13991fi
13992
13993
13994cat >>confdefs.h <<_ACEOF
13995#define PG_INT64_TYPE $pg_int64_type
13996_ACEOF
13997
13998
13999# If we found "long int" is 64 bits, assume snprintf handles it.  If
14000# we found we need to use "long long int", better check.  We cope with
14001# snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
14002# work, fall back to our own snprintf emulation (which we know uses %lld).
14003
14004if test "$HAVE_LONG_LONG_INT_64" = yes ; then
14005  if test $pgac_need_repl_snprintf = no; then
14006    { $as_echo "$as_me:${as_lineno-$LINENO}: checking snprintf length modifier for long long int" >&5
14007$as_echo_n "checking snprintf length modifier for long long int... " >&6; }
14008if ${pgac_cv_snprintf_long_long_int_modifier+:} false; then :
14009  $as_echo_n "(cached) " >&6
14010else
14011  for pgac_modifier in 'll' 'q' 'I64'; do
14012if test "$cross_compiling" = yes; then :
14013  pgac_cv_snprintf_long_long_int_modifier=cross; break
14014else
14015  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14016/* end confdefs.h.  */
14017#include <stdio.h>
14018typedef long long int ac_int64;
14019#define INT64_FORMAT "%${pgac_modifier}d"
14020
14021ac_int64 a = 20000001;
14022ac_int64 b = 40000005;
14023
14024int does_int64_snprintf_work()
14025{
14026  ac_int64 c;
14027  char buf[100];
14028
14029  if (sizeof(ac_int64) != 8)
14030    return 0;			/* doesn't look like the right size */
14031
14032  c = a * b;
14033  snprintf(buf, 100, INT64_FORMAT, c);
14034  if (strcmp(buf, "800000140000005") != 0)
14035    return 0;			/* either multiply or snprintf is busted */
14036  return 1;
14037}
14038
14039int
14040main() {
14041  return (! does_int64_snprintf_work());
14042}
14043_ACEOF
14044if ac_fn_c_try_run "$LINENO"; then :
14045  pgac_cv_snprintf_long_long_int_modifier=$pgac_modifier; break
14046fi
14047rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14048  conftest.$ac_objext conftest.beam conftest.$ac_ext
14049fi
14050
14051done
14052fi
14053
14054LONG_LONG_INT_MODIFIER=''
14055
14056case $pgac_cv_snprintf_long_long_int_modifier in
14057  cross) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot test (not on host machine)" >&5
14058$as_echo "cannot test (not on host machine)" >&6; };;
14059  ?*)    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_long_long_int_modifier" >&5
14060$as_echo "$pgac_cv_snprintf_long_long_int_modifier" >&6; }
14061         LONG_LONG_INT_MODIFIER=$pgac_cv_snprintf_long_long_int_modifier;;
14062  *)     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14063$as_echo "none" >&6; };;
14064esac
14065    if test "$LONG_LONG_INT_MODIFIER" = ""; then
14066      # Force usage of our own snprintf, since system snprintf is broken
14067      pgac_need_repl_snprintf=yes
14068      LONG_LONG_INT_MODIFIER='ll'
14069    fi
14070  else
14071    # Here if we previously decided we needed to use our own snprintf
14072    LONG_LONG_INT_MODIFIER='ll'
14073  fi
14074else
14075  # Here if we are not using 'long long int' at all
14076  LONG_LONG_INT_MODIFIER='l'
14077fi
14078
14079INT64_MODIFIER="\"$LONG_LONG_INT_MODIFIER\""
14080
14081
14082cat >>confdefs.h <<_ACEOF
14083#define INT64_MODIFIER $INT64_MODIFIER
14084_ACEOF
14085
14086
14087# Also force use of our snprintf if the system's doesn't support the %z flag.
14088if test "$pgac_need_repl_snprintf" = no; then
14089  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports the %z modifier" >&5
14090$as_echo_n "checking whether snprintf supports the %z modifier... " >&6; }
14091if ${pgac_cv_snprintf_size_t_support+:} false; then :
14092  $as_echo_n "(cached) " >&6
14093else
14094  if test "$cross_compiling" = yes; then :
14095  pgac_cv_snprintf_size_t_support=cross
14096else
14097  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14098/* end confdefs.h.  */
14099#include <stdio.h>
14100#include <string.h>
14101
14102int main()
14103{
14104  char bufz[100];
14105  char buf64[100];
14106
14107  /*
14108   * Print the largest unsigned number fitting in a size_t using both %zu
14109   * and the previously-determined format for 64-bit integers.  Note that
14110   * we don't run this code unless we know snprintf handles 64-bit ints.
14111   */
14112  bufz[0] = '\0';  /* in case snprintf fails to emit anything */
14113  snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
14114  snprintf(buf64, sizeof(buf64), "%" INT64_MODIFIER "u",
14115    (unsigned PG_INT64_TYPE) ~((size_t) 0));
14116  if (strcmp(bufz, buf64) != 0)
14117    return 1;
14118  return 0;
14119}
14120_ACEOF
14121if ac_fn_c_try_run "$LINENO"; then :
14122  pgac_cv_snprintf_size_t_support=yes
14123else
14124  pgac_cv_snprintf_size_t_support=no
14125fi
14126rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14127  conftest.$ac_objext conftest.beam conftest.$ac_ext
14128fi
14129
14130
14131fi
14132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_size_t_support" >&5
14133$as_echo "$pgac_cv_snprintf_size_t_support" >&6; }
14134
14135  if test "$pgac_cv_snprintf_size_t_support" != yes; then
14136    pgac_need_repl_snprintf=yes
14137  fi
14138fi
14139
14140# Now we have checked all the reasons to replace snprintf
14141if test $pgac_need_repl_snprintf = yes; then
14142
14143$as_echo "#define USE_REPL_SNPRINTF 1" >>confdefs.h
14144
14145  case " $LIBOBJS " in
14146  *" snprintf.$ac_objext "* ) ;;
14147  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
14148 ;;
14149esac
14150
14151fi
14152
14153# Check size of void *, size_t (enables tweaks for > 32bit address space)
14154# The cast to long int works around a bug in the HP C Compiler
14155# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14156# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14157# This bug is HP SR number 8606223364.
14158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
14159$as_echo_n "checking size of void *... " >&6; }
14160if ${ac_cv_sizeof_void_p+:} false; then :
14161  $as_echo_n "(cached) " >&6
14162else
14163  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
14164
14165else
14166  if test "$ac_cv_type_void_p" = yes; then
14167     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14168$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14169as_fn_error 77 "cannot compute sizeof (void *)
14170See \`config.log' for more details" "$LINENO" 5; }
14171   else
14172     ac_cv_sizeof_void_p=0
14173   fi
14174fi
14175
14176fi
14177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
14178$as_echo "$ac_cv_sizeof_void_p" >&6; }
14179
14180
14181
14182cat >>confdefs.h <<_ACEOF
14183#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
14184_ACEOF
14185
14186
14187# The cast to long int works around a bug in the HP C Compiler
14188# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14189# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14190# This bug is HP SR number 8606223364.
14191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
14192$as_echo_n "checking size of size_t... " >&6; }
14193if ${ac_cv_sizeof_size_t+:} false; then :
14194  $as_echo_n "(cached) " >&6
14195else
14196  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
14197
14198else
14199  if test "$ac_cv_type_size_t" = yes; then
14200     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14201$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14202as_fn_error 77 "cannot compute sizeof (size_t)
14203See \`config.log' for more details" "$LINENO" 5; }
14204   else
14205     ac_cv_sizeof_size_t=0
14206   fi
14207fi
14208
14209fi
14210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
14211$as_echo "$ac_cv_sizeof_size_t" >&6; }
14212
14213
14214
14215cat >>confdefs.h <<_ACEOF
14216#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
14217_ACEOF
14218
14219
14220# The cast to long int works around a bug in the HP C Compiler
14221# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14222# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14223# This bug is HP SR number 8606223364.
14224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
14225$as_echo_n "checking size of long... " >&6; }
14226if ${ac_cv_sizeof_long+:} false; then :
14227  $as_echo_n "(cached) " >&6
14228else
14229  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
14230
14231else
14232  if test "$ac_cv_type_long" = yes; then
14233     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14234$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14235as_fn_error 77 "cannot compute sizeof (long)
14236See \`config.log' for more details" "$LINENO" 5; }
14237   else
14238     ac_cv_sizeof_long=0
14239   fi
14240fi
14241
14242fi
14243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
14244$as_echo "$ac_cv_sizeof_long" >&6; }
14245
14246
14247
14248cat >>confdefs.h <<_ACEOF
14249#define SIZEOF_LONG $ac_cv_sizeof_long
14250_ACEOF
14251
14252
14253
14254# Decide whether float4 is passed by value: user-selectable, enabled by default
14255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
14256$as_echo_n "checking whether to build with float4 passed by value... " >&6; }
14257
14258
14259# Check whether --enable-float4-byval was given.
14260if test "${enable_float4_byval+set}" = set; then :
14261  enableval=$enable_float4_byval;
14262  case $enableval in
14263    yes)
14264
14265$as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
14266
14267               float4passbyval=true
14268      ;;
14269    no)
14270      float4passbyval=false
14271      ;;
14272    *)
14273      as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
14274      ;;
14275  esac
14276
14277else
14278  enable_float4_byval=yes
14279
14280$as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
14281
14282               float4passbyval=true
14283fi
14284
14285
14286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
14287$as_echo "$enable_float4_byval" >&6; }
14288
14289cat >>confdefs.h <<_ACEOF
14290#define FLOAT4PASSBYVAL $float4passbyval
14291_ACEOF
14292
14293
14294# Decide whether float8 is passed by value.
14295# Note: this setting also controls int8 and related types such as timestamp.
14296# If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
14297# If not, trying to select it is an error.
14298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
14299$as_echo_n "checking whether to build with float8 passed by value... " >&6; }
14300if test $ac_cv_sizeof_void_p -ge 8 ; then
14301
14302
14303# Check whether --enable-float8-byval was given.
14304if test "${enable_float8_byval+set}" = set; then :
14305  enableval=$enable_float8_byval;
14306  case $enableval in
14307    yes)
14308      :
14309      ;;
14310    no)
14311      :
14312      ;;
14313    *)
14314      as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
14315      ;;
14316  esac
14317
14318else
14319  enable_float8_byval=yes
14320
14321fi
14322
14323
14324else
14325
14326
14327# Check whether --enable-float8-byval was given.
14328if test "${enable_float8_byval+set}" = set; then :
14329  enableval=$enable_float8_byval;
14330  case $enableval in
14331    yes)
14332      :
14333      ;;
14334    no)
14335      :
14336      ;;
14337    *)
14338      as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
14339      ;;
14340  esac
14341
14342else
14343  enable_float8_byval=no
14344
14345fi
14346
14347
14348  if test "$enable_float8_byval" = yes ; then
14349    as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
14350  fi
14351fi
14352if test "$enable_float8_byval" = yes ; then
14353
14354$as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
14355
14356  float8passbyval=true
14357else
14358  float8passbyval=false
14359fi
14360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
14361$as_echo "$enable_float8_byval" >&6; }
14362
14363cat >>confdefs.h <<_ACEOF
14364#define FLOAT8PASSBYVAL $float8passbyval
14365_ACEOF
14366
14367
14368# Determine memory alignment requirements for the basic C data types.
14369
14370# The cast to long int works around a bug in the HP C Compiler,
14371# see AC_CHECK_SIZEOF for more information.
14372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
14373$as_echo_n "checking alignment of short... " >&6; }
14374if ${ac_cv_alignof_short+:} false; then :
14375  $as_echo_n "(cached) " >&6
14376else
14377  if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
14378#ifndef offsetof
14379# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14380#endif
14381typedef struct { char x; short y; } ac__type_alignof_;"; then :
14382
14383else
14384  if test "$ac_cv_type_short" = yes; then
14385     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14386$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14387as_fn_error 77 "cannot compute alignment of short
14388See \`config.log' for more details" "$LINENO" 5; }
14389   else
14390     ac_cv_alignof_short=0
14391   fi
14392fi
14393
14394fi
14395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
14396$as_echo "$ac_cv_alignof_short" >&6; }
14397
14398
14399
14400cat >>confdefs.h <<_ACEOF
14401#define ALIGNOF_SHORT $ac_cv_alignof_short
14402_ACEOF
14403
14404
14405# The cast to long int works around a bug in the HP C Compiler,
14406# see AC_CHECK_SIZEOF for more information.
14407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
14408$as_echo_n "checking alignment of int... " >&6; }
14409if ${ac_cv_alignof_int+:} false; then :
14410  $as_echo_n "(cached) " >&6
14411else
14412  if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
14413#ifndef offsetof
14414# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14415#endif
14416typedef struct { char x; int y; } ac__type_alignof_;"; then :
14417
14418else
14419  if test "$ac_cv_type_int" = yes; then
14420     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14421$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14422as_fn_error 77 "cannot compute alignment of int
14423See \`config.log' for more details" "$LINENO" 5; }
14424   else
14425     ac_cv_alignof_int=0
14426   fi
14427fi
14428
14429fi
14430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
14431$as_echo "$ac_cv_alignof_int" >&6; }
14432
14433
14434
14435cat >>confdefs.h <<_ACEOF
14436#define ALIGNOF_INT $ac_cv_alignof_int
14437_ACEOF
14438
14439
14440# The cast to long int works around a bug in the HP C Compiler,
14441# see AC_CHECK_SIZEOF for more information.
14442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
14443$as_echo_n "checking alignment of long... " >&6; }
14444if ${ac_cv_alignof_long+:} false; then :
14445  $as_echo_n "(cached) " >&6
14446else
14447  if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
14448#ifndef offsetof
14449# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14450#endif
14451typedef struct { char x; long y; } ac__type_alignof_;"; then :
14452
14453else
14454  if test "$ac_cv_type_long" = yes; then
14455     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14456$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14457as_fn_error 77 "cannot compute alignment of long
14458See \`config.log' for more details" "$LINENO" 5; }
14459   else
14460     ac_cv_alignof_long=0
14461   fi
14462fi
14463
14464fi
14465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
14466$as_echo "$ac_cv_alignof_long" >&6; }
14467
14468
14469
14470cat >>confdefs.h <<_ACEOF
14471#define ALIGNOF_LONG $ac_cv_alignof_long
14472_ACEOF
14473
14474
14475if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
14476  # The cast to long int works around a bug in the HP C Compiler,
14477# see AC_CHECK_SIZEOF for more information.
14478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
14479$as_echo_n "checking alignment of long long int... " >&6; }
14480if ${ac_cv_alignof_long_long_int+:} false; then :
14481  $as_echo_n "(cached) " >&6
14482else
14483  if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
14484#ifndef offsetof
14485# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14486#endif
14487typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
14488
14489else
14490  if test "$ac_cv_type_long_long_int" = yes; then
14491     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14492$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14493as_fn_error 77 "cannot compute alignment of long long int
14494See \`config.log' for more details" "$LINENO" 5; }
14495   else
14496     ac_cv_alignof_long_long_int=0
14497   fi
14498fi
14499
14500fi
14501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
14502$as_echo "$ac_cv_alignof_long_long_int" >&6; }
14503
14504
14505
14506cat >>confdefs.h <<_ACEOF
14507#define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
14508_ACEOF
14509
14510
14511fi
14512# The cast to long int works around a bug in the HP C Compiler,
14513# see AC_CHECK_SIZEOF for more information.
14514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
14515$as_echo_n "checking alignment of double... " >&6; }
14516if ${ac_cv_alignof_double+:} false; then :
14517  $as_echo_n "(cached) " >&6
14518else
14519  if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
14520#ifndef offsetof
14521# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14522#endif
14523typedef struct { char x; double y; } ac__type_alignof_;"; then :
14524
14525else
14526  if test "$ac_cv_type_double" = yes; then
14527     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14528$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14529as_fn_error 77 "cannot compute alignment of double
14530See \`config.log' for more details" "$LINENO" 5; }
14531   else
14532     ac_cv_alignof_double=0
14533   fi
14534fi
14535
14536fi
14537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
14538$as_echo "$ac_cv_alignof_double" >&6; }
14539
14540
14541
14542cat >>confdefs.h <<_ACEOF
14543#define ALIGNOF_DOUBLE $ac_cv_alignof_double
14544_ACEOF
14545
14546
14547
14548# Compute maximum alignment of any basic type.
14549# We assume long's alignment is at least as strong as char, short, or int;
14550# but we must check long long (if it is being used for int64) and double.
14551# Note that we intentionally do not consider any types wider than 64 bits,
14552# as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
14553# for disk and memory space.
14554
14555MAX_ALIGNOF=$ac_cv_alignof_long
14556if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
14557  MAX_ALIGNOF=$ac_cv_alignof_double
14558fi
14559if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
14560  MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
14561fi
14562
14563cat >>confdefs.h <<_ACEOF
14564#define MAXIMUM_ALIGNOF $MAX_ALIGNOF
14565_ACEOF
14566
14567
14568
14569# Some platforms predefine the types int8, int16, etc.  Only check
14570# a (hopefully) representative subset.
14571ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
14572"
14573if test "x$ac_cv_type_int8" = xyes; then :
14574
14575cat >>confdefs.h <<_ACEOF
14576#define HAVE_INT8 1
14577_ACEOF
14578
14579
14580fi
14581ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
14582"
14583if test "x$ac_cv_type_uint8" = xyes; then :
14584
14585cat >>confdefs.h <<_ACEOF
14586#define HAVE_UINT8 1
14587_ACEOF
14588
14589
14590fi
14591ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
14592"
14593if test "x$ac_cv_type_int64" = xyes; then :
14594
14595cat >>confdefs.h <<_ACEOF
14596#define HAVE_INT64 1
14597_ACEOF
14598
14599
14600fi
14601ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
14602"
14603if test "x$ac_cv_type_uint64" = xyes; then :
14604
14605cat >>confdefs.h <<_ACEOF
14606#define HAVE_UINT64 1
14607_ACEOF
14608
14609
14610fi
14611
14612
14613# Some compilers offer a 128-bit integer scalar type.
14614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
14615$as_echo_n "checking for __int128... " >&6; }
14616if ${pgac_cv__128bit_int+:} false; then :
14617  $as_echo_n "(cached) " >&6
14618else
14619  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14620/* end confdefs.h.  */
14621
14622/*
14623 * We don't actually run this test, just link it to verify that any support
14624 * functions needed for __int128 are present.
14625 *
14626 * These are globals to discourage the compiler from folding all the
14627 * arithmetic tests down to compile-time constants.  We do not have
14628 * convenient support for 128bit literals at this point...
14629 */
14630__int128 a = 48828125;
14631__int128 b = 97656250;
14632
14633int
14634main ()
14635{
14636
14637__int128 c,d;
14638a = (a << 12) + 1; /* 200000000001 */
14639b = (b << 12) + 5; /* 400000000005 */
14640/* try the most relevant arithmetic ops */
14641c = a * b;
14642d = (c + b) / b;
14643/* must use the results, else compiler may optimize arithmetic away */
14644if (d != a+1)
14645  return 1;
14646
14647  ;
14648  return 0;
14649}
14650_ACEOF
14651if ac_fn_c_try_link "$LINENO"; then :
14652  pgac_cv__128bit_int=yes
14653else
14654  pgac_cv__128bit_int=no
14655fi
14656rm -f core conftest.err conftest.$ac_objext \
14657    conftest$ac_exeext conftest.$ac_ext
14658fi
14659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
14660$as_echo "$pgac_cv__128bit_int" >&6; }
14661if test x"$pgac_cv__128bit_int" = xyes ; then
14662  # Use of non-default alignment with __int128 tickles bugs in some compilers.
14663  # If not cross-compiling, we can test for bugs and disable use of __int128
14664  # with buggy compilers.  If cross-compiling, hope for the best.
14665  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
14666  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
14667$as_echo_n "checking for __int128 alignment bug... " >&6; }
14668if ${pgac_cv__128bit_int_bug+:} false; then :
14669  $as_echo_n "(cached) " >&6
14670else
14671  if test "$cross_compiling" = yes; then :
14672  pgac_cv__128bit_int_bug="assuming ok"
14673else
14674  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14675/* end confdefs.h.  */
14676
14677/* This must match the corresponding code in c.h: */
14678#if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
14679#define pg_attribute_aligned(a) __attribute__((aligned(a)))
14680#endif
14681typedef __int128 int128a
14682#if defined(pg_attribute_aligned)
14683pg_attribute_aligned(8)
14684#endif
14685;
14686int128a holder;
14687void pass_by_val(void *buffer, int128a par) { holder = par; }
14688
14689int
14690main ()
14691{
14692
14693long int i64 = 97656225L << 12;
14694int128a q;
14695pass_by_val(main, (int128a) i64);
14696q = (int128a) i64;
14697if (q != holder)
14698  return 1;
14699
14700  ;
14701  return 0;
14702}
14703_ACEOF
14704if ac_fn_c_try_run "$LINENO"; then :
14705  pgac_cv__128bit_int_bug=ok
14706else
14707  pgac_cv__128bit_int_bug=broken
14708fi
14709rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14710  conftest.$ac_objext conftest.beam conftest.$ac_ext
14711fi
14712
14713fi
14714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
14715$as_echo "$pgac_cv__128bit_int_bug" >&6; }
14716  if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
14717
14718$as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
14719
14720    # The cast to long int works around a bug in the HP C Compiler,
14721# see AC_CHECK_SIZEOF for more information.
14722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
14723$as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
14724if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
14725  $as_echo_n "(cached) " >&6
14726else
14727  if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE"        "$ac_includes_default
14728#ifndef offsetof
14729# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14730#endif
14731typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
14732
14733else
14734  if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
14735     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14736$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14737as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
14738See \`config.log' for more details" "$LINENO" 5; }
14739   else
14740     ac_cv_alignof_PG_INT128_TYPE=0
14741   fi
14742fi
14743
14744fi
14745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
14746$as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
14747
14748
14749
14750cat >>confdefs.h <<_ACEOF
14751#define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
14752_ACEOF
14753
14754
14755  fi
14756fi
14757
14758# Check for various atomic operations now that we have checked how to declare
14759# 64bit integers.
14760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
14761$as_echo_n "checking for builtin __sync char locking functions... " >&6; }
14762if ${pgac_cv_gcc_sync_char_tas+:} false; then :
14763  $as_echo_n "(cached) " >&6
14764else
14765  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14766/* end confdefs.h.  */
14767
14768int
14769main ()
14770{
14771char lock = 0;
14772   __sync_lock_test_and_set(&lock, 1);
14773   __sync_lock_release(&lock);
14774  ;
14775  return 0;
14776}
14777_ACEOF
14778if ac_fn_c_try_link "$LINENO"; then :
14779  pgac_cv_gcc_sync_char_tas="yes"
14780else
14781  pgac_cv_gcc_sync_char_tas="no"
14782fi
14783rm -f core conftest.err conftest.$ac_objext \
14784    conftest$ac_exeext conftest.$ac_ext
14785fi
14786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
14787$as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
14788if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
14789
14790$as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
14791
14792fi
14793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
14794$as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
14795if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
14796  $as_echo_n "(cached) " >&6
14797else
14798  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14799/* end confdefs.h.  */
14800
14801int
14802main ()
14803{
14804int lock = 0;
14805   __sync_lock_test_and_set(&lock, 1);
14806   __sync_lock_release(&lock);
14807  ;
14808  return 0;
14809}
14810_ACEOF
14811if ac_fn_c_try_link "$LINENO"; then :
14812  pgac_cv_gcc_sync_int32_tas="yes"
14813else
14814  pgac_cv_gcc_sync_int32_tas="no"
14815fi
14816rm -f core conftest.err conftest.$ac_objext \
14817    conftest$ac_exeext conftest.$ac_ext
14818fi
14819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
14820$as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
14821if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
14822
14823$as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
14824
14825fi
14826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
14827$as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
14828if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
14829  $as_echo_n "(cached) " >&6
14830else
14831  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14832/* end confdefs.h.  */
14833
14834int
14835main ()
14836{
14837int val = 0;
14838   __sync_val_compare_and_swap(&val, 0, 37);
14839  ;
14840  return 0;
14841}
14842_ACEOF
14843if ac_fn_c_try_link "$LINENO"; then :
14844  pgac_cv_gcc_sync_int32_cas="yes"
14845else
14846  pgac_cv_gcc_sync_int32_cas="no"
14847fi
14848rm -f core conftest.err conftest.$ac_objext \
14849    conftest$ac_exeext conftest.$ac_ext
14850fi
14851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
14852$as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
14853if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
14854
14855$as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
14856
14857fi
14858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
14859$as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
14860if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
14861  $as_echo_n "(cached) " >&6
14862else
14863  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14864/* end confdefs.h.  */
14865
14866int
14867main ()
14868{
14869PG_INT64_TYPE lock = 0;
14870   __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
14871  ;
14872  return 0;
14873}
14874_ACEOF
14875if ac_fn_c_try_link "$LINENO"; then :
14876  pgac_cv_gcc_sync_int64_cas="yes"
14877else
14878  pgac_cv_gcc_sync_int64_cas="no"
14879fi
14880rm -f core conftest.err conftest.$ac_objext \
14881    conftest$ac_exeext conftest.$ac_ext
14882fi
14883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
14884$as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
14885if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
14886
14887$as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
14888
14889fi
14890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
14891$as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
14892if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
14893  $as_echo_n "(cached) " >&6
14894else
14895  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14896/* end confdefs.h.  */
14897
14898int
14899main ()
14900{
14901int val = 0;
14902   int expect = 0;
14903   __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
14904  ;
14905  return 0;
14906}
14907_ACEOF
14908if ac_fn_c_try_link "$LINENO"; then :
14909  pgac_cv_gcc_atomic_int32_cas="yes"
14910else
14911  pgac_cv_gcc_atomic_int32_cas="no"
14912fi
14913rm -f core conftest.err conftest.$ac_objext \
14914    conftest$ac_exeext conftest.$ac_ext
14915fi
14916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
14917$as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
14918if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
14919
14920$as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
14921
14922fi
14923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
14924$as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
14925if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
14926  $as_echo_n "(cached) " >&6
14927else
14928  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14929/* end confdefs.h.  */
14930
14931int
14932main ()
14933{
14934PG_INT64_TYPE val = 0;
14935   PG_INT64_TYPE expect = 0;
14936   __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
14937  ;
14938  return 0;
14939}
14940_ACEOF
14941if ac_fn_c_try_link "$LINENO"; then :
14942  pgac_cv_gcc_atomic_int64_cas="yes"
14943else
14944  pgac_cv_gcc_atomic_int64_cas="no"
14945fi
14946rm -f core conftest.err conftest.$ac_objext \
14947    conftest$ac_exeext conftest.$ac_ext
14948fi
14949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
14950$as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
14951if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
14952
14953$as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
14954
14955fi
14956
14957
14958# Check for x86 cpuid instruction
14959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
14960$as_echo_n "checking for __get_cpuid... " >&6; }
14961if ${pgac_cv__get_cpuid+:} false; then :
14962  $as_echo_n "(cached) " >&6
14963else
14964  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14965/* end confdefs.h.  */
14966#include <cpuid.h>
14967int
14968main ()
14969{
14970unsigned int exx[4] = {0, 0, 0, 0};
14971  __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
14972
14973  ;
14974  return 0;
14975}
14976_ACEOF
14977if ac_fn_c_try_link "$LINENO"; then :
14978  pgac_cv__get_cpuid="yes"
14979else
14980  pgac_cv__get_cpuid="no"
14981fi
14982rm -f core conftest.err conftest.$ac_objext \
14983    conftest$ac_exeext conftest.$ac_ext
14984fi
14985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
14986$as_echo "$pgac_cv__get_cpuid" >&6; }
14987if test x"$pgac_cv__get_cpuid" = x"yes"; then
14988
14989$as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
14990
14991fi
14992
14993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
14994$as_echo_n "checking for __cpuid... " >&6; }
14995if ${pgac_cv__cpuid+:} false; then :
14996  $as_echo_n "(cached) " >&6
14997else
14998  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14999/* end confdefs.h.  */
15000#include <intrin.h>
15001int
15002main ()
15003{
15004unsigned int exx[4] = {0, 0, 0, 0};
15005  __get_cpuid(exx[0], 1);
15006
15007  ;
15008  return 0;
15009}
15010_ACEOF
15011if ac_fn_c_try_link "$LINENO"; then :
15012  pgac_cv__cpuid="yes"
15013else
15014  pgac_cv__cpuid="no"
15015fi
15016rm -f core conftest.err conftest.$ac_objext \
15017    conftest$ac_exeext conftest.$ac_ext
15018fi
15019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
15020$as_echo "$pgac_cv__cpuid" >&6; }
15021if test x"$pgac_cv__cpuid" = x"yes"; then
15022
15023$as_echo "#define HAVE__CPUID 1" >>confdefs.h
15024
15025fi
15026
15027# Check for Intel SSE 4.2 intrinsics to do CRC calculations.
15028#
15029# First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
15030# with the default compiler flags. If not, check if adding the -msse4.2
15031# flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
15032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
15033$as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
15034if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
15035  $as_echo_n "(cached) " >&6
15036else
15037  pgac_save_CFLAGS=$CFLAGS
15038CFLAGS="$pgac_save_CFLAGS "
15039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15040/* end confdefs.h.  */
15041#include <nmmintrin.h>
15042int
15043main ()
15044{
15045unsigned int crc = 0;
15046   crc = _mm_crc32_u8(crc, 0);
15047   crc = _mm_crc32_u32(crc, 0);
15048   /* return computed value, to prevent the above being optimized away */
15049   return crc == 0;
15050  ;
15051  return 0;
15052}
15053_ACEOF
15054if ac_fn_c_try_link "$LINENO"; then :
15055  pgac_cv_sse42_crc32_intrinsics_=yes
15056else
15057  pgac_cv_sse42_crc32_intrinsics_=no
15058fi
15059rm -f core conftest.err conftest.$ac_objext \
15060    conftest$ac_exeext conftest.$ac_ext
15061CFLAGS="$pgac_save_CFLAGS"
15062fi
15063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
15064$as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
15065if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
15066  CFLAGS_SSE42=""
15067  pgac_sse42_crc32_intrinsics=yes
15068fi
15069
15070if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
15071  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
15072$as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
15073if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
15074  $as_echo_n "(cached) " >&6
15075else
15076  pgac_save_CFLAGS=$CFLAGS
15077CFLAGS="$pgac_save_CFLAGS -msse4.2"
15078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15079/* end confdefs.h.  */
15080#include <nmmintrin.h>
15081int
15082main ()
15083{
15084unsigned int crc = 0;
15085   crc = _mm_crc32_u8(crc, 0);
15086   crc = _mm_crc32_u32(crc, 0);
15087   /* return computed value, to prevent the above being optimized away */
15088   return crc == 0;
15089  ;
15090  return 0;
15091}
15092_ACEOF
15093if ac_fn_c_try_link "$LINENO"; then :
15094  pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
15095else
15096  pgac_cv_sse42_crc32_intrinsics__msse4_2=no
15097fi
15098rm -f core conftest.err conftest.$ac_objext \
15099    conftest$ac_exeext conftest.$ac_ext
15100CFLAGS="$pgac_save_CFLAGS"
15101fi
15102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
15103$as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
15104if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
15105  CFLAGS_SSE42="-msse4.2"
15106  pgac_sse42_crc32_intrinsics=yes
15107fi
15108
15109fi
15110
15111
15112# Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
15113# define __SSE4_2__ in that case.
15114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15115/* end confdefs.h.  */
15116
15117int
15118main ()
15119{
15120
15121#ifndef __SSE4_2__
15122#error __SSE4_2__ not defined
15123#endif
15124
15125  ;
15126  return 0;
15127}
15128_ACEOF
15129if ac_fn_c_try_compile "$LINENO"; then :
15130  SSE4_2_TARGETED=1
15131fi
15132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15133
15134# Select CRC-32C implementation.
15135#
15136# If we are targeting a processor that has SSE 4.2 instructions, we can use the
15137# special CRC instructions for calculating CRC-32C. If we're not targeting such
15138# a processor, but we can nevertheless produce code that uses the SSE
15139# intrinsics, perhaps with some extra CFLAGS, compile both implementations and
15140# select which one to use at runtime, depending on whether SSE 4.2 is supported
15141# by the processor we're running on.
15142#
15143# You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
15144# in the template or configure command line.
15145if test x"$USE_SSE42_CRC32C" = x"" && test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"" && test x"$USE_SLICING_BY_8_CRC32C" = x""; then
15146  if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
15147    USE_SSE42_CRC32C=1
15148  else
15149    # the CPUID instruction is needed for the runtime check.
15150    if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && (test x"$pgac_cv__get_cpuid" = x"yes" || test x"$pgac_cv__cpuid" = x"yes"); then
15151      USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
15152    else
15153      # fall back to slicing-by-8 algorithm which doesn't require any special
15154      # CPU support.
15155      USE_SLICING_BY_8_CRC32C=1
15156    fi
15157  fi
15158fi
15159
15160# Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
15161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
15162$as_echo_n "checking which CRC-32C implementation to use... " >&6; }
15163if test x"$USE_SSE42_CRC32C" = x"1"; then
15164
15165$as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
15166
15167  PG_CRC32C_OBJS="pg_crc32c_sse42.o"
15168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
15169$as_echo "SSE 4.2" >&6; }
15170else
15171  if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
15172
15173$as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
15174
15175    PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_choose.o"
15176    { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
15177$as_echo "SSE 4.2 with runtime check" >&6; }
15178  else
15179
15180$as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
15181
15182    PG_CRC32C_OBJS="pg_crc32c_sb8.o"
15183    { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
15184$as_echo "slicing-by-8" >&6; }
15185  fi
15186fi
15187
15188
15189
15190# Select semaphore implementation type.
15191if test "$PORTNAME" != "win32"; then
15192  if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
15193
15194$as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
15195
15196    SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
15197  else
15198    if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
15199
15200$as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
15201
15202      SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
15203    else
15204
15205$as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
15206
15207      SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
15208    fi
15209  fi
15210else
15211
15212$as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
15213
15214  SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
15215fi
15216
15217
15218# Select shared-memory implementation type.
15219if test "$PORTNAME" != "win32"; then
15220
15221$as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
15222
15223  SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
15224else
15225
15226$as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
15227
15228  SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
15229fi
15230
15231# If not set in template file, set bytes to use libc memset()
15232if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
15233  MEMSET_LOOP_LIMIT=1024
15234fi
15235
15236cat >>confdefs.h <<_ACEOF
15237#define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
15238_ACEOF
15239
15240
15241
15242if test "$enable_nls" = yes ; then
15243
15244  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
15245$as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
15246if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
15247  $as_echo_n "(cached) " >&6
15248else
15249  ac_func_search_save_LIBS=$LIBS
15250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15251/* end confdefs.h.  */
15252
15253/* Override any GCC internal prototype to avoid an error.
15254   Use char because int might match the return type of a GCC
15255   builtin and then its argument prototype would still apply.  */
15256#ifdef __cplusplus
15257extern "C"
15258#endif
15259char bind_textdomain_codeset ();
15260int
15261main ()
15262{
15263return bind_textdomain_codeset ();
15264  ;
15265  return 0;
15266}
15267_ACEOF
15268for ac_lib in '' intl; do
15269  if test -z "$ac_lib"; then
15270    ac_res="none required"
15271  else
15272    ac_res=-l$ac_lib
15273    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15274  fi
15275  if ac_fn_c_try_link "$LINENO"; then :
15276  ac_cv_search_bind_textdomain_codeset=$ac_res
15277fi
15278rm -f core conftest.err conftest.$ac_objext \
15279    conftest$ac_exeext
15280  if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
15281  break
15282fi
15283done
15284if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
15285
15286else
15287  ac_cv_search_bind_textdomain_codeset=no
15288fi
15289rm conftest.$ac_ext
15290LIBS=$ac_func_search_save_LIBS
15291fi
15292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
15293$as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
15294ac_res=$ac_cv_search_bind_textdomain_codeset
15295if test "$ac_res" != no; then :
15296  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15297
15298else
15299  as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
15300fi
15301
15302  ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
15303if test "x$ac_cv_header_libintl_h" = xyes; then :
15304
15305else
15306  as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
15307fi
15308
15309
15310  for ac_prog in msgfmt
15311do
15312  # Extract the first word of "$ac_prog", so it can be a program name with args.
15313set dummy $ac_prog; ac_word=$2
15314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15315$as_echo_n "checking for $ac_word... " >&6; }
15316if ${ac_cv_prog_MSGFMT+:} false; then :
15317  $as_echo_n "(cached) " >&6
15318else
15319  if test -n "$MSGFMT"; then
15320  ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
15321else
15322as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15323for as_dir in $PATH
15324do
15325  IFS=$as_save_IFS
15326  test -z "$as_dir" && as_dir=.
15327    for ac_exec_ext in '' $ac_executable_extensions; do
15328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15329    ac_cv_prog_MSGFMT="$ac_prog"
15330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15331    break 2
15332  fi
15333done
15334  done
15335IFS=$as_save_IFS
15336
15337fi
15338fi
15339MSGFMT=$ac_cv_prog_MSGFMT
15340if test -n "$MSGFMT"; then
15341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
15342$as_echo "$MSGFMT" >&6; }
15343else
15344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15345$as_echo "no" >&6; }
15346fi
15347
15348
15349  test -n "$MSGFMT" && break
15350done
15351
15352  if test -z "$MSGFMT"; then
15353    as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
15354  fi
15355  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
15356$as_echo_n "checking for msgfmt flags... " >&6; }
15357if ${pgac_cv_msgfmt_flags+:} false; then :
15358  $as_echo_n "(cached) " >&6
15359else
15360  if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
15361    pgac_cv_msgfmt_flags=-c
15362fi
15363fi
15364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
15365$as_echo "$pgac_cv_msgfmt_flags" >&6; }
15366  MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
15367
15368  for ac_prog in msgmerge
15369do
15370  # Extract the first word of "$ac_prog", so it can be a program name with args.
15371set dummy $ac_prog; ac_word=$2
15372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15373$as_echo_n "checking for $ac_word... " >&6; }
15374if ${ac_cv_prog_MSGMERGE+:} false; then :
15375  $as_echo_n "(cached) " >&6
15376else
15377  if test -n "$MSGMERGE"; then
15378  ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
15379else
15380as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15381for as_dir in $PATH
15382do
15383  IFS=$as_save_IFS
15384  test -z "$as_dir" && as_dir=.
15385    for ac_exec_ext in '' $ac_executable_extensions; do
15386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15387    ac_cv_prog_MSGMERGE="$ac_prog"
15388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15389    break 2
15390  fi
15391done
15392  done
15393IFS=$as_save_IFS
15394
15395fi
15396fi
15397MSGMERGE=$ac_cv_prog_MSGMERGE
15398if test -n "$MSGMERGE"; then
15399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
15400$as_echo "$MSGMERGE" >&6; }
15401else
15402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15403$as_echo "no" >&6; }
15404fi
15405
15406
15407  test -n "$MSGMERGE" && break
15408done
15409
15410  for ac_prog in xgettext
15411do
15412  # Extract the first word of "$ac_prog", so it can be a program name with args.
15413set dummy $ac_prog; ac_word=$2
15414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15415$as_echo_n "checking for $ac_word... " >&6; }
15416if ${ac_cv_prog_XGETTEXT+:} false; then :
15417  $as_echo_n "(cached) " >&6
15418else
15419  if test -n "$XGETTEXT"; then
15420  ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
15421else
15422as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15423for as_dir in $PATH
15424do
15425  IFS=$as_save_IFS
15426  test -z "$as_dir" && as_dir=.
15427    for ac_exec_ext in '' $ac_executable_extensions; do
15428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15429    ac_cv_prog_XGETTEXT="$ac_prog"
15430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15431    break 2
15432  fi
15433done
15434  done
15435IFS=$as_save_IFS
15436
15437fi
15438fi
15439XGETTEXT=$ac_cv_prog_XGETTEXT
15440if test -n "$XGETTEXT"; then
15441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
15442$as_echo "$XGETTEXT" >&6; }
15443else
15444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15445$as_echo "no" >&6; }
15446fi
15447
15448
15449  test -n "$XGETTEXT" && break
15450done
15451
15452
15453fi
15454
15455# Check for Tcl configuration script tclConfig.sh
15456if test "$with_tcl" = yes; then
15457    for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
15458do
15459  # Extract the first word of "$ac_prog", so it can be a program name with args.
15460set dummy $ac_prog; ac_word=$2
15461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15462$as_echo_n "checking for $ac_word... " >&6; }
15463if ${ac_cv_path_TCLSH+:} false; then :
15464  $as_echo_n "(cached) " >&6
15465else
15466  case $TCLSH in
15467  [\\/]* | ?:[\\/]*)
15468  ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
15469  ;;
15470  *)
15471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15472for as_dir in $PATH
15473do
15474  IFS=$as_save_IFS
15475  test -z "$as_dir" && as_dir=.
15476    for ac_exec_ext in '' $ac_executable_extensions; do
15477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15478    ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
15479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15480    break 2
15481  fi
15482done
15483  done
15484IFS=$as_save_IFS
15485
15486  ;;
15487esac
15488fi
15489TCLSH=$ac_cv_path_TCLSH
15490if test -n "$TCLSH"; then
15491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
15492$as_echo "$TCLSH" >&6; }
15493else
15494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15495$as_echo "no" >&6; }
15496fi
15497
15498
15499  test -n "$TCLSH" && break
15500done
15501
15502if test x"$TCLSH" = x""; then
15503  as_fn_error $? "Tcl shell not found" "$LINENO" 5
15504fi
15505
15506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
15507$as_echo_n "checking for tclConfig.sh... " >&6; }
15508# Let user override test
15509if test -z "$TCL_CONFIG_SH"; then
15510    pgac_test_dirs="$with_tclconfig"
15511
15512    set X $pgac_test_dirs; shift
15513    if test $# -eq 0; then
15514        test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
15515        pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
15516        # On newer macOS, $auto_path frequently doesn't include the place
15517        # where tclConfig.sh actually lives.  Append that to the end, so as not
15518        # to break cases where a non-default Tcl installation is being used.
15519        if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
15520            pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
15521        fi
15522        set X $pgac_test_dirs; shift
15523    fi
15524
15525    for pgac_dir do
15526        if test -r "$pgac_dir/tclConfig.sh"; then
15527            TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
15528            break
15529        fi
15530    done
15531fi
15532
15533if test -z "$TCL_CONFIG_SH"; then
15534    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15535$as_echo "no" >&6; }
15536    as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
15537else
15538    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
15539$as_echo "$TCL_CONFIG_SH" >&6; }
15540fi
15541
15542
15543
15544    . "$TCL_CONFIG_SH"
15545eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
15546eval TCL_LIBS=\"$TCL_LIBS\"
15547eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
15548eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
15549
15550        if test "$TCL_SHARED_BUILD" != 1; then
15551      as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
15552Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
15553    fi
15554    # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
15555    ac_save_CPPFLAGS=$CPPFLAGS
15556    CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
15557    ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
15558if test "x$ac_cv_header_tcl_h" = xyes; then :
15559
15560else
15561  as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
15562fi
15563
15564
15565    CPPFLAGS=$ac_save_CPPFLAGS
15566fi
15567
15568# check for <perl.h>
15569if test "$with_perl" = yes; then
15570  ac_save_CPPFLAGS=$CPPFLAGS
15571  CPPFLAGS="$CPPFLAGS $perl_includespec"
15572  ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
15573"
15574if test "x$ac_cv_header_perl_h" = xyes; then :
15575
15576else
15577  as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
15578fi
15579
15580
15581  # While we're at it, check that we can link to libperl.
15582  # On most platforms, if perl.h is there then libperl.so will be too, but at
15583  # this writing Debian packages them separately.  There is no known reason to
15584  # waste cycles on separate probes for the Tcl or Python libraries, though.
15585  # On some Red Hat platforms, the link attempt can fail if we don't use
15586  # CFLAGS_SL while building the test program.
15587  ac_save_CFLAGS=$CFLAGS
15588  CFLAGS="$CFLAGS $CFLAGS_SL"
15589  pgac_save_LIBS=$LIBS
15590  LIBS="$perl_embed_ldflags"
15591  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
15592$as_echo_n "checking for libperl... " >&6; }
15593  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15594/* end confdefs.h.  */
15595
15596#include <EXTERN.h>
15597#include <perl.h>
15598
15599int
15600main ()
15601{
15602perl_alloc();
15603  ;
15604  return 0;
15605}
15606_ACEOF
15607if ac_fn_c_try_link "$LINENO"; then :
15608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15609$as_echo "yes" >&6; }
15610else
15611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15612$as_echo "no" >&6; }
15613     as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
15614fi
15615rm -f core conftest.err conftest.$ac_objext \
15616    conftest$ac_exeext conftest.$ac_ext
15617  LIBS=$pgac_save_LIBS
15618  CFLAGS=$ac_save_CFLAGS
15619  CPPFLAGS=$ac_save_CPPFLAGS
15620fi
15621
15622# check for <Python.h>
15623if test "$with_python" = yes; then
15624  ac_save_CPPFLAGS=$CPPFLAGS
15625  CPPFLAGS="$python_includespec $CPPFLAGS"
15626  ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
15627if test "x$ac_cv_header_Python_h" = xyes; then :
15628
15629else
15630  as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
15631fi
15632
15633
15634  CPPFLAGS=$ac_save_CPPFLAGS
15635fi
15636
15637#
15638# Check for DocBook and tools
15639#
15640for ac_prog in onsgmls nsgmls
15641do
15642  # Extract the first word of "$ac_prog", so it can be a program name with args.
15643set dummy $ac_prog; ac_word=$2
15644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15645$as_echo_n "checking for $ac_word... " >&6; }
15646if ${ac_cv_prog_NSGMLS+:} false; then :
15647  $as_echo_n "(cached) " >&6
15648else
15649  if test -n "$NSGMLS"; then
15650  ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
15651else
15652as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15653for as_dir in $PATH
15654do
15655  IFS=$as_save_IFS
15656  test -z "$as_dir" && as_dir=.
15657    for ac_exec_ext in '' $ac_executable_extensions; do
15658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15659    ac_cv_prog_NSGMLS="$ac_prog"
15660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15661    break 2
15662  fi
15663done
15664  done
15665IFS=$as_save_IFS
15666
15667fi
15668fi
15669NSGMLS=$ac_cv_prog_NSGMLS
15670if test -n "$NSGMLS"; then
15671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSGMLS" >&5
15672$as_echo "$NSGMLS" >&6; }
15673else
15674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15675$as_echo "no" >&6; }
15676fi
15677
15678
15679  test -n "$NSGMLS" && break
15680done
15681
15682for ac_prog in openjade jade
15683do
15684  # Extract the first word of "$ac_prog", so it can be a program name with args.
15685set dummy $ac_prog; ac_word=$2
15686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15687$as_echo_n "checking for $ac_word... " >&6; }
15688if ${ac_cv_prog_JADE+:} false; then :
15689  $as_echo_n "(cached) " >&6
15690else
15691  if test -n "$JADE"; then
15692  ac_cv_prog_JADE="$JADE" # Let the user override the test.
15693else
15694as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15695for as_dir in $PATH
15696do
15697  IFS=$as_save_IFS
15698  test -z "$as_dir" && as_dir=.
15699    for ac_exec_ext in '' $ac_executable_extensions; do
15700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15701    ac_cv_prog_JADE="$ac_prog"
15702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15703    break 2
15704  fi
15705done
15706  done
15707IFS=$as_save_IFS
15708
15709fi
15710fi
15711JADE=$ac_cv_prog_JADE
15712if test -n "$JADE"; then
15713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JADE" >&5
15714$as_echo "$JADE" >&6; }
15715else
15716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15717$as_echo "no" >&6; }
15718fi
15719
15720
15721  test -n "$JADE" && break
15722done
15723
15724
15725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook V4.2" >&5
15726$as_echo_n "checking for DocBook V4.2... " >&6; }
15727if ${pgac_cv_check_docbook+:} false; then :
15728  $as_echo_n "(cached) " >&6
15729else
15730  cat >conftest.sgml <<EOF
15731<!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
15732<book>
15733 <title>test</title>
15734 <chapter>
15735  <title>random</title>
15736   <sect1>
15737    <title>testsect</title>
15738    <para>text</para>
15739  </sect1>
15740 </chapter>
15741</book>
15742EOF
15743
15744pgac_cv_check_docbook=no
15745
15746if test -n "$NSGMLS"; then
15747  $NSGMLS -s conftest.sgml 1>&5 2>&1
15748  if test $? -eq 0; then
15749    pgac_cv_check_docbook=yes
15750  fi
15751fi
15752rm -f conftest.sgml
15753fi
15754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
15755$as_echo "$pgac_cv_check_docbook" >&6; }
15756
15757have_docbook=$pgac_cv_check_docbook
15758
15759
15760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook stylesheets" >&5
15761$as_echo_n "checking for DocBook stylesheets... " >&6; }
15762if ${pgac_cv_path_stylesheets+:} false; then :
15763  $as_echo_n "(cached) " >&6
15764else
15765  if test -n "$DOCBOOKSTYLE"; then
15766  pgac_cv_path_stylesheets=$DOCBOOKSTYLE
15767else
15768  for pgac_prefix in /usr /usr/local /opt /sw; do
15769    for pgac_infix in share lib; do
15770      for pgac_postfix in \
15771        sgml/stylesheets/nwalsh-modular \
15772        sgml/stylesheets/docbook \
15773        sgml/stylesheets/dsssl/docbook \
15774        sgml/docbook-dsssl \
15775        sgml/docbook/dsssl/modular \
15776        sgml/docbook/stylesheet/dsssl/modular \
15777        sgml/docbook/dsssl-stylesheets \
15778        sgml/dsssl/docbook-dsssl-nwalsh
15779      do
15780        pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
15781        if test -r "$pgac_candidate/html/docbook.dsl" \
15782           && test -r "$pgac_candidate/print/docbook.dsl"
15783        then
15784          pgac_cv_path_stylesheets=$pgac_candidate
15785          break 3
15786        fi
15787      done
15788    done
15789  done
15790fi
15791fi
15792
15793DOCBOOKSTYLE=$pgac_cv_path_stylesheets
15794
15795if test -n "$DOCBOOKSTYLE"; then
15796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCBOOKSTYLE" >&5
15797$as_echo "$DOCBOOKSTYLE" >&6; }
15798else
15799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15800$as_echo "no" >&6; }
15801fi
15802if test -n "$DOCBOOKSTYLE" -a -r "$DOCBOOKSTYLE/bin/collateindex.pl"; then
15803  COLLATEINDEX="$DOCBOOKSTYLE/bin/collateindex.pl"
15804
15805else
15806  # Extract the first word of "collateindex.pl", so it can be a program name with args.
15807set dummy collateindex.pl; ac_word=$2
15808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15809$as_echo_n "checking for $ac_word... " >&6; }
15810if ${ac_cv_path_COLLATEINDEX+:} false; then :
15811  $as_echo_n "(cached) " >&6
15812else
15813  case $COLLATEINDEX in
15814  [\\/]* | ?:[\\/]*)
15815  ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
15816  ;;
15817  *)
15818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15819for as_dir in $PATH
15820do
15821  IFS=$as_save_IFS
15822  test -z "$as_dir" && as_dir=.
15823    for ac_exec_ext in '' $ac_executable_extensions; do
15824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15825    ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
15826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15827    break 2
15828  fi
15829done
15830  done
15831IFS=$as_save_IFS
15832
15833  ;;
15834esac
15835fi
15836COLLATEINDEX=$ac_cv_path_COLLATEINDEX
15837if test -n "$COLLATEINDEX"; then
15838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COLLATEINDEX" >&5
15839$as_echo "$COLLATEINDEX" >&6; }
15840else
15841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15842$as_echo "no" >&6; }
15843fi
15844
15845
15846fi
15847for ac_prog in dbtoepub
15848do
15849  # Extract the first word of "$ac_prog", so it can be a program name with args.
15850set dummy $ac_prog; ac_word=$2
15851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15852$as_echo_n "checking for $ac_word... " >&6; }
15853if ${ac_cv_prog_DBTOEPUB+:} false; then :
15854  $as_echo_n "(cached) " >&6
15855else
15856  if test -n "$DBTOEPUB"; then
15857  ac_cv_prog_DBTOEPUB="$DBTOEPUB" # Let the user override the test.
15858else
15859as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15860for as_dir in $PATH
15861do
15862  IFS=$as_save_IFS
15863  test -z "$as_dir" && as_dir=.
15864    for ac_exec_ext in '' $ac_executable_extensions; do
15865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15866    ac_cv_prog_DBTOEPUB="$ac_prog"
15867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15868    break 2
15869  fi
15870done
15871  done
15872IFS=$as_save_IFS
15873
15874fi
15875fi
15876DBTOEPUB=$ac_cv_prog_DBTOEPUB
15877if test -n "$DBTOEPUB"; then
15878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
15879$as_echo "$DBTOEPUB" >&6; }
15880else
15881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15882$as_echo "no" >&6; }
15883fi
15884
15885
15886  test -n "$DBTOEPUB" && break
15887done
15888
15889for ac_prog in xmllint
15890do
15891  # Extract the first word of "$ac_prog", so it can be a program name with args.
15892set dummy $ac_prog; ac_word=$2
15893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15894$as_echo_n "checking for $ac_word... " >&6; }
15895if ${ac_cv_prog_XMLLINT+:} false; then :
15896  $as_echo_n "(cached) " >&6
15897else
15898  if test -n "$XMLLINT"; then
15899  ac_cv_prog_XMLLINT="$XMLLINT" # Let the user override the test.
15900else
15901as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15902for as_dir in $PATH
15903do
15904  IFS=$as_save_IFS
15905  test -z "$as_dir" && as_dir=.
15906    for ac_exec_ext in '' $ac_executable_extensions; do
15907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15908    ac_cv_prog_XMLLINT="$ac_prog"
15909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15910    break 2
15911  fi
15912done
15913  done
15914IFS=$as_save_IFS
15915
15916fi
15917fi
15918XMLLINT=$ac_cv_prog_XMLLINT
15919if test -n "$XMLLINT"; then
15920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
15921$as_echo "$XMLLINT" >&6; }
15922else
15923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15924$as_echo "no" >&6; }
15925fi
15926
15927
15928  test -n "$XMLLINT" && break
15929done
15930
15931for ac_prog in xsltproc
15932do
15933  # Extract the first word of "$ac_prog", so it can be a program name with args.
15934set dummy $ac_prog; ac_word=$2
15935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15936$as_echo_n "checking for $ac_word... " >&6; }
15937if ${ac_cv_prog_XSLTPROC+:} false; then :
15938  $as_echo_n "(cached) " >&6
15939else
15940  if test -n "$XSLTPROC"; then
15941  ac_cv_prog_XSLTPROC="$XSLTPROC" # Let the user override the test.
15942else
15943as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15944for as_dir in $PATH
15945do
15946  IFS=$as_save_IFS
15947  test -z "$as_dir" && as_dir=.
15948    for ac_exec_ext in '' $ac_executable_extensions; do
15949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15950    ac_cv_prog_XSLTPROC="$ac_prog"
15951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15952    break 2
15953  fi
15954done
15955  done
15956IFS=$as_save_IFS
15957
15958fi
15959fi
15960XSLTPROC=$ac_cv_prog_XSLTPROC
15961if test -n "$XSLTPROC"; then
15962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
15963$as_echo "$XSLTPROC" >&6; }
15964else
15965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15966$as_echo "no" >&6; }
15967fi
15968
15969
15970  test -n "$XSLTPROC" && break
15971done
15972
15973for ac_prog in osx sgml2xml sx
15974do
15975  # Extract the first word of "$ac_prog", so it can be a program name with args.
15976set dummy $ac_prog; ac_word=$2
15977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15978$as_echo_n "checking for $ac_word... " >&6; }
15979if ${ac_cv_prog_OSX+:} false; then :
15980  $as_echo_n "(cached) " >&6
15981else
15982  if test -n "$OSX"; then
15983  ac_cv_prog_OSX="$OSX" # Let the user override the test.
15984else
15985as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15986for as_dir in $PATH
15987do
15988  IFS=$as_save_IFS
15989  test -z "$as_dir" && as_dir=.
15990    for ac_exec_ext in '' $ac_executable_extensions; do
15991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15992    ac_cv_prog_OSX="$ac_prog"
15993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15994    break 2
15995  fi
15996done
15997  done
15998IFS=$as_save_IFS
15999
16000fi
16001fi
16002OSX=$ac_cv_prog_OSX
16003if test -n "$OSX"; then
16004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OSX" >&5
16005$as_echo "$OSX" >&6; }
16006else
16007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16008$as_echo "no" >&6; }
16009fi
16010
16011
16012  test -n "$OSX" && break
16013done
16014
16015
16016#
16017# Check for test tools
16018#
16019if test "$enable_tap_tests" = yes; then
16020  for ac_prog in prove
16021do
16022  # Extract the first word of "$ac_prog", so it can be a program name with args.
16023set dummy $ac_prog; ac_word=$2
16024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16025$as_echo_n "checking for $ac_word... " >&6; }
16026if ${ac_cv_prog_PROVE+:} false; then :
16027  $as_echo_n "(cached) " >&6
16028else
16029  if test -n "$PROVE"; then
16030  ac_cv_prog_PROVE="$PROVE" # Let the user override the test.
16031else
16032as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16033for as_dir in $PATH
16034do
16035  IFS=$as_save_IFS
16036  test -z "$as_dir" && as_dir=.
16037    for ac_exec_ext in '' $ac_executable_extensions; do
16038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16039    ac_cv_prog_PROVE="$ac_prog"
16040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16041    break 2
16042  fi
16043done
16044  done
16045IFS=$as_save_IFS
16046
16047fi
16048fi
16049PROVE=$ac_cv_prog_PROVE
16050if test -n "$PROVE"; then
16051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
16052$as_echo "$PROVE" >&6; }
16053else
16054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16055$as_echo "no" >&6; }
16056fi
16057
16058
16059  test -n "$PROVE" && break
16060done
16061
16062  if test -z "$PROVE"; then
16063    as_fn_error $? "prove not found" "$LINENO" 5
16064  fi
16065  if test -z "$PERL"; then
16066    as_fn_error $? "Perl not found" "$LINENO" 5
16067  fi
16068fi
16069
16070# Thread testing
16071
16072# We have to run the thread test near the end so we have all our symbols
16073# defined.  Cross compiling throws a warning.
16074#
16075if test "$enable_thread_safety" = yes; then
16076if test "$PORTNAME" != "win32"
16077then
16078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
16079$as_echo_n "checking thread safety of required library functions... " >&6; }
16080
16081_CFLAGS="$CFLAGS"
16082_LIBS="$LIBS"
16083CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
16084LIBS="$LIBS $PTHREAD_LIBS"
16085if test "$cross_compiling" = yes; then :
16086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
16087$as_echo "maybe" >&6; }
16088  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
16089*** Skipping thread test program because of cross-compile build.
16090*** Run the program in src/test/thread on the target machine.
16091" >&5
16092$as_echo "$as_me: WARNING:
16093*** Skipping thread test program because of cross-compile build.
16094*** Run the program in src/test/thread on the target machine.
16095" >&2;}
16096else
16097  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16098/* end confdefs.h.  */
16099#include "$srcdir/src/test/thread/thread_test.c"
16100_ACEOF
16101if ac_fn_c_try_run "$LINENO"; then :
16102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16103$as_echo "yes" >&6; }
16104else
16105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16106$as_echo "no" >&6; }
16107  as_fn_error $? "thread test program failed
16108This platform is not thread-safe.  Check the file 'config.log' or compile
16109and run src/test/thread/thread_test for the exact reason.
16110Use --disable-thread-safety to disable thread safety." "$LINENO" 5
16111fi
16112rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16113  conftest.$ac_objext conftest.beam conftest.$ac_ext
16114fi
16115
16116CFLAGS="$_CFLAGS"
16117LIBS="$_LIBS"
16118else
16119{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
16120$as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
16121fi
16122fi
16123
16124# If compiler will take -Wl,--as-needed (or various platform-specific
16125# spellings thereof) then add that to LDFLAGS.  This is much easier than
16126# trying to filter LIBS to the minimum for each executable.
16127# On (at least) some Red-Hat-derived systems, this switch breaks linking to
16128# libreadline; therefore we postpone testing it until we know what library
16129# dependencies readline has.  The test code will try to link with $LIBS.
16130if test "$with_readline" = yes; then
16131  link_test_func=readline
16132else
16133  link_test_func=exit
16134fi
16135
16136if test "$PORTNAME" = "darwin"; then
16137  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
16138$as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
16139if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
16140  $as_echo_n "(cached) " >&6
16141else
16142  pgac_save_LDFLAGS=$LDFLAGS
16143LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
16144if test "$cross_compiling" = yes; then :
16145  pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
16146else
16147  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16148/* end confdefs.h.  */
16149extern void $link_test_func (); void (*fptr) () = $link_test_func;
16150int
16151main ()
16152{
16153
16154  ;
16155  return 0;
16156}
16157_ACEOF
16158if ac_fn_c_try_run "$LINENO"; then :
16159  pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
16160else
16161  pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
16162fi
16163rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16164  conftest.$ac_objext conftest.beam conftest.$ac_ext
16165fi
16166
16167LDFLAGS="$pgac_save_LDFLAGS"
16168fi
16169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
16170$as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
16171if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
16172  LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
16173fi
16174
16175elif test "$PORTNAME" = "openbsd"; then
16176  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
16177$as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
16178if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
16179  $as_echo_n "(cached) " >&6
16180else
16181  pgac_save_LDFLAGS=$LDFLAGS
16182LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
16183if test "$cross_compiling" = yes; then :
16184  pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
16185else
16186  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16187/* end confdefs.h.  */
16188extern void $link_test_func (); void (*fptr) () = $link_test_func;
16189int
16190main ()
16191{
16192
16193  ;
16194  return 0;
16195}
16196_ACEOF
16197if ac_fn_c_try_run "$LINENO"; then :
16198  pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
16199else
16200  pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
16201fi
16202rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16203  conftest.$ac_objext conftest.beam conftest.$ac_ext
16204fi
16205
16206LDFLAGS="$pgac_save_LDFLAGS"
16207fi
16208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
16209$as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
16210if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
16211  LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
16212fi
16213
16214else
16215  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
16216$as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
16217if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
16218  $as_echo_n "(cached) " >&6
16219else
16220  pgac_save_LDFLAGS=$LDFLAGS
16221LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
16222if test "$cross_compiling" = yes; then :
16223  pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
16224else
16225  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16226/* end confdefs.h.  */
16227extern void $link_test_func (); void (*fptr) () = $link_test_func;
16228int
16229main ()
16230{
16231
16232  ;
16233  return 0;
16234}
16235_ACEOF
16236if ac_fn_c_try_run "$LINENO"; then :
16237  pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
16238else
16239  pgac_cv_prog_cc_ldflags__Wl___as_needed=no
16240fi
16241rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16242  conftest.$ac_objext conftest.beam conftest.$ac_ext
16243fi
16244
16245LDFLAGS="$pgac_save_LDFLAGS"
16246fi
16247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
16248$as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
16249if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
16250  LDFLAGS="$LDFLAGS -Wl,--as-needed"
16251fi
16252
16253fi
16254
16255# Create compiler version string
16256if test x"$GCC" = x"yes" ; then
16257  cc_string=`${CC} --version | sed q`
16258  case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
16259elif test x"$SUN_STUDIO_CC" = x"yes" ; then
16260  cc_string=`${CC} -V 2>&1 | sed q`
16261else
16262  cc_string=$CC
16263fi
16264
16265
16266cat >>confdefs.h <<_ACEOF
16267#define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
16268_ACEOF
16269
16270
16271# Supply a numeric version string for use by 3rd party add-ons
16272# awk -F is a regex on some platforms, and not on others, so make "." a tab
16273PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
16274tr '.' '	' |
16275$AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"
16276
16277cat >>confdefs.h <<_ACEOF
16278#define PG_VERSION_NUM $PG_VERSION_NUM
16279_ACEOF
16280
16281
16282
16283# If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
16284# literally, so that it's possible to override it at build time using
16285# a command like "make ... PG_SYSROOT=path".  This has to be done after
16286# we've finished all configure checks that depend on CPPFLAGS.
16287# The same for LDFLAGS, too.
16288if test x"$PG_SYSROOT" != x; then
16289  CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
16290  LDFLAGS=`echo "$LDFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
16291fi
16292
16293
16294
16295# Begin output steps
16296
16297{ $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
16298$as_echo "$as_me: using compiler=$cc_string" >&6;}
16299{ $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
16300$as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
16301{ $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
16302$as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
16303{ $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
16304$as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
16305
16306# prepare build tree if outside source tree
16307# Note 1: test -ef might not exist, but it's more reliable than `pwd`.
16308# Note 2: /bin/pwd might be better than shell's built-in at getting
16309#         a symlink-free name.
16310if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
16311  vpath_build=no
16312else
16313  vpath_build=yes
16314  if test "$no_create" != yes; then
16315    $as_echo_n "preparing build tree... " >&6
16316    pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
16317    $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
16318      || as_fn_error $? "failed" "$LINENO" 5
16319    { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16320$as_echo "done" >&6; }
16321  fi
16322fi
16323
16324
16325
16326ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
16327
16328
16329ac_config_links="$ac_config_links src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION} src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION} src/include/dynloader.h:src/backend/port/dynloader/${template}.h src/include/pg_config_os.h:src/include/port/${template}.h src/Makefile.port:src/makefiles/Makefile.${template}"
16330
16331
16332if test "$PORTNAME" = "win32"; then
16333ac_config_commands="$ac_config_commands check_win32_symlinks"
16334
16335fi
16336
16337ac_config_headers="$ac_config_headers src/include/pg_config.h"
16338
16339
16340ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
16341
16342
16343ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
16344
16345
16346cat >confcache <<\_ACEOF
16347# This file is a shell script that caches the results of configure
16348# tests run on this system so they can be shared between configure
16349# scripts and configure runs, see configure's option --config-cache.
16350# It is not useful on other systems.  If it contains results you don't
16351# want to keep, you may remove or edit it.
16352#
16353# config.status only pays attention to the cache file if you give it
16354# the --recheck option to rerun configure.
16355#
16356# `ac_cv_env_foo' variables (set or unset) will be overridden when
16357# loading this file, other *unset* `ac_cv_foo' will be assigned the
16358# following values.
16359
16360_ACEOF
16361
16362# The following way of writing the cache mishandles newlines in values,
16363# but we know of no workaround that is simple, portable, and efficient.
16364# So, we kill variables containing newlines.
16365# Ultrix sh set writes to stderr and can't be redirected directly,
16366# and sets the high bit in the cache file unless we assign to the vars.
16367(
16368  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16369    eval ac_val=\$$ac_var
16370    case $ac_val in #(
16371    *${as_nl}*)
16372      case $ac_var in #(
16373      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16374$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
16375      esac
16376      case $ac_var in #(
16377      _ | IFS | as_nl) ;; #(
16378      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16379      *) { eval $ac_var=; unset $ac_var;} ;;
16380      esac ;;
16381    esac
16382  done
16383
16384  (set) 2>&1 |
16385    case $as_nl`(ac_space=' '; set) 2>&1` in #(
16386    *${as_nl}ac_space=\ *)
16387      # `set' does not quote correctly, so add quotes: double-quote
16388      # substitution turns \\\\ into \\, and sed turns \\ into \.
16389      sed -n \
16390	"s/'/'\\\\''/g;
16391	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16392      ;; #(
16393    *)
16394      # `set' quotes correctly as required by POSIX, so do not add quotes.
16395      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
16396      ;;
16397    esac |
16398    sort
16399) |
16400  sed '
16401     /^ac_cv_env_/b end
16402     t clear
16403     :clear
16404     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16405     t end
16406     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16407     :end' >>confcache
16408if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16409  if test -w "$cache_file"; then
16410    if test "x$cache_file" != "x/dev/null"; then
16411      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16412$as_echo "$as_me: updating cache $cache_file" >&6;}
16413      if test ! -f "$cache_file" || test -h "$cache_file"; then
16414	cat confcache >"$cache_file"
16415      else
16416        case $cache_file in #(
16417        */* | ?:*)
16418	  mv -f confcache "$cache_file"$$ &&
16419	  mv -f "$cache_file"$$ "$cache_file" ;; #(
16420        *)
16421	  mv -f confcache "$cache_file" ;;
16422	esac
16423      fi
16424    fi
16425  else
16426    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16427$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
16428  fi
16429fi
16430rm -f confcache
16431
16432test "x$prefix" = xNONE && prefix=$ac_default_prefix
16433# Let make expand exec_prefix.
16434test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16435
16436DEFS=-DHAVE_CONFIG_H
16437
16438ac_libobjs=
16439ac_ltlibobjs=
16440U=
16441for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16442  # 1. Remove the extension, and $U if already installed.
16443  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16444  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16445  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
16446  #    will be set to the directory where LIBOBJS objects are built.
16447  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16448  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
16449done
16450LIBOBJS=$ac_libobjs
16451
16452LTLIBOBJS=$ac_ltlibobjs
16453
16454
16455
16456
16457: "${CONFIG_STATUS=./config.status}"
16458ac_write_fail=0
16459ac_clean_files_save=$ac_clean_files
16460ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16461{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16462$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16463as_write_fail=0
16464cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
16465#! $SHELL
16466# Generated by $as_me.
16467# Run this file to recreate the current configuration.
16468# Compiler output produced by configure, useful for debugging
16469# configure, is in config.log if it exists.
16470
16471debug=false
16472ac_cs_recheck=false
16473ac_cs_silent=false
16474
16475SHELL=\${CONFIG_SHELL-$SHELL}
16476export SHELL
16477_ASEOF
16478cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16479## -------------------- ##
16480## M4sh Initialization. ##
16481## -------------------- ##
16482
16483# Be more Bourne compatible
16484DUALCASE=1; export DUALCASE # for MKS sh
16485if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
16486  emulate sh
16487  NULLCMD=:
16488  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
16489  # is contrary to our usage.  Disable this feature.
16490  alias -g '${1+"$@"}'='"$@"'
16491  setopt NO_GLOB_SUBST
16492else
16493  case `(set -o) 2>/dev/null` in #(
16494  *posix*) :
16495    set -o posix ;; #(
16496  *) :
16497     ;;
16498esac
16499fi
16500
16501
16502as_nl='
16503'
16504export as_nl
16505# Printing a long string crashes Solaris 7 /usr/bin/printf.
16506as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16507as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16508as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16509# Prefer a ksh shell builtin over an external printf program on Solaris,
16510# but without wasting forks for bash or zsh.
16511if test -z "$BASH_VERSION$ZSH_VERSION" \
16512    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16513  as_echo='print -r --'
16514  as_echo_n='print -rn --'
16515elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16516  as_echo='printf %s\n'
16517  as_echo_n='printf %s'
16518else
16519  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16520    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16521    as_echo_n='/usr/ucb/echo -n'
16522  else
16523    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16524    as_echo_n_body='eval
16525      arg=$1;
16526      case $arg in #(
16527      *"$as_nl"*)
16528	expr "X$arg" : "X\\(.*\\)$as_nl";
16529	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16530      esac;
16531      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16532    '
16533    export as_echo_n_body
16534    as_echo_n='sh -c $as_echo_n_body as_echo'
16535  fi
16536  export as_echo_body
16537  as_echo='sh -c $as_echo_body as_echo'
16538fi
16539
16540# The user is always right.
16541if test "${PATH_SEPARATOR+set}" != set; then
16542  PATH_SEPARATOR=:
16543  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16544    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16545      PATH_SEPARATOR=';'
16546  }
16547fi
16548
16549
16550# IFS
16551# We need space, tab and new line, in precisely that order.  Quoting is
16552# there to prevent editors from complaining about space-tab.
16553# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16554# splitting by setting IFS to empty value.)
16555IFS=" ""	$as_nl"
16556
16557# Find who we are.  Look in the path if we contain no directory separator.
16558as_myself=
16559case $0 in #((
16560  *[\\/]* ) as_myself=$0 ;;
16561  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16562for as_dir in $PATH
16563do
16564  IFS=$as_save_IFS
16565  test -z "$as_dir" && as_dir=.
16566    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16567  done
16568IFS=$as_save_IFS
16569
16570     ;;
16571esac
16572# We did not find ourselves, most probably we were run as `sh COMMAND'
16573# in which case we are not to be found in the path.
16574if test "x$as_myself" = x; then
16575  as_myself=$0
16576fi
16577if test ! -f "$as_myself"; then
16578  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16579  exit 1
16580fi
16581
16582# Unset variables that we do not need and which cause bugs (e.g. in
16583# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
16584# suppresses any "Segmentation fault" message there.  '((' could
16585# trigger a bug in pdksh 5.2.14.
16586for as_var in BASH_ENV ENV MAIL MAILPATH
16587do eval test x\${$as_var+set} = xset \
16588  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16589done
16590PS1='$ '
16591PS2='> '
16592PS4='+ '
16593
16594# NLS nuisances.
16595LC_ALL=C
16596export LC_ALL
16597LANGUAGE=C
16598export LANGUAGE
16599
16600# CDPATH.
16601(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16602
16603
16604# as_fn_error STATUS ERROR [LINENO LOG_FD]
16605# ----------------------------------------
16606# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16607# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16608# script with STATUS, using 1 if that was 0.
16609as_fn_error ()
16610{
16611  as_status=$1; test $as_status -eq 0 && as_status=1
16612  if test "$4"; then
16613    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16614    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
16615  fi
16616  $as_echo "$as_me: error: $2" >&2
16617  as_fn_exit $as_status
16618} # as_fn_error
16619
16620
16621# as_fn_set_status STATUS
16622# -----------------------
16623# Set $? to STATUS, without forking.
16624as_fn_set_status ()
16625{
16626  return $1
16627} # as_fn_set_status
16628
16629# as_fn_exit STATUS
16630# -----------------
16631# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16632as_fn_exit ()
16633{
16634  set +e
16635  as_fn_set_status $1
16636  exit $1
16637} # as_fn_exit
16638
16639# as_fn_unset VAR
16640# ---------------
16641# Portably unset VAR.
16642as_fn_unset ()
16643{
16644  { eval $1=; unset $1;}
16645}
16646as_unset=as_fn_unset
16647# as_fn_append VAR VALUE
16648# ----------------------
16649# Append the text in VALUE to the end of the definition contained in VAR. Take
16650# advantage of any shell optimizations that allow amortized linear growth over
16651# repeated appends, instead of the typical quadratic growth present in naive
16652# implementations.
16653if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16654  eval 'as_fn_append ()
16655  {
16656    eval $1+=\$2
16657  }'
16658else
16659  as_fn_append ()
16660  {
16661    eval $1=\$$1\$2
16662  }
16663fi # as_fn_append
16664
16665# as_fn_arith ARG...
16666# ------------------
16667# Perform arithmetic evaluation on the ARGs, and store the result in the
16668# global $as_val. Take advantage of shells that can avoid forks. The arguments
16669# must be portable across $(()) and expr.
16670if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16671  eval 'as_fn_arith ()
16672  {
16673    as_val=$(( $* ))
16674  }'
16675else
16676  as_fn_arith ()
16677  {
16678    as_val=`expr "$@" || test $? -eq 1`
16679  }
16680fi # as_fn_arith
16681
16682
16683if expr a : '\(a\)' >/dev/null 2>&1 &&
16684   test "X`expr 00001 : '.*\(...\)'`" = X001; then
16685  as_expr=expr
16686else
16687  as_expr=false
16688fi
16689
16690if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16691  as_basename=basename
16692else
16693  as_basename=false
16694fi
16695
16696if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16697  as_dirname=dirname
16698else
16699  as_dirname=false
16700fi
16701
16702as_me=`$as_basename -- "$0" ||
16703$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16704	 X"$0" : 'X\(//\)$' \| \
16705	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16706$as_echo X/"$0" |
16707    sed '/^.*\/\([^/][^/]*\)\/*$/{
16708	    s//\1/
16709	    q
16710	  }
16711	  /^X\/\(\/\/\)$/{
16712	    s//\1/
16713	    q
16714	  }
16715	  /^X\/\(\/\).*/{
16716	    s//\1/
16717	    q
16718	  }
16719	  s/.*/./; q'`
16720
16721# Avoid depending upon Character Ranges.
16722as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16723as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16724as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16725as_cr_digits='0123456789'
16726as_cr_alnum=$as_cr_Letters$as_cr_digits
16727
16728ECHO_C= ECHO_N= ECHO_T=
16729case `echo -n x` in #(((((
16730-n*)
16731  case `echo 'xy\c'` in
16732  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
16733  xy)  ECHO_C='\c';;
16734  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
16735       ECHO_T='	';;
16736  esac;;
16737*)
16738  ECHO_N='-n';;
16739esac
16740
16741rm -f conf$$ conf$$.exe conf$$.file
16742if test -d conf$$.dir; then
16743  rm -f conf$$.dir/conf$$.file
16744else
16745  rm -f conf$$.dir
16746  mkdir conf$$.dir 2>/dev/null
16747fi
16748if (echo >conf$$.file) 2>/dev/null; then
16749  if ln -s conf$$.file conf$$ 2>/dev/null; then
16750    as_ln_s='ln -s'
16751    # ... but there are two gotchas:
16752    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16753    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16754    # In both cases, we have to default to `cp -pR'.
16755    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16756      as_ln_s='cp -pR'
16757  elif ln conf$$.file conf$$ 2>/dev/null; then
16758    as_ln_s=ln
16759  else
16760    as_ln_s='cp -pR'
16761  fi
16762else
16763  as_ln_s='cp -pR'
16764fi
16765rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16766rmdir conf$$.dir 2>/dev/null
16767
16768
16769# as_fn_mkdir_p
16770# -------------
16771# Create "$as_dir" as a directory, including parents if necessary.
16772as_fn_mkdir_p ()
16773{
16774
16775  case $as_dir in #(
16776  -*) as_dir=./$as_dir;;
16777  esac
16778  test -d "$as_dir" || eval $as_mkdir_p || {
16779    as_dirs=
16780    while :; do
16781      case $as_dir in #(
16782      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16783      *) as_qdir=$as_dir;;
16784      esac
16785      as_dirs="'$as_qdir' $as_dirs"
16786      as_dir=`$as_dirname -- "$as_dir" ||
16787$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16788	 X"$as_dir" : 'X\(//\)[^/]' \| \
16789	 X"$as_dir" : 'X\(//\)$' \| \
16790	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16791$as_echo X"$as_dir" |
16792    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16793	    s//\1/
16794	    q
16795	  }
16796	  /^X\(\/\/\)[^/].*/{
16797	    s//\1/
16798	    q
16799	  }
16800	  /^X\(\/\/\)$/{
16801	    s//\1/
16802	    q
16803	  }
16804	  /^X\(\/\).*/{
16805	    s//\1/
16806	    q
16807	  }
16808	  s/.*/./; q'`
16809      test -d "$as_dir" && break
16810    done
16811    test -z "$as_dirs" || eval "mkdir $as_dirs"
16812  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
16813
16814
16815} # as_fn_mkdir_p
16816if mkdir -p . 2>/dev/null; then
16817  as_mkdir_p='mkdir -p "$as_dir"'
16818else
16819  test -d ./-p && rmdir ./-p
16820  as_mkdir_p=false
16821fi
16822
16823
16824# as_fn_executable_p FILE
16825# -----------------------
16826# Test if FILE is an executable regular file.
16827as_fn_executable_p ()
16828{
16829  test -f "$1" && test -x "$1"
16830} # as_fn_executable_p
16831as_test_x='test -x'
16832as_executable_p=as_fn_executable_p
16833
16834# Sed expression to map a string onto a valid CPP name.
16835as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
16836
16837# Sed expression to map a string onto a valid variable name.
16838as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
16839
16840
16841exec 6>&1
16842## ----------------------------------- ##
16843## Main body of $CONFIG_STATUS script. ##
16844## ----------------------------------- ##
16845_ASEOF
16846test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
16847
16848cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16849# Save the log message, to keep $0 and so on meaningful, and to
16850# report actual input values of CONFIG_FILES etc. instead of their
16851# values after options handling.
16852ac_log="
16853This file was extended by PostgreSQL $as_me 9.6.24, which was
16854generated by GNU Autoconf 2.69.  Invocation command line was
16855
16856  CONFIG_FILES    = $CONFIG_FILES
16857  CONFIG_HEADERS  = $CONFIG_HEADERS
16858  CONFIG_LINKS    = $CONFIG_LINKS
16859  CONFIG_COMMANDS = $CONFIG_COMMANDS
16860  $ $0 $@
16861
16862on `(hostname || uname -n) 2>/dev/null | sed 1q`
16863"
16864
16865_ACEOF
16866
16867case $ac_config_files in *"
16868"*) set x $ac_config_files; shift; ac_config_files=$*;;
16869esac
16870
16871case $ac_config_headers in *"
16872"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16873esac
16874
16875
16876cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16877# Files that config.status was made for.
16878config_files="$ac_config_files"
16879config_headers="$ac_config_headers"
16880config_links="$ac_config_links"
16881config_commands="$ac_config_commands"
16882
16883_ACEOF
16884
16885cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16886ac_cs_usage="\
16887\`$as_me' instantiates files and other configuration actions
16888from templates according to the current configuration.  Unless the files
16889and actions are specified as TAGs, all are instantiated by default.
16890
16891Usage: $0 [OPTION]... [TAG]...
16892
16893  -h, --help       print this help, then exit
16894  -V, --version    print version number and configuration settings, then exit
16895      --config     print configuration, then exit
16896  -q, --quiet, --silent
16897                   do not print progress messages
16898  -d, --debug      don't remove temporary files
16899      --recheck    update $as_me by reconfiguring in the same conditions
16900      --file=FILE[:TEMPLATE]
16901                   instantiate the configuration file FILE
16902      --header=FILE[:TEMPLATE]
16903                   instantiate the configuration header FILE
16904
16905Configuration files:
16906$config_files
16907
16908Configuration headers:
16909$config_headers
16910
16911Configuration links:
16912$config_links
16913
16914Configuration commands:
16915$config_commands
16916
16917Report bugs to <pgsql-bugs@postgresql.org>."
16918
16919_ACEOF
16920cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16921ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
16922ac_cs_version="\\
16923PostgreSQL config.status 9.6.24
16924configured by $0, generated by GNU Autoconf 2.69,
16925  with options \\"\$ac_cs_config\\"
16926
16927Copyright (C) 2012 Free Software Foundation, Inc.
16928This config.status script is free software; the Free Software Foundation
16929gives unlimited permission to copy, distribute and modify it."
16930
16931ac_pwd='$ac_pwd'
16932srcdir='$srcdir'
16933INSTALL='$INSTALL'
16934MKDIR_P='$MKDIR_P'
16935AWK='$AWK'
16936test -n "\$AWK" || AWK=awk
16937_ACEOF
16938
16939cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16940# The default lists apply if the user does not specify any file.
16941ac_need_defaults=:
16942while test $# != 0
16943do
16944  case $1 in
16945  --*=?*)
16946    ac_option=`expr "X$1" : 'X\([^=]*\)='`
16947    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
16948    ac_shift=:
16949    ;;
16950  --*=)
16951    ac_option=`expr "X$1" : 'X\([^=]*\)='`
16952    ac_optarg=
16953    ac_shift=:
16954    ;;
16955  *)
16956    ac_option=$1
16957    ac_optarg=$2
16958    ac_shift=shift
16959    ;;
16960  esac
16961
16962  case $ac_option in
16963  # Handling of the options.
16964  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16965    ac_cs_recheck=: ;;
16966  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
16967    $as_echo "$ac_cs_version"; exit ;;
16968  --config | --confi | --conf | --con | --co | --c )
16969    $as_echo "$ac_cs_config"; exit ;;
16970  --debug | --debu | --deb | --de | --d | -d )
16971    debug=: ;;
16972  --file | --fil | --fi | --f )
16973    $ac_shift
16974    case $ac_optarg in
16975    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16976    '') as_fn_error $? "missing file argument" ;;
16977    esac
16978    as_fn_append CONFIG_FILES " '$ac_optarg'"
16979    ac_need_defaults=false;;
16980  --header | --heade | --head | --hea )
16981    $ac_shift
16982    case $ac_optarg in
16983    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16984    esac
16985    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
16986    ac_need_defaults=false;;
16987  --he | --h)
16988    # Conflict between --help and --header
16989    as_fn_error $? "ambiguous option: \`$1'
16990Try \`$0 --help' for more information.";;
16991  --help | --hel | -h )
16992    $as_echo "$ac_cs_usage"; exit ;;
16993  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16994  | -silent | --silent | --silen | --sile | --sil | --si | --s)
16995    ac_cs_silent=: ;;
16996
16997  # This is an error.
16998  -*) as_fn_error $? "unrecognized option: \`$1'
16999Try \`$0 --help' for more information." ;;
17000
17001  *) as_fn_append ac_config_targets " $1"
17002     ac_need_defaults=false ;;
17003
17004  esac
17005  shift
17006done
17007
17008ac_configure_extra_args=
17009
17010if $ac_cs_silent; then
17011  exec 6>/dev/null
17012  ac_configure_extra_args="$ac_configure_extra_args --silent"
17013fi
17014
17015_ACEOF
17016cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17017if \$ac_cs_recheck; then
17018  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
17019  shift
17020  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17021  CONFIG_SHELL='$SHELL'
17022  export CONFIG_SHELL
17023  exec "\$@"
17024fi
17025
17026_ACEOF
17027cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17028exec 5>>config.log
17029{
17030  echo
17031  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17032## Running $as_me. ##
17033_ASBOX
17034  $as_echo "$ac_log"
17035} >&5
17036
17037_ACEOF
17038cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17039_ACEOF
17040
17041cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17042
17043# Handling of arguments.
17044for ac_config_target in $ac_config_targets
17045do
17046  case $ac_config_target in
17047    "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
17048    "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
17049    "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
17050    "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
17051    "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
17052    "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
17053    "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
17054    "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
17055    "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
17056    "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
17057    "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
17058    "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
17059    "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
17060
17061  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
17062  esac
17063done
17064
17065
17066# If the user did not use the arguments to specify the items to instantiate,
17067# then the envvar interface is used.  Set only those that are not.
17068# We use the long form for the default assignment because of an extremely
17069# bizarre bug on SunOS 4.1.3.
17070if $ac_need_defaults; then
17071  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17072  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17073  test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
17074  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17075fi
17076
17077# Have a temporary directory for convenience.  Make it in the build tree
17078# simply because there is no reason against having it here, and in addition,
17079# creating and moving files from /tmp can sometimes cause problems.
17080# Hook for its removal unless debugging.
17081# Note that there is a small window in which the directory will not be cleaned:
17082# after its creation but before its name has been assigned to `$tmp'.
17083$debug ||
17084{
17085  tmp= ac_tmp=
17086  trap 'exit_status=$?
17087  : "${ac_tmp:=$tmp}"
17088  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
17089' 0
17090  trap 'as_fn_exit 1' 1 2 13 15
17091}
17092# Create a (secure) tmp directory for tmp files.
17093
17094{
17095  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
17096  test -d "$tmp"
17097}  ||
17098{
17099  tmp=./conf$$-$RANDOM
17100  (umask 077 && mkdir "$tmp")
17101} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
17102ac_tmp=$tmp
17103
17104# Set up the scripts for CONFIG_FILES section.
17105# No need to generate them if there are no CONFIG_FILES.
17106# This happens for instance with `./config.status config.h'.
17107if test -n "$CONFIG_FILES"; then
17108
17109
17110ac_cr=`echo X | tr X '\015'`
17111# On cygwin, bash can eat \r inside `` if the user requested igncr.
17112# But we know of no other shell where ac_cr would be empty at this
17113# point, so we can use a bashism as a fallback.
17114if test "x$ac_cr" = x; then
17115  eval ac_cr=\$\'\\r\'
17116fi
17117ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17118if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
17119  ac_cs_awk_cr='\\r'
17120else
17121  ac_cs_awk_cr=$ac_cr
17122fi
17123
17124echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
17125_ACEOF
17126
17127
17128{
17129  echo "cat >conf$$subs.awk <<_ACEOF" &&
17130  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17131  echo "_ACEOF"
17132} >conf$$subs.sh ||
17133  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17134ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
17135ac_delim='%!_!# '
17136for ac_last_try in false false false false false :; do
17137  . ./conf$$subs.sh ||
17138    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17139
17140  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17141  if test $ac_delim_n = $ac_delim_num; then
17142    break
17143  elif $ac_last_try; then
17144    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17145  else
17146    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17147  fi
17148done
17149rm -f conf$$subs.sh
17150
17151cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17152cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
17153_ACEOF
17154sed -n '
17155h
17156s/^/S["/; s/!.*/"]=/
17157p
17158g
17159s/^[^!]*!//
17160:repl
17161t repl
17162s/'"$ac_delim"'$//
17163t delim
17164:nl
17165h
17166s/\(.\{148\}\)..*/\1/
17167t more1
17168s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17169p
17170n
17171b repl
17172:more1
17173s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17174p
17175g
17176s/.\{148\}//
17177t nl
17178:delim
17179h
17180s/\(.\{148\}\)..*/\1/
17181t more2
17182s/["\\]/\\&/g; s/^/"/; s/$/"/
17183p
17184b
17185:more2
17186s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17187p
17188g
17189s/.\{148\}//
17190t delim
17191' <conf$$subs.awk | sed '
17192/^[^""]/{
17193  N
17194  s/\n//
17195}
17196' >>$CONFIG_STATUS || ac_write_fail=1
17197rm -f conf$$subs.awk
17198cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17199_ACAWK
17200cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
17201  for (key in S) S_is_set[key] = 1
17202  FS = ""
17203
17204}
17205{
17206  line = $ 0
17207  nfields = split(line, field, "@")
17208  substed = 0
17209  len = length(field[1])
17210  for (i = 2; i < nfields; i++) {
17211    key = field[i]
17212    keylen = length(key)
17213    if (S_is_set[key]) {
17214      value = S[key]
17215      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17216      len += length(value) + length(field[++i])
17217      substed = 1
17218    } else
17219      len += 1 + keylen
17220  }
17221
17222  print line
17223}
17224
17225_ACAWK
17226_ACEOF
17227cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17228if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17229  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17230else
17231  cat
17232fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
17233  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
17234_ACEOF
17235
17236# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17237# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
17238# trailing colons and then remove the whole line if VPATH becomes empty
17239# (actually we leave an empty line to preserve line numbers).
17240if test "x$srcdir" = x.; then
17241  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
17242h
17243s///
17244s/^/:/
17245s/[	 ]*$/:/
17246s/:\$(srcdir):/:/g
17247s/:\${srcdir}:/:/g
17248s/:@srcdir@:/:/g
17249s/^:*//
17250s/:*$//
17251x
17252s/\(=[	 ]*\).*/\1/
17253G
17254s/\n//
17255s/^[^=]*=[	 ]*$//
17256}'
17257fi
17258
17259cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17260fi # test -n "$CONFIG_FILES"
17261
17262# Set up the scripts for CONFIG_HEADERS section.
17263# No need to generate them if there are no CONFIG_HEADERS.
17264# This happens for instance with `./config.status Makefile'.
17265if test -n "$CONFIG_HEADERS"; then
17266cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
17267BEGIN {
17268_ACEOF
17269
17270# Transform confdefs.h into an awk script `defines.awk', embedded as
17271# here-document in config.status, that substitutes the proper values into
17272# config.h.in to produce config.h.
17273
17274# Create a delimiter string that does not exist in confdefs.h, to ease
17275# handling of long lines.
17276ac_delim='%!_!# '
17277for ac_last_try in false false :; do
17278  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17279  if test -z "$ac_tt"; then
17280    break
17281  elif $ac_last_try; then
17282    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
17283  else
17284    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17285  fi
17286done
17287
17288# For the awk script, D is an array of macro values keyed by name,
17289# likewise P contains macro parameters if any.  Preserve backslash
17290# newline sequences.
17291
17292ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17293sed -n '
17294s/.\{148\}/&'"$ac_delim"'/g
17295t rset
17296:rset
17297s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
17298t def
17299d
17300:def
17301s/\\$//
17302t bsnl
17303s/["\\]/\\&/g
17304s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
17305D["\1"]=" \3"/p
17306s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
17307d
17308:bsnl
17309s/["\\]/\\&/g
17310s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
17311D["\1"]=" \3\\\\\\n"\\/p
17312t cont
17313s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17314t cont
17315d
17316:cont
17317n
17318s/.\{148\}/&'"$ac_delim"'/g
17319t clear
17320:clear
17321s/\\$//
17322t bsnlc
17323s/["\\]/\\&/g; s/^/"/; s/$/"/p
17324d
17325:bsnlc
17326s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17327b cont
17328' <confdefs.h | sed '
17329s/'"$ac_delim"'/"\\\
17330"/g' >>$CONFIG_STATUS || ac_write_fail=1
17331
17332cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17333  for (key in D) D_is_set[key] = 1
17334  FS = ""
17335}
17336/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17337  line = \$ 0
17338  split(line, arg, " ")
17339  if (arg[1] == "#") {
17340    defundef = arg[2]
17341    mac1 = arg[3]
17342  } else {
17343    defundef = substr(arg[1], 2)
17344    mac1 = arg[2]
17345  }
17346  split(mac1, mac2, "(") #)
17347  macro = mac2[1]
17348  prefix = substr(line, 1, index(line, defundef) - 1)
17349  if (D_is_set[macro]) {
17350    # Preserve the white space surrounding the "#".
17351    print prefix "define", macro P[macro] D[macro]
17352    next
17353  } else {
17354    # Replace #undef with comments.  This is necessary, for example,
17355    # in the case of _POSIX_SOURCE, which is predefined and required
17356    # on some systems where configure will not decide to define it.
17357    if (defundef == "undef") {
17358      print "/*", prefix defundef, macro, "*/"
17359      next
17360    }
17361  }
17362}
17363{ print }
17364_ACAWK
17365_ACEOF
17366cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17367  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
17368fi # test -n "$CONFIG_HEADERS"
17369
17370
17371eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
17372shift
17373for ac_tag
17374do
17375  case $ac_tag in
17376  :[FHLC]) ac_mode=$ac_tag; continue;;
17377  esac
17378  case $ac_mode$ac_tag in
17379  :[FHL]*:*);;
17380  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
17381  :[FH]-) ac_tag=-:-;;
17382  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17383  esac
17384  ac_save_IFS=$IFS
17385  IFS=:
17386  set x $ac_tag
17387  IFS=$ac_save_IFS
17388  shift
17389  ac_file=$1
17390  shift
17391
17392  case $ac_mode in
17393  :L) ac_source=$1;;
17394  :[FH])
17395    ac_file_inputs=
17396    for ac_f
17397    do
17398      case $ac_f in
17399      -) ac_f="$ac_tmp/stdin";;
17400      *) # Look for the file first in the build tree, then in the source tree
17401	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
17402	 # because $ac_f cannot contain `:'.
17403	 test -f "$ac_f" ||
17404	   case $ac_f in
17405	   [\\/$]*) false;;
17406	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17407	   esac ||
17408	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
17409      esac
17410      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17411      as_fn_append ac_file_inputs " '$ac_f'"
17412    done
17413
17414    # Let's still pretend it is `configure' which instantiates (i.e., don't
17415    # use $as_me), people would be surprised to read:
17416    #    /* config.h.  Generated by config.status.  */
17417    configure_input='Generated from '`
17418	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17419	`' by configure.'
17420    if test x"$ac_file" != x-; then
17421      configure_input="$ac_file.  $configure_input"
17422      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17423$as_echo "$as_me: creating $ac_file" >&6;}
17424    fi
17425    # Neutralize special characters interpreted by sed in replacement strings.
17426    case $configure_input in #(
17427    *\&* | *\|* | *\\* )
17428       ac_sed_conf_input=`$as_echo "$configure_input" |
17429       sed 's/[\\\\&|]/\\\\&/g'`;; #(
17430    *) ac_sed_conf_input=$configure_input;;
17431    esac
17432
17433    case $ac_tag in
17434    *:-:* | *:-) cat >"$ac_tmp/stdin" \
17435      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
17436    esac
17437    ;;
17438  esac
17439
17440  ac_dir=`$as_dirname -- "$ac_file" ||
17441$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17442	 X"$ac_file" : 'X\(//\)[^/]' \| \
17443	 X"$ac_file" : 'X\(//\)$' \| \
17444	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17445$as_echo X"$ac_file" |
17446    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17447	    s//\1/
17448	    q
17449	  }
17450	  /^X\(\/\/\)[^/].*/{
17451	    s//\1/
17452	    q
17453	  }
17454	  /^X\(\/\/\)$/{
17455	    s//\1/
17456	    q
17457	  }
17458	  /^X\(\/\).*/{
17459	    s//\1/
17460	    q
17461	  }
17462	  s/.*/./; q'`
17463  as_dir="$ac_dir"; as_fn_mkdir_p
17464  ac_builddir=.
17465
17466case "$ac_dir" in
17467.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17468*)
17469  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17470  # A ".." for each directory in $ac_dir_suffix.
17471  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17472  case $ac_top_builddir_sub in
17473  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17474  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17475  esac ;;
17476esac
17477ac_abs_top_builddir=$ac_pwd
17478ac_abs_builddir=$ac_pwd$ac_dir_suffix
17479# for backward compatibility:
17480ac_top_builddir=$ac_top_build_prefix
17481
17482case $srcdir in
17483  .)  # We are building in place.
17484    ac_srcdir=.
17485    ac_top_srcdir=$ac_top_builddir_sub
17486    ac_abs_top_srcdir=$ac_pwd ;;
17487  [\\/]* | ?:[\\/]* )  # Absolute name.
17488    ac_srcdir=$srcdir$ac_dir_suffix;
17489    ac_top_srcdir=$srcdir
17490    ac_abs_top_srcdir=$srcdir ;;
17491  *) # Relative name.
17492    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17493    ac_top_srcdir=$ac_top_build_prefix$srcdir
17494    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
17495esac
17496ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
17497
17498
17499  case $ac_mode in
17500  :F)
17501  #
17502  # CONFIG_FILE
17503  #
17504
17505  case $INSTALL in
17506  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17507  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
17508  esac
17509  ac_MKDIR_P=$MKDIR_P
17510  case $MKDIR_P in
17511  [\\/$]* | ?:[\\/]* ) ;;
17512  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17513  esac
17514_ACEOF
17515
17516cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17517# If the template does not know about datarootdir, expand it.
17518# FIXME: This hack should be removed a few years after 2.60.
17519ac_datarootdir_hack=; ac_datarootdir_seen=
17520ac_sed_dataroot='
17521/datarootdir/ {
17522  p
17523  q
17524}
17525/@datadir@/p
17526/@docdir@/p
17527/@infodir@/p
17528/@localedir@/p
17529/@mandir@/p'
17530case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17531*datarootdir*) ac_datarootdir_seen=yes;;
17532*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17533  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17534$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17535_ACEOF
17536cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17537  ac_datarootdir_hack='
17538  s&@datadir@&$datadir&g
17539  s&@docdir@&$docdir&g
17540  s&@infodir@&$infodir&g
17541  s&@localedir@&$localedir&g
17542  s&@mandir@&$mandir&g
17543  s&\\\${datarootdir}&$datarootdir&g' ;;
17544esac
17545_ACEOF
17546
17547# Neutralize VPATH when `$srcdir' = `.'.
17548# Shell code in configure.ac might set extrasub.
17549# FIXME: do we really want to maintain this feature?
17550cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17551ac_sed_extra="$ac_vpsub
17552$extrasub
17553_ACEOF
17554cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17555:t
17556/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17557s|@configure_input@|$ac_sed_conf_input|;t t
17558s&@top_builddir@&$ac_top_builddir_sub&;t t
17559s&@top_build_prefix@&$ac_top_build_prefix&;t t
17560s&@srcdir@&$ac_srcdir&;t t
17561s&@abs_srcdir@&$ac_abs_srcdir&;t t
17562s&@top_srcdir@&$ac_top_srcdir&;t t
17563s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17564s&@builddir@&$ac_builddir&;t t
17565s&@abs_builddir@&$ac_abs_builddir&;t t
17566s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17567s&@INSTALL@&$ac_INSTALL&;t t
17568s&@MKDIR_P@&$ac_MKDIR_P&;t t
17569$ac_datarootdir_hack
17570"
17571eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17572  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17573
17574test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17575  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17576  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
17577      "$ac_tmp/out"`; test -z "$ac_out"; } &&
17578  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17579which seems to be undefined.  Please make sure it is defined" >&5
17580$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17581which seems to be undefined.  Please make sure it is defined" >&2;}
17582
17583  rm -f "$ac_tmp/stdin"
17584  case $ac_file in
17585  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17586  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
17587  esac \
17588  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17589 ;;
17590  :H)
17591  #
17592  # CONFIG_HEADER
17593  #
17594  if test x"$ac_file" != x-; then
17595    {
17596      $as_echo "/* $configure_input  */" \
17597      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17598    } >"$ac_tmp/config.h" \
17599      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17600    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
17601      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17602$as_echo "$as_me: $ac_file is unchanged" >&6;}
17603    else
17604      rm -f "$ac_file"
17605      mv "$ac_tmp/config.h" "$ac_file" \
17606	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
17607    fi
17608  else
17609    $as_echo "/* $configure_input  */" \
17610      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
17611      || as_fn_error $? "could not create -" "$LINENO" 5
17612  fi
17613 ;;
17614  :L)
17615  #
17616  # CONFIG_LINK
17617  #
17618
17619  if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
17620    :
17621  else
17622    # Prefer the file from the source tree if names are identical.
17623    if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
17624      ac_source=$srcdir/$ac_source
17625    fi
17626
17627    { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
17628$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
17629
17630    if test ! -r "$ac_source"; then
17631      as_fn_error $? "$ac_source: file not found" "$LINENO" 5
17632    fi
17633    rm -f "$ac_file"
17634
17635    # Try a relative symlink, then a hard link, then a copy.
17636    case $ac_source in
17637    [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
17638	*) ac_rel_source=$ac_top_build_prefix$ac_source ;;
17639    esac
17640    ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
17641      ln "$ac_source" "$ac_file" 2>/dev/null ||
17642      cp -p "$ac_source" "$ac_file" ||
17643      as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
17644  fi
17645 ;;
17646  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17647$as_echo "$as_me: executing $ac_file commands" >&6;}
17648 ;;
17649  esac
17650
17651
17652  case $ac_file$ac_mode in
17653    "check_win32_symlinks":C)
17654# Links sometimes fail undetected on Mingw -
17655# so here we detect it and warn the user
17656for FILE in $CONFIG_LINKS
17657 do
17658	# test -e works for symlinks in the MinGW console
17659	test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
17660$as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
17661 done
17662 ;;
17663    "src/include/pg_config.h":H)
17664# Update timestamp for pg_config.h (see Makefile.global)
17665echo >src/include/stamp-h
17666 ;;
17667    "src/include/pg_config_ext.h":H)
17668# Update timestamp for pg_config_ext.h (see Makefile.global)
17669echo >src/include/stamp-ext-h
17670 ;;
17671    "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
17672
17673  esac
17674done # for ac_tag
17675
17676
17677as_fn_exit 0
17678_ACEOF
17679ac_clean_files=$ac_clean_files_save
17680
17681test $ac_write_fail = 0 ||
17682  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
17683
17684
17685# configure is writing to config.log, and then calls config.status.
17686# config.status does its own redirection, appending to config.log.
17687# Unfortunately, on DOS this fails, as config.log is still kept open
17688# by configure, so config.status won't be able to write to it; its
17689# output is simply discarded.  So we exec the FD to /dev/null,
17690# effectively closing config.log, so it can be properly (re)opened and
17691# appended to by config.status.  When coming back to configure, we
17692# need to make the FD available again.
17693if test "$no_create" != yes; then
17694  ac_cs_success=:
17695  ac_config_status_args=
17696  test "$silent" = yes &&
17697    ac_config_status_args="$ac_config_status_args --quiet"
17698  exec 5>/dev/null
17699  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17700  exec 5>>config.log
17701  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17702  # would make configure fail if this is the last instruction.
17703  $ac_cs_success || as_fn_exit 1
17704fi
17705if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17706  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17707$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
17708fi
17709
17710