1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for PostgreSQL 11.14.
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-2018, 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='11.14'
586PACKAGE_STRING='PostgreSQL 11.14'
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
633DBTOEPUB
634FOP
635XSLTPROC
636XMLLINT
637TCL_SHLIB_LD_LIBS
638TCL_SHARED_BUILD
639TCL_LIB_SPEC
640TCL_LIBS
641TCL_INCLUDE_SPEC
642TCL_CONFIG_SH
643TCLSH
644XGETTEXT
645MSGMERGE
646MSGFMT_FLAGS
647MSGFMT
648PG_CRC32C_OBJS
649CFLAGS_ARMV8_CRC32C
650CFLAGS_SSE42
651have_win32_dbghelp
652HAVE_IPV6
653LIBOBJS
654UUID_LIBS
655LDAP_LIBS_BE
656LDAP_LIBS_FE
657PTHREAD_CFLAGS
658PTHREAD_LIBS
659PTHREAD_CC
660ax_pthread_config
661ZIC
662python_additional_libs
663python_libspec
664python_libdir
665python_includespec
666python_version
667python_majorversion
668PYTHON
669perl_embed_ldflags
670perl_embed_ccflags
671perl_includespec
672perl_useshrplib
673perl_privlibexp
674perl_archlibexp
675PERL
676FLEXFLAGS
677FLEX
678BISONFLAGS
679BISON
680MKDIR_P
681LN_S
682TAR
683install_bin
684INSTALL_DATA
685INSTALL_SCRIPT
686INSTALL_PROGRAM
687WINDRES
688DLLWRAP
689DLLTOOL
690AR
691STRIP_SHARED_LIB
692STRIP_STATIC_LIB
693STRIP
694RANLIB
695with_gnu_ld
696LD
697LDFLAGS_SL
698LDFLAGS_EX
699ELF_SYS
700EGREP
701GREP
702with_zlib
703with_system_tzdata
704with_libxslt
705XML2_LIBS
706XML2_CFLAGS
707XML2_CONFIG
708with_libxml
709UUID_EXTRA_OBJS
710with_uuid
711with_systemd
712with_selinux
713with_openssl
714with_ldap
715with_krb_srvnam
716krb_srvtab
717with_gssapi
718with_python
719with_perl
720with_tcl
721ICU_LIBS
722ICU_CFLAGS
723with_icu
724enable_thread_safety
725INCLUDES
726autodepend
727PKG_CONFIG_LIBDIR
728PKG_CONFIG_PATH
729PKG_CONFIG
730TAS
731GCC
732CPP
733CFLAGS_SL
734BITCODE_CXXFLAGS
735BITCODE_CFLAGS
736CFLAGS_VECTOR
737LLVM_BINPATH
738LLVM_CXXFLAGS
739LLVM_CFLAGS
740LLVM_CPPFLAGS
741LLVM_LIBS
742CLANG
743LLVM_CONFIG
744AWK
745with_llvm
746SUN_STUDIO_CC
747ac_ct_CXX
748CXXFLAGS
749CXX
750OBJEXT
751EXEEXT
752ac_ct_CC
753CPPFLAGS
754LDFLAGS
755CFLAGS
756CC
757enable_tap_tests
758enable_dtrace
759DTRACEFLAGS
760DTRACE
761enable_coverage
762GENHTML
763LCOV
764GCOV
765enable_debug
766enable_strong_random
767enable_rpath
768default_port
769WANTED_LANGUAGES
770enable_nls
771PORTNAME
772host_os
773host_vendor
774host_cpu
775host
776build_os
777build_vendor
778build_cpu
779build
780PG_MAJORVERSION
781configure_args
782target_alias
783host_alias
784build_alias
785LIBS
786ECHO_T
787ECHO_N
788ECHO_C
789DEFS
790mandir
791localedir
792libdir
793psdir
794pdfdir
795dvidir
796htmldir
797infodir
798docdir
799oldincludedir
800includedir
801localstatedir
802sharedstatedir
803sysconfdir
804datadir
805datarootdir
806libexecdir
807sbindir
808bindir
809program_transform_name
810prefix
811exec_prefix
812PACKAGE_URL
813PACKAGE_BUGREPORT
814PACKAGE_STRING
815PACKAGE_VERSION
816PACKAGE_TARNAME
817PACKAGE_NAME
818PATH_SEPARATOR
819SHELL'
820ac_subst_files=''
821ac_user_opts='
822enable_option_checking
823with_extra_version
824with_template
825with_includes
826with_libraries
827with_libs
828enable_integer_datetimes
829enable_nls
830with_pgport
831enable_rpath
832enable_spinlocks
833enable_atomics
834enable_strong_random
835enable_debug
836enable_profiling
837enable_coverage
838enable_dtrace
839enable_tap_tests
840with_blocksize
841with_segsize
842with_wal_blocksize
843with_CC
844with_llvm
845enable_depend
846enable_cassert
847enable_thread_safety
848with_icu
849with_tcl
850with_tclconfig
851with_perl
852with_python
853with_gssapi
854with_krb_srvnam
855with_pam
856with_bsd_auth
857with_ldap
858with_bonjour
859with_openssl
860with_selinux
861with_systemd
862with_readline
863with_libedit_preferred
864with_uuid
865with_ossp_uuid
866with_libxml
867with_libxslt
868with_system_tzdata
869with_zlib
870with_gnu_ld
871enable_largefile
872enable_float4_byval
873enable_float8_byval
874'
875      ac_precious_vars='build_alias
876host_alias
877target_alias
878CC
879CFLAGS
880LDFLAGS
881LIBS
882CPPFLAGS
883CXX
884CXXFLAGS
885CCC
886LLVM_CONFIG
887CLANG
888CPP
889PKG_CONFIG
890PKG_CONFIG_PATH
891PKG_CONFIG_LIBDIR
892ICU_CFLAGS
893ICU_LIBS
894XML2_CONFIG
895XML2_CFLAGS
896XML2_LIBS
897LDFLAGS_EX
898LDFLAGS_SL'
899
900
901# Initialize some variables set by options.
902ac_init_help=
903ac_init_version=false
904ac_unrecognized_opts=
905ac_unrecognized_sep=
906# The variables have the same names as the options, with
907# dashes changed to underlines.
908cache_file=/dev/null
909exec_prefix=NONE
910no_create=
911no_recursion=
912prefix=NONE
913program_prefix=NONE
914program_suffix=NONE
915program_transform_name=s,x,x,
916silent=
917site=
918srcdir=
919verbose=
920x_includes=NONE
921x_libraries=NONE
922
923# Installation directory options.
924# These are left unexpanded so users can "make install exec_prefix=/foo"
925# and all the variables that are supposed to be based on exec_prefix
926# by default will actually change.
927# Use braces instead of parens because sh, perl, etc. also accept them.
928# (The list follows the same order as the GNU Coding Standards.)
929bindir='${exec_prefix}/bin'
930sbindir='${exec_prefix}/sbin'
931libexecdir='${exec_prefix}/libexec'
932datarootdir='${prefix}/share'
933datadir='${datarootdir}'
934sysconfdir='${prefix}/etc'
935sharedstatedir='${prefix}/com'
936localstatedir='${prefix}/var'
937includedir='${prefix}/include'
938oldincludedir='/usr/include'
939docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
940infodir='${datarootdir}/info'
941htmldir='${docdir}'
942dvidir='${docdir}'
943pdfdir='${docdir}'
944psdir='${docdir}'
945libdir='${exec_prefix}/lib'
946localedir='${datarootdir}/locale'
947mandir='${datarootdir}/man'
948
949ac_prev=
950ac_dashdash=
951for ac_option
952do
953  # If the previous option needs an argument, assign it.
954  if test -n "$ac_prev"; then
955    eval $ac_prev=\$ac_option
956    ac_prev=
957    continue
958  fi
959
960  case $ac_option in
961  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
962  *=)   ac_optarg= ;;
963  *)    ac_optarg=yes ;;
964  esac
965
966  # Accept the important Cygnus configure options, so we can diagnose typos.
967
968  case $ac_dashdash$ac_option in
969  --)
970    ac_dashdash=yes ;;
971
972  -bindir | --bindir | --bindi | --bind | --bin | --bi)
973    ac_prev=bindir ;;
974  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
975    bindir=$ac_optarg ;;
976
977  -build | --build | --buil | --bui | --bu)
978    ac_prev=build_alias ;;
979  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
980    build_alias=$ac_optarg ;;
981
982  -cache-file | --cache-file | --cache-fil | --cache-fi \
983  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
984    ac_prev=cache_file ;;
985  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
986  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
987    cache_file=$ac_optarg ;;
988
989  --config-cache | -C)
990    cache_file=config.cache ;;
991
992  -datadir | --datadir | --datadi | --datad)
993    ac_prev=datadir ;;
994  -datadir=* | --datadir=* | --datadi=* | --datad=*)
995    datadir=$ac_optarg ;;
996
997  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
998  | --dataroo | --dataro | --datar)
999    ac_prev=datarootdir ;;
1000  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1001  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1002    datarootdir=$ac_optarg ;;
1003
1004  -disable-* | --disable-*)
1005    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1006    # Reject names that are not valid shell variable names.
1007    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1008      as_fn_error $? "invalid feature name: $ac_useropt"
1009    ac_useropt_orig=$ac_useropt
1010    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1011    case $ac_user_opts in
1012      *"
1013"enable_$ac_useropt"
1014"*) ;;
1015      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1016	 ac_unrecognized_sep=', ';;
1017    esac
1018    eval enable_$ac_useropt=no ;;
1019
1020  -docdir | --docdir | --docdi | --doc | --do)
1021    ac_prev=docdir ;;
1022  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1023    docdir=$ac_optarg ;;
1024
1025  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1026    ac_prev=dvidir ;;
1027  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1028    dvidir=$ac_optarg ;;
1029
1030  -enable-* | --enable-*)
1031    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1032    # Reject names that are not valid shell variable names.
1033    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1034      as_fn_error $? "invalid feature name: $ac_useropt"
1035    ac_useropt_orig=$ac_useropt
1036    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1037    case $ac_user_opts in
1038      *"
1039"enable_$ac_useropt"
1040"*) ;;
1041      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1042	 ac_unrecognized_sep=', ';;
1043    esac
1044    eval enable_$ac_useropt=\$ac_optarg ;;
1045
1046  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1047  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1048  | --exec | --exe | --ex)
1049    ac_prev=exec_prefix ;;
1050  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1051  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1052  | --exec=* | --exe=* | --ex=*)
1053    exec_prefix=$ac_optarg ;;
1054
1055  -gas | --gas | --ga | --g)
1056    # Obsolete; use --with-gas.
1057    with_gas=yes ;;
1058
1059  -help | --help | --hel | --he | -h)
1060    ac_init_help=long ;;
1061  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1062    ac_init_help=recursive ;;
1063  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1064    ac_init_help=short ;;
1065
1066  -host | --host | --hos | --ho)
1067    ac_prev=host_alias ;;
1068  -host=* | --host=* | --hos=* | --ho=*)
1069    host_alias=$ac_optarg ;;
1070
1071  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1072    ac_prev=htmldir ;;
1073  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1074  | --ht=*)
1075    htmldir=$ac_optarg ;;
1076
1077  -includedir | --includedir | --includedi | --included | --include \
1078  | --includ | --inclu | --incl | --inc)
1079    ac_prev=includedir ;;
1080  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1081  | --includ=* | --inclu=* | --incl=* | --inc=*)
1082    includedir=$ac_optarg ;;
1083
1084  -infodir | --infodir | --infodi | --infod | --info | --inf)
1085    ac_prev=infodir ;;
1086  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1087    infodir=$ac_optarg ;;
1088
1089  -libdir | --libdir | --libdi | --libd)
1090    ac_prev=libdir ;;
1091  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1092    libdir=$ac_optarg ;;
1093
1094  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1095  | --libexe | --libex | --libe)
1096    ac_prev=libexecdir ;;
1097  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1098  | --libexe=* | --libex=* | --libe=*)
1099    libexecdir=$ac_optarg ;;
1100
1101  -localedir | --localedir | --localedi | --localed | --locale)
1102    ac_prev=localedir ;;
1103  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1104    localedir=$ac_optarg ;;
1105
1106  -localstatedir | --localstatedir | --localstatedi | --localstated \
1107  | --localstate | --localstat | --localsta | --localst | --locals)
1108    ac_prev=localstatedir ;;
1109  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1110  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1111    localstatedir=$ac_optarg ;;
1112
1113  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1114    ac_prev=mandir ;;
1115  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1116    mandir=$ac_optarg ;;
1117
1118  -nfp | --nfp | --nf)
1119    # Obsolete; use --without-fp.
1120    with_fp=no ;;
1121
1122  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1123  | --no-cr | --no-c | -n)
1124    no_create=yes ;;
1125
1126  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1127  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1128    no_recursion=yes ;;
1129
1130  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1131  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1132  | --oldin | --oldi | --old | --ol | --o)
1133    ac_prev=oldincludedir ;;
1134  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1135  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1136  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1137    oldincludedir=$ac_optarg ;;
1138
1139  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1140    ac_prev=prefix ;;
1141  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1142    prefix=$ac_optarg ;;
1143
1144  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1145  | --program-pre | --program-pr | --program-p)
1146    ac_prev=program_prefix ;;
1147  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1148  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1149    program_prefix=$ac_optarg ;;
1150
1151  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1152  | --program-suf | --program-su | --program-s)
1153    ac_prev=program_suffix ;;
1154  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1155  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1156    program_suffix=$ac_optarg ;;
1157
1158  -program-transform-name | --program-transform-name \
1159  | --program-transform-nam | --program-transform-na \
1160  | --program-transform-n | --program-transform- \
1161  | --program-transform | --program-transfor \
1162  | --program-transfo | --program-transf \
1163  | --program-trans | --program-tran \
1164  | --progr-tra | --program-tr | --program-t)
1165    ac_prev=program_transform_name ;;
1166  -program-transform-name=* | --program-transform-name=* \
1167  | --program-transform-nam=* | --program-transform-na=* \
1168  | --program-transform-n=* | --program-transform-=* \
1169  | --program-transform=* | --program-transfor=* \
1170  | --program-transfo=* | --program-transf=* \
1171  | --program-trans=* | --program-tran=* \
1172  | --progr-tra=* | --program-tr=* | --program-t=*)
1173    program_transform_name=$ac_optarg ;;
1174
1175  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1176    ac_prev=pdfdir ;;
1177  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1178    pdfdir=$ac_optarg ;;
1179
1180  -psdir | --psdir | --psdi | --psd | --ps)
1181    ac_prev=psdir ;;
1182  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1183    psdir=$ac_optarg ;;
1184
1185  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1186  | -silent | --silent | --silen | --sile | --sil)
1187    silent=yes ;;
1188
1189  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1190    ac_prev=sbindir ;;
1191  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1192  | --sbi=* | --sb=*)
1193    sbindir=$ac_optarg ;;
1194
1195  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1196  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1197  | --sharedst | --shareds | --shared | --share | --shar \
1198  | --sha | --sh)
1199    ac_prev=sharedstatedir ;;
1200  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1201  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1202  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1203  | --sha=* | --sh=*)
1204    sharedstatedir=$ac_optarg ;;
1205
1206  -site | --site | --sit)
1207    ac_prev=site ;;
1208  -site=* | --site=* | --sit=*)
1209    site=$ac_optarg ;;
1210
1211  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1212    ac_prev=srcdir ;;
1213  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1214    srcdir=$ac_optarg ;;
1215
1216  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1217  | --syscon | --sysco | --sysc | --sys | --sy)
1218    ac_prev=sysconfdir ;;
1219  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1220  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1221    sysconfdir=$ac_optarg ;;
1222
1223  -target | --target | --targe | --targ | --tar | --ta | --t)
1224    ac_prev=target_alias ;;
1225  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1226    target_alias=$ac_optarg ;;
1227
1228  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1229    verbose=yes ;;
1230
1231  -version | --version | --versio | --versi | --vers | -V)
1232    ac_init_version=: ;;
1233
1234  -with-* | --with-*)
1235    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1236    # Reject names that are not valid shell variable names.
1237    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1238      as_fn_error $? "invalid package name: $ac_useropt"
1239    ac_useropt_orig=$ac_useropt
1240    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1241    case $ac_user_opts in
1242      *"
1243"with_$ac_useropt"
1244"*) ;;
1245      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1246	 ac_unrecognized_sep=', ';;
1247    esac
1248    eval with_$ac_useropt=\$ac_optarg ;;
1249
1250  -without-* | --without-*)
1251    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1252    # Reject names that are not valid shell variable names.
1253    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1254      as_fn_error $? "invalid package name: $ac_useropt"
1255    ac_useropt_orig=$ac_useropt
1256    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1257    case $ac_user_opts in
1258      *"
1259"with_$ac_useropt"
1260"*) ;;
1261      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1262	 ac_unrecognized_sep=', ';;
1263    esac
1264    eval with_$ac_useropt=no ;;
1265
1266  --x)
1267    # Obsolete; use --with-x.
1268    with_x=yes ;;
1269
1270  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1271  | --x-incl | --x-inc | --x-in | --x-i)
1272    ac_prev=x_includes ;;
1273  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1274  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1275    x_includes=$ac_optarg ;;
1276
1277  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1278  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1279    ac_prev=x_libraries ;;
1280  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1281  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1282    x_libraries=$ac_optarg ;;
1283
1284  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1285Try \`$0 --help' for more information"
1286    ;;
1287
1288  *=*)
1289    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1290    # Reject names that are not valid shell variable names.
1291    case $ac_envvar in #(
1292      '' | [0-9]* | *[!_$as_cr_alnum]* )
1293      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1294    esac
1295    eval $ac_envvar=\$ac_optarg
1296    export $ac_envvar ;;
1297
1298  *)
1299    # FIXME: should be removed in autoconf 3.0.
1300    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1301    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1302      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1303    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1304    ;;
1305
1306  esac
1307done
1308
1309if test -n "$ac_prev"; then
1310  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1311  as_fn_error $? "missing argument to $ac_option"
1312fi
1313
1314if test -n "$ac_unrecognized_opts"; then
1315  case $enable_option_checking in
1316    no) ;;
1317    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1318    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1319  esac
1320fi
1321
1322# Check all directory arguments for consistency.
1323for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1324		datadir sysconfdir sharedstatedir localstatedir includedir \
1325		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1326		libdir localedir mandir
1327do
1328  eval ac_val=\$$ac_var
1329  # Remove trailing slashes.
1330  case $ac_val in
1331    */ )
1332      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1333      eval $ac_var=\$ac_val;;
1334  esac
1335  # Be sure to have absolute directory names.
1336  case $ac_val in
1337    [\\/$]* | ?:[\\/]* )  continue;;
1338    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1339  esac
1340  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1341done
1342
1343# There might be people who depend on the old broken behavior: `$host'
1344# used to hold the argument of --host etc.
1345# FIXME: To remove some day.
1346build=$build_alias
1347host=$host_alias
1348target=$target_alias
1349
1350# FIXME: To remove some day.
1351if test "x$host_alias" != x; then
1352  if test "x$build_alias" = x; then
1353    cross_compiling=maybe
1354  elif test "x$build_alias" != "x$host_alias"; then
1355    cross_compiling=yes
1356  fi
1357fi
1358
1359ac_tool_prefix=
1360test -n "$host_alias" && ac_tool_prefix=$host_alias-
1361
1362test "$silent" = yes && exec 6>/dev/null
1363
1364
1365ac_pwd=`pwd` && test -n "$ac_pwd" &&
1366ac_ls_di=`ls -di .` &&
1367ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1368  as_fn_error $? "working directory cannot be determined"
1369test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1370  as_fn_error $? "pwd does not report name of working directory"
1371
1372
1373# Find the source files, if location was not specified.
1374if test -z "$srcdir"; then
1375  ac_srcdir_defaulted=yes
1376  # Try the directory containing this script, then the parent directory.
1377  ac_confdir=`$as_dirname -- "$as_myself" ||
1378$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1379	 X"$as_myself" : 'X\(//\)[^/]' \| \
1380	 X"$as_myself" : 'X\(//\)$' \| \
1381	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1382$as_echo X"$as_myself" |
1383    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1384	    s//\1/
1385	    q
1386	  }
1387	  /^X\(\/\/\)[^/].*/{
1388	    s//\1/
1389	    q
1390	  }
1391	  /^X\(\/\/\)$/{
1392	    s//\1/
1393	    q
1394	  }
1395	  /^X\(\/\).*/{
1396	    s//\1/
1397	    q
1398	  }
1399	  s/.*/./; q'`
1400  srcdir=$ac_confdir
1401  if test ! -r "$srcdir/$ac_unique_file"; then
1402    srcdir=..
1403  fi
1404else
1405  ac_srcdir_defaulted=no
1406fi
1407if test ! -r "$srcdir/$ac_unique_file"; then
1408  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1409  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1410fi
1411ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1412ac_abs_confdir=`(
1413	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1414	pwd)`
1415# When building in place, set srcdir=.
1416if test "$ac_abs_confdir" = "$ac_pwd"; then
1417  srcdir=.
1418fi
1419# Remove unnecessary trailing slashes from srcdir.
1420# Double slashes in file names in object file debugging info
1421# mess up M-x gdb in Emacs.
1422case $srcdir in
1423*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1424esac
1425for ac_var in $ac_precious_vars; do
1426  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1427  eval ac_env_${ac_var}_value=\$${ac_var}
1428  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1429  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1430done
1431
1432#
1433# Report the --help message.
1434#
1435if test "$ac_init_help" = "long"; then
1436  # Omit some internal or obsolete options to make the list less imposing.
1437  # This message is too long to be a string in the A/UX 3.1 sh.
1438  cat <<_ACEOF
1439\`configure' configures PostgreSQL 11.14 to adapt to many kinds of systems.
1440
1441Usage: $0 [OPTION]... [VAR=VALUE]...
1442
1443To assign environment variables (e.g., CC, CFLAGS...), specify them as
1444VAR=VALUE.  See below for descriptions of some of the useful variables.
1445
1446Defaults for the options are specified in brackets.
1447
1448Configuration:
1449  -h, --help              display this help and exit
1450      --help=short        display options specific to this package
1451      --help=recursive    display the short help of all the included packages
1452  -V, --version           display version information and exit
1453  -q, --quiet, --silent   do not print \`checking ...' messages
1454      --cache-file=FILE   cache test results in FILE [disabled]
1455  -C, --config-cache      alias for \`--cache-file=config.cache'
1456  -n, --no-create         do not create output files
1457      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1458
1459Installation directories:
1460  --prefix=PREFIX         install architecture-independent files in PREFIX
1461                          [$ac_default_prefix]
1462  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1463                          [PREFIX]
1464
1465By default, \`make install' will install all the files in
1466\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1467an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1468for instance \`--prefix=\$HOME'.
1469
1470For better control, use the options below.
1471
1472Fine tuning of the installation directories:
1473  --bindir=DIR            user executables [EPREFIX/bin]
1474  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1475  --libexecdir=DIR        program executables [EPREFIX/libexec]
1476  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1477  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1478  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1479  --libdir=DIR            object code libraries [EPREFIX/lib]
1480  --includedir=DIR        C header files [PREFIX/include]
1481  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1482  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1483  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1484  --infodir=DIR           info documentation [DATAROOTDIR/info]
1485  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1486  --mandir=DIR            man documentation [DATAROOTDIR/man]
1487  --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1488  --htmldir=DIR           html documentation [DOCDIR]
1489  --dvidir=DIR            dvi documentation [DOCDIR]
1490  --pdfdir=DIR            pdf documentation [DOCDIR]
1491  --psdir=DIR             ps documentation [DOCDIR]
1492_ACEOF
1493
1494  cat <<\_ACEOF
1495
1496System types:
1497  --build=BUILD     configure for building on BUILD [guessed]
1498  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1499_ACEOF
1500fi
1501
1502if test -n "$ac_init_help"; then
1503  case $ac_init_help in
1504     short | recursive ) echo "Configuration of PostgreSQL 11.14:";;
1505   esac
1506  cat <<\_ACEOF
1507
1508Optional Features:
1509  --disable-option-checking  ignore unrecognized --enable/--with options
1510  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1511  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1512  --disable-integer-datetimes
1513                          obsolete option, no longer supported
1514  --enable-nls[=LANGUAGES]
1515                          enable Native Language Support
1516  --disable-rpath         do not embed shared library search path in
1517                          executables
1518  --disable-spinlocks     do not use spinlocks
1519  --disable-atomics       do not use atomic operations
1520  --disable-strong-random do not use a strong random number source
1521  --enable-debug          build with debugging symbols (-g)
1522  --enable-profiling      build with profiling enabled
1523  --enable-coverage       build with coverage testing instrumentation
1524  --enable-dtrace         build with DTrace support
1525  --enable-tap-tests      enable TAP tests (requires Perl and IPC::Run)
1526  --enable-depend         turn on automatic dependency tracking
1527  --enable-cassert        enable assertion checks (for debugging)
1528  --disable-thread-safety disable thread-safety in client libraries
1529  --disable-largefile     omit support for large files
1530  --disable-float4-byval  disable float4 passed by value
1531  --disable-float8-byval  disable float8 passed by value
1532
1533Optional Packages:
1534  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1535  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1536  --with-extra-version=STRING
1537                          append STRING to version
1538  --with-template=NAME    override operating system template
1539  --with-includes=DIRS    look for additional header files in DIRS
1540  --with-libraries=DIRS   look for additional libraries in DIRS
1541  --with-libs=DIRS        alternative spelling of --with-libraries
1542  --with-pgport=PORTNUM   set default port number [5432]
1543  --with-blocksize=BLOCKSIZE
1544                          set table block size in kB [8]
1545  --with-segsize=SEGSIZE  set table segment size in GB [1]
1546  --with-wal-blocksize=BLOCKSIZE
1547                          set WAL block size in kB [8]
1548  --with-CC=CMD           set compiler (deprecated)
1549  --with-llvm             build with LLVM based JIT support
1550  --with-icu              build with ICU support
1551  --with-tcl              build Tcl modules (PL/Tcl)
1552  --with-tclconfig=DIR    tclConfig.sh is in DIR
1553  --with-perl             build Perl modules (PL/Perl)
1554  --with-python           build Python modules (PL/Python)
1555  --with-gssapi           build with GSSAPI support
1556  --with-krb-srvnam=NAME  default service principal name in Kerberos (GSSAPI)
1557                          [postgres]
1558  --with-pam              build with PAM support
1559  --with-bsd-auth         build with BSD Authentication support
1560  --with-ldap             build with LDAP support
1561  --with-bonjour          build with Bonjour support
1562  --with-openssl          build with OpenSSL support
1563  --with-selinux          build with SELinux support
1564  --with-systemd          build with systemd support
1565  --without-readline      do not use GNU Readline nor BSD Libedit for editing
1566  --with-libedit-preferred
1567                          prefer BSD Libedit over GNU Readline
1568  --with-uuid=LIB         build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1569  --with-ossp-uuid        obsolete spelling of --with-uuid=ossp
1570  --with-libxml           build with XML support
1571  --with-libxslt          use XSLT support when building contrib/xml2
1572  --with-system-tzdata=DIR
1573                          use system time zone data in DIR
1574  --without-zlib          do not use Zlib
1575  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1576
1577Some influential environment variables:
1578  CC          C compiler command
1579  CFLAGS      C compiler flags
1580  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1581              nonstandard directory <lib dir>
1582  LIBS        libraries to pass to the linker, e.g. -l<library>
1583  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1584              you have headers in a nonstandard directory <include dir>
1585  CXX         C++ compiler command
1586  CXXFLAGS    C++ compiler flags
1587  LLVM_CONFIG path to llvm-config command
1588  CLANG       path to clang compiler to generate bitcode
1589  CPP         C preprocessor
1590  PKG_CONFIG  path to pkg-config utility
1591  PKG_CONFIG_PATH
1592              directories to add to pkg-config's search path
1593  PKG_CONFIG_LIBDIR
1594              path overriding pkg-config's built-in search path
1595  ICU_CFLAGS  C compiler flags for ICU, overriding pkg-config
1596  ICU_LIBS    linker flags for ICU, overriding pkg-config
1597  XML2_CONFIG path to xml2-config utility
1598  XML2_CFLAGS C compiler flags for XML2, overriding pkg-config
1599  XML2_LIBS   linker flags for XML2, overriding pkg-config
1600  LDFLAGS_EX  extra linker flags for linking executables only
1601  LDFLAGS_SL  extra linker flags for linking shared libraries only
1602
1603Use these variables to override the choices made by `configure' or to help
1604it to find libraries and programs with nonstandard names/locations.
1605
1606Report bugs to <pgsql-bugs@postgresql.org>.
1607_ACEOF
1608ac_status=$?
1609fi
1610
1611if test "$ac_init_help" = "recursive"; then
1612  # If there are subdirs, report their specific --help.
1613  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1614    test -d "$ac_dir" ||
1615      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1616      continue
1617    ac_builddir=.
1618
1619case "$ac_dir" in
1620.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1621*)
1622  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1623  # A ".." for each directory in $ac_dir_suffix.
1624  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1625  case $ac_top_builddir_sub in
1626  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1627  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1628  esac ;;
1629esac
1630ac_abs_top_builddir=$ac_pwd
1631ac_abs_builddir=$ac_pwd$ac_dir_suffix
1632# for backward compatibility:
1633ac_top_builddir=$ac_top_build_prefix
1634
1635case $srcdir in
1636  .)  # We are building in place.
1637    ac_srcdir=.
1638    ac_top_srcdir=$ac_top_builddir_sub
1639    ac_abs_top_srcdir=$ac_pwd ;;
1640  [\\/]* | ?:[\\/]* )  # Absolute name.
1641    ac_srcdir=$srcdir$ac_dir_suffix;
1642    ac_top_srcdir=$srcdir
1643    ac_abs_top_srcdir=$srcdir ;;
1644  *) # Relative name.
1645    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1646    ac_top_srcdir=$ac_top_build_prefix$srcdir
1647    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1648esac
1649ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1650
1651    cd "$ac_dir" || { ac_status=$?; continue; }
1652    # Check for guested configure.
1653    if test -f "$ac_srcdir/configure.gnu"; then
1654      echo &&
1655      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1656    elif test -f "$ac_srcdir/configure"; then
1657      echo &&
1658      $SHELL "$ac_srcdir/configure" --help=recursive
1659    else
1660      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1661    fi || ac_status=$?
1662    cd "$ac_pwd" || { ac_status=$?; break; }
1663  done
1664fi
1665
1666test -n "$ac_init_help" && exit $ac_status
1667if $ac_init_version; then
1668  cat <<\_ACEOF
1669PostgreSQL configure 11.14
1670generated by GNU Autoconf 2.69
1671
1672Copyright (C) 2012 Free Software Foundation, Inc.
1673This configure script is free software; the Free Software Foundation
1674gives unlimited permission to copy, distribute and modify it.
1675
1676Copyright (c) 1996-2018, PostgreSQL Global Development Group
1677_ACEOF
1678  exit
1679fi
1680
1681## ------------------------ ##
1682## Autoconf initialization. ##
1683## ------------------------ ##
1684
1685# ac_fn_c_try_compile LINENO
1686# --------------------------
1687# Try to compile conftest.$ac_ext, and return whether this succeeded.
1688ac_fn_c_try_compile ()
1689{
1690  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1691  rm -f conftest.$ac_objext
1692  if { { ac_try="$ac_compile"
1693case "(($ac_try" in
1694  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1695  *) ac_try_echo=$ac_try;;
1696esac
1697eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1698$as_echo "$ac_try_echo"; } >&5
1699  (eval "$ac_compile") 2>conftest.err
1700  ac_status=$?
1701  if test -s conftest.err; then
1702    grep -v '^ *+' conftest.err >conftest.er1
1703    cat conftest.er1 >&5
1704    mv -f conftest.er1 conftest.err
1705  fi
1706  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1707  test $ac_status = 0; } && {
1708	 test -z "$ac_c_werror_flag" ||
1709	 test ! -s conftest.err
1710       } && test -s conftest.$ac_objext; then :
1711  ac_retval=0
1712else
1713  $as_echo "$as_me: failed program was:" >&5
1714sed 's/^/| /' conftest.$ac_ext >&5
1715
1716	ac_retval=1
1717fi
1718  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1719  as_fn_set_status $ac_retval
1720
1721} # ac_fn_c_try_compile
1722
1723# ac_fn_cxx_try_compile LINENO
1724# ----------------------------
1725# Try to compile conftest.$ac_ext, and return whether this succeeded.
1726ac_fn_cxx_try_compile ()
1727{
1728  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1729  rm -f conftest.$ac_objext
1730  if { { ac_try="$ac_compile"
1731case "(($ac_try" in
1732  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1733  *) ac_try_echo=$ac_try;;
1734esac
1735eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1736$as_echo "$ac_try_echo"; } >&5
1737  (eval "$ac_compile") 2>conftest.err
1738  ac_status=$?
1739  if test -s conftest.err; then
1740    grep -v '^ *+' conftest.err >conftest.er1
1741    cat conftest.er1 >&5
1742    mv -f conftest.er1 conftest.err
1743  fi
1744  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1745  test $ac_status = 0; } && {
1746	 test -z "$ac_cxx_werror_flag" ||
1747	 test ! -s conftest.err
1748       } && test -s conftest.$ac_objext; then :
1749  ac_retval=0
1750else
1751  $as_echo "$as_me: failed program was:" >&5
1752sed 's/^/| /' conftest.$ac_ext >&5
1753
1754	ac_retval=1
1755fi
1756  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1757  as_fn_set_status $ac_retval
1758
1759} # ac_fn_cxx_try_compile
1760
1761# ac_fn_c_try_link LINENO
1762# -----------------------
1763# Try to link conftest.$ac_ext, and return whether this succeeded.
1764ac_fn_c_try_link ()
1765{
1766  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1767  rm -f conftest.$ac_objext conftest$ac_exeext
1768  if { { ac_try="$ac_link"
1769case "(($ac_try" in
1770  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1771  *) ac_try_echo=$ac_try;;
1772esac
1773eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1774$as_echo "$ac_try_echo"; } >&5
1775  (eval "$ac_link") 2>conftest.err
1776  ac_status=$?
1777  if test -s conftest.err; then
1778    grep -v '^ *+' conftest.err >conftest.er1
1779    cat conftest.er1 >&5
1780    mv -f conftest.er1 conftest.err
1781  fi
1782  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1783  test $ac_status = 0; } && {
1784	 test -z "$ac_c_werror_flag" ||
1785	 test ! -s conftest.err
1786       } && test -s conftest$ac_exeext && {
1787	 test "$cross_compiling" = yes ||
1788	 test -x conftest$ac_exeext
1789       }; then :
1790  ac_retval=0
1791else
1792  $as_echo "$as_me: failed program was:" >&5
1793sed 's/^/| /' conftest.$ac_ext >&5
1794
1795	ac_retval=1
1796fi
1797  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1798  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1799  # interfere with the next link command; also delete a directory that is
1800  # left behind by Apple's compiler.  We do this before executing the actions.
1801  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1802  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1803  as_fn_set_status $ac_retval
1804
1805} # ac_fn_c_try_link
1806
1807# ac_fn_c_try_cpp LINENO
1808# ----------------------
1809# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1810ac_fn_c_try_cpp ()
1811{
1812  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1813  if { { ac_try="$ac_cpp conftest.$ac_ext"
1814case "(($ac_try" in
1815  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1816  *) ac_try_echo=$ac_try;;
1817esac
1818eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1819$as_echo "$ac_try_echo"; } >&5
1820  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1821  ac_status=$?
1822  if test -s conftest.err; then
1823    grep -v '^ *+' conftest.err >conftest.er1
1824    cat conftest.er1 >&5
1825    mv -f conftest.er1 conftest.err
1826  fi
1827  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1828  test $ac_status = 0; } > conftest.i && {
1829	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1830	 test ! -s conftest.err
1831       }; then :
1832  ac_retval=0
1833else
1834  $as_echo "$as_me: failed program was:" >&5
1835sed 's/^/| /' conftest.$ac_ext >&5
1836
1837    ac_retval=1
1838fi
1839  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1840  as_fn_set_status $ac_retval
1841
1842} # ac_fn_c_try_cpp
1843
1844# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1845# -------------------------------------------------------
1846# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1847# the include files in INCLUDES and setting the cache variable VAR
1848# accordingly.
1849ac_fn_c_check_header_mongrel ()
1850{
1851  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1852  if eval \${$3+:} false; then :
1853  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1854$as_echo_n "checking for $2... " >&6; }
1855if eval \${$3+:} false; then :
1856  $as_echo_n "(cached) " >&6
1857fi
1858eval ac_res=\$$3
1859	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1860$as_echo "$ac_res" >&6; }
1861else
1862  # Is the header compilable?
1863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1864$as_echo_n "checking $2 usability... " >&6; }
1865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1866/* end confdefs.h.  */
1867$4
1868#include <$2>
1869_ACEOF
1870if ac_fn_c_try_compile "$LINENO"; then :
1871  ac_header_compiler=yes
1872else
1873  ac_header_compiler=no
1874fi
1875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1877$as_echo "$ac_header_compiler" >&6; }
1878
1879# Is the header present?
1880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1881$as_echo_n "checking $2 presence... " >&6; }
1882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1883/* end confdefs.h.  */
1884#include <$2>
1885_ACEOF
1886if ac_fn_c_try_cpp "$LINENO"; then :
1887  ac_header_preproc=yes
1888else
1889  ac_header_preproc=no
1890fi
1891rm -f conftest.err conftest.i conftest.$ac_ext
1892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1893$as_echo "$ac_header_preproc" >&6; }
1894
1895# So?  What about this header?
1896case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1897  yes:no: )
1898    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1899$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1900    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1901$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1902    ;;
1903  no:yes:* )
1904    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1905$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1906    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1907$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1908    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1909$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1910    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1911$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1912    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1913$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1914( $as_echo "## ---------------------------------------- ##
1915## Report this to pgsql-bugs@postgresql.org ##
1916## ---------------------------------------- ##"
1917     ) | sed "s/^/$as_me: WARNING:     /" >&2
1918    ;;
1919esac
1920  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1921$as_echo_n "checking for $2... " >&6; }
1922if eval \${$3+:} false; then :
1923  $as_echo_n "(cached) " >&6
1924else
1925  eval "$3=\$ac_header_compiler"
1926fi
1927eval ac_res=\$$3
1928	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1929$as_echo "$ac_res" >&6; }
1930fi
1931  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1932
1933} # ac_fn_c_check_header_mongrel
1934
1935# ac_fn_c_try_run LINENO
1936# ----------------------
1937# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1938# that executables *can* be run.
1939ac_fn_c_try_run ()
1940{
1941  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1942  if { { ac_try="$ac_link"
1943case "(($ac_try" in
1944  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1945  *) ac_try_echo=$ac_try;;
1946esac
1947eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1948$as_echo "$ac_try_echo"; } >&5
1949  (eval "$ac_link") 2>&5
1950  ac_status=$?
1951  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1952  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1953  { { case "(($ac_try" in
1954  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1955  *) ac_try_echo=$ac_try;;
1956esac
1957eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1958$as_echo "$ac_try_echo"; } >&5
1959  (eval "$ac_try") 2>&5
1960  ac_status=$?
1961  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1962  test $ac_status = 0; }; }; then :
1963  ac_retval=0
1964else
1965  $as_echo "$as_me: program exited with status $ac_status" >&5
1966       $as_echo "$as_me: failed program was:" >&5
1967sed 's/^/| /' conftest.$ac_ext >&5
1968
1969       ac_retval=$ac_status
1970fi
1971  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1972  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1973  as_fn_set_status $ac_retval
1974
1975} # ac_fn_c_try_run
1976
1977# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1978# -------------------------------------------------------
1979# Tests whether HEADER exists and can be compiled using the include files in
1980# INCLUDES, setting the cache variable VAR accordingly.
1981ac_fn_c_check_header_compile ()
1982{
1983  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1984  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1985$as_echo_n "checking for $2... " >&6; }
1986if eval \${$3+:} false; then :
1987  $as_echo_n "(cached) " >&6
1988else
1989  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1990/* end confdefs.h.  */
1991$4
1992#include <$2>
1993_ACEOF
1994if ac_fn_c_try_compile "$LINENO"; then :
1995  eval "$3=yes"
1996else
1997  eval "$3=no"
1998fi
1999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2000fi
2001eval ac_res=\$$3
2002	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2003$as_echo "$ac_res" >&6; }
2004  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2005
2006} # ac_fn_c_check_header_compile
2007
2008# ac_fn_c_check_func LINENO FUNC VAR
2009# ----------------------------------
2010# Tests whether FUNC exists, setting the cache variable VAR accordingly
2011ac_fn_c_check_func ()
2012{
2013  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2014  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2015$as_echo_n "checking for $2... " >&6; }
2016if eval \${$3+:} false; then :
2017  $as_echo_n "(cached) " >&6
2018else
2019  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2020/* end confdefs.h.  */
2021/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2022   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2023#define $2 innocuous_$2
2024
2025/* System header to define __stub macros and hopefully few prototypes,
2026    which can conflict with char $2 (); below.
2027    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2028    <limits.h> exists even on freestanding compilers.  */
2029
2030#ifdef __STDC__
2031# include <limits.h>
2032#else
2033# include <assert.h>
2034#endif
2035
2036#undef $2
2037
2038/* Override any GCC internal prototype to avoid an error.
2039   Use char because int might match the return type of a GCC
2040   builtin and then its argument prototype would still apply.  */
2041#ifdef __cplusplus
2042extern "C"
2043#endif
2044char $2 ();
2045/* The GNU C library defines this for functions which it implements
2046    to always fail with ENOSYS.  Some functions are actually named
2047    something starting with __ and the normal name is an alias.  */
2048#if defined __stub_$2 || defined __stub___$2
2049choke me
2050#endif
2051
2052int
2053main ()
2054{
2055return $2 ();
2056  ;
2057  return 0;
2058}
2059_ACEOF
2060if ac_fn_c_try_link "$LINENO"; then :
2061  eval "$3=yes"
2062else
2063  eval "$3=no"
2064fi
2065rm -f core conftest.err conftest.$ac_objext \
2066    conftest$ac_exeext conftest.$ac_ext
2067fi
2068eval ac_res=\$$3
2069	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2070$as_echo "$ac_res" >&6; }
2071  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2072
2073} # ac_fn_c_check_func
2074
2075# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2076# -------------------------------------------
2077# Tests whether TYPE exists after having included INCLUDES, setting cache
2078# variable VAR accordingly.
2079ac_fn_c_check_type ()
2080{
2081  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2082  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2083$as_echo_n "checking for $2... " >&6; }
2084if eval \${$3+:} false; then :
2085  $as_echo_n "(cached) " >&6
2086else
2087  eval "$3=no"
2088  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2089/* end confdefs.h.  */
2090$4
2091int
2092main ()
2093{
2094if (sizeof ($2))
2095	 return 0;
2096  ;
2097  return 0;
2098}
2099_ACEOF
2100if ac_fn_c_try_compile "$LINENO"; then :
2101  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2102/* end confdefs.h.  */
2103$4
2104int
2105main ()
2106{
2107if (sizeof (($2)))
2108	    return 0;
2109  ;
2110  return 0;
2111}
2112_ACEOF
2113if ac_fn_c_try_compile "$LINENO"; then :
2114
2115else
2116  eval "$3=yes"
2117fi
2118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2119fi
2120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2121fi
2122eval ac_res=\$$3
2123	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2124$as_echo "$ac_res" >&6; }
2125  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2126
2127} # ac_fn_c_check_type
2128
2129# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2130# ----------------------------------------------------
2131# Tries to find if the field MEMBER exists in type AGGR, after including
2132# INCLUDES, setting cache variable VAR accordingly.
2133ac_fn_c_check_member ()
2134{
2135  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2136  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2137$as_echo_n "checking for $2.$3... " >&6; }
2138if eval \${$4+:} false; then :
2139  $as_echo_n "(cached) " >&6
2140else
2141  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2142/* end confdefs.h.  */
2143$5
2144int
2145main ()
2146{
2147static $2 ac_aggr;
2148if (ac_aggr.$3)
2149return 0;
2150  ;
2151  return 0;
2152}
2153_ACEOF
2154if ac_fn_c_try_compile "$LINENO"; then :
2155  eval "$4=yes"
2156else
2157  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2158/* end confdefs.h.  */
2159$5
2160int
2161main ()
2162{
2163static $2 ac_aggr;
2164if (sizeof ac_aggr.$3)
2165return 0;
2166  ;
2167  return 0;
2168}
2169_ACEOF
2170if ac_fn_c_try_compile "$LINENO"; then :
2171  eval "$4=yes"
2172else
2173  eval "$4=no"
2174fi
2175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2176fi
2177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2178fi
2179eval ac_res=\$$4
2180	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2181$as_echo "$ac_res" >&6; }
2182  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2183
2184} # ac_fn_c_check_member
2185
2186# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2187# --------------------------------------------
2188# Tries to find the compile-time value of EXPR in a program that includes
2189# INCLUDES, setting VAR accordingly. Returns whether the value could be
2190# computed
2191ac_fn_c_compute_int ()
2192{
2193  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2194  if test "$cross_compiling" = yes; then
2195    # Depending upon the size, compute the lo and hi bounds.
2196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2197/* end confdefs.h.  */
2198$4
2199int
2200main ()
2201{
2202static int test_array [1 - 2 * !(($2) >= 0)];
2203test_array [0] = 0;
2204return test_array [0];
2205
2206  ;
2207  return 0;
2208}
2209_ACEOF
2210if ac_fn_c_try_compile "$LINENO"; then :
2211  ac_lo=0 ac_mid=0
2212  while :; do
2213    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2214/* end confdefs.h.  */
2215$4
2216int
2217main ()
2218{
2219static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2220test_array [0] = 0;
2221return test_array [0];
2222
2223  ;
2224  return 0;
2225}
2226_ACEOF
2227if ac_fn_c_try_compile "$LINENO"; then :
2228  ac_hi=$ac_mid; break
2229else
2230  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2231			if test $ac_lo -le $ac_mid; then
2232			  ac_lo= ac_hi=
2233			  break
2234			fi
2235			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2236fi
2237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2238  done
2239else
2240  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2241/* end confdefs.h.  */
2242$4
2243int
2244main ()
2245{
2246static int test_array [1 - 2 * !(($2) < 0)];
2247test_array [0] = 0;
2248return test_array [0];
2249
2250  ;
2251  return 0;
2252}
2253_ACEOF
2254if ac_fn_c_try_compile "$LINENO"; then :
2255  ac_hi=-1 ac_mid=-1
2256  while :; do
2257    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2258/* end confdefs.h.  */
2259$4
2260int
2261main ()
2262{
2263static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2264test_array [0] = 0;
2265return test_array [0];
2266
2267  ;
2268  return 0;
2269}
2270_ACEOF
2271if ac_fn_c_try_compile "$LINENO"; then :
2272  ac_lo=$ac_mid; break
2273else
2274  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2275			if test $ac_mid -le $ac_hi; then
2276			  ac_lo= ac_hi=
2277			  break
2278			fi
2279			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2280fi
2281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2282  done
2283else
2284  ac_lo= ac_hi=
2285fi
2286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2287fi
2288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2289# Binary search between lo and hi bounds.
2290while test "x$ac_lo" != "x$ac_hi"; do
2291  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2292  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2293/* end confdefs.h.  */
2294$4
2295int
2296main ()
2297{
2298static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2299test_array [0] = 0;
2300return test_array [0];
2301
2302  ;
2303  return 0;
2304}
2305_ACEOF
2306if ac_fn_c_try_compile "$LINENO"; then :
2307  ac_hi=$ac_mid
2308else
2309  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2310fi
2311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2312done
2313case $ac_lo in #((
2314?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2315'') ac_retval=1 ;;
2316esac
2317  else
2318    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2319/* end confdefs.h.  */
2320$4
2321static long int longval () { return $2; }
2322static unsigned long int ulongval () { return $2; }
2323#include <stdio.h>
2324#include <stdlib.h>
2325int
2326main ()
2327{
2328
2329  FILE *f = fopen ("conftest.val", "w");
2330  if (! f)
2331    return 1;
2332  if (($2) < 0)
2333    {
2334      long int i = longval ();
2335      if (i != ($2))
2336	return 1;
2337      fprintf (f, "%ld", i);
2338    }
2339  else
2340    {
2341      unsigned long int i = ulongval ();
2342      if (i != ($2))
2343	return 1;
2344      fprintf (f, "%lu", i);
2345    }
2346  /* Do not output a trailing newline, as this causes \r\n confusion
2347     on some platforms.  */
2348  return ferror (f) || fclose (f) != 0;
2349
2350  ;
2351  return 0;
2352}
2353_ACEOF
2354if ac_fn_c_try_run "$LINENO"; then :
2355  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2356else
2357  ac_retval=1
2358fi
2359rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2360  conftest.$ac_objext conftest.beam conftest.$ac_ext
2361rm -f conftest.val
2362
2363  fi
2364  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2365  as_fn_set_status $ac_retval
2366
2367} # ac_fn_c_compute_int
2368
2369# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2370# ---------------------------------------------
2371# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2372# accordingly.
2373ac_fn_c_check_decl ()
2374{
2375  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2376  # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2377      as_decl_name=`echo $2|sed 's/ *(.*//'`
2378  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2379  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2380$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2381if eval \${$3+:} false; then :
2382  $as_echo_n "(cached) " >&6
2383else
2384  ac_save_werror_flag=$ac_c_werror_flag
2385  ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2386  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2387/* end confdefs.h.  */
2388$4
2389int
2390main ()
2391{
2392#ifndef $as_decl_name
2393#ifdef __cplusplus
2394  (void) $as_decl_use;
2395#else
2396  (void) $as_decl_name;
2397#endif
2398#endif
2399
2400  ;
2401  return 0;
2402}
2403_ACEOF
2404if ac_fn_c_try_compile "$LINENO"; then :
2405  eval "$3=yes"
2406else
2407  eval "$3=no"
2408fi
2409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2410  ac_c_werror_flag=$ac_save_werror_flag
2411fi
2412eval ac_res=\$$3
2413	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2414$as_echo "$ac_res" >&6; }
2415  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2416
2417} # ac_fn_c_check_decl
2418cat >config.log <<_ACEOF
2419This file contains any messages produced by compilers while
2420running configure, to aid debugging if configure makes a mistake.
2421
2422It was created by PostgreSQL $as_me 11.14, which was
2423generated by GNU Autoconf 2.69.  Invocation command line was
2424
2425  $ $0 $@
2426
2427_ACEOF
2428exec 5>>config.log
2429{
2430cat <<_ASUNAME
2431## --------- ##
2432## Platform. ##
2433## --------- ##
2434
2435hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2436uname -m = `(uname -m) 2>/dev/null || echo unknown`
2437uname -r = `(uname -r) 2>/dev/null || echo unknown`
2438uname -s = `(uname -s) 2>/dev/null || echo unknown`
2439uname -v = `(uname -v) 2>/dev/null || echo unknown`
2440
2441/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2442/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2443
2444/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2445/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2446/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2447/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2448/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2449/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2450/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2451
2452_ASUNAME
2453
2454as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2455for as_dir in $PATH
2456do
2457  IFS=$as_save_IFS
2458  test -z "$as_dir" && as_dir=.
2459    $as_echo "PATH: $as_dir"
2460  done
2461IFS=$as_save_IFS
2462
2463} >&5
2464
2465cat >&5 <<_ACEOF
2466
2467
2468## ----------- ##
2469## Core tests. ##
2470## ----------- ##
2471
2472_ACEOF
2473
2474
2475# Keep a trace of the command line.
2476# Strip out --no-create and --no-recursion so they do not pile up.
2477# Strip out --silent because we don't want to record it for future runs.
2478# Also quote any args containing shell meta-characters.
2479# Make two passes to allow for proper duplicate-argument suppression.
2480ac_configure_args=
2481ac_configure_args0=
2482ac_configure_args1=
2483ac_must_keep_next=false
2484for ac_pass in 1 2
2485do
2486  for ac_arg
2487  do
2488    case $ac_arg in
2489    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2490    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2491    | -silent | --silent | --silen | --sile | --sil)
2492      continue ;;
2493    *\'*)
2494      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2495    esac
2496    case $ac_pass in
2497    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2498    2)
2499      as_fn_append ac_configure_args1 " '$ac_arg'"
2500      if test $ac_must_keep_next = true; then
2501	ac_must_keep_next=false # Got value, back to normal.
2502      else
2503	case $ac_arg in
2504	  *=* | --config-cache | -C | -disable-* | --disable-* \
2505	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2506	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2507	  | -with-* | --with-* | -without-* | --without-* | --x)
2508	    case "$ac_configure_args0 " in
2509	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2510	    esac
2511	    ;;
2512	  -* ) ac_must_keep_next=true ;;
2513	esac
2514      fi
2515      as_fn_append ac_configure_args " '$ac_arg'"
2516      ;;
2517    esac
2518  done
2519done
2520{ ac_configure_args0=; unset ac_configure_args0;}
2521{ ac_configure_args1=; unset ac_configure_args1;}
2522
2523# When interrupted or exit'd, cleanup temporary files, and complete
2524# config.log.  We remove comments because anyway the quotes in there
2525# would cause problems or look ugly.
2526# WARNING: Use '\'' to represent an apostrophe within the trap.
2527# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2528trap 'exit_status=$?
2529  # Save into config.log some information that might help in debugging.
2530  {
2531    echo
2532
2533    $as_echo "## ---------------- ##
2534## Cache variables. ##
2535## ---------------- ##"
2536    echo
2537    # The following way of writing the cache mishandles newlines in values,
2538(
2539  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2540    eval ac_val=\$$ac_var
2541    case $ac_val in #(
2542    *${as_nl}*)
2543      case $ac_var in #(
2544      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2545$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2546      esac
2547      case $ac_var in #(
2548      _ | IFS | as_nl) ;; #(
2549      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2550      *) { eval $ac_var=; unset $ac_var;} ;;
2551      esac ;;
2552    esac
2553  done
2554  (set) 2>&1 |
2555    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2556    *${as_nl}ac_space=\ *)
2557      sed -n \
2558	"s/'\''/'\''\\\\'\'''\''/g;
2559	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2560      ;; #(
2561    *)
2562      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2563      ;;
2564    esac |
2565    sort
2566)
2567    echo
2568
2569    $as_echo "## ----------------- ##
2570## Output variables. ##
2571## ----------------- ##"
2572    echo
2573    for ac_var in $ac_subst_vars
2574    do
2575      eval ac_val=\$$ac_var
2576      case $ac_val in
2577      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2578      esac
2579      $as_echo "$ac_var='\''$ac_val'\''"
2580    done | sort
2581    echo
2582
2583    if test -n "$ac_subst_files"; then
2584      $as_echo "## ------------------- ##
2585## File substitutions. ##
2586## ------------------- ##"
2587      echo
2588      for ac_var in $ac_subst_files
2589      do
2590	eval ac_val=\$$ac_var
2591	case $ac_val in
2592	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2593	esac
2594	$as_echo "$ac_var='\''$ac_val'\''"
2595      done | sort
2596      echo
2597    fi
2598
2599    if test -s confdefs.h; then
2600      $as_echo "## ----------- ##
2601## confdefs.h. ##
2602## ----------- ##"
2603      echo
2604      cat confdefs.h
2605      echo
2606    fi
2607    test "$ac_signal" != 0 &&
2608      $as_echo "$as_me: caught signal $ac_signal"
2609    $as_echo "$as_me: exit $exit_status"
2610  } >&5
2611  rm -f core *.core core.conftest.* &&
2612    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2613    exit $exit_status
2614' 0
2615for ac_signal in 1 2 13 15; do
2616  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2617done
2618ac_signal=0
2619
2620# confdefs.h avoids OS command line length limits that DEFS can exceed.
2621rm -f -r conftest* confdefs.h
2622
2623$as_echo "/* confdefs.h */" > confdefs.h
2624
2625# Predefined preprocessor variables.
2626
2627cat >>confdefs.h <<_ACEOF
2628#define PACKAGE_NAME "$PACKAGE_NAME"
2629_ACEOF
2630
2631cat >>confdefs.h <<_ACEOF
2632#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2633_ACEOF
2634
2635cat >>confdefs.h <<_ACEOF
2636#define PACKAGE_VERSION "$PACKAGE_VERSION"
2637_ACEOF
2638
2639cat >>confdefs.h <<_ACEOF
2640#define PACKAGE_STRING "$PACKAGE_STRING"
2641_ACEOF
2642
2643cat >>confdefs.h <<_ACEOF
2644#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2645_ACEOF
2646
2647cat >>confdefs.h <<_ACEOF
2648#define PACKAGE_URL "$PACKAGE_URL"
2649_ACEOF
2650
2651
2652# Let the site file select an alternate cache file if it wants to.
2653# Prefer an explicitly selected file to automatically selected ones.
2654ac_site_file1=NONE
2655ac_site_file2=NONE
2656if test -n "$CONFIG_SITE"; then
2657  # We do not want a PATH search for config.site.
2658  case $CONFIG_SITE in #((
2659    -*)  ac_site_file1=./$CONFIG_SITE;;
2660    */*) ac_site_file1=$CONFIG_SITE;;
2661    *)   ac_site_file1=./$CONFIG_SITE;;
2662  esac
2663elif test "x$prefix" != xNONE; then
2664  ac_site_file1=$prefix/share/config.site
2665  ac_site_file2=$prefix/etc/config.site
2666else
2667  ac_site_file1=$ac_default_prefix/share/config.site
2668  ac_site_file2=$ac_default_prefix/etc/config.site
2669fi
2670for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2671do
2672  test "x$ac_site_file" = xNONE && continue
2673  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2674    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2675$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2676    sed 's/^/| /' "$ac_site_file" >&5
2677    . "$ac_site_file" \
2678      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2679$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2680as_fn_error $? "failed to load site script $ac_site_file
2681See \`config.log' for more details" "$LINENO" 5; }
2682  fi
2683done
2684
2685if test -r "$cache_file"; then
2686  # Some versions of bash will fail to source /dev/null (special files
2687  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2688  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2689    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2690$as_echo "$as_me: loading cache $cache_file" >&6;}
2691    case $cache_file in
2692      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2693      *)                      . "./$cache_file";;
2694    esac
2695  fi
2696else
2697  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2698$as_echo "$as_me: creating cache $cache_file" >&6;}
2699  >$cache_file
2700fi
2701
2702# Check that the precious variables saved in the cache have kept the same
2703# value.
2704ac_cache_corrupted=false
2705for ac_var in $ac_precious_vars; do
2706  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2707  eval ac_new_set=\$ac_env_${ac_var}_set
2708  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2709  eval ac_new_val=\$ac_env_${ac_var}_value
2710  case $ac_old_set,$ac_new_set in
2711    set,)
2712      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2713$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2714      ac_cache_corrupted=: ;;
2715    ,set)
2716      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2717$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2718      ac_cache_corrupted=: ;;
2719    ,);;
2720    *)
2721      if test "x$ac_old_val" != "x$ac_new_val"; then
2722	# differences in whitespace do not lead to failure.
2723	ac_old_val_w=`echo x $ac_old_val`
2724	ac_new_val_w=`echo x $ac_new_val`
2725	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2726	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2727$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2728	  ac_cache_corrupted=:
2729	else
2730	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2731$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2732	  eval $ac_var=\$ac_old_val
2733	fi
2734	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2735$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2736	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2737$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2738      fi;;
2739  esac
2740  # Pass precious variables to config.status.
2741  if test "$ac_new_set" = set; then
2742    case $ac_new_val in
2743    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2744    *) ac_arg=$ac_var=$ac_new_val ;;
2745    esac
2746    case " $ac_configure_args " in
2747      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2748      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2749    esac
2750  fi
2751done
2752if $ac_cache_corrupted; then
2753  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2754$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2755  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2756$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2757  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2758fi
2759## -------------------- ##
2760## Main body of script. ##
2761## -------------------- ##
2762
2763ac_ext=c
2764ac_cpp='$CPP $CPPFLAGS'
2765ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2766ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2767ac_compiler_gnu=$ac_cv_c_compiler_gnu
2768
2769
2770
2771
2772
2773
2774ac_aux_dir=
2775for ac_dir in config "$srcdir"/config; do
2776  if test -f "$ac_dir/install-sh"; then
2777    ac_aux_dir=$ac_dir
2778    ac_install_sh="$ac_aux_dir/install-sh -c"
2779    break
2780  elif test -f "$ac_dir/install.sh"; then
2781    ac_aux_dir=$ac_dir
2782    ac_install_sh="$ac_aux_dir/install.sh -c"
2783    break
2784  elif test -f "$ac_dir/shtool"; then
2785    ac_aux_dir=$ac_dir
2786    ac_install_sh="$ac_aux_dir/shtool install -c"
2787    break
2788  fi
2789done
2790if test -z "$ac_aux_dir"; then
2791  as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2792fi
2793
2794# These three variables are undocumented and unsupported,
2795# and are intended to be withdrawn in a future Autoconf release.
2796# They can cause serious problems if a builder's source tree is in a directory
2797# whose full name contains unusual characters.
2798ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2799ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2800ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2801
2802
2803
2804configure_args=$ac_configure_args
2805
2806
2807PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2808
2809
2810cat >>confdefs.h <<_ACEOF
2811#define PG_MAJORVERSION "$PG_MAJORVERSION"
2812_ACEOF
2813
2814
2815
2816
2817
2818# Check whether --with-extra-version was given.
2819if test "${with_extra_version+set}" = set; then :
2820  withval=$with_extra_version;
2821  case $withval in
2822    yes)
2823      as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2824      ;;
2825    no)
2826      as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2827      ;;
2828    *)
2829      PG_VERSION="$PACKAGE_VERSION$withval"
2830      ;;
2831  esac
2832
2833else
2834  PG_VERSION="$PACKAGE_VERSION"
2835fi
2836
2837
2838
2839cat >>confdefs.h <<_ACEOF
2840#define PG_VERSION "$PG_VERSION"
2841_ACEOF
2842
2843
2844# Make sure we can run config.sub.
2845$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2846  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2847
2848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2849$as_echo_n "checking build system type... " >&6; }
2850if ${ac_cv_build+:} false; then :
2851  $as_echo_n "(cached) " >&6
2852else
2853  ac_build_alias=$build_alias
2854test "x$ac_build_alias" = x &&
2855  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2856test "x$ac_build_alias" = x &&
2857  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2858ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2859  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2860
2861fi
2862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2863$as_echo "$ac_cv_build" >&6; }
2864case $ac_cv_build in
2865*-*-*) ;;
2866*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2867esac
2868build=$ac_cv_build
2869ac_save_IFS=$IFS; IFS='-'
2870set x $ac_cv_build
2871shift
2872build_cpu=$1
2873build_vendor=$2
2874shift; shift
2875# Remember, the first character of IFS is used to create $*,
2876# except with old shells:
2877build_os=$*
2878IFS=$ac_save_IFS
2879case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2880
2881
2882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2883$as_echo_n "checking host system type... " >&6; }
2884if ${ac_cv_host+:} false; then :
2885  $as_echo_n "(cached) " >&6
2886else
2887  if test "x$host_alias" = x; then
2888  ac_cv_host=$ac_cv_build
2889else
2890  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2891    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2892fi
2893
2894fi
2895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2896$as_echo "$ac_cv_host" >&6; }
2897case $ac_cv_host in
2898*-*-*) ;;
2899*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2900esac
2901host=$ac_cv_host
2902ac_save_IFS=$IFS; IFS='-'
2903set x $ac_cv_host
2904shift
2905host_cpu=$1
2906host_vendor=$2
2907shift; shift
2908# Remember, the first character of IFS is used to create $*,
2909# except with old shells:
2910host_os=$*
2911IFS=$ac_save_IFS
2912case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2913
2914
2915
2916template=
2917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2918$as_echo_n "checking which template to use... " >&6; }
2919
2920
2921
2922
2923# Check whether --with-template was given.
2924if test "${with_template+set}" = set; then :
2925  withval=$with_template;
2926  case $withval in
2927    yes)
2928      as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2929      ;;
2930    no)
2931      as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2932      ;;
2933    *)
2934
2935  case $withval in
2936    list)   echo; ls "$srcdir/src/template"; exit;;
2937    *)      if test -f "$srcdir/src/template/$with_template" ; then
2938              template=$withval
2939            else
2940              as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2941            fi;;
2942  esac
2943
2944      ;;
2945  esac
2946
2947else
2948
2949# --with-template not given
2950
2951case $host_os in
2952     aix*) template=aix ;;
2953  cygwin*) template=cygwin ;;
2954  darwin*) template=darwin ;;
2955dragonfly*) template=netbsd ;;
2956 freebsd*) template=freebsd ;;
2957    hpux*) template=hpux ;;
2958 linux*|gnu*|k*bsd*-gnu)
2959           template=linux ;;
2960   mingw*) template=win32 ;;
2961  netbsd*) template=netbsd ;;
2962 openbsd*) template=openbsd ;;
2963 solaris*) template=solaris ;;
2964esac
2965
2966  if test x"$template" = x"" ; then
2967    as_fn_error $? "
2968*******************************************************************
2969PostgreSQL has apparently not been ported to your platform yet.
2970To try a manual configuration, look into the src/template directory
2971for a similar platform and use the '--with-template=' option.
2972
2973Please also contact <pgsql-bugs@postgresql.org> to see about
2974rectifying this.  Include the above 'checking host system type...'
2975line.
2976*******************************************************************
2977" "$LINENO" 5
2978  fi
2979
2980
2981fi
2982
2983
2984
2985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2986$as_echo "$template" >&6; }
2987
2988PORTNAME=$template
2989
2990
2991# Initialize default assumption that we do not need separate assembly code
2992# for TAS (test-and-set).  This can be overridden by the template file
2993# when it's executed.
2994need_tas=no
2995tas_file=dummy.s
2996
2997
2998
2999##
3000## Command line options
3001##
3002
3003#
3004# Add non-standard directories to the include path
3005#
3006
3007
3008
3009# Check whether --with-includes was given.
3010if test "${with_includes+set}" = set; then :
3011  withval=$with_includes;
3012  case $withval in
3013    yes)
3014      as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3015      ;;
3016    no)
3017      as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3018      ;;
3019    *)
3020
3021      ;;
3022  esac
3023
3024fi
3025
3026
3027
3028
3029#
3030# Add non-standard directories to the library search path
3031#
3032
3033
3034
3035# Check whether --with-libraries was given.
3036if test "${with_libraries+set}" = set; then :
3037  withval=$with_libraries;
3038  case $withval in
3039    yes)
3040      as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3041      ;;
3042    no)
3043      as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3044      ;;
3045    *)
3046      LIBRARY_DIRS=$withval
3047      ;;
3048  esac
3049
3050fi
3051
3052
3053
3054
3055
3056
3057# Check whether --with-libs was given.
3058if test "${with_libs+set}" = set; then :
3059  withval=$with_libs;
3060  case $withval in
3061    yes)
3062      as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3063      ;;
3064    no)
3065      as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3066      ;;
3067    *)
3068      LIBRARY_DIRS=$withval
3069      ;;
3070  esac
3071
3072fi
3073
3074
3075
3076
3077#
3078# 64-bit integer date/time storage is now the only option, but to avoid
3079# unnecessary breakage of build scripts, continue to accept an explicit
3080# "--enable-integer-datetimes" switch.
3081#
3082
3083
3084# Check whether --enable-integer-datetimes was given.
3085if test "${enable_integer_datetimes+set}" = set; then :
3086  enableval=$enable_integer_datetimes;
3087  case $enableval in
3088    yes)
3089      :
3090      ;;
3091    no)
3092      as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3093      ;;
3094    *)
3095      as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3096      ;;
3097  esac
3098
3099else
3100  enable_integer_datetimes=yes
3101
3102fi
3103
3104
3105
3106
3107#
3108# NLS
3109#
3110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3111$as_echo_n "checking whether NLS is wanted... " >&6; }
3112
3113
3114# Check whether --enable-nls was given.
3115if test "${enable_nls+set}" = set; then :
3116  enableval=$enable_nls;
3117  case $enableval in
3118    yes)
3119      :
3120      ;;
3121    no)
3122      :
3123      ;;
3124    *)
3125      enable_nls=yes
3126WANTED_LANGUAGES=$enableval
3127      ;;
3128  esac
3129
3130else
3131  enable_nls=no
3132fi
3133
3134
3135
3136if test "$enable_nls" = yes; then
3137
3138$as_echo "#define ENABLE_NLS 1" >>confdefs.h
3139
3140fi
3141
3142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3143$as_echo "$enable_nls" >&6; }
3144
3145
3146
3147#
3148# Default port number (--with-pgport), default 5432
3149#
3150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3151$as_echo_n "checking for default port number... " >&6; }
3152
3153
3154
3155# Check whether --with-pgport was given.
3156if test "${with_pgport+set}" = set; then :
3157  withval=$with_pgport;
3158  case $withval in
3159    yes)
3160      as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3161      ;;
3162    no)
3163      as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3164      ;;
3165    *)
3166      default_port=$withval
3167      ;;
3168  esac
3169
3170else
3171  default_port=5432
3172fi
3173
3174
3175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3176$as_echo "$default_port" >&6; }
3177# Need both of these because some places want an integer and some a string
3178
3179cat >>confdefs.h <<_ACEOF
3180#define DEF_PGPORT ${default_port}
3181_ACEOF
3182
3183
3184cat >>confdefs.h <<_ACEOF
3185#define DEF_PGPORT_STR "${default_port}"
3186_ACEOF
3187
3188
3189
3190# It's worth validating port; you can get very confusing errors otherwise
3191if test x"$default_port" = x""; then
3192  as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3193elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3194  as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3195elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3196  as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3197elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3198  as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3199fi
3200
3201#
3202# '-rpath'-like feature can be disabled
3203#
3204
3205
3206# Check whether --enable-rpath was given.
3207if test "${enable_rpath+set}" = set; then :
3208  enableval=$enable_rpath;
3209  case $enableval in
3210    yes)
3211      :
3212      ;;
3213    no)
3214      :
3215      ;;
3216    *)
3217      as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3218      ;;
3219  esac
3220
3221else
3222  enable_rpath=yes
3223
3224fi
3225
3226
3227
3228
3229#
3230# Spinlocks
3231#
3232
3233
3234# Check whether --enable-spinlocks was given.
3235if test "${enable_spinlocks+set}" = set; then :
3236  enableval=$enable_spinlocks;
3237  case $enableval in
3238    yes)
3239      :
3240      ;;
3241    no)
3242      :
3243      ;;
3244    *)
3245      as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3246      ;;
3247  esac
3248
3249else
3250  enable_spinlocks=yes
3251
3252fi
3253
3254
3255
3256#
3257# Atomic operations
3258#
3259
3260
3261# Check whether --enable-atomics was given.
3262if test "${enable_atomics+set}" = set; then :
3263  enableval=$enable_atomics;
3264  case $enableval in
3265    yes)
3266      :
3267      ;;
3268    no)
3269      :
3270      ;;
3271    *)
3272      as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3273      ;;
3274  esac
3275
3276else
3277  enable_atomics=yes
3278
3279fi
3280
3281
3282
3283#
3284# Random number generation
3285#
3286
3287
3288# Check whether --enable-strong-random was given.
3289if test "${enable_strong_random+set}" = set; then :
3290  enableval=$enable_strong_random;
3291  case $enableval in
3292    yes)
3293      :
3294      ;;
3295    no)
3296      :
3297      ;;
3298    *)
3299      as_fn_error $? "no argument expected for --enable-strong-random option" "$LINENO" 5
3300      ;;
3301  esac
3302
3303else
3304  enable_strong_random=yes
3305
3306fi
3307
3308
3309
3310
3311#
3312# --enable-debug adds -g to compiler flags
3313#
3314
3315
3316# Check whether --enable-debug was given.
3317if test "${enable_debug+set}" = set; then :
3318  enableval=$enable_debug;
3319  case $enableval in
3320    yes)
3321      :
3322      ;;
3323    no)
3324      :
3325      ;;
3326    *)
3327      as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3328      ;;
3329  esac
3330
3331else
3332  enable_debug=no
3333
3334fi
3335
3336
3337
3338
3339#
3340# --enable-profiling enables gcc profiling
3341#
3342
3343
3344# Check whether --enable-profiling was given.
3345if test "${enable_profiling+set}" = set; then :
3346  enableval=$enable_profiling;
3347  case $enableval in
3348    yes)
3349      :
3350      ;;
3351    no)
3352      :
3353      ;;
3354    *)
3355      as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3356      ;;
3357  esac
3358
3359else
3360  enable_profiling=no
3361
3362fi
3363
3364
3365
3366#
3367# --enable-coverage enables generation of code coverage metrics with gcov
3368#
3369
3370
3371# Check whether --enable-coverage was given.
3372if test "${enable_coverage+set}" = set; then :
3373  enableval=$enable_coverage;
3374  case $enableval in
3375    yes)
3376      if test -z "$GCOV"; then
3377  for ac_prog in gcov
3378do
3379  # Extract the first word of "$ac_prog", so it can be a program name with args.
3380set dummy $ac_prog; ac_word=$2
3381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3382$as_echo_n "checking for $ac_word... " >&6; }
3383if ${ac_cv_path_GCOV+:} false; then :
3384  $as_echo_n "(cached) " >&6
3385else
3386  case $GCOV in
3387  [\\/]* | ?:[\\/]*)
3388  ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3389  ;;
3390  *)
3391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3392for as_dir in $PATH
3393do
3394  IFS=$as_save_IFS
3395  test -z "$as_dir" && as_dir=.
3396    for ac_exec_ext in '' $ac_executable_extensions; do
3397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3398    ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3400    break 2
3401  fi
3402done
3403  done
3404IFS=$as_save_IFS
3405
3406  ;;
3407esac
3408fi
3409GCOV=$ac_cv_path_GCOV
3410if test -n "$GCOV"; then
3411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3412$as_echo "$GCOV" >&6; }
3413else
3414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3415$as_echo "no" >&6; }
3416fi
3417
3418
3419  test -n "$GCOV" && break
3420done
3421
3422else
3423  # Report the value of GCOV in configure's output in all cases.
3424  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3425$as_echo_n "checking for GCOV... " >&6; }
3426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3427$as_echo "$GCOV" >&6; }
3428fi
3429
3430if test -z "$GCOV"; then
3431  as_fn_error $? "gcov not found" "$LINENO" 5
3432fi
3433if test -z "$LCOV"; then
3434  for ac_prog in lcov
3435do
3436  # Extract the first word of "$ac_prog", so it can be a program name with args.
3437set dummy $ac_prog; ac_word=$2
3438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3439$as_echo_n "checking for $ac_word... " >&6; }
3440if ${ac_cv_path_LCOV+:} false; then :
3441  $as_echo_n "(cached) " >&6
3442else
3443  case $LCOV in
3444  [\\/]* | ?:[\\/]*)
3445  ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3446  ;;
3447  *)
3448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3449for as_dir in $PATH
3450do
3451  IFS=$as_save_IFS
3452  test -z "$as_dir" && as_dir=.
3453    for ac_exec_ext in '' $ac_executable_extensions; do
3454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3455    ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3457    break 2
3458  fi
3459done
3460  done
3461IFS=$as_save_IFS
3462
3463  ;;
3464esac
3465fi
3466LCOV=$ac_cv_path_LCOV
3467if test -n "$LCOV"; then
3468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3469$as_echo "$LCOV" >&6; }
3470else
3471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3472$as_echo "no" >&6; }
3473fi
3474
3475
3476  test -n "$LCOV" && break
3477done
3478
3479else
3480  # Report the value of LCOV in configure's output in all cases.
3481  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3482$as_echo_n "checking for LCOV... " >&6; }
3483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3484$as_echo "$LCOV" >&6; }
3485fi
3486
3487if test -z "$LCOV"; then
3488  as_fn_error $? "lcov not found" "$LINENO" 5
3489fi
3490if test -z "$GENHTML"; then
3491  for ac_prog in genhtml
3492do
3493  # Extract the first word of "$ac_prog", so it can be a program name with args.
3494set dummy $ac_prog; ac_word=$2
3495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3496$as_echo_n "checking for $ac_word... " >&6; }
3497if ${ac_cv_path_GENHTML+:} false; then :
3498  $as_echo_n "(cached) " >&6
3499else
3500  case $GENHTML in
3501  [\\/]* | ?:[\\/]*)
3502  ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3503  ;;
3504  *)
3505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3506for as_dir in $PATH
3507do
3508  IFS=$as_save_IFS
3509  test -z "$as_dir" && as_dir=.
3510    for ac_exec_ext in '' $ac_executable_extensions; do
3511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3512    ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3514    break 2
3515  fi
3516done
3517  done
3518IFS=$as_save_IFS
3519
3520  ;;
3521esac
3522fi
3523GENHTML=$ac_cv_path_GENHTML
3524if test -n "$GENHTML"; then
3525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3526$as_echo "$GENHTML" >&6; }
3527else
3528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3529$as_echo "no" >&6; }
3530fi
3531
3532
3533  test -n "$GENHTML" && break
3534done
3535
3536else
3537  # Report the value of GENHTML in configure's output in all cases.
3538  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3539$as_echo_n "checking for GENHTML... " >&6; }
3540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3541$as_echo "$GENHTML" >&6; }
3542fi
3543
3544if test -z "$GENHTML"; then
3545  as_fn_error $? "genhtml not found" "$LINENO" 5
3546fi
3547      ;;
3548    no)
3549      :
3550      ;;
3551    *)
3552      as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3553      ;;
3554  esac
3555
3556else
3557  enable_coverage=no
3558
3559fi
3560
3561
3562
3563
3564#
3565# DTrace
3566#
3567
3568
3569# Check whether --enable-dtrace was given.
3570if test "${enable_dtrace+set}" = set; then :
3571  enableval=$enable_dtrace;
3572  case $enableval in
3573    yes)
3574      if test -z "$DTRACE"; then
3575  for ac_prog in dtrace
3576do
3577  # Extract the first word of "$ac_prog", so it can be a program name with args.
3578set dummy $ac_prog; ac_word=$2
3579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3580$as_echo_n "checking for $ac_word... " >&6; }
3581if ${ac_cv_path_DTRACE+:} false; then :
3582  $as_echo_n "(cached) " >&6
3583else
3584  case $DTRACE in
3585  [\\/]* | ?:[\\/]*)
3586  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3587  ;;
3588  *)
3589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3590for as_dir in $PATH
3591do
3592  IFS=$as_save_IFS
3593  test -z "$as_dir" && as_dir=.
3594    for ac_exec_ext in '' $ac_executable_extensions; do
3595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3596    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3598    break 2
3599  fi
3600done
3601  done
3602IFS=$as_save_IFS
3603
3604  ;;
3605esac
3606fi
3607DTRACE=$ac_cv_path_DTRACE
3608if test -n "$DTRACE"; then
3609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3610$as_echo "$DTRACE" >&6; }
3611else
3612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3613$as_echo "no" >&6; }
3614fi
3615
3616
3617  test -n "$DTRACE" && break
3618done
3619
3620else
3621  # Report the value of DTRACE in configure's output in all cases.
3622  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3623$as_echo_n "checking for DTRACE... " >&6; }
3624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3625$as_echo "$DTRACE" >&6; }
3626fi
3627
3628if test -z "$DTRACE"; then
3629  as_fn_error $? "dtrace not found" "$LINENO" 5
3630fi
3631
3632      ;;
3633    no)
3634      :
3635      ;;
3636    *)
3637      as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3638      ;;
3639  esac
3640
3641else
3642  enable_dtrace=no
3643
3644fi
3645
3646
3647
3648
3649#
3650# TAP tests
3651#
3652
3653
3654# Check whether --enable-tap-tests was given.
3655if test "${enable_tap_tests+set}" = set; then :
3656  enableval=$enable_tap_tests;
3657  case $enableval in
3658    yes)
3659      :
3660      ;;
3661    no)
3662      :
3663      ;;
3664    *)
3665      as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3666      ;;
3667  esac
3668
3669else
3670  enable_tap_tests=no
3671
3672fi
3673
3674
3675
3676
3677#
3678# Block size
3679#
3680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3681$as_echo_n "checking for block size... " >&6; }
3682
3683
3684
3685# Check whether --with-blocksize was given.
3686if test "${with_blocksize+set}" = set; then :
3687  withval=$with_blocksize;
3688  case $withval in
3689    yes)
3690      as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3691      ;;
3692    no)
3693      as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3694      ;;
3695    *)
3696      blocksize=$withval
3697      ;;
3698  esac
3699
3700else
3701  blocksize=8
3702fi
3703
3704
3705case ${blocksize} in
3706  1) BLCKSZ=1024;;
3707  2) BLCKSZ=2048;;
3708  4) BLCKSZ=4096;;
3709  8) BLCKSZ=8192;;
3710 16) BLCKSZ=16384;;
3711 32) BLCKSZ=32768;;
3712  *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3713esac
3714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3715$as_echo "${blocksize}kB" >&6; }
3716
3717
3718cat >>confdefs.h <<_ACEOF
3719#define BLCKSZ ${BLCKSZ}
3720_ACEOF
3721
3722
3723#
3724# Relation segment size
3725#
3726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3727$as_echo_n "checking for segment size... " >&6; }
3728
3729
3730
3731# Check whether --with-segsize was given.
3732if test "${with_segsize+set}" = set; then :
3733  withval=$with_segsize;
3734  case $withval in
3735    yes)
3736      as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3737      ;;
3738    no)
3739      as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3740      ;;
3741    *)
3742      segsize=$withval
3743      ;;
3744  esac
3745
3746else
3747  segsize=1
3748fi
3749
3750
3751# this expression is set up to avoid unnecessary integer overflow
3752# blocksize is already guaranteed to be a factor of 1024
3753RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3754test $? -eq 0 || exit 1
3755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3756$as_echo "${segsize}GB" >&6; }
3757
3758
3759cat >>confdefs.h <<_ACEOF
3760#define RELSEG_SIZE ${RELSEG_SIZE}
3761_ACEOF
3762
3763
3764#
3765# WAL block size
3766#
3767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3768$as_echo_n "checking for WAL block size... " >&6; }
3769
3770
3771
3772# Check whether --with-wal-blocksize was given.
3773if test "${with_wal_blocksize+set}" = set; then :
3774  withval=$with_wal_blocksize;
3775  case $withval in
3776    yes)
3777      as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3778      ;;
3779    no)
3780      as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3781      ;;
3782    *)
3783      wal_blocksize=$withval
3784      ;;
3785  esac
3786
3787else
3788  wal_blocksize=8
3789fi
3790
3791
3792case ${wal_blocksize} in
3793  1) XLOG_BLCKSZ=1024;;
3794  2) XLOG_BLCKSZ=2048;;
3795  4) XLOG_BLCKSZ=4096;;
3796  8) XLOG_BLCKSZ=8192;;
3797 16) XLOG_BLCKSZ=16384;;
3798 32) XLOG_BLCKSZ=32768;;
3799 64) XLOG_BLCKSZ=65536;;
3800  *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3801esac
3802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3803$as_echo "${wal_blocksize}kB" >&6; }
3804
3805
3806cat >>confdefs.h <<_ACEOF
3807#define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3808_ACEOF
3809
3810
3811#
3812# C compiler
3813#
3814
3815# For historical reasons you can also use --with-CC to specify the C compiler
3816# to use, although the standard way to do this is to set the CC environment
3817# variable.
3818
3819
3820
3821# Check whether --with-CC was given.
3822if test "${with_CC+set}" = set; then :
3823  withval=$with_CC;
3824  case $withval in
3825    yes)
3826      as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3827      ;;
3828    no)
3829      as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3830      ;;
3831    *)
3832      CC=$with_CC
3833      ;;
3834  esac
3835
3836fi
3837
3838
3839
3840case $template in
3841  aix) pgac_cc_list="gcc xlc"; pgac_cxx_list="g++ xlC";;
3842    *) pgac_cc_list="gcc cc"; pgac_cxx_list="g++ c++";;
3843esac
3844
3845ac_ext=c
3846ac_cpp='$CPP $CPPFLAGS'
3847ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3848ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3849ac_compiler_gnu=$ac_cv_c_compiler_gnu
3850if test -n "$ac_tool_prefix"; then
3851  for ac_prog in $pgac_cc_list
3852  do
3853    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3854set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3856$as_echo_n "checking for $ac_word... " >&6; }
3857if ${ac_cv_prog_CC+:} false; then :
3858  $as_echo_n "(cached) " >&6
3859else
3860  if test -n "$CC"; then
3861  ac_cv_prog_CC="$CC" # Let the user override the test.
3862else
3863as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3864for as_dir in $PATH
3865do
3866  IFS=$as_save_IFS
3867  test -z "$as_dir" && as_dir=.
3868    for ac_exec_ext in '' $ac_executable_extensions; do
3869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3870    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3872    break 2
3873  fi
3874done
3875  done
3876IFS=$as_save_IFS
3877
3878fi
3879fi
3880CC=$ac_cv_prog_CC
3881if test -n "$CC"; then
3882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3883$as_echo "$CC" >&6; }
3884else
3885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3886$as_echo "no" >&6; }
3887fi
3888
3889
3890    test -n "$CC" && break
3891  done
3892fi
3893if test -z "$CC"; then
3894  ac_ct_CC=$CC
3895  for ac_prog in $pgac_cc_list
3896do
3897  # Extract the first word of "$ac_prog", so it can be a program name with args.
3898set dummy $ac_prog; ac_word=$2
3899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3900$as_echo_n "checking for $ac_word... " >&6; }
3901if ${ac_cv_prog_ac_ct_CC+:} false; then :
3902  $as_echo_n "(cached) " >&6
3903else
3904  if test -n "$ac_ct_CC"; then
3905  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3906else
3907as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3908for as_dir in $PATH
3909do
3910  IFS=$as_save_IFS
3911  test -z "$as_dir" && as_dir=.
3912    for ac_exec_ext in '' $ac_executable_extensions; do
3913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3914    ac_cv_prog_ac_ct_CC="$ac_prog"
3915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3916    break 2
3917  fi
3918done
3919  done
3920IFS=$as_save_IFS
3921
3922fi
3923fi
3924ac_ct_CC=$ac_cv_prog_ac_ct_CC
3925if test -n "$ac_ct_CC"; then
3926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3927$as_echo "$ac_ct_CC" >&6; }
3928else
3929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3930$as_echo "no" >&6; }
3931fi
3932
3933
3934  test -n "$ac_ct_CC" && break
3935done
3936
3937  if test "x$ac_ct_CC" = x; then
3938    CC=""
3939  else
3940    case $cross_compiling:$ac_tool_warned in
3941yes:)
3942{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3943$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3944ac_tool_warned=yes ;;
3945esac
3946    CC=$ac_ct_CC
3947  fi
3948fi
3949
3950
3951test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3952$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3953as_fn_error $? "no acceptable C compiler found in \$PATH
3954See \`config.log' for more details" "$LINENO" 5; }
3955
3956# Provide some information about the compiler.
3957$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3958set X $ac_compile
3959ac_compiler=$2
3960for ac_option in --version -v -V -qversion; do
3961  { { ac_try="$ac_compiler $ac_option >&5"
3962case "(($ac_try" in
3963  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3964  *) ac_try_echo=$ac_try;;
3965esac
3966eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3967$as_echo "$ac_try_echo"; } >&5
3968  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3969  ac_status=$?
3970  if test -s conftest.err; then
3971    sed '10a\
3972... rest of stderr output deleted ...
3973         10q' conftest.err >conftest.er1
3974    cat conftest.er1 >&5
3975  fi
3976  rm -f conftest.er1 conftest.err
3977  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3978  test $ac_status = 0; }
3979done
3980
3981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3982/* end confdefs.h.  */
3983
3984int
3985main ()
3986{
3987
3988  ;
3989  return 0;
3990}
3991_ACEOF
3992ac_clean_files_save=$ac_clean_files
3993ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3994# Try to create an executable without -o first, disregard a.out.
3995# It will help us diagnose broken compilers, and finding out an intuition
3996# of exeext.
3997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3998$as_echo_n "checking whether the C compiler works... " >&6; }
3999ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4000
4001# The possible output files:
4002ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4003
4004ac_rmfiles=
4005for ac_file in $ac_files
4006do
4007  case $ac_file in
4008    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4009    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4010  esac
4011done
4012rm -f $ac_rmfiles
4013
4014if { { ac_try="$ac_link_default"
4015case "(($ac_try" in
4016  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4017  *) ac_try_echo=$ac_try;;
4018esac
4019eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4020$as_echo "$ac_try_echo"; } >&5
4021  (eval "$ac_link_default") 2>&5
4022  ac_status=$?
4023  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4024  test $ac_status = 0; }; then :
4025  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4026# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4027# in a Makefile.  We should not override ac_cv_exeext if it was cached,
4028# so that the user can short-circuit this test for compilers unknown to
4029# Autoconf.
4030for ac_file in $ac_files ''
4031do
4032  test -f "$ac_file" || continue
4033  case $ac_file in
4034    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4035	;;
4036    [ab].out )
4037	# We found the default executable, but exeext='' is most
4038	# certainly right.
4039	break;;
4040    *.* )
4041	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4042	then :; else
4043	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4044	fi
4045	# We set ac_cv_exeext here because the later test for it is not
4046	# safe: cross compilers may not add the suffix if given an `-o'
4047	# argument, so we may need to know it at that point already.
4048	# Even if this section looks crufty: it has the advantage of
4049	# actually working.
4050	break;;
4051    * )
4052	break;;
4053  esac
4054done
4055test "$ac_cv_exeext" = no && ac_cv_exeext=
4056
4057else
4058  ac_file=''
4059fi
4060if test -z "$ac_file"; then :
4061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4062$as_echo "no" >&6; }
4063$as_echo "$as_me: failed program was:" >&5
4064sed 's/^/| /' conftest.$ac_ext >&5
4065
4066{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4067$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4068as_fn_error 77 "C compiler cannot create executables
4069See \`config.log' for more details" "$LINENO" 5; }
4070else
4071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4072$as_echo "yes" >&6; }
4073fi
4074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4075$as_echo_n "checking for C compiler default output file name... " >&6; }
4076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4077$as_echo "$ac_file" >&6; }
4078ac_exeext=$ac_cv_exeext
4079
4080rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4081ac_clean_files=$ac_clean_files_save
4082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4083$as_echo_n "checking for suffix of executables... " >&6; }
4084if { { ac_try="$ac_link"
4085case "(($ac_try" in
4086  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4087  *) ac_try_echo=$ac_try;;
4088esac
4089eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4090$as_echo "$ac_try_echo"; } >&5
4091  (eval "$ac_link") 2>&5
4092  ac_status=$?
4093  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4094  test $ac_status = 0; }; then :
4095  # If both `conftest.exe' and `conftest' are `present' (well, observable)
4096# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4097# work properly (i.e., refer to `conftest.exe'), while it won't with
4098# `rm'.
4099for ac_file in conftest.exe conftest conftest.*; do
4100  test -f "$ac_file" || continue
4101  case $ac_file in
4102    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4103    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4104	  break;;
4105    * ) break;;
4106  esac
4107done
4108else
4109  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4110$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4111as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4112See \`config.log' for more details" "$LINENO" 5; }
4113fi
4114rm -f conftest conftest$ac_cv_exeext
4115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4116$as_echo "$ac_cv_exeext" >&6; }
4117
4118rm -f conftest.$ac_ext
4119EXEEXT=$ac_cv_exeext
4120ac_exeext=$EXEEXT
4121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4122/* end confdefs.h.  */
4123#include <stdio.h>
4124int
4125main ()
4126{
4127FILE *f = fopen ("conftest.out", "w");
4128 return ferror (f) || fclose (f) != 0;
4129
4130  ;
4131  return 0;
4132}
4133_ACEOF
4134ac_clean_files="$ac_clean_files conftest.out"
4135# Check that the compiler produces executables we can run.  If not, either
4136# the compiler is broken, or we cross compile.
4137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4138$as_echo_n "checking whether we are cross compiling... " >&6; }
4139if test "$cross_compiling" != yes; then
4140  { { ac_try="$ac_link"
4141case "(($ac_try" in
4142  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4143  *) ac_try_echo=$ac_try;;
4144esac
4145eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4146$as_echo "$ac_try_echo"; } >&5
4147  (eval "$ac_link") 2>&5
4148  ac_status=$?
4149  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4150  test $ac_status = 0; }
4151  if { ac_try='./conftest$ac_cv_exeext'
4152  { { case "(($ac_try" in
4153  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4154  *) ac_try_echo=$ac_try;;
4155esac
4156eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4157$as_echo "$ac_try_echo"; } >&5
4158  (eval "$ac_try") 2>&5
4159  ac_status=$?
4160  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4161  test $ac_status = 0; }; }; then
4162    cross_compiling=no
4163  else
4164    if test "$cross_compiling" = maybe; then
4165	cross_compiling=yes
4166    else
4167	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4168$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4169as_fn_error $? "cannot run C compiled programs.
4170If you meant to cross compile, use \`--host'.
4171See \`config.log' for more details" "$LINENO" 5; }
4172    fi
4173  fi
4174fi
4175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4176$as_echo "$cross_compiling" >&6; }
4177
4178rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4179ac_clean_files=$ac_clean_files_save
4180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4181$as_echo_n "checking for suffix of object files... " >&6; }
4182if ${ac_cv_objext+:} false; then :
4183  $as_echo_n "(cached) " >&6
4184else
4185  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4186/* end confdefs.h.  */
4187
4188int
4189main ()
4190{
4191
4192  ;
4193  return 0;
4194}
4195_ACEOF
4196rm -f conftest.o conftest.obj
4197if { { ac_try="$ac_compile"
4198case "(($ac_try" in
4199  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4200  *) ac_try_echo=$ac_try;;
4201esac
4202eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4203$as_echo "$ac_try_echo"; } >&5
4204  (eval "$ac_compile") 2>&5
4205  ac_status=$?
4206  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4207  test $ac_status = 0; }; then :
4208  for ac_file in conftest.o conftest.obj conftest.*; do
4209  test -f "$ac_file" || continue;
4210  case $ac_file in
4211    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4212    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4213       break;;
4214  esac
4215done
4216else
4217  $as_echo "$as_me: failed program was:" >&5
4218sed 's/^/| /' conftest.$ac_ext >&5
4219
4220{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4221$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4222as_fn_error $? "cannot compute suffix of object files: cannot compile
4223See \`config.log' for more details" "$LINENO" 5; }
4224fi
4225rm -f conftest.$ac_cv_objext conftest.$ac_ext
4226fi
4227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4228$as_echo "$ac_cv_objext" >&6; }
4229OBJEXT=$ac_cv_objext
4230ac_objext=$OBJEXT
4231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4232$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4233if ${ac_cv_c_compiler_gnu+:} false; then :
4234  $as_echo_n "(cached) " >&6
4235else
4236  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4237/* end confdefs.h.  */
4238
4239int
4240main ()
4241{
4242#ifndef __GNUC__
4243       choke me
4244#endif
4245
4246  ;
4247  return 0;
4248}
4249_ACEOF
4250if ac_fn_c_try_compile "$LINENO"; then :
4251  ac_compiler_gnu=yes
4252else
4253  ac_compiler_gnu=no
4254fi
4255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4256ac_cv_c_compiler_gnu=$ac_compiler_gnu
4257
4258fi
4259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4260$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4261if test $ac_compiler_gnu = yes; then
4262  GCC=yes
4263else
4264  GCC=
4265fi
4266ac_test_CFLAGS=${CFLAGS+set}
4267ac_save_CFLAGS=$CFLAGS
4268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4269$as_echo_n "checking whether $CC accepts -g... " >&6; }
4270if ${ac_cv_prog_cc_g+:} false; then :
4271  $as_echo_n "(cached) " >&6
4272else
4273  ac_save_c_werror_flag=$ac_c_werror_flag
4274   ac_c_werror_flag=yes
4275   ac_cv_prog_cc_g=no
4276   CFLAGS="-g"
4277   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4278/* end confdefs.h.  */
4279
4280int
4281main ()
4282{
4283
4284  ;
4285  return 0;
4286}
4287_ACEOF
4288if ac_fn_c_try_compile "$LINENO"; then :
4289  ac_cv_prog_cc_g=yes
4290else
4291  CFLAGS=""
4292      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4293/* end confdefs.h.  */
4294
4295int
4296main ()
4297{
4298
4299  ;
4300  return 0;
4301}
4302_ACEOF
4303if ac_fn_c_try_compile "$LINENO"; then :
4304
4305else
4306  ac_c_werror_flag=$ac_save_c_werror_flag
4307	 CFLAGS="-g"
4308	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4309/* end confdefs.h.  */
4310
4311int
4312main ()
4313{
4314
4315  ;
4316  return 0;
4317}
4318_ACEOF
4319if ac_fn_c_try_compile "$LINENO"; then :
4320  ac_cv_prog_cc_g=yes
4321fi
4322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4323fi
4324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4325fi
4326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4327   ac_c_werror_flag=$ac_save_c_werror_flag
4328fi
4329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4330$as_echo "$ac_cv_prog_cc_g" >&6; }
4331if test "$ac_test_CFLAGS" = set; then
4332  CFLAGS=$ac_save_CFLAGS
4333elif test $ac_cv_prog_cc_g = yes; then
4334  if test "$GCC" = yes; then
4335    CFLAGS="-g -O2"
4336  else
4337    CFLAGS="-g"
4338  fi
4339else
4340  if test "$GCC" = yes; then
4341    CFLAGS="-O2"
4342  else
4343    CFLAGS=
4344  fi
4345fi
4346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4347$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4348if ${ac_cv_prog_cc_c89+:} false; then :
4349  $as_echo_n "(cached) " >&6
4350else
4351  ac_cv_prog_cc_c89=no
4352ac_save_CC=$CC
4353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4354/* end confdefs.h.  */
4355#include <stdarg.h>
4356#include <stdio.h>
4357struct stat;
4358/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4359struct buf { int x; };
4360FILE * (*rcsopen) (struct buf *, struct stat *, int);
4361static char *e (p, i)
4362     char **p;
4363     int i;
4364{
4365  return p[i];
4366}
4367static char *f (char * (*g) (char **, int), char **p, ...)
4368{
4369  char *s;
4370  va_list v;
4371  va_start (v,p);
4372  s = g (p, va_arg (v,int));
4373  va_end (v);
4374  return s;
4375}
4376
4377/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4378   function prototypes and stuff, but not '\xHH' hex character constants.
4379   These don't provoke an error unfortunately, instead are silently treated
4380   as 'x'.  The following induces an error, until -std is added to get
4381   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4382   array size at least.  It's necessary to write '\x00'==0 to get something
4383   that's true only with -std.  */
4384int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4385
4386/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4387   inside strings and character constants.  */
4388#define FOO(x) 'x'
4389int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4390
4391int test (int i, double x);
4392struct s1 {int (*f) (int a);};
4393struct s2 {int (*f) (double a);};
4394int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4395int argc;
4396char **argv;
4397int
4398main ()
4399{
4400return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4401  ;
4402  return 0;
4403}
4404_ACEOF
4405for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4406	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4407do
4408  CC="$ac_save_CC $ac_arg"
4409  if ac_fn_c_try_compile "$LINENO"; then :
4410  ac_cv_prog_cc_c89=$ac_arg
4411fi
4412rm -f core conftest.err conftest.$ac_objext
4413  test "x$ac_cv_prog_cc_c89" != "xno" && break
4414done
4415rm -f conftest.$ac_ext
4416CC=$ac_save_CC
4417
4418fi
4419# AC_CACHE_VAL
4420case "x$ac_cv_prog_cc_c89" in
4421  x)
4422    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4423$as_echo "none needed" >&6; } ;;
4424  xno)
4425    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4426$as_echo "unsupported" >&6; } ;;
4427  *)
4428    CC="$CC $ac_cv_prog_cc_c89"
4429    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4430$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4431esac
4432if test "x$ac_cv_prog_cc_c89" != xno; then :
4433
4434fi
4435
4436ac_ext=c
4437ac_cpp='$CPP $CPPFLAGS'
4438ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4439ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4440ac_compiler_gnu=$ac_cv_c_compiler_gnu
4441
4442ac_ext=cpp
4443ac_cpp='$CXXCPP $CPPFLAGS'
4444ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4445ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4446ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4447if test -z "$CXX"; then
4448  if test -n "$CCC"; then
4449    CXX=$CCC
4450  else
4451    if test -n "$ac_tool_prefix"; then
4452  for ac_prog in $pgac_cxx_list
4453  do
4454    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4455set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4457$as_echo_n "checking for $ac_word... " >&6; }
4458if ${ac_cv_prog_CXX+:} false; then :
4459  $as_echo_n "(cached) " >&6
4460else
4461  if test -n "$CXX"; then
4462  ac_cv_prog_CXX="$CXX" # Let the user override the test.
4463else
4464as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4465for as_dir in $PATH
4466do
4467  IFS=$as_save_IFS
4468  test -z "$as_dir" && as_dir=.
4469    for ac_exec_ext in '' $ac_executable_extensions; do
4470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4471    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4473    break 2
4474  fi
4475done
4476  done
4477IFS=$as_save_IFS
4478
4479fi
4480fi
4481CXX=$ac_cv_prog_CXX
4482if test -n "$CXX"; then
4483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4484$as_echo "$CXX" >&6; }
4485else
4486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4487$as_echo "no" >&6; }
4488fi
4489
4490
4491    test -n "$CXX" && break
4492  done
4493fi
4494if test -z "$CXX"; then
4495  ac_ct_CXX=$CXX
4496  for ac_prog in $pgac_cxx_list
4497do
4498  # Extract the first word of "$ac_prog", so it can be a program name with args.
4499set dummy $ac_prog; ac_word=$2
4500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4501$as_echo_n "checking for $ac_word... " >&6; }
4502if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4503  $as_echo_n "(cached) " >&6
4504else
4505  if test -n "$ac_ct_CXX"; then
4506  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4507else
4508as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4509for as_dir in $PATH
4510do
4511  IFS=$as_save_IFS
4512  test -z "$as_dir" && as_dir=.
4513    for ac_exec_ext in '' $ac_executable_extensions; do
4514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4515    ac_cv_prog_ac_ct_CXX="$ac_prog"
4516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4517    break 2
4518  fi
4519done
4520  done
4521IFS=$as_save_IFS
4522
4523fi
4524fi
4525ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4526if test -n "$ac_ct_CXX"; then
4527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4528$as_echo "$ac_ct_CXX" >&6; }
4529else
4530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4531$as_echo "no" >&6; }
4532fi
4533
4534
4535  test -n "$ac_ct_CXX" && break
4536done
4537
4538  if test "x$ac_ct_CXX" = x; then
4539    CXX="g++"
4540  else
4541    case $cross_compiling:$ac_tool_warned in
4542yes:)
4543{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4544$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4545ac_tool_warned=yes ;;
4546esac
4547    CXX=$ac_ct_CXX
4548  fi
4549fi
4550
4551  fi
4552fi
4553# Provide some information about the compiler.
4554$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4555set X $ac_compile
4556ac_compiler=$2
4557for ac_option in --version -v -V -qversion; do
4558  { { ac_try="$ac_compiler $ac_option >&5"
4559case "(($ac_try" in
4560  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4561  *) ac_try_echo=$ac_try;;
4562esac
4563eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4564$as_echo "$ac_try_echo"; } >&5
4565  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4566  ac_status=$?
4567  if test -s conftest.err; then
4568    sed '10a\
4569... rest of stderr output deleted ...
4570         10q' conftest.err >conftest.er1
4571    cat conftest.er1 >&5
4572  fi
4573  rm -f conftest.er1 conftest.err
4574  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4575  test $ac_status = 0; }
4576done
4577
4578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4579$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4580if ${ac_cv_cxx_compiler_gnu+:} false; then :
4581  $as_echo_n "(cached) " >&6
4582else
4583  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4584/* end confdefs.h.  */
4585
4586int
4587main ()
4588{
4589#ifndef __GNUC__
4590       choke me
4591#endif
4592
4593  ;
4594  return 0;
4595}
4596_ACEOF
4597if ac_fn_cxx_try_compile "$LINENO"; then :
4598  ac_compiler_gnu=yes
4599else
4600  ac_compiler_gnu=no
4601fi
4602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4603ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4604
4605fi
4606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4607$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4608if test $ac_compiler_gnu = yes; then
4609  GXX=yes
4610else
4611  GXX=
4612fi
4613ac_test_CXXFLAGS=${CXXFLAGS+set}
4614ac_save_CXXFLAGS=$CXXFLAGS
4615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4616$as_echo_n "checking whether $CXX accepts -g... " >&6; }
4617if ${ac_cv_prog_cxx_g+:} false; then :
4618  $as_echo_n "(cached) " >&6
4619else
4620  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4621   ac_cxx_werror_flag=yes
4622   ac_cv_prog_cxx_g=no
4623   CXXFLAGS="-g"
4624   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4625/* end confdefs.h.  */
4626
4627int
4628main ()
4629{
4630
4631  ;
4632  return 0;
4633}
4634_ACEOF
4635if ac_fn_cxx_try_compile "$LINENO"; then :
4636  ac_cv_prog_cxx_g=yes
4637else
4638  CXXFLAGS=""
4639      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4640/* end confdefs.h.  */
4641
4642int
4643main ()
4644{
4645
4646  ;
4647  return 0;
4648}
4649_ACEOF
4650if ac_fn_cxx_try_compile "$LINENO"; then :
4651
4652else
4653  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4654	 CXXFLAGS="-g"
4655	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4656/* end confdefs.h.  */
4657
4658int
4659main ()
4660{
4661
4662  ;
4663  return 0;
4664}
4665_ACEOF
4666if ac_fn_cxx_try_compile "$LINENO"; then :
4667  ac_cv_prog_cxx_g=yes
4668fi
4669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4670fi
4671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4672fi
4673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4674   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4675fi
4676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4677$as_echo "$ac_cv_prog_cxx_g" >&6; }
4678if test "$ac_test_CXXFLAGS" = set; then
4679  CXXFLAGS=$ac_save_CXXFLAGS
4680elif test $ac_cv_prog_cxx_g = yes; then
4681  if test "$GXX" = yes; then
4682    CXXFLAGS="-g -O2"
4683  else
4684    CXXFLAGS="-g"
4685  fi
4686else
4687  if test "$GXX" = yes; then
4688    CXXFLAGS="-O2"
4689  else
4690    CXXFLAGS=
4691  fi
4692fi
4693ac_ext=c
4694ac_cpp='$CPP $CPPFLAGS'
4695ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4696ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4697ac_compiler_gnu=$ac_cv_c_compiler_gnu
4698
4699
4700# Check if it's Intel's compiler, which (usually) pretends to be gcc,
4701# but has idiosyncrasies of its own.  We assume icc will define
4702# __INTEL_COMPILER regardless of CFLAGS.
4703
4704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4705/* end confdefs.h.  */
4706
4707int
4708main ()
4709{
4710#ifndef __INTEL_COMPILER
4711choke me
4712#endif
4713  ;
4714  return 0;
4715}
4716_ACEOF
4717if ac_fn_c_try_compile "$LINENO"; then :
4718  ICC=yes
4719else
4720  ICC=no
4721fi
4722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4723
4724# Check if it's Sun Studio compiler. We assume that
4725# __SUNPRO_C will be defined for Sun Studio compilers
4726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4727/* end confdefs.h.  */
4728
4729int
4730main ()
4731{
4732#ifndef __SUNPRO_C
4733choke me
4734#endif
4735  ;
4736  return 0;
4737}
4738_ACEOF
4739if ac_fn_c_try_compile "$LINENO"; then :
4740  SUN_STUDIO_CC=yes
4741else
4742  SUN_STUDIO_CC=no
4743fi
4744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4745
4746
4747
4748
4749#
4750# LLVM
4751#
4752# Checked early because subsequent tests depend on it.
4753
4754
4755
4756# Check whether --with-llvm was given.
4757if test "${with_llvm+set}" = set; then :
4758  withval=$with_llvm;
4759  case $withval in
4760    yes)
4761
4762$as_echo "#define USE_LLVM 1" >>confdefs.h
4763
4764      ;;
4765    no)
4766      :
4767      ;;
4768    *)
4769      as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4770      ;;
4771  esac
4772
4773else
4774  with_llvm=no
4775
4776fi
4777
4778
4779
4780for ac_prog in gawk mawk nawk awk
4781do
4782  # Extract the first word of "$ac_prog", so it can be a program name with args.
4783set dummy $ac_prog; ac_word=$2
4784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4785$as_echo_n "checking for $ac_word... " >&6; }
4786if ${ac_cv_prog_AWK+:} false; then :
4787  $as_echo_n "(cached) " >&6
4788else
4789  if test -n "$AWK"; then
4790  ac_cv_prog_AWK="$AWK" # Let the user override the test.
4791else
4792as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4793for as_dir in $PATH
4794do
4795  IFS=$as_save_IFS
4796  test -z "$as_dir" && as_dir=.
4797    for ac_exec_ext in '' $ac_executable_extensions; do
4798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4799    ac_cv_prog_AWK="$ac_prog"
4800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4801    break 2
4802  fi
4803done
4804  done
4805IFS=$as_save_IFS
4806
4807fi
4808fi
4809AWK=$ac_cv_prog_AWK
4810if test -n "$AWK"; then
4811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4812$as_echo "$AWK" >&6; }
4813else
4814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4815$as_echo "no" >&6; }
4816fi
4817
4818
4819  test -n "$AWK" && break
4820done
4821
4822if test "$with_llvm" = yes; then :
4823
4824
4825
4826
4827
4828  if test -z "$LLVM_CONFIG"; then
4829  for ac_prog in llvm-config llvm-config-7 llvm-config-6.0 llvm-config-5.0 llvm-config-4.0 llvm-config-3.9
4830do
4831  # Extract the first word of "$ac_prog", so it can be a program name with args.
4832set dummy $ac_prog; ac_word=$2
4833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4834$as_echo_n "checking for $ac_word... " >&6; }
4835if ${ac_cv_path_LLVM_CONFIG+:} false; then :
4836  $as_echo_n "(cached) " >&6
4837else
4838  case $LLVM_CONFIG in
4839  [\\/]* | ?:[\\/]*)
4840  ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
4841  ;;
4842  *)
4843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4844for as_dir in $PATH
4845do
4846  IFS=$as_save_IFS
4847  test -z "$as_dir" && as_dir=.
4848    for ac_exec_ext in '' $ac_executable_extensions; do
4849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4850    ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
4851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4852    break 2
4853  fi
4854done
4855  done
4856IFS=$as_save_IFS
4857
4858  ;;
4859esac
4860fi
4861LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
4862if test -n "$LLVM_CONFIG"; then
4863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
4864$as_echo "$LLVM_CONFIG" >&6; }
4865else
4866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4867$as_echo "no" >&6; }
4868fi
4869
4870
4871  test -n "$LLVM_CONFIG" && break
4872done
4873
4874else
4875  # Report the value of LLVM_CONFIG in configure's output in all cases.
4876  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
4877$as_echo_n "checking for LLVM_CONFIG... " >&6; }
4878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
4879$as_echo "$LLVM_CONFIG" >&6; }
4880fi
4881
4882
4883  # no point continuing if llvm wasn't found
4884  if test -z "$LLVM_CONFIG"; then
4885    as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
4886  fi
4887  # check if detected $LLVM_CONFIG is executable
4888  pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
4889  if test "x$pgac_llvm_version" = "xno"; then
4890    as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
4891  fi
4892  # and whether the version is supported
4893  if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 4 || ($1 == 3 && $2 >= 9)) exit 1; else exit 0;}';then
4894    as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 3.9 is required" "$LINENO" 5
4895  fi
4896
4897  # need clang to create some bitcode files
4898
4899  if test -z "$CLANG"; then
4900  for ac_prog in clang clang-7 clang-6.0 clang-5.0 clang-4.0 clang-3.9
4901do
4902  # Extract the first word of "$ac_prog", so it can be a program name with args.
4903set dummy $ac_prog; ac_word=$2
4904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4905$as_echo_n "checking for $ac_word... " >&6; }
4906if ${ac_cv_path_CLANG+:} false; then :
4907  $as_echo_n "(cached) " >&6
4908else
4909  case $CLANG in
4910  [\\/]* | ?:[\\/]*)
4911  ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
4912  ;;
4913  *)
4914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4915for as_dir in $PATH
4916do
4917  IFS=$as_save_IFS
4918  test -z "$as_dir" && as_dir=.
4919    for ac_exec_ext in '' $ac_executable_extensions; do
4920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4921    ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
4922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4923    break 2
4924  fi
4925done
4926  done
4927IFS=$as_save_IFS
4928
4929  ;;
4930esac
4931fi
4932CLANG=$ac_cv_path_CLANG
4933if test -n "$CLANG"; then
4934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
4935$as_echo "$CLANG" >&6; }
4936else
4937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4938$as_echo "no" >&6; }
4939fi
4940
4941
4942  test -n "$CLANG" && break
4943done
4944
4945else
4946  # Report the value of CLANG in configure's output in all cases.
4947  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
4948$as_echo_n "checking for CLANG... " >&6; }
4949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
4950$as_echo "$CLANG" >&6; }
4951fi
4952
4953  if test -z "$CLANG"; then
4954    as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
4955  fi
4956  # make sure clang is executable
4957  if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
4958    as_fn_error $? "$CLANG does not work" "$LINENO" 5
4959  fi
4960  # Could check clang version, but it doesn't seem that
4961  # important. Systems with a new enough LLVM version are usually
4962  # going to have a decent clang version too. It's also not entirely
4963  # clear what the minimum version is.
4964
4965  # Collect compiler flags necessary to build the LLVM dependent
4966  # shared library.
4967  for pgac_option in `$LLVM_CONFIG --cppflags`; do
4968    case $pgac_option in
4969      -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
4970    esac
4971  done
4972
4973  for pgac_option in `$LLVM_CONFIG --ldflags`; do
4974    case $pgac_option in
4975      -L*) LDFLAGS="$LDFLAGS $pgac_option";;
4976    esac
4977  done
4978
4979  # ABI influencing options, standard influencing options
4980  for pgac_option in `$LLVM_CONFIG --cxxflags`; do
4981    case $pgac_option in
4982      -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
4983      -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
4984    esac
4985  done
4986
4987  # Look for components we're interested in, collect necessary
4988  # libs. As some components are optional, we can't just list all of
4989  # them as it'd raise an error.
4990  pgac_components='';
4991  for pgac_component in `$LLVM_CONFIG --components`; do
4992    case $pgac_component in
4993      engine) pgac_components="$pgac_components $pgac_component";;
4994      debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
4995      orcjit) pgac_components="$pgac_components $pgac_component";;
4996      passes) pgac_components="$pgac_components $pgac_component";;
4997      native) pgac_components="$pgac_components $pgac_component";;
4998      perfjitevents) pgac_components="$pgac_components $pgac_component";;
4999    esac
5000  done;
5001
5002  # And then get the libraries that need to be linked in for the
5003  # selected components.  They're large libraries, we only want to
5004  # link them into the LLVM using shared library.
5005  for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5006    case $pgac_option in
5007      -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5008    esac
5009  done
5010
5011  LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5012
5013  # LLVM_CONFIG, CLANG are already output via AC_ARG_VAR
5014
5015
5016
5017
5018
5019
5020
5021
5022fi # fi
5023
5024
5025unset CFLAGS
5026unset CXXFLAGS
5027
5028#
5029# Read the template
5030#
5031. "$srcdir/src/template/$template" || exit
5032
5033# C[XX]FLAGS are selected so:
5034# If the user specifies something in the environment, that is used.
5035# else:  If the template file set something, that is used.
5036# else:  If coverage was enabled, don't set anything.
5037# else:  If the compiler is GCC, then we use -O2.
5038# else:  If the compiler is something else, then we use -O, unless debugging.
5039
5040if test "$ac_env_CFLAGS_set" = set; then
5041  CFLAGS=$ac_env_CFLAGS_value
5042elif test "${CFLAGS+set}" = set; then
5043  : # (keep what template set)
5044elif test "$enable_coverage" = yes; then
5045  : # no optimization by default
5046elif test "$GCC" = yes; then
5047  CFLAGS="-O2"
5048else
5049  # if the user selected debug mode, don't use -O
5050  if test "$enable_debug" != yes; then
5051    CFLAGS="-O"
5052  fi
5053fi
5054
5055if test "$ac_env_CXXFLAGS_set" = set; then
5056  CXXFLAGS=$ac_env_CXXFLAGS_value
5057elif test "${CXXFLAGS+set}" = set; then
5058  : # (keep what template set)
5059elif test "$enable_coverage" = yes; then
5060  : # no optimization by default
5061elif test "$GCC" = yes; then
5062  CXXFLAGS="-O2"
5063else
5064  # if the user selected debug mode, don't use -O
5065  if test "$enable_debug" != yes; then
5066    CXXFLAGS="-O"
5067  fi
5068fi
5069
5070# When generating bitcode (for inlining) we always want to use -O2
5071# even when --enable-debug is specified. The bitcode it's not going to
5072# be used for line-by-line debugging, and JIT inlining doesn't work
5073# without at least -O1 (otherwise clang will emit 'noinline'
5074# attributes everywhere), which is bad for testing.  Still allow the
5075# environment to override if done explicitly.
5076if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5077  BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5078else
5079  BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5080fi
5081if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5082  BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5083else
5084  BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5085fi
5086
5087# C[XX]FLAGS we determined above will be added back at the end
5088user_CFLAGS=$CFLAGS
5089CFLAGS=""
5090user_CXXFLAGS=$CXXFLAGS
5091CXXFLAGS=""
5092user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5093BITCODE_CFLAGS=""
5094user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5095BITCODE_CXXFLAGS=""
5096
5097# set CFLAGS_VECTOR from the environment, if available
5098if test "$ac_env_CFLAGS_VECTOR_set" = set; then
5099  CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
5100fi
5101
5102# Some versions of GCC support some additional useful warning flags.
5103# Check whether they are supported, and add them to CFLAGS if so.
5104# ICC pretends to be GCC but it's lying; it doesn't support these flags,
5105# but has its own.  Also check other compiler-specific flags here.
5106
5107if test "$GCC" = yes -a "$ICC" = no; then
5108  CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5109  CXXFLAGS="-Wall -Wpointer-arith"
5110  # These work in some but not all gcc versions
5111
5112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5113$as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5114if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5115  $as_echo_n "(cached) " >&6
5116else
5117  pgac_save_CFLAGS=$CFLAGS
5118pgac_save_CC=$CC
5119CC=${CC}
5120CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5121ac_save_c_werror_flag=$ac_c_werror_flag
5122ac_c_werror_flag=yes
5123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5124/* end confdefs.h.  */
5125
5126int
5127main ()
5128{
5129
5130  ;
5131  return 0;
5132}
5133_ACEOF
5134if ac_fn_c_try_compile "$LINENO"; then :
5135  pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5136else
5137  pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5138fi
5139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5140ac_c_werror_flag=$ac_save_c_werror_flag
5141CFLAGS="$pgac_save_CFLAGS"
5142CC="$pgac_save_CC"
5143fi
5144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5145$as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5146if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5147  CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5148fi
5149
5150
5151  # -Wdeclaration-after-statement isn't applicable for C++
5152
5153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5154$as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5155if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5156  $as_echo_n "(cached) " >&6
5157else
5158  pgac_save_CFLAGS=$CFLAGS
5159pgac_save_CC=$CC
5160CC=${CC}
5161CFLAGS="${CFLAGS} -Wendif-labels"
5162ac_save_c_werror_flag=$ac_c_werror_flag
5163ac_c_werror_flag=yes
5164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5165/* end confdefs.h.  */
5166
5167int
5168main ()
5169{
5170
5171  ;
5172  return 0;
5173}
5174_ACEOF
5175if ac_fn_c_try_compile "$LINENO"; then :
5176  pgac_cv_prog_CC_cflags__Wendif_labels=yes
5177else
5178  pgac_cv_prog_CC_cflags__Wendif_labels=no
5179fi
5180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5181ac_c_werror_flag=$ac_save_c_werror_flag
5182CFLAGS="$pgac_save_CFLAGS"
5183CC="$pgac_save_CC"
5184fi
5185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5186$as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5187if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5188  CFLAGS="${CFLAGS} -Wendif-labels"
5189fi
5190
5191
5192  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5193$as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5194if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5195  $as_echo_n "(cached) " >&6
5196else
5197  pgac_save_CXXFLAGS=$CXXFLAGS
5198pgac_save_CXX=$CXX
5199CXX=${CXX}
5200CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5201ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5202ac_cxx_werror_flag=yes
5203ac_ext=cpp
5204ac_cpp='$CXXCPP $CPPFLAGS'
5205ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5206ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5207ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5208
5209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5210/* end confdefs.h.  */
5211
5212int
5213main ()
5214{
5215
5216  ;
5217  return 0;
5218}
5219_ACEOF
5220if ac_fn_cxx_try_compile "$LINENO"; then :
5221  pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5222else
5223  pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5224fi
5225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5226ac_ext=c
5227ac_cpp='$CPP $CPPFLAGS'
5228ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5229ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5230ac_compiler_gnu=$ac_cv_c_compiler_gnu
5231
5232ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5233CXXFLAGS="$pgac_save_CXXFLAGS"
5234CXX="$pgac_save_CXX"
5235fi
5236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5237$as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5238if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5239  CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5240fi
5241
5242
5243
5244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5245$as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5246if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5247  $as_echo_n "(cached) " >&6
5248else
5249  pgac_save_CFLAGS=$CFLAGS
5250pgac_save_CC=$CC
5251CC=${CC}
5252CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5253ac_save_c_werror_flag=$ac_c_werror_flag
5254ac_c_werror_flag=yes
5255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5256/* end confdefs.h.  */
5257
5258int
5259main ()
5260{
5261
5262  ;
5263  return 0;
5264}
5265_ACEOF
5266if ac_fn_c_try_compile "$LINENO"; then :
5267  pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5268else
5269  pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5270fi
5271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5272ac_c_werror_flag=$ac_save_c_werror_flag
5273CFLAGS="$pgac_save_CFLAGS"
5274CC="$pgac_save_CC"
5275fi
5276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5277$as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5278if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5279  CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5280fi
5281
5282
5283  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5284$as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5285if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5286  $as_echo_n "(cached) " >&6
5287else
5288  pgac_save_CXXFLAGS=$CXXFLAGS
5289pgac_save_CXX=$CXX
5290CXX=${CXX}
5291CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5292ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5293ac_cxx_werror_flag=yes
5294ac_ext=cpp
5295ac_cpp='$CXXCPP $CPPFLAGS'
5296ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5297ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5298ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5299
5300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5301/* end confdefs.h.  */
5302
5303int
5304main ()
5305{
5306
5307  ;
5308  return 0;
5309}
5310_ACEOF
5311if ac_fn_cxx_try_compile "$LINENO"; then :
5312  pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5313else
5314  pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5315fi
5316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5317ac_ext=c
5318ac_cpp='$CPP $CPPFLAGS'
5319ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5320ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5321ac_compiler_gnu=$ac_cv_c_compiler_gnu
5322
5323ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5324CXXFLAGS="$pgac_save_CXXFLAGS"
5325CXX="$pgac_save_CXX"
5326fi
5327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5328$as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5329if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5330  CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5331fi
5332
5333
5334  # This was included in -Wall/-Wformat in older GCC versions
5335
5336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5337$as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5338if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5339  $as_echo_n "(cached) " >&6
5340else
5341  pgac_save_CFLAGS=$CFLAGS
5342pgac_save_CC=$CC
5343CC=${CC}
5344CFLAGS="${CFLAGS} -Wformat-security"
5345ac_save_c_werror_flag=$ac_c_werror_flag
5346ac_c_werror_flag=yes
5347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5348/* end confdefs.h.  */
5349
5350int
5351main ()
5352{
5353
5354  ;
5355  return 0;
5356}
5357_ACEOF
5358if ac_fn_c_try_compile "$LINENO"; then :
5359  pgac_cv_prog_CC_cflags__Wformat_security=yes
5360else
5361  pgac_cv_prog_CC_cflags__Wformat_security=no
5362fi
5363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5364ac_c_werror_flag=$ac_save_c_werror_flag
5365CFLAGS="$pgac_save_CFLAGS"
5366CC="$pgac_save_CC"
5367fi
5368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5369$as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5370if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5371  CFLAGS="${CFLAGS} -Wformat-security"
5372fi
5373
5374
5375  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5376$as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5377if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5378  $as_echo_n "(cached) " >&6
5379else
5380  pgac_save_CXXFLAGS=$CXXFLAGS
5381pgac_save_CXX=$CXX
5382CXX=${CXX}
5383CXXFLAGS="${CXXFLAGS} -Wformat-security"
5384ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5385ac_cxx_werror_flag=yes
5386ac_ext=cpp
5387ac_cpp='$CXXCPP $CPPFLAGS'
5388ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5389ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5390ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5391
5392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5393/* end confdefs.h.  */
5394
5395int
5396main ()
5397{
5398
5399  ;
5400  return 0;
5401}
5402_ACEOF
5403if ac_fn_cxx_try_compile "$LINENO"; then :
5404  pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
5405else
5406  pgac_cv_prog_CXX_cxxflags__Wformat_security=no
5407fi
5408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5409ac_ext=c
5410ac_cpp='$CPP $CPPFLAGS'
5411ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5412ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5413ac_compiler_gnu=$ac_cv_c_compiler_gnu
5414
5415ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5416CXXFLAGS="$pgac_save_CXXFLAGS"
5417CXX="$pgac_save_CXX"
5418fi
5419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
5420$as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
5421if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
5422  CXXFLAGS="${CXXFLAGS} -Wformat-security"
5423fi
5424
5425
5426  # Disable strict-aliasing rules; needed for gcc 3.3+
5427
5428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
5429$as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
5430if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
5431  $as_echo_n "(cached) " >&6
5432else
5433  pgac_save_CFLAGS=$CFLAGS
5434pgac_save_CC=$CC
5435CC=${CC}
5436CFLAGS="${CFLAGS} -fno-strict-aliasing"
5437ac_save_c_werror_flag=$ac_c_werror_flag
5438ac_c_werror_flag=yes
5439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5440/* end confdefs.h.  */
5441
5442int
5443main ()
5444{
5445
5446  ;
5447  return 0;
5448}
5449_ACEOF
5450if ac_fn_c_try_compile "$LINENO"; then :
5451  pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
5452else
5453  pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
5454fi
5455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5456ac_c_werror_flag=$ac_save_c_werror_flag
5457CFLAGS="$pgac_save_CFLAGS"
5458CC="$pgac_save_CC"
5459fi
5460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
5461$as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
5462if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
5463  CFLAGS="${CFLAGS} -fno-strict-aliasing"
5464fi
5465
5466
5467  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
5468$as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
5469if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
5470  $as_echo_n "(cached) " >&6
5471else
5472  pgac_save_CXXFLAGS=$CXXFLAGS
5473pgac_save_CXX=$CXX
5474CXX=${CXX}
5475CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5476ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5477ac_cxx_werror_flag=yes
5478ac_ext=cpp
5479ac_cpp='$CXXCPP $CPPFLAGS'
5480ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5481ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5482ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5483
5484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5485/* end confdefs.h.  */
5486
5487int
5488main ()
5489{
5490
5491  ;
5492  return 0;
5493}
5494_ACEOF
5495if ac_fn_cxx_try_compile "$LINENO"; then :
5496  pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
5497else
5498  pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
5499fi
5500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5501ac_ext=c
5502ac_cpp='$CPP $CPPFLAGS'
5503ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5504ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5505ac_compiler_gnu=$ac_cv_c_compiler_gnu
5506
5507ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5508CXXFLAGS="$pgac_save_CXXFLAGS"
5509CXX="$pgac_save_CXX"
5510fi
5511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
5512$as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
5513if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
5514  CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5515fi
5516
5517
5518  # Disable optimizations that assume no overflow; needed for gcc 4.3+
5519
5520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
5521$as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
5522if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
5523  $as_echo_n "(cached) " >&6
5524else
5525  pgac_save_CFLAGS=$CFLAGS
5526pgac_save_CC=$CC
5527CC=${CC}
5528CFLAGS="${CFLAGS} -fwrapv"
5529ac_save_c_werror_flag=$ac_c_werror_flag
5530ac_c_werror_flag=yes
5531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5532/* end confdefs.h.  */
5533
5534int
5535main ()
5536{
5537
5538  ;
5539  return 0;
5540}
5541_ACEOF
5542if ac_fn_c_try_compile "$LINENO"; then :
5543  pgac_cv_prog_CC_cflags__fwrapv=yes
5544else
5545  pgac_cv_prog_CC_cflags__fwrapv=no
5546fi
5547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5548ac_c_werror_flag=$ac_save_c_werror_flag
5549CFLAGS="$pgac_save_CFLAGS"
5550CC="$pgac_save_CC"
5551fi
5552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
5553$as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
5554if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
5555  CFLAGS="${CFLAGS} -fwrapv"
5556fi
5557
5558
5559  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
5560$as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
5561if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
5562  $as_echo_n "(cached) " >&6
5563else
5564  pgac_save_CXXFLAGS=$CXXFLAGS
5565pgac_save_CXX=$CXX
5566CXX=${CXX}
5567CXXFLAGS="${CXXFLAGS} -fwrapv"
5568ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5569ac_cxx_werror_flag=yes
5570ac_ext=cpp
5571ac_cpp='$CXXCPP $CPPFLAGS'
5572ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5573ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5574ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5575
5576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5577/* end confdefs.h.  */
5578
5579int
5580main ()
5581{
5582
5583  ;
5584  return 0;
5585}
5586_ACEOF
5587if ac_fn_cxx_try_compile "$LINENO"; then :
5588  pgac_cv_prog_CXX_cxxflags__fwrapv=yes
5589else
5590  pgac_cv_prog_CXX_cxxflags__fwrapv=no
5591fi
5592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5593ac_ext=c
5594ac_cpp='$CPP $CPPFLAGS'
5595ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5596ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5597ac_compiler_gnu=$ac_cv_c_compiler_gnu
5598
5599ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5600CXXFLAGS="$pgac_save_CXXFLAGS"
5601CXX="$pgac_save_CXX"
5602fi
5603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
5604$as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
5605if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
5606  CXXFLAGS="${CXXFLAGS} -fwrapv"
5607fi
5608
5609
5610  # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
5611
5612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
5613$as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
5614if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
5615  $as_echo_n "(cached) " >&6
5616else
5617  pgac_save_CFLAGS=$CFLAGS
5618pgac_save_CC=$CC
5619CC=${CC}
5620CFLAGS="${CFLAGS} -fexcess-precision=standard"
5621ac_save_c_werror_flag=$ac_c_werror_flag
5622ac_c_werror_flag=yes
5623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5624/* end confdefs.h.  */
5625
5626int
5627main ()
5628{
5629
5630  ;
5631  return 0;
5632}
5633_ACEOF
5634if ac_fn_c_try_compile "$LINENO"; then :
5635  pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
5636else
5637  pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
5638fi
5639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5640ac_c_werror_flag=$ac_save_c_werror_flag
5641CFLAGS="$pgac_save_CFLAGS"
5642CC="$pgac_save_CC"
5643fi
5644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
5645$as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
5646if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
5647  CFLAGS="${CFLAGS} -fexcess-precision=standard"
5648fi
5649
5650
5651  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
5652$as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
5653if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
5654  $as_echo_n "(cached) " >&6
5655else
5656  pgac_save_CXXFLAGS=$CXXFLAGS
5657pgac_save_CXX=$CXX
5658CXX=${CXX}
5659CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5660ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5661ac_cxx_werror_flag=yes
5662ac_ext=cpp
5663ac_cpp='$CXXCPP $CPPFLAGS'
5664ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5665ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5666ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5667
5668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5669/* end confdefs.h.  */
5670
5671int
5672main ()
5673{
5674
5675  ;
5676  return 0;
5677}
5678_ACEOF
5679if ac_fn_cxx_try_compile "$LINENO"; then :
5680  pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
5681else
5682  pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
5683fi
5684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5685ac_ext=c
5686ac_cpp='$CPP $CPPFLAGS'
5687ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5688ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5689ac_compiler_gnu=$ac_cv_c_compiler_gnu
5690
5691ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5692CXXFLAGS="$pgac_save_CXXFLAGS"
5693CXX="$pgac_save_CXX"
5694fi
5695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
5696$as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
5697if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
5698  CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5699fi
5700
5701
5702  # Optimization flags for specific files that benefit from vectorization
5703  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR" >&5
5704$as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR... " >&6; }
5705if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
5706  $as_echo_n "(cached) " >&6
5707else
5708  pgac_save_CFLAGS=$CFLAGS
5709pgac_save_CC=$CC
5710CC=${CC}
5711CFLAGS="${CFLAGS_VECTOR} -funroll-loops"
5712ac_save_c_werror_flag=$ac_c_werror_flag
5713ac_c_werror_flag=yes
5714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5715/* end confdefs.h.  */
5716
5717int
5718main ()
5719{
5720
5721  ;
5722  return 0;
5723}
5724_ACEOF
5725if ac_fn_c_try_compile "$LINENO"; then :
5726  pgac_cv_prog_CC_cflags__funroll_loops=yes
5727else
5728  pgac_cv_prog_CC_cflags__funroll_loops=no
5729fi
5730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5731ac_c_werror_flag=$ac_save_c_werror_flag
5732CFLAGS="$pgac_save_CFLAGS"
5733CC="$pgac_save_CC"
5734fi
5735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
5736$as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
5737if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
5738  CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
5739fi
5740
5741
5742  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR" >&5
5743$as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR... " >&6; }
5744if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
5745  $as_echo_n "(cached) " >&6
5746else
5747  pgac_save_CFLAGS=$CFLAGS
5748pgac_save_CC=$CC
5749CC=${CC}
5750CFLAGS="${CFLAGS_VECTOR} -ftree-vectorize"
5751ac_save_c_werror_flag=$ac_c_werror_flag
5752ac_c_werror_flag=yes
5753cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5754/* end confdefs.h.  */
5755
5756int
5757main ()
5758{
5759
5760  ;
5761  return 0;
5762}
5763_ACEOF
5764if ac_fn_c_try_compile "$LINENO"; then :
5765  pgac_cv_prog_CC_cflags__ftree_vectorize=yes
5766else
5767  pgac_cv_prog_CC_cflags__ftree_vectorize=no
5768fi
5769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5770ac_c_werror_flag=$ac_save_c_werror_flag
5771CFLAGS="$pgac_save_CFLAGS"
5772CC="$pgac_save_CC"
5773fi
5774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
5775$as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
5776if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
5777  CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
5778fi
5779
5780
5781  # We want to suppress clang's unhelpful unused-command-line-argument warnings
5782  # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
5783  # test for the positive form and if that works, add the negative form
5784  NOT_THE_CFLAGS=""
5785  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
5786$as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
5787if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
5788  $as_echo_n "(cached) " >&6
5789else
5790  pgac_save_CFLAGS=$CFLAGS
5791pgac_save_CC=$CC
5792CC=${CC}
5793CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
5794ac_save_c_werror_flag=$ac_c_werror_flag
5795ac_c_werror_flag=yes
5796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5797/* end confdefs.h.  */
5798
5799int
5800main ()
5801{
5802
5803  ;
5804  return 0;
5805}
5806_ACEOF
5807if ac_fn_c_try_compile "$LINENO"; then :
5808  pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
5809else
5810  pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
5811fi
5812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5813ac_c_werror_flag=$ac_save_c_werror_flag
5814CFLAGS="$pgac_save_CFLAGS"
5815CC="$pgac_save_CC"
5816fi
5817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
5818$as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
5819if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
5820  NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
5821fi
5822
5823
5824  if test -n "$NOT_THE_CFLAGS"; then
5825    CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
5826  fi
5827  # Similarly disable useless truncation warnings from gcc 8+
5828  NOT_THE_CFLAGS=""
5829  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
5830$as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
5831if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
5832  $as_echo_n "(cached) " >&6
5833else
5834  pgac_save_CFLAGS=$CFLAGS
5835pgac_save_CC=$CC
5836CC=${CC}
5837CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
5838ac_save_c_werror_flag=$ac_c_werror_flag
5839ac_c_werror_flag=yes
5840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5841/* end confdefs.h.  */
5842
5843int
5844main ()
5845{
5846
5847  ;
5848  return 0;
5849}
5850_ACEOF
5851if ac_fn_c_try_compile "$LINENO"; then :
5852  pgac_cv_prog_CC_cflags__Wformat_truncation=yes
5853else
5854  pgac_cv_prog_CC_cflags__Wformat_truncation=no
5855fi
5856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5857ac_c_werror_flag=$ac_save_c_werror_flag
5858CFLAGS="$pgac_save_CFLAGS"
5859CC="$pgac_save_CC"
5860fi
5861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
5862$as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
5863if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
5864  NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
5865fi
5866
5867
5868  if test -n "$NOT_THE_CFLAGS"; then
5869    CFLAGS="$CFLAGS -Wno-format-truncation"
5870  fi
5871  NOT_THE_CFLAGS=""
5872  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
5873$as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
5874if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
5875  $as_echo_n "(cached) " >&6
5876else
5877  pgac_save_CFLAGS=$CFLAGS
5878pgac_save_CC=$CC
5879CC=${CC}
5880CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
5881ac_save_c_werror_flag=$ac_c_werror_flag
5882ac_c_werror_flag=yes
5883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5884/* end confdefs.h.  */
5885
5886int
5887main ()
5888{
5889
5890  ;
5891  return 0;
5892}
5893_ACEOF
5894if ac_fn_c_try_compile "$LINENO"; then :
5895  pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
5896else
5897  pgac_cv_prog_CC_cflags__Wstringop_truncation=no
5898fi
5899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5900ac_c_werror_flag=$ac_save_c_werror_flag
5901CFLAGS="$pgac_save_CFLAGS"
5902CC="$pgac_save_CC"
5903fi
5904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
5905$as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
5906if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
5907  NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
5908fi
5909
5910
5911  if test -n "$NOT_THE_CFLAGS"; then
5912    CFLAGS="$CFLAGS -Wno-stringop-truncation"
5913  fi
5914elif test "$ICC" = yes; then
5915  # Intel's compiler has a bug/misoptimization in checking for
5916  # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
5917
5918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
5919$as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
5920if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
5921  $as_echo_n "(cached) " >&6
5922else
5923  pgac_save_CFLAGS=$CFLAGS
5924pgac_save_CC=$CC
5925CC=${CC}
5926CFLAGS="${CFLAGS} -mp1"
5927ac_save_c_werror_flag=$ac_c_werror_flag
5928ac_c_werror_flag=yes
5929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5930/* end confdefs.h.  */
5931
5932int
5933main ()
5934{
5935
5936  ;
5937  return 0;
5938}
5939_ACEOF
5940if ac_fn_c_try_compile "$LINENO"; then :
5941  pgac_cv_prog_CC_cflags__mp1=yes
5942else
5943  pgac_cv_prog_CC_cflags__mp1=no
5944fi
5945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5946ac_c_werror_flag=$ac_save_c_werror_flag
5947CFLAGS="$pgac_save_CFLAGS"
5948CC="$pgac_save_CC"
5949fi
5950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
5951$as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
5952if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
5953  CFLAGS="${CFLAGS} -mp1"
5954fi
5955
5956
5957  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
5958$as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
5959if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
5960  $as_echo_n "(cached) " >&6
5961else
5962  pgac_save_CXXFLAGS=$CXXFLAGS
5963pgac_save_CXX=$CXX
5964CXX=${CXX}
5965CXXFLAGS="${CXXFLAGS} -mp1"
5966ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5967ac_cxx_werror_flag=yes
5968ac_ext=cpp
5969ac_cpp='$CXXCPP $CPPFLAGS'
5970ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5971ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5972ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5973
5974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5975/* end confdefs.h.  */
5976
5977int
5978main ()
5979{
5980
5981  ;
5982  return 0;
5983}
5984_ACEOF
5985if ac_fn_cxx_try_compile "$LINENO"; then :
5986  pgac_cv_prog_CXX_cxxflags__mp1=yes
5987else
5988  pgac_cv_prog_CXX_cxxflags__mp1=no
5989fi
5990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5991ac_ext=c
5992ac_cpp='$CPP $CPPFLAGS'
5993ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5994ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5995ac_compiler_gnu=$ac_cv_c_compiler_gnu
5996
5997ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5998CXXFLAGS="$pgac_save_CXXFLAGS"
5999CXX="$pgac_save_CXX"
6000fi
6001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6002$as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6003if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6004  CXXFLAGS="${CXXFLAGS} -mp1"
6005fi
6006
6007
6008  # Make sure strict aliasing is off (though this is said to be the default)
6009
6010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6011$as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6012if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6013  $as_echo_n "(cached) " >&6
6014else
6015  pgac_save_CFLAGS=$CFLAGS
6016pgac_save_CC=$CC
6017CC=${CC}
6018CFLAGS="${CFLAGS} -fno-strict-aliasing"
6019ac_save_c_werror_flag=$ac_c_werror_flag
6020ac_c_werror_flag=yes
6021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6022/* end confdefs.h.  */
6023
6024int
6025main ()
6026{
6027
6028  ;
6029  return 0;
6030}
6031_ACEOF
6032if ac_fn_c_try_compile "$LINENO"; then :
6033  pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6034else
6035  pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6036fi
6037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6038ac_c_werror_flag=$ac_save_c_werror_flag
6039CFLAGS="$pgac_save_CFLAGS"
6040CC="$pgac_save_CC"
6041fi
6042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6043$as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6044if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6045  CFLAGS="${CFLAGS} -fno-strict-aliasing"
6046fi
6047
6048
6049  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6050$as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6051if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6052  $as_echo_n "(cached) " >&6
6053else
6054  pgac_save_CXXFLAGS=$CXXFLAGS
6055pgac_save_CXX=$CXX
6056CXX=${CXX}
6057CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6058ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6059ac_cxx_werror_flag=yes
6060ac_ext=cpp
6061ac_cpp='$CXXCPP $CPPFLAGS'
6062ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6063ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6064ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6065
6066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6067/* end confdefs.h.  */
6068
6069int
6070main ()
6071{
6072
6073  ;
6074  return 0;
6075}
6076_ACEOF
6077if ac_fn_cxx_try_compile "$LINENO"; then :
6078  pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6079else
6080  pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6081fi
6082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6083ac_ext=c
6084ac_cpp='$CPP $CPPFLAGS'
6085ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6086ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6087ac_compiler_gnu=$ac_cv_c_compiler_gnu
6088
6089ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6090CXXFLAGS="$pgac_save_CXXFLAGS"
6091CXX="$pgac_save_CXX"
6092fi
6093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6094$as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6095if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6096  CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6097fi
6098
6099
6100elif test "$PORTNAME" = "aix"; then
6101  # AIX's xlc has to have strict aliasing turned off too
6102
6103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6104$as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6105if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6106  $as_echo_n "(cached) " >&6
6107else
6108  pgac_save_CFLAGS=$CFLAGS
6109pgac_save_CC=$CC
6110CC=${CC}
6111CFLAGS="${CFLAGS} -qnoansialias"
6112ac_save_c_werror_flag=$ac_c_werror_flag
6113ac_c_werror_flag=yes
6114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6115/* end confdefs.h.  */
6116
6117int
6118main ()
6119{
6120
6121  ;
6122  return 0;
6123}
6124_ACEOF
6125if ac_fn_c_try_compile "$LINENO"; then :
6126  pgac_cv_prog_CC_cflags__qnoansialias=yes
6127else
6128  pgac_cv_prog_CC_cflags__qnoansialias=no
6129fi
6130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6131ac_c_werror_flag=$ac_save_c_werror_flag
6132CFLAGS="$pgac_save_CFLAGS"
6133CC="$pgac_save_CC"
6134fi
6135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6136$as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6137if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6138  CFLAGS="${CFLAGS} -qnoansialias"
6139fi
6140
6141
6142  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6143$as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6144if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6145  $as_echo_n "(cached) " >&6
6146else
6147  pgac_save_CXXFLAGS=$CXXFLAGS
6148pgac_save_CXX=$CXX
6149CXX=${CXX}
6150CXXFLAGS="${CXXFLAGS} -qnoansialias"
6151ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6152ac_cxx_werror_flag=yes
6153ac_ext=cpp
6154ac_cpp='$CXXCPP $CPPFLAGS'
6155ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6156ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6157ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6158
6159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6160/* end confdefs.h.  */
6161
6162int
6163main ()
6164{
6165
6166  ;
6167  return 0;
6168}
6169_ACEOF
6170if ac_fn_cxx_try_compile "$LINENO"; then :
6171  pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6172else
6173  pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6174fi
6175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6176ac_ext=c
6177ac_cpp='$CPP $CPPFLAGS'
6178ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6179ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6180ac_compiler_gnu=$ac_cv_c_compiler_gnu
6181
6182ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6183CXXFLAGS="$pgac_save_CXXFLAGS"
6184CXX="$pgac_save_CXX"
6185fi
6186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6187$as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6188if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6189  CXXFLAGS="${CXXFLAGS} -qnoansialias"
6190fi
6191
6192
6193
6194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6195$as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6196if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6197  $as_echo_n "(cached) " >&6
6198else
6199  pgac_save_CFLAGS=$CFLAGS
6200pgac_save_CC=$CC
6201CC=${CC}
6202CFLAGS="${CFLAGS} -qlonglong"
6203ac_save_c_werror_flag=$ac_c_werror_flag
6204ac_c_werror_flag=yes
6205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6206/* end confdefs.h.  */
6207
6208int
6209main ()
6210{
6211
6212  ;
6213  return 0;
6214}
6215_ACEOF
6216if ac_fn_c_try_compile "$LINENO"; then :
6217  pgac_cv_prog_CC_cflags__qlonglong=yes
6218else
6219  pgac_cv_prog_CC_cflags__qlonglong=no
6220fi
6221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6222ac_c_werror_flag=$ac_save_c_werror_flag
6223CFLAGS="$pgac_save_CFLAGS"
6224CC="$pgac_save_CC"
6225fi
6226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6227$as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6228if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6229  CFLAGS="${CFLAGS} -qlonglong"
6230fi
6231
6232
6233  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6234$as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6235if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6236  $as_echo_n "(cached) " >&6
6237else
6238  pgac_save_CXXFLAGS=$CXXFLAGS
6239pgac_save_CXX=$CXX
6240CXX=${CXX}
6241CXXFLAGS="${CXXFLAGS} -qlonglong"
6242ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6243ac_cxx_werror_flag=yes
6244ac_ext=cpp
6245ac_cpp='$CXXCPP $CPPFLAGS'
6246ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6247ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6248ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6249
6250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6251/* end confdefs.h.  */
6252
6253int
6254main ()
6255{
6256
6257  ;
6258  return 0;
6259}
6260_ACEOF
6261if ac_fn_cxx_try_compile "$LINENO"; then :
6262  pgac_cv_prog_CXX_cxxflags__qlonglong=yes
6263else
6264  pgac_cv_prog_CXX_cxxflags__qlonglong=no
6265fi
6266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6267ac_ext=c
6268ac_cpp='$CPP $CPPFLAGS'
6269ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6270ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6271ac_compiler_gnu=$ac_cv_c_compiler_gnu
6272
6273ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6274CXXFLAGS="$pgac_save_CXXFLAGS"
6275CXX="$pgac_save_CXX"
6276fi
6277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
6278$as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
6279if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
6280  CXXFLAGS="${CXXFLAGS} -qlonglong"
6281fi
6282
6283
6284elif test "$PORTNAME" = "hpux"; then
6285  # On some versions of HP-UX, libm functions do not set errno by default.
6286  # Fix that by using +Olibmerrno if the compiler recognizes it.
6287
6288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports +Olibmerrno, for CFLAGS" >&5
6289$as_echo_n "checking whether ${CC} supports +Olibmerrno, for CFLAGS... " >&6; }
6290if ${pgac_cv_prog_CC_cflags_pOlibmerrno+:} false; then :
6291  $as_echo_n "(cached) " >&6
6292else
6293  pgac_save_CFLAGS=$CFLAGS
6294pgac_save_CC=$CC
6295CC=${CC}
6296CFLAGS="${CFLAGS} +Olibmerrno"
6297ac_save_c_werror_flag=$ac_c_werror_flag
6298ac_c_werror_flag=yes
6299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6300/* end confdefs.h.  */
6301
6302int
6303main ()
6304{
6305
6306  ;
6307  return 0;
6308}
6309_ACEOF
6310if ac_fn_c_try_compile "$LINENO"; then :
6311  pgac_cv_prog_CC_cflags_pOlibmerrno=yes
6312else
6313  pgac_cv_prog_CC_cflags_pOlibmerrno=no
6314fi
6315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6316ac_c_werror_flag=$ac_save_c_werror_flag
6317CFLAGS="$pgac_save_CFLAGS"
6318CC="$pgac_save_CC"
6319fi
6320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags_pOlibmerrno" >&5
6321$as_echo "$pgac_cv_prog_CC_cflags_pOlibmerrno" >&6; }
6322if test x"$pgac_cv_prog_CC_cflags_pOlibmerrno" = x"yes"; then
6323  CFLAGS="${CFLAGS} +Olibmerrno"
6324fi
6325
6326
6327  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS" >&5
6328$as_echo_n "checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS... " >&6; }
6329if ${pgac_cv_prog_CXX_cxxflags_pOlibmerrno+:} false; then :
6330  $as_echo_n "(cached) " >&6
6331else
6332  pgac_save_CXXFLAGS=$CXXFLAGS
6333pgac_save_CXX=$CXX
6334CXX=${CXX}
6335CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6336ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6337ac_cxx_werror_flag=yes
6338ac_ext=cpp
6339ac_cpp='$CXXCPP $CPPFLAGS'
6340ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6341ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6342ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6343
6344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6345/* end confdefs.h.  */
6346
6347int
6348main ()
6349{
6350
6351  ;
6352  return 0;
6353}
6354_ACEOF
6355if ac_fn_cxx_try_compile "$LINENO"; then :
6356  pgac_cv_prog_CXX_cxxflags_pOlibmerrno=yes
6357else
6358  pgac_cv_prog_CXX_cxxflags_pOlibmerrno=no
6359fi
6360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6361ac_ext=c
6362ac_cpp='$CPP $CPPFLAGS'
6363ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6364ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6365ac_compiler_gnu=$ac_cv_c_compiler_gnu
6366
6367ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6368CXXFLAGS="$pgac_save_CXXFLAGS"
6369CXX="$pgac_save_CXX"
6370fi
6371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&5
6372$as_echo "$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&6; }
6373if test x"$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" = x"yes"; then
6374  CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6375fi
6376
6377
6378fi
6379
6380
6381
6382# Determine flags used to emit bitcode for JIT inlining. Need to test
6383# for behaviour changing compiler flags, to keep compatibility with
6384# compiler used for normal postgres code.
6385if test "$with_llvm" = yes ; then
6386  CLANGXX="$CLANG -xc++"
6387
6388  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
6389$as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
6390if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
6391  $as_echo_n "(cached) " >&6
6392else
6393  pgac_save_CFLAGS=$CFLAGS
6394pgac_save_CC=$CC
6395CC=${CLANG}
6396CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6397ac_save_c_werror_flag=$ac_c_werror_flag
6398ac_c_werror_flag=yes
6399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6400/* end confdefs.h.  */
6401
6402int
6403main ()
6404{
6405
6406  ;
6407  return 0;
6408}
6409_ACEOF
6410if ac_fn_c_try_compile "$LINENO"; then :
6411  pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
6412else
6413  pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
6414fi
6415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6416ac_c_werror_flag=$ac_save_c_werror_flag
6417CFLAGS="$pgac_save_CFLAGS"
6418CC="$pgac_save_CC"
6419fi
6420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
6421$as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
6422if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
6423  BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6424fi
6425
6426  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
6427$as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
6428if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
6429  $as_echo_n "(cached) " >&6
6430else
6431  pgac_save_CXXFLAGS=$CXXFLAGS
6432pgac_save_CXX=$CXX
6433CXX=${CLANGXX}
6434CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6435ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6436ac_cxx_werror_flag=yes
6437ac_ext=cpp
6438ac_cpp='$CXXCPP $CPPFLAGS'
6439ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6440ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6441ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6442
6443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6444/* end confdefs.h.  */
6445
6446int
6447main ()
6448{
6449
6450  ;
6451  return 0;
6452}
6453_ACEOF
6454if ac_fn_cxx_try_compile "$LINENO"; then :
6455  pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
6456else
6457  pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
6458fi
6459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6460ac_ext=c
6461ac_cpp='$CPP $CPPFLAGS'
6462ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6463ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6464ac_compiler_gnu=$ac_cv_c_compiler_gnu
6465
6466ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6467CXXFLAGS="$pgac_save_CXXFLAGS"
6468CXX="$pgac_save_CXX"
6469fi
6470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
6471$as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
6472if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6473  BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6474fi
6475
6476  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
6477$as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
6478if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
6479  $as_echo_n "(cached) " >&6
6480else
6481  pgac_save_CFLAGS=$CFLAGS
6482pgac_save_CC=$CC
6483CC=${CLANG}
6484CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6485ac_save_c_werror_flag=$ac_c_werror_flag
6486ac_c_werror_flag=yes
6487cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6488/* end confdefs.h.  */
6489
6490int
6491main ()
6492{
6493
6494  ;
6495  return 0;
6496}
6497_ACEOF
6498if ac_fn_c_try_compile "$LINENO"; then :
6499  pgac_cv_prog_CLANG_cflags__fwrapv=yes
6500else
6501  pgac_cv_prog_CLANG_cflags__fwrapv=no
6502fi
6503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6504ac_c_werror_flag=$ac_save_c_werror_flag
6505CFLAGS="$pgac_save_CFLAGS"
6506CC="$pgac_save_CC"
6507fi
6508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
6509$as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
6510if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
6511  BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6512fi
6513
6514  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
6515$as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
6516if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
6517  $as_echo_n "(cached) " >&6
6518else
6519  pgac_save_CXXFLAGS=$CXXFLAGS
6520pgac_save_CXX=$CXX
6521CXX=${CLANGXX}
6522CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6523ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6524ac_cxx_werror_flag=yes
6525ac_ext=cpp
6526ac_cpp='$CXXCPP $CPPFLAGS'
6527ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6528ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6529ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6530
6531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6532/* end confdefs.h.  */
6533
6534int
6535main ()
6536{
6537
6538  ;
6539  return 0;
6540}
6541_ACEOF
6542if ac_fn_cxx_try_compile "$LINENO"; then :
6543  pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
6544else
6545  pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
6546fi
6547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6548ac_ext=c
6549ac_cpp='$CPP $CPPFLAGS'
6550ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6551ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6552ac_compiler_gnu=$ac_cv_c_compiler_gnu
6553
6554ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6555CXXFLAGS="$pgac_save_CXXFLAGS"
6556CXX="$pgac_save_CXX"
6557fi
6558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
6559$as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
6560if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
6561  BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6562fi
6563
6564  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
6565$as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
6566if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
6567  $as_echo_n "(cached) " >&6
6568else
6569  pgac_save_CFLAGS=$CFLAGS
6570pgac_save_CC=$CC
6571CC=${CLANG}
6572CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6573ac_save_c_werror_flag=$ac_c_werror_flag
6574ac_c_werror_flag=yes
6575cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6576/* end confdefs.h.  */
6577
6578int
6579main ()
6580{
6581
6582  ;
6583  return 0;
6584}
6585_ACEOF
6586if ac_fn_c_try_compile "$LINENO"; then :
6587  pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
6588else
6589  pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
6590fi
6591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6592ac_c_werror_flag=$ac_save_c_werror_flag
6593CFLAGS="$pgac_save_CFLAGS"
6594CC="$pgac_save_CC"
6595fi
6596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
6597$as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
6598if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
6599  BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6600fi
6601
6602  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
6603$as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
6604if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
6605  $as_echo_n "(cached) " >&6
6606else
6607  pgac_save_CXXFLAGS=$CXXFLAGS
6608pgac_save_CXX=$CXX
6609CXX=${CLANGXX}
6610CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6611ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6612ac_cxx_werror_flag=yes
6613ac_ext=cpp
6614ac_cpp='$CXXCPP $CPPFLAGS'
6615ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6616ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6617ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6618
6619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6620/* end confdefs.h.  */
6621
6622int
6623main ()
6624{
6625
6626  ;
6627  return 0;
6628}
6629_ACEOF
6630if ac_fn_cxx_try_compile "$LINENO"; then :
6631  pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
6632else
6633  pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
6634fi
6635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6636ac_ext=c
6637ac_cpp='$CPP $CPPFLAGS'
6638ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6639ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6640ac_compiler_gnu=$ac_cv_c_compiler_gnu
6641
6642ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6643CXXFLAGS="$pgac_save_CXXFLAGS"
6644CXX="$pgac_save_CXX"
6645fi
6646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
6647$as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
6648if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6649  BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6650fi
6651
6652fi
6653
6654# supply -g if --enable-debug
6655if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
6656  CFLAGS="$CFLAGS -g"
6657fi
6658
6659if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
6660  CXXFLAGS="$CXXFLAGS -g"
6661fi
6662
6663# enable code coverage if --enable-coverage
6664if test "$enable_coverage" = yes; then
6665  if test "$GCC" = yes; then
6666    CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
6667    CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
6668  else
6669    as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
6670  fi
6671fi
6672
6673# enable profiling if --enable-profiling
6674if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
6675  if test "$GCC" = yes; then
6676
6677$as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
6678
6679    CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6680    CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6681  else
6682    as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
6683  fi
6684fi
6685
6686# We already have this in Makefile.win32, but configure needs it too
6687if test "$PORTNAME" = "win32"; then
6688  CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
6689fi
6690
6691# Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
6692# user-specified flags (if any) at the end.  This lets users override
6693# the automatic additions.
6694CFLAGS="$CFLAGS $user_CFLAGS"
6695CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
6696BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
6697BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
6698
6699
6700
6701
6702# The template file must set up CFLAGS_SL; we don't support user override
6703
6704
6705# Check if the compiler still works with the final flag settings
6706# (note, we're not checking that for CXX, which is optional)
6707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
6708$as_echo_n "checking whether the C compiler still works... " >&6; }
6709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6710/* end confdefs.h.  */
6711
6712int
6713main ()
6714{
6715return 0;
6716  ;
6717  return 0;
6718}
6719_ACEOF
6720if ac_fn_c_try_link "$LINENO"; then :
6721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6722$as_echo "yes" >&6; }
6723else
6724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6725$as_echo "no" >&6; }
6726   as_fn_error $? "cannot proceed" "$LINENO" 5
6727fi
6728rm -f core conftest.err conftest.$ac_objext \
6729    conftest$ac_exeext conftest.$ac_ext
6730
6731# Defend against gcc -ffast-math
6732if test "$GCC" = yes; then
6733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6734/* end confdefs.h.  */
6735
6736int
6737main ()
6738{
6739#ifdef __FAST_MATH__
6740choke me
6741#endif
6742  ;
6743  return 0;
6744}
6745_ACEOF
6746if ac_fn_c_try_compile "$LINENO"; then :
6747
6748else
6749  as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
6750fi
6751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6752fi
6753
6754# Defend against clang being used on x86-32 without SSE2 enabled.  As current
6755# versions of clang do not understand -fexcess-precision=standard, the use of
6756# x87 floating point operations leads to problems like isinf possibly returning
6757# false for a value that is infinite when converted from the 80bit register to
6758# the 8byte memory representation.
6759#
6760# Only perform the test if the compiler doesn't understand
6761# -fexcess-precision=standard, that way a potentially fixed compiler will work
6762# automatically.
6763if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
6764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6765/* end confdefs.h.  */
6766
6767int
6768main ()
6769{
6770
6771#if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
6772choke me
6773#endif
6774
6775  ;
6776  return 0;
6777}
6778_ACEOF
6779if ac_fn_c_try_compile "$LINENO"; then :
6780
6781else
6782  as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
6783fi
6784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6785fi
6786
6787ac_ext=c
6788ac_cpp='$CPP $CPPFLAGS'
6789ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6790ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6791ac_compiler_gnu=$ac_cv_c_compiler_gnu
6792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6793$as_echo_n "checking how to run the C preprocessor... " >&6; }
6794# On Suns, sometimes $CPP names a directory.
6795if test -n "$CPP" && test -d "$CPP"; then
6796  CPP=
6797fi
6798if test -z "$CPP"; then
6799  if ${ac_cv_prog_CPP+:} false; then :
6800  $as_echo_n "(cached) " >&6
6801else
6802      # Double quotes because CPP needs to be expanded
6803    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6804    do
6805      ac_preproc_ok=false
6806for ac_c_preproc_warn_flag in '' yes
6807do
6808  # Use a header file that comes with gcc, so configuring glibc
6809  # with a fresh cross-compiler works.
6810  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6811  # <limits.h> exists even on freestanding compilers.
6812  # On the NeXT, cc -E runs the code through the compiler's parser,
6813  # not just through cpp. "Syntax error" is here to catch this case.
6814  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6815/* end confdefs.h.  */
6816#ifdef __STDC__
6817# include <limits.h>
6818#else
6819# include <assert.h>
6820#endif
6821		     Syntax error
6822_ACEOF
6823if ac_fn_c_try_cpp "$LINENO"; then :
6824
6825else
6826  # Broken: fails on valid input.
6827continue
6828fi
6829rm -f conftest.err conftest.i conftest.$ac_ext
6830
6831  # OK, works on sane cases.  Now check whether nonexistent headers
6832  # can be detected and how.
6833  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6834/* end confdefs.h.  */
6835#include <ac_nonexistent.h>
6836_ACEOF
6837if ac_fn_c_try_cpp "$LINENO"; then :
6838  # Broken: success on invalid input.
6839continue
6840else
6841  # Passes both tests.
6842ac_preproc_ok=:
6843break
6844fi
6845rm -f conftest.err conftest.i conftest.$ac_ext
6846
6847done
6848# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6849rm -f conftest.i conftest.err conftest.$ac_ext
6850if $ac_preproc_ok; then :
6851  break
6852fi
6853
6854    done
6855    ac_cv_prog_CPP=$CPP
6856
6857fi
6858  CPP=$ac_cv_prog_CPP
6859else
6860  ac_cv_prog_CPP=$CPP
6861fi
6862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6863$as_echo "$CPP" >&6; }
6864ac_preproc_ok=false
6865for ac_c_preproc_warn_flag in '' yes
6866do
6867  # Use a header file that comes with gcc, so configuring glibc
6868  # with a fresh cross-compiler works.
6869  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6870  # <limits.h> exists even on freestanding compilers.
6871  # On the NeXT, cc -E runs the code through the compiler's parser,
6872  # not just through cpp. "Syntax error" is here to catch this case.
6873  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6874/* end confdefs.h.  */
6875#ifdef __STDC__
6876# include <limits.h>
6877#else
6878# include <assert.h>
6879#endif
6880		     Syntax error
6881_ACEOF
6882if ac_fn_c_try_cpp "$LINENO"; then :
6883
6884else
6885  # Broken: fails on valid input.
6886continue
6887fi
6888rm -f conftest.err conftest.i conftest.$ac_ext
6889
6890  # OK, works on sane cases.  Now check whether nonexistent headers
6891  # can be detected and how.
6892  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6893/* end confdefs.h.  */
6894#include <ac_nonexistent.h>
6895_ACEOF
6896if ac_fn_c_try_cpp "$LINENO"; then :
6897  # Broken: success on invalid input.
6898continue
6899else
6900  # Passes both tests.
6901ac_preproc_ok=:
6902break
6903fi
6904rm -f conftest.err conftest.i conftest.$ac_ext
6905
6906done
6907# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6908rm -f conftest.i conftest.err conftest.$ac_ext
6909if $ac_preproc_ok; then :
6910
6911else
6912  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6913$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6914as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
6915See \`config.log' for more details" "$LINENO" 5; }
6916fi
6917
6918ac_ext=c
6919ac_cpp='$CPP $CPPFLAGS'
6920ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6921ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6922ac_compiler_gnu=$ac_cv_c_compiler_gnu
6923
6924
6925
6926
6927#
6928# Set up TAS assembly code if needed; the template file has now had its
6929# chance to request this.
6930#
6931ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
6932
6933
6934if test "$need_tas" = yes ; then
6935  TAS=tas.o
6936else
6937  TAS=""
6938fi
6939
6940
6941#
6942# Set up pkg_config in case we need it below
6943#
6944
6945
6946
6947
6948
6949
6950
6951if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
6952	if test -n "$ac_tool_prefix"; then
6953  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
6954set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
6955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6956$as_echo_n "checking for $ac_word... " >&6; }
6957if ${ac_cv_path_PKG_CONFIG+:} false; then :
6958  $as_echo_n "(cached) " >&6
6959else
6960  case $PKG_CONFIG in
6961  [\\/]* | ?:[\\/]*)
6962  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6963  ;;
6964  *)
6965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6966for as_dir in $PATH
6967do
6968  IFS=$as_save_IFS
6969  test -z "$as_dir" && as_dir=.
6970    for ac_exec_ext in '' $ac_executable_extensions; do
6971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6972    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6974    break 2
6975  fi
6976done
6977  done
6978IFS=$as_save_IFS
6979
6980  ;;
6981esac
6982fi
6983PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6984if test -n "$PKG_CONFIG"; then
6985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
6986$as_echo "$PKG_CONFIG" >&6; }
6987else
6988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6989$as_echo "no" >&6; }
6990fi
6991
6992
6993fi
6994if test -z "$ac_cv_path_PKG_CONFIG"; then
6995  ac_pt_PKG_CONFIG=$PKG_CONFIG
6996  # Extract the first word of "pkg-config", so it can be a program name with args.
6997set dummy pkg-config; ac_word=$2
6998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6999$as_echo_n "checking for $ac_word... " >&6; }
7000if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7001  $as_echo_n "(cached) " >&6
7002else
7003  case $ac_pt_PKG_CONFIG in
7004  [\\/]* | ?:[\\/]*)
7005  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7006  ;;
7007  *)
7008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7009for as_dir in $PATH
7010do
7011  IFS=$as_save_IFS
7012  test -z "$as_dir" && as_dir=.
7013    for ac_exec_ext in '' $ac_executable_extensions; do
7014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7015    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7017    break 2
7018  fi
7019done
7020  done
7021IFS=$as_save_IFS
7022
7023  ;;
7024esac
7025fi
7026ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7027if test -n "$ac_pt_PKG_CONFIG"; then
7028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7029$as_echo "$ac_pt_PKG_CONFIG" >&6; }
7030else
7031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7032$as_echo "no" >&6; }
7033fi
7034
7035  if test "x$ac_pt_PKG_CONFIG" = x; then
7036    PKG_CONFIG=""
7037  else
7038    case $cross_compiling:$ac_tool_warned in
7039yes:)
7040{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7041$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7042ac_tool_warned=yes ;;
7043esac
7044    PKG_CONFIG=$ac_pt_PKG_CONFIG
7045  fi
7046else
7047  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7048fi
7049
7050fi
7051if test -n "$PKG_CONFIG"; then
7052	_pkg_min_version=0.9.0
7053	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7054$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7055	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7056		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7057$as_echo "yes" >&6; }
7058	else
7059		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7060$as_echo "no" >&6; }
7061		PKG_CONFIG=""
7062	fi
7063fi
7064
7065#
7066# Automatic dependency tracking
7067#
7068
7069
7070# Check whether --enable-depend was given.
7071if test "${enable_depend+set}" = set; then :
7072  enableval=$enable_depend;
7073  case $enableval in
7074    yes)
7075      autodepend=yes
7076      ;;
7077    no)
7078      :
7079      ;;
7080    *)
7081      as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
7082      ;;
7083  esac
7084
7085else
7086  enable_depend=no
7087
7088fi
7089
7090
7091
7092
7093
7094#
7095# Enable assert checks
7096#
7097
7098
7099# Check whether --enable-cassert was given.
7100if test "${enable_cassert+set}" = set; then :
7101  enableval=$enable_cassert;
7102  case $enableval in
7103    yes)
7104
7105$as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
7106
7107      ;;
7108    no)
7109      :
7110      ;;
7111    *)
7112      as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
7113      ;;
7114  esac
7115
7116else
7117  enable_cassert=no
7118
7119fi
7120
7121
7122
7123
7124#
7125# Include directories
7126#
7127ac_save_IFS=$IFS
7128IFS="${IFS}${PATH_SEPARATOR}"
7129# SRCH_INC comes from the template file
7130for dir in $with_includes $SRCH_INC; do
7131  if test -d "$dir"; then
7132    INCLUDES="$INCLUDES -I$dir"
7133  else
7134    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
7135$as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
7136  fi
7137done
7138IFS=$ac_save_IFS
7139
7140
7141
7142#
7143# Library directories
7144#
7145ac_save_IFS=$IFS
7146IFS="${IFS}${PATH_SEPARATOR}"
7147# LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
7148for dir in $LIBRARY_DIRS $SRCH_LIB; do
7149  if test -d "$dir"; then
7150    LIBDIRS="$LIBDIRS -L$dir"
7151  else
7152    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
7153$as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
7154  fi
7155done
7156IFS=$ac_save_IFS
7157
7158#
7159# Enable thread-safe client libraries
7160#
7161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
7162$as_echo_n "checking allow thread-safe client libraries... " >&6; }
7163
7164
7165# Check whether --enable-thread-safety was given.
7166if test "${enable_thread_safety+set}" = set; then :
7167  enableval=$enable_thread_safety;
7168  case $enableval in
7169    yes)
7170      :
7171      ;;
7172    no)
7173      :
7174      ;;
7175    *)
7176      as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
7177      ;;
7178  esac
7179
7180else
7181  enable_thread_safety=yes
7182
7183fi
7184
7185
7186if test "$enable_thread_safety" = yes; then
7187
7188$as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
7189
7190fi
7191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
7192$as_echo "$enable_thread_safety" >&6; }
7193
7194
7195#
7196# ICU
7197#
7198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
7199$as_echo_n "checking whether to build with ICU support... " >&6; }
7200
7201
7202
7203# Check whether --with-icu was given.
7204if test "${with_icu+set}" = set; then :
7205  withval=$with_icu;
7206  case $withval in
7207    yes)
7208
7209$as_echo "#define USE_ICU 1" >>confdefs.h
7210
7211      ;;
7212    no)
7213      :
7214      ;;
7215    *)
7216      as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
7217      ;;
7218  esac
7219
7220else
7221  with_icu=no
7222
7223fi
7224
7225
7226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
7227$as_echo "$with_icu" >&6; }
7228
7229
7230if test "$with_icu" = yes; then
7231
7232pkg_failed=no
7233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
7234$as_echo_n "checking for icu-uc icu-i18n... " >&6; }
7235
7236if test -n "$ICU_CFLAGS"; then
7237    pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
7238 elif test -n "$PKG_CONFIG"; then
7239    if test -n "$PKG_CONFIG" && \
7240    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7241  ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7242  ac_status=$?
7243  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7244  test $ac_status = 0; }; then
7245  pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
7246		      test "x$?" != "x0" && pkg_failed=yes
7247else
7248  pkg_failed=yes
7249fi
7250 else
7251    pkg_failed=untried
7252fi
7253if test -n "$ICU_LIBS"; then
7254    pkg_cv_ICU_LIBS="$ICU_LIBS"
7255 elif test -n "$PKG_CONFIG"; then
7256    if test -n "$PKG_CONFIG" && \
7257    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7258  ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7259  ac_status=$?
7260  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7261  test $ac_status = 0; }; then
7262  pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
7263		      test "x$?" != "x0" && pkg_failed=yes
7264else
7265  pkg_failed=yes
7266fi
7267 else
7268    pkg_failed=untried
7269fi
7270
7271
7272
7273if test $pkg_failed = yes; then
7274        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7275$as_echo "no" >&6; }
7276
7277if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7278        _pkg_short_errors_supported=yes
7279else
7280        _pkg_short_errors_supported=no
7281fi
7282        if test $_pkg_short_errors_supported = yes; then
7283	        ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7284        else
7285	        ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7286        fi
7287	# Put the nasty error message in config.log where it belongs
7288	echo "$ICU_PKG_ERRORS" >&5
7289
7290	as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
7291
7292$ICU_PKG_ERRORS
7293
7294Consider adjusting the PKG_CONFIG_PATH environment variable if you
7295installed software in a non-standard prefix.
7296
7297Alternatively, you may set the environment variables ICU_CFLAGS
7298and ICU_LIBS to avoid the need to call pkg-config.
7299See the pkg-config man page for more details." "$LINENO" 5
7300elif test $pkg_failed = untried; then
7301        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7302$as_echo "no" >&6; }
7303	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7304$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7305as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
7306is in your PATH or set the PKG_CONFIG environment variable to the full
7307path to pkg-config.
7308
7309Alternatively, you may set the environment variables ICU_CFLAGS
7310and ICU_LIBS to avoid the need to call pkg-config.
7311See the pkg-config man page for more details.
7312
7313To get pkg-config, see <http://pkg-config.freedesktop.org/>.
7314See \`config.log' for more details" "$LINENO" 5; }
7315else
7316	ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
7317	ICU_LIBS=$pkg_cv_ICU_LIBS
7318        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7319$as_echo "yes" >&6; }
7320
7321fi
7322fi
7323
7324#
7325# Optionally build Tcl modules (PL/Tcl)
7326#
7327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
7328$as_echo_n "checking whether to build with Tcl... " >&6; }
7329
7330
7331
7332# Check whether --with-tcl was given.
7333if test "${with_tcl+set}" = set; then :
7334  withval=$with_tcl;
7335  case $withval in
7336    yes)
7337      :
7338      ;;
7339    no)
7340      :
7341      ;;
7342    *)
7343      as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
7344      ;;
7345  esac
7346
7347else
7348  with_tcl=no
7349
7350fi
7351
7352
7353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
7354$as_echo "$with_tcl" >&6; }
7355
7356
7357# We see if the path to the Tcl/Tk configuration scripts is specified.
7358# This will override the use of tclsh to find the paths to search.
7359
7360
7361
7362
7363# Check whether --with-tclconfig was given.
7364if test "${with_tclconfig+set}" = set; then :
7365  withval=$with_tclconfig;
7366  case $withval in
7367    yes)
7368      as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7369      ;;
7370    no)
7371      as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7372      ;;
7373    *)
7374
7375      ;;
7376  esac
7377
7378fi
7379
7380
7381
7382#
7383# Optionally build Perl modules (PL/Perl)
7384#
7385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
7386$as_echo_n "checking whether to build Perl modules... " >&6; }
7387
7388
7389
7390# Check whether --with-perl was given.
7391if test "${with_perl+set}" = set; then :
7392  withval=$with_perl;
7393  case $withval in
7394    yes)
7395      :
7396      ;;
7397    no)
7398      :
7399      ;;
7400    *)
7401      as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
7402      ;;
7403  esac
7404
7405else
7406  with_perl=no
7407
7408fi
7409
7410
7411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
7412$as_echo "$with_perl" >&6; }
7413
7414
7415#
7416# Optionally build Python modules (PL/Python)
7417#
7418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
7419$as_echo_n "checking whether to build Python modules... " >&6; }
7420
7421
7422
7423# Check whether --with-python was given.
7424if test "${with_python+set}" = set; then :
7425  withval=$with_python;
7426  case $withval in
7427    yes)
7428      :
7429      ;;
7430    no)
7431      :
7432      ;;
7433    *)
7434      as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
7435      ;;
7436  esac
7437
7438else
7439  with_python=no
7440
7441fi
7442
7443
7444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
7445$as_echo "$with_python" >&6; }
7446
7447
7448#
7449# GSSAPI
7450#
7451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
7452$as_echo_n "checking whether to build with GSSAPI support... " >&6; }
7453
7454
7455
7456# Check whether --with-gssapi was given.
7457if test "${with_gssapi+set}" = set; then :
7458  withval=$with_gssapi;
7459  case $withval in
7460    yes)
7461
7462
7463$as_echo "#define ENABLE_GSS 1" >>confdefs.h
7464
7465  krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
7466
7467      ;;
7468    no)
7469      :
7470      ;;
7471    *)
7472      as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
7473      ;;
7474  esac
7475
7476else
7477  with_gssapi=no
7478
7479fi
7480
7481
7482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
7483$as_echo "$with_gssapi" >&6; }
7484
7485
7486
7487
7488
7489
7490#
7491# Kerberos configuration parameters
7492#
7493
7494
7495
7496# Check whether --with-krb-srvnam was given.
7497if test "${with_krb_srvnam+set}" = set; then :
7498  withval=$with_krb_srvnam;
7499  case $withval in
7500    yes)
7501      as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7502      ;;
7503    no)
7504      as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7505      ;;
7506    *)
7507
7508      ;;
7509  esac
7510
7511else
7512  with_krb_srvnam="postgres"
7513fi
7514
7515
7516
7517
7518cat >>confdefs.h <<_ACEOF
7519#define PG_KRB_SRVNAM "$with_krb_srvnam"
7520_ACEOF
7521
7522
7523
7524#
7525# PAM
7526#
7527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
7528$as_echo_n "checking whether to build with PAM support... " >&6; }
7529
7530
7531
7532# Check whether --with-pam was given.
7533if test "${with_pam+set}" = set; then :
7534  withval=$with_pam;
7535  case $withval in
7536    yes)
7537
7538$as_echo "#define USE_PAM 1" >>confdefs.h
7539
7540      ;;
7541    no)
7542      :
7543      ;;
7544    *)
7545      as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
7546      ;;
7547  esac
7548
7549else
7550  with_pam=no
7551
7552fi
7553
7554
7555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
7556$as_echo "$with_pam" >&6; }
7557
7558
7559#
7560# BSD AUTH
7561#
7562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
7563$as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
7564
7565
7566
7567# Check whether --with-bsd-auth was given.
7568if test "${with_bsd_auth+set}" = set; then :
7569  withval=$with_bsd_auth;
7570  case $withval in
7571    yes)
7572
7573$as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
7574
7575      ;;
7576    no)
7577      :
7578      ;;
7579    *)
7580      as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
7581      ;;
7582  esac
7583
7584else
7585  with_bsd_auth=no
7586
7587fi
7588
7589
7590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
7591$as_echo "$with_bsd_auth" >&6; }
7592
7593
7594#
7595# LDAP
7596#
7597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
7598$as_echo_n "checking whether to build with LDAP support... " >&6; }
7599
7600
7601
7602# Check whether --with-ldap was given.
7603if test "${with_ldap+set}" = set; then :
7604  withval=$with_ldap;
7605  case $withval in
7606    yes)
7607
7608$as_echo "#define USE_LDAP 1" >>confdefs.h
7609
7610      ;;
7611    no)
7612      :
7613      ;;
7614    *)
7615      as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
7616      ;;
7617  esac
7618
7619else
7620  with_ldap=no
7621
7622fi
7623
7624
7625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
7626$as_echo "$with_ldap" >&6; }
7627
7628
7629
7630#
7631# Bonjour
7632#
7633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
7634$as_echo_n "checking whether to build with Bonjour support... " >&6; }
7635
7636
7637
7638# Check whether --with-bonjour was given.
7639if test "${with_bonjour+set}" = set; then :
7640  withval=$with_bonjour;
7641  case $withval in
7642    yes)
7643
7644$as_echo "#define USE_BONJOUR 1" >>confdefs.h
7645
7646      ;;
7647    no)
7648      :
7649      ;;
7650    *)
7651      as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
7652      ;;
7653  esac
7654
7655else
7656  with_bonjour=no
7657
7658fi
7659
7660
7661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
7662$as_echo "$with_bonjour" >&6; }
7663
7664
7665#
7666# OpenSSL
7667#
7668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
7669$as_echo_n "checking whether to build with OpenSSL support... " >&6; }
7670
7671
7672
7673# Check whether --with-openssl was given.
7674if test "${with_openssl+set}" = set; then :
7675  withval=$with_openssl;
7676  case $withval in
7677    yes)
7678
7679$as_echo "#define USE_OPENSSL 1" >>confdefs.h
7680
7681      ;;
7682    no)
7683      :
7684      ;;
7685    *)
7686      as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
7687      ;;
7688  esac
7689
7690else
7691  with_openssl=no
7692
7693fi
7694
7695
7696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
7697$as_echo "$with_openssl" >&6; }
7698
7699
7700#
7701# SELinux
7702#
7703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
7704$as_echo_n "checking whether to build with SELinux support... " >&6; }
7705
7706
7707
7708# Check whether --with-selinux was given.
7709if test "${with_selinux+set}" = set; then :
7710  withval=$with_selinux;
7711  case $withval in
7712    yes)
7713      :
7714      ;;
7715    no)
7716      :
7717      ;;
7718    *)
7719      as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
7720      ;;
7721  esac
7722
7723else
7724  with_selinux=no
7725
7726fi
7727
7728
7729
7730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
7731$as_echo "$with_selinux" >&6; }
7732
7733#
7734# Systemd
7735#
7736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
7737$as_echo_n "checking whether to build with systemd support... " >&6; }
7738
7739
7740
7741# Check whether --with-systemd was given.
7742if test "${with_systemd+set}" = set; then :
7743  withval=$with_systemd;
7744  case $withval in
7745    yes)
7746
7747$as_echo "#define USE_SYSTEMD 1" >>confdefs.h
7748
7749      ;;
7750    no)
7751      :
7752      ;;
7753    *)
7754      as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
7755      ;;
7756  esac
7757
7758else
7759  with_systemd=no
7760
7761fi
7762
7763
7764
7765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
7766$as_echo "$with_systemd" >&6; }
7767
7768#
7769# Readline
7770#
7771
7772
7773
7774# Check whether --with-readline was given.
7775if test "${with_readline+set}" = set; then :
7776  withval=$with_readline;
7777  case $withval in
7778    yes)
7779      :
7780      ;;
7781    no)
7782      :
7783      ;;
7784    *)
7785      as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
7786      ;;
7787  esac
7788
7789else
7790  with_readline=yes
7791
7792fi
7793
7794
7795# readline on MinGW has problems with backslashes in psql and other bugs.
7796# This is particularly a problem with non-US code pages.
7797# Therefore disable its use until we understand the cause. 2004-07-20
7798if test "$PORTNAME" = "win32"; then
7799  if test "$with_readline" = yes; then
7800    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
7801$as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
7802    with_readline=no
7803  fi
7804fi
7805
7806
7807#
7808# Prefer libedit
7809#
7810
7811
7812
7813# Check whether --with-libedit-preferred was given.
7814if test "${with_libedit_preferred+set}" = set; then :
7815  withval=$with_libedit_preferred;
7816  case $withval in
7817    yes)
7818      :
7819      ;;
7820    no)
7821      :
7822      ;;
7823    *)
7824      as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
7825      ;;
7826  esac
7827
7828else
7829  with_libedit_preferred=no
7830
7831fi
7832
7833
7834
7835
7836#
7837# UUID library
7838#
7839# There are at least three UUID libraries in common use: the FreeBSD/NetBSD
7840# library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
7841# UUID library.  More than one of these might be present on a given platform,
7842# so we make the user say which one she wants.
7843#
7844
7845
7846
7847# Check whether --with-uuid was given.
7848if test "${with_uuid+set}" = set; then :
7849  withval=$with_uuid;
7850  case $withval in
7851    yes)
7852      as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
7853      ;;
7854    no)
7855      as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
7856      ;;
7857    *)
7858
7859      ;;
7860  esac
7861
7862fi
7863
7864
7865if test x"$with_uuid" = x"" ; then
7866  with_uuid=no
7867fi
7868
7869
7870
7871# Check whether --with-ossp-uuid was given.
7872if test "${with_ossp_uuid+set}" = set; then :
7873  withval=$with_ossp_uuid;
7874  case $withval in
7875    yes)
7876      :
7877      ;;
7878    no)
7879      :
7880      ;;
7881    *)
7882      as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
7883      ;;
7884  esac
7885
7886else
7887  with_ossp_uuid=no
7888
7889fi
7890
7891
7892if test "$with_ossp_uuid" = yes ; then
7893  with_uuid=ossp
7894fi
7895
7896if test "$with_uuid" = bsd ; then
7897
7898$as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
7899
7900  UUID_EXTRA_OBJS="md5.o sha1.o"
7901elif test "$with_uuid" = e2fs ; then
7902
7903$as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
7904
7905  UUID_EXTRA_OBJS="md5.o sha1.o"
7906elif test "$with_uuid" = ossp ; then
7907
7908$as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
7909
7910  UUID_EXTRA_OBJS=""
7911elif test "$with_uuid" = no ; then
7912  UUID_EXTRA_OBJS=""
7913else
7914  as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
7915fi
7916
7917
7918
7919
7920#
7921# XML
7922#
7923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with XML support" >&5
7924$as_echo_n "checking whether to build with XML support... " >&6; }
7925
7926
7927
7928# Check whether --with-libxml was given.
7929if test "${with_libxml+set}" = set; then :
7930  withval=$with_libxml;
7931  case $withval in
7932    yes)
7933
7934$as_echo "#define USE_LIBXML 1" >>confdefs.h
7935
7936      ;;
7937    no)
7938      :
7939      ;;
7940    *)
7941      as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
7942      ;;
7943  esac
7944
7945else
7946  with_libxml=no
7947
7948fi
7949
7950
7951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libxml" >&5
7952$as_echo "$with_libxml" >&6; }
7953
7954
7955if test "$with_libxml" = yes ; then
7956  # Check pkg-config, then xml2-config.  But for backwards compatibility,
7957  # setting XML2_CONFIG overrides pkg-config.
7958    have_libxml2_pkg_config=no
7959  if test -z "$XML2_CONFIG" -a -n "$PKG_CONFIG"; then
7960
7961pkg_failed=no
7962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.6.23" >&5
7963$as_echo_n "checking for libxml-2.0 >= 2.6.23... " >&6; }
7964
7965if test -n "$XML2_CFLAGS"; then
7966    pkg_cv_XML2_CFLAGS="$XML2_CFLAGS"
7967 elif test -n "$PKG_CONFIG"; then
7968    if test -n "$PKG_CONFIG" && \
7969    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
7970  ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
7971  ac_status=$?
7972  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7973  test $ac_status = 0; }; then
7974  pkg_cv_XML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.6.23" 2>/dev/null`
7975		      test "x$?" != "x0" && pkg_failed=yes
7976else
7977  pkg_failed=yes
7978fi
7979 else
7980    pkg_failed=untried
7981fi
7982if test -n "$XML2_LIBS"; then
7983    pkg_cv_XML2_LIBS="$XML2_LIBS"
7984 elif test -n "$PKG_CONFIG"; then
7985    if test -n "$PKG_CONFIG" && \
7986    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
7987  ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
7988  ac_status=$?
7989  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7990  test $ac_status = 0; }; then
7991  pkg_cv_XML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.6.23" 2>/dev/null`
7992		      test "x$?" != "x0" && pkg_failed=yes
7993else
7994  pkg_failed=yes
7995fi
7996 else
7997    pkg_failed=untried
7998fi
7999
8000
8001
8002if test $pkg_failed = yes; then
8003        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8004$as_echo "no" >&6; }
8005
8006if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8007        _pkg_short_errors_supported=yes
8008else
8009        _pkg_short_errors_supported=no
8010fi
8011        if test $_pkg_short_errors_supported = yes; then
8012	        XML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8013        else
8014	        XML2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8015        fi
8016	# Put the nasty error message in config.log where it belongs
8017	echo "$XML2_PKG_ERRORS" >&5
8018
8019	# do nothing
8020elif test $pkg_failed = untried; then
8021        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8022$as_echo "no" >&6; }
8023	# do nothing
8024else
8025	XML2_CFLAGS=$pkg_cv_XML2_CFLAGS
8026	XML2_LIBS=$pkg_cv_XML2_LIBS
8027        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8028$as_echo "yes" >&6; }
8029	have_libxml2_pkg_config=yes
8030fi
8031  fi
8032  if test "$have_libxml2_pkg_config" = no ; then
8033    if test -z "$XML2_CONFIG"; then
8034  for ac_prog in xml2-config
8035do
8036  # Extract the first word of "$ac_prog", so it can be a program name with args.
8037set dummy $ac_prog; ac_word=$2
8038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8039$as_echo_n "checking for $ac_word... " >&6; }
8040if ${ac_cv_path_XML2_CONFIG+:} false; then :
8041  $as_echo_n "(cached) " >&6
8042else
8043  case $XML2_CONFIG in
8044  [\\/]* | ?:[\\/]*)
8045  ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
8046  ;;
8047  *)
8048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8049for as_dir in $PATH
8050do
8051  IFS=$as_save_IFS
8052  test -z "$as_dir" && as_dir=.
8053    for ac_exec_ext in '' $ac_executable_extensions; do
8054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8055    ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8057    break 2
8058  fi
8059done
8060  done
8061IFS=$as_save_IFS
8062
8063  ;;
8064esac
8065fi
8066XML2_CONFIG=$ac_cv_path_XML2_CONFIG
8067if test -n "$XML2_CONFIG"; then
8068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8069$as_echo "$XML2_CONFIG" >&6; }
8070else
8071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8072$as_echo "no" >&6; }
8073fi
8074
8075
8076  test -n "$XML2_CONFIG" && break
8077done
8078
8079else
8080  # Report the value of XML2_CONFIG in configure's output in all cases.
8081  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
8082$as_echo_n "checking for XML2_CONFIG... " >&6; }
8083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8084$as_echo "$XML2_CONFIG" >&6; }
8085fi
8086
8087    if test -n "$XML2_CONFIG"; then
8088      XML2_CFLAGS=`$XML2_CONFIG --cflags`
8089      XML2_LIBS=`$XML2_CONFIG --libs`
8090    fi
8091  fi
8092  # Note the user could also set XML2_CFLAGS/XML2_LIBS directly
8093  for pgac_option in $XML2_CFLAGS; do
8094    case $pgac_option in
8095      -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8096    esac
8097  done
8098  for pgac_option in $XML2_LIBS; do
8099    case $pgac_option in
8100      -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8101    esac
8102  done
8103fi
8104
8105
8106#
8107# XSLT
8108#
8109
8110
8111
8112# Check whether --with-libxslt was given.
8113if test "${with_libxslt+set}" = set; then :
8114  withval=$with_libxslt;
8115  case $withval in
8116    yes)
8117
8118$as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8119
8120      ;;
8121    no)
8122      :
8123      ;;
8124    *)
8125      as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8126      ;;
8127  esac
8128
8129else
8130  with_libxslt=no
8131
8132fi
8133
8134
8135
8136
8137
8138
8139#
8140# tzdata
8141#
8142
8143
8144
8145# Check whether --with-system-tzdata was given.
8146if test "${with_system_tzdata+set}" = set; then :
8147  withval=$with_system_tzdata;
8148  case $withval in
8149    yes)
8150      as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8151      ;;
8152    no)
8153      as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8154      ;;
8155    *)
8156
8157      ;;
8158  esac
8159
8160fi
8161
8162
8163
8164
8165#
8166# Zlib
8167#
8168
8169
8170
8171# Check whether --with-zlib was given.
8172if test "${with_zlib+set}" = set; then :
8173  withval=$with_zlib;
8174  case $withval in
8175    yes)
8176      :
8177      ;;
8178    no)
8179      :
8180      ;;
8181    *)
8182      as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
8183      ;;
8184  esac
8185
8186else
8187  with_zlib=yes
8188
8189fi
8190
8191
8192
8193
8194#
8195# Elf
8196#
8197
8198# Assume system is ELF if it predefines __ELF__ as 1,
8199# otherwise believe host_os based default.
8200case $host_os in
8201    freebsd1*|freebsd2*) elf=no;;
8202    freebsd3*|freebsd4*) elf=yes;;
8203esac
8204
8205
8206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
8207$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
8208if ${ac_cv_path_GREP+:} false; then :
8209  $as_echo_n "(cached) " >&6
8210else
8211  if test -z "$GREP"; then
8212  ac_path_GREP_found=false
8213  # Loop through the user's path and test for each of PROGNAME-LIST
8214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8215for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8216do
8217  IFS=$as_save_IFS
8218  test -z "$as_dir" && as_dir=.
8219    for ac_prog in grep ggrep; do
8220    for ac_exec_ext in '' $ac_executable_extensions; do
8221      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
8222      as_fn_executable_p "$ac_path_GREP" || continue
8223# Check for GNU ac_path_GREP and select it if it is found.
8224  # Check for GNU $ac_path_GREP
8225case `"$ac_path_GREP" --version 2>&1` in
8226*GNU*)
8227  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
8228*)
8229  ac_count=0
8230  $as_echo_n 0123456789 >"conftest.in"
8231  while :
8232  do
8233    cat "conftest.in" "conftest.in" >"conftest.tmp"
8234    mv "conftest.tmp" "conftest.in"
8235    cp "conftest.in" "conftest.nl"
8236    $as_echo 'GREP' >> "conftest.nl"
8237    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8238    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8239    as_fn_arith $ac_count + 1 && ac_count=$as_val
8240    if test $ac_count -gt ${ac_path_GREP_max-0}; then
8241      # Best one so far, save it but keep looking for a better one
8242      ac_cv_path_GREP="$ac_path_GREP"
8243      ac_path_GREP_max=$ac_count
8244    fi
8245    # 10*(2^10) chars as input seems more than enough
8246    test $ac_count -gt 10 && break
8247  done
8248  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8249esac
8250
8251      $ac_path_GREP_found && break 3
8252    done
8253  done
8254  done
8255IFS=$as_save_IFS
8256  if test -z "$ac_cv_path_GREP"; then
8257    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8258  fi
8259else
8260  ac_cv_path_GREP=$GREP
8261fi
8262
8263fi
8264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
8265$as_echo "$ac_cv_path_GREP" >&6; }
8266 GREP="$ac_cv_path_GREP"
8267
8268
8269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
8270$as_echo_n "checking for egrep... " >&6; }
8271if ${ac_cv_path_EGREP+:} false; then :
8272  $as_echo_n "(cached) " >&6
8273else
8274  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
8275   then ac_cv_path_EGREP="$GREP -E"
8276   else
8277     if test -z "$EGREP"; then
8278  ac_path_EGREP_found=false
8279  # Loop through the user's path and test for each of PROGNAME-LIST
8280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8281for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8282do
8283  IFS=$as_save_IFS
8284  test -z "$as_dir" && as_dir=.
8285    for ac_prog in egrep; do
8286    for ac_exec_ext in '' $ac_executable_extensions; do
8287      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
8288      as_fn_executable_p "$ac_path_EGREP" || continue
8289# Check for GNU ac_path_EGREP and select it if it is found.
8290  # Check for GNU $ac_path_EGREP
8291case `"$ac_path_EGREP" --version 2>&1` in
8292*GNU*)
8293  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
8294*)
8295  ac_count=0
8296  $as_echo_n 0123456789 >"conftest.in"
8297  while :
8298  do
8299    cat "conftest.in" "conftest.in" >"conftest.tmp"
8300    mv "conftest.tmp" "conftest.in"
8301    cp "conftest.in" "conftest.nl"
8302    $as_echo 'EGREP' >> "conftest.nl"
8303    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8304    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8305    as_fn_arith $ac_count + 1 && ac_count=$as_val
8306    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
8307      # Best one so far, save it but keep looking for a better one
8308      ac_cv_path_EGREP="$ac_path_EGREP"
8309      ac_path_EGREP_max=$ac_count
8310    fi
8311    # 10*(2^10) chars as input seems more than enough
8312    test $ac_count -gt 10 && break
8313  done
8314  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8315esac
8316
8317      $ac_path_EGREP_found && break 3
8318    done
8319  done
8320  done
8321IFS=$as_save_IFS
8322  if test -z "$ac_cv_path_EGREP"; then
8323    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8324  fi
8325else
8326  ac_cv_path_EGREP=$EGREP
8327fi
8328
8329   fi
8330fi
8331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
8332$as_echo "$ac_cv_path_EGREP" >&6; }
8333 EGREP="$ac_cv_path_EGREP"
8334
8335
8336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8337/* end confdefs.h.  */
8338#if __ELF__
8339  yes
8340#endif
8341
8342_ACEOF
8343if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8344  $EGREP "yes" >/dev/null 2>&1; then :
8345  ELF_SYS=true
8346else
8347  if test "X$elf" = "Xyes" ; then
8348  ELF_SYS=true
8349else
8350  ELF_SYS=
8351fi
8352fi
8353rm -f conftest*
8354
8355
8356
8357#
8358# Assignments
8359#
8360
8361CPPFLAGS="$CPPFLAGS $INCLUDES"
8362LDFLAGS="$LDFLAGS $LIBDIRS"
8363
8364
8365
8366
8367
8368# Check whether --with-gnu-ld was given.
8369if test "${with_gnu_ld+set}" = set; then :
8370  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8371else
8372  with_gnu_ld=no
8373fi
8374
8375ac_prog=ld
8376if test "$GCC" = yes; then
8377  # Check if gcc -print-prog-name=ld gives a path.
8378  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8379$as_echo_n "checking for ld used by GCC... " >&6; }
8380  case $host in
8381  *-*-mingw*)
8382    # gcc leaves a trailing carriage return which upsets mingw
8383    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8384  *)
8385    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8386  esac
8387  case "$ac_prog" in
8388    # Accept absolute paths.
8389    [\\/]* | [A-Za-z]:[\\/]*)
8390      re_direlt='/[^/][^/]*/\.\./'
8391      # Canonicalize the path of ld
8392      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8393      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8394	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8395      done
8396      test -z "$LD" && LD="$ac_prog"
8397      ;;
8398  "")
8399    # If it fails, then pretend we aren't using GCC.
8400    ac_prog=ld
8401    ;;
8402  *)
8403    # If it is relative, then search for the first ld in PATH.
8404    with_gnu_ld=unknown
8405    ;;
8406  esac
8407elif test "$with_gnu_ld" = yes; then
8408  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8409$as_echo_n "checking for GNU ld... " >&6; }
8410else
8411  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8412$as_echo_n "checking for non-GNU ld... " >&6; }
8413fi
8414if ${ac_cv_path_LD+:} false; then :
8415  $as_echo_n "(cached) " >&6
8416else
8417  if test -z "$LD"; then
8418  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8419  for ac_dir in $PATH; do
8420    test -z "$ac_dir" && ac_dir=.
8421    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8422      ac_cv_path_LD="$ac_dir/$ac_prog"
8423      # Check to see if the program is GNU ld.  I'd rather use --version,
8424      # but apparently some GNU ld's only accept -v.
8425      # Break only if it was the GNU/non-GNU ld that we prefer.
8426      if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8427	test "$with_gnu_ld" != no && break
8428      else
8429	test "$with_gnu_ld" != yes && break
8430      fi
8431    fi
8432  done
8433  IFS="$ac_save_ifs"
8434else
8435  ac_cv_path_LD="$LD" # Let the user override the test with a path.
8436fi
8437fi
8438
8439LD="$ac_cv_path_LD"
8440if test -n "$LD"; then
8441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8442$as_echo "$LD" >&6; }
8443else
8444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8445$as_echo "no" >&6; }
8446fi
8447test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8449$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8450if ${ac_cv_prog_gnu_ld+:} false; then :
8451  $as_echo_n "(cached) " >&6
8452else
8453  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8454if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8455  ac_cv_prog_gnu_ld=yes
8456else
8457  ac_cv_prog_gnu_ld=no
8458fi
8459fi
8460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
8461$as_echo "$ac_cv_prog_gnu_ld" >&6; }
8462with_gnu_ld=$ac_cv_prog_gnu_ld
8463
8464
8465
8466
8467if test -n "$ac_tool_prefix"; then
8468  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8469set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8471$as_echo_n "checking for $ac_word... " >&6; }
8472if ${ac_cv_prog_RANLIB+:} false; then :
8473  $as_echo_n "(cached) " >&6
8474else
8475  if test -n "$RANLIB"; then
8476  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8477else
8478as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8479for as_dir in $PATH
8480do
8481  IFS=$as_save_IFS
8482  test -z "$as_dir" && as_dir=.
8483    for ac_exec_ext in '' $ac_executable_extensions; do
8484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8485    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8487    break 2
8488  fi
8489done
8490  done
8491IFS=$as_save_IFS
8492
8493fi
8494fi
8495RANLIB=$ac_cv_prog_RANLIB
8496if test -n "$RANLIB"; then
8497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8498$as_echo "$RANLIB" >&6; }
8499else
8500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8501$as_echo "no" >&6; }
8502fi
8503
8504
8505fi
8506if test -z "$ac_cv_prog_RANLIB"; then
8507  ac_ct_RANLIB=$RANLIB
8508  # Extract the first word of "ranlib", so it can be a program name with args.
8509set dummy ranlib; ac_word=$2
8510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8511$as_echo_n "checking for $ac_word... " >&6; }
8512if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8513  $as_echo_n "(cached) " >&6
8514else
8515  if test -n "$ac_ct_RANLIB"; then
8516  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8517else
8518as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8519for as_dir in $PATH
8520do
8521  IFS=$as_save_IFS
8522  test -z "$as_dir" && as_dir=.
8523    for ac_exec_ext in '' $ac_executable_extensions; do
8524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8525    ac_cv_prog_ac_ct_RANLIB="ranlib"
8526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8527    break 2
8528  fi
8529done
8530  done
8531IFS=$as_save_IFS
8532
8533fi
8534fi
8535ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8536if test -n "$ac_ct_RANLIB"; then
8537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8538$as_echo "$ac_ct_RANLIB" >&6; }
8539else
8540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8541$as_echo "no" >&6; }
8542fi
8543
8544  if test "x$ac_ct_RANLIB" = x; then
8545    RANLIB=":"
8546  else
8547    case $cross_compiling:$ac_tool_warned in
8548yes:)
8549{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8550$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8551ac_tool_warned=yes ;;
8552esac
8553    RANLIB=$ac_ct_RANLIB
8554  fi
8555else
8556  RANLIB="$ac_cv_prog_RANLIB"
8557fi
8558
8559
8560  if test -n "$ac_tool_prefix"; then
8561  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8562set dummy ${ac_tool_prefix}strip; ac_word=$2
8563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8564$as_echo_n "checking for $ac_word... " >&6; }
8565if ${ac_cv_prog_STRIP+:} false; then :
8566  $as_echo_n "(cached) " >&6
8567else
8568  if test -n "$STRIP"; then
8569  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8570else
8571as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8572for as_dir in $PATH
8573do
8574  IFS=$as_save_IFS
8575  test -z "$as_dir" && as_dir=.
8576    for ac_exec_ext in '' $ac_executable_extensions; do
8577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8578    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8580    break 2
8581  fi
8582done
8583  done
8584IFS=$as_save_IFS
8585
8586fi
8587fi
8588STRIP=$ac_cv_prog_STRIP
8589if test -n "$STRIP"; then
8590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8591$as_echo "$STRIP" >&6; }
8592else
8593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8594$as_echo "no" >&6; }
8595fi
8596
8597
8598fi
8599if test -z "$ac_cv_prog_STRIP"; then
8600  ac_ct_STRIP=$STRIP
8601  # Extract the first word of "strip", so it can be a program name with args.
8602set dummy strip; ac_word=$2
8603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8604$as_echo_n "checking for $ac_word... " >&6; }
8605if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8606  $as_echo_n "(cached) " >&6
8607else
8608  if test -n "$ac_ct_STRIP"; then
8609  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8610else
8611as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8612for as_dir in $PATH
8613do
8614  IFS=$as_save_IFS
8615  test -z "$as_dir" && as_dir=.
8616    for ac_exec_ext in '' $ac_executable_extensions; do
8617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8618    ac_cv_prog_ac_ct_STRIP="strip"
8619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8620    break 2
8621  fi
8622done
8623  done
8624IFS=$as_save_IFS
8625
8626fi
8627fi
8628ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8629if test -n "$ac_ct_STRIP"; then
8630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8631$as_echo "$ac_ct_STRIP" >&6; }
8632else
8633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8634$as_echo "no" >&6; }
8635fi
8636
8637  if test "x$ac_ct_STRIP" = x; then
8638    STRIP=":"
8639  else
8640    case $cross_compiling:$ac_tool_warned in
8641yes:)
8642{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8643$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8644ac_tool_warned=yes ;;
8645esac
8646    STRIP=$ac_ct_STRIP
8647  fi
8648else
8649  STRIP="$ac_cv_prog_STRIP"
8650fi
8651
8652
8653  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
8654$as_echo_n "checking whether it is possible to strip libraries... " >&6; }
8655  if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
8656    STRIP_STATIC_LIB="$STRIP -x"
8657    STRIP_SHARED_LIB="$STRIP --strip-unneeded"
8658    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8659$as_echo "yes" >&6; }
8660  else
8661    case $host_os in
8662      darwin*)
8663        STRIP="$STRIP -x"
8664        STRIP_STATIC_LIB=$STRIP
8665        STRIP_SHARED_LIB=$STRIP
8666        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8667$as_echo "yes" >&6; }
8668        ;;
8669      *)
8670        STRIP_STATIC_LIB=:
8671        STRIP_SHARED_LIB=:
8672        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8673$as_echo "no" >&6; }
8674        ;;
8675    esac
8676  fi
8677
8678
8679
8680if test -n "$ac_tool_prefix"; then
8681  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8682set dummy ${ac_tool_prefix}ar; ac_word=$2
8683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8684$as_echo_n "checking for $ac_word... " >&6; }
8685if ${ac_cv_prog_AR+:} false; then :
8686  $as_echo_n "(cached) " >&6
8687else
8688  if test -n "$AR"; then
8689  ac_cv_prog_AR="$AR" # Let the user override the test.
8690else
8691as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8692for as_dir in $PATH
8693do
8694  IFS=$as_save_IFS
8695  test -z "$as_dir" && as_dir=.
8696    for ac_exec_ext in '' $ac_executable_extensions; do
8697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8698    ac_cv_prog_AR="${ac_tool_prefix}ar"
8699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8700    break 2
8701  fi
8702done
8703  done
8704IFS=$as_save_IFS
8705
8706fi
8707fi
8708AR=$ac_cv_prog_AR
8709if test -n "$AR"; then
8710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8711$as_echo "$AR" >&6; }
8712else
8713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8714$as_echo "no" >&6; }
8715fi
8716
8717
8718fi
8719if test -z "$ac_cv_prog_AR"; then
8720  ac_ct_AR=$AR
8721  # Extract the first word of "ar", so it can be a program name with args.
8722set dummy ar; ac_word=$2
8723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8724$as_echo_n "checking for $ac_word... " >&6; }
8725if ${ac_cv_prog_ac_ct_AR+:} false; then :
8726  $as_echo_n "(cached) " >&6
8727else
8728  if test -n "$ac_ct_AR"; then
8729  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8730else
8731as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8732for as_dir in $PATH
8733do
8734  IFS=$as_save_IFS
8735  test -z "$as_dir" && as_dir=.
8736    for ac_exec_ext in '' $ac_executable_extensions; do
8737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8738    ac_cv_prog_ac_ct_AR="ar"
8739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8740    break 2
8741  fi
8742done
8743  done
8744IFS=$as_save_IFS
8745
8746fi
8747fi
8748ac_ct_AR=$ac_cv_prog_ac_ct_AR
8749if test -n "$ac_ct_AR"; then
8750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8751$as_echo "$ac_ct_AR" >&6; }
8752else
8753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8754$as_echo "no" >&6; }
8755fi
8756
8757  if test "x$ac_ct_AR" = x; then
8758    AR="ar"
8759  else
8760    case $cross_compiling:$ac_tool_warned in
8761yes:)
8762{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8763$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8764ac_tool_warned=yes ;;
8765esac
8766    AR=$ac_ct_AR
8767  fi
8768else
8769  AR="$ac_cv_prog_AR"
8770fi
8771
8772if test "$PORTNAME" = "win32"; then
8773  if test -n "$ac_tool_prefix"; then
8774  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8775set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8777$as_echo_n "checking for $ac_word... " >&6; }
8778if ${ac_cv_prog_DLLTOOL+:} false; then :
8779  $as_echo_n "(cached) " >&6
8780else
8781  if test -n "$DLLTOOL"; then
8782  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8783else
8784as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8785for as_dir in $PATH
8786do
8787  IFS=$as_save_IFS
8788  test -z "$as_dir" && as_dir=.
8789    for ac_exec_ext in '' $ac_executable_extensions; do
8790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8791    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8793    break 2
8794  fi
8795done
8796  done
8797IFS=$as_save_IFS
8798
8799fi
8800fi
8801DLLTOOL=$ac_cv_prog_DLLTOOL
8802if test -n "$DLLTOOL"; then
8803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8804$as_echo "$DLLTOOL" >&6; }
8805else
8806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8807$as_echo "no" >&6; }
8808fi
8809
8810
8811fi
8812if test -z "$ac_cv_prog_DLLTOOL"; then
8813  ac_ct_DLLTOOL=$DLLTOOL
8814  # Extract the first word of "dlltool", so it can be a program name with args.
8815set dummy dlltool; ac_word=$2
8816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8817$as_echo_n "checking for $ac_word... " >&6; }
8818if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
8819  $as_echo_n "(cached) " >&6
8820else
8821  if test -n "$ac_ct_DLLTOOL"; then
8822  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8823else
8824as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8825for as_dir in $PATH
8826do
8827  IFS=$as_save_IFS
8828  test -z "$as_dir" && as_dir=.
8829    for ac_exec_ext in '' $ac_executable_extensions; do
8830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8831    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8833    break 2
8834  fi
8835done
8836  done
8837IFS=$as_save_IFS
8838
8839fi
8840fi
8841ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8842if test -n "$ac_ct_DLLTOOL"; then
8843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8844$as_echo "$ac_ct_DLLTOOL" >&6; }
8845else
8846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8847$as_echo "no" >&6; }
8848fi
8849
8850  if test "x$ac_ct_DLLTOOL" = x; then
8851    DLLTOOL="dlltool"
8852  else
8853    case $cross_compiling:$ac_tool_warned in
8854yes:)
8855{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8856$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8857ac_tool_warned=yes ;;
8858esac
8859    DLLTOOL=$ac_ct_DLLTOOL
8860  fi
8861else
8862  DLLTOOL="$ac_cv_prog_DLLTOOL"
8863fi
8864
8865  if test -n "$ac_tool_prefix"; then
8866  # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
8867set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
8868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8869$as_echo_n "checking for $ac_word... " >&6; }
8870if ${ac_cv_prog_DLLWRAP+:} false; then :
8871  $as_echo_n "(cached) " >&6
8872else
8873  if test -n "$DLLWRAP"; then
8874  ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
8875else
8876as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8877for as_dir in $PATH
8878do
8879  IFS=$as_save_IFS
8880  test -z "$as_dir" && as_dir=.
8881    for ac_exec_ext in '' $ac_executable_extensions; do
8882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8883    ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
8884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8885    break 2
8886  fi
8887done
8888  done
8889IFS=$as_save_IFS
8890
8891fi
8892fi
8893DLLWRAP=$ac_cv_prog_DLLWRAP
8894if test -n "$DLLWRAP"; then
8895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
8896$as_echo "$DLLWRAP" >&6; }
8897else
8898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8899$as_echo "no" >&6; }
8900fi
8901
8902
8903fi
8904if test -z "$ac_cv_prog_DLLWRAP"; then
8905  ac_ct_DLLWRAP=$DLLWRAP
8906  # Extract the first word of "dllwrap", so it can be a program name with args.
8907set dummy dllwrap; ac_word=$2
8908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8909$as_echo_n "checking for $ac_word... " >&6; }
8910if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
8911  $as_echo_n "(cached) " >&6
8912else
8913  if test -n "$ac_ct_DLLWRAP"; then
8914  ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
8915else
8916as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8917for as_dir in $PATH
8918do
8919  IFS=$as_save_IFS
8920  test -z "$as_dir" && as_dir=.
8921    for ac_exec_ext in '' $ac_executable_extensions; do
8922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8923    ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
8924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8925    break 2
8926  fi
8927done
8928  done
8929IFS=$as_save_IFS
8930
8931fi
8932fi
8933ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
8934if test -n "$ac_ct_DLLWRAP"; then
8935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
8936$as_echo "$ac_ct_DLLWRAP" >&6; }
8937else
8938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8939$as_echo "no" >&6; }
8940fi
8941
8942  if test "x$ac_ct_DLLWRAP" = x; then
8943    DLLWRAP="dllwrap"
8944  else
8945    case $cross_compiling:$ac_tool_warned in
8946yes:)
8947{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8948$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8949ac_tool_warned=yes ;;
8950esac
8951    DLLWRAP=$ac_ct_DLLWRAP
8952  fi
8953else
8954  DLLWRAP="$ac_cv_prog_DLLWRAP"
8955fi
8956
8957  if test -n "$ac_tool_prefix"; then
8958  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
8959set dummy ${ac_tool_prefix}windres; ac_word=$2
8960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8961$as_echo_n "checking for $ac_word... " >&6; }
8962if ${ac_cv_prog_WINDRES+:} false; then :
8963  $as_echo_n "(cached) " >&6
8964else
8965  if test -n "$WINDRES"; then
8966  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
8967else
8968as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8969for as_dir in $PATH
8970do
8971  IFS=$as_save_IFS
8972  test -z "$as_dir" && as_dir=.
8973    for ac_exec_ext in '' $ac_executable_extensions; do
8974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8975    ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
8976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8977    break 2
8978  fi
8979done
8980  done
8981IFS=$as_save_IFS
8982
8983fi
8984fi
8985WINDRES=$ac_cv_prog_WINDRES
8986if test -n "$WINDRES"; then
8987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
8988$as_echo "$WINDRES" >&6; }
8989else
8990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8991$as_echo "no" >&6; }
8992fi
8993
8994
8995fi
8996if test -z "$ac_cv_prog_WINDRES"; then
8997  ac_ct_WINDRES=$WINDRES
8998  # Extract the first word of "windres", so it can be a program name with args.
8999set dummy windres; ac_word=$2
9000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9001$as_echo_n "checking for $ac_word... " >&6; }
9002if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9003  $as_echo_n "(cached) " >&6
9004else
9005  if test -n "$ac_ct_WINDRES"; then
9006  ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9007else
9008as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9009for as_dir in $PATH
9010do
9011  IFS=$as_save_IFS
9012  test -z "$as_dir" && as_dir=.
9013    for ac_exec_ext in '' $ac_executable_extensions; do
9014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9015    ac_cv_prog_ac_ct_WINDRES="windres"
9016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9017    break 2
9018  fi
9019done
9020  done
9021IFS=$as_save_IFS
9022
9023fi
9024fi
9025ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9026if test -n "$ac_ct_WINDRES"; then
9027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9028$as_echo "$ac_ct_WINDRES" >&6; }
9029else
9030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9031$as_echo "no" >&6; }
9032fi
9033
9034  if test "x$ac_ct_WINDRES" = x; then
9035    WINDRES="windres"
9036  else
9037    case $cross_compiling:$ac_tool_warned in
9038yes:)
9039{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9040$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9041ac_tool_warned=yes ;;
9042esac
9043    WINDRES=$ac_ct_WINDRES
9044  fi
9045else
9046  WINDRES="$ac_cv_prog_WINDRES"
9047fi
9048
9049fi
9050
9051# Find a good install program.  We prefer a C program (faster),
9052# so one script is as good as another.  But avoid the broken or
9053# incompatible versions:
9054# SysV /etc/install, /usr/sbin/install
9055# SunOS /usr/etc/install
9056# IRIX /sbin/install
9057# AIX /bin/install
9058# AmigaOS /C/install, which installs bootblocks on floppy discs
9059# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9060# AFS /usr/afsws/bin/install, which mishandles nonexistent args
9061# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9062# OS/2's system install, which has a completely different semantic
9063# ./install, which can be erroneously created by make from ./install.sh.
9064# Reject install programs that cannot install multiple files.
9065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9066$as_echo_n "checking for a BSD-compatible install... " >&6; }
9067if test -z "$INSTALL"; then
9068if ${ac_cv_path_install+:} false; then :
9069  $as_echo_n "(cached) " >&6
9070else
9071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9072for as_dir in $PATH
9073do
9074  IFS=$as_save_IFS
9075  test -z "$as_dir" && as_dir=.
9076    # Account for people who put trailing slashes in PATH elements.
9077case $as_dir/ in #((
9078  ./ | .// | /[cC]/* | \
9079  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9080  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9081  /usr/ucb/* ) ;;
9082  *)
9083    # OSF1 and SCO ODT 3.0 have their own names for install.
9084    # Don't use installbsd from OSF since it installs stuff as root
9085    # by default.
9086    for ac_prog in ginstall scoinst install; do
9087      for ac_exec_ext in '' $ac_executable_extensions; do
9088	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9089	  if test $ac_prog = install &&
9090	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9091	    # AIX install.  It has an incompatible calling convention.
9092	    :
9093	  elif test $ac_prog = install &&
9094	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9095	    # program-specific install script used by HP pwplus--don't use.
9096	    :
9097	  else
9098	    rm -rf conftest.one conftest.two conftest.dir
9099	    echo one > conftest.one
9100	    echo two > conftest.two
9101	    mkdir conftest.dir
9102	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9103	      test -s conftest.one && test -s conftest.two &&
9104	      test -s conftest.dir/conftest.one &&
9105	      test -s conftest.dir/conftest.two
9106	    then
9107	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9108	      break 3
9109	    fi
9110	  fi
9111	fi
9112      done
9113    done
9114    ;;
9115esac
9116
9117  done
9118IFS=$as_save_IFS
9119
9120rm -rf conftest.one conftest.two conftest.dir
9121
9122fi
9123  if test "${ac_cv_path_install+set}" = set; then
9124    INSTALL=$ac_cv_path_install
9125  else
9126    # As a last resort, use the slow shell script.  Don't cache a
9127    # value for INSTALL within a source directory, because that will
9128    # break other packages using the cache if that directory is
9129    # removed, or if the value is a relative name.
9130    INSTALL=$ac_install_sh
9131  fi
9132fi
9133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9134$as_echo "$INSTALL" >&6; }
9135
9136# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9137# It thinks the first close brace ends the variable substitution.
9138test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9139
9140test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9141
9142test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9143
9144# When Autoconf chooses install-sh as install program it tries to generate
9145# a relative path to it in each makefile where it substitutes it. This clashes
9146# with our Makefile.global concept. This workaround helps.
9147case $INSTALL in
9148  *install-sh*) install_bin='';;
9149  *) install_bin=$INSTALL;;
9150esac
9151
9152
9153if test -z "$TAR"; then
9154  for ac_prog in tar
9155do
9156  # Extract the first word of "$ac_prog", so it can be a program name with args.
9157set dummy $ac_prog; ac_word=$2
9158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9159$as_echo_n "checking for $ac_word... " >&6; }
9160if ${ac_cv_path_TAR+:} false; then :
9161  $as_echo_n "(cached) " >&6
9162else
9163  case $TAR in
9164  [\\/]* | ?:[\\/]*)
9165  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9166  ;;
9167  *)
9168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9169for as_dir in $PATH
9170do
9171  IFS=$as_save_IFS
9172  test -z "$as_dir" && as_dir=.
9173    for ac_exec_ext in '' $ac_executable_extensions; do
9174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9175    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9177    break 2
9178  fi
9179done
9180  done
9181IFS=$as_save_IFS
9182
9183  ;;
9184esac
9185fi
9186TAR=$ac_cv_path_TAR
9187if test -n "$TAR"; then
9188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9189$as_echo "$TAR" >&6; }
9190else
9191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9192$as_echo "no" >&6; }
9193fi
9194
9195
9196  test -n "$TAR" && break
9197done
9198
9199else
9200  # Report the value of TAR in configure's output in all cases.
9201  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9202$as_echo_n "checking for TAR... " >&6; }
9203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9204$as_echo "$TAR" >&6; }
9205fi
9206
9207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9208$as_echo_n "checking whether ln -s works... " >&6; }
9209LN_S=$as_ln_s
9210if test "$LN_S" = "ln -s"; then
9211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9212$as_echo "yes" >&6; }
9213else
9214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9215$as_echo "no, using $LN_S" >&6; }
9216fi
9217
9218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
9219$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
9220if test -z "$MKDIR_P"; then
9221  if ${ac_cv_path_mkdir+:} false; then :
9222  $as_echo_n "(cached) " >&6
9223else
9224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9225for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
9226do
9227  IFS=$as_save_IFS
9228  test -z "$as_dir" && as_dir=.
9229    for ac_prog in mkdir gmkdir; do
9230	 for ac_exec_ext in '' $ac_executable_extensions; do
9231	   as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
9232	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
9233	     'mkdir (GNU coreutils) '* | \
9234	     'mkdir (coreutils) '* | \
9235	     'mkdir (fileutils) '4.1*)
9236	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
9237	       break 3;;
9238	   esac
9239	 done
9240       done
9241  done
9242IFS=$as_save_IFS
9243
9244fi
9245
9246  test -d ./--version && rmdir ./--version
9247  if test "${ac_cv_path_mkdir+set}" = set; then
9248    MKDIR_P="$ac_cv_path_mkdir -p"
9249  else
9250    # As a last resort, use the slow shell script.  Don't cache a
9251    # value for MKDIR_P within a source directory, because that will
9252    # break other packages using the cache if that directory is
9253    # removed, or if the value is a relative name.
9254    MKDIR_P="$ac_install_sh -d"
9255  fi
9256fi
9257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
9258$as_echo "$MKDIR_P" >&6; }
9259
9260# When Autoconf chooses install-sh as mkdir -p program it tries to generate
9261# a relative path to it in each makefile where it substitutes it. This clashes
9262# with our Makefile.global concept. This workaround helps.
9263case $MKDIR_P in
9264  *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
9265esac
9266
9267if test -z "$BISON"; then
9268  for ac_prog in bison
9269do
9270  # Extract the first word of "$ac_prog", so it can be a program name with args.
9271set dummy $ac_prog; ac_word=$2
9272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9273$as_echo_n "checking for $ac_word... " >&6; }
9274if ${ac_cv_path_BISON+:} false; then :
9275  $as_echo_n "(cached) " >&6
9276else
9277  case $BISON in
9278  [\\/]* | ?:[\\/]*)
9279  ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
9280  ;;
9281  *)
9282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9283for as_dir in $PATH
9284do
9285  IFS=$as_save_IFS
9286  test -z "$as_dir" && as_dir=.
9287    for ac_exec_ext in '' $ac_executable_extensions; do
9288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9289    ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
9290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9291    break 2
9292  fi
9293done
9294  done
9295IFS=$as_save_IFS
9296
9297  ;;
9298esac
9299fi
9300BISON=$ac_cv_path_BISON
9301if test -n "$BISON"; then
9302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9303$as_echo "$BISON" >&6; }
9304else
9305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9306$as_echo "no" >&6; }
9307fi
9308
9309
9310  test -n "$BISON" && break
9311done
9312
9313else
9314  # Report the value of BISON in configure's output in all cases.
9315  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
9316$as_echo_n "checking for BISON... " >&6; }
9317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9318$as_echo "$BISON" >&6; }
9319fi
9320
9321
9322if test "$BISON"; then
9323  pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
9324  { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
9325$as_echo "$as_me: using $pgac_bison_version" >&6;}
9326  if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
9327  then
9328    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9329*** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9330*** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
9331$as_echo "$as_me: WARNING:
9332*** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9333*** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
9334    BISON=""
9335  fi
9336  # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
9337  # of the now preferred %name-prefix "base_yy", but the latter
9338  # doesn't work with Bison 2.3 or less.  So for now we silence the
9339  # deprecation warnings.
9340  if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
9341  then
9342    BISONFLAGS="$BISONFLAGS -Wno-deprecated"
9343  fi
9344fi
9345
9346if test -z "$BISON"; then
9347  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9348*** Without Bison you will not be able to build PostgreSQL from Git nor
9349*** change any of the parser definition files.  You can obtain Bison from
9350*** a GNU mirror site.  (If you are using the official distribution of
9351*** PostgreSQL then you do not need to worry about this, because the Bison
9352*** output is pre-generated.)" >&5
9353$as_echo "$as_me: WARNING:
9354*** Without Bison you will not be able to build PostgreSQL from Git nor
9355*** change any of the parser definition files.  You can obtain Bison from
9356*** a GNU mirror site.  (If you are using the official distribution of
9357*** PostgreSQL then you do not need to worry about this, because the Bison
9358*** output is pre-generated.)" >&2;}
9359fi
9360# We don't need AC_SUBST(BISON) because PGAC_PATH_PROGS did it
9361
9362
9363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
9364$as_echo_n "checking for flex... " >&6; }
9365if ${pgac_cv_path_flex+:} false; then :
9366  $as_echo_n "(cached) " >&6
9367else
9368  # Let the user override the test
9369if test -n "$FLEX"; then
9370  pgac_cv_path_flex=$FLEX
9371else
9372  pgac_save_IFS=$IFS
9373  IFS=$PATH_SEPARATOR
9374  for pgac_dir in $PATH; do
9375    IFS=$pgac_save_IFS
9376    if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
9377      pgac_dir=`pwd`
9378    fi
9379    for pgac_prog in flex lex; do
9380      pgac_candidate="$pgac_dir/$pgac_prog"
9381      if test -f "$pgac_candidate" \
9382        && $pgac_candidate --version </dev/null >/dev/null 2>&1
9383      then
9384        echo '%%'  > conftest.l
9385        if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
9386          pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
9387          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;}'
9388          then
9389            pgac_cv_path_flex=$pgac_candidate
9390            break 2
9391          else
9392            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9393*** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9394*** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
9395$as_echo "$as_me: WARNING:
9396*** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9397*** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
9398          fi
9399        fi
9400      fi
9401    done
9402  done
9403  rm -f conftest.l lex.yy.c
9404  : ${pgac_cv_path_flex=no}
9405fi
9406
9407fi
9408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
9409$as_echo "$pgac_cv_path_flex" >&6; }
9410if test x"$pgac_cv_path_flex" = x"no"; then
9411  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9412*** Without Flex you will not be able to build PostgreSQL from Git nor
9413*** change any of the scanner definition files.  You can obtain Flex from
9414*** a GNU mirror site.  (If you are using the official distribution of
9415*** PostgreSQL then you do not need to worry about this because the Flex
9416*** output is pre-generated.)" >&5
9417$as_echo "$as_me: WARNING:
9418*** Without Flex you will not be able to build PostgreSQL from Git nor
9419*** change any of the scanner definition files.  You can obtain Flex from
9420*** a GNU mirror site.  (If you are using the official distribution of
9421*** PostgreSQL then you do not need to worry about this because the Flex
9422*** output is pre-generated.)" >&2;}
9423
9424  FLEX=
9425else
9426  FLEX=$pgac_cv_path_flex
9427  pgac_flex_version=`$FLEX --version 2>/dev/null`
9428  { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
9429$as_echo "$as_me: using $pgac_flex_version" >&6;}
9430fi
9431
9432
9433
9434
9435
9436if test -z "$PERL"; then
9437  for ac_prog in perl
9438do
9439  # Extract the first word of "$ac_prog", so it can be a program name with args.
9440set dummy $ac_prog; ac_word=$2
9441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9442$as_echo_n "checking for $ac_word... " >&6; }
9443if ${ac_cv_path_PERL+:} false; then :
9444  $as_echo_n "(cached) " >&6
9445else
9446  case $PERL in
9447  [\\/]* | ?:[\\/]*)
9448  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
9449  ;;
9450  *)
9451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9452for as_dir in $PATH
9453do
9454  IFS=$as_save_IFS
9455  test -z "$as_dir" && as_dir=.
9456    for ac_exec_ext in '' $ac_executable_extensions; do
9457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9458    ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
9459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9460    break 2
9461  fi
9462done
9463  done
9464IFS=$as_save_IFS
9465
9466  ;;
9467esac
9468fi
9469PERL=$ac_cv_path_PERL
9470if test -n "$PERL"; then
9471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9472$as_echo "$PERL" >&6; }
9473else
9474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9475$as_echo "no" >&6; }
9476fi
9477
9478
9479  test -n "$PERL" && break
9480done
9481
9482else
9483  # Report the value of PERL in configure's output in all cases.
9484  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
9485$as_echo_n "checking for PERL... " >&6; }
9486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9487$as_echo "$PERL" >&6; }
9488fi
9489
9490
9491if test "$PERL"; then
9492  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'`
9493  { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
9494$as_echo "$as_me: using perl $pgac_perl_version" >&6;}
9495  if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
9496    $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
9497  then
9498    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9499*** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9500*** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
9501$as_echo "$as_me: WARNING:
9502*** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9503*** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
9504    PERL=""
9505  fi
9506fi
9507
9508if test -z "$PERL"; then
9509  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9510*** Without Perl you will not be able to build PostgreSQL from Git.
9511*** You can obtain Perl from any CPAN mirror site.
9512*** (If you are using the official distribution of PostgreSQL then you do not
9513*** need to worry about this, because the Perl output is pre-generated.)" >&5
9514$as_echo "$as_me: WARNING:
9515*** Without Perl you will not be able to build PostgreSQL from Git.
9516*** You can obtain Perl from any CPAN mirror site.
9517*** (If you are using the official distribution of PostgreSQL then you do not
9518*** need to worry about this, because the Perl output is pre-generated.)" >&2;}
9519fi
9520
9521if test "$with_perl" = yes; then
9522  if test -z "$PERL"; then
9523    as_fn_error $? "Perl not found" "$LINENO" 5
9524  fi
9525
9526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
9527$as_echo_n "checking for Perl archlibexp... " >&6; }
9528perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
9529test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
9530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
9531$as_echo "$perl_archlibexp" >&6; }
9532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
9533$as_echo_n "checking for Perl privlibexp... " >&6; }
9534perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
9535test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
9536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
9537$as_echo "$perl_privlibexp" >&6; }
9538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
9539$as_echo_n "checking for Perl useshrplib... " >&6; }
9540perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
9541test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
9542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
9543$as_echo "$perl_useshrplib" >&6; }
9544  if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
9545    as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
9546You might have to rebuild your Perl installation.  Refer to the
9547documentation for details.  Use --without-perl to disable building
9548PL/Perl." "$LINENO" 5
9549  fi
9550  # On most platforms, archlibexp is also where the Perl include files live ...
9551  perl_includespec="-I$perl_archlibexp/CORE"
9552  # ... but on newer macOS versions, we must use -iwithsysroot to look
9553  # under $PG_SYSROOT
9554  if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
9555    if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
9556      perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
9557    fi
9558  fi
9559
9560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
9561$as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
9562perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
9563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
9564$as_echo "$perl_ccflags" >&6; }
9565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
9566$as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
9567perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
9568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
9569$as_echo "$perl_embed_ccflags" >&6; }
9570
9571
9572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
9573$as_echo_n "checking for flags to link embedded Perl... " >&6; }
9574if test "$PORTNAME" = "win32" ; then
9575	perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
9576	if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
9577		perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9578	else
9579		perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
9580		if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
9581			perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9582		fi
9583	fi
9584else
9585	pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
9586	pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
9587	perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
9588fi
9589if test -z "$perl_embed_ldflags" ; then
9590	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9591$as_echo "no" >&6; }
9592	as_fn_error $? "could not determine flags for linking embedded Perl.
9593This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
9594installed." "$LINENO" 5
9595else
9596	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
9597$as_echo "$perl_embed_ldflags" >&6; }
9598fi
9599
9600fi
9601
9602if test "$with_python" = yes; then
9603  if test -z "$PYTHON"; then
9604  for ac_prog in python python3 python2
9605do
9606  # Extract the first word of "$ac_prog", so it can be a program name with args.
9607set dummy $ac_prog; ac_word=$2
9608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9609$as_echo_n "checking for $ac_word... " >&6; }
9610if ${ac_cv_path_PYTHON+:} false; then :
9611  $as_echo_n "(cached) " >&6
9612else
9613  case $PYTHON in
9614  [\\/]* | ?:[\\/]*)
9615  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
9616  ;;
9617  *)
9618  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9619for as_dir in $PATH
9620do
9621  IFS=$as_save_IFS
9622  test -z "$as_dir" && as_dir=.
9623    for ac_exec_ext in '' $ac_executable_extensions; do
9624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9625    ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
9626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9627    break 2
9628  fi
9629done
9630  done
9631IFS=$as_save_IFS
9632
9633  ;;
9634esac
9635fi
9636PYTHON=$ac_cv_path_PYTHON
9637if test -n "$PYTHON"; then
9638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9639$as_echo "$PYTHON" >&6; }
9640else
9641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9642$as_echo "no" >&6; }
9643fi
9644
9645
9646  test -n "$PYTHON" && break
9647done
9648
9649else
9650  # Report the value of PYTHON in configure's output in all cases.
9651  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
9652$as_echo_n "checking for PYTHON... " >&6; }
9653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9654$as_echo "$PYTHON" >&6; }
9655fi
9656
9657if test x"$PYTHON" = x""; then
9658  as_fn_error $? "Python not found" "$LINENO" 5
9659fi
9660
9661
9662python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
9663{ $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
9664$as_echo "$as_me: using python $python_fullversion" >&6;}
9665# python_fullversion is typically n.n.n plus some trailing junk
9666python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
9667python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
9668python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
9669# Reject unsupported Python versions as soon as practical.
9670if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 4; then
9671  as_fn_error $? "Python version $python_version is too old (version 2.4 or later is required)" "$LINENO" 5
9672fi
9673
9674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
9675$as_echo_n "checking for Python distutils module... " >&6; }
9676if "${PYTHON}" -c 'import distutils' 2>&5
9677then
9678    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9679$as_echo "yes" >&6; }
9680else
9681    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9682$as_echo "no" >&6; }
9683    as_fn_error $? "distutils module not found" "$LINENO" 5
9684fi
9685
9686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
9687$as_echo_n "checking Python configuration directory... " >&6; }
9688python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
9689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
9690$as_echo "$python_configdir" >&6; }
9691
9692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
9693$as_echo_n "checking Python include directories... " >&6; }
9694python_includespec=`${PYTHON} -c "
9695import distutils.sysconfig
9696a = '-I' + distutils.sysconfig.get_python_inc(False)
9697b = '-I' + distutils.sysconfig.get_python_inc(True)
9698if a == b:
9699    print(a)
9700else:
9701    print(a + ' ' + b)"`
9702if test "$PORTNAME" = win32 ; then
9703    python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
9704fi
9705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
9706$as_echo "$python_includespec" >&6; }
9707
9708
9709
9710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
9711$as_echo_n "checking how to link an embedded Python application... " >&6; }
9712
9713python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
9714python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
9715
9716# If LDLIBRARY exists and has a shlib extension, use it verbatim.
9717ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
9718if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
9719then
9720	ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
9721	found_shlib=1
9722else
9723	# Otherwise, guess the base name of the shlib.
9724	# LDVERSION was added in Python 3.2, before that use VERSION,
9725	# or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
9726	python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
9727	if test x"${python_ldversion}" != x""; then
9728		ldlibrary="python${python_ldversion}"
9729	else
9730		python_version_var=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('VERSION'))))"`
9731		if test x"${python_version_var}" != x""; then
9732			ldlibrary="python${python_version_var}"
9733		else
9734			ldlibrary="python${python_version}"
9735		fi
9736	fi
9737	# Search for a likely-looking file.
9738	found_shlib=0
9739	for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9740	do
9741		# We don't know the platform DLSUFFIX here, so check 'em all.
9742		for e in .so .dll .dylib .sl; do
9743			if test -e "$d/lib${ldlibrary}$e"; then
9744				python_libdir="$d"
9745				found_shlib=1
9746				break 2
9747			fi
9748		done
9749	done
9750	# Some platforms (OpenBSD) require us to accept a bare versioned shlib
9751	# (".so.n.n") as well. However, check this only after failing to find
9752	# ".so" anywhere, because yet other platforms (Debian) put the .so
9753	# symlink in a different directory from the underlying versioned shlib.
9754	if test "$found_shlib" != 1; then
9755		for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9756		do
9757			for f in "$d/lib${ldlibrary}.so."* ; do
9758				if test -e "$f"; then
9759					python_libdir="$d"
9760					found_shlib=1
9761					break 2
9762				fi
9763			done
9764		done
9765	fi
9766	# As usual, Windows has its own ideas.  Possible default library
9767	# locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
9768	# and the "lib" prefix might not be there.
9769	if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
9770		for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
9771		do
9772			for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
9773				if test -e "$f"; then
9774					python_libdir="$d"
9775					found_shlib=1
9776					break 2
9777				fi
9778			done
9779		done
9780	fi
9781fi
9782if test "$found_shlib" != 1; then
9783	as_fn_error $? "could not find shared library for Python
9784You might have to rebuild your Python installation.  Refer to the
9785documentation for details.  Use --without-python to disable building
9786PL/Python." "$LINENO" 5
9787fi
9788python_libspec="-L${python_libdir} -l${ldlibrary}"
9789
9790python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
9791
9792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
9793$as_echo "${python_libspec} ${python_additional_libs}" >&6; }
9794
9795
9796
9797fi
9798
9799if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
9800  if test -z "$ZIC"; then
9801  for ac_prog in zic
9802do
9803  # Extract the first word of "$ac_prog", so it can be a program name with args.
9804set dummy $ac_prog; ac_word=$2
9805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9806$as_echo_n "checking for $ac_word... " >&6; }
9807if ${ac_cv_path_ZIC+:} false; then :
9808  $as_echo_n "(cached) " >&6
9809else
9810  case $ZIC in
9811  [\\/]* | ?:[\\/]*)
9812  ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
9813  ;;
9814  *)
9815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9816for as_dir in $PATH
9817do
9818  IFS=$as_save_IFS
9819  test -z "$as_dir" && as_dir=.
9820    for ac_exec_ext in '' $ac_executable_extensions; do
9821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9822    ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
9823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9824    break 2
9825  fi
9826done
9827  done
9828IFS=$as_save_IFS
9829
9830  ;;
9831esac
9832fi
9833ZIC=$ac_cv_path_ZIC
9834if test -n "$ZIC"; then
9835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
9836$as_echo "$ZIC" >&6; }
9837else
9838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9839$as_echo "no" >&6; }
9840fi
9841
9842
9843  test -n "$ZIC" && break
9844done
9845
9846else
9847  # Report the value of ZIC in configure's output in all cases.
9848  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
9849$as_echo_n "checking for ZIC... " >&6; }
9850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
9851$as_echo "$ZIC" >&6; }
9852fi
9853
9854  if test -z "$ZIC"; then
9855    as_fn_error $? "
9856When cross-compiling, either use the option --with-system-tzdata to use
9857existing time-zone data, or set the environment variable ZIC to a zic
9858program to use during the build." "$LINENO" 5
9859  fi
9860fi
9861
9862#
9863# Pthreads
9864#
9865# For each platform, we need to know about any special compile and link
9866# libraries, and whether the normal C function names are thread-safe.
9867# See the comment at the top of src/port/thread.c for more information.
9868# WIN32 doesn't need the pthread tests;  it always uses threads
9869#
9870# These tests are run before the library-tests, because linking with the
9871# other libraries can pull in the pthread functions as a side-effect.  We
9872# want to use the -pthread or similar flags directly, and not rely on
9873# the side-effects of linking with some other library.
9874#
9875# note: We have to use AS_IF here rather than plain if. The AC_CHECK_HEADER
9876# invocation below is the first one in the script, and autoconf generates
9877# additional code for that, which must not be inside the if-block. AS_IF
9878# knows how to do that.
9879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
9880$as_echo_n "checking for ANSI C header files... " >&6; }
9881if ${ac_cv_header_stdc+:} false; then :
9882  $as_echo_n "(cached) " >&6
9883else
9884  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9885/* end confdefs.h.  */
9886#include <stdlib.h>
9887#include <stdarg.h>
9888#include <string.h>
9889#include <float.h>
9890
9891int
9892main ()
9893{
9894
9895  ;
9896  return 0;
9897}
9898_ACEOF
9899if ac_fn_c_try_compile "$LINENO"; then :
9900  ac_cv_header_stdc=yes
9901else
9902  ac_cv_header_stdc=no
9903fi
9904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9905
9906if test $ac_cv_header_stdc = yes; then
9907  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9908  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9909/* end confdefs.h.  */
9910#include <string.h>
9911
9912_ACEOF
9913if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9914  $EGREP "memchr" >/dev/null 2>&1; then :
9915
9916else
9917  ac_cv_header_stdc=no
9918fi
9919rm -f conftest*
9920
9921fi
9922
9923if test $ac_cv_header_stdc = yes; then
9924  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9925  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9926/* end confdefs.h.  */
9927#include <stdlib.h>
9928
9929_ACEOF
9930if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9931  $EGREP "free" >/dev/null 2>&1; then :
9932
9933else
9934  ac_cv_header_stdc=no
9935fi
9936rm -f conftest*
9937
9938fi
9939
9940if test $ac_cv_header_stdc = yes; then
9941  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9942  if test "$cross_compiling" = yes; then :
9943  :
9944else
9945  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9946/* end confdefs.h.  */
9947#include <ctype.h>
9948#include <stdlib.h>
9949#if ((' ' & 0x0FF) == 0x020)
9950# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9951# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9952#else
9953# define ISLOWER(c) \
9954		   (('a' <= (c) && (c) <= 'i') \
9955		     || ('j' <= (c) && (c) <= 'r') \
9956		     || ('s' <= (c) && (c) <= 'z'))
9957# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9958#endif
9959
9960#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9961int
9962main ()
9963{
9964  int i;
9965  for (i = 0; i < 256; i++)
9966    if (XOR (islower (i), ISLOWER (i))
9967	|| toupper (i) != TOUPPER (i))
9968      return 2;
9969  return 0;
9970}
9971_ACEOF
9972if ac_fn_c_try_run "$LINENO"; then :
9973
9974else
9975  ac_cv_header_stdc=no
9976fi
9977rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9978  conftest.$ac_objext conftest.beam conftest.$ac_ext
9979fi
9980
9981fi
9982fi
9983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
9984$as_echo "$ac_cv_header_stdc" >&6; }
9985if test $ac_cv_header_stdc = yes; then
9986
9987$as_echo "#define STDC_HEADERS 1" >>confdefs.h
9988
9989fi
9990
9991# On IRIX 5.3, sys/types and inttypes.h are conflicting.
9992for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9993		  inttypes.h stdint.h unistd.h
9994do :
9995  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9996ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
9997"
9998if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9999  cat >>confdefs.h <<_ACEOF
10000#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10001_ACEOF
10002
10003fi
10004
10005done
10006
10007
10008if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
10009   # then
10010
10011
10012
10013ac_ext=c
10014ac_cpp='$CPP $CPPFLAGS'
10015ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10016ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10017ac_compiler_gnu=$ac_cv_c_compiler_gnu
10018
10019ax_pthread_ok=no
10020
10021# We used to check for pthread.h first, but this fails if pthread.h
10022# requires special compiler flags (e.g. on Tru64 or Sequent).
10023# It gets checked for in the link test anyway.
10024
10025# First of all, check if the user has set any of the PTHREAD_LIBS,
10026# etcetera environment variables, and if threads linking works using
10027# them:
10028if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
10029        save_CFLAGS="$CFLAGS"
10030        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10031        save_LIBS="$LIBS"
10032        LIBS="$PTHREAD_LIBS $LIBS"
10033        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
10034$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
10035        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10036/* end confdefs.h.  */
10037
10038/* Override any GCC internal prototype to avoid an error.
10039   Use char because int might match the return type of a GCC
10040   builtin and then its argument prototype would still apply.  */
10041#ifdef __cplusplus
10042extern "C"
10043#endif
10044char pthread_join ();
10045int
10046main ()
10047{
10048return pthread_join ();
10049  ;
10050  return 0;
10051}
10052_ACEOF
10053if ac_fn_c_try_link "$LINENO"; then :
10054  ax_pthread_ok=yes
10055fi
10056rm -f core conftest.err conftest.$ac_objext \
10057    conftest$ac_exeext conftest.$ac_ext
10058        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10059$as_echo "$ax_pthread_ok" >&6; }
10060        if test x"$ax_pthread_ok" = xno; then
10061                PTHREAD_LIBS=""
10062                PTHREAD_CFLAGS=""
10063        fi
10064        LIBS="$save_LIBS"
10065        CFLAGS="$save_CFLAGS"
10066fi
10067
10068# We must check for the threads library under a number of different
10069# names; the ordering is very important because some systems
10070# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
10071# libraries is broken (non-POSIX).
10072
10073# Create a list of thread flags to try.  Items starting with a "-" are
10074# C compiler flags, and other items are library names, except for "none"
10075# which indicates that we try without any flags at all, and "pthread-config"
10076# which is a program returning the flags for the Pth emulation library.
10077
10078ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt -mthreads pthread --thread-safe pthread-config"
10079
10080# The ordering *is* (sometimes) important.  Some notes on the
10081# individual items follow:
10082
10083# pthreads: AIX (must check this before -lpthread)
10084# none: in case threads are in libc; should be tried before -Kthread and
10085#       other compiler flags to prevent continual compiler warnings
10086# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
10087# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
10088# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
10089# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
10090# -pthreads: Solaris/gcc
10091# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
10092#      doesn't hurt to check since this sometimes defines pthreads and
10093#      -D_REENTRANT too), HP C (must be checked before -lpthread, which
10094#      is present but should not be used directly)
10095# -mthreads: Mingw32/gcc, Lynx/gcc
10096# pthread: Linux, etcetera
10097# --thread-safe: KAI C++
10098# pthread-config: use pthread-config program (for GNU Pth library)
10099
10100case $host_os in
10101
10102        hpux*)
10103
10104        # From the cc(1) man page: "[-mt] Sets various -D flags to enable
10105        # multi-threading and also sets -lpthread."
10106
10107        ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
10108        ;;
10109
10110        openedition*)
10111
10112        # IBM z/OS requires a feature-test macro to be defined in order to
10113        # enable POSIX threads at all, so give the user a hint if this is
10114        # not set. (We don't define these ourselves, as they can affect
10115        # other portions of the system API in unpredictable ways.)
10116
10117        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10118/* end confdefs.h.  */
10119
10120#            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
10121             AX_PTHREAD_ZOS_MISSING
10122#            endif
10123
10124_ACEOF
10125if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10126  $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
10127  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
10128$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
10129fi
10130rm -f conftest*
10131
10132        ;;
10133
10134        solaris*)
10135
10136        # Newer versions of Solaris require the "-mt -lpthread" pair, and we
10137        # check that first.  On some older versions, libc contains stubbed
10138        # (non-functional) versions of the pthreads routines, so link-based
10139        # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
10140        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
10141        # a function called by this macro, so we could check for that, but
10142        # who knows whether they'll stub that too in a future libc.)  So
10143        # we'll look for -pthreads and -lpthread shortly thereafter.
10144
10145        ax_pthread_flags="-mt,pthread -pthreads -pthread pthread $ax_pthread_flags"
10146        ;;
10147esac
10148
10149# Older versions of Clang only give a warning instead of an error for an
10150# unrecognized option, unless we specify -Werror. (We throw in some extra
10151# Clang warning flags for good measure.)
10152
10153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs certain flags to reject unknown flags" >&5
10154$as_echo_n "checking if compiler needs certain flags to reject unknown flags... " >&6; }
10155if ${ax_cv_PTHREAD_REJECT_UNKNOWN+:} false; then :
10156  $as_echo_n "(cached) " >&6
10157else
10158  ax_cv_PTHREAD_REJECT_UNKNOWN=unknown
10159     save_CFLAGS="$CFLAGS"
10160     ax_pthread_extra_flags="-Wunknown-warning-option -Wunused-command-line-argument"
10161     CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wfoobaz -foobaz"
10162     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10163/* end confdefs.h.  */
10164int foo(void);
10165int
10166main ()
10167{
10168foo()
10169  ;
10170  return 0;
10171}
10172_ACEOF
10173if ac_fn_c_try_compile "$LINENO"; then :
10174  ax_cv_PTHREAD_REJECT_UNKNOWN="-Werror $ax_pthread_extra_flags"
10175else
10176  ax_cv_PTHREAD_REJECT_UNKNOWN=no
10177fi
10178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10179     CFLAGS="$save_CFLAGS"
10180
10181fi
10182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_REJECT_UNKNOWN" >&5
10183$as_echo "$ax_cv_PTHREAD_REJECT_UNKNOWN" >&6; }
10184ax_pthread_extra_flags=
10185if test "x$ax_cv_PTHREAD_REJECT_UNKNOWN" != "xno"; then :
10186  ax_pthread_extra_flags="$ax_cv_PTHREAD_REJECT_UNKNOWN"
10187fi
10188
10189if test x"$ax_pthread_ok" = xno; then
10190for flag in $ax_pthread_flags; do
10191
10192        case $flag in
10193                none)
10194                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
10195$as_echo_n "checking whether pthreads work without any flags... " >&6; }
10196                ;;
10197
10198                -mt,pthread)
10199                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
10200$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
10201                PTHREAD_CFLAGS="-mt"
10202                PTHREAD_LIBS="-lpthread"
10203                ;;
10204
10205                -*)
10206                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
10207$as_echo_n "checking whether pthreads work with $flag... " >&6; }
10208                PTHREAD_CFLAGS="$flag"
10209                ;;
10210
10211                pthread-config)
10212                # Extract the first word of "pthread-config", so it can be a program name with args.
10213set dummy pthread-config; ac_word=$2
10214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10215$as_echo_n "checking for $ac_word... " >&6; }
10216if ${ac_cv_prog_ax_pthread_config+:} false; then :
10217  $as_echo_n "(cached) " >&6
10218else
10219  if test -n "$ax_pthread_config"; then
10220  ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
10221else
10222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10223for as_dir in $PATH
10224do
10225  IFS=$as_save_IFS
10226  test -z "$as_dir" && as_dir=.
10227    for ac_exec_ext in '' $ac_executable_extensions; do
10228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10229    ac_cv_prog_ax_pthread_config="yes"
10230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10231    break 2
10232  fi
10233done
10234  done
10235IFS=$as_save_IFS
10236
10237  test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
10238fi
10239fi
10240ax_pthread_config=$ac_cv_prog_ax_pthread_config
10241if test -n "$ax_pthread_config"; then
10242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
10243$as_echo "$ax_pthread_config" >&6; }
10244else
10245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10246$as_echo "no" >&6; }
10247fi
10248
10249
10250                if test x"$ax_pthread_config" = xno; then continue; fi
10251                PTHREAD_CFLAGS="`pthread-config --cflags`"
10252                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
10253                ;;
10254
10255                *)
10256                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
10257$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
10258                PTHREAD_LIBS="-l$flag"
10259                ;;
10260        esac
10261
10262        save_LIBS="$LIBS"
10263        save_CFLAGS="$CFLAGS"
10264        LIBS="$PTHREAD_LIBS $LIBS"
10265        CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
10266
10267        # Check for various functions.  We must include pthread.h,
10268        # since some functions may be macros.  (On the Sequent, we
10269        # need a special flag -Kthread to make this header compile.)
10270        # We check for pthread_join because it is in -lpthread on IRIX
10271        # while pthread_create is in libc.  We check for pthread_attr_init
10272        # due to DEC craziness with -lpthreads.  We check for
10273        # pthread_cleanup_push because it is one of the few pthread
10274        # functions on Solaris that doesn't have a non-functional libc stub.
10275        # We try pthread_create on general principles.
10276        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10277/* end confdefs.h.  */
10278#include <pthread.h>
10279                        static void routine(void *a) { a = 0; }
10280                        static void *start_routine(void *a) { return a; }
10281int
10282main ()
10283{
10284pthread_t th; pthread_attr_t attr;
10285                        pthread_create(&th, 0, start_routine, 0);
10286                        pthread_join(th, 0);
10287                        pthread_attr_init(&attr);
10288                        pthread_cleanup_push(routine, 0);
10289                        pthread_cleanup_pop(0) /* ; */
10290  ;
10291  return 0;
10292}
10293_ACEOF
10294if ac_fn_c_try_link "$LINENO"; then :
10295  ax_pthread_ok=yes
10296fi
10297rm -f core conftest.err conftest.$ac_objext \
10298    conftest$ac_exeext conftest.$ac_ext
10299
10300        LIBS="$save_LIBS"
10301        CFLAGS="$save_CFLAGS"
10302
10303        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10304$as_echo "$ax_pthread_ok" >&6; }
10305        if test "x$ax_pthread_ok" = xyes; then
10306                break;
10307        fi
10308
10309        PTHREAD_LIBS=""
10310        PTHREAD_CFLAGS=""
10311done
10312fi
10313
10314# Various other checks:
10315if test "x$ax_pthread_ok" = xyes; then
10316        save_LIBS="$LIBS"
10317        LIBS="$PTHREAD_LIBS $LIBS"
10318        save_CFLAGS="$CFLAGS"
10319        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10320
10321        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
10322        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
10323$as_echo_n "checking for joinable pthread attribute... " >&6; }
10324if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
10325  $as_echo_n "(cached) " >&6
10326else
10327  ax_cv_PTHREAD_JOINABLE_ATTR=unknown
10328             for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
10329                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10330/* end confdefs.h.  */
10331#include <pthread.h>
10332int
10333main ()
10334{
10335int attr = $attr; return attr /* ; */
10336  ;
10337  return 0;
10338}
10339_ACEOF
10340if ac_fn_c_try_link "$LINENO"; then :
10341  ax_cv_PTHREAD_JOINABLE_ATTR=$attr; break
10342fi
10343rm -f core conftest.err conftest.$ac_objext \
10344    conftest$ac_exeext conftest.$ac_ext
10345             done
10346
10347fi
10348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
10349$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
10350        if test "$ax_cv_PTHREAD_JOINABLE_ATTR" != unknown && \
10351               test "$ax_cv_PTHREAD_JOINABLE_ATTR" != PTHREAD_CREATE_JOINABLE; then :
10352
10353cat >>confdefs.h <<_ACEOF
10354#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
10355_ACEOF
10356
10357fi
10358
10359        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
10360$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
10361if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
10362  $as_echo_n "(cached) " >&6
10363else
10364  ax_cv_PTHREAD_SPECIAL_FLAGS=no
10365             ax_pthread_special_flags_added=no
10366             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10367/* end confdefs.h.  */
10368
10369#                 if !defined(_REENTRANT) && !defined(_THREAD_SAFE)
10370                  AX_PTHREAD_NEED_SPECIAL_FLAG
10371#                 endif
10372
10373_ACEOF
10374if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10375  $EGREP "AX_PTHREAD_NEED_SPECIAL_FLAG" >/dev/null 2>&1; then :
10376  case $host_os in
10377                  aix* | freebsd*)
10378                  ax_cv_PTHREAD_SPECIAL_FLAGS="-D_THREAD_SAFE"
10379                  ;;
10380                  darwin* | hpux* | osf* | solaris*)
10381                  ax_cv_PTHREAD_SPECIAL_FLAGS="-D_REENTRANT"
10382                  ;;
10383                  esac
10384
10385fi
10386rm -f conftest*
10387
10388
10389fi
10390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
10391$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
10392        if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
10393               test "x$ax_pthread_special_flags_added" != "xyes"; then :
10394  PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
10395               ax_pthread_special_flags_added=yes
10396fi
10397
10398        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
10399$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
10400if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
10401  $as_echo_n "(cached) " >&6
10402else
10403  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10404/* end confdefs.h.  */
10405#include <pthread.h>
10406int
10407main ()
10408{
10409int i = PTHREAD_PRIO_INHERIT;
10410  ;
10411  return 0;
10412}
10413_ACEOF
10414if ac_fn_c_try_link "$LINENO"; then :
10415  ax_cv_PTHREAD_PRIO_INHERIT=yes
10416else
10417  ax_cv_PTHREAD_PRIO_INHERIT=no
10418fi
10419rm -f core conftest.err conftest.$ac_objext \
10420    conftest$ac_exeext conftest.$ac_ext
10421
10422fi
10423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
10424$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
10425        if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
10426
10427$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
10428
10429fi
10430
10431        LIBS="$save_LIBS"
10432        CFLAGS="$save_CFLAGS"
10433
10434        # More AIX lossage: compile with *_r variant
10435        if test "x$GCC" != xyes; then
10436            case $host_os in
10437                aix*)
10438                case "x/$CC" in #(
10439  x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
10440    #handle absolute path differently from PATH based program lookup
10441                   case "x$CC" in #(
10442  x/*) :
10443    if as_fn_executable_p ${CC}_r; then :
10444  PTHREAD_CC="${CC}_r"
10445fi ;; #(
10446  *) :
10447    for ac_prog in ${CC}_r
10448do
10449  # Extract the first word of "$ac_prog", so it can be a program name with args.
10450set dummy $ac_prog; ac_word=$2
10451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10452$as_echo_n "checking for $ac_word... " >&6; }
10453if ${ac_cv_prog_PTHREAD_CC+:} false; then :
10454  $as_echo_n "(cached) " >&6
10455else
10456  if test -n "$PTHREAD_CC"; then
10457  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
10458else
10459as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10460for as_dir in $PATH
10461do
10462  IFS=$as_save_IFS
10463  test -z "$as_dir" && as_dir=.
10464    for ac_exec_ext in '' $ac_executable_extensions; do
10465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10466    ac_cv_prog_PTHREAD_CC="$ac_prog"
10467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10468    break 2
10469  fi
10470done
10471  done
10472IFS=$as_save_IFS
10473
10474fi
10475fi
10476PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
10477if test -n "$PTHREAD_CC"; then
10478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
10479$as_echo "$PTHREAD_CC" >&6; }
10480else
10481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10482$as_echo "no" >&6; }
10483fi
10484
10485
10486  test -n "$PTHREAD_CC" && break
10487done
10488test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10489 ;;
10490esac ;; #(
10491  *) :
10492     ;;
10493esac
10494                ;;
10495            esac
10496        fi
10497fi
10498
10499test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10500
10501
10502
10503
10504
10505# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
10506if test x"$ax_pthread_ok" = xyes; then
10507
10508$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10509
10510        :
10511else
10512        ax_pthread_ok=no
10513
10514fi
10515ac_ext=c
10516ac_cpp='$CPP $CPPFLAGS'
10517ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10518ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10519ac_compiler_gnu=$ac_cv_c_compiler_gnu
10520
10521	# set thread flags
10522
10523# Some platforms use these, so just define them.  They can't hurt if they
10524# are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
10525# enables 5-arg getpwuid_r, among other things.
10526PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
10527
10528# Check for *_r functions
10529_CFLAGS="$CFLAGS"
10530_LIBS="$LIBS"
10531CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10532LIBS="$LIBS $PTHREAD_LIBS"
10533
10534ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
10535if test "x$ac_cv_header_pthread_h" = xyes; then :
10536
10537else
10538  as_fn_error $? "
10539pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
10540fi
10541
10542
10543
10544for ac_func in strerror_r getpwuid_r gethostbyname_r
10545do :
10546  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10547ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10548if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10549  cat >>confdefs.h <<_ACEOF
10550#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10551_ACEOF
10552
10553fi
10554done
10555
10556
10557# Do test here with the proper thread flags
10558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
10559$as_echo_n "checking whether strerror_r returns int... " >&6; }
10560if ${pgac_cv_func_strerror_r_int+:} false; then :
10561  $as_echo_n "(cached) " >&6
10562else
10563  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10564/* end confdefs.h.  */
10565#include <string.h>
10566int
10567main ()
10568{
10569char buf[100];
10570  switch (strerror_r(1, buf, sizeof(buf)))
10571  { case 0: break; default: break; }
10572
10573  ;
10574  return 0;
10575}
10576_ACEOF
10577if ac_fn_c_try_compile "$LINENO"; then :
10578  pgac_cv_func_strerror_r_int=yes
10579else
10580  pgac_cv_func_strerror_r_int=no
10581fi
10582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10583fi
10584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
10585$as_echo "$pgac_cv_func_strerror_r_int" >&6; }
10586if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
10587
10588$as_echo "#define STRERROR_R_INT 1" >>confdefs.h
10589
10590fi
10591
10592
10593CFLAGS="$_CFLAGS"
10594LIBS="$_LIBS"
10595
10596
10597else
10598   # else
10599# do not use values from template file
10600PTHREAD_CFLAGS=
10601PTHREAD_LIBS=
10602
10603fi # fi
10604
10605
10606
10607
10608
10609##
10610## Libraries
10611##
10612## Most libraries are included only if they demonstrably provide a function
10613## we need, but libm is an exception: always include it, because there are
10614## too many compilers that play cute optimization games that will break
10615## probes for standard functions such as pow().
10616##
10617
10618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
10619$as_echo_n "checking for main in -lm... " >&6; }
10620if ${ac_cv_lib_m_main+:} false; then :
10621  $as_echo_n "(cached) " >&6
10622else
10623  ac_check_lib_save_LIBS=$LIBS
10624LIBS="-lm  $LIBS"
10625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10626/* end confdefs.h.  */
10627
10628
10629int
10630main ()
10631{
10632return main ();
10633  ;
10634  return 0;
10635}
10636_ACEOF
10637if ac_fn_c_try_link "$LINENO"; then :
10638  ac_cv_lib_m_main=yes
10639else
10640  ac_cv_lib_m_main=no
10641fi
10642rm -f core conftest.err conftest.$ac_objext \
10643    conftest$ac_exeext conftest.$ac_ext
10644LIBS=$ac_check_lib_save_LIBS
10645fi
10646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
10647$as_echo "$ac_cv_lib_m_main" >&6; }
10648if test "x$ac_cv_lib_m_main" = xyes; then :
10649  cat >>confdefs.h <<_ACEOF
10650#define HAVE_LIBM 1
10651_ACEOF
10652
10653  LIBS="-lm $LIBS"
10654
10655fi
10656
10657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
10658$as_echo_n "checking for library containing setproctitle... " >&6; }
10659if ${ac_cv_search_setproctitle+:} false; then :
10660  $as_echo_n "(cached) " >&6
10661else
10662  ac_func_search_save_LIBS=$LIBS
10663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10664/* end confdefs.h.  */
10665
10666/* Override any GCC internal prototype to avoid an error.
10667   Use char because int might match the return type of a GCC
10668   builtin and then its argument prototype would still apply.  */
10669#ifdef __cplusplus
10670extern "C"
10671#endif
10672char setproctitle ();
10673int
10674main ()
10675{
10676return setproctitle ();
10677  ;
10678  return 0;
10679}
10680_ACEOF
10681for ac_lib in '' util; do
10682  if test -z "$ac_lib"; then
10683    ac_res="none required"
10684  else
10685    ac_res=-l$ac_lib
10686    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10687  fi
10688  if ac_fn_c_try_link "$LINENO"; then :
10689  ac_cv_search_setproctitle=$ac_res
10690fi
10691rm -f core conftest.err conftest.$ac_objext \
10692    conftest$ac_exeext
10693  if ${ac_cv_search_setproctitle+:} false; then :
10694  break
10695fi
10696done
10697if ${ac_cv_search_setproctitle+:} false; then :
10698
10699else
10700  ac_cv_search_setproctitle=no
10701fi
10702rm conftest.$ac_ext
10703LIBS=$ac_func_search_save_LIBS
10704fi
10705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
10706$as_echo "$ac_cv_search_setproctitle" >&6; }
10707ac_res=$ac_cv_search_setproctitle
10708if test "$ac_res" != no; then :
10709  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10710
10711fi
10712
10713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
10714$as_echo_n "checking for library containing dlopen... " >&6; }
10715if ${ac_cv_search_dlopen+:} false; then :
10716  $as_echo_n "(cached) " >&6
10717else
10718  ac_func_search_save_LIBS=$LIBS
10719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10720/* end confdefs.h.  */
10721
10722/* Override any GCC internal prototype to avoid an error.
10723   Use char because int might match the return type of a GCC
10724   builtin and then its argument prototype would still apply.  */
10725#ifdef __cplusplus
10726extern "C"
10727#endif
10728char dlopen ();
10729int
10730main ()
10731{
10732return dlopen ();
10733  ;
10734  return 0;
10735}
10736_ACEOF
10737for ac_lib in '' dl; do
10738  if test -z "$ac_lib"; then
10739    ac_res="none required"
10740  else
10741    ac_res=-l$ac_lib
10742    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10743  fi
10744  if ac_fn_c_try_link "$LINENO"; then :
10745  ac_cv_search_dlopen=$ac_res
10746fi
10747rm -f core conftest.err conftest.$ac_objext \
10748    conftest$ac_exeext
10749  if ${ac_cv_search_dlopen+:} false; then :
10750  break
10751fi
10752done
10753if ${ac_cv_search_dlopen+:} false; then :
10754
10755else
10756  ac_cv_search_dlopen=no
10757fi
10758rm conftest.$ac_ext
10759LIBS=$ac_func_search_save_LIBS
10760fi
10761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
10762$as_echo "$ac_cv_search_dlopen" >&6; }
10763ac_res=$ac_cv_search_dlopen
10764if test "$ac_res" != no; then :
10765  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10766
10767fi
10768
10769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
10770$as_echo_n "checking for library containing socket... " >&6; }
10771if ${ac_cv_search_socket+:} false; then :
10772  $as_echo_n "(cached) " >&6
10773else
10774  ac_func_search_save_LIBS=$LIBS
10775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10776/* end confdefs.h.  */
10777
10778/* Override any GCC internal prototype to avoid an error.
10779   Use char because int might match the return type of a GCC
10780   builtin and then its argument prototype would still apply.  */
10781#ifdef __cplusplus
10782extern "C"
10783#endif
10784char socket ();
10785int
10786main ()
10787{
10788return socket ();
10789  ;
10790  return 0;
10791}
10792_ACEOF
10793for ac_lib in '' socket ws2_32; do
10794  if test -z "$ac_lib"; then
10795    ac_res="none required"
10796  else
10797    ac_res=-l$ac_lib
10798    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10799  fi
10800  if ac_fn_c_try_link "$LINENO"; then :
10801  ac_cv_search_socket=$ac_res
10802fi
10803rm -f core conftest.err conftest.$ac_objext \
10804    conftest$ac_exeext
10805  if ${ac_cv_search_socket+:} false; then :
10806  break
10807fi
10808done
10809if ${ac_cv_search_socket+:} false; then :
10810
10811else
10812  ac_cv_search_socket=no
10813fi
10814rm conftest.$ac_ext
10815LIBS=$ac_func_search_save_LIBS
10816fi
10817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
10818$as_echo "$ac_cv_search_socket" >&6; }
10819ac_res=$ac_cv_search_socket
10820if test "$ac_res" != no; then :
10821  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10822
10823fi
10824
10825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
10826$as_echo_n "checking for library containing shl_load... " >&6; }
10827if ${ac_cv_search_shl_load+:} false; then :
10828  $as_echo_n "(cached) " >&6
10829else
10830  ac_func_search_save_LIBS=$LIBS
10831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10832/* end confdefs.h.  */
10833
10834/* Override any GCC internal prototype to avoid an error.
10835   Use char because int might match the return type of a GCC
10836   builtin and then its argument prototype would still apply.  */
10837#ifdef __cplusplus
10838extern "C"
10839#endif
10840char shl_load ();
10841int
10842main ()
10843{
10844return shl_load ();
10845  ;
10846  return 0;
10847}
10848_ACEOF
10849for ac_lib in '' dld; do
10850  if test -z "$ac_lib"; then
10851    ac_res="none required"
10852  else
10853    ac_res=-l$ac_lib
10854    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10855  fi
10856  if ac_fn_c_try_link "$LINENO"; then :
10857  ac_cv_search_shl_load=$ac_res
10858fi
10859rm -f core conftest.err conftest.$ac_objext \
10860    conftest$ac_exeext
10861  if ${ac_cv_search_shl_load+:} false; then :
10862  break
10863fi
10864done
10865if ${ac_cv_search_shl_load+:} false; then :
10866
10867else
10868  ac_cv_search_shl_load=no
10869fi
10870rm conftest.$ac_ext
10871LIBS=$ac_func_search_save_LIBS
10872fi
10873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
10874$as_echo "$ac_cv_search_shl_load" >&6; }
10875ac_res=$ac_cv_search_shl_load
10876if test "$ac_res" != no; then :
10877  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10878
10879fi
10880
10881# We only use libld in port/dynloader/aix.c
10882case $host_os in
10883     aix*)
10884	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldopen" >&5
10885$as_echo_n "checking for library containing ldopen... " >&6; }
10886if ${ac_cv_search_ldopen+:} false; then :
10887  $as_echo_n "(cached) " >&6
10888else
10889  ac_func_search_save_LIBS=$LIBS
10890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10891/* end confdefs.h.  */
10892
10893/* Override any GCC internal prototype to avoid an error.
10894   Use char because int might match the return type of a GCC
10895   builtin and then its argument prototype would still apply.  */
10896#ifdef __cplusplus
10897extern "C"
10898#endif
10899char ldopen ();
10900int
10901main ()
10902{
10903return ldopen ();
10904  ;
10905  return 0;
10906}
10907_ACEOF
10908for ac_lib in '' ld; do
10909  if test -z "$ac_lib"; then
10910    ac_res="none required"
10911  else
10912    ac_res=-l$ac_lib
10913    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10914  fi
10915  if ac_fn_c_try_link "$LINENO"; then :
10916  ac_cv_search_ldopen=$ac_res
10917fi
10918rm -f core conftest.err conftest.$ac_objext \
10919    conftest$ac_exeext
10920  if ${ac_cv_search_ldopen+:} false; then :
10921  break
10922fi
10923done
10924if ${ac_cv_search_ldopen+:} false; then :
10925
10926else
10927  ac_cv_search_ldopen=no
10928fi
10929rm conftest.$ac_ext
10930LIBS=$ac_func_search_save_LIBS
10931fi
10932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldopen" >&5
10933$as_echo "$ac_cv_search_ldopen" >&6; }
10934ac_res=$ac_cv_search_ldopen
10935if test "$ac_res" != no; then :
10936  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10937
10938fi
10939
10940	;;
10941esac
10942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
10943$as_echo_n "checking for library containing getopt_long... " >&6; }
10944if ${ac_cv_search_getopt_long+:} false; then :
10945  $as_echo_n "(cached) " >&6
10946else
10947  ac_func_search_save_LIBS=$LIBS
10948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10949/* end confdefs.h.  */
10950
10951/* Override any GCC internal prototype to avoid an error.
10952   Use char because int might match the return type of a GCC
10953   builtin and then its argument prototype would still apply.  */
10954#ifdef __cplusplus
10955extern "C"
10956#endif
10957char getopt_long ();
10958int
10959main ()
10960{
10961return getopt_long ();
10962  ;
10963  return 0;
10964}
10965_ACEOF
10966for ac_lib in '' getopt gnugetopt; do
10967  if test -z "$ac_lib"; then
10968    ac_res="none required"
10969  else
10970    ac_res=-l$ac_lib
10971    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10972  fi
10973  if ac_fn_c_try_link "$LINENO"; then :
10974  ac_cv_search_getopt_long=$ac_res
10975fi
10976rm -f core conftest.err conftest.$ac_objext \
10977    conftest$ac_exeext
10978  if ${ac_cv_search_getopt_long+:} false; then :
10979  break
10980fi
10981done
10982if ${ac_cv_search_getopt_long+:} false; then :
10983
10984else
10985  ac_cv_search_getopt_long=no
10986fi
10987rm conftest.$ac_ext
10988LIBS=$ac_func_search_save_LIBS
10989fi
10990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
10991$as_echo "$ac_cv_search_getopt_long" >&6; }
10992ac_res=$ac_cv_search_getopt_long
10993if test "$ac_res" != no; then :
10994  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10995
10996fi
10997
10998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
10999$as_echo_n "checking for library containing crypt... " >&6; }
11000if ${ac_cv_search_crypt+:} false; then :
11001  $as_echo_n "(cached) " >&6
11002else
11003  ac_func_search_save_LIBS=$LIBS
11004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11005/* end confdefs.h.  */
11006
11007/* Override any GCC internal prototype to avoid an error.
11008   Use char because int might match the return type of a GCC
11009   builtin and then its argument prototype would still apply.  */
11010#ifdef __cplusplus
11011extern "C"
11012#endif
11013char crypt ();
11014int
11015main ()
11016{
11017return crypt ();
11018  ;
11019  return 0;
11020}
11021_ACEOF
11022for ac_lib in '' crypt; do
11023  if test -z "$ac_lib"; then
11024    ac_res="none required"
11025  else
11026    ac_res=-l$ac_lib
11027    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11028  fi
11029  if ac_fn_c_try_link "$LINENO"; then :
11030  ac_cv_search_crypt=$ac_res
11031fi
11032rm -f core conftest.err conftest.$ac_objext \
11033    conftest$ac_exeext
11034  if ${ac_cv_search_crypt+:} false; then :
11035  break
11036fi
11037done
11038if ${ac_cv_search_crypt+:} false; then :
11039
11040else
11041  ac_cv_search_crypt=no
11042fi
11043rm conftest.$ac_ext
11044LIBS=$ac_func_search_save_LIBS
11045fi
11046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
11047$as_echo "$ac_cv_search_crypt" >&6; }
11048ac_res=$ac_cv_search_crypt
11049if test "$ac_res" != no; then :
11050  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11051
11052fi
11053
11054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
11055$as_echo_n "checking for library containing shm_open... " >&6; }
11056if ${ac_cv_search_shm_open+:} false; then :
11057  $as_echo_n "(cached) " >&6
11058else
11059  ac_func_search_save_LIBS=$LIBS
11060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11061/* end confdefs.h.  */
11062
11063/* Override any GCC internal prototype to avoid an error.
11064   Use char because int might match the return type of a GCC
11065   builtin and then its argument prototype would still apply.  */
11066#ifdef __cplusplus
11067extern "C"
11068#endif
11069char shm_open ();
11070int
11071main ()
11072{
11073return shm_open ();
11074  ;
11075  return 0;
11076}
11077_ACEOF
11078for ac_lib in '' rt; do
11079  if test -z "$ac_lib"; then
11080    ac_res="none required"
11081  else
11082    ac_res=-l$ac_lib
11083    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11084  fi
11085  if ac_fn_c_try_link "$LINENO"; then :
11086  ac_cv_search_shm_open=$ac_res
11087fi
11088rm -f core conftest.err conftest.$ac_objext \
11089    conftest$ac_exeext
11090  if ${ac_cv_search_shm_open+:} false; then :
11091  break
11092fi
11093done
11094if ${ac_cv_search_shm_open+:} false; then :
11095
11096else
11097  ac_cv_search_shm_open=no
11098fi
11099rm conftest.$ac_ext
11100LIBS=$ac_func_search_save_LIBS
11101fi
11102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
11103$as_echo "$ac_cv_search_shm_open" >&6; }
11104ac_res=$ac_cv_search_shm_open
11105if test "$ac_res" != no; then :
11106  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11107
11108fi
11109
11110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
11111$as_echo_n "checking for library containing shm_unlink... " >&6; }
11112if ${ac_cv_search_shm_unlink+:} false; then :
11113  $as_echo_n "(cached) " >&6
11114else
11115  ac_func_search_save_LIBS=$LIBS
11116cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11117/* end confdefs.h.  */
11118
11119/* Override any GCC internal prototype to avoid an error.
11120   Use char because int might match the return type of a GCC
11121   builtin and then its argument prototype would still apply.  */
11122#ifdef __cplusplus
11123extern "C"
11124#endif
11125char shm_unlink ();
11126int
11127main ()
11128{
11129return shm_unlink ();
11130  ;
11131  return 0;
11132}
11133_ACEOF
11134for ac_lib in '' rt; do
11135  if test -z "$ac_lib"; then
11136    ac_res="none required"
11137  else
11138    ac_res=-l$ac_lib
11139    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11140  fi
11141  if ac_fn_c_try_link "$LINENO"; then :
11142  ac_cv_search_shm_unlink=$ac_res
11143fi
11144rm -f core conftest.err conftest.$ac_objext \
11145    conftest$ac_exeext
11146  if ${ac_cv_search_shm_unlink+:} false; then :
11147  break
11148fi
11149done
11150if ${ac_cv_search_shm_unlink+:} false; then :
11151
11152else
11153  ac_cv_search_shm_unlink=no
11154fi
11155rm conftest.$ac_ext
11156LIBS=$ac_func_search_save_LIBS
11157fi
11158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
11159$as_echo "$ac_cv_search_shm_unlink" >&6; }
11160ac_res=$ac_cv_search_shm_unlink
11161if test "$ac_res" != no; then :
11162  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11163
11164fi
11165
11166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11167$as_echo_n "checking for library containing clock_gettime... " >&6; }
11168if ${ac_cv_search_clock_gettime+:} false; then :
11169  $as_echo_n "(cached) " >&6
11170else
11171  ac_func_search_save_LIBS=$LIBS
11172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11173/* end confdefs.h.  */
11174
11175/* Override any GCC internal prototype to avoid an error.
11176   Use char because int might match the return type of a GCC
11177   builtin and then its argument prototype would still apply.  */
11178#ifdef __cplusplus
11179extern "C"
11180#endif
11181char clock_gettime ();
11182int
11183main ()
11184{
11185return clock_gettime ();
11186  ;
11187  return 0;
11188}
11189_ACEOF
11190for ac_lib in '' rt posix4; do
11191  if test -z "$ac_lib"; then
11192    ac_res="none required"
11193  else
11194    ac_res=-l$ac_lib
11195    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11196  fi
11197  if ac_fn_c_try_link "$LINENO"; then :
11198  ac_cv_search_clock_gettime=$ac_res
11199fi
11200rm -f core conftest.err conftest.$ac_objext \
11201    conftest$ac_exeext
11202  if ${ac_cv_search_clock_gettime+:} false; then :
11203  break
11204fi
11205done
11206if ${ac_cv_search_clock_gettime+:} false; then :
11207
11208else
11209  ac_cv_search_clock_gettime=no
11210fi
11211rm conftest.$ac_ext
11212LIBS=$ac_func_search_save_LIBS
11213fi
11214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11215$as_echo "$ac_cv_search_clock_gettime" >&6; }
11216ac_res=$ac_cv_search_clock_gettime
11217if test "$ac_res" != no; then :
11218  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11219
11220fi
11221
11222# Solaris:
11223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
11224$as_echo_n "checking for library containing fdatasync... " >&6; }
11225if ${ac_cv_search_fdatasync+:} false; then :
11226  $as_echo_n "(cached) " >&6
11227else
11228  ac_func_search_save_LIBS=$LIBS
11229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11230/* end confdefs.h.  */
11231
11232/* Override any GCC internal prototype to avoid an error.
11233   Use char because int might match the return type of a GCC
11234   builtin and then its argument prototype would still apply.  */
11235#ifdef __cplusplus
11236extern "C"
11237#endif
11238char fdatasync ();
11239int
11240main ()
11241{
11242return fdatasync ();
11243  ;
11244  return 0;
11245}
11246_ACEOF
11247for ac_lib in '' rt posix4; do
11248  if test -z "$ac_lib"; then
11249    ac_res="none required"
11250  else
11251    ac_res=-l$ac_lib
11252    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11253  fi
11254  if ac_fn_c_try_link "$LINENO"; then :
11255  ac_cv_search_fdatasync=$ac_res
11256fi
11257rm -f core conftest.err conftest.$ac_objext \
11258    conftest$ac_exeext
11259  if ${ac_cv_search_fdatasync+:} false; then :
11260  break
11261fi
11262done
11263if ${ac_cv_search_fdatasync+:} false; then :
11264
11265else
11266  ac_cv_search_fdatasync=no
11267fi
11268rm conftest.$ac_ext
11269LIBS=$ac_func_search_save_LIBS
11270fi
11271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
11272$as_echo "$ac_cv_search_fdatasync" >&6; }
11273ac_res=$ac_cv_search_fdatasync
11274if test "$ac_res" != no; then :
11275  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11276
11277fi
11278
11279# Required for thread_test.c on Solaris
11280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
11281$as_echo_n "checking for library containing sched_yield... " >&6; }
11282if ${ac_cv_search_sched_yield+:} false; then :
11283  $as_echo_n "(cached) " >&6
11284else
11285  ac_func_search_save_LIBS=$LIBS
11286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11287/* end confdefs.h.  */
11288
11289/* Override any GCC internal prototype to avoid an error.
11290   Use char because int might match the return type of a GCC
11291   builtin and then its argument prototype would still apply.  */
11292#ifdef __cplusplus
11293extern "C"
11294#endif
11295char sched_yield ();
11296int
11297main ()
11298{
11299return sched_yield ();
11300  ;
11301  return 0;
11302}
11303_ACEOF
11304for ac_lib in '' rt; do
11305  if test -z "$ac_lib"; then
11306    ac_res="none required"
11307  else
11308    ac_res=-l$ac_lib
11309    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11310  fi
11311  if ac_fn_c_try_link "$LINENO"; then :
11312  ac_cv_search_sched_yield=$ac_res
11313fi
11314rm -f core conftest.err conftest.$ac_objext \
11315    conftest$ac_exeext
11316  if ${ac_cv_search_sched_yield+:} false; then :
11317  break
11318fi
11319done
11320if ${ac_cv_search_sched_yield+:} false; then :
11321
11322else
11323  ac_cv_search_sched_yield=no
11324fi
11325rm conftest.$ac_ext
11326LIBS=$ac_func_search_save_LIBS
11327fi
11328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
11329$as_echo "$ac_cv_search_sched_yield" >&6; }
11330ac_res=$ac_cv_search_sched_yield
11331if test "$ac_res" != no; then :
11332  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11333
11334fi
11335
11336# Required for thread_test.c on Solaris 2.5:
11337# Other ports use it too (HP-UX) so test unconditionally
11338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
11339$as_echo_n "checking for library containing gethostbyname_r... " >&6; }
11340if ${ac_cv_search_gethostbyname_r+:} false; then :
11341  $as_echo_n "(cached) " >&6
11342else
11343  ac_func_search_save_LIBS=$LIBS
11344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11345/* end confdefs.h.  */
11346
11347/* Override any GCC internal prototype to avoid an error.
11348   Use char because int might match the return type of a GCC
11349   builtin and then its argument prototype would still apply.  */
11350#ifdef __cplusplus
11351extern "C"
11352#endif
11353char gethostbyname_r ();
11354int
11355main ()
11356{
11357return gethostbyname_r ();
11358  ;
11359  return 0;
11360}
11361_ACEOF
11362for ac_lib in '' nsl; do
11363  if test -z "$ac_lib"; then
11364    ac_res="none required"
11365  else
11366    ac_res=-l$ac_lib
11367    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11368  fi
11369  if ac_fn_c_try_link "$LINENO"; then :
11370  ac_cv_search_gethostbyname_r=$ac_res
11371fi
11372rm -f core conftest.err conftest.$ac_objext \
11373    conftest$ac_exeext
11374  if ${ac_cv_search_gethostbyname_r+:} false; then :
11375  break
11376fi
11377done
11378if ${ac_cv_search_gethostbyname_r+:} false; then :
11379
11380else
11381  ac_cv_search_gethostbyname_r=no
11382fi
11383rm conftest.$ac_ext
11384LIBS=$ac_func_search_save_LIBS
11385fi
11386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
11387$as_echo "$ac_cv_search_gethostbyname_r" >&6; }
11388ac_res=$ac_cv_search_gethostbyname_r
11389if test "$ac_res" != no; then :
11390  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11391
11392fi
11393
11394# Cygwin:
11395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
11396$as_echo_n "checking for library containing shmget... " >&6; }
11397if ${ac_cv_search_shmget+:} false; then :
11398  $as_echo_n "(cached) " >&6
11399else
11400  ac_func_search_save_LIBS=$LIBS
11401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11402/* end confdefs.h.  */
11403
11404/* Override any GCC internal prototype to avoid an error.
11405   Use char because int might match the return type of a GCC
11406   builtin and then its argument prototype would still apply.  */
11407#ifdef __cplusplus
11408extern "C"
11409#endif
11410char shmget ();
11411int
11412main ()
11413{
11414return shmget ();
11415  ;
11416  return 0;
11417}
11418_ACEOF
11419for ac_lib in '' cygipc; do
11420  if test -z "$ac_lib"; then
11421    ac_res="none required"
11422  else
11423    ac_res=-l$ac_lib
11424    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11425  fi
11426  if ac_fn_c_try_link "$LINENO"; then :
11427  ac_cv_search_shmget=$ac_res
11428fi
11429rm -f core conftest.err conftest.$ac_objext \
11430    conftest$ac_exeext
11431  if ${ac_cv_search_shmget+:} false; then :
11432  break
11433fi
11434done
11435if ${ac_cv_search_shmget+:} false; then :
11436
11437else
11438  ac_cv_search_shmget=no
11439fi
11440rm conftest.$ac_ext
11441LIBS=$ac_func_search_save_LIBS
11442fi
11443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
11444$as_echo "$ac_cv_search_shmget" >&6; }
11445ac_res=$ac_cv_search_shmget
11446if test "$ac_res" != no; then :
11447  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11448
11449fi
11450
11451
11452if test "$with_readline" = yes; then
11453
11454
11455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
11456$as_echo_n "checking for library containing readline... " >&6; }
11457if ${pgac_cv_check_readline+:} false; then :
11458  $as_echo_n "(cached) " >&6
11459else
11460  pgac_cv_check_readline=no
11461pgac_save_LIBS=$LIBS
11462if test x"$with_libedit_preferred" != x"yes"
11463then	READLINE_ORDER="-lreadline -ledit"
11464else	READLINE_ORDER="-ledit -lreadline"
11465fi
11466for pgac_rllib in $READLINE_ORDER ; do
11467  for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
11468    LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
11469    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11470/* end confdefs.h.  */
11471
11472/* Override any GCC internal prototype to avoid an error.
11473   Use char because int might match the return type of a GCC
11474   builtin and then its argument prototype would still apply.  */
11475#ifdef __cplusplus
11476extern "C"
11477#endif
11478char readline ();
11479int
11480main ()
11481{
11482return readline ();
11483  ;
11484  return 0;
11485}
11486_ACEOF
11487if ac_fn_c_try_link "$LINENO"; then :
11488
11489      # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
11490      # recognize dependent libraries; assume curses is needed if we didn't
11491      # find any dependency.
11492      case $host_os in
11493        netbsd* | openbsd* | irix*)
11494          if test x"$pgac_lib" = x"" ; then
11495            pgac_lib=" -lcurses"
11496          fi ;;
11497      esac
11498
11499      pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
11500      break
11501
11502fi
11503rm -f core conftest.err conftest.$ac_objext \
11504    conftest$ac_exeext conftest.$ac_ext
11505  done
11506  if test "$pgac_cv_check_readline" != no ; then
11507    break
11508  fi
11509done
11510LIBS=$pgac_save_LIBS
11511
11512fi
11513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
11514$as_echo "$pgac_cv_check_readline" >&6; }
11515if test "$pgac_cv_check_readline" != no ; then
11516  LIBS="$pgac_cv_check_readline $LIBS"
11517
11518$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
11519
11520fi
11521
11522
11523  if test x"$pgac_cv_check_readline" = x"no"; then
11524    as_fn_error $? "readline library not found
11525If you have readline already installed, see config.log for details on the
11526failure.  It is possible the compiler isn't looking in the proper directory.
11527Use --without-readline to disable readline support." "$LINENO" 5
11528  fi
11529fi
11530
11531if test "$with_zlib" = yes; then
11532  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
11533$as_echo_n "checking for inflate in -lz... " >&6; }
11534if ${ac_cv_lib_z_inflate+:} false; then :
11535  $as_echo_n "(cached) " >&6
11536else
11537  ac_check_lib_save_LIBS=$LIBS
11538LIBS="-lz  $LIBS"
11539cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11540/* end confdefs.h.  */
11541
11542/* Override any GCC internal prototype to avoid an error.
11543   Use char because int might match the return type of a GCC
11544   builtin and then its argument prototype would still apply.  */
11545#ifdef __cplusplus
11546extern "C"
11547#endif
11548char inflate ();
11549int
11550main ()
11551{
11552return inflate ();
11553  ;
11554  return 0;
11555}
11556_ACEOF
11557if ac_fn_c_try_link "$LINENO"; then :
11558  ac_cv_lib_z_inflate=yes
11559else
11560  ac_cv_lib_z_inflate=no
11561fi
11562rm -f core conftest.err conftest.$ac_objext \
11563    conftest$ac_exeext conftest.$ac_ext
11564LIBS=$ac_check_lib_save_LIBS
11565fi
11566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
11567$as_echo "$ac_cv_lib_z_inflate" >&6; }
11568if test "x$ac_cv_lib_z_inflate" = xyes; then :
11569  cat >>confdefs.h <<_ACEOF
11570#define HAVE_LIBZ 1
11571_ACEOF
11572
11573  LIBS="-lz $LIBS"
11574
11575else
11576  as_fn_error $? "zlib library not found
11577If you have zlib already installed, see config.log for details on the
11578failure.  It is possible the compiler isn't looking in the proper directory.
11579Use --without-zlib to disable zlib support." "$LINENO" 5
11580fi
11581
11582fi
11583
11584if test "$enable_spinlocks" = yes; then
11585
11586$as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
11587
11588else
11589  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11590*** Not using spinlocks will cause poor performance." >&5
11591$as_echo "$as_me: WARNING:
11592*** Not using spinlocks will cause poor performance." >&2;}
11593fi
11594
11595if test "$enable_atomics" = yes; then
11596
11597$as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
11598
11599else
11600  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11601*** Not using atomic operations will cause poor performance." >&5
11602$as_echo "$as_me: WARNING:
11603*** Not using atomic operations will cause poor performance." >&2;}
11604fi
11605
11606if test "$with_gssapi" = yes ; then
11607  if test "$PORTNAME" != "win32"; then
11608    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
11609$as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
11610if ${ac_cv_search_gss_init_sec_context+:} false; then :
11611  $as_echo_n "(cached) " >&6
11612else
11613  ac_func_search_save_LIBS=$LIBS
11614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11615/* end confdefs.h.  */
11616
11617/* Override any GCC internal prototype to avoid an error.
11618   Use char because int might match the return type of a GCC
11619   builtin and then its argument prototype would still apply.  */
11620#ifdef __cplusplus
11621extern "C"
11622#endif
11623char gss_init_sec_context ();
11624int
11625main ()
11626{
11627return gss_init_sec_context ();
11628  ;
11629  return 0;
11630}
11631_ACEOF
11632for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
11633  if test -z "$ac_lib"; then
11634    ac_res="none required"
11635  else
11636    ac_res=-l$ac_lib
11637    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11638  fi
11639  if ac_fn_c_try_link "$LINENO"; then :
11640  ac_cv_search_gss_init_sec_context=$ac_res
11641fi
11642rm -f core conftest.err conftest.$ac_objext \
11643    conftest$ac_exeext
11644  if ${ac_cv_search_gss_init_sec_context+:} false; then :
11645  break
11646fi
11647done
11648if ${ac_cv_search_gss_init_sec_context+:} false; then :
11649
11650else
11651  ac_cv_search_gss_init_sec_context=no
11652fi
11653rm conftest.$ac_ext
11654LIBS=$ac_func_search_save_LIBS
11655fi
11656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
11657$as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
11658ac_res=$ac_cv_search_gss_init_sec_context
11659if test "$ac_res" != no; then :
11660  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11661
11662else
11663  as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
11664fi
11665
11666  else
11667    LIBS="$LIBS -lgssapi32"
11668  fi
11669fi
11670
11671if test "$with_openssl" = yes ; then
11672    if test "$PORTNAME" != "win32"; then
11673     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
11674$as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
11675if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
11676  $as_echo_n "(cached) " >&6
11677else
11678  ac_check_lib_save_LIBS=$LIBS
11679LIBS="-lcrypto  $LIBS"
11680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11681/* end confdefs.h.  */
11682
11683/* Override any GCC internal prototype to avoid an error.
11684   Use char because int might match the return type of a GCC
11685   builtin and then its argument prototype would still apply.  */
11686#ifdef __cplusplus
11687extern "C"
11688#endif
11689char CRYPTO_new_ex_data ();
11690int
11691main ()
11692{
11693return CRYPTO_new_ex_data ();
11694  ;
11695  return 0;
11696}
11697_ACEOF
11698if ac_fn_c_try_link "$LINENO"; then :
11699  ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
11700else
11701  ac_cv_lib_crypto_CRYPTO_new_ex_data=no
11702fi
11703rm -f core conftest.err conftest.$ac_objext \
11704    conftest$ac_exeext conftest.$ac_ext
11705LIBS=$ac_check_lib_save_LIBS
11706fi
11707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
11708$as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
11709if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
11710  cat >>confdefs.h <<_ACEOF
11711#define HAVE_LIBCRYPTO 1
11712_ACEOF
11713
11714  LIBS="-lcrypto $LIBS"
11715
11716else
11717  as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
11718fi
11719
11720     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
11721$as_echo_n "checking for SSL_new in -lssl... " >&6; }
11722if ${ac_cv_lib_ssl_SSL_new+:} false; then :
11723  $as_echo_n "(cached) " >&6
11724else
11725  ac_check_lib_save_LIBS=$LIBS
11726LIBS="-lssl  $LIBS"
11727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11728/* end confdefs.h.  */
11729
11730/* Override any GCC internal prototype to avoid an error.
11731   Use char because int might match the return type of a GCC
11732   builtin and then its argument prototype would still apply.  */
11733#ifdef __cplusplus
11734extern "C"
11735#endif
11736char SSL_new ();
11737int
11738main ()
11739{
11740return SSL_new ();
11741  ;
11742  return 0;
11743}
11744_ACEOF
11745if ac_fn_c_try_link "$LINENO"; then :
11746  ac_cv_lib_ssl_SSL_new=yes
11747else
11748  ac_cv_lib_ssl_SSL_new=no
11749fi
11750rm -f core conftest.err conftest.$ac_objext \
11751    conftest$ac_exeext conftest.$ac_ext
11752LIBS=$ac_check_lib_save_LIBS
11753fi
11754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
11755$as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
11756if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
11757  cat >>confdefs.h <<_ACEOF
11758#define HAVE_LIBSSL 1
11759_ACEOF
11760
11761  LIBS="-lssl $LIBS"
11762
11763else
11764  as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
11765fi
11766
11767  else
11768     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
11769$as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
11770if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
11771  $as_echo_n "(cached) " >&6
11772else
11773  ac_func_search_save_LIBS=$LIBS
11774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11775/* end confdefs.h.  */
11776
11777/* Override any GCC internal prototype to avoid an error.
11778   Use char because int might match the return type of a GCC
11779   builtin and then its argument prototype would still apply.  */
11780#ifdef __cplusplus
11781extern "C"
11782#endif
11783char CRYPTO_new_ex_data ();
11784int
11785main ()
11786{
11787return CRYPTO_new_ex_data ();
11788  ;
11789  return 0;
11790}
11791_ACEOF
11792for ac_lib in '' eay32 crypto; do
11793  if test -z "$ac_lib"; then
11794    ac_res="none required"
11795  else
11796    ac_res=-l$ac_lib
11797    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11798  fi
11799  if ac_fn_c_try_link "$LINENO"; then :
11800  ac_cv_search_CRYPTO_new_ex_data=$ac_res
11801fi
11802rm -f core conftest.err conftest.$ac_objext \
11803    conftest$ac_exeext
11804  if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
11805  break
11806fi
11807done
11808if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
11809
11810else
11811  ac_cv_search_CRYPTO_new_ex_data=no
11812fi
11813rm conftest.$ac_ext
11814LIBS=$ac_func_search_save_LIBS
11815fi
11816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
11817$as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
11818ac_res=$ac_cv_search_CRYPTO_new_ex_data
11819if test "$ac_res" != no; then :
11820  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11821
11822else
11823  as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
11824fi
11825
11826     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
11827$as_echo_n "checking for library containing SSL_new... " >&6; }
11828if ${ac_cv_search_SSL_new+:} false; then :
11829  $as_echo_n "(cached) " >&6
11830else
11831  ac_func_search_save_LIBS=$LIBS
11832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11833/* end confdefs.h.  */
11834
11835/* Override any GCC internal prototype to avoid an error.
11836   Use char because int might match the return type of a GCC
11837   builtin and then its argument prototype would still apply.  */
11838#ifdef __cplusplus
11839extern "C"
11840#endif
11841char SSL_new ();
11842int
11843main ()
11844{
11845return SSL_new ();
11846  ;
11847  return 0;
11848}
11849_ACEOF
11850for ac_lib in '' ssleay32 ssl; do
11851  if test -z "$ac_lib"; then
11852    ac_res="none required"
11853  else
11854    ac_res=-l$ac_lib
11855    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11856  fi
11857  if ac_fn_c_try_link "$LINENO"; then :
11858  ac_cv_search_SSL_new=$ac_res
11859fi
11860rm -f core conftest.err conftest.$ac_objext \
11861    conftest$ac_exeext
11862  if ${ac_cv_search_SSL_new+:} false; then :
11863  break
11864fi
11865done
11866if ${ac_cv_search_SSL_new+:} false; then :
11867
11868else
11869  ac_cv_search_SSL_new=no
11870fi
11871rm conftest.$ac_ext
11872LIBS=$ac_func_search_save_LIBS
11873fi
11874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
11875$as_echo "$ac_cv_search_SSL_new" >&6; }
11876ac_res=$ac_cv_search_SSL_new
11877if test "$ac_res" != no; then :
11878  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11879
11880else
11881  as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
11882fi
11883
11884  fi
11885  for ac_func in SSL_get_current_compression X509_get_signature_nid
11886do :
11887  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11888ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11889if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11890  cat >>confdefs.h <<_ACEOF
11891#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11892_ACEOF
11893
11894fi
11895done
11896
11897  # Functions introduced in OpenSSL 1.1.0. We used to check for
11898  # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
11899  # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
11900  # doesn't have these OpenSSL 1.1.0 functions. So check for individual
11901  # functions.
11902  for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL
11903do :
11904  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11905ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11906if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11907  cat >>confdefs.h <<_ACEOF
11908#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11909_ACEOF
11910
11911fi
11912done
11913
11914  # OpenSSL versions before 1.1.0 required setting callback functions, for
11915  # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
11916  # function was removed.
11917  for ac_func in CRYPTO_lock
11918do :
11919  ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
11920if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
11921  cat >>confdefs.h <<_ACEOF
11922#define HAVE_CRYPTO_LOCK 1
11923_ACEOF
11924
11925fi
11926done
11927
11928  # SSL_clear_options is a macro in OpenSSL from 0.9.8 to 1.0.2, and
11929  # a function from 1.1.0 onwards so we cannot use AC_CHECK_FUNCS.
11930  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_clear_options" >&5
11931$as_echo_n "checking for SSL_clear_options... " >&6; }
11932if ${ac_cv_func_ssl_clear_options+:} false; then :
11933  $as_echo_n "(cached) " >&6
11934else
11935  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11936/* end confdefs.h.  */
11937
11938  #include <openssl/ssl.h>
11939  #include <openssl/bio.h>
11940  SSL *ssl;
11941
11942int
11943main ()
11944{
11945return SSL_clear_options(ssl, 0);
11946  ;
11947  return 0;
11948}
11949_ACEOF
11950if ac_fn_c_try_link "$LINENO"; then :
11951  ac_cv_func_ssl_clear_options=yes
11952else
11953  ac_cv_func_ssl_clear_options=no
11954fi
11955rm -f core conftest.err conftest.$ac_objext \
11956    conftest$ac_exeext conftest.$ac_ext
11957fi
11958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_ssl_clear_options" >&5
11959$as_echo "$ac_cv_func_ssl_clear_options" >&6; }
11960  if test $ac_cv_func_ssl_clear_options = yes ; then
11961
11962$as_echo "#define HAVE_SSL_CLEAR_OPTIONS 1" >>confdefs.h
11963
11964  fi
11965fi
11966
11967if test "$with_pam" = yes ; then
11968  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
11969$as_echo_n "checking for pam_start in -lpam... " >&6; }
11970if ${ac_cv_lib_pam_pam_start+:} false; then :
11971  $as_echo_n "(cached) " >&6
11972else
11973  ac_check_lib_save_LIBS=$LIBS
11974LIBS="-lpam  $LIBS"
11975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11976/* end confdefs.h.  */
11977
11978/* Override any GCC internal prototype to avoid an error.
11979   Use char because int might match the return type of a GCC
11980   builtin and then its argument prototype would still apply.  */
11981#ifdef __cplusplus
11982extern "C"
11983#endif
11984char pam_start ();
11985int
11986main ()
11987{
11988return pam_start ();
11989  ;
11990  return 0;
11991}
11992_ACEOF
11993if ac_fn_c_try_link "$LINENO"; then :
11994  ac_cv_lib_pam_pam_start=yes
11995else
11996  ac_cv_lib_pam_pam_start=no
11997fi
11998rm -f core conftest.err conftest.$ac_objext \
11999    conftest$ac_exeext conftest.$ac_ext
12000LIBS=$ac_check_lib_save_LIBS
12001fi
12002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
12003$as_echo "$ac_cv_lib_pam_pam_start" >&6; }
12004if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
12005  cat >>confdefs.h <<_ACEOF
12006#define HAVE_LIBPAM 1
12007_ACEOF
12008
12009  LIBS="-lpam $LIBS"
12010
12011else
12012  as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
12013fi
12014
12015fi
12016
12017if test "$with_libxml" = yes ; then
12018  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
12019$as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
12020if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
12021  $as_echo_n "(cached) " >&6
12022else
12023  ac_check_lib_save_LIBS=$LIBS
12024LIBS="-lxml2  $LIBS"
12025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12026/* end confdefs.h.  */
12027
12028/* Override any GCC internal prototype to avoid an error.
12029   Use char because int might match the return type of a GCC
12030   builtin and then its argument prototype would still apply.  */
12031#ifdef __cplusplus
12032extern "C"
12033#endif
12034char xmlSaveToBuffer ();
12035int
12036main ()
12037{
12038return xmlSaveToBuffer ();
12039  ;
12040  return 0;
12041}
12042_ACEOF
12043if ac_fn_c_try_link "$LINENO"; then :
12044  ac_cv_lib_xml2_xmlSaveToBuffer=yes
12045else
12046  ac_cv_lib_xml2_xmlSaveToBuffer=no
12047fi
12048rm -f core conftest.err conftest.$ac_objext \
12049    conftest$ac_exeext conftest.$ac_ext
12050LIBS=$ac_check_lib_save_LIBS
12051fi
12052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
12053$as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
12054if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
12055  cat >>confdefs.h <<_ACEOF
12056#define HAVE_LIBXML2 1
12057_ACEOF
12058
12059  LIBS="-lxml2 $LIBS"
12060
12061else
12062  as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
12063fi
12064
12065fi
12066
12067if test "$with_libxslt" = yes ; then
12068  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
12069$as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
12070if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
12071  $as_echo_n "(cached) " >&6
12072else
12073  ac_check_lib_save_LIBS=$LIBS
12074LIBS="-lxslt  $LIBS"
12075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12076/* end confdefs.h.  */
12077
12078/* Override any GCC internal prototype to avoid an error.
12079   Use char because int might match the return type of a GCC
12080   builtin and then its argument prototype would still apply.  */
12081#ifdef __cplusplus
12082extern "C"
12083#endif
12084char xsltCleanupGlobals ();
12085int
12086main ()
12087{
12088return xsltCleanupGlobals ();
12089  ;
12090  return 0;
12091}
12092_ACEOF
12093if ac_fn_c_try_link "$LINENO"; then :
12094  ac_cv_lib_xslt_xsltCleanupGlobals=yes
12095else
12096  ac_cv_lib_xslt_xsltCleanupGlobals=no
12097fi
12098rm -f core conftest.err conftest.$ac_objext \
12099    conftest$ac_exeext conftest.$ac_ext
12100LIBS=$ac_check_lib_save_LIBS
12101fi
12102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
12103$as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
12104if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
12105  cat >>confdefs.h <<_ACEOF
12106#define HAVE_LIBXSLT 1
12107_ACEOF
12108
12109  LIBS="-lxslt $LIBS"
12110
12111else
12112  as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
12113fi
12114
12115fi
12116
12117# Note: We can test for libldap_r only after we know PTHREAD_LIBS;
12118# also, on AIX, we may need to have openssl in LIBS for this step.
12119if test "$with_ldap" = yes ; then
12120  _LIBS="$LIBS"
12121  if test "$PORTNAME" != "win32"; then
12122    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12123$as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12124if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12125  $as_echo_n "(cached) " >&6
12126else
12127  ac_check_lib_save_LIBS=$LIBS
12128LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12130/* end confdefs.h.  */
12131
12132/* Override any GCC internal prototype to avoid an error.
12133   Use char because int might match the return type of a GCC
12134   builtin and then its argument prototype would still apply.  */
12135#ifdef __cplusplus
12136extern "C"
12137#endif
12138char ldap_bind ();
12139int
12140main ()
12141{
12142return ldap_bind ();
12143  ;
12144  return 0;
12145}
12146_ACEOF
12147if ac_fn_c_try_link "$LINENO"; then :
12148  ac_cv_lib_ldap_ldap_bind=yes
12149else
12150  ac_cv_lib_ldap_ldap_bind=no
12151fi
12152rm -f core conftest.err conftest.$ac_objext \
12153    conftest$ac_exeext conftest.$ac_ext
12154LIBS=$ac_check_lib_save_LIBS
12155fi
12156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12157$as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12158if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12159  cat >>confdefs.h <<_ACEOF
12160#define HAVE_LIBLDAP 1
12161_ACEOF
12162
12163  LIBS="-lldap $LIBS"
12164
12165else
12166  as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12167fi
12168
12169    LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12170    # This test is carried out against libldap.
12171    for ac_func in ldap_initialize
12172do :
12173  ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
12174if test "x$ac_cv_func_ldap_initialize" = xyes; then :
12175  cat >>confdefs.h <<_ACEOF
12176#define HAVE_LDAP_INITIALIZE 1
12177_ACEOF
12178
12179fi
12180done
12181
12182    if test "$enable_thread_safety" = yes; then
12183      # Use ldap_r for FE if available, else assume ldap is thread-safe.
12184      # On some platforms ldap_r fails to link without PTHREAD_LIBS.
12185      LIBS="$_LIBS"
12186      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap_r" >&5
12187$as_echo_n "checking for ldap_bind in -lldap_r... " >&6; }
12188if ${ac_cv_lib_ldap_r_ldap_bind+:} false; then :
12189  $as_echo_n "(cached) " >&6
12190else
12191  ac_check_lib_save_LIBS=$LIBS
12192LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12194/* end confdefs.h.  */
12195
12196/* Override any GCC internal prototype to avoid an error.
12197   Use char because int might match the return type of a GCC
12198   builtin and then its argument prototype would still apply.  */
12199#ifdef __cplusplus
12200extern "C"
12201#endif
12202char ldap_bind ();
12203int
12204main ()
12205{
12206return ldap_bind ();
12207  ;
12208  return 0;
12209}
12210_ACEOF
12211if ac_fn_c_try_link "$LINENO"; then :
12212  ac_cv_lib_ldap_r_ldap_bind=yes
12213else
12214  ac_cv_lib_ldap_r_ldap_bind=no
12215fi
12216rm -f core conftest.err conftest.$ac_objext \
12217    conftest$ac_exeext conftest.$ac_ext
12218LIBS=$ac_check_lib_save_LIBS
12219fi
12220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_bind" >&5
12221$as_echo "$ac_cv_lib_ldap_r_ldap_bind" >&6; }
12222if test "x$ac_cv_lib_ldap_r_ldap_bind" = xyes; then :
12223  LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12224else
12225  LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12226fi
12227
12228    else
12229      LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12230    fi
12231  else
12232    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12233$as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12234if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12235  $as_echo_n "(cached) " >&6
12236else
12237  ac_check_lib_save_LIBS=$LIBS
12238LIBS="-lwldap32  $LIBS"
12239cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12240/* end confdefs.h.  */
12241
12242/* Override any GCC internal prototype to avoid an error.
12243   Use char because int might match the return type of a GCC
12244   builtin and then its argument prototype would still apply.  */
12245#ifdef __cplusplus
12246extern "C"
12247#endif
12248char ldap_bind ();
12249int
12250main ()
12251{
12252return ldap_bind ();
12253  ;
12254  return 0;
12255}
12256_ACEOF
12257if ac_fn_c_try_link "$LINENO"; then :
12258  ac_cv_lib_wldap32_ldap_bind=yes
12259else
12260  ac_cv_lib_wldap32_ldap_bind=no
12261fi
12262rm -f core conftest.err conftest.$ac_objext \
12263    conftest$ac_exeext conftest.$ac_ext
12264LIBS=$ac_check_lib_save_LIBS
12265fi
12266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12267$as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12268if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12269  cat >>confdefs.h <<_ACEOF
12270#define HAVE_LIBWLDAP32 1
12271_ACEOF
12272
12273  LIBS="-lwldap32 $LIBS"
12274
12275else
12276  as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
12277fi
12278
12279    LDAP_LIBS_FE="-lwldap32"
12280    LDAP_LIBS_BE="-lwldap32"
12281  fi
12282  LIBS="$_LIBS"
12283fi
12284
12285
12286
12287# for contrib/sepgsql
12288if test "$with_selinux" = yes; then
12289  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
12290$as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
12291if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
12292  $as_echo_n "(cached) " >&6
12293else
12294  ac_check_lib_save_LIBS=$LIBS
12295LIBS="-lselinux  $LIBS"
12296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12297/* end confdefs.h.  */
12298
12299/* Override any GCC internal prototype to avoid an error.
12300   Use char because int might match the return type of a GCC
12301   builtin and then its argument prototype would still apply.  */
12302#ifdef __cplusplus
12303extern "C"
12304#endif
12305char security_compute_create_name ();
12306int
12307main ()
12308{
12309return security_compute_create_name ();
12310  ;
12311  return 0;
12312}
12313_ACEOF
12314if ac_fn_c_try_link "$LINENO"; then :
12315  ac_cv_lib_selinux_security_compute_create_name=yes
12316else
12317  ac_cv_lib_selinux_security_compute_create_name=no
12318fi
12319rm -f core conftest.err conftest.$ac_objext \
12320    conftest$ac_exeext conftest.$ac_ext
12321LIBS=$ac_check_lib_save_LIBS
12322fi
12323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
12324$as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
12325if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
12326  cat >>confdefs.h <<_ACEOF
12327#define HAVE_LIBSELINUX 1
12328_ACEOF
12329
12330  LIBS="-lselinux $LIBS"
12331
12332else
12333  as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
12334fi
12335
12336fi
12337
12338# for contrib/uuid-ossp
12339if test "$with_uuid" = bsd ; then
12340  # On BSD, the UUID functions are in libc
12341  ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
12342if test "x$ac_cv_func_uuid_to_string" = xyes; then :
12343  UUID_LIBS=""
12344else
12345  as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
12346fi
12347
12348elif test "$with_uuid" = e2fs ; then
12349  # On macOS, the UUID functions are in libc
12350  ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
12351if test "x$ac_cv_func_uuid_generate" = xyes; then :
12352  UUID_LIBS=""
12353else
12354  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
12355$as_echo_n "checking for uuid_generate in -luuid... " >&6; }
12356if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
12357  $as_echo_n "(cached) " >&6
12358else
12359  ac_check_lib_save_LIBS=$LIBS
12360LIBS="-luuid  $LIBS"
12361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12362/* end confdefs.h.  */
12363
12364/* Override any GCC internal prototype to avoid an error.
12365   Use char because int might match the return type of a GCC
12366   builtin and then its argument prototype would still apply.  */
12367#ifdef __cplusplus
12368extern "C"
12369#endif
12370char uuid_generate ();
12371int
12372main ()
12373{
12374return uuid_generate ();
12375  ;
12376  return 0;
12377}
12378_ACEOF
12379if ac_fn_c_try_link "$LINENO"; then :
12380  ac_cv_lib_uuid_uuid_generate=yes
12381else
12382  ac_cv_lib_uuid_uuid_generate=no
12383fi
12384rm -f core conftest.err conftest.$ac_objext \
12385    conftest$ac_exeext conftest.$ac_ext
12386LIBS=$ac_check_lib_save_LIBS
12387fi
12388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
12389$as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
12390if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
12391  UUID_LIBS="-luuid"
12392else
12393  as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
12394fi
12395
12396fi
12397
12398elif test "$with_uuid" = ossp ; then
12399  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
12400$as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
12401if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
12402  $as_echo_n "(cached) " >&6
12403else
12404  ac_check_lib_save_LIBS=$LIBS
12405LIBS="-lossp-uuid  $LIBS"
12406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12407/* end confdefs.h.  */
12408
12409/* Override any GCC internal prototype to avoid an error.
12410   Use char because int might match the return type of a GCC
12411   builtin and then its argument prototype would still apply.  */
12412#ifdef __cplusplus
12413extern "C"
12414#endif
12415char uuid_export ();
12416int
12417main ()
12418{
12419return uuid_export ();
12420  ;
12421  return 0;
12422}
12423_ACEOF
12424if ac_fn_c_try_link "$LINENO"; then :
12425  ac_cv_lib_ossp_uuid_uuid_export=yes
12426else
12427  ac_cv_lib_ossp_uuid_uuid_export=no
12428fi
12429rm -f core conftest.err conftest.$ac_objext \
12430    conftest$ac_exeext conftest.$ac_ext
12431LIBS=$ac_check_lib_save_LIBS
12432fi
12433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
12434$as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
12435if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
12436  UUID_LIBS="-lossp-uuid"
12437else
12438  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
12439$as_echo_n "checking for uuid_export in -luuid... " >&6; }
12440if ${ac_cv_lib_uuid_uuid_export+:} false; then :
12441  $as_echo_n "(cached) " >&6
12442else
12443  ac_check_lib_save_LIBS=$LIBS
12444LIBS="-luuid  $LIBS"
12445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12446/* end confdefs.h.  */
12447
12448/* Override any GCC internal prototype to avoid an error.
12449   Use char because int might match the return type of a GCC
12450   builtin and then its argument prototype would still apply.  */
12451#ifdef __cplusplus
12452extern "C"
12453#endif
12454char uuid_export ();
12455int
12456main ()
12457{
12458return uuid_export ();
12459  ;
12460  return 0;
12461}
12462_ACEOF
12463if ac_fn_c_try_link "$LINENO"; then :
12464  ac_cv_lib_uuid_uuid_export=yes
12465else
12466  ac_cv_lib_uuid_uuid_export=no
12467fi
12468rm -f core conftest.err conftest.$ac_objext \
12469    conftest$ac_exeext conftest.$ac_ext
12470LIBS=$ac_check_lib_save_LIBS
12471fi
12472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
12473$as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
12474if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
12475  UUID_LIBS="-luuid"
12476else
12477  as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
12478fi
12479
12480fi
12481
12482fi
12483
12484
12485
12486##
12487## Header files
12488##
12489
12490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
12491$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
12492if ${ac_cv_header_stdbool_h+:} false; then :
12493  $as_echo_n "(cached) " >&6
12494else
12495  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12496/* end confdefs.h.  */
12497
12498             #include <stdbool.h>
12499             #ifndef bool
12500              "error: bool is not defined"
12501             #endif
12502             #ifndef false
12503              "error: false is not defined"
12504             #endif
12505             #if false
12506              "error: false is not 0"
12507             #endif
12508             #ifndef true
12509              "error: true is not defined"
12510             #endif
12511             #if true != 1
12512              "error: true is not 1"
12513             #endif
12514             #ifndef __bool_true_false_are_defined
12515              "error: __bool_true_false_are_defined is not defined"
12516             #endif
12517
12518             struct s { _Bool s: 1; _Bool t; } s;
12519
12520             char a[true == 1 ? 1 : -1];
12521             char b[false == 0 ? 1 : -1];
12522             char c[__bool_true_false_are_defined == 1 ? 1 : -1];
12523             char d[(bool) 0.5 == true ? 1 : -1];
12524             /* See body of main program for 'e'.  */
12525             char f[(_Bool) 0.0 == false ? 1 : -1];
12526             char g[true];
12527             char h[sizeof (_Bool)];
12528             char i[sizeof s.t];
12529             enum { j = false, k = true, l = false * true, m = true * 256 };
12530             /* The following fails for
12531                HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
12532             _Bool n[m];
12533             char o[sizeof n == m * sizeof n[0] ? 1 : -1];
12534             char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
12535             /* Catch a bug in an HP-UX C compiler.  See
12536                http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
12537                http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
12538              */
12539             _Bool q = true;
12540             _Bool *pq = &q;
12541
12542int
12543main ()
12544{
12545
12546             bool e = &s;
12547             *pq |= q;
12548             *pq |= ! q;
12549             /* Refer to every declared value, to avoid compiler optimizations.  */
12550             return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
12551                     + !m + !n + !o + !p + !q + !pq);
12552
12553  ;
12554  return 0;
12555}
12556_ACEOF
12557if ac_fn_c_try_compile "$LINENO"; then :
12558  ac_cv_header_stdbool_h=yes
12559else
12560  ac_cv_header_stdbool_h=no
12561fi
12562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12563fi
12564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
12565$as_echo "$ac_cv_header_stdbool_h" >&6; }
12566   ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
12567if test "x$ac_cv_type__Bool" = xyes; then :
12568
12569cat >>confdefs.h <<_ACEOF
12570#define HAVE__BOOL 1
12571_ACEOF
12572
12573
12574fi
12575
12576
12577if test $ac_cv_header_stdbool_h = yes; then
12578
12579$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
12580
12581fi
12582
12583
12584for ac_header in atomic.h crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/ipc.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/sockio.h sys/tas.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h
12585do :
12586  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12587ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12588if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12589  cat >>confdefs.h <<_ACEOF
12590#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12591_ACEOF
12592
12593fi
12594
12595done
12596
12597
12598# On BSD, test for net/if.h will fail unless sys/socket.h
12599# is included first.
12600for ac_header in net/if.h
12601do :
12602  ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
12603#include <sys/socket.h>
12604
12605"
12606if test "x$ac_cv_header_net_if_h" = xyes; then :
12607  cat >>confdefs.h <<_ACEOF
12608#define HAVE_NET_IF_H 1
12609_ACEOF
12610
12611fi
12612
12613done
12614
12615
12616# On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
12617# is included first.
12618for ac_header in sys/ucred.h
12619do :
12620  ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
12621#include <sys/param.h>
12622
12623"
12624if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
12625  cat >>confdefs.h <<_ACEOF
12626#define HAVE_SYS_UCRED_H 1
12627_ACEOF
12628
12629fi
12630
12631done
12632
12633
12634# At least on IRIX, test for netinet/tcp.h will fail unless
12635# netinet/in.h is included first.
12636for ac_header in netinet/tcp.h
12637do :
12638  ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
12639#include <netinet/in.h>
12640
12641"
12642if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
12643  cat >>confdefs.h <<_ACEOF
12644#define HAVE_NETINET_TCP_H 1
12645_ACEOF
12646
12647fi
12648
12649done
12650
12651
12652if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
12653  for ac_header in readline/readline.h
12654do :
12655  ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12656if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12657  cat >>confdefs.h <<_ACEOF
12658#define HAVE_READLINE_READLINE_H 1
12659_ACEOF
12660
12661else
12662  for ac_header in readline.h
12663do :
12664  ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12665if test "x$ac_cv_header_readline_h" = xyes; then :
12666  cat >>confdefs.h <<_ACEOF
12667#define HAVE_READLINE_H 1
12668_ACEOF
12669
12670else
12671  as_fn_error $? "readline header not found
12672If you have readline already installed, see config.log for details on the
12673failure.  It is possible the compiler isn't looking in the proper directory.
12674Use --without-readline to disable readline support." "$LINENO" 5
12675fi
12676
12677done
12678
12679fi
12680
12681done
12682
12683  for ac_header in readline/history.h
12684do :
12685  ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
12686if test "x$ac_cv_header_readline_history_h" = xyes; then :
12687  cat >>confdefs.h <<_ACEOF
12688#define HAVE_READLINE_HISTORY_H 1
12689_ACEOF
12690
12691else
12692  for ac_header in history.h
12693do :
12694  ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12695if test "x$ac_cv_header_history_h" = xyes; then :
12696  cat >>confdefs.h <<_ACEOF
12697#define HAVE_HISTORY_H 1
12698_ACEOF
12699
12700else
12701  as_fn_error $? "history header not found
12702If you have readline already installed, see config.log for details on the
12703failure.  It is possible the compiler isn't looking in the proper directory.
12704Use --without-readline to disable readline support." "$LINENO" 5
12705fi
12706
12707done
12708
12709fi
12710
12711done
12712
12713fi
12714
12715if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
12716# Some installations of libedit usurp /usr/include/readline/, which seems
12717# bad practice, since in combined installations readline will have its headers
12718# there.  We might have to resort to AC_EGREP checks to make sure we found
12719# the proper header...
12720  for ac_header in editline/readline.h
12721do :
12722  ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
12723if test "x$ac_cv_header_editline_readline_h" = xyes; then :
12724  cat >>confdefs.h <<_ACEOF
12725#define HAVE_EDITLINE_READLINE_H 1
12726_ACEOF
12727
12728else
12729  for ac_header in readline.h
12730do :
12731  ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12732if test "x$ac_cv_header_readline_h" = xyes; then :
12733  cat >>confdefs.h <<_ACEOF
12734#define HAVE_READLINE_H 1
12735_ACEOF
12736
12737else
12738  for ac_header in readline/readline.h
12739do :
12740  ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12741if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12742  cat >>confdefs.h <<_ACEOF
12743#define HAVE_READLINE_READLINE_H 1
12744_ACEOF
12745
12746else
12747  as_fn_error $? "readline header not found
12748If you have libedit already installed, see config.log for details on the
12749failure.  It is possible the compiler isn't looking in the proper directory.
12750Use --without-readline to disable libedit support." "$LINENO" 5
12751fi
12752
12753done
12754
12755fi
12756
12757done
12758
12759fi
12760
12761done
12762
12763# Note: in a libedit installation, history.h is sometimes a dummy, and may
12764# not be there at all.  Hence, don't complain if not found.  We must check
12765# though, since in yet other versions it is an independent header.
12766  for ac_header in editline/history.h
12767do :
12768  ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
12769if test "x$ac_cv_header_editline_history_h" = xyes; then :
12770  cat >>confdefs.h <<_ACEOF
12771#define HAVE_EDITLINE_HISTORY_H 1
12772_ACEOF
12773
12774else
12775  for ac_header in history.h
12776do :
12777  ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12778if test "x$ac_cv_header_history_h" = xyes; then :
12779  cat >>confdefs.h <<_ACEOF
12780#define HAVE_HISTORY_H 1
12781_ACEOF
12782
12783else
12784  for ac_header in readline/history.h
12785do :
12786  ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
12787if test "x$ac_cv_header_readline_history_h" = xyes; then :
12788  cat >>confdefs.h <<_ACEOF
12789#define HAVE_READLINE_HISTORY_H 1
12790_ACEOF
12791
12792fi
12793
12794done
12795
12796fi
12797
12798done
12799
12800fi
12801
12802done
12803
12804fi
12805
12806if test "$with_zlib" = yes; then
12807  ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
12808if test "x$ac_cv_header_zlib_h" = xyes; then :
12809
12810else
12811  as_fn_error $? "zlib header not found
12812If you have zlib already installed, see config.log for details on the
12813failure.  It is possible the compiler isn't looking in the proper directory.
12814Use --without-zlib to disable zlib support." "$LINENO" 5
12815fi
12816
12817
12818fi
12819
12820if test "$with_gssapi" = yes ; then
12821  for ac_header in gssapi/gssapi.h
12822do :
12823  ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
12824if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
12825  cat >>confdefs.h <<_ACEOF
12826#define HAVE_GSSAPI_GSSAPI_H 1
12827_ACEOF
12828
12829else
12830  for ac_header in gssapi.h
12831do :
12832  ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
12833if test "x$ac_cv_header_gssapi_h" = xyes; then :
12834  cat >>confdefs.h <<_ACEOF
12835#define HAVE_GSSAPI_H 1
12836_ACEOF
12837
12838else
12839  as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
12840fi
12841
12842done
12843
12844fi
12845
12846done
12847
12848fi
12849
12850if test "$with_openssl" = yes ; then
12851  ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
12852if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
12853
12854else
12855  as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
12856fi
12857
12858
12859  ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
12860if test "x$ac_cv_header_openssl_err_h" = xyes; then :
12861
12862else
12863  as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
12864fi
12865
12866
12867fi
12868
12869if test "$with_pam" = yes ; then
12870  for ac_header in security/pam_appl.h
12871do :
12872  ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
12873if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
12874  cat >>confdefs.h <<_ACEOF
12875#define HAVE_SECURITY_PAM_APPL_H 1
12876_ACEOF
12877
12878else
12879  for ac_header in pam/pam_appl.h
12880do :
12881  ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
12882if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
12883  cat >>confdefs.h <<_ACEOF
12884#define HAVE_PAM_PAM_APPL_H 1
12885_ACEOF
12886
12887else
12888  as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
12889fi
12890
12891done
12892
12893fi
12894
12895done
12896
12897fi
12898
12899if test "$with_bsd_auth" = yes ; then
12900  ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
12901if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
12902
12903else
12904  as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
12905fi
12906
12907
12908fi
12909
12910if test "$with_systemd" = yes ; then
12911  ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
12912if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
12913
12914else
12915  as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
12916fi
12917
12918
12919fi
12920
12921if test "$with_libxml" = yes ; then
12922  ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
12923if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
12924
12925else
12926  as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
12927fi
12928
12929
12930fi
12931
12932if test "$with_libxslt" = yes ; then
12933  ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
12934if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
12935
12936else
12937  as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
12938fi
12939
12940
12941fi
12942
12943if test "$with_ldap" = yes ; then
12944  if test "$PORTNAME" != "win32"; then
12945     for ac_header in ldap.h
12946do :
12947  ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
12948if test "x$ac_cv_header_ldap_h" = xyes; then :
12949  cat >>confdefs.h <<_ACEOF
12950#define HAVE_LDAP_H 1
12951_ACEOF
12952
12953else
12954  as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
12955fi
12956
12957done
12958
12959     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
12960$as_echo_n "checking for compatible LDAP implementation... " >&6; }
12961if ${pgac_cv_ldap_safe+:} false; then :
12962  $as_echo_n "(cached) " >&6
12963else
12964  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12965/* end confdefs.h.  */
12966#include <ldap.h>
12967#if !defined(LDAP_VENDOR_VERSION) || \
12968     (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
12969      LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
12970choke me
12971#endif
12972int
12973main ()
12974{
12975
12976  ;
12977  return 0;
12978}
12979_ACEOF
12980if ac_fn_c_try_compile "$LINENO"; then :
12981  pgac_cv_ldap_safe=yes
12982else
12983  pgac_cv_ldap_safe=no
12984fi
12985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12986fi
12987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
12988$as_echo "$pgac_cv_ldap_safe" >&6; }
12989
12990if test "$pgac_cv_ldap_safe" != yes; then
12991  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12992*** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
12993*** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
12994*** also uses LDAP will crash on exit." >&5
12995$as_echo "$as_me: WARNING:
12996*** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
12997*** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
12998*** also uses LDAP will crash on exit." >&2;}
12999fi
13000  else
13001     for ac_header in winldap.h
13002do :
13003  ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
13004#include <windows.h>
13005
13006"
13007if test "x$ac_cv_header_winldap_h" = xyes; then :
13008  cat >>confdefs.h <<_ACEOF
13009#define HAVE_WINLDAP_H 1
13010_ACEOF
13011
13012else
13013  as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
13014fi
13015
13016done
13017
13018  fi
13019fi
13020
13021if test "$with_bonjour" = yes ; then
13022  ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
13023if test "x$ac_cv_header_dns_sd_h" = xyes; then :
13024
13025else
13026  as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
13027fi
13028
13029
13030fi
13031
13032# for contrib/uuid-ossp
13033if test "$with_uuid" = bsd ; then
13034  for ac_header in uuid.h
13035do :
13036  ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13037if test "x$ac_cv_header_uuid_h" = xyes; then :
13038  cat >>confdefs.h <<_ACEOF
13039#define HAVE_UUID_H 1
13040_ACEOF
13041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13042/* end confdefs.h.  */
13043#include <uuid.h>
13044
13045_ACEOF
13046if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13047  $EGREP "uuid_to_string" >/dev/null 2>&1; then :
13048
13049else
13050  as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
13051fi
13052rm -f conftest*
13053
13054else
13055  as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
13056fi
13057
13058done
13059
13060elif test "$with_uuid" = e2fs ; then
13061  for ac_header in uuid/uuid.h
13062do :
13063  ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
13064if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
13065  cat >>confdefs.h <<_ACEOF
13066#define HAVE_UUID_UUID_H 1
13067_ACEOF
13068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13069/* end confdefs.h.  */
13070#include <uuid/uuid.h>
13071
13072_ACEOF
13073if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13074  $EGREP "uuid_generate" >/dev/null 2>&1; then :
13075
13076else
13077  as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
13078fi
13079rm -f conftest*
13080
13081else
13082  for ac_header in uuid.h
13083do :
13084  ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13085if test "x$ac_cv_header_uuid_h" = xyes; then :
13086  cat >>confdefs.h <<_ACEOF
13087#define HAVE_UUID_H 1
13088_ACEOF
13089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13090/* end confdefs.h.  */
13091#include <uuid.h>
13092
13093_ACEOF
13094if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13095  $EGREP "uuid_generate" >/dev/null 2>&1; then :
13096
13097else
13098  as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
13099fi
13100rm -f conftest*
13101
13102else
13103  as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
13104fi
13105
13106done
13107
13108fi
13109
13110done
13111
13112elif test "$with_uuid" = ossp ; then
13113  for ac_header in ossp/uuid.h
13114do :
13115  ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
13116if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
13117  cat >>confdefs.h <<_ACEOF
13118#define HAVE_OSSP_UUID_H 1
13119_ACEOF
13120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13121/* end confdefs.h.  */
13122#include <ossp/uuid.h>
13123
13124_ACEOF
13125if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13126  $EGREP "uuid_export" >/dev/null 2>&1; then :
13127
13128else
13129  as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
13130fi
13131rm -f conftest*
13132
13133else
13134  for ac_header in uuid.h
13135do :
13136  ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13137if test "x$ac_cv_header_uuid_h" = xyes; then :
13138  cat >>confdefs.h <<_ACEOF
13139#define HAVE_UUID_H 1
13140_ACEOF
13141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13142/* end confdefs.h.  */
13143#include <uuid.h>
13144
13145_ACEOF
13146if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13147  $EGREP "uuid_export" >/dev/null 2>&1; then :
13148
13149else
13150  as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
13151fi
13152rm -f conftest*
13153
13154else
13155  as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
13156fi
13157
13158done
13159
13160fi
13161
13162done
13163
13164fi
13165
13166if test "$PORTNAME" = "win32" ; then
13167   for ac_header in crtdefs.h
13168do :
13169  ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
13170if test "x$ac_cv_header_crtdefs_h" = xyes; then :
13171  cat >>confdefs.h <<_ACEOF
13172#define HAVE_CRTDEFS_H 1
13173_ACEOF
13174
13175fi
13176
13177done
13178
13179fi
13180
13181##
13182## Types, structures, compiler characteristics
13183##
13184
13185  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13186$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13187if ${ac_cv_c_bigendian+:} false; then :
13188  $as_echo_n "(cached) " >&6
13189else
13190  ac_cv_c_bigendian=unknown
13191    # See if we're dealing with a universal compiler.
13192    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13193/* end confdefs.h.  */
13194#ifndef __APPLE_CC__
13195	       not a universal capable compiler
13196	     #endif
13197	     typedef int dummy;
13198
13199_ACEOF
13200if ac_fn_c_try_compile "$LINENO"; then :
13201
13202	# Check for potential -arch flags.  It is not universal unless
13203	# there are at least two -arch flags with different values.
13204	ac_arch=
13205	ac_prev=
13206	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13207	 if test -n "$ac_prev"; then
13208	   case $ac_word in
13209	     i?86 | x86_64 | ppc | ppc64)
13210	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13211		 ac_arch=$ac_word
13212	       else
13213		 ac_cv_c_bigendian=universal
13214		 break
13215	       fi
13216	       ;;
13217	   esac
13218	   ac_prev=
13219	 elif test "x$ac_word" = "x-arch"; then
13220	   ac_prev=arch
13221	 fi
13222       done
13223fi
13224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13225    if test $ac_cv_c_bigendian = unknown; then
13226      # See if sys/param.h defines the BYTE_ORDER macro.
13227      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13228/* end confdefs.h.  */
13229#include <sys/types.h>
13230	     #include <sys/param.h>
13231
13232int
13233main ()
13234{
13235#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13236		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13237		     && LITTLE_ENDIAN)
13238	      bogus endian macros
13239	     #endif
13240
13241  ;
13242  return 0;
13243}
13244_ACEOF
13245if ac_fn_c_try_compile "$LINENO"; then :
13246  # It does; now see whether it defined to BIG_ENDIAN or not.
13247	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13248/* end confdefs.h.  */
13249#include <sys/types.h>
13250		#include <sys/param.h>
13251
13252int
13253main ()
13254{
13255#if BYTE_ORDER != BIG_ENDIAN
13256		 not big endian
13257		#endif
13258
13259  ;
13260  return 0;
13261}
13262_ACEOF
13263if ac_fn_c_try_compile "$LINENO"; then :
13264  ac_cv_c_bigendian=yes
13265else
13266  ac_cv_c_bigendian=no
13267fi
13268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13269fi
13270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13271    fi
13272    if test $ac_cv_c_bigendian = unknown; then
13273      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13274      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13275/* end confdefs.h.  */
13276#include <limits.h>
13277
13278int
13279main ()
13280{
13281#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13282	      bogus endian macros
13283	     #endif
13284
13285  ;
13286  return 0;
13287}
13288_ACEOF
13289if ac_fn_c_try_compile "$LINENO"; then :
13290  # It does; now see whether it defined to _BIG_ENDIAN or not.
13291	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13292/* end confdefs.h.  */
13293#include <limits.h>
13294
13295int
13296main ()
13297{
13298#ifndef _BIG_ENDIAN
13299		 not big endian
13300		#endif
13301
13302  ;
13303  return 0;
13304}
13305_ACEOF
13306if ac_fn_c_try_compile "$LINENO"; then :
13307  ac_cv_c_bigendian=yes
13308else
13309  ac_cv_c_bigendian=no
13310fi
13311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13312fi
13313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13314    fi
13315    if test $ac_cv_c_bigendian = unknown; then
13316      # Compile a test program.
13317      if test "$cross_compiling" = yes; then :
13318  # Try to guess by grepping values from an object file.
13319	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13320/* end confdefs.h.  */
13321short int ascii_mm[] =
13322		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13323		short int ascii_ii[] =
13324		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13325		int use_ascii (int i) {
13326		  return ascii_mm[i] + ascii_ii[i];
13327		}
13328		short int ebcdic_ii[] =
13329		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13330		short int ebcdic_mm[] =
13331		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13332		int use_ebcdic (int i) {
13333		  return ebcdic_mm[i] + ebcdic_ii[i];
13334		}
13335		extern int foo;
13336
13337int
13338main ()
13339{
13340return use_ascii (foo) == use_ebcdic (foo);
13341  ;
13342  return 0;
13343}
13344_ACEOF
13345if ac_fn_c_try_compile "$LINENO"; then :
13346  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13347	      ac_cv_c_bigendian=yes
13348	    fi
13349	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13350	      if test "$ac_cv_c_bigendian" = unknown; then
13351		ac_cv_c_bigendian=no
13352	      else
13353		# finding both strings is unlikely to happen, but who knows?
13354		ac_cv_c_bigendian=unknown
13355	      fi
13356	    fi
13357fi
13358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13359else
13360  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13361/* end confdefs.h.  */
13362$ac_includes_default
13363int
13364main ()
13365{
13366
13367	     /* Are we little or big endian?  From Harbison&Steele.  */
13368	     union
13369	     {
13370	       long int l;
13371	       char c[sizeof (long int)];
13372	     } u;
13373	     u.l = 1;
13374	     return u.c[sizeof (long int) - 1] == 1;
13375
13376  ;
13377  return 0;
13378}
13379_ACEOF
13380if ac_fn_c_try_run "$LINENO"; then :
13381  ac_cv_c_bigendian=no
13382else
13383  ac_cv_c_bigendian=yes
13384fi
13385rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13386  conftest.$ac_objext conftest.beam conftest.$ac_ext
13387fi
13388
13389    fi
13390fi
13391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13392$as_echo "$ac_cv_c_bigendian" >&6; }
13393 case $ac_cv_c_bigendian in #(
13394   yes)
13395     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13396;; #(
13397   no)
13398      ;; #(
13399   universal)
13400
13401$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13402
13403     ;; #(
13404   *)
13405     as_fn_error $? "unknown endianness
13406 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13407 esac
13408
13409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
13410$as_echo_n "checking for inline... " >&6; }
13411if ${ac_cv_c_inline+:} false; then :
13412  $as_echo_n "(cached) " >&6
13413else
13414  ac_cv_c_inline=no
13415for ac_kw in inline __inline__ __inline; do
13416  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13417/* end confdefs.h.  */
13418#ifndef __cplusplus
13419typedef int foo_t;
13420static $ac_kw foo_t static_foo () {return 0; }
13421$ac_kw foo_t foo () {return 0; }
13422#endif
13423
13424_ACEOF
13425if ac_fn_c_try_compile "$LINENO"; then :
13426  ac_cv_c_inline=$ac_kw
13427fi
13428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13429  test "$ac_cv_c_inline" != no && break
13430done
13431
13432fi
13433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
13434$as_echo "$ac_cv_c_inline" >&6; }
13435
13436case $ac_cv_c_inline in
13437  inline | yes) ;;
13438  *)
13439    case $ac_cv_c_inline in
13440      no) ac_val=;;
13441      *) ac_val=$ac_cv_c_inline;;
13442    esac
13443    cat >>confdefs.h <<_ACEOF
13444#ifndef __cplusplus
13445#define inline $ac_val
13446#endif
13447_ACEOF
13448    ;;
13449esac
13450
13451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
13452$as_echo_n "checking for printf format archetype... " >&6; }
13453if ${pgac_cv_printf_archetype+:} false; then :
13454  $as_echo_n "(cached) " >&6
13455else
13456  ac_save_c_werror_flag=$ac_c_werror_flag
13457ac_c_werror_flag=yes
13458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13459/* end confdefs.h.  */
13460extern int
13461pgac_write(int ignore, const char *fmt,...)
13462__attribute__((format(gnu_printf, 2, 3)));
13463int
13464main ()
13465{
13466
13467  ;
13468  return 0;
13469}
13470_ACEOF
13471if ac_fn_c_try_compile "$LINENO"; then :
13472  pgac_cv_printf_archetype=gnu_printf
13473else
13474  pgac_cv_printf_archetype=printf
13475fi
13476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13477ac_c_werror_flag=$ac_save_c_werror_flag
13478fi
13479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
13480$as_echo "$pgac_cv_printf_archetype" >&6; }
13481
13482cat >>confdefs.h <<_ACEOF
13483#define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
13484_ACEOF
13485
13486
13487
13488  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
13489$as_echo_n "checking for flexible array members... " >&6; }
13490if ${ac_cv_c_flexmember+:} false; then :
13491  $as_echo_n "(cached) " >&6
13492else
13493  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13494/* end confdefs.h.  */
13495#include <stdlib.h>
13496	    #include <stdio.h>
13497	    #include <stddef.h>
13498	    struct s { int n; double d[]; };
13499int
13500main ()
13501{
13502int m = getchar ();
13503	    struct s *p = malloc (offsetof (struct s, d)
13504				  + m * sizeof (double));
13505	    p->d[0] = 0.0;
13506	    return p->d != (double *) NULL;
13507  ;
13508  return 0;
13509}
13510_ACEOF
13511if ac_fn_c_try_compile "$LINENO"; then :
13512  ac_cv_c_flexmember=yes
13513else
13514  ac_cv_c_flexmember=no
13515fi
13516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13517fi
13518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
13519$as_echo "$ac_cv_c_flexmember" >&6; }
13520  if test $ac_cv_c_flexmember = yes; then
13521
13522$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
13523
13524  else
13525    $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
13526
13527  fi
13528
13529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
13530$as_echo_n "checking for signed types... " >&6; }
13531if ${pgac_cv_c_signed+:} false; then :
13532  $as_echo_n "(cached) " >&6
13533else
13534  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13535/* end confdefs.h.  */
13536
13537int
13538main ()
13539{
13540signed char c; signed short s; signed int i;
13541  ;
13542  return 0;
13543}
13544_ACEOF
13545if ac_fn_c_try_compile "$LINENO"; then :
13546  pgac_cv_c_signed=yes
13547else
13548  pgac_cv_c_signed=no
13549fi
13550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13551fi
13552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
13553$as_echo "$pgac_cv_c_signed" >&6; }
13554if test x"$pgac_cv_c_signed" = xno ; then
13555
13556$as_echo "#define signed /**/" >>confdefs.h
13557
13558fi
13559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
13560$as_echo_n "checking for __func__... " >&6; }
13561if ${pgac_cv_funcname_func_support+:} false; then :
13562  $as_echo_n "(cached) " >&6
13563else
13564  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13565/* end confdefs.h.  */
13566#include <stdio.h>
13567int
13568main ()
13569{
13570printf("%s\n", __func__);
13571  ;
13572  return 0;
13573}
13574_ACEOF
13575if ac_fn_c_try_compile "$LINENO"; then :
13576  pgac_cv_funcname_func_support=yes
13577else
13578  pgac_cv_funcname_func_support=no
13579fi
13580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13581fi
13582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
13583$as_echo "$pgac_cv_funcname_func_support" >&6; }
13584if test x"$pgac_cv_funcname_func_support" = xyes ; then
13585
13586$as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
13587
13588else
13589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
13590$as_echo_n "checking for __FUNCTION__... " >&6; }
13591if ${pgac_cv_funcname_function_support+:} false; then :
13592  $as_echo_n "(cached) " >&6
13593else
13594  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13595/* end confdefs.h.  */
13596#include <stdio.h>
13597int
13598main ()
13599{
13600printf("%s\n", __FUNCTION__);
13601  ;
13602  return 0;
13603}
13604_ACEOF
13605if ac_fn_c_try_compile "$LINENO"; then :
13606  pgac_cv_funcname_function_support=yes
13607else
13608  pgac_cv_funcname_function_support=no
13609fi
13610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13611fi
13612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
13613$as_echo "$pgac_cv_funcname_function_support" >&6; }
13614if test x"$pgac_cv_funcname_function_support" = xyes ; then
13615
13616$as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
13617
13618fi
13619fi
13620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
13621$as_echo_n "checking for _Static_assert... " >&6; }
13622if ${pgac_cv__static_assert+:} false; then :
13623  $as_echo_n "(cached) " >&6
13624else
13625  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13626/* end confdefs.h.  */
13627
13628int
13629main ()
13630{
13631({ _Static_assert(1, "foo"); })
13632  ;
13633  return 0;
13634}
13635_ACEOF
13636if ac_fn_c_try_link "$LINENO"; then :
13637  pgac_cv__static_assert=yes
13638else
13639  pgac_cv__static_assert=no
13640fi
13641rm -f core conftest.err conftest.$ac_objext \
13642    conftest$ac_exeext conftest.$ac_ext
13643fi
13644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
13645$as_echo "$pgac_cv__static_assert" >&6; }
13646if test x"$pgac_cv__static_assert" = xyes ; then
13647
13648$as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
13649
13650fi
13651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
13652$as_echo_n "checking for typeof... " >&6; }
13653if ${pgac_cv_c_typeof+:} false; then :
13654  $as_echo_n "(cached) " >&6
13655else
13656  pgac_cv_c_typeof=no
13657for pgac_kw in typeof __typeof__ decltype; do
13658  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13659/* end confdefs.h.  */
13660
13661int
13662main ()
13663{
13664int x = 0;
13665$pgac_kw(x) y;
13666y = x;
13667return y;
13668  ;
13669  return 0;
13670}
13671_ACEOF
13672if ac_fn_c_try_compile "$LINENO"; then :
13673  pgac_cv_c_typeof=$pgac_kw
13674fi
13675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13676  test "$pgac_cv_c_typeof" != no && break
13677done
13678fi
13679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
13680$as_echo "$pgac_cv_c_typeof" >&6; }
13681if test "$pgac_cv_c_typeof" != no; then
13682
13683$as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
13684
13685  if test "$pgac_cv_c_typeof" != typeof; then
13686
13687cat >>confdefs.h <<_ACEOF
13688#define typeof $pgac_cv_c_typeof
13689_ACEOF
13690
13691  fi
13692fi
13693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
13694$as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
13695if ${pgac_cv__types_compatible+:} false; then :
13696  $as_echo_n "(cached) " >&6
13697else
13698  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13699/* end confdefs.h.  */
13700
13701int
13702main ()
13703{
13704 int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
13705  ;
13706  return 0;
13707}
13708_ACEOF
13709if ac_fn_c_try_compile "$LINENO"; then :
13710  pgac_cv__types_compatible=yes
13711else
13712  pgac_cv__types_compatible=no
13713fi
13714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13715fi
13716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
13717$as_echo "$pgac_cv__types_compatible" >&6; }
13718if test x"$pgac_cv__types_compatible" = xyes ; then
13719
13720$as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
13721
13722fi
13723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
13724$as_echo_n "checking for __builtin_bswap16... " >&6; }
13725if ${pgac_cv__builtin_bswap16+:} false; then :
13726  $as_echo_n "(cached) " >&6
13727else
13728  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13729/* end confdefs.h.  */
13730static unsigned long int x = __builtin_bswap16(0xaabb);
13731
13732_ACEOF
13733if ac_fn_c_try_compile "$LINENO"; then :
13734  pgac_cv__builtin_bswap16=yes
13735else
13736  pgac_cv__builtin_bswap16=no
13737fi
13738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13739fi
13740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
13741$as_echo "$pgac_cv__builtin_bswap16" >&6; }
13742if test x"$pgac_cv__builtin_bswap16" = xyes ; then
13743
13744$as_echo "#define HAVE__BUILTIN_BSWAP16 1" >>confdefs.h
13745
13746fi
13747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
13748$as_echo_n "checking for __builtin_bswap32... " >&6; }
13749if ${pgac_cv__builtin_bswap32+:} false; then :
13750  $as_echo_n "(cached) " >&6
13751else
13752  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13753/* end confdefs.h.  */
13754static unsigned long int x = __builtin_bswap32(0xaabbccdd);
13755
13756_ACEOF
13757if ac_fn_c_try_compile "$LINENO"; then :
13758  pgac_cv__builtin_bswap32=yes
13759else
13760  pgac_cv__builtin_bswap32=no
13761fi
13762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13763fi
13764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
13765$as_echo "$pgac_cv__builtin_bswap32" >&6; }
13766if test x"$pgac_cv__builtin_bswap32" = xyes ; then
13767
13768$as_echo "#define HAVE__BUILTIN_BSWAP32 1" >>confdefs.h
13769
13770fi
13771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
13772$as_echo_n "checking for __builtin_bswap64... " >&6; }
13773if ${pgac_cv__builtin_bswap64+:} false; then :
13774  $as_echo_n "(cached) " >&6
13775else
13776  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13777/* end confdefs.h.  */
13778static unsigned long int x = __builtin_bswap64(0xaabbccddeeff0011);
13779
13780_ACEOF
13781if ac_fn_c_try_compile "$LINENO"; then :
13782  pgac_cv__builtin_bswap64=yes
13783else
13784  pgac_cv__builtin_bswap64=no
13785fi
13786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13787fi
13788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
13789$as_echo "$pgac_cv__builtin_bswap64" >&6; }
13790if test x"$pgac_cv__builtin_bswap64" = xyes ; then
13791
13792$as_echo "#define HAVE__BUILTIN_BSWAP64 1" >>confdefs.h
13793
13794fi
13795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
13796$as_echo_n "checking for __builtin_constant_p... " >&6; }
13797if ${pgac_cv__builtin_constant_p+:} false; then :
13798  $as_echo_n "(cached) " >&6
13799else
13800  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13801/* end confdefs.h.  */
13802static int x;
13803  static int y[__builtin_constant_p(x) ? x : 1];
13804  static int z[__builtin_constant_p("string literal") ? 1 : x];
13805
13806
13807_ACEOF
13808if ac_fn_c_try_compile "$LINENO"; then :
13809  pgac_cv__builtin_constant_p=yes
13810else
13811  pgac_cv__builtin_constant_p=no
13812fi
13813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13814fi
13815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
13816$as_echo "$pgac_cv__builtin_constant_p" >&6; }
13817if test x"$pgac_cv__builtin_constant_p" = xyes ; then
13818
13819$as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
13820
13821fi
13822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
13823$as_echo_n "checking for __builtin_unreachable... " >&6; }
13824if ${pgac_cv__builtin_unreachable+:} false; then :
13825  $as_echo_n "(cached) " >&6
13826else
13827  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13828/* end confdefs.h.  */
13829
13830int
13831main ()
13832{
13833__builtin_unreachable();
13834  ;
13835  return 0;
13836}
13837_ACEOF
13838if ac_fn_c_try_link "$LINENO"; then :
13839  pgac_cv__builtin_unreachable=yes
13840else
13841  pgac_cv__builtin_unreachable=no
13842fi
13843rm -f core conftest.err conftest.$ac_objext \
13844    conftest$ac_exeext conftest.$ac_ext
13845fi
13846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
13847$as_echo "$pgac_cv__builtin_unreachable" >&6; }
13848if test x"$pgac_cv__builtin_unreachable" = xyes ; then
13849
13850$as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
13851
13852fi
13853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
13854$as_echo_n "checking for computed goto support... " >&6; }
13855if ${pgac_cv_computed_goto+:} false; then :
13856  $as_echo_n "(cached) " >&6
13857else
13858  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13859/* end confdefs.h.  */
13860
13861int
13862main ()
13863{
13864void *labeladdrs[] = {&&my_label};
13865  goto *labeladdrs[0];
13866  my_label:
13867  return 1;
13868
13869  ;
13870  return 0;
13871}
13872_ACEOF
13873if ac_fn_c_try_compile "$LINENO"; then :
13874  pgac_cv_computed_goto=yes
13875else
13876  pgac_cv_computed_goto=no
13877fi
13878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13879fi
13880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
13881$as_echo "$pgac_cv_computed_goto" >&6; }
13882if test x"$pgac_cv_computed_goto" = xyes ; then
13883
13884$as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
13885
13886fi
13887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__" >&5
13888$as_echo_n "checking for __VA_ARGS__... " >&6; }
13889if ${pgac_cv__va_args+:} false; then :
13890  $as_echo_n "(cached) " >&6
13891else
13892  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13893/* end confdefs.h.  */
13894#include <stdio.h>
13895int
13896main ()
13897{
13898#define debug(...) fprintf(stderr, __VA_ARGS__)
13899debug("%s", "blarg");
13900
13901  ;
13902  return 0;
13903}
13904_ACEOF
13905if ac_fn_c_try_compile "$LINENO"; then :
13906  pgac_cv__va_args=yes
13907else
13908  pgac_cv__va_args=no
13909fi
13910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13911fi
13912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__va_args" >&5
13913$as_echo "$pgac_cv__va_args" >&6; }
13914if test x"$pgac_cv__va_args" = xyes ; then
13915
13916$as_echo "#define HAVE__VA_ARGS 1" >>confdefs.h
13917
13918fi
13919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13920$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
13921if ${ac_cv_struct_tm+:} false; then :
13922  $as_echo_n "(cached) " >&6
13923else
13924  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13925/* end confdefs.h.  */
13926#include <sys/types.h>
13927#include <time.h>
13928
13929int
13930main ()
13931{
13932struct tm tm;
13933				     int *p = &tm.tm_sec;
13934				     return !p;
13935  ;
13936  return 0;
13937}
13938_ACEOF
13939if ac_fn_c_try_compile "$LINENO"; then :
13940  ac_cv_struct_tm=time.h
13941else
13942  ac_cv_struct_tm=sys/time.h
13943fi
13944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13945fi
13946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13947$as_echo "$ac_cv_struct_tm" >&6; }
13948if test $ac_cv_struct_tm = sys/time.h; then
13949
13950$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
13951
13952fi
13953
13954ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
13955#include <$ac_cv_struct_tm>
13956
13957"
13958if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
13959
13960cat >>confdefs.h <<_ACEOF
13961#define HAVE_STRUCT_TM_TM_ZONE 1
13962_ACEOF
13963
13964
13965fi
13966
13967if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13968
13969$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
13970
13971fi
13972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13973$as_echo_n "checking for tzname... " >&6; }
13974if ${ac_cv_var_tzname+:} false; then :
13975  $as_echo_n "(cached) " >&6
13976else
13977  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13978/* end confdefs.h.  */
13979#include <stdlib.h>
13980#include <time.h>
13981#ifndef tzname /* For SGI.  */
13982extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
13983#endif
13984
13985int
13986main ()
13987{
13988atoi(*tzname);
13989  ;
13990  return 0;
13991}
13992_ACEOF
13993if ac_fn_c_try_link "$LINENO"; then :
13994  ac_cv_var_tzname=yes
13995else
13996  ac_cv_var_tzname=no
13997fi
13998rm -f core conftest.err conftest.$ac_objext \
13999    conftest$ac_exeext conftest.$ac_ext
14000fi
14001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14002$as_echo "$ac_cv_var_tzname" >&6; }
14003if test $ac_cv_var_tzname = yes; then
14004
14005$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
14006
14007fi
14008
14009ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14010#ifdef HAVE_SYS_IPC_H
14011#include <sys/ipc.h>
14012#endif
14013#ifdef HAVE_SYS_SEM_H
14014#include <sys/sem.h>
14015#endif
14016"
14017if test "x$ac_cv_type_union_semun" = xyes; then :
14018
14019cat >>confdefs.h <<_ACEOF
14020#define HAVE_UNION_SEMUN 1
14021_ACEOF
14022
14023
14024fi
14025
14026ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
14027#ifdef HAVE_SYS_UN_H
14028#include <sys/un.h>
14029#endif
14030
14031"
14032if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
14033
14034$as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
14035
14036fi
14037
14038ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
14039#include <sys/socket.h>
14040
14041"
14042if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
14043
14044cat >>confdefs.h <<_ACEOF
14045#define HAVE_STRUCT_SOCKADDR_STORAGE 1
14046_ACEOF
14047
14048
14049fi
14050
14051ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
14052#include <sys/socket.h>
14053
14054"
14055if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
14056
14057cat >>confdefs.h <<_ACEOF
14058#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
14059_ACEOF
14060
14061
14062fi
14063ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
14064#include <sys/socket.h>
14065
14066"
14067if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
14068
14069cat >>confdefs.h <<_ACEOF
14070#define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
14071_ACEOF
14072
14073
14074fi
14075ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
14076#include <sys/socket.h>
14077
14078"
14079if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
14080
14081cat >>confdefs.h <<_ACEOF
14082#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
14083_ACEOF
14084
14085
14086fi
14087ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
14088#include <sys/socket.h>
14089
14090"
14091if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
14092
14093cat >>confdefs.h <<_ACEOF
14094#define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
14095_ACEOF
14096
14097
14098fi
14099ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14100#include <sys/socket.h>
14101
14102"
14103if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14104
14105cat >>confdefs.h <<_ACEOF
14106#define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14107_ACEOF
14108
14109
14110fi
14111
14112ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
14113#include <sys/socket.h>
14114#include <netdb.h>
14115
14116"
14117if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
14118
14119cat >>confdefs.h <<_ACEOF
14120#define HAVE_STRUCT_ADDRINFO 1
14121_ACEOF
14122
14123
14124fi
14125
14126
14127  ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
14128if test "x$ac_cv_type_intptr_t" = xyes; then :
14129
14130$as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
14131
14132else
14133  for ac_type in 'int' 'long int' 'long long int'; do
14134       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14135/* end confdefs.h.  */
14136$ac_includes_default
14137int
14138main ()
14139{
14140static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14141test_array [0] = 0;
14142return test_array [0];
14143
14144  ;
14145  return 0;
14146}
14147_ACEOF
14148if ac_fn_c_try_compile "$LINENO"; then :
14149
14150cat >>confdefs.h <<_ACEOF
14151#define intptr_t $ac_type
14152_ACEOF
14153
14154	  ac_type=
14155fi
14156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14157       test -z "$ac_type" && break
14158     done
14159fi
14160
14161
14162
14163  ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
14164if test "x$ac_cv_type_uintptr_t" = xyes; then :
14165
14166$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
14167
14168else
14169  for ac_type in 'unsigned int' 'unsigned long int' \
14170	'unsigned long long int'; do
14171       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14172/* end confdefs.h.  */
14173$ac_includes_default
14174int
14175main ()
14176{
14177static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14178test_array [0] = 0;
14179return test_array [0];
14180
14181  ;
14182  return 0;
14183}
14184_ACEOF
14185if ac_fn_c_try_compile "$LINENO"; then :
14186
14187cat >>confdefs.h <<_ACEOF
14188#define uintptr_t $ac_type
14189_ACEOF
14190
14191	  ac_type=
14192fi
14193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14194       test -z "$ac_type" && break
14195     done
14196fi
14197
14198
14199
14200  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
14201$as_echo_n "checking for unsigned long long int... " >&6; }
14202if ${ac_cv_type_unsigned_long_long_int+:} false; then :
14203  $as_echo_n "(cached) " >&6
14204else
14205  ac_cv_type_unsigned_long_long_int=yes
14206     if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14207       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14208/* end confdefs.h.  */
14209
14210  /* For now, do not test the preprocessor; as of 2007 there are too many
14211	 implementations with broken preprocessors.  Perhaps this can
14212	 be revisited in 2012.  In the meantime, code should not expect
14213	 #if to work with literals wider than 32 bits.  */
14214      /* Test literals.  */
14215      long long int ll = 9223372036854775807ll;
14216      long long int nll = -9223372036854775807LL;
14217      unsigned long long int ull = 18446744073709551615ULL;
14218      /* Test constant expressions.   */
14219      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
14220		     ? 1 : -1)];
14221      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
14222		     ? 1 : -1)];
14223      int i = 63;
14224int
14225main ()
14226{
14227/* Test availability of runtime routines for shift and division.  */
14228      long long int llmax = 9223372036854775807ll;
14229      unsigned long long int ullmax = 18446744073709551615ull;
14230      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
14231	      | (llmax / ll) | (llmax % ll)
14232	      | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
14233	      | (ullmax / ull) | (ullmax % ull));
14234  ;
14235  return 0;
14236}
14237
14238_ACEOF
14239if ac_fn_c_try_link "$LINENO"; then :
14240
14241else
14242  ac_cv_type_unsigned_long_long_int=no
14243fi
14244rm -f core conftest.err conftest.$ac_objext \
14245    conftest$ac_exeext conftest.$ac_ext
14246     fi
14247fi
14248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
14249$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
14250  if test $ac_cv_type_unsigned_long_long_int = yes; then
14251
14252$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
14253
14254  fi
14255
14256
14257
14258  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
14259$as_echo_n "checking for long long int... " >&6; }
14260if ${ac_cv_type_long_long_int+:} false; then :
14261  $as_echo_n "(cached) " >&6
14262else
14263  ac_cv_type_long_long_int=yes
14264      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14265	ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
14266	if test $ac_cv_type_long_long_int = yes; then
14267	  	  	  	  if test "$cross_compiling" = yes; then :
14268  :
14269else
14270  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14271/* end confdefs.h.  */
14272#include <limits.h>
14273		 #ifndef LLONG_MAX
14274		 # define HALF \
14275			  (1LL << (sizeof (long long int) * CHAR_BIT - 2))
14276		 # define LLONG_MAX (HALF - 1 + HALF)
14277		 #endif
14278int
14279main ()
14280{
14281long long int n = 1;
14282		 int i;
14283		 for (i = 0; ; i++)
14284		   {
14285		     long long int m = n << i;
14286		     if (m >> i != n)
14287		       return 1;
14288		     if (LLONG_MAX / 2 < m)
14289		       break;
14290		   }
14291		 return 0;
14292  ;
14293  return 0;
14294}
14295_ACEOF
14296if ac_fn_c_try_run "$LINENO"; then :
14297
14298else
14299  ac_cv_type_long_long_int=no
14300fi
14301rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14302  conftest.$ac_objext conftest.beam conftest.$ac_ext
14303fi
14304
14305	fi
14306      fi
14307fi
14308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
14309$as_echo "$ac_cv_type_long_long_int" >&6; }
14310  if test $ac_cv_type_long_long_int = yes; then
14311
14312$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
14313
14314  fi
14315
14316
14317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
14318$as_echo_n "checking for locale_t... " >&6; }
14319if ${pgac_cv_type_locale_t+:} false; then :
14320  $as_echo_n "(cached) " >&6
14321else
14322  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14323/* end confdefs.h.  */
14324#include <locale.h>
14325locale_t x;
14326int
14327main ()
14328{
14329
14330  ;
14331  return 0;
14332}
14333_ACEOF
14334if ac_fn_c_try_compile "$LINENO"; then :
14335  pgac_cv_type_locale_t=yes
14336else
14337  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14338/* end confdefs.h.  */
14339#include <xlocale.h>
14340locale_t x;
14341int
14342main ()
14343{
14344
14345  ;
14346  return 0;
14347}
14348_ACEOF
14349if ac_fn_c_try_compile "$LINENO"; then :
14350  pgac_cv_type_locale_t='yes (in xlocale.h)'
14351else
14352  pgac_cv_type_locale_t=no
14353fi
14354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14355fi
14356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14357fi
14358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
14359$as_echo "$pgac_cv_type_locale_t" >&6; }
14360if test "$pgac_cv_type_locale_t" != no; then
14361
14362$as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
14363
14364fi
14365if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
14366
14367$as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
14368
14369fi
14370
14371# MSVC doesn't cope well with defining restrict to __restrict, the
14372# spelling it understands, because it conflicts with
14373# __declspec(restrict). Therefore we define pg_restrict to the
14374# appropriate definition, which presumably won't conflict.
14375#
14376# Allow platforms with buggy compilers to force restrict to not be
14377# used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
14378# template.
14379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14380$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
14381if ${ac_cv_c_restrict+:} false; then :
14382  $as_echo_n "(cached) " >&6
14383else
14384  ac_cv_c_restrict=no
14385   # The order here caters to the fact that C++ does not require restrict.
14386   for ac_kw in __restrict __restrict__ _Restrict restrict; do
14387     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14388/* end confdefs.h.  */
14389typedef int * int_ptr;
14390	int foo (int_ptr $ac_kw ip) {
14391	return ip[0];
14392       }
14393int
14394main ()
14395{
14396int s[1];
14397	int * $ac_kw t = s;
14398	t[0] = 0;
14399	return foo(t)
14400  ;
14401  return 0;
14402}
14403_ACEOF
14404if ac_fn_c_try_compile "$LINENO"; then :
14405  ac_cv_c_restrict=$ac_kw
14406fi
14407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14408     test "$ac_cv_c_restrict" != no && break
14409   done
14410
14411fi
14412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14413$as_echo "$ac_cv_c_restrict" >&6; }
14414
14415 case $ac_cv_c_restrict in
14416   restrict) ;;
14417   no) $as_echo "#define restrict /**/" >>confdefs.h
14418 ;;
14419   *)  cat >>confdefs.h <<_ACEOF
14420#define restrict $ac_cv_c_restrict
14421_ACEOF
14422 ;;
14423 esac
14424
14425if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
14426  pg_restrict=""
14427else
14428  pg_restrict="$ac_cv_c_restrict"
14429fi
14430
14431cat >>confdefs.h <<_ACEOF
14432#define pg_restrict $pg_restrict
14433_ACEOF
14434
14435
14436ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
14437#include <sys/param.h>
14438#ifdef HAVE_SYS_UCRED_H
14439#include <sys/ucred.h>
14440#endif
14441"
14442if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
14443
14444cat >>confdefs.h <<_ACEOF
14445#define HAVE_STRUCT_CMSGCRED 1
14446_ACEOF
14447
14448
14449fi
14450
14451
14452ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
14453#include <getopt.h>
14454#endif
14455"
14456if test "x$ac_cv_type_struct_option" = xyes; then :
14457
14458cat >>confdefs.h <<_ACEOF
14459#define HAVE_STRUCT_OPTION 1
14460_ACEOF
14461
14462
14463fi
14464
14465
14466if test "$with_zlib" = yes; then
14467  # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
14468  # did not).  While we could work around the lack of z_streamp, it
14469  # seems unwise to encourage people to use such old zlib versions...
14470  ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
14471"
14472if test "x$ac_cv_type_z_streamp" = xyes; then :
14473
14474else
14475  as_fn_error $? "zlib version is too old
14476Use --without-zlib to disable zlib support." "$LINENO" 5
14477fi
14478
14479fi
14480
14481# On PPC, check if assembler supports LWARX instruction's mutex hint bit
14482case $host_cpu in
14483  ppc*|powerpc*)
14484    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
14485$as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
14486    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14487/* end confdefs.h.  */
14488
14489int
14490main ()
14491{
14492int a = 0; int *p = &a; int r;
14493	 __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
14494  ;
14495  return 0;
14496}
14497_ACEOF
14498if ac_fn_c_try_compile "$LINENO"; then :
14499  pgac_cv_have_ppc_mutex_hint=yes
14500else
14501  pgac_cv_have_ppc_mutex_hint=no
14502fi
14503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14504    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
14505$as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
14506    if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
14507
14508$as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
14509
14510    fi
14511  ;;
14512esac
14513
14514# Check largefile support.  You might think this is a system service not a
14515# compiler characteristic, but you'd be wrong.  We must check this before
14516# probing existence of related functions such as fseeko, since the largefile
14517# defines can affect what is generated for that.
14518if test "$PORTNAME" != "win32"; then
14519   # Check whether --enable-largefile was given.
14520if test "${enable_largefile+set}" = set; then :
14521  enableval=$enable_largefile;
14522fi
14523
14524if test "$enable_largefile" != no; then
14525
14526  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
14527$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
14528if ${ac_cv_sys_largefile_CC+:} false; then :
14529  $as_echo_n "(cached) " >&6
14530else
14531  ac_cv_sys_largefile_CC=no
14532     if test "$GCC" != yes; then
14533       ac_save_CC=$CC
14534       while :; do
14535	 # IRIX 6.2 and later do not support large files by default,
14536	 # so use the C compiler's -n32 option if that helps.
14537	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14538/* end confdefs.h.  */
14539#include <sys/types.h>
14540 /* Check that off_t can represent 2**63 - 1 correctly.
14541    We can't simply define LARGE_OFF_T to be 9223372036854775807,
14542    since some C++ compilers masquerading as C compilers
14543    incorrectly reject 9223372036854775807.  */
14544#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14545  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14546		       && LARGE_OFF_T % 2147483647 == 1)
14547		      ? 1 : -1];
14548int
14549main ()
14550{
14551
14552  ;
14553  return 0;
14554}
14555_ACEOF
14556	 if ac_fn_c_try_compile "$LINENO"; then :
14557  break
14558fi
14559rm -f core conftest.err conftest.$ac_objext
14560	 CC="$CC -n32"
14561	 if ac_fn_c_try_compile "$LINENO"; then :
14562  ac_cv_sys_largefile_CC=' -n32'; break
14563fi
14564rm -f core conftest.err conftest.$ac_objext
14565	 break
14566       done
14567       CC=$ac_save_CC
14568       rm -f conftest.$ac_ext
14569    fi
14570fi
14571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
14572$as_echo "$ac_cv_sys_largefile_CC" >&6; }
14573  if test "$ac_cv_sys_largefile_CC" != no; then
14574    CC=$CC$ac_cv_sys_largefile_CC
14575  fi
14576
14577  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14578$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
14579if ${ac_cv_sys_file_offset_bits+:} false; then :
14580  $as_echo_n "(cached) " >&6
14581else
14582  while :; do
14583  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14584/* end confdefs.h.  */
14585#include <sys/types.h>
14586 /* Check that off_t can represent 2**63 - 1 correctly.
14587    We can't simply define LARGE_OFF_T to be 9223372036854775807,
14588    since some C++ compilers masquerading as C compilers
14589    incorrectly reject 9223372036854775807.  */
14590#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14591  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14592		       && LARGE_OFF_T % 2147483647 == 1)
14593		      ? 1 : -1];
14594int
14595main ()
14596{
14597
14598  ;
14599  return 0;
14600}
14601_ACEOF
14602if ac_fn_c_try_compile "$LINENO"; then :
14603  ac_cv_sys_file_offset_bits=no; break
14604fi
14605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14606  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14607/* end confdefs.h.  */
14608#define _FILE_OFFSET_BITS 64
14609#include <sys/types.h>
14610 /* Check that off_t can represent 2**63 - 1 correctly.
14611    We can't simply define LARGE_OFF_T to be 9223372036854775807,
14612    since some C++ compilers masquerading as C compilers
14613    incorrectly reject 9223372036854775807.  */
14614#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14615  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14616		       && LARGE_OFF_T % 2147483647 == 1)
14617		      ? 1 : -1];
14618int
14619main ()
14620{
14621
14622  ;
14623  return 0;
14624}
14625_ACEOF
14626if ac_fn_c_try_compile "$LINENO"; then :
14627  ac_cv_sys_file_offset_bits=64; break
14628fi
14629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14630  ac_cv_sys_file_offset_bits=unknown
14631  break
14632done
14633fi
14634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
14635$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
14636case $ac_cv_sys_file_offset_bits in #(
14637  no | unknown) ;;
14638  *)
14639cat >>confdefs.h <<_ACEOF
14640#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14641_ACEOF
14642;;
14643esac
14644rm -rf conftest*
14645  if test $ac_cv_sys_file_offset_bits = unknown; then
14646    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
14647$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
14648if ${ac_cv_sys_large_files+:} false; then :
14649  $as_echo_n "(cached) " >&6
14650else
14651  while :; do
14652  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14653/* end confdefs.h.  */
14654#include <sys/types.h>
14655 /* Check that off_t can represent 2**63 - 1 correctly.
14656    We can't simply define LARGE_OFF_T to be 9223372036854775807,
14657    since some C++ compilers masquerading as C compilers
14658    incorrectly reject 9223372036854775807.  */
14659#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14660  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14661		       && LARGE_OFF_T % 2147483647 == 1)
14662		      ? 1 : -1];
14663int
14664main ()
14665{
14666
14667  ;
14668  return 0;
14669}
14670_ACEOF
14671if ac_fn_c_try_compile "$LINENO"; then :
14672  ac_cv_sys_large_files=no; break
14673fi
14674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14675  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14676/* end confdefs.h.  */
14677#define _LARGE_FILES 1
14678#include <sys/types.h>
14679 /* Check that off_t can represent 2**63 - 1 correctly.
14680    We can't simply define LARGE_OFF_T to be 9223372036854775807,
14681    since some C++ compilers masquerading as C compilers
14682    incorrectly reject 9223372036854775807.  */
14683#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14684  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14685		       && LARGE_OFF_T % 2147483647 == 1)
14686		      ? 1 : -1];
14687int
14688main ()
14689{
14690
14691  ;
14692  return 0;
14693}
14694_ACEOF
14695if ac_fn_c_try_compile "$LINENO"; then :
14696  ac_cv_sys_large_files=1; break
14697fi
14698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14699  ac_cv_sys_large_files=unknown
14700  break
14701done
14702fi
14703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
14704$as_echo "$ac_cv_sys_large_files" >&6; }
14705case $ac_cv_sys_large_files in #(
14706  no | unknown) ;;
14707  *)
14708cat >>confdefs.h <<_ACEOF
14709#define _LARGE_FILES $ac_cv_sys_large_files
14710_ACEOF
14711;;
14712esac
14713rm -rf conftest*
14714  fi
14715
14716
14717fi
14718
14719
14720fi
14721
14722# Check for largefile support (must be after AC_SYS_LARGEFILE)
14723# The cast to long int works around a bug in the HP C Compiler
14724# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14725# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14726# This bug is HP SR number 8606223364.
14727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
14728$as_echo_n "checking size of off_t... " >&6; }
14729if ${ac_cv_sizeof_off_t+:} false; then :
14730  $as_echo_n "(cached) " >&6
14731else
14732  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
14733
14734else
14735  if test "$ac_cv_type_off_t" = yes; then
14736     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14737$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14738as_fn_error 77 "cannot compute sizeof (off_t)
14739See \`config.log' for more details" "$LINENO" 5; }
14740   else
14741     ac_cv_sizeof_off_t=0
14742   fi
14743fi
14744
14745fi
14746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
14747$as_echo "$ac_cv_sizeof_off_t" >&6; }
14748
14749
14750
14751cat >>confdefs.h <<_ACEOF
14752#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
14753_ACEOF
14754
14755
14756
14757# If we don't have largefile support, can't handle segsize >= 2GB.
14758if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
14759   as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
14760fi
14761
14762# The cast to long int works around a bug in the HP C Compiler
14763# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14764# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14765# This bug is HP SR number 8606223364.
14766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
14767$as_echo_n "checking size of bool... " >&6; }
14768if ${ac_cv_sizeof_bool+:} false; then :
14769  $as_echo_n "(cached) " >&6
14770else
14771  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool"        "#ifdef HAVE_STDBOOL_H
14772#include <stdbool.h>
14773#endif
14774"; then :
14775
14776else
14777  if test "$ac_cv_type_bool" = yes; then
14778     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14779$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14780as_fn_error 77 "cannot compute sizeof (bool)
14781See \`config.log' for more details" "$LINENO" 5; }
14782   else
14783     ac_cv_sizeof_bool=0
14784   fi
14785fi
14786
14787fi
14788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
14789$as_echo "$ac_cv_sizeof_bool" >&6; }
14790
14791
14792
14793cat >>confdefs.h <<_ACEOF
14794#define SIZEOF_BOOL $ac_cv_sizeof_bool
14795_ACEOF
14796
14797
14798
14799
14800##
14801## Functions, global variables
14802##
14803
14804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
14805$as_echo_n "checking for int timezone... " >&6; }
14806if ${pgac_cv_var_int_timezone+:} false; then :
14807  $as_echo_n "(cached) " >&6
14808else
14809  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14810/* end confdefs.h.  */
14811#include <time.h>
14812int res;
14813int
14814main ()
14815{
14816#ifndef __CYGWIN__
14817res = timezone / 60;
14818#else
14819res = _timezone / 60;
14820#endif
14821  ;
14822  return 0;
14823}
14824_ACEOF
14825if ac_fn_c_try_link "$LINENO"; then :
14826  pgac_cv_var_int_timezone=yes
14827else
14828  pgac_cv_var_int_timezone=no
14829fi
14830rm -f core conftest.err conftest.$ac_objext \
14831    conftest$ac_exeext conftest.$ac_ext
14832fi
14833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
14834$as_echo "$pgac_cv_var_int_timezone" >&6; }
14835if test x"$pgac_cv_var_int_timezone" = xyes ; then
14836
14837$as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
14838
14839fi
14840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
14841$as_echo_n "checking types of arguments for accept()... " >&6; }
14842 if ${ac_cv_func_accept_return+:} false; then :
14843  $as_echo_n "(cached) " >&6
14844else
14845   if ${ac_cv_func_accept_arg1+:} false; then :
14846  $as_echo_n "(cached) " >&6
14847else
14848    if ${ac_cv_func_accept_arg2+:} false; then :
14849  $as_echo_n "(cached) " >&6
14850else
14851     if ${ac_cv_func_accept_arg3+:} false; then :
14852  $as_echo_n "(cached) " >&6
14853else
14854      for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
14855      for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
14856       for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
14857        for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
14858         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14859/* end confdefs.h.  */
14860#include <sys/types.h>
14861#include <sys/socket.h>
14862extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
14863_ACEOF
14864if ac_fn_c_try_compile "$LINENO"; then :
14865  ac_not_found=no; break 4
14866else
14867  ac_not_found=yes
14868fi
14869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14870       done
14871      done
14872     done
14873    done
14874    if test "$ac_not_found" = yes; then
14875      as_fn_error $? "could not determine argument types" "$LINENO" 5
14876    fi
14877    if test "$ac_cv_func_accept_arg3" = "void"; then
14878      ac_cv_func_accept_arg3=int
14879    fi
14880
14881fi
14882
14883fi
14884
14885fi
14886
14887fi
14888 { $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
14889$as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
14890
14891cat >>confdefs.h <<_ACEOF
14892#define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
14893_ACEOF
14894
14895
14896cat >>confdefs.h <<_ACEOF
14897#define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
14898_ACEOF
14899
14900
14901cat >>confdefs.h <<_ACEOF
14902#define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
14903_ACEOF
14904
14905
14906cat >>confdefs.h <<_ACEOF
14907#define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
14908_ACEOF
14909
14910
14911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
14912$as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
14913if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
14914  $as_echo_n "(cached) " >&6
14915else
14916  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14917/* end confdefs.h.  */
14918#include <sys/time.h>
14919int
14920main ()
14921{
14922struct timeval *tp;
14923struct timezone *tzp;
14924gettimeofday(tp,tzp);
14925  ;
14926  return 0;
14927}
14928_ACEOF
14929if ac_fn_c_try_compile "$LINENO"; then :
14930  pgac_cv_func_gettimeofday_1arg=no
14931else
14932  pgac_cv_func_gettimeofday_1arg=yes
14933fi
14934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14935fi
14936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
14937$as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
14938if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
14939
14940$as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
14941
14942fi
14943
14944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
14945$as_echo_n "checking for wcstombs_l declaration... " >&6; }
14946if ${pgac_cv_func_wcstombs_l+:} false; then :
14947  $as_echo_n "(cached) " >&6
14948else
14949  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14950/* end confdefs.h.  */
14951#include <stdlib.h>
14952#include <locale.h>
14953int
14954main ()
14955{
14956#ifndef wcstombs_l
14957(void) wcstombs_l;
14958#endif
14959  ;
14960  return 0;
14961}
14962_ACEOF
14963if ac_fn_c_try_compile "$LINENO"; then :
14964  pgac_cv_func_wcstombs_l='yes'
14965else
14966  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14967/* end confdefs.h.  */
14968#include <stdlib.h>
14969#include <locale.h>
14970#include <xlocale.h>
14971int
14972main ()
14973{
14974#ifndef wcstombs_l
14975(void) wcstombs_l;
14976#endif
14977  ;
14978  return 0;
14979}
14980_ACEOF
14981if ac_fn_c_try_compile "$LINENO"; then :
14982  pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
14983else
14984  pgac_cv_func_wcstombs_l='no'
14985fi
14986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14987fi
14988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14989fi
14990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
14991$as_echo "$pgac_cv_func_wcstombs_l" >&6; }
14992if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
14993
14994$as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
14995
14996fi
14997
14998# Some versions of libedit contain strlcpy(), setproctitle(), and other
14999# symbols that that library has no business exposing to the world.  Pending
15000# acquisition of a clue by those developers, ignore libedit (including its
15001# possible alias of libreadline) while checking for everything else.
15002LIBS_including_readline="$LIBS"
15003LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15004
15005for ac_func in cbrt clock_gettime 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 uselocale utime utimes wcstombs_l
15006do :
15007  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15008ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15009if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15010  cat >>confdefs.h <<_ACEOF
15011#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15012_ACEOF
15013
15014fi
15015done
15016
15017
15018ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
15019if test "x$ac_cv_func_fseeko" = xyes; then :
15020  $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15021
15022else
15023  case " $LIBOBJS " in
15024  *" fseeko.$ac_objext "* ) ;;
15025  *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
15026 ;;
15027esac
15028
15029fi
15030
15031
15032case $host_os in
15033	# NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
15034	# Mingw uses macros to access Win32 API calls
15035	netbsd*|mingw*)
15036
15037$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15038
15039		ac_cv_func_fseeko=yes;;
15040	*)
15041		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15042$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15043if ${ac_cv_sys_largefile_source+:} false; then :
15044  $as_echo_n "(cached) " >&6
15045else
15046  while :; do
15047  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15048/* end confdefs.h.  */
15049#include <sys/types.h> /* for off_t */
15050     #include <stdio.h>
15051int
15052main ()
15053{
15054int (*fp) (FILE *, off_t, int) = fseeko;
15055     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15056  ;
15057  return 0;
15058}
15059_ACEOF
15060if ac_fn_c_try_link "$LINENO"; then :
15061  ac_cv_sys_largefile_source=no; break
15062fi
15063rm -f core conftest.err conftest.$ac_objext \
15064    conftest$ac_exeext conftest.$ac_ext
15065  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15066/* end confdefs.h.  */
15067#define _LARGEFILE_SOURCE 1
15068#include <sys/types.h> /* for off_t */
15069     #include <stdio.h>
15070int
15071main ()
15072{
15073int (*fp) (FILE *, off_t, int) = fseeko;
15074     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15075  ;
15076  return 0;
15077}
15078_ACEOF
15079if ac_fn_c_try_link "$LINENO"; then :
15080  ac_cv_sys_largefile_source=1; break
15081fi
15082rm -f core conftest.err conftest.$ac_objext \
15083    conftest$ac_exeext conftest.$ac_ext
15084  ac_cv_sys_largefile_source=unknown
15085  break
15086done
15087fi
15088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15089$as_echo "$ac_cv_sys_largefile_source" >&6; }
15090case $ac_cv_sys_largefile_source in #(
15091  no | unknown) ;;
15092  *)
15093cat >>confdefs.h <<_ACEOF
15094#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15095_ACEOF
15096;;
15097esac
15098rm -rf conftest*
15099
15100# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15101# in glibc 2.1.3, but that breaks too many other things.
15102# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15103if test $ac_cv_sys_largefile_source != unknown; then
15104
15105$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15106
15107fi
15108;;
15109esac
15110
15111# posix_fadvise() is a no-op on Solaris, so don't incur function overhead
15112# by calling it, 2009-04-02
15113# http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
15114# The Clang compiler raises a warning for an undeclared identifier that matches
15115# a compiler builtin function.  All extant Clang versions are affected, as of
15116# Clang 3.6.0.  Test a builtin known to every version.  This problem affects the
15117# C and Objective C languages, but Clang does report an error under C++ and
15118# Objective C++.
15119#
15120# Passing -fno-builtin to the compiler would suppress this problem.  That
15121# strategy would have the advantage of being insensitive to stray warnings, but
15122# it would make tests less realistic.
15123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
15124$as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
15125if ${ac_cv_c_decl_report+:} false; then :
15126  $as_echo_n "(cached) " >&6
15127else
15128  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15129/* end confdefs.h.  */
15130
15131int
15132main ()
15133{
15134(void) strchr;
15135  ;
15136  return 0;
15137}
15138_ACEOF
15139if ac_fn_c_try_compile "$LINENO"; then :
15140  if test -s conftest.err; then :
15141      # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
15142    # valid AC_CHECK_DECL input.  No library function is consistently available
15143    # on freestanding implementations, so test against a dummy declaration.
15144    # Include always-available headers on the off chance that they somehow
15145    # elicit warnings.
15146    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15147/* end confdefs.h.  */
15148#include <float.h>
15149#include <limits.h>
15150#include <stdarg.h>
15151#include <stddef.h>
15152extern void ac_decl (int, char *);
15153int
15154main ()
15155{
15156#ifdef __cplusplus
15157  (void) ac_decl ((int) 0, (char *) 0);
15158  (void) ac_decl;
15159#else
15160  (void) ac_decl;
15161#endif
15162
15163  ;
15164  return 0;
15165}
15166_ACEOF
15167if ac_fn_c_try_compile "$LINENO"; then :
15168  if test -s conftest.err; then :
15169  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15170$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15171as_fn_error $? "cannot detect from compiler exit status or warnings
15172See \`config.log' for more details" "$LINENO" 5; }
15173else
15174  ac_cv_c_decl_report=warning
15175fi
15176else
15177  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15178$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15179as_fn_error $? "cannot compile a simple declaration test
15180See \`config.log' for more details" "$LINENO" 5; }
15181fi
15182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15183else
15184  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15185$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15186as_fn_error $? "compiler does not report undeclared identifiers
15187See \`config.log' for more details" "$LINENO" 5; }
15188fi
15189else
15190  ac_cv_c_decl_report=error
15191fi
15192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15193fi
15194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
15195$as_echo "$ac_cv_c_decl_report" >&6; }
15196
15197case $ac_cv_c_decl_report in
15198  warning) ac_c_decl_warn_flag=yes ;;
15199  *) ac_c_decl_warn_flag= ;;
15200esac
15201
15202if test "$PORTNAME" != "solaris"; then :
15203
15204for ac_func in posix_fadvise
15205do :
15206  ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
15207if test "x$ac_cv_func_posix_fadvise" = xyes; then :
15208  cat >>confdefs.h <<_ACEOF
15209#define HAVE_POSIX_FADVISE 1
15210_ACEOF
15211
15212fi
15213done
15214
15215ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
15216"
15217if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
15218  ac_have_decl=1
15219else
15220  ac_have_decl=0
15221fi
15222
15223cat >>confdefs.h <<_ACEOF
15224#define HAVE_DECL_POSIX_FADVISE $ac_have_decl
15225_ACEOF
15226
15227
15228fi # fi
15229
15230ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
15231"
15232if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
15233  ac_have_decl=1
15234else
15235  ac_have_decl=0
15236fi
15237
15238cat >>confdefs.h <<_ACEOF
15239#define HAVE_DECL_FDATASYNC $ac_have_decl
15240_ACEOF
15241
15242ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
15243if test "x$ac_cv_have_decl_strlcat" = xyes; then :
15244  ac_have_decl=1
15245else
15246  ac_have_decl=0
15247fi
15248
15249cat >>confdefs.h <<_ACEOF
15250#define HAVE_DECL_STRLCAT $ac_have_decl
15251_ACEOF
15252ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
15253if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
15254  ac_have_decl=1
15255else
15256  ac_have_decl=0
15257fi
15258
15259cat >>confdefs.h <<_ACEOF
15260#define HAVE_DECL_STRLCPY $ac_have_decl
15261_ACEOF
15262ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15263if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15264  ac_have_decl=1
15265else
15266  ac_have_decl=0
15267fi
15268
15269cat >>confdefs.h <<_ACEOF
15270#define HAVE_DECL_STRNLEN $ac_have_decl
15271_ACEOF
15272
15273# This is probably only present on macOS, but may as well check always
15274ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
15275"
15276if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
15277  ac_have_decl=1
15278else
15279  ac_have_decl=0
15280fi
15281
15282cat >>confdefs.h <<_ACEOF
15283#define HAVE_DECL_F_FULLFSYNC $ac_have_decl
15284_ACEOF
15285
15286
15287HAVE_IPV6=no
15288ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
15289#include <netinet/in.h>
15290"
15291if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
15292
15293$as_echo "#define HAVE_IPV6 1" >>confdefs.h
15294
15295         HAVE_IPV6=yes
15296fi
15297
15298
15299
15300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
15301$as_echo_n "checking for PS_STRINGS... " >&6; }
15302if ${pgac_cv_var_PS_STRINGS+:} false; then :
15303  $as_echo_n "(cached) " >&6
15304else
15305  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15306/* end confdefs.h.  */
15307#include <machine/vmparam.h>
15308#include <sys/exec.h>
15309
15310int
15311main ()
15312{
15313PS_STRINGS->ps_nargvstr = 1;
15314PS_STRINGS->ps_argvstr = "foo";
15315  ;
15316  return 0;
15317}
15318_ACEOF
15319if ac_fn_c_try_link "$LINENO"; then :
15320  pgac_cv_var_PS_STRINGS=yes
15321else
15322  pgac_cv_var_PS_STRINGS=no
15323fi
15324rm -f core conftest.err conftest.$ac_objext \
15325    conftest$ac_exeext conftest.$ac_ext
15326fi
15327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
15328$as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
15329if test "$pgac_cv_var_PS_STRINGS" = yes ; then
15330
15331$as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
15332
15333fi
15334
15335
15336# We use our snprintf.c emulation if either snprintf() or vsnprintf()
15337# is missing.  Yes, there are machines that have only one.  We may
15338# also decide to use snprintf.c if snprintf() is present but does not
15339# have all the features we need --- see below.
15340
15341if test "$PORTNAME" = "win32"; then
15342  # Win32 gets snprintf.c built unconditionally.
15343  #
15344  # To properly translate all NLS languages strings, we must support the
15345  # *printf() %$ format, which allows *printf() arguments to be selected
15346  # by position in the translated string.
15347  #
15348  # libintl versions < 0.13 use the native *printf() functions, and Win32
15349  # *printf() doesn't understand %$, so we must use our /port versions,
15350  # which do understand %$. libintl versions >= 0.13 include their own
15351  # *printf versions on Win32.  The libintl 0.13 release note text is:
15352  #
15353  #   C format strings with positions, as they arise when a translator
15354  #   needs to reorder a sentence, are now supported on all platforms.
15355  #   On those few platforms (NetBSD and Woe32) for which the native
15356  #   printf()/fprintf()/... functions don't support such format
15357  #   strings, replacements are provided through <libintl.h>.
15358  #
15359  # We could use libintl >= 0.13's *printf() if we were sure that we had
15360  # a libintl >= 0.13 at runtime, but seeing that there is no clean way
15361  # to guarantee that, it is best to just use our own, so we are sure to
15362  # get %$ support. In include/port.h we disable the *printf() macros
15363  # that might have been defined by libintl.
15364  #
15365  # We do this unconditionally whether NLS is used or not so we are sure
15366  # that all Win32 libraries and binaries behave the same.
15367  pgac_need_repl_snprintf=yes
15368else
15369  pgac_need_repl_snprintf=no
15370  for ac_func in snprintf
15371do :
15372  ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
15373if test "x$ac_cv_func_snprintf" = xyes; then :
15374  cat >>confdefs.h <<_ACEOF
15375#define HAVE_SNPRINTF 1
15376_ACEOF
15377
15378else
15379  pgac_need_repl_snprintf=yes
15380fi
15381done
15382
15383  for ac_func in vsnprintf
15384do :
15385  ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
15386if test "x$ac_cv_func_vsnprintf" = xyes; then :
15387  cat >>confdefs.h <<_ACEOF
15388#define HAVE_VSNPRINTF 1
15389_ACEOF
15390
15391else
15392  pgac_need_repl_snprintf=yes
15393fi
15394done
15395
15396fi
15397
15398
15399# Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
15400# include/c.h will provide declarations.  Note this is a separate test
15401# from whether the functions exist in the C library --- there are
15402# systems that have the functions but don't bother to declare them :-(
15403
15404ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
15405if test "x$ac_cv_have_decl_snprintf" = xyes; then :
15406  ac_have_decl=1
15407else
15408  ac_have_decl=0
15409fi
15410
15411cat >>confdefs.h <<_ACEOF
15412#define HAVE_DECL_SNPRINTF $ac_have_decl
15413_ACEOF
15414ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
15415if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
15416  ac_have_decl=1
15417else
15418  ac_have_decl=0
15419fi
15420
15421cat >>confdefs.h <<_ACEOF
15422#define HAVE_DECL_VSNPRINTF $ac_have_decl
15423_ACEOF
15424
15425
15426
15427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
15428$as_echo_n "checking for isinf... " >&6; }
15429if ${ac_cv_func_isinf+:} false; then :
15430  $as_echo_n "(cached) " >&6
15431else
15432  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15433/* end confdefs.h.  */
15434
15435#include <math.h>
15436double glob_double;
15437
15438int
15439main ()
15440{
15441return isinf(glob_double) ? 0 : 1;
15442  ;
15443  return 0;
15444}
15445_ACEOF
15446if ac_fn_c_try_link "$LINENO"; then :
15447  ac_cv_func_isinf=yes
15448else
15449  ac_cv_func_isinf=no
15450fi
15451rm -f core conftest.err conftest.$ac_objext \
15452    conftest$ac_exeext conftest.$ac_ext
15453fi
15454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
15455$as_echo "$ac_cv_func_isinf" >&6; }
15456
15457if test $ac_cv_func_isinf = yes ; then
15458
15459$as_echo "#define HAVE_ISINF 1" >>confdefs.h
15460
15461else
15462  case " $LIBOBJS " in
15463  *" isinf.$ac_objext "* ) ;;
15464  *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
15465 ;;
15466esac
15467
15468  # Look for a way to implement a substitute for isinf()
15469  for ac_func in fpclass fp_class fp_class_d class
15470do :
15471  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15472ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15473if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15474  cat >>confdefs.h <<_ACEOF
15475#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15476_ACEOF
15477 break
15478fi
15479done
15480
15481fi
15482
15483ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
15484if test "x$ac_cv_func_crypt" = xyes; then :
15485  $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
15486
15487else
15488  case " $LIBOBJS " in
15489  *" crypt.$ac_objext "* ) ;;
15490  *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
15491 ;;
15492esac
15493
15494fi
15495
15496ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
15497if test "x$ac_cv_func_fls" = xyes; then :
15498  $as_echo "#define HAVE_FLS 1" >>confdefs.h
15499
15500else
15501  case " $LIBOBJS " in
15502  *" fls.$ac_objext "* ) ;;
15503  *) LIBOBJS="$LIBOBJS fls.$ac_objext"
15504 ;;
15505esac
15506
15507fi
15508
15509ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
15510if test "x$ac_cv_func_getopt" = xyes; then :
15511  $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
15512
15513else
15514  case " $LIBOBJS " in
15515  *" getopt.$ac_objext "* ) ;;
15516  *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15517 ;;
15518esac
15519
15520fi
15521
15522ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
15523if test "x$ac_cv_func_getrusage" = xyes; then :
15524  $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
15525
15526else
15527  case " $LIBOBJS " in
15528  *" getrusage.$ac_objext "* ) ;;
15529  *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
15530 ;;
15531esac
15532
15533fi
15534
15535ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
15536if test "x$ac_cv_func_inet_aton" = xyes; then :
15537  $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
15538
15539else
15540  case " $LIBOBJS " in
15541  *" inet_aton.$ac_objext "* ) ;;
15542  *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
15543 ;;
15544esac
15545
15546fi
15547
15548ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
15549if test "x$ac_cv_func_mkdtemp" = xyes; then :
15550  $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
15551
15552else
15553  case " $LIBOBJS " in
15554  *" mkdtemp.$ac_objext "* ) ;;
15555  *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
15556 ;;
15557esac
15558
15559fi
15560
15561ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
15562if test "x$ac_cv_func_random" = xyes; then :
15563  $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
15564
15565else
15566  case " $LIBOBJS " in
15567  *" random.$ac_objext "* ) ;;
15568  *) LIBOBJS="$LIBOBJS random.$ac_objext"
15569 ;;
15570esac
15571
15572fi
15573
15574ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
15575if test "x$ac_cv_func_rint" = xyes; then :
15576  $as_echo "#define HAVE_RINT 1" >>confdefs.h
15577
15578else
15579  case " $LIBOBJS " in
15580  *" rint.$ac_objext "* ) ;;
15581  *) LIBOBJS="$LIBOBJS rint.$ac_objext"
15582 ;;
15583esac
15584
15585fi
15586
15587ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
15588if test "x$ac_cv_func_srandom" = xyes; then :
15589  $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
15590
15591else
15592  case " $LIBOBJS " in
15593  *" srandom.$ac_objext "* ) ;;
15594  *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
15595 ;;
15596esac
15597
15598fi
15599
15600ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
15601if test "x$ac_cv_func_strerror" = xyes; then :
15602  $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
15603
15604else
15605  case " $LIBOBJS " in
15606  *" strerror.$ac_objext "* ) ;;
15607  *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
15608 ;;
15609esac
15610
15611fi
15612
15613ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
15614if test "x$ac_cv_func_strlcat" = xyes; then :
15615  $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
15616
15617else
15618  case " $LIBOBJS " in
15619  *" strlcat.$ac_objext "* ) ;;
15620  *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
15621 ;;
15622esac
15623
15624fi
15625
15626ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
15627if test "x$ac_cv_func_strlcpy" = xyes; then :
15628  $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
15629
15630else
15631  case " $LIBOBJS " in
15632  *" strlcpy.$ac_objext "* ) ;;
15633  *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
15634 ;;
15635esac
15636
15637fi
15638
15639ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
15640if test "x$ac_cv_func_strnlen" = xyes; then :
15641  $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
15642
15643else
15644  case " $LIBOBJS " in
15645  *" strnlen.$ac_objext "* ) ;;
15646  *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
15647 ;;
15648esac
15649
15650fi
15651
15652
15653
15654case $host_os in
15655
15656        # Windows uses a specialised env handler
15657        # and doesn't need a replacement getpeereid because it doesn't use
15658        # Unix sockets.
15659        mingw*)
15660
15661$as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15662
15663
15664$as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15665
15666                ac_cv_func_unsetenv=yes
15667                ac_cv_func_getpeereid=yes;;
15668        *)
15669                ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
15670if test "x$ac_cv_func_unsetenv" = xyes; then :
15671  $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15672
15673else
15674  case " $LIBOBJS " in
15675  *" unsetenv.$ac_objext "* ) ;;
15676  *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
15677 ;;
15678esac
15679
15680fi
15681
15682ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
15683if test "x$ac_cv_func_getpeereid" = xyes; then :
15684  $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15685
15686else
15687  case " $LIBOBJS " in
15688  *" getpeereid.$ac_objext "* ) ;;
15689  *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
15690 ;;
15691esac
15692
15693fi
15694
15695
15696		;;
15697esac
15698
15699# System's version of getaddrinfo(), if any, may be used only if we found
15700# a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
15701# We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
15702if test x"$ac_cv_type_struct_addrinfo" = xyes && \
15703   test "$PORTNAME" != "win32"; then
15704  ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
15705if test "x$ac_cv_func_getaddrinfo" = xyes; then :
15706  $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
15707
15708else
15709  case " $LIBOBJS " in
15710  *" getaddrinfo.$ac_objext "* ) ;;
15711  *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
15712 ;;
15713esac
15714
15715fi
15716
15717
15718else
15719  case " $LIBOBJS " in
15720  *" getaddrinfo.$ac_objext "* ) ;;
15721  *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
15722 ;;
15723esac
15724
15725fi
15726
15727# Similarly, use system's getopt_long() only if system provides struct option.
15728if test x"$ac_cv_type_struct_option" = xyes ; then
15729  ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
15730if test "x$ac_cv_func_getopt_long" = xyes; then :
15731  $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
15732
15733else
15734  case " $LIBOBJS " in
15735  *" getopt_long.$ac_objext "* ) ;;
15736  *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15737 ;;
15738esac
15739
15740fi
15741
15742
15743else
15744  case " $LIBOBJS " in
15745  *" getopt_long.$ac_objext "* ) ;;
15746  *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15747 ;;
15748esac
15749
15750fi
15751
15752# On OpenBSD and Solaris, getopt() doesn't do what we want for long options
15753# (i.e., allow '-' as a flag character), so use our version on those platforms.
15754if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
15755  case " $LIBOBJS " in
15756  *" getopt.$ac_objext "* ) ;;
15757  *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15758 ;;
15759esac
15760
15761fi
15762
15763# mingw has adopted a GNU-centric interpretation of optind/optreset,
15764# so always use our version on Windows.
15765if test "$PORTNAME" = "win32"; then
15766  case " $LIBOBJS " in
15767  *" getopt.$ac_objext "* ) ;;
15768  *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15769 ;;
15770esac
15771
15772  case " $LIBOBJS " in
15773  *" getopt_long.$ac_objext "* ) ;;
15774  *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15775 ;;
15776esac
15777
15778fi
15779
15780# Win32 (really MinGW) support
15781if test "$PORTNAME" = "win32"; then
15782  for ac_func in _configthreadlocale
15783do :
15784  ac_fn_c_check_func "$LINENO" "_configthreadlocale" "ac_cv_func__configthreadlocale"
15785if test "x$ac_cv_func__configthreadlocale" = xyes; then :
15786  cat >>confdefs.h <<_ACEOF
15787#define HAVE__CONFIGTHREADLOCALE 1
15788_ACEOF
15789
15790fi
15791done
15792
15793  ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
15794if test "x$ac_cv_func_gettimeofday" = xyes; then :
15795  $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
15796
15797else
15798  case " $LIBOBJS " in
15799  *" gettimeofday.$ac_objext "* ) ;;
15800  *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
15801 ;;
15802esac
15803
15804fi
15805
15806
15807  case " $LIBOBJS " in
15808  *" dirmod.$ac_objext "* ) ;;
15809  *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
15810 ;;
15811esac
15812
15813  case " $LIBOBJS " in
15814  *" kill.$ac_objext "* ) ;;
15815  *) LIBOBJS="$LIBOBJS kill.$ac_objext"
15816 ;;
15817esac
15818
15819  case " $LIBOBJS " in
15820  *" open.$ac_objext "* ) ;;
15821  *) LIBOBJS="$LIBOBJS open.$ac_objext"
15822 ;;
15823esac
15824
15825  case " $LIBOBJS " in
15826  *" system.$ac_objext "* ) ;;
15827  *) LIBOBJS="$LIBOBJS system.$ac_objext"
15828 ;;
15829esac
15830
15831  case " $LIBOBJS " in
15832  *" win32env.$ac_objext "* ) ;;
15833  *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
15834 ;;
15835esac
15836
15837  case " $LIBOBJS " in
15838  *" win32error.$ac_objext "* ) ;;
15839  *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
15840 ;;
15841esac
15842
15843  case " $LIBOBJS " in
15844  *" win32security.$ac_objext "* ) ;;
15845  *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
15846 ;;
15847esac
15848
15849  case " $LIBOBJS " in
15850  *" win32setlocale.$ac_objext "* ) ;;
15851  *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
15852 ;;
15853esac
15854
15855
15856$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
15857
15858  ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
15859#define WIN32_LEAN_AND_MEAN
15860#include <windows.h>
15861#include <string.h>
15862#include <dbghelp.h>
15863"
15864if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
15865
15866cat >>confdefs.h <<_ACEOF
15867#define HAVE_MINIDUMP_TYPE 1
15868_ACEOF
15869
15870pgac_minidump_type=yes
15871else
15872  pgac_minidump_type=no
15873fi
15874
15875fi
15876if test x"$pgac_minidump_type" = x"yes" ; then
15877  have_win32_dbghelp=yes
15878
15879else
15880  have_win32_dbghelp=no
15881
15882fi
15883
15884# Cygwin needs only a bit of that
15885if test "$PORTNAME" = "cygwin"; then
15886  case " $LIBOBJS " in
15887  *" dirmod.$ac_objext "* ) ;;
15888  *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
15889 ;;
15890esac
15891
15892fi
15893
15894ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
15895if test "x$ac_cv_func_syslog" = xyes; then :
15896  ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
15897if test "x$ac_cv_header_syslog_h" = xyes; then :
15898
15899$as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
15900
15901fi
15902
15903
15904fi
15905
15906
15907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
15908$as_echo_n "checking for opterr... " >&6; }
15909if ${pgac_cv_var_int_opterr+:} false; then :
15910  $as_echo_n "(cached) " >&6
15911else
15912  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15913/* end confdefs.h.  */
15914#include <unistd.h>
15915int
15916main ()
15917{
15918extern int opterr; opterr = 1;
15919  ;
15920  return 0;
15921}
15922_ACEOF
15923if ac_fn_c_try_link "$LINENO"; then :
15924  pgac_cv_var_int_opterr=yes
15925else
15926  pgac_cv_var_int_opterr=no
15927fi
15928rm -f core conftest.err conftest.$ac_objext \
15929    conftest$ac_exeext conftest.$ac_ext
15930fi
15931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
15932$as_echo "$pgac_cv_var_int_opterr" >&6; }
15933if test x"$pgac_cv_var_int_opterr" = x"yes"; then
15934
15935$as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
15936
15937fi
15938
15939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
15940$as_echo_n "checking for optreset... " >&6; }
15941if ${pgac_cv_var_int_optreset+:} false; then :
15942  $as_echo_n "(cached) " >&6
15943else
15944  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15945/* end confdefs.h.  */
15946#include <unistd.h>
15947int
15948main ()
15949{
15950extern int optreset; optreset = 1;
15951  ;
15952  return 0;
15953}
15954_ACEOF
15955if ac_fn_c_try_link "$LINENO"; then :
15956  pgac_cv_var_int_optreset=yes
15957else
15958  pgac_cv_var_int_optreset=no
15959fi
15960rm -f core conftest.err conftest.$ac_objext \
15961    conftest$ac_exeext conftest.$ac_ext
15962fi
15963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
15964$as_echo "$pgac_cv_var_int_optreset" >&6; }
15965if test x"$pgac_cv_var_int_optreset" = x"yes"; then
15966
15967$as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
15968
15969fi
15970
15971for ac_func in strtoll __strtoll strtoq
15972do :
15973  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15974ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15975if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15976  cat >>confdefs.h <<_ACEOF
15977#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15978_ACEOF
15979 break
15980fi
15981done
15982
15983for ac_func in strtoull __strtoull strtouq
15984do :
15985  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15986ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15987if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15988  cat >>confdefs.h <<_ACEOF
15989#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15990_ACEOF
15991 break
15992fi
15993done
15994
15995# strto[u]ll may exist but not be declared
15996ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
15997if test "x$ac_cv_have_decl_strtoll" = xyes; then :
15998  ac_have_decl=1
15999else
16000  ac_have_decl=0
16001fi
16002
16003cat >>confdefs.h <<_ACEOF
16004#define HAVE_DECL_STRTOLL $ac_have_decl
16005_ACEOF
16006ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
16007if test "x$ac_cv_have_decl_strtoull" = xyes; then :
16008  ac_have_decl=1
16009else
16010  ac_have_decl=0
16011fi
16012
16013cat >>confdefs.h <<_ACEOF
16014#define HAVE_DECL_STRTOULL $ac_have_decl
16015_ACEOF
16016
16017
16018if test "$with_icu" = yes; then
16019  ac_save_CPPFLAGS=$CPPFLAGS
16020  CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16021
16022  # Verify we have ICU's header files
16023  ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16024if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16025
16026else
16027  as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16028fi
16029
16030
16031
16032  CPPFLAGS=$ac_save_CPPFLAGS
16033fi
16034
16035if test "$with_llvm" = yes; then
16036
16037  # Check which functionality is present
16038  SAVE_CPPFLAGS="$CPPFLAGS"
16039  CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
16040  ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
16041"
16042if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
16043  ac_have_decl=1
16044else
16045  ac_have_decl=0
16046fi
16047
16048cat >>confdefs.h <<_ACEOF
16049#define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
16050_ACEOF
16051
16052  ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
16053"
16054if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
16055  ac_have_decl=1
16056else
16057  ac_have_decl=0
16058fi
16059
16060cat >>confdefs.h <<_ACEOF
16061#define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
16062_ACEOF
16063ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUFeatures" "ac_cv_have_decl_LLVMGetHostCPUFeatures" "#include <llvm-c/TargetMachine.h>
16064"
16065if test "x$ac_cv_have_decl_LLVMGetHostCPUFeatures" = xyes; then :
16066  ac_have_decl=1
16067else
16068  ac_have_decl=0
16069fi
16070
16071cat >>confdefs.h <<_ACEOF
16072#define HAVE_DECL_LLVMGETHOSTCPUFEATURES $ac_have_decl
16073_ACEOF
16074
16075  ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
16076"
16077if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
16078  ac_have_decl=1
16079else
16080  ac_have_decl=0
16081fi
16082
16083cat >>confdefs.h <<_ACEOF
16084#define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
16085_ACEOF
16086ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
16087"
16088if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
16089  ac_have_decl=1
16090else
16091  ac_have_decl=0
16092fi
16093
16094cat >>confdefs.h <<_ACEOF
16095#define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
16096_ACEOF
16097
16098  CPPFLAGS="$SAVE_CPPFLAGS"
16099
16100fi
16101
16102# Lastly, restore full LIBS list and check for readline/libedit symbols
16103LIBS="$LIBS_including_readline"
16104
16105if test "$with_readline" = yes; then
16106  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
16107$as_echo_n "checking for rl_completion_append_character... " >&6; }
16108if ${pgac_cv_var_rl_completion_append_character+:} false; then :
16109  $as_echo_n "(cached) " >&6
16110else
16111  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16112/* end confdefs.h.  */
16113#include <stdio.h>
16114#ifdef HAVE_READLINE_READLINE_H
16115# include <readline/readline.h>
16116#elif defined(HAVE_READLINE_H)
16117# include <readline.h>
16118#endif
16119
16120int
16121main ()
16122{
16123rl_completion_append_character = 'x';
16124  ;
16125  return 0;
16126}
16127_ACEOF
16128if ac_fn_c_try_link "$LINENO"; then :
16129  pgac_cv_var_rl_completion_append_character=yes
16130else
16131  pgac_cv_var_rl_completion_append_character=no
16132fi
16133rm -f core conftest.err conftest.$ac_objext \
16134    conftest$ac_exeext conftest.$ac_ext
16135fi
16136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
16137$as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
16138if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
16139
16140$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
16141
16142fi
16143  for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
16144do :
16145  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16146ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16147if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16148  cat >>confdefs.h <<_ACEOF
16149#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16150_ACEOF
16151
16152fi
16153done
16154
16155  for ac_func in append_history history_truncate_file
16156do :
16157  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16158ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16159if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16160  cat >>confdefs.h <<_ACEOF
16161#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16162_ACEOF
16163
16164fi
16165done
16166
16167fi
16168
16169
16170# This test makes sure that run tests work at all.  Sometimes a shared
16171# library is found by the linker, but the runtime linker can't find it.
16172# This check should come after all modifications of compiler or linker
16173# variables, and before any other run tests.
16174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16175$as_echo_n "checking test program... " >&6; }
16176if test "$cross_compiling" = yes; then :
16177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16178$as_echo "cross-compiling" >&6; }
16179else
16180  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16181/* end confdefs.h.  */
16182int main() { return 0; }
16183_ACEOF
16184if ac_fn_c_try_run "$LINENO"; then :
16185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16186$as_echo "ok" >&6; }
16187else
16188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16189$as_echo "failed" >&6; }
16190as_fn_error $? "
16191Could not execute a simple test program.  This may be a problem
16192related to locating shared libraries.  Check the file 'config.log'
16193for the exact reason." "$LINENO" 5
16194fi
16195rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16196  conftest.$ac_objext conftest.beam conftest.$ac_ext
16197fi
16198
16199
16200# --------------------
16201# Run tests below here
16202# --------------------
16203
16204# Force use of our snprintf if system's doesn't do arg control
16205# See comment above at snprintf test for details.
16206if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
16207  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports argument control" >&5
16208$as_echo_n "checking whether snprintf supports argument control... " >&6; }
16209if ${pgac_cv_snprintf_arg_control+:} false; then :
16210  $as_echo_n "(cached) " >&6
16211else
16212  if test "$cross_compiling" = yes; then :
16213  pgac_cv_snprintf_arg_control=cross
16214else
16215  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16216/* end confdefs.h.  */
16217#include <stdio.h>
16218#include <string.h>
16219
16220int main()
16221{
16222  char buf[100];
16223
16224  /* can it swap arguments? */
16225  snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
16226  if (strcmp(buf, "4 3") != 0)
16227    return 1;
16228  return 0;
16229}
16230_ACEOF
16231if ac_fn_c_try_run "$LINENO"; then :
16232  pgac_cv_snprintf_arg_control=yes
16233else
16234  pgac_cv_snprintf_arg_control=no
16235fi
16236rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16237  conftest.$ac_objext conftest.beam conftest.$ac_ext
16238fi
16239
16240
16241fi
16242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_arg_control" >&5
16243$as_echo "$pgac_cv_snprintf_arg_control" >&6; }
16244
16245  if test $pgac_cv_snprintf_arg_control != yes ; then
16246    pgac_need_repl_snprintf=yes
16247  fi
16248fi
16249
16250
16251
16252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16253$as_echo_n "checking whether long int is 64 bits... " >&6; }
16254if ${pgac_cv_type_long_int_64+:} false; then :
16255  $as_echo_n "(cached) " >&6
16256else
16257  if test "$cross_compiling" = yes; then :
16258  # If cross-compiling, check the size reported by the compiler and
16259# trust that the arithmetic works.
16260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16261/* end confdefs.h.  */
16262
16263int
16264main ()
16265{
16266static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16267test_array [0] = 0;
16268return test_array [0];
16269
16270  ;
16271  return 0;
16272}
16273_ACEOF
16274if ac_fn_c_try_compile "$LINENO"; then :
16275  pgac_cv_type_long_int_64=yes
16276else
16277  pgac_cv_type_long_int_64=no
16278fi
16279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16280else
16281  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16282/* end confdefs.h.  */
16283typedef long int ac_int64;
16284
16285/*
16286 * These are globals to discourage the compiler from folding all the
16287 * arithmetic tests down to compile-time constants.
16288 */
16289ac_int64 a = 20000001;
16290ac_int64 b = 40000005;
16291
16292int does_int64_work()
16293{
16294  ac_int64 c,d;
16295
16296  if (sizeof(ac_int64) != 8)
16297    return 0;			/* definitely not the right size */
16298
16299  /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16300  c = a * b;
16301  d = (c + b) / b;
16302  if (d != a+1)
16303    return 0;
16304  return 1;
16305}
16306
16307int
16308main() {
16309  return (! does_int64_work());
16310}
16311_ACEOF
16312if ac_fn_c_try_run "$LINENO"; then :
16313  pgac_cv_type_long_int_64=yes
16314else
16315  pgac_cv_type_long_int_64=no
16316fi
16317rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16318  conftest.$ac_objext conftest.beam conftest.$ac_ext
16319fi
16320
16321fi
16322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
16323$as_echo "$pgac_cv_type_long_int_64" >&6; }
16324
16325HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
16326if test x"$pgac_cv_type_long_int_64" = xyes ; then
16327
16328$as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
16329
16330fi
16331
16332
16333if test x"$HAVE_LONG_INT_64" = x"yes" ; then
16334  pg_int64_type="long int"
16335else
16336  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
16337$as_echo_n "checking whether long long int is 64 bits... " >&6; }
16338if ${pgac_cv_type_long_long_int_64+:} false; then :
16339  $as_echo_n "(cached) " >&6
16340else
16341  if test "$cross_compiling" = yes; then :
16342  # If cross-compiling, check the size reported by the compiler and
16343# trust that the arithmetic works.
16344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16345/* end confdefs.h.  */
16346
16347int
16348main ()
16349{
16350static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
16351test_array [0] = 0;
16352return test_array [0];
16353
16354  ;
16355  return 0;
16356}
16357_ACEOF
16358if ac_fn_c_try_compile "$LINENO"; then :
16359  pgac_cv_type_long_long_int_64=yes
16360else
16361  pgac_cv_type_long_long_int_64=no
16362fi
16363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16364else
16365  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16366/* end confdefs.h.  */
16367typedef long long int ac_int64;
16368
16369/*
16370 * These are globals to discourage the compiler from folding all the
16371 * arithmetic tests down to compile-time constants.
16372 */
16373ac_int64 a = 20000001;
16374ac_int64 b = 40000005;
16375
16376int does_int64_work()
16377{
16378  ac_int64 c,d;
16379
16380  if (sizeof(ac_int64) != 8)
16381    return 0;			/* definitely not the right size */
16382
16383  /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16384  c = a * b;
16385  d = (c + b) / b;
16386  if (d != a+1)
16387    return 0;
16388  return 1;
16389}
16390
16391int
16392main() {
16393  return (! does_int64_work());
16394}
16395_ACEOF
16396if ac_fn_c_try_run "$LINENO"; then :
16397  pgac_cv_type_long_long_int_64=yes
16398else
16399  pgac_cv_type_long_long_int_64=no
16400fi
16401rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16402  conftest.$ac_objext conftest.beam conftest.$ac_ext
16403fi
16404
16405fi
16406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
16407$as_echo "$pgac_cv_type_long_long_int_64" >&6; }
16408
16409HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
16410if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
16411
16412$as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
16413
16414fi
16415
16416  if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16417    pg_int64_type="long long int"
16418  else
16419    as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
16420  fi
16421fi
16422
16423
16424cat >>confdefs.h <<_ACEOF
16425#define PG_INT64_TYPE $pg_int64_type
16426_ACEOF
16427
16428
16429# Select the printf length modifier that goes with that, too.
16430# (This used to be bound up with replacement-snprintf selection, but now
16431# we assume that the native *printf functions use standard length modifiers.)
16432if test x"$pg_int64_type" = x"long long int" ; then
16433  INT64_MODIFIER='"ll"'
16434else
16435  INT64_MODIFIER='"l"'
16436fi
16437
16438
16439cat >>confdefs.h <<_ACEOF
16440#define INT64_MODIFIER $INT64_MODIFIER
16441_ACEOF
16442
16443
16444# Force use of our snprintf if the system's doesn't support the %z flag.
16445# (Note this test uses PG_INT64_TYPE and INT64_MODIFIER.)
16446if test "$pgac_need_repl_snprintf" = no; then
16447  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports the %z modifier" >&5
16448$as_echo_n "checking whether snprintf supports the %z modifier... " >&6; }
16449if ${pgac_cv_snprintf_size_t_support+:} false; then :
16450  $as_echo_n "(cached) " >&6
16451else
16452  if test "$cross_compiling" = yes; then :
16453  pgac_cv_snprintf_size_t_support=cross
16454else
16455  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16456/* end confdefs.h.  */
16457#include <stdio.h>
16458#include <string.h>
16459
16460int main()
16461{
16462  char bufz[100];
16463  char buf64[100];
16464
16465  /*
16466   * Print the largest unsigned number fitting in a size_t using both %zu
16467   * and the previously-determined format for 64-bit integers.  Note that
16468   * we don't run this code unless we know snprintf handles 64-bit ints.
16469   */
16470  bufz[0] = '\0';  /* in case snprintf fails to emit anything */
16471  snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
16472  snprintf(buf64, sizeof(buf64), "%" INT64_MODIFIER "u",
16473    (unsigned PG_INT64_TYPE) ~((size_t) 0));
16474  if (strcmp(bufz, buf64) != 0)
16475    return 1;
16476  return 0;
16477}
16478_ACEOF
16479if ac_fn_c_try_run "$LINENO"; then :
16480  pgac_cv_snprintf_size_t_support=yes
16481else
16482  pgac_cv_snprintf_size_t_support=no
16483fi
16484rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16485  conftest.$ac_objext conftest.beam conftest.$ac_ext
16486fi
16487
16488
16489fi
16490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_size_t_support" >&5
16491$as_echo "$pgac_cv_snprintf_size_t_support" >&6; }
16492
16493  if test "$pgac_cv_snprintf_size_t_support" != yes; then
16494    pgac_need_repl_snprintf=yes
16495  fi
16496fi
16497
16498# Now we have checked all the reasons to replace snprintf
16499if test $pgac_need_repl_snprintf = yes; then
16500
16501$as_echo "#define USE_REPL_SNPRINTF 1" >>confdefs.h
16502
16503  case " $LIBOBJS " in
16504  *" snprintf.$ac_objext "* ) ;;
16505  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
16506 ;;
16507esac
16508
16509fi
16510
16511# has to be down here, rather than with the other builtins, because
16512# the test uses PG_INT64_TYPE.
16513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
16514$as_echo_n "checking for __builtin_mul_overflow... " >&6; }
16515if ${pgac_cv__builtin_op_overflow+:} false; then :
16516  $as_echo_n "(cached) " >&6
16517else
16518  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16519/* end confdefs.h.  */
16520
16521PG_INT64_TYPE a = 1;
16522PG_INT64_TYPE b = 1;
16523PG_INT64_TYPE result;
16524int oflo;
16525
16526int
16527main ()
16528{
16529oflo = __builtin_mul_overflow(a, b, &result);
16530  ;
16531  return 0;
16532}
16533_ACEOF
16534if ac_fn_c_try_link "$LINENO"; then :
16535  pgac_cv__builtin_op_overflow=yes
16536else
16537  pgac_cv__builtin_op_overflow=no
16538fi
16539rm -f core conftest.err conftest.$ac_objext \
16540    conftest$ac_exeext conftest.$ac_ext
16541fi
16542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
16543$as_echo "$pgac_cv__builtin_op_overflow" >&6; }
16544if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
16545
16546$as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
16547
16548fi
16549
16550# Check size of void *, size_t (enables tweaks for > 32bit address space)
16551# The cast to long int works around a bug in the HP C Compiler
16552# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16553# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16554# This bug is HP SR number 8606223364.
16555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
16556$as_echo_n "checking size of void *... " >&6; }
16557if ${ac_cv_sizeof_void_p+:} false; then :
16558  $as_echo_n "(cached) " >&6
16559else
16560  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
16561
16562else
16563  if test "$ac_cv_type_void_p" = yes; then
16564     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16565$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16566as_fn_error 77 "cannot compute sizeof (void *)
16567See \`config.log' for more details" "$LINENO" 5; }
16568   else
16569     ac_cv_sizeof_void_p=0
16570   fi
16571fi
16572
16573fi
16574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
16575$as_echo "$ac_cv_sizeof_void_p" >&6; }
16576
16577
16578
16579cat >>confdefs.h <<_ACEOF
16580#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
16581_ACEOF
16582
16583
16584# The cast to long int works around a bug in the HP C Compiler
16585# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16586# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16587# This bug is HP SR number 8606223364.
16588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
16589$as_echo_n "checking size of size_t... " >&6; }
16590if ${ac_cv_sizeof_size_t+:} false; then :
16591  $as_echo_n "(cached) " >&6
16592else
16593  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
16594
16595else
16596  if test "$ac_cv_type_size_t" = yes; then
16597     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16598$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16599as_fn_error 77 "cannot compute sizeof (size_t)
16600See \`config.log' for more details" "$LINENO" 5; }
16601   else
16602     ac_cv_sizeof_size_t=0
16603   fi
16604fi
16605
16606fi
16607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
16608$as_echo "$ac_cv_sizeof_size_t" >&6; }
16609
16610
16611
16612cat >>confdefs.h <<_ACEOF
16613#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
16614_ACEOF
16615
16616
16617# The cast to long int works around a bug in the HP C Compiler
16618# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16619# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16620# This bug is HP SR number 8606223364.
16621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
16622$as_echo_n "checking size of long... " >&6; }
16623if ${ac_cv_sizeof_long+:} false; then :
16624  $as_echo_n "(cached) " >&6
16625else
16626  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
16627
16628else
16629  if test "$ac_cv_type_long" = yes; then
16630     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16631$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16632as_fn_error 77 "cannot compute sizeof (long)
16633See \`config.log' for more details" "$LINENO" 5; }
16634   else
16635     ac_cv_sizeof_long=0
16636   fi
16637fi
16638
16639fi
16640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
16641$as_echo "$ac_cv_sizeof_long" >&6; }
16642
16643
16644
16645cat >>confdefs.h <<_ACEOF
16646#define SIZEOF_LONG $ac_cv_sizeof_long
16647_ACEOF
16648
16649
16650
16651# Decide whether float4 is passed by value: user-selectable, enabled by default
16652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
16653$as_echo_n "checking whether to build with float4 passed by value... " >&6; }
16654
16655
16656# Check whether --enable-float4-byval was given.
16657if test "${enable_float4_byval+set}" = set; then :
16658  enableval=$enable_float4_byval;
16659  case $enableval in
16660    yes)
16661
16662$as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16663
16664               float4passbyval=true
16665      ;;
16666    no)
16667      float4passbyval=false
16668      ;;
16669    *)
16670      as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
16671      ;;
16672  esac
16673
16674else
16675  enable_float4_byval=yes
16676
16677$as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16678
16679               float4passbyval=true
16680fi
16681
16682
16683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
16684$as_echo "$enable_float4_byval" >&6; }
16685
16686cat >>confdefs.h <<_ACEOF
16687#define FLOAT4PASSBYVAL $float4passbyval
16688_ACEOF
16689
16690
16691# Decide whether float8 is passed by value.
16692# Note: this setting also controls int8 and related types such as timestamp.
16693# If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
16694# If not, trying to select it is an error.
16695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
16696$as_echo_n "checking whether to build with float8 passed by value... " >&6; }
16697if test $ac_cv_sizeof_void_p -ge 8 ; then
16698
16699
16700# Check whether --enable-float8-byval was given.
16701if test "${enable_float8_byval+set}" = set; then :
16702  enableval=$enable_float8_byval;
16703  case $enableval in
16704    yes)
16705      :
16706      ;;
16707    no)
16708      :
16709      ;;
16710    *)
16711      as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16712      ;;
16713  esac
16714
16715else
16716  enable_float8_byval=yes
16717
16718fi
16719
16720
16721else
16722
16723
16724# Check whether --enable-float8-byval was given.
16725if test "${enable_float8_byval+set}" = set; then :
16726  enableval=$enable_float8_byval;
16727  case $enableval in
16728    yes)
16729      :
16730      ;;
16731    no)
16732      :
16733      ;;
16734    *)
16735      as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16736      ;;
16737  esac
16738
16739else
16740  enable_float8_byval=no
16741
16742fi
16743
16744
16745  if test "$enable_float8_byval" = yes ; then
16746    as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
16747  fi
16748fi
16749if test "$enable_float8_byval" = yes ; then
16750
16751$as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
16752
16753  float8passbyval=true
16754else
16755  float8passbyval=false
16756fi
16757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
16758$as_echo "$enable_float8_byval" >&6; }
16759
16760cat >>confdefs.h <<_ACEOF
16761#define FLOAT8PASSBYVAL $float8passbyval
16762_ACEOF
16763
16764
16765# Determine memory alignment requirements for the basic C data types.
16766
16767# The cast to long int works around a bug in the HP C Compiler,
16768# see AC_CHECK_SIZEOF for more information.
16769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
16770$as_echo_n "checking alignment of short... " >&6; }
16771if ${ac_cv_alignof_short+:} false; then :
16772  $as_echo_n "(cached) " >&6
16773else
16774  if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
16775#ifndef offsetof
16776# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16777#endif
16778typedef struct { char x; short y; } ac__type_alignof_;"; then :
16779
16780else
16781  if test "$ac_cv_type_short" = yes; then
16782     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16783$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16784as_fn_error 77 "cannot compute alignment of short
16785See \`config.log' for more details" "$LINENO" 5; }
16786   else
16787     ac_cv_alignof_short=0
16788   fi
16789fi
16790
16791fi
16792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
16793$as_echo "$ac_cv_alignof_short" >&6; }
16794
16795
16796
16797cat >>confdefs.h <<_ACEOF
16798#define ALIGNOF_SHORT $ac_cv_alignof_short
16799_ACEOF
16800
16801
16802# The cast to long int works around a bug in the HP C Compiler,
16803# see AC_CHECK_SIZEOF for more information.
16804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
16805$as_echo_n "checking alignment of int... " >&6; }
16806if ${ac_cv_alignof_int+:} false; then :
16807  $as_echo_n "(cached) " >&6
16808else
16809  if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
16810#ifndef offsetof
16811# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16812#endif
16813typedef struct { char x; int y; } ac__type_alignof_;"; then :
16814
16815else
16816  if test "$ac_cv_type_int" = yes; then
16817     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16818$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16819as_fn_error 77 "cannot compute alignment of int
16820See \`config.log' for more details" "$LINENO" 5; }
16821   else
16822     ac_cv_alignof_int=0
16823   fi
16824fi
16825
16826fi
16827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
16828$as_echo "$ac_cv_alignof_int" >&6; }
16829
16830
16831
16832cat >>confdefs.h <<_ACEOF
16833#define ALIGNOF_INT $ac_cv_alignof_int
16834_ACEOF
16835
16836
16837# The cast to long int works around a bug in the HP C Compiler,
16838# see AC_CHECK_SIZEOF for more information.
16839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
16840$as_echo_n "checking alignment of long... " >&6; }
16841if ${ac_cv_alignof_long+:} false; then :
16842  $as_echo_n "(cached) " >&6
16843else
16844  if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
16845#ifndef offsetof
16846# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16847#endif
16848typedef struct { char x; long y; } ac__type_alignof_;"; then :
16849
16850else
16851  if test "$ac_cv_type_long" = yes; then
16852     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16853$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16854as_fn_error 77 "cannot compute alignment of long
16855See \`config.log' for more details" "$LINENO" 5; }
16856   else
16857     ac_cv_alignof_long=0
16858   fi
16859fi
16860
16861fi
16862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
16863$as_echo "$ac_cv_alignof_long" >&6; }
16864
16865
16866
16867cat >>confdefs.h <<_ACEOF
16868#define ALIGNOF_LONG $ac_cv_alignof_long
16869_ACEOF
16870
16871
16872if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16873  # The cast to long int works around a bug in the HP C Compiler,
16874# see AC_CHECK_SIZEOF for more information.
16875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
16876$as_echo_n "checking alignment of long long int... " >&6; }
16877if ${ac_cv_alignof_long_long_int+:} false; then :
16878  $as_echo_n "(cached) " >&6
16879else
16880  if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
16881#ifndef offsetof
16882# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16883#endif
16884typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
16885
16886else
16887  if test "$ac_cv_type_long_long_int" = yes; then
16888     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16889$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16890as_fn_error 77 "cannot compute alignment of long long int
16891See \`config.log' for more details" "$LINENO" 5; }
16892   else
16893     ac_cv_alignof_long_long_int=0
16894   fi
16895fi
16896
16897fi
16898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
16899$as_echo "$ac_cv_alignof_long_long_int" >&6; }
16900
16901
16902
16903cat >>confdefs.h <<_ACEOF
16904#define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
16905_ACEOF
16906
16907
16908fi
16909# The cast to long int works around a bug in the HP C Compiler,
16910# see AC_CHECK_SIZEOF for more information.
16911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
16912$as_echo_n "checking alignment of double... " >&6; }
16913if ${ac_cv_alignof_double+:} false; then :
16914  $as_echo_n "(cached) " >&6
16915else
16916  if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
16917#ifndef offsetof
16918# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16919#endif
16920typedef struct { char x; double y; } ac__type_alignof_;"; then :
16921
16922else
16923  if test "$ac_cv_type_double" = yes; then
16924     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16925$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16926as_fn_error 77 "cannot compute alignment of double
16927See \`config.log' for more details" "$LINENO" 5; }
16928   else
16929     ac_cv_alignof_double=0
16930   fi
16931fi
16932
16933fi
16934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
16935$as_echo "$ac_cv_alignof_double" >&6; }
16936
16937
16938
16939cat >>confdefs.h <<_ACEOF
16940#define ALIGNOF_DOUBLE $ac_cv_alignof_double
16941_ACEOF
16942
16943
16944
16945# Compute maximum alignment of any basic type.
16946# We assume long's alignment is at least as strong as char, short, or int;
16947# but we must check long long (if it is being used for int64) and double.
16948# Note that we intentionally do not consider any types wider than 64 bits,
16949# as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
16950# for disk and memory space.
16951
16952MAX_ALIGNOF=$ac_cv_alignof_long
16953if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
16954  MAX_ALIGNOF=$ac_cv_alignof_double
16955fi
16956if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
16957  MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
16958fi
16959
16960cat >>confdefs.h <<_ACEOF
16961#define MAXIMUM_ALIGNOF $MAX_ALIGNOF
16962_ACEOF
16963
16964
16965
16966# Some platforms predefine the types int8, int16, etc.  Only check
16967# a (hopefully) representative subset.
16968ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
16969"
16970if test "x$ac_cv_type_int8" = xyes; then :
16971
16972cat >>confdefs.h <<_ACEOF
16973#define HAVE_INT8 1
16974_ACEOF
16975
16976
16977fi
16978ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
16979"
16980if test "x$ac_cv_type_uint8" = xyes; then :
16981
16982cat >>confdefs.h <<_ACEOF
16983#define HAVE_UINT8 1
16984_ACEOF
16985
16986
16987fi
16988ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
16989"
16990if test "x$ac_cv_type_int64" = xyes; then :
16991
16992cat >>confdefs.h <<_ACEOF
16993#define HAVE_INT64 1
16994_ACEOF
16995
16996
16997fi
16998ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
16999"
17000if test "x$ac_cv_type_uint64" = xyes; then :
17001
17002cat >>confdefs.h <<_ACEOF
17003#define HAVE_UINT64 1
17004_ACEOF
17005
17006
17007fi
17008
17009
17010# Some compilers offer a 128-bit integer scalar type.
17011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
17012$as_echo_n "checking for __int128... " >&6; }
17013if ${pgac_cv__128bit_int+:} false; then :
17014  $as_echo_n "(cached) " >&6
17015else
17016  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17017/* end confdefs.h.  */
17018
17019/*
17020 * We don't actually run this test, just link it to verify that any support
17021 * functions needed for __int128 are present.
17022 *
17023 * These are globals to discourage the compiler from folding all the
17024 * arithmetic tests down to compile-time constants.  We do not have
17025 * convenient support for 128bit literals at this point...
17026 */
17027__int128 a = 48828125;
17028__int128 b = 97656250;
17029
17030int
17031main ()
17032{
17033
17034__int128 c,d;
17035a = (a << 12) + 1; /* 200000000001 */
17036b = (b << 12) + 5; /* 400000000005 */
17037/* try the most relevant arithmetic ops */
17038c = a * b;
17039d = (c + b) / b;
17040/* must use the results, else compiler may optimize arithmetic away */
17041if (d != a+1)
17042  return 1;
17043
17044  ;
17045  return 0;
17046}
17047_ACEOF
17048if ac_fn_c_try_link "$LINENO"; then :
17049  pgac_cv__128bit_int=yes
17050else
17051  pgac_cv__128bit_int=no
17052fi
17053rm -f core conftest.err conftest.$ac_objext \
17054    conftest$ac_exeext conftest.$ac_ext
17055fi
17056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
17057$as_echo "$pgac_cv__128bit_int" >&6; }
17058if test x"$pgac_cv__128bit_int" = xyes ; then
17059  # Use of non-default alignment with __int128 tickles bugs in some compilers.
17060  # If not cross-compiling, we can test for bugs and disable use of __int128
17061  # with buggy compilers.  If cross-compiling, hope for the best.
17062  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
17063  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
17064$as_echo_n "checking for __int128 alignment bug... " >&6; }
17065if ${pgac_cv__128bit_int_bug+:} false; then :
17066  $as_echo_n "(cached) " >&6
17067else
17068  if test "$cross_compiling" = yes; then :
17069  pgac_cv__128bit_int_bug="assuming ok"
17070else
17071  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17072/* end confdefs.h.  */
17073
17074/* This must match the corresponding code in c.h: */
17075#if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
17076#define pg_attribute_aligned(a) __attribute__((aligned(a)))
17077#endif
17078typedef __int128 int128a
17079#if defined(pg_attribute_aligned)
17080pg_attribute_aligned(8)
17081#endif
17082;
17083int128a holder;
17084void pass_by_val(void *buffer, int128a par) { holder = par; }
17085
17086int
17087main ()
17088{
17089
17090long int i64 = 97656225L << 12;
17091int128a q;
17092pass_by_val(main, (int128a) i64);
17093q = (int128a) i64;
17094if (q != holder)
17095  return 1;
17096
17097  ;
17098  return 0;
17099}
17100_ACEOF
17101if ac_fn_c_try_run "$LINENO"; then :
17102  pgac_cv__128bit_int_bug=ok
17103else
17104  pgac_cv__128bit_int_bug=broken
17105fi
17106rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17107  conftest.$ac_objext conftest.beam conftest.$ac_ext
17108fi
17109
17110fi
17111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
17112$as_echo "$pgac_cv__128bit_int_bug" >&6; }
17113  if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
17114
17115$as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
17116
17117    # The cast to long int works around a bug in the HP C Compiler,
17118# see AC_CHECK_SIZEOF for more information.
17119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
17120$as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
17121if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
17122  $as_echo_n "(cached) " >&6
17123else
17124  if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE"        "$ac_includes_default
17125#ifndef offsetof
17126# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17127#endif
17128typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
17129
17130else
17131  if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
17132     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17133$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17134as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
17135See \`config.log' for more details" "$LINENO" 5; }
17136   else
17137     ac_cv_alignof_PG_INT128_TYPE=0
17138   fi
17139fi
17140
17141fi
17142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
17143$as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
17144
17145
17146
17147cat >>confdefs.h <<_ACEOF
17148#define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
17149_ACEOF
17150
17151
17152  fi
17153fi
17154
17155# Check for various atomic operations now that we have checked how to declare
17156# 64bit integers.
17157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
17158$as_echo_n "checking for builtin __sync char locking functions... " >&6; }
17159if ${pgac_cv_gcc_sync_char_tas+:} false; then :
17160  $as_echo_n "(cached) " >&6
17161else
17162  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17163/* end confdefs.h.  */
17164
17165int
17166main ()
17167{
17168char lock = 0;
17169   __sync_lock_test_and_set(&lock, 1);
17170   __sync_lock_release(&lock);
17171  ;
17172  return 0;
17173}
17174_ACEOF
17175if ac_fn_c_try_link "$LINENO"; then :
17176  pgac_cv_gcc_sync_char_tas="yes"
17177else
17178  pgac_cv_gcc_sync_char_tas="no"
17179fi
17180rm -f core conftest.err conftest.$ac_objext \
17181    conftest$ac_exeext conftest.$ac_ext
17182fi
17183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
17184$as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
17185if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
17186
17187$as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
17188
17189fi
17190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
17191$as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
17192if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
17193  $as_echo_n "(cached) " >&6
17194else
17195  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17196/* end confdefs.h.  */
17197
17198int
17199main ()
17200{
17201int lock = 0;
17202   __sync_lock_test_and_set(&lock, 1);
17203   __sync_lock_release(&lock);
17204  ;
17205  return 0;
17206}
17207_ACEOF
17208if ac_fn_c_try_link "$LINENO"; then :
17209  pgac_cv_gcc_sync_int32_tas="yes"
17210else
17211  pgac_cv_gcc_sync_int32_tas="no"
17212fi
17213rm -f core conftest.err conftest.$ac_objext \
17214    conftest$ac_exeext conftest.$ac_ext
17215fi
17216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
17217$as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
17218if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
17219
17220$as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
17221
17222fi
17223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17224$as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17225if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17226  $as_echo_n "(cached) " >&6
17227else
17228  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17229/* end confdefs.h.  */
17230
17231int
17232main ()
17233{
17234int val = 0;
17235   __sync_val_compare_and_swap(&val, 0, 37);
17236  ;
17237  return 0;
17238}
17239_ACEOF
17240if ac_fn_c_try_link "$LINENO"; then :
17241  pgac_cv_gcc_sync_int32_cas="yes"
17242else
17243  pgac_cv_gcc_sync_int32_cas="no"
17244fi
17245rm -f core conftest.err conftest.$ac_objext \
17246    conftest$ac_exeext conftest.$ac_ext
17247fi
17248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17249$as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17250if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17251
17252$as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17253
17254fi
17255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17256$as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17257if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17258  $as_echo_n "(cached) " >&6
17259else
17260  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17261/* end confdefs.h.  */
17262
17263int
17264main ()
17265{
17266PG_INT64_TYPE lock = 0;
17267   __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17268  ;
17269  return 0;
17270}
17271_ACEOF
17272if ac_fn_c_try_link "$LINENO"; then :
17273  pgac_cv_gcc_sync_int64_cas="yes"
17274else
17275  pgac_cv_gcc_sync_int64_cas="no"
17276fi
17277rm -f core conftest.err conftest.$ac_objext \
17278    conftest$ac_exeext conftest.$ac_ext
17279fi
17280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17281$as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17282if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17283
17284$as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17285
17286fi
17287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17288$as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17289if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17290  $as_echo_n "(cached) " >&6
17291else
17292  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17293/* end confdefs.h.  */
17294
17295int
17296main ()
17297{
17298int val = 0;
17299   int expect = 0;
17300   __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17301  ;
17302  return 0;
17303}
17304_ACEOF
17305if ac_fn_c_try_link "$LINENO"; then :
17306  pgac_cv_gcc_atomic_int32_cas="yes"
17307else
17308  pgac_cv_gcc_atomic_int32_cas="no"
17309fi
17310rm -f core conftest.err conftest.$ac_objext \
17311    conftest$ac_exeext conftest.$ac_ext
17312fi
17313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17314$as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17315if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17316
17317$as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17318
17319fi
17320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17321$as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17322if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17323  $as_echo_n "(cached) " >&6
17324else
17325  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17326/* end confdefs.h.  */
17327
17328int
17329main ()
17330{
17331PG_INT64_TYPE val = 0;
17332   PG_INT64_TYPE expect = 0;
17333   __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17334  ;
17335  return 0;
17336}
17337_ACEOF
17338if ac_fn_c_try_link "$LINENO"; then :
17339  pgac_cv_gcc_atomic_int64_cas="yes"
17340else
17341  pgac_cv_gcc_atomic_int64_cas="no"
17342fi
17343rm -f core conftest.err conftest.$ac_objext \
17344    conftest$ac_exeext conftest.$ac_ext
17345fi
17346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17347$as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17348if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17349
17350$as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17351
17352fi
17353
17354
17355# Check for x86 cpuid instruction
17356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17357$as_echo_n "checking for __get_cpuid... " >&6; }
17358if ${pgac_cv__get_cpuid+:} false; then :
17359  $as_echo_n "(cached) " >&6
17360else
17361  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17362/* end confdefs.h.  */
17363#include <cpuid.h>
17364int
17365main ()
17366{
17367unsigned int exx[4] = {0, 0, 0, 0};
17368  __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17369
17370  ;
17371  return 0;
17372}
17373_ACEOF
17374if ac_fn_c_try_link "$LINENO"; then :
17375  pgac_cv__get_cpuid="yes"
17376else
17377  pgac_cv__get_cpuid="no"
17378fi
17379rm -f core conftest.err conftest.$ac_objext \
17380    conftest$ac_exeext conftest.$ac_ext
17381fi
17382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17383$as_echo "$pgac_cv__get_cpuid" >&6; }
17384if test x"$pgac_cv__get_cpuid" = x"yes"; then
17385
17386$as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17387
17388fi
17389
17390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17391$as_echo_n "checking for __cpuid... " >&6; }
17392if ${pgac_cv__cpuid+:} false; then :
17393  $as_echo_n "(cached) " >&6
17394else
17395  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17396/* end confdefs.h.  */
17397#include <intrin.h>
17398int
17399main ()
17400{
17401unsigned int exx[4] = {0, 0, 0, 0};
17402  __get_cpuid(exx[0], 1);
17403
17404  ;
17405  return 0;
17406}
17407_ACEOF
17408if ac_fn_c_try_link "$LINENO"; then :
17409  pgac_cv__cpuid="yes"
17410else
17411  pgac_cv__cpuid="no"
17412fi
17413rm -f core conftest.err conftest.$ac_objext \
17414    conftest$ac_exeext conftest.$ac_ext
17415fi
17416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17417$as_echo "$pgac_cv__cpuid" >&6; }
17418if test x"$pgac_cv__cpuid" = x"yes"; then
17419
17420$as_echo "#define HAVE__CPUID 1" >>confdefs.h
17421
17422fi
17423
17424# Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17425#
17426# First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17427# with the default compiler flags. If not, check if adding the -msse4.2
17428# flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
17429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17430$as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17431if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17432  $as_echo_n "(cached) " >&6
17433else
17434  pgac_save_CFLAGS=$CFLAGS
17435CFLAGS="$pgac_save_CFLAGS "
17436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17437/* end confdefs.h.  */
17438#include <nmmintrin.h>
17439int
17440main ()
17441{
17442unsigned int crc = 0;
17443   crc = _mm_crc32_u8(crc, 0);
17444   crc = _mm_crc32_u32(crc, 0);
17445   /* return computed value, to prevent the above being optimized away */
17446   return crc == 0;
17447  ;
17448  return 0;
17449}
17450_ACEOF
17451if ac_fn_c_try_link "$LINENO"; then :
17452  pgac_cv_sse42_crc32_intrinsics_=yes
17453else
17454  pgac_cv_sse42_crc32_intrinsics_=no
17455fi
17456rm -f core conftest.err conftest.$ac_objext \
17457    conftest$ac_exeext conftest.$ac_ext
17458CFLAGS="$pgac_save_CFLAGS"
17459fi
17460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
17461$as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
17462if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
17463  CFLAGS_SSE42=""
17464  pgac_sse42_crc32_intrinsics=yes
17465fi
17466
17467if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
17468  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
17469$as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
17470if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
17471  $as_echo_n "(cached) " >&6
17472else
17473  pgac_save_CFLAGS=$CFLAGS
17474CFLAGS="$pgac_save_CFLAGS -msse4.2"
17475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17476/* end confdefs.h.  */
17477#include <nmmintrin.h>
17478int
17479main ()
17480{
17481unsigned int crc = 0;
17482   crc = _mm_crc32_u8(crc, 0);
17483   crc = _mm_crc32_u32(crc, 0);
17484   /* return computed value, to prevent the above being optimized away */
17485   return crc == 0;
17486  ;
17487  return 0;
17488}
17489_ACEOF
17490if ac_fn_c_try_link "$LINENO"; then :
17491  pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
17492else
17493  pgac_cv_sse42_crc32_intrinsics__msse4_2=no
17494fi
17495rm -f core conftest.err conftest.$ac_objext \
17496    conftest$ac_exeext conftest.$ac_ext
17497CFLAGS="$pgac_save_CFLAGS"
17498fi
17499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
17500$as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
17501if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
17502  CFLAGS_SSE42="-msse4.2"
17503  pgac_sse42_crc32_intrinsics=yes
17504fi
17505
17506fi
17507
17508
17509# Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
17510# define __SSE4_2__ in that case.
17511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17512/* end confdefs.h.  */
17513
17514int
17515main ()
17516{
17517
17518#ifndef __SSE4_2__
17519#error __SSE4_2__ not defined
17520#endif
17521
17522  ;
17523  return 0;
17524}
17525_ACEOF
17526if ac_fn_c_try_compile "$LINENO"; then :
17527  SSE4_2_TARGETED=1
17528fi
17529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17530
17531# Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
17532#
17533# First check if __crc32c* intrinsics can be used with the default compiler
17534# flags. If not, check if adding -march=armv8-a+crc flag helps.
17535# CFLAGS_ARMV8_CRC32C is set if the extra flag is required.
17536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
17537$as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
17538if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
17539  $as_echo_n "(cached) " >&6
17540else
17541  pgac_save_CFLAGS=$CFLAGS
17542CFLAGS="$pgac_save_CFLAGS "
17543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17544/* end confdefs.h.  */
17545#include <arm_acle.h>
17546int
17547main ()
17548{
17549unsigned int crc = 0;
17550   crc = __crc32cb(crc, 0);
17551   crc = __crc32ch(crc, 0);
17552   crc = __crc32cw(crc, 0);
17553   crc = __crc32cd(crc, 0);
17554   /* return computed value, to prevent the above being optimized away */
17555   return crc == 0;
17556  ;
17557  return 0;
17558}
17559_ACEOF
17560if ac_fn_c_try_link "$LINENO"; then :
17561  pgac_cv_armv8_crc32c_intrinsics_=yes
17562else
17563  pgac_cv_armv8_crc32c_intrinsics_=no
17564fi
17565rm -f core conftest.err conftest.$ac_objext \
17566    conftest$ac_exeext conftest.$ac_ext
17567CFLAGS="$pgac_save_CFLAGS"
17568fi
17569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
17570$as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
17571if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
17572  CFLAGS_ARMV8_CRC32C=""
17573  pgac_armv8_crc32c_intrinsics=yes
17574fi
17575
17576if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
17577  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
17578$as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
17579if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
17580  $as_echo_n "(cached) " >&6
17581else
17582  pgac_save_CFLAGS=$CFLAGS
17583CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
17584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17585/* end confdefs.h.  */
17586#include <arm_acle.h>
17587int
17588main ()
17589{
17590unsigned int crc = 0;
17591   crc = __crc32cb(crc, 0);
17592   crc = __crc32ch(crc, 0);
17593   crc = __crc32cw(crc, 0);
17594   crc = __crc32cd(crc, 0);
17595   /* return computed value, to prevent the above being optimized away */
17596   return crc == 0;
17597  ;
17598  return 0;
17599}
17600_ACEOF
17601if ac_fn_c_try_link "$LINENO"; then :
17602  pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
17603else
17604  pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
17605fi
17606rm -f core conftest.err conftest.$ac_objext \
17607    conftest$ac_exeext conftest.$ac_ext
17608CFLAGS="$pgac_save_CFLAGS"
17609fi
17610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
17611$as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
17612if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
17613  CFLAGS_ARMV8_CRC32C="-march=armv8-a+crc"
17614  pgac_armv8_crc32c_intrinsics=yes
17615fi
17616
17617fi
17618
17619
17620# Select CRC-32C implementation.
17621#
17622# If we are targeting a processor that has Intel SSE 4.2 instructions, we can
17623# use the special CRC instructions for calculating CRC-32C. If we're not
17624# targeting such a processor, but we can nevertheless produce code that uses
17625# the SSE intrinsics, perhaps with some extra CFLAGS, compile both
17626# implementations and select which one to use at runtime, depending on whether
17627# SSE 4.2 is supported by the processor we're running on.
17628#
17629# Similarly, if we are targeting an ARM processor that has the CRC
17630# instructions that are part of the ARMv8 CRC Extension, use them. And if
17631# we're not targeting such a processor, but can nevertheless produce code that
17632# uses the CRC instructions, compile both, and select at runtime.
17633#
17634# You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
17635# in the template or configure command line.
17636if test x"$USE_SLICING_BY_8_CRC32C" = x"" && test x"$USE_SSE42_CRC32C" = x"" && test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"" && test x"$USE_ARMV8_CRC32C" = x"" && test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x""; then
17637  # Use Intel SSE 4.2 if available.
17638  if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
17639    USE_SSE42_CRC32C=1
17640  else
17641    # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
17642    # the runtime check.
17643    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
17644      USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
17645    else
17646      # Use ARM CRC Extension if available.
17647      if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_ARMV8_CRC32C" = x""; then
17648        USE_ARMV8_CRC32C=1
17649      else
17650        # ARM CRC Extension, with runtime check?
17651        if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
17652          USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
17653        else
17654          # fall back to slicing-by-8 algorithm, which doesn't require any
17655          # special CPU support.
17656          USE_SLICING_BY_8_CRC32C=1
17657	fi
17658      fi
17659    fi
17660  fi
17661fi
17662
17663# Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
17664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
17665$as_echo_n "checking which CRC-32C implementation to use... " >&6; }
17666if test x"$USE_SSE42_CRC32C" = x"1"; then
17667
17668$as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
17669
17670  PG_CRC32C_OBJS="pg_crc32c_sse42.o"
17671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
17672$as_echo "SSE 4.2" >&6; }
17673else
17674  if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17675
17676$as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17677
17678    PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
17679    { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
17680$as_echo "SSE 4.2 with runtime check" >&6; }
17681  else
17682    if test x"$USE_ARMV8_CRC32C" = x"1"; then
17683
17684$as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
17685
17686      PG_CRC32C_OBJS="pg_crc32c_armv8.o"
17687      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
17688$as_echo "ARMv8 CRC instructions" >&6; }
17689    else
17690      if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17691
17692$as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17693
17694        PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
17695        { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
17696$as_echo "ARMv8 CRC instructions with runtime check" >&6; }
17697      else
17698
17699$as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
17700
17701        PG_CRC32C_OBJS="pg_crc32c_sb8.o"
17702        { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
17703$as_echo "slicing-by-8" >&6; }
17704      fi
17705    fi
17706  fi
17707fi
17708
17709
17710
17711# Select semaphore implementation type.
17712if test "$PORTNAME" != "win32"; then
17713  if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
17714    # Need sem_open for this
17715    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
17716$as_echo_n "checking for library containing sem_open... " >&6; }
17717if ${ac_cv_search_sem_open+:} false; then :
17718  $as_echo_n "(cached) " >&6
17719else
17720  ac_func_search_save_LIBS=$LIBS
17721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17722/* end confdefs.h.  */
17723
17724/* Override any GCC internal prototype to avoid an error.
17725   Use char because int might match the return type of a GCC
17726   builtin and then its argument prototype would still apply.  */
17727#ifdef __cplusplus
17728extern "C"
17729#endif
17730char sem_open ();
17731int
17732main ()
17733{
17734return sem_open ();
17735  ;
17736  return 0;
17737}
17738_ACEOF
17739for ac_lib in '' rt pthread; do
17740  if test -z "$ac_lib"; then
17741    ac_res="none required"
17742  else
17743    ac_res=-l$ac_lib
17744    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17745  fi
17746  if ac_fn_c_try_link "$LINENO"; then :
17747  ac_cv_search_sem_open=$ac_res
17748fi
17749rm -f core conftest.err conftest.$ac_objext \
17750    conftest$ac_exeext
17751  if ${ac_cv_search_sem_open+:} false; then :
17752  break
17753fi
17754done
17755if ${ac_cv_search_sem_open+:} false; then :
17756
17757else
17758  ac_cv_search_sem_open=no
17759fi
17760rm conftest.$ac_ext
17761LIBS=$ac_func_search_save_LIBS
17762fi
17763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
17764$as_echo "$ac_cv_search_sem_open" >&6; }
17765ac_res=$ac_cv_search_sem_open
17766if test "$ac_res" != no; then :
17767  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17768  USE_NAMED_POSIX_SEMAPHORES=1
17769fi
17770
17771  fi
17772  if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
17773    # Need sem_init for this
17774    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
17775$as_echo_n "checking for library containing sem_init... " >&6; }
17776if ${ac_cv_search_sem_init+:} false; then :
17777  $as_echo_n "(cached) " >&6
17778else
17779  ac_func_search_save_LIBS=$LIBS
17780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17781/* end confdefs.h.  */
17782
17783/* Override any GCC internal prototype to avoid an error.
17784   Use char because int might match the return type of a GCC
17785   builtin and then its argument prototype would still apply.  */
17786#ifdef __cplusplus
17787extern "C"
17788#endif
17789char sem_init ();
17790int
17791main ()
17792{
17793return sem_init ();
17794  ;
17795  return 0;
17796}
17797_ACEOF
17798for ac_lib in '' rt pthread; do
17799  if test -z "$ac_lib"; then
17800    ac_res="none required"
17801  else
17802    ac_res=-l$ac_lib
17803    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17804  fi
17805  if ac_fn_c_try_link "$LINENO"; then :
17806  ac_cv_search_sem_init=$ac_res
17807fi
17808rm -f core conftest.err conftest.$ac_objext \
17809    conftest$ac_exeext
17810  if ${ac_cv_search_sem_init+:} false; then :
17811  break
17812fi
17813done
17814if ${ac_cv_search_sem_init+:} false; then :
17815
17816else
17817  ac_cv_search_sem_init=no
17818fi
17819rm conftest.$ac_ext
17820LIBS=$ac_func_search_save_LIBS
17821fi
17822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
17823$as_echo "$ac_cv_search_sem_init" >&6; }
17824ac_res=$ac_cv_search_sem_init
17825if test "$ac_res" != no; then :
17826  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17827  USE_UNNAMED_POSIX_SEMAPHORES=1
17828fi
17829
17830  fi
17831  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
17832$as_echo_n "checking which semaphore API to use... " >&6; }
17833  if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
17834
17835$as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17836
17837    SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17838    sematype="named POSIX"
17839  else
17840    if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
17841
17842$as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17843
17844      SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17845      sematype="unnamed POSIX"
17846    else
17847
17848$as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
17849
17850      SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
17851      sematype="System V"
17852    fi
17853  fi
17854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
17855$as_echo "$sematype" >&6; }
17856else
17857
17858$as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
17859
17860  SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
17861fi
17862
17863
17864# Select shared-memory implementation type.
17865if test "$PORTNAME" != "win32"; then
17866
17867$as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
17868
17869  SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
17870else
17871
17872$as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
17873
17874  SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
17875fi
17876
17877# Select random number source
17878#
17879# You can override this logic by setting the appropriate USE_*RANDOM flag to 1
17880# in the template or configure command line.
17881
17882# If not selected manually, try to select a source automatically.
17883if test "$enable_strong_random" = "yes" && test x"$USE_OPENSSL_RANDOM" = x"" && test x"$USE_WIN32_RANDOM" = x"" && test x"$USE_DEV_URANDOM" = x"" ; then
17884  if test x"$with_openssl" = x"yes" ; then
17885    USE_OPENSSL_RANDOM=1
17886  elif test "$PORTNAME" = "win32" ; then
17887    USE_WIN32_RANDOM=1
17888  else
17889    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
17890$as_echo_n "checking for /dev/urandom... " >&6; }
17891if ${ac_cv_file__dev_urandom+:} false; then :
17892  $as_echo_n "(cached) " >&6
17893else
17894  test "$cross_compiling" = yes &&
17895  as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
17896if test -r "/dev/urandom"; then
17897  ac_cv_file__dev_urandom=yes
17898else
17899  ac_cv_file__dev_urandom=no
17900fi
17901fi
17902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
17903$as_echo "$ac_cv_file__dev_urandom" >&6; }
17904if test "x$ac_cv_file__dev_urandom" = xyes; then :
17905
17906fi
17907
17908
17909    if test x"$ac_cv_file__dev_urandom" = x"yes" ; then
17910      USE_DEV_URANDOM=1
17911    fi
17912  fi
17913fi
17914
17915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
17916$as_echo_n "checking which random number source to use... " >&6; }
17917if test "$enable_strong_random" = yes ; then
17918  if test x"$USE_OPENSSL_RANDOM" = x"1" ; then
17919
17920$as_echo "#define USE_OPENSSL_RANDOM 1" >>confdefs.h
17921
17922    { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
17923$as_echo "OpenSSL" >&6; }
17924  elif test x"$USE_WIN32_RANDOM" = x"1" ; then
17925
17926$as_echo "#define USE_WIN32_RANDOM 1" >>confdefs.h
17927
17928    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
17929$as_echo "Windows native" >&6; }
17930  elif test x"$USE_DEV_URANDOM" = x"1" ; then
17931
17932$as_echo "#define USE_DEV_URANDOM 1" >>confdefs.h
17933
17934    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
17935$as_echo "/dev/urandom" >&6; }
17936  else
17937    as_fn_error $? "
17938no source of strong random numbers was found
17939PostgreSQL can use OpenSSL or /dev/urandom as a source of random numbers,
17940for authentication protocols. You can use --disable-strong-random to use a
17941built-in pseudo random number generator, but that may be insecure." "$LINENO" 5
17942  fi
17943
17944$as_echo "#define HAVE_STRONG_RANDOM 1" >>confdefs.h
17945
17946else
17947    { $as_echo "$as_me:${as_lineno-$LINENO}: result: weak builtin PRNG" >&5
17948$as_echo "weak builtin PRNG" >&6; }
17949    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
17950*** Not using a strong random number source may be insecure." >&5
17951$as_echo "$as_me: WARNING:
17952*** Not using a strong random number source may be insecure." >&2;}
17953fi
17954
17955# If not set in template file, set bytes to use libc memset()
17956if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
17957  MEMSET_LOOP_LIMIT=1024
17958fi
17959
17960cat >>confdefs.h <<_ACEOF
17961#define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
17962_ACEOF
17963
17964
17965
17966if test "$enable_nls" = yes ; then
17967
17968  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
17969$as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
17970if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17971  $as_echo_n "(cached) " >&6
17972else
17973  ac_func_search_save_LIBS=$LIBS
17974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17975/* end confdefs.h.  */
17976
17977/* Override any GCC internal prototype to avoid an error.
17978   Use char because int might match the return type of a GCC
17979   builtin and then its argument prototype would still apply.  */
17980#ifdef __cplusplus
17981extern "C"
17982#endif
17983char bind_textdomain_codeset ();
17984int
17985main ()
17986{
17987return bind_textdomain_codeset ();
17988  ;
17989  return 0;
17990}
17991_ACEOF
17992for ac_lib in '' intl; do
17993  if test -z "$ac_lib"; then
17994    ac_res="none required"
17995  else
17996    ac_res=-l$ac_lib
17997    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17998  fi
17999  if ac_fn_c_try_link "$LINENO"; then :
18000  ac_cv_search_bind_textdomain_codeset=$ac_res
18001fi
18002rm -f core conftest.err conftest.$ac_objext \
18003    conftest$ac_exeext
18004  if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18005  break
18006fi
18007done
18008if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18009
18010else
18011  ac_cv_search_bind_textdomain_codeset=no
18012fi
18013rm conftest.$ac_ext
18014LIBS=$ac_func_search_save_LIBS
18015fi
18016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
18017$as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
18018ac_res=$ac_cv_search_bind_textdomain_codeset
18019if test "$ac_res" != no; then :
18020  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18021
18022else
18023  as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
18024fi
18025
18026  ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
18027if test "x$ac_cv_header_libintl_h" = xyes; then :
18028
18029else
18030  as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
18031fi
18032
18033
18034  if test -z "$MSGFMT"; then
18035  for ac_prog in msgfmt
18036do
18037  # Extract the first word of "$ac_prog", so it can be a program name with args.
18038set dummy $ac_prog; ac_word=$2
18039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18040$as_echo_n "checking for $ac_word... " >&6; }
18041if ${ac_cv_path_MSGFMT+:} false; then :
18042  $as_echo_n "(cached) " >&6
18043else
18044  case $MSGFMT in
18045  [\\/]* | ?:[\\/]*)
18046  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
18047  ;;
18048  *)
18049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18050for as_dir in $PATH
18051do
18052  IFS=$as_save_IFS
18053  test -z "$as_dir" && as_dir=.
18054    for ac_exec_ext in '' $ac_executable_extensions; do
18055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18056    ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
18057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18058    break 2
18059  fi
18060done
18061  done
18062IFS=$as_save_IFS
18063
18064  ;;
18065esac
18066fi
18067MSGFMT=$ac_cv_path_MSGFMT
18068if test -n "$MSGFMT"; then
18069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18070$as_echo "$MSGFMT" >&6; }
18071else
18072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18073$as_echo "no" >&6; }
18074fi
18075
18076
18077  test -n "$MSGFMT" && break
18078done
18079
18080else
18081  # Report the value of MSGFMT in configure's output in all cases.
18082  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
18083$as_echo_n "checking for MSGFMT... " >&6; }
18084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18085$as_echo "$MSGFMT" >&6; }
18086fi
18087
18088  if test -z "$MSGFMT"; then
18089    as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
18090  fi
18091  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
18092$as_echo_n "checking for msgfmt flags... " >&6; }
18093if ${pgac_cv_msgfmt_flags+:} false; then :
18094  $as_echo_n "(cached) " >&6
18095else
18096  if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
18097    pgac_cv_msgfmt_flags=-c
18098fi
18099fi
18100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
18101$as_echo "$pgac_cv_msgfmt_flags" >&6; }
18102  MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
18103
18104  if test -z "$MSGMERGE"; then
18105  for ac_prog in msgmerge
18106do
18107  # Extract the first word of "$ac_prog", so it can be a program name with args.
18108set dummy $ac_prog; ac_word=$2
18109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18110$as_echo_n "checking for $ac_word... " >&6; }
18111if ${ac_cv_path_MSGMERGE+:} false; then :
18112  $as_echo_n "(cached) " >&6
18113else
18114  case $MSGMERGE in
18115  [\\/]* | ?:[\\/]*)
18116  ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18117  ;;
18118  *)
18119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18120for as_dir in $PATH
18121do
18122  IFS=$as_save_IFS
18123  test -z "$as_dir" && as_dir=.
18124    for ac_exec_ext in '' $ac_executable_extensions; do
18125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18126    ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
18127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18128    break 2
18129  fi
18130done
18131  done
18132IFS=$as_save_IFS
18133
18134  ;;
18135esac
18136fi
18137MSGMERGE=$ac_cv_path_MSGMERGE
18138if test -n "$MSGMERGE"; then
18139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18140$as_echo "$MSGMERGE" >&6; }
18141else
18142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18143$as_echo "no" >&6; }
18144fi
18145
18146
18147  test -n "$MSGMERGE" && break
18148done
18149
18150else
18151  # Report the value of MSGMERGE in configure's output in all cases.
18152  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18153$as_echo_n "checking for MSGMERGE... " >&6; }
18154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18155$as_echo "$MSGMERGE" >&6; }
18156fi
18157
18158  if test -z "$XGETTEXT"; then
18159  for ac_prog in xgettext
18160do
18161  # Extract the first word of "$ac_prog", so it can be a program name with args.
18162set dummy $ac_prog; ac_word=$2
18163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18164$as_echo_n "checking for $ac_word... " >&6; }
18165if ${ac_cv_path_XGETTEXT+:} false; then :
18166  $as_echo_n "(cached) " >&6
18167else
18168  case $XGETTEXT in
18169  [\\/]* | ?:[\\/]*)
18170  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18171  ;;
18172  *)
18173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18174for as_dir in $PATH
18175do
18176  IFS=$as_save_IFS
18177  test -z "$as_dir" && as_dir=.
18178    for ac_exec_ext in '' $ac_executable_extensions; do
18179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18180    ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18182    break 2
18183  fi
18184done
18185  done
18186IFS=$as_save_IFS
18187
18188  ;;
18189esac
18190fi
18191XGETTEXT=$ac_cv_path_XGETTEXT
18192if test -n "$XGETTEXT"; then
18193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18194$as_echo "$XGETTEXT" >&6; }
18195else
18196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18197$as_echo "no" >&6; }
18198fi
18199
18200
18201  test -n "$XGETTEXT" && break
18202done
18203
18204else
18205  # Report the value of XGETTEXT in configure's output in all cases.
18206  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18207$as_echo_n "checking for XGETTEXT... " >&6; }
18208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18209$as_echo "$XGETTEXT" >&6; }
18210fi
18211
18212
18213fi
18214
18215# Check for Tcl configuration script tclConfig.sh
18216if test "$with_tcl" = yes; then
18217    if test -z "$TCLSH"; then
18218  for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18219do
18220  # Extract the first word of "$ac_prog", so it can be a program name with args.
18221set dummy $ac_prog; ac_word=$2
18222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18223$as_echo_n "checking for $ac_word... " >&6; }
18224if ${ac_cv_path_TCLSH+:} false; then :
18225  $as_echo_n "(cached) " >&6
18226else
18227  case $TCLSH in
18228  [\\/]* | ?:[\\/]*)
18229  ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18230  ;;
18231  *)
18232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18233for as_dir in $PATH
18234do
18235  IFS=$as_save_IFS
18236  test -z "$as_dir" && as_dir=.
18237    for ac_exec_ext in '' $ac_executable_extensions; do
18238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18239    ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18241    break 2
18242  fi
18243done
18244  done
18245IFS=$as_save_IFS
18246
18247  ;;
18248esac
18249fi
18250TCLSH=$ac_cv_path_TCLSH
18251if test -n "$TCLSH"; then
18252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18253$as_echo "$TCLSH" >&6; }
18254else
18255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18256$as_echo "no" >&6; }
18257fi
18258
18259
18260  test -n "$TCLSH" && break
18261done
18262
18263else
18264  # Report the value of TCLSH in configure's output in all cases.
18265  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18266$as_echo_n "checking for TCLSH... " >&6; }
18267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18268$as_echo "$TCLSH" >&6; }
18269fi
18270
18271if test x"$TCLSH" = x""; then
18272  as_fn_error $? "Tcl shell not found" "$LINENO" 5
18273fi
18274
18275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18276$as_echo_n "checking for tclConfig.sh... " >&6; }
18277# Let user override test
18278if test -z "$TCL_CONFIG_SH"; then
18279    pgac_test_dirs="$with_tclconfig"
18280
18281    set X $pgac_test_dirs; shift
18282    if test $# -eq 0; then
18283        test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18284        pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18285        # On newer macOS, $auto_path frequently doesn't include the place
18286        # where tclConfig.sh actually lives.  Append that to the end, so as not
18287        # to break cases where a non-default Tcl installation is being used.
18288        if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18289            pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18290        fi
18291        set X $pgac_test_dirs; shift
18292    fi
18293
18294    for pgac_dir do
18295        if test -r "$pgac_dir/tclConfig.sh"; then
18296            TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18297            break
18298        fi
18299    done
18300fi
18301
18302if test -z "$TCL_CONFIG_SH"; then
18303    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18304$as_echo "no" >&6; }
18305    as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18306else
18307    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18308$as_echo "$TCL_CONFIG_SH" >&6; }
18309fi
18310
18311
18312
18313    . "$TCL_CONFIG_SH"
18314eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18315eval TCL_LIBS=\"$TCL_LIBS\"
18316eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18317eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18318
18319        if test "$TCL_SHARED_BUILD" != 1; then
18320      as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18321Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18322    fi
18323    # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18324    ac_save_CPPFLAGS=$CPPFLAGS
18325    CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18326    ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18327if test "x$ac_cv_header_tcl_h" = xyes; then :
18328
18329else
18330  as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18331fi
18332
18333
18334    CPPFLAGS=$ac_save_CPPFLAGS
18335fi
18336
18337# check for <perl.h>
18338if test "$with_perl" = yes; then
18339  ac_save_CPPFLAGS=$CPPFLAGS
18340  CPPFLAGS="$CPPFLAGS $perl_includespec"
18341  ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18342"
18343if test "x$ac_cv_header_perl_h" = xyes; then :
18344
18345else
18346  as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18347fi
18348
18349
18350  # While we're at it, check that we can link to libperl.
18351  # On most platforms, if perl.h is there then libperl.so will be too, but at
18352  # this writing Debian packages them separately.  There is no known reason to
18353  # waste cycles on separate probes for the Tcl or Python libraries, though.
18354  # On some Red Hat platforms, the link attempt can fail if we don't use
18355  # CFLAGS_SL while building the test program.
18356  ac_save_CFLAGS=$CFLAGS
18357  CFLAGS="$CFLAGS $CFLAGS_SL"
18358  pgac_save_LIBS=$LIBS
18359  LIBS="$perl_embed_ldflags"
18360  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18361$as_echo_n "checking for libperl... " >&6; }
18362  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18363/* end confdefs.h.  */
18364
18365#include <EXTERN.h>
18366#include <perl.h>
18367
18368int
18369main ()
18370{
18371perl_alloc();
18372  ;
18373  return 0;
18374}
18375_ACEOF
18376if ac_fn_c_try_link "$LINENO"; then :
18377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18378$as_echo "yes" >&6; }
18379else
18380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18381$as_echo "no" >&6; }
18382     as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18383fi
18384rm -f core conftest.err conftest.$ac_objext \
18385    conftest$ac_exeext conftest.$ac_ext
18386  LIBS=$pgac_save_LIBS
18387  CFLAGS=$ac_save_CFLAGS
18388  CPPFLAGS=$ac_save_CPPFLAGS
18389fi
18390
18391# check for <Python.h>
18392if test "$with_python" = yes; then
18393  ac_save_CPPFLAGS=$CPPFLAGS
18394  CPPFLAGS="$python_includespec $CPPFLAGS"
18395  ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18396if test "x$ac_cv_header_Python_h" = xyes; then :
18397
18398else
18399  as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18400fi
18401
18402
18403  CPPFLAGS=$ac_save_CPPFLAGS
18404fi
18405
18406#
18407# Check for documentation-building tools
18408#
18409if test -z "$XMLLINT"; then
18410  for ac_prog in xmllint
18411do
18412  # Extract the first word of "$ac_prog", so it can be a program name with args.
18413set dummy $ac_prog; ac_word=$2
18414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18415$as_echo_n "checking for $ac_word... " >&6; }
18416if ${ac_cv_path_XMLLINT+:} false; then :
18417  $as_echo_n "(cached) " >&6
18418else
18419  case $XMLLINT in
18420  [\\/]* | ?:[\\/]*)
18421  ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18422  ;;
18423  *)
18424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18425for as_dir in $PATH
18426do
18427  IFS=$as_save_IFS
18428  test -z "$as_dir" && as_dir=.
18429    for ac_exec_ext in '' $ac_executable_extensions; do
18430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18431    ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18433    break 2
18434  fi
18435done
18436  done
18437IFS=$as_save_IFS
18438
18439  ;;
18440esac
18441fi
18442XMLLINT=$ac_cv_path_XMLLINT
18443if test -n "$XMLLINT"; then
18444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18445$as_echo "$XMLLINT" >&6; }
18446else
18447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18448$as_echo "no" >&6; }
18449fi
18450
18451
18452  test -n "$XMLLINT" && break
18453done
18454
18455else
18456  # Report the value of XMLLINT in configure's output in all cases.
18457  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18458$as_echo_n "checking for XMLLINT... " >&6; }
18459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18460$as_echo "$XMLLINT" >&6; }
18461fi
18462
18463if test -z "$XSLTPROC"; then
18464  for ac_prog in xsltproc
18465do
18466  # Extract the first word of "$ac_prog", so it can be a program name with args.
18467set dummy $ac_prog; ac_word=$2
18468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18469$as_echo_n "checking for $ac_word... " >&6; }
18470if ${ac_cv_path_XSLTPROC+:} false; then :
18471  $as_echo_n "(cached) " >&6
18472else
18473  case $XSLTPROC in
18474  [\\/]* | ?:[\\/]*)
18475  ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18476  ;;
18477  *)
18478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18479for as_dir in $PATH
18480do
18481  IFS=$as_save_IFS
18482  test -z "$as_dir" && as_dir=.
18483    for ac_exec_ext in '' $ac_executable_extensions; do
18484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18485    ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18487    break 2
18488  fi
18489done
18490  done
18491IFS=$as_save_IFS
18492
18493  ;;
18494esac
18495fi
18496XSLTPROC=$ac_cv_path_XSLTPROC
18497if test -n "$XSLTPROC"; then
18498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18499$as_echo "$XSLTPROC" >&6; }
18500else
18501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18502$as_echo "no" >&6; }
18503fi
18504
18505
18506  test -n "$XSLTPROC" && break
18507done
18508
18509else
18510  # Report the value of XSLTPROC in configure's output in all cases.
18511  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18512$as_echo_n "checking for XSLTPROC... " >&6; }
18513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18514$as_echo "$XSLTPROC" >&6; }
18515fi
18516
18517if test -z "$FOP"; then
18518  for ac_prog in fop
18519do
18520  # Extract the first word of "$ac_prog", so it can be a program name with args.
18521set dummy $ac_prog; ac_word=$2
18522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18523$as_echo_n "checking for $ac_word... " >&6; }
18524if ${ac_cv_path_FOP+:} false; then :
18525  $as_echo_n "(cached) " >&6
18526else
18527  case $FOP in
18528  [\\/]* | ?:[\\/]*)
18529  ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
18530  ;;
18531  *)
18532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18533for as_dir in $PATH
18534do
18535  IFS=$as_save_IFS
18536  test -z "$as_dir" && as_dir=.
18537    for ac_exec_ext in '' $ac_executable_extensions; do
18538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18539    ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
18540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18541    break 2
18542  fi
18543done
18544  done
18545IFS=$as_save_IFS
18546
18547  ;;
18548esac
18549fi
18550FOP=$ac_cv_path_FOP
18551if test -n "$FOP"; then
18552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18553$as_echo "$FOP" >&6; }
18554else
18555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18556$as_echo "no" >&6; }
18557fi
18558
18559
18560  test -n "$FOP" && break
18561done
18562
18563else
18564  # Report the value of FOP in configure's output in all cases.
18565  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
18566$as_echo_n "checking for FOP... " >&6; }
18567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18568$as_echo "$FOP" >&6; }
18569fi
18570
18571if test -z "$DBTOEPUB"; then
18572  for ac_prog in dbtoepub
18573do
18574  # Extract the first word of "$ac_prog", so it can be a program name with args.
18575set dummy $ac_prog; ac_word=$2
18576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18577$as_echo_n "checking for $ac_word... " >&6; }
18578if ${ac_cv_path_DBTOEPUB+:} false; then :
18579  $as_echo_n "(cached) " >&6
18580else
18581  case $DBTOEPUB in
18582  [\\/]* | ?:[\\/]*)
18583  ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
18584  ;;
18585  *)
18586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18587for as_dir in $PATH
18588do
18589  IFS=$as_save_IFS
18590  test -z "$as_dir" && as_dir=.
18591    for ac_exec_ext in '' $ac_executable_extensions; do
18592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18593    ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
18594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18595    break 2
18596  fi
18597done
18598  done
18599IFS=$as_save_IFS
18600
18601  ;;
18602esac
18603fi
18604DBTOEPUB=$ac_cv_path_DBTOEPUB
18605if test -n "$DBTOEPUB"; then
18606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18607$as_echo "$DBTOEPUB" >&6; }
18608else
18609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18610$as_echo "no" >&6; }
18611fi
18612
18613
18614  test -n "$DBTOEPUB" && break
18615done
18616
18617else
18618  # Report the value of DBTOEPUB in configure's output in all cases.
18619  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
18620$as_echo_n "checking for DBTOEPUB... " >&6; }
18621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18622$as_echo "$DBTOEPUB" >&6; }
18623fi
18624
18625
18626#
18627# Check for test tools
18628#
18629if test "$enable_tap_tests" = yes; then
18630  # Check for necessary modules, unless user has specified the "prove" to use;
18631  # in that case it's her responsibility to have a working configuration.
18632  # (prove might be part of a different Perl installation than perl, eg on
18633  # MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)
18634  if test -z "$PROVE"; then
18635    # Test::More and Time::HiRes are supposed to be part of core Perl,
18636    # but some distros omit them in a minimal installation.
18637
18638
18639
18640
18641
18642
18643
18644
18645
18646
18647# Make sure we have perl
18648if test -z "$PERL"; then
18649# Extract the first word of "perl", so it can be a program name with args.
18650set dummy perl; ac_word=$2
18651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18652$as_echo_n "checking for $ac_word... " >&6; }
18653if ${ac_cv_prog_PERL+:} false; then :
18654  $as_echo_n "(cached) " >&6
18655else
18656  if test -n "$PERL"; then
18657  ac_cv_prog_PERL="$PERL" # Let the user override the test.
18658else
18659as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18660for as_dir in $PATH
18661do
18662  IFS=$as_save_IFS
18663  test -z "$as_dir" && as_dir=.
18664    for ac_exec_ext in '' $ac_executable_extensions; do
18665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18666    ac_cv_prog_PERL="perl"
18667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18668    break 2
18669  fi
18670done
18671  done
18672IFS=$as_save_IFS
18673
18674fi
18675fi
18676PERL=$ac_cv_prog_PERL
18677if test -n "$PERL"; then
18678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
18679$as_echo "$PERL" >&6; }
18680else
18681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18682$as_echo "no" >&6; }
18683fi
18684
18685
18686fi
18687
18688if test "x$PERL" != x; then
18689  ax_perl_modules_failed=0
18690  for ax_perl_module in 'IPC::Run' 'Test::More 0.87' 'Time::HiRes' ; do
18691    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl module $ax_perl_module" >&5
18692$as_echo_n "checking for perl module $ax_perl_module... " >&6; }
18693
18694    # Would be nice to log result here, but can't rely on autoconf internals
18695    $PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1
18696    if test $? -ne 0; then
18697      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18698$as_echo "no" >&6; };
18699      ax_perl_modules_failed=1
18700   else
18701      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
18702$as_echo "ok" >&6; };
18703    fi
18704  done
18705
18706  # Run optional shell commands
18707  if test "$ax_perl_modules_failed" = 0; then
18708    :
18709
18710  else
18711    :
18712    as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
18713  fi
18714else
18715  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5
18716$as_echo "$as_me: WARNING: could not find perl" >&2;}
18717fi
18718  fi
18719  # Now make sure we know where prove is
18720  if test -z "$PROVE"; then
18721  for ac_prog in prove
18722do
18723  # Extract the first word of "$ac_prog", so it can be a program name with args.
18724set dummy $ac_prog; ac_word=$2
18725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18726$as_echo_n "checking for $ac_word... " >&6; }
18727if ${ac_cv_path_PROVE+:} false; then :
18728  $as_echo_n "(cached) " >&6
18729else
18730  case $PROVE in
18731  [\\/]* | ?:[\\/]*)
18732  ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
18733  ;;
18734  *)
18735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18736for as_dir in $PATH
18737do
18738  IFS=$as_save_IFS
18739  test -z "$as_dir" && as_dir=.
18740    for ac_exec_ext in '' $ac_executable_extensions; do
18741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18742    ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
18743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18744    break 2
18745  fi
18746done
18747  done
18748IFS=$as_save_IFS
18749
18750  ;;
18751esac
18752fi
18753PROVE=$ac_cv_path_PROVE
18754if test -n "$PROVE"; then
18755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18756$as_echo "$PROVE" >&6; }
18757else
18758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18759$as_echo "no" >&6; }
18760fi
18761
18762
18763  test -n "$PROVE" && break
18764done
18765
18766else
18767  # Report the value of PROVE in configure's output in all cases.
18768  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
18769$as_echo_n "checking for PROVE... " >&6; }
18770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18771$as_echo "$PROVE" >&6; }
18772fi
18773
18774  if test -z "$PROVE"; then
18775    as_fn_error $? "prove not found" "$LINENO" 5
18776  fi
18777fi
18778
18779# Thread testing
18780
18781# We have to run the thread test near the end so we have all our symbols
18782# defined.  Cross compiling throws a warning.
18783#
18784if test "$enable_thread_safety" = yes; then
18785if test "$PORTNAME" != "win32"
18786then
18787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
18788$as_echo_n "checking thread safety of required library functions... " >&6; }
18789
18790_CFLAGS="$CFLAGS"
18791_LIBS="$LIBS"
18792CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
18793LIBS="$LIBS $PTHREAD_LIBS"
18794if test "$cross_compiling" = yes; then :
18795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
18796$as_echo "maybe" >&6; }
18797  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
18798*** Skipping thread test program because of cross-compile build.
18799*** Run the program in src/test/thread on the target machine.
18800" >&5
18801$as_echo "$as_me: WARNING:
18802*** Skipping thread test program because of cross-compile build.
18803*** Run the program in src/test/thread on the target machine.
18804" >&2;}
18805else
18806  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18807/* end confdefs.h.  */
18808#include "$srcdir/src/test/thread/thread_test.c"
18809_ACEOF
18810if ac_fn_c_try_run "$LINENO"; then :
18811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18812$as_echo "yes" >&6; }
18813else
18814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18815$as_echo "no" >&6; }
18816  as_fn_error $? "thread test program failed
18817This platform is not thread-safe.  Check the file 'config.log' or compile
18818and run src/test/thread/thread_test for the exact reason.
18819Use --disable-thread-safety to disable thread safety." "$LINENO" 5
18820fi
18821rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18822  conftest.$ac_objext conftest.beam conftest.$ac_ext
18823fi
18824
18825CFLAGS="$_CFLAGS"
18826LIBS="$_LIBS"
18827else
18828{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
18829$as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
18830fi
18831fi
18832
18833# If compiler will take -Wl,--as-needed (or various platform-specific
18834# spellings thereof) then add that to LDFLAGS.  This is much easier than
18835# trying to filter LIBS to the minimum for each executable.
18836# On (at least) some Red-Hat-derived systems, this switch breaks linking to
18837# libreadline; therefore we postpone testing it until we know what library
18838# dependencies readline has.  The test code will try to link with $LIBS.
18839if test "$with_readline" = yes; then
18840  link_test_func=readline
18841else
18842  link_test_func=exit
18843fi
18844
18845if test "$PORTNAME" = "darwin"; then
18846  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
18847$as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
18848if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
18849  $as_echo_n "(cached) " >&6
18850else
18851  pgac_save_LDFLAGS=$LDFLAGS
18852LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
18853if test "$cross_compiling" = yes; then :
18854  pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
18855else
18856  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18857/* end confdefs.h.  */
18858extern void $link_test_func (); void (*fptr) () = $link_test_func;
18859int
18860main ()
18861{
18862
18863  ;
18864  return 0;
18865}
18866_ACEOF
18867if ac_fn_c_try_run "$LINENO"; then :
18868  pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
18869else
18870  pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
18871fi
18872rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18873  conftest.$ac_objext conftest.beam conftest.$ac_ext
18874fi
18875
18876LDFLAGS="$pgac_save_LDFLAGS"
18877fi
18878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
18879$as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
18880if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
18881  LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
18882fi
18883
18884elif test "$PORTNAME" = "openbsd"; then
18885  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
18886$as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
18887if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
18888  $as_echo_n "(cached) " >&6
18889else
18890  pgac_save_LDFLAGS=$LDFLAGS
18891LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
18892if test "$cross_compiling" = yes; then :
18893  pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
18894else
18895  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18896/* end confdefs.h.  */
18897extern void $link_test_func (); void (*fptr) () = $link_test_func;
18898int
18899main ()
18900{
18901
18902  ;
18903  return 0;
18904}
18905_ACEOF
18906if ac_fn_c_try_run "$LINENO"; then :
18907  pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
18908else
18909  pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
18910fi
18911rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18912  conftest.$ac_objext conftest.beam conftest.$ac_ext
18913fi
18914
18915LDFLAGS="$pgac_save_LDFLAGS"
18916fi
18917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
18918$as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
18919if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
18920  LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
18921fi
18922
18923else
18924  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
18925$as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
18926if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
18927  $as_echo_n "(cached) " >&6
18928else
18929  pgac_save_LDFLAGS=$LDFLAGS
18930LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
18931if test "$cross_compiling" = yes; then :
18932  pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
18933else
18934  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18935/* end confdefs.h.  */
18936extern void $link_test_func (); void (*fptr) () = $link_test_func;
18937int
18938main ()
18939{
18940
18941  ;
18942  return 0;
18943}
18944_ACEOF
18945if ac_fn_c_try_run "$LINENO"; then :
18946  pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
18947else
18948  pgac_cv_prog_cc_ldflags__Wl___as_needed=no
18949fi
18950rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18951  conftest.$ac_objext conftest.beam conftest.$ac_ext
18952fi
18953
18954LDFLAGS="$pgac_save_LDFLAGS"
18955fi
18956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
18957$as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
18958if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
18959  LDFLAGS="$LDFLAGS -Wl,--as-needed"
18960fi
18961
18962fi
18963
18964# Create compiler version string
18965if test x"$GCC" = x"yes" ; then
18966  cc_string=`${CC} --version | sed q`
18967  case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
18968elif test x"$SUN_STUDIO_CC" = x"yes" ; then
18969  cc_string=`${CC} -V 2>&1 | sed q`
18970else
18971  cc_string=$CC
18972fi
18973
18974
18975cat >>confdefs.h <<_ACEOF
18976#define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
18977_ACEOF
18978
18979
18980# Supply a numeric version string for use by 3rd party add-ons
18981# awk -F is a regex on some platforms, and not on others, so make "." a tab
18982PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
18983tr '.' '	' |
18984$AWK '{printf "%d%04d", $1, $2}'`"
18985
18986cat >>confdefs.h <<_ACEOF
18987#define PG_VERSION_NUM $PG_VERSION_NUM
18988_ACEOF
18989
18990
18991
18992# If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
18993# literally, so that it's possible to override it at build time using
18994# a command like "make ... PG_SYSROOT=path".  This has to be done after
18995# we've finished all configure checks that depend on CPPFLAGS.
18996# The same for LDFLAGS, too.
18997if test x"$PG_SYSROOT" != x; then
18998  CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
18999  LDFLAGS=`echo "$LDFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19000fi
19001
19002
19003
19004# Begin output steps
19005
19006{ $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
19007$as_echo "$as_me: using compiler=$cc_string" >&6;}
19008{ $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
19009$as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
19010{ $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
19011$as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
19012{ $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
19013$as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
19014# Currently only used when LLVM is used
19015if test "$with_llvm" = yes ; then
19016   { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
19017$as_echo "$as_me: using CXX=$CXX" >&6;}
19018   { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
19019$as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
19020   { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
19021$as_echo "$as_me: using CLANG=$CLANG" >&6;}
19022   { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
19023$as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
19024   { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
19025$as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
19026fi
19027
19028# prepare build tree if outside source tree
19029# Note 1: test -ef might not exist, but it's more reliable than `pwd`.
19030# Note 2: /bin/pwd might be better than shell's built-in at getting
19031#         a symlink-free name.
19032if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
19033  vpath_build=no
19034else
19035  vpath_build=yes
19036  if test "$no_create" != yes; then
19037    $as_echo_n "preparing build tree... " >&6
19038    pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
19039    $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
19040      || as_fn_error $? "failed" "$LINENO" 5
19041    { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
19042$as_echo "done" >&6; }
19043  fi
19044fi
19045
19046
19047
19048ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
19049
19050
19051ac_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}"
19052
19053
19054if test "$PORTNAME" = "win32"; then
19055ac_config_commands="$ac_config_commands check_win32_symlinks"
19056
19057fi
19058
19059ac_config_headers="$ac_config_headers src/include/pg_config.h"
19060
19061
19062ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
19063
19064
19065ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
19066
19067
19068cat >confcache <<\_ACEOF
19069# This file is a shell script that caches the results of configure
19070# tests run on this system so they can be shared between configure
19071# scripts and configure runs, see configure's option --config-cache.
19072# It is not useful on other systems.  If it contains results you don't
19073# want to keep, you may remove or edit it.
19074#
19075# config.status only pays attention to the cache file if you give it
19076# the --recheck option to rerun configure.
19077#
19078# `ac_cv_env_foo' variables (set or unset) will be overridden when
19079# loading this file, other *unset* `ac_cv_foo' will be assigned the
19080# following values.
19081
19082_ACEOF
19083
19084# The following way of writing the cache mishandles newlines in values,
19085# but we know of no workaround that is simple, portable, and efficient.
19086# So, we kill variables containing newlines.
19087# Ultrix sh set writes to stderr and can't be redirected directly,
19088# and sets the high bit in the cache file unless we assign to the vars.
19089(
19090  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19091    eval ac_val=\$$ac_var
19092    case $ac_val in #(
19093    *${as_nl}*)
19094      case $ac_var in #(
19095      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19096$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19097      esac
19098      case $ac_var in #(
19099      _ | IFS | as_nl) ;; #(
19100      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19101      *) { eval $ac_var=; unset $ac_var;} ;;
19102      esac ;;
19103    esac
19104  done
19105
19106  (set) 2>&1 |
19107    case $as_nl`(ac_space=' '; set) 2>&1` in #(
19108    *${as_nl}ac_space=\ *)
19109      # `set' does not quote correctly, so add quotes: double-quote
19110      # substitution turns \\\\ into \\, and sed turns \\ into \.
19111      sed -n \
19112	"s/'/'\\\\''/g;
19113	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19114      ;; #(
19115    *)
19116      # `set' quotes correctly as required by POSIX, so do not add quotes.
19117      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19118      ;;
19119    esac |
19120    sort
19121) |
19122  sed '
19123     /^ac_cv_env_/b end
19124     t clear
19125     :clear
19126     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19127     t end
19128     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19129     :end' >>confcache
19130if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19131  if test -w "$cache_file"; then
19132    if test "x$cache_file" != "x/dev/null"; then
19133      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19134$as_echo "$as_me: updating cache $cache_file" >&6;}
19135      if test ! -f "$cache_file" || test -h "$cache_file"; then
19136	cat confcache >"$cache_file"
19137      else
19138        case $cache_file in #(
19139        */* | ?:*)
19140	  mv -f confcache "$cache_file"$$ &&
19141	  mv -f "$cache_file"$$ "$cache_file" ;; #(
19142        *)
19143	  mv -f confcache "$cache_file" ;;
19144	esac
19145      fi
19146    fi
19147  else
19148    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19149$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19150  fi
19151fi
19152rm -f confcache
19153
19154test "x$prefix" = xNONE && prefix=$ac_default_prefix
19155# Let make expand exec_prefix.
19156test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19157
19158DEFS=-DHAVE_CONFIG_H
19159
19160ac_libobjs=
19161ac_ltlibobjs=
19162U=
19163for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19164  # 1. Remove the extension, and $U if already installed.
19165  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19166  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19167  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
19168  #    will be set to the directory where LIBOBJS objects are built.
19169  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19170  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19171done
19172LIBOBJS=$ac_libobjs
19173
19174LTLIBOBJS=$ac_ltlibobjs
19175
19176
19177
19178
19179: "${CONFIG_STATUS=./config.status}"
19180ac_write_fail=0
19181ac_clean_files_save=$ac_clean_files
19182ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19183{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19184$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19185as_write_fail=0
19186cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19187#! $SHELL
19188# Generated by $as_me.
19189# Run this file to recreate the current configuration.
19190# Compiler output produced by configure, useful for debugging
19191# configure, is in config.log if it exists.
19192
19193debug=false
19194ac_cs_recheck=false
19195ac_cs_silent=false
19196
19197SHELL=\${CONFIG_SHELL-$SHELL}
19198export SHELL
19199_ASEOF
19200cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19201## -------------------- ##
19202## M4sh Initialization. ##
19203## -------------------- ##
19204
19205# Be more Bourne compatible
19206DUALCASE=1; export DUALCASE # for MKS sh
19207if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19208  emulate sh
19209  NULLCMD=:
19210  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19211  # is contrary to our usage.  Disable this feature.
19212  alias -g '${1+"$@"}'='"$@"'
19213  setopt NO_GLOB_SUBST
19214else
19215  case `(set -o) 2>/dev/null` in #(
19216  *posix*) :
19217    set -o posix ;; #(
19218  *) :
19219     ;;
19220esac
19221fi
19222
19223
19224as_nl='
19225'
19226export as_nl
19227# Printing a long string crashes Solaris 7 /usr/bin/printf.
19228as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19229as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19230as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19231# Prefer a ksh shell builtin over an external printf program on Solaris,
19232# but without wasting forks for bash or zsh.
19233if test -z "$BASH_VERSION$ZSH_VERSION" \
19234    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19235  as_echo='print -r --'
19236  as_echo_n='print -rn --'
19237elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19238  as_echo='printf %s\n'
19239  as_echo_n='printf %s'
19240else
19241  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19242    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19243    as_echo_n='/usr/ucb/echo -n'
19244  else
19245    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19246    as_echo_n_body='eval
19247      arg=$1;
19248      case $arg in #(
19249      *"$as_nl"*)
19250	expr "X$arg" : "X\\(.*\\)$as_nl";
19251	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19252      esac;
19253      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19254    '
19255    export as_echo_n_body
19256    as_echo_n='sh -c $as_echo_n_body as_echo'
19257  fi
19258  export as_echo_body
19259  as_echo='sh -c $as_echo_body as_echo'
19260fi
19261
19262# The user is always right.
19263if test "${PATH_SEPARATOR+set}" != set; then
19264  PATH_SEPARATOR=:
19265  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19266    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19267      PATH_SEPARATOR=';'
19268  }
19269fi
19270
19271
19272# IFS
19273# We need space, tab and new line, in precisely that order.  Quoting is
19274# there to prevent editors from complaining about space-tab.
19275# (If _AS_PATH_WALK were called with IFS unset, it would disable word
19276# splitting by setting IFS to empty value.)
19277IFS=" ""	$as_nl"
19278
19279# Find who we are.  Look in the path if we contain no directory separator.
19280as_myself=
19281case $0 in #((
19282  *[\\/]* ) as_myself=$0 ;;
19283  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19284for as_dir in $PATH
19285do
19286  IFS=$as_save_IFS
19287  test -z "$as_dir" && as_dir=.
19288    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19289  done
19290IFS=$as_save_IFS
19291
19292     ;;
19293esac
19294# We did not find ourselves, most probably we were run as `sh COMMAND'
19295# in which case we are not to be found in the path.
19296if test "x$as_myself" = x; then
19297  as_myself=$0
19298fi
19299if test ! -f "$as_myself"; then
19300  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19301  exit 1
19302fi
19303
19304# Unset variables that we do not need and which cause bugs (e.g. in
19305# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
19306# suppresses any "Segmentation fault" message there.  '((' could
19307# trigger a bug in pdksh 5.2.14.
19308for as_var in BASH_ENV ENV MAIL MAILPATH
19309do eval test x\${$as_var+set} = xset \
19310  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19311done
19312PS1='$ '
19313PS2='> '
19314PS4='+ '
19315
19316# NLS nuisances.
19317LC_ALL=C
19318export LC_ALL
19319LANGUAGE=C
19320export LANGUAGE
19321
19322# CDPATH.
19323(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19324
19325
19326# as_fn_error STATUS ERROR [LINENO LOG_FD]
19327# ----------------------------------------
19328# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19329# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19330# script with STATUS, using 1 if that was 0.
19331as_fn_error ()
19332{
19333  as_status=$1; test $as_status -eq 0 && as_status=1
19334  if test "$4"; then
19335    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19336    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19337  fi
19338  $as_echo "$as_me: error: $2" >&2
19339  as_fn_exit $as_status
19340} # as_fn_error
19341
19342
19343# as_fn_set_status STATUS
19344# -----------------------
19345# Set $? to STATUS, without forking.
19346as_fn_set_status ()
19347{
19348  return $1
19349} # as_fn_set_status
19350
19351# as_fn_exit STATUS
19352# -----------------
19353# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19354as_fn_exit ()
19355{
19356  set +e
19357  as_fn_set_status $1
19358  exit $1
19359} # as_fn_exit
19360
19361# as_fn_unset VAR
19362# ---------------
19363# Portably unset VAR.
19364as_fn_unset ()
19365{
19366  { eval $1=; unset $1;}
19367}
19368as_unset=as_fn_unset
19369# as_fn_append VAR VALUE
19370# ----------------------
19371# Append the text in VALUE to the end of the definition contained in VAR. Take
19372# advantage of any shell optimizations that allow amortized linear growth over
19373# repeated appends, instead of the typical quadratic growth present in naive
19374# implementations.
19375if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19376  eval 'as_fn_append ()
19377  {
19378    eval $1+=\$2
19379  }'
19380else
19381  as_fn_append ()
19382  {
19383    eval $1=\$$1\$2
19384  }
19385fi # as_fn_append
19386
19387# as_fn_arith ARG...
19388# ------------------
19389# Perform arithmetic evaluation on the ARGs, and store the result in the
19390# global $as_val. Take advantage of shells that can avoid forks. The arguments
19391# must be portable across $(()) and expr.
19392if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19393  eval 'as_fn_arith ()
19394  {
19395    as_val=$(( $* ))
19396  }'
19397else
19398  as_fn_arith ()
19399  {
19400    as_val=`expr "$@" || test $? -eq 1`
19401  }
19402fi # as_fn_arith
19403
19404
19405if expr a : '\(a\)' >/dev/null 2>&1 &&
19406   test "X`expr 00001 : '.*\(...\)'`" = X001; then
19407  as_expr=expr
19408else
19409  as_expr=false
19410fi
19411
19412if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19413  as_basename=basename
19414else
19415  as_basename=false
19416fi
19417
19418if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19419  as_dirname=dirname
19420else
19421  as_dirname=false
19422fi
19423
19424as_me=`$as_basename -- "$0" ||
19425$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19426	 X"$0" : 'X\(//\)$' \| \
19427	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19428$as_echo X/"$0" |
19429    sed '/^.*\/\([^/][^/]*\)\/*$/{
19430	    s//\1/
19431	    q
19432	  }
19433	  /^X\/\(\/\/\)$/{
19434	    s//\1/
19435	    q
19436	  }
19437	  /^X\/\(\/\).*/{
19438	    s//\1/
19439	    q
19440	  }
19441	  s/.*/./; q'`
19442
19443# Avoid depending upon Character Ranges.
19444as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19445as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19446as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19447as_cr_digits='0123456789'
19448as_cr_alnum=$as_cr_Letters$as_cr_digits
19449
19450ECHO_C= ECHO_N= ECHO_T=
19451case `echo -n x` in #(((((
19452-n*)
19453  case `echo 'xy\c'` in
19454  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
19455  xy)  ECHO_C='\c';;
19456  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
19457       ECHO_T='	';;
19458  esac;;
19459*)
19460  ECHO_N='-n';;
19461esac
19462
19463rm -f conf$$ conf$$.exe conf$$.file
19464if test -d conf$$.dir; then
19465  rm -f conf$$.dir/conf$$.file
19466else
19467  rm -f conf$$.dir
19468  mkdir conf$$.dir 2>/dev/null
19469fi
19470if (echo >conf$$.file) 2>/dev/null; then
19471  if ln -s conf$$.file conf$$ 2>/dev/null; then
19472    as_ln_s='ln -s'
19473    # ... but there are two gotchas:
19474    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19475    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19476    # In both cases, we have to default to `cp -pR'.
19477    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19478      as_ln_s='cp -pR'
19479  elif ln conf$$.file conf$$ 2>/dev/null; then
19480    as_ln_s=ln
19481  else
19482    as_ln_s='cp -pR'
19483  fi
19484else
19485  as_ln_s='cp -pR'
19486fi
19487rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19488rmdir conf$$.dir 2>/dev/null
19489
19490
19491# as_fn_mkdir_p
19492# -------------
19493# Create "$as_dir" as a directory, including parents if necessary.
19494as_fn_mkdir_p ()
19495{
19496
19497  case $as_dir in #(
19498  -*) as_dir=./$as_dir;;
19499  esac
19500  test -d "$as_dir" || eval $as_mkdir_p || {
19501    as_dirs=
19502    while :; do
19503      case $as_dir in #(
19504      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19505      *) as_qdir=$as_dir;;
19506      esac
19507      as_dirs="'$as_qdir' $as_dirs"
19508      as_dir=`$as_dirname -- "$as_dir" ||
19509$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19510	 X"$as_dir" : 'X\(//\)[^/]' \| \
19511	 X"$as_dir" : 'X\(//\)$' \| \
19512	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19513$as_echo X"$as_dir" |
19514    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19515	    s//\1/
19516	    q
19517	  }
19518	  /^X\(\/\/\)[^/].*/{
19519	    s//\1/
19520	    q
19521	  }
19522	  /^X\(\/\/\)$/{
19523	    s//\1/
19524	    q
19525	  }
19526	  /^X\(\/\).*/{
19527	    s//\1/
19528	    q
19529	  }
19530	  s/.*/./; q'`
19531      test -d "$as_dir" && break
19532    done
19533    test -z "$as_dirs" || eval "mkdir $as_dirs"
19534  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19535
19536
19537} # as_fn_mkdir_p
19538if mkdir -p . 2>/dev/null; then
19539  as_mkdir_p='mkdir -p "$as_dir"'
19540else
19541  test -d ./-p && rmdir ./-p
19542  as_mkdir_p=false
19543fi
19544
19545
19546# as_fn_executable_p FILE
19547# -----------------------
19548# Test if FILE is an executable regular file.
19549as_fn_executable_p ()
19550{
19551  test -f "$1" && test -x "$1"
19552} # as_fn_executable_p
19553as_test_x='test -x'
19554as_executable_p=as_fn_executable_p
19555
19556# Sed expression to map a string onto a valid CPP name.
19557as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19558
19559# Sed expression to map a string onto a valid variable name.
19560as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19561
19562
19563exec 6>&1
19564## ----------------------------------- ##
19565## Main body of $CONFIG_STATUS script. ##
19566## ----------------------------------- ##
19567_ASEOF
19568test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19569
19570cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19571# Save the log message, to keep $0 and so on meaningful, and to
19572# report actual input values of CONFIG_FILES etc. instead of their
19573# values after options handling.
19574ac_log="
19575This file was extended by PostgreSQL $as_me 11.14, which was
19576generated by GNU Autoconf 2.69.  Invocation command line was
19577
19578  CONFIG_FILES    = $CONFIG_FILES
19579  CONFIG_HEADERS  = $CONFIG_HEADERS
19580  CONFIG_LINKS    = $CONFIG_LINKS
19581  CONFIG_COMMANDS = $CONFIG_COMMANDS
19582  $ $0 $@
19583
19584on `(hostname || uname -n) 2>/dev/null | sed 1q`
19585"
19586
19587_ACEOF
19588
19589case $ac_config_files in *"
19590"*) set x $ac_config_files; shift; ac_config_files=$*;;
19591esac
19592
19593case $ac_config_headers in *"
19594"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19595esac
19596
19597
19598cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19599# Files that config.status was made for.
19600config_files="$ac_config_files"
19601config_headers="$ac_config_headers"
19602config_links="$ac_config_links"
19603config_commands="$ac_config_commands"
19604
19605_ACEOF
19606
19607cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19608ac_cs_usage="\
19609\`$as_me' instantiates files and other configuration actions
19610from templates according to the current configuration.  Unless the files
19611and actions are specified as TAGs, all are instantiated by default.
19612
19613Usage: $0 [OPTION]... [TAG]...
19614
19615  -h, --help       print this help, then exit
19616  -V, --version    print version number and configuration settings, then exit
19617      --config     print configuration, then exit
19618  -q, --quiet, --silent
19619                   do not print progress messages
19620  -d, --debug      don't remove temporary files
19621      --recheck    update $as_me by reconfiguring in the same conditions
19622      --file=FILE[:TEMPLATE]
19623                   instantiate the configuration file FILE
19624      --header=FILE[:TEMPLATE]
19625                   instantiate the configuration header FILE
19626
19627Configuration files:
19628$config_files
19629
19630Configuration headers:
19631$config_headers
19632
19633Configuration links:
19634$config_links
19635
19636Configuration commands:
19637$config_commands
19638
19639Report bugs to <pgsql-bugs@postgresql.org>."
19640
19641_ACEOF
19642cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19643ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19644ac_cs_version="\\
19645PostgreSQL config.status 11.14
19646configured by $0, generated by GNU Autoconf 2.69,
19647  with options \\"\$ac_cs_config\\"
19648
19649Copyright (C) 2012 Free Software Foundation, Inc.
19650This config.status script is free software; the Free Software Foundation
19651gives unlimited permission to copy, distribute and modify it."
19652
19653ac_pwd='$ac_pwd'
19654srcdir='$srcdir'
19655INSTALL='$INSTALL'
19656MKDIR_P='$MKDIR_P'
19657AWK='$AWK'
19658test -n "\$AWK" || AWK=awk
19659_ACEOF
19660
19661cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19662# The default lists apply if the user does not specify any file.
19663ac_need_defaults=:
19664while test $# != 0
19665do
19666  case $1 in
19667  --*=?*)
19668    ac_option=`expr "X$1" : 'X\([^=]*\)='`
19669    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19670    ac_shift=:
19671    ;;
19672  --*=)
19673    ac_option=`expr "X$1" : 'X\([^=]*\)='`
19674    ac_optarg=
19675    ac_shift=:
19676    ;;
19677  *)
19678    ac_option=$1
19679    ac_optarg=$2
19680    ac_shift=shift
19681    ;;
19682  esac
19683
19684  case $ac_option in
19685  # Handling of the options.
19686  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19687    ac_cs_recheck=: ;;
19688  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19689    $as_echo "$ac_cs_version"; exit ;;
19690  --config | --confi | --conf | --con | --co | --c )
19691    $as_echo "$ac_cs_config"; exit ;;
19692  --debug | --debu | --deb | --de | --d | -d )
19693    debug=: ;;
19694  --file | --fil | --fi | --f )
19695    $ac_shift
19696    case $ac_optarg in
19697    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19698    '') as_fn_error $? "missing file argument" ;;
19699    esac
19700    as_fn_append CONFIG_FILES " '$ac_optarg'"
19701    ac_need_defaults=false;;
19702  --header | --heade | --head | --hea )
19703    $ac_shift
19704    case $ac_optarg in
19705    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19706    esac
19707    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19708    ac_need_defaults=false;;
19709  --he | --h)
19710    # Conflict between --help and --header
19711    as_fn_error $? "ambiguous option: \`$1'
19712Try \`$0 --help' for more information.";;
19713  --help | --hel | -h )
19714    $as_echo "$ac_cs_usage"; exit ;;
19715  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19716  | -silent | --silent | --silen | --sile | --sil | --si | --s)
19717    ac_cs_silent=: ;;
19718
19719  # This is an error.
19720  -*) as_fn_error $? "unrecognized option: \`$1'
19721Try \`$0 --help' for more information." ;;
19722
19723  *) as_fn_append ac_config_targets " $1"
19724     ac_need_defaults=false ;;
19725
19726  esac
19727  shift
19728done
19729
19730ac_configure_extra_args=
19731
19732if $ac_cs_silent; then
19733  exec 6>/dev/null
19734  ac_configure_extra_args="$ac_configure_extra_args --silent"
19735fi
19736
19737_ACEOF
19738cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19739if \$ac_cs_recheck; then
19740  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19741  shift
19742  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19743  CONFIG_SHELL='$SHELL'
19744  export CONFIG_SHELL
19745  exec "\$@"
19746fi
19747
19748_ACEOF
19749cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19750exec 5>>config.log
19751{
19752  echo
19753  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19754## Running $as_me. ##
19755_ASBOX
19756  $as_echo "$ac_log"
19757} >&5
19758
19759_ACEOF
19760cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19761_ACEOF
19762
19763cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19764
19765# Handling of arguments.
19766for ac_config_target in $ac_config_targets
19767do
19768  case $ac_config_target in
19769    "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
19770    "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
19771    "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
19772    "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
19773    "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
19774    "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
19775    "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
19776    "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
19777    "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
19778    "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
19779    "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
19780    "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
19781    "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
19782
19783  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19784  esac
19785done
19786
19787
19788# If the user did not use the arguments to specify the items to instantiate,
19789# then the envvar interface is used.  Set only those that are not.
19790# We use the long form for the default assignment because of an extremely
19791# bizarre bug on SunOS 4.1.3.
19792if $ac_need_defaults; then
19793  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19794  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19795  test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
19796  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19797fi
19798
19799# Have a temporary directory for convenience.  Make it in the build tree
19800# simply because there is no reason against having it here, and in addition,
19801# creating and moving files from /tmp can sometimes cause problems.
19802# Hook for its removal unless debugging.
19803# Note that there is a small window in which the directory will not be cleaned:
19804# after its creation but before its name has been assigned to `$tmp'.
19805$debug ||
19806{
19807  tmp= ac_tmp=
19808  trap 'exit_status=$?
19809  : "${ac_tmp:=$tmp}"
19810  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
19811' 0
19812  trap 'as_fn_exit 1' 1 2 13 15
19813}
19814# Create a (secure) tmp directory for tmp files.
19815
19816{
19817  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19818  test -d "$tmp"
19819}  ||
19820{
19821  tmp=./conf$$-$RANDOM
19822  (umask 077 && mkdir "$tmp")
19823} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19824ac_tmp=$tmp
19825
19826# Set up the scripts for CONFIG_FILES section.
19827# No need to generate them if there are no CONFIG_FILES.
19828# This happens for instance with `./config.status config.h'.
19829if test -n "$CONFIG_FILES"; then
19830
19831
19832ac_cr=`echo X | tr X '\015'`
19833# On cygwin, bash can eat \r inside `` if the user requested igncr.
19834# But we know of no other shell where ac_cr would be empty at this
19835# point, so we can use a bashism as a fallback.
19836if test "x$ac_cr" = x; then
19837  eval ac_cr=\$\'\\r\'
19838fi
19839ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19840if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
19841  ac_cs_awk_cr='\\r'
19842else
19843  ac_cs_awk_cr=$ac_cr
19844fi
19845
19846echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
19847_ACEOF
19848
19849
19850{
19851  echo "cat >conf$$subs.awk <<_ACEOF" &&
19852  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19853  echo "_ACEOF"
19854} >conf$$subs.sh ||
19855  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19856ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
19857ac_delim='%!_!# '
19858for ac_last_try in false false false false false :; do
19859  . ./conf$$subs.sh ||
19860    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19861
19862  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19863  if test $ac_delim_n = $ac_delim_num; then
19864    break
19865  elif $ac_last_try; then
19866    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19867  else
19868    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19869  fi
19870done
19871rm -f conf$$subs.sh
19872
19873cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19874cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
19875_ACEOF
19876sed -n '
19877h
19878s/^/S["/; s/!.*/"]=/
19879p
19880g
19881s/^[^!]*!//
19882:repl
19883t repl
19884s/'"$ac_delim"'$//
19885t delim
19886:nl
19887h
19888s/\(.\{148\}\)..*/\1/
19889t more1
19890s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19891p
19892n
19893b repl
19894:more1
19895s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19896p
19897g
19898s/.\{148\}//
19899t nl
19900:delim
19901h
19902s/\(.\{148\}\)..*/\1/
19903t more2
19904s/["\\]/\\&/g; s/^/"/; s/$/"/
19905p
19906b
19907:more2
19908s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19909p
19910g
19911s/.\{148\}//
19912t delim
19913' <conf$$subs.awk | sed '
19914/^[^""]/{
19915  N
19916  s/\n//
19917}
19918' >>$CONFIG_STATUS || ac_write_fail=1
19919rm -f conf$$subs.awk
19920cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19921_ACAWK
19922cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
19923  for (key in S) S_is_set[key] = 1
19924  FS = ""
19925
19926}
19927{
19928  line = $ 0
19929  nfields = split(line, field, "@")
19930  substed = 0
19931  len = length(field[1])
19932  for (i = 2; i < nfields; i++) {
19933    key = field[i]
19934    keylen = length(key)
19935    if (S_is_set[key]) {
19936      value = S[key]
19937      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
19938      len += length(value) + length(field[++i])
19939      substed = 1
19940    } else
19941      len += 1 + keylen
19942  }
19943
19944  print line
19945}
19946
19947_ACAWK
19948_ACEOF
19949cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19950if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
19951  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
19952else
19953  cat
19954fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
19955  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
19956_ACEOF
19957
19958# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
19959# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
19960# trailing colons and then remove the whole line if VPATH becomes empty
19961# (actually we leave an empty line to preserve line numbers).
19962if test "x$srcdir" = x.; then
19963  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
19964h
19965s///
19966s/^/:/
19967s/[	 ]*$/:/
19968s/:\$(srcdir):/:/g
19969s/:\${srcdir}:/:/g
19970s/:@srcdir@:/:/g
19971s/^:*//
19972s/:*$//
19973x
19974s/\(=[	 ]*\).*/\1/
19975G
19976s/\n//
19977s/^[^=]*=[	 ]*$//
19978}'
19979fi
19980
19981cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19982fi # test -n "$CONFIG_FILES"
19983
19984# Set up the scripts for CONFIG_HEADERS section.
19985# No need to generate them if there are no CONFIG_HEADERS.
19986# This happens for instance with `./config.status Makefile'.
19987if test -n "$CONFIG_HEADERS"; then
19988cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
19989BEGIN {
19990_ACEOF
19991
19992# Transform confdefs.h into an awk script `defines.awk', embedded as
19993# here-document in config.status, that substitutes the proper values into
19994# config.h.in to produce config.h.
19995
19996# Create a delimiter string that does not exist in confdefs.h, to ease
19997# handling of long lines.
19998ac_delim='%!_!# '
19999for ac_last_try in false false :; do
20000  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20001  if test -z "$ac_tt"; then
20002    break
20003  elif $ac_last_try; then
20004    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20005  else
20006    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20007  fi
20008done
20009
20010# For the awk script, D is an array of macro values keyed by name,
20011# likewise P contains macro parameters if any.  Preserve backslash
20012# newline sequences.
20013
20014ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20015sed -n '
20016s/.\{148\}/&'"$ac_delim"'/g
20017t rset
20018:rset
20019s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
20020t def
20021d
20022:def
20023s/\\$//
20024t bsnl
20025s/["\\]/\\&/g
20026s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
20027D["\1"]=" \3"/p
20028s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
20029d
20030:bsnl
20031s/["\\]/\\&/g
20032s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
20033D["\1"]=" \3\\\\\\n"\\/p
20034t cont
20035s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20036t cont
20037d
20038:cont
20039n
20040s/.\{148\}/&'"$ac_delim"'/g
20041t clear
20042:clear
20043s/\\$//
20044t bsnlc
20045s/["\\]/\\&/g; s/^/"/; s/$/"/p
20046d
20047:bsnlc
20048s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20049b cont
20050' <confdefs.h | sed '
20051s/'"$ac_delim"'/"\\\
20052"/g' >>$CONFIG_STATUS || ac_write_fail=1
20053
20054cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20055  for (key in D) D_is_set[key] = 1
20056  FS = ""
20057}
20058/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20059  line = \$ 0
20060  split(line, arg, " ")
20061  if (arg[1] == "#") {
20062    defundef = arg[2]
20063    mac1 = arg[3]
20064  } else {
20065    defundef = substr(arg[1], 2)
20066    mac1 = arg[2]
20067  }
20068  split(mac1, mac2, "(") #)
20069  macro = mac2[1]
20070  prefix = substr(line, 1, index(line, defundef) - 1)
20071  if (D_is_set[macro]) {
20072    # Preserve the white space surrounding the "#".
20073    print prefix "define", macro P[macro] D[macro]
20074    next
20075  } else {
20076    # Replace #undef with comments.  This is necessary, for example,
20077    # in the case of _POSIX_SOURCE, which is predefined and required
20078    # on some systems where configure will not decide to define it.
20079    if (defundef == "undef") {
20080      print "/*", prefix defundef, macro, "*/"
20081      next
20082    }
20083  }
20084}
20085{ print }
20086_ACAWK
20087_ACEOF
20088cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20089  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20090fi # test -n "$CONFIG_HEADERS"
20091
20092
20093eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
20094shift
20095for ac_tag
20096do
20097  case $ac_tag in
20098  :[FHLC]) ac_mode=$ac_tag; continue;;
20099  esac
20100  case $ac_mode$ac_tag in
20101  :[FHL]*:*);;
20102  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20103  :[FH]-) ac_tag=-:-;;
20104  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20105  esac
20106  ac_save_IFS=$IFS
20107  IFS=:
20108  set x $ac_tag
20109  IFS=$ac_save_IFS
20110  shift
20111  ac_file=$1
20112  shift
20113
20114  case $ac_mode in
20115  :L) ac_source=$1;;
20116  :[FH])
20117    ac_file_inputs=
20118    for ac_f
20119    do
20120      case $ac_f in
20121      -) ac_f="$ac_tmp/stdin";;
20122      *) # Look for the file first in the build tree, then in the source tree
20123	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
20124	 # because $ac_f cannot contain `:'.
20125	 test -f "$ac_f" ||
20126	   case $ac_f in
20127	   [\\/$]*) false;;
20128	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20129	   esac ||
20130	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20131      esac
20132      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20133      as_fn_append ac_file_inputs " '$ac_f'"
20134    done
20135
20136    # Let's still pretend it is `configure' which instantiates (i.e., don't
20137    # use $as_me), people would be surprised to read:
20138    #    /* config.h.  Generated by config.status.  */
20139    configure_input='Generated from '`
20140	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20141	`' by configure.'
20142    if test x"$ac_file" != x-; then
20143      configure_input="$ac_file.  $configure_input"
20144      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20145$as_echo "$as_me: creating $ac_file" >&6;}
20146    fi
20147    # Neutralize special characters interpreted by sed in replacement strings.
20148    case $configure_input in #(
20149    *\&* | *\|* | *\\* )
20150       ac_sed_conf_input=`$as_echo "$configure_input" |
20151       sed 's/[\\\\&|]/\\\\&/g'`;; #(
20152    *) ac_sed_conf_input=$configure_input;;
20153    esac
20154
20155    case $ac_tag in
20156    *:-:* | *:-) cat >"$ac_tmp/stdin" \
20157      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20158    esac
20159    ;;
20160  esac
20161
20162  ac_dir=`$as_dirname -- "$ac_file" ||
20163$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20164	 X"$ac_file" : 'X\(//\)[^/]' \| \
20165	 X"$ac_file" : 'X\(//\)$' \| \
20166	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20167$as_echo X"$ac_file" |
20168    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20169	    s//\1/
20170	    q
20171	  }
20172	  /^X\(\/\/\)[^/].*/{
20173	    s//\1/
20174	    q
20175	  }
20176	  /^X\(\/\/\)$/{
20177	    s//\1/
20178	    q
20179	  }
20180	  /^X\(\/\).*/{
20181	    s//\1/
20182	    q
20183	  }
20184	  s/.*/./; q'`
20185  as_dir="$ac_dir"; as_fn_mkdir_p
20186  ac_builddir=.
20187
20188case "$ac_dir" in
20189.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20190*)
20191  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20192  # A ".." for each directory in $ac_dir_suffix.
20193  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20194  case $ac_top_builddir_sub in
20195  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20196  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20197  esac ;;
20198esac
20199ac_abs_top_builddir=$ac_pwd
20200ac_abs_builddir=$ac_pwd$ac_dir_suffix
20201# for backward compatibility:
20202ac_top_builddir=$ac_top_build_prefix
20203
20204case $srcdir in
20205  .)  # We are building in place.
20206    ac_srcdir=.
20207    ac_top_srcdir=$ac_top_builddir_sub
20208    ac_abs_top_srcdir=$ac_pwd ;;
20209  [\\/]* | ?:[\\/]* )  # Absolute name.
20210    ac_srcdir=$srcdir$ac_dir_suffix;
20211    ac_top_srcdir=$srcdir
20212    ac_abs_top_srcdir=$srcdir ;;
20213  *) # Relative name.
20214    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20215    ac_top_srcdir=$ac_top_build_prefix$srcdir
20216    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20217esac
20218ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20219
20220
20221  case $ac_mode in
20222  :F)
20223  #
20224  # CONFIG_FILE
20225  #
20226
20227  case $INSTALL in
20228  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20229  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20230  esac
20231  ac_MKDIR_P=$MKDIR_P
20232  case $MKDIR_P in
20233  [\\/$]* | ?:[\\/]* ) ;;
20234  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20235  esac
20236_ACEOF
20237
20238cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20239# If the template does not know about datarootdir, expand it.
20240# FIXME: This hack should be removed a few years after 2.60.
20241ac_datarootdir_hack=; ac_datarootdir_seen=
20242ac_sed_dataroot='
20243/datarootdir/ {
20244  p
20245  q
20246}
20247/@datadir@/p
20248/@docdir@/p
20249/@infodir@/p
20250/@localedir@/p
20251/@mandir@/p'
20252case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20253*datarootdir*) ac_datarootdir_seen=yes;;
20254*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20255  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20256$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20257_ACEOF
20258cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20259  ac_datarootdir_hack='
20260  s&@datadir@&$datadir&g
20261  s&@docdir@&$docdir&g
20262  s&@infodir@&$infodir&g
20263  s&@localedir@&$localedir&g
20264  s&@mandir@&$mandir&g
20265  s&\\\${datarootdir}&$datarootdir&g' ;;
20266esac
20267_ACEOF
20268
20269# Neutralize VPATH when `$srcdir' = `.'.
20270# Shell code in configure.ac might set extrasub.
20271# FIXME: do we really want to maintain this feature?
20272cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20273ac_sed_extra="$ac_vpsub
20274$extrasub
20275_ACEOF
20276cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20277:t
20278/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20279s|@configure_input@|$ac_sed_conf_input|;t t
20280s&@top_builddir@&$ac_top_builddir_sub&;t t
20281s&@top_build_prefix@&$ac_top_build_prefix&;t t
20282s&@srcdir@&$ac_srcdir&;t t
20283s&@abs_srcdir@&$ac_abs_srcdir&;t t
20284s&@top_srcdir@&$ac_top_srcdir&;t t
20285s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20286s&@builddir@&$ac_builddir&;t t
20287s&@abs_builddir@&$ac_abs_builddir&;t t
20288s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20289s&@INSTALL@&$ac_INSTALL&;t t
20290s&@MKDIR_P@&$ac_MKDIR_P&;t t
20291$ac_datarootdir_hack
20292"
20293eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20294  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20295
20296test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20297  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20298  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
20299      "$ac_tmp/out"`; test -z "$ac_out"; } &&
20300  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20301which seems to be undefined.  Please make sure it is defined" >&5
20302$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20303which seems to be undefined.  Please make sure it is defined" >&2;}
20304
20305  rm -f "$ac_tmp/stdin"
20306  case $ac_file in
20307  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20308  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20309  esac \
20310  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20311 ;;
20312  :H)
20313  #
20314  # CONFIG_HEADER
20315  #
20316  if test x"$ac_file" != x-; then
20317    {
20318      $as_echo "/* $configure_input  */" \
20319      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20320    } >"$ac_tmp/config.h" \
20321      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20322    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20323      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20324$as_echo "$as_me: $ac_file is unchanged" >&6;}
20325    else
20326      rm -f "$ac_file"
20327      mv "$ac_tmp/config.h" "$ac_file" \
20328	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
20329    fi
20330  else
20331    $as_echo "/* $configure_input  */" \
20332      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20333      || as_fn_error $? "could not create -" "$LINENO" 5
20334  fi
20335 ;;
20336  :L)
20337  #
20338  # CONFIG_LINK
20339  #
20340
20341  if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20342    :
20343  else
20344    # Prefer the file from the source tree if names are identical.
20345    if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20346      ac_source=$srcdir/$ac_source
20347    fi
20348
20349    { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20350$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20351
20352    if test ! -r "$ac_source"; then
20353      as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20354    fi
20355    rm -f "$ac_file"
20356
20357    # Try a relative symlink, then a hard link, then a copy.
20358    case $ac_source in
20359    [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20360	*) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20361    esac
20362    ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20363      ln "$ac_source" "$ac_file" 2>/dev/null ||
20364      cp -p "$ac_source" "$ac_file" ||
20365      as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20366  fi
20367 ;;
20368  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20369$as_echo "$as_me: executing $ac_file commands" >&6;}
20370 ;;
20371  esac
20372
20373
20374  case $ac_file$ac_mode in
20375    "check_win32_symlinks":C)
20376# Links sometimes fail undetected on Mingw -
20377# so here we detect it and warn the user
20378for FILE in $CONFIG_LINKS
20379 do
20380	# test -e works for symlinks in the MinGW console
20381	test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20382$as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20383 done
20384 ;;
20385    "src/include/pg_config.h":H)
20386# Update timestamp for pg_config.h (see Makefile.global)
20387echo >src/include/stamp-h
20388 ;;
20389    "src/include/pg_config_ext.h":H)
20390# Update timestamp for pg_config_ext.h (see Makefile.global)
20391echo >src/include/stamp-ext-h
20392 ;;
20393    "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20394
20395  esac
20396done # for ac_tag
20397
20398
20399as_fn_exit 0
20400_ACEOF
20401ac_clean_files=$ac_clean_files_save
20402
20403test $ac_write_fail = 0 ||
20404  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20405
20406
20407# configure is writing to config.log, and then calls config.status.
20408# config.status does its own redirection, appending to config.log.
20409# Unfortunately, on DOS this fails, as config.log is still kept open
20410# by configure, so config.status won't be able to write to it; its
20411# output is simply discarded.  So we exec the FD to /dev/null,
20412# effectively closing config.log, so it can be properly (re)opened and
20413# appended to by config.status.  When coming back to configure, we
20414# need to make the FD available again.
20415if test "$no_create" != yes; then
20416  ac_cs_success=:
20417  ac_config_status_args=
20418  test "$silent" = yes &&
20419    ac_config_status_args="$ac_config_status_args --quiet"
20420  exec 5>/dev/null
20421  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20422  exec 5>>config.log
20423  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20424  # would make configure fail if this is the last instruction.
20425  $ac_cs_success || as_fn_exit 1
20426fi
20427if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20428  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20429$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20430fi
20431
20432