1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for PostgreSQL 14.1.
4#
5# Report bugs to <pgsql-bugs@lists.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-2021, 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@lists.postgresql.org about your system,
273$0: including any error possibly output before this
274$0: message. Then install a modern shell, or manually run
275$0: the script 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='14.1'
586PACKAGE_STRING='PostgreSQL 14.1'
587PACKAGE_BUGREPORT='pgsql-bugs@lists.postgresql.org'
588PACKAGE_URL='https://www.postgresql.org/'
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
652LIBOBJS
653UUID_LIBS
654LDAP_LIBS_BE
655LDAP_LIBS_FE
656with_ssl
657PTHREAD_CFLAGS
658PTHREAD_LIBS
659PTHREAD_CC
660ax_pthread_config
661EGREP
662GREP
663SED
664ZIC
665python_additional_libs
666python_libspec
667python_libdir
668python_includespec
669python_version
670python_majorversion
671PYTHON
672perl_embed_ldflags
673perl_embed_ccflags
674perl_includespec
675perl_useshrplib
676perl_privlibexp
677perl_archlibexp
678PERL
679FLEXFLAGS
680FLEX
681BISONFLAGS
682BISON
683MKDIR_P
684LN_S
685TAR
686install_bin
687INSTALL_DATA
688INSTALL_SCRIPT
689INSTALL_PROGRAM
690WINDRES
691DLLWRAP
692DLLTOOL
693AR
694STRIP_SHARED_LIB
695STRIP_STATIC_LIB
696STRIP
697RANLIB
698with_gnu_ld
699LD
700LDFLAGS_SL
701LDFLAGS_EX
702LZ4_LIBS
703LZ4_CFLAGS
704with_lz4
705with_zlib
706with_system_tzdata
707with_libxslt
708XML2_LIBS
709XML2_CFLAGS
710XML2_CONFIG
711with_libxml
712with_uuid
713with_readline
714with_systemd
715with_selinux
716with_ldap
717with_krb_srvnam
718krb_srvtab
719with_gssapi
720with_python
721with_perl
722with_tcl
723ICU_LIBS
724ICU_CFLAGS
725with_icu
726enable_thread_safety
727INCLUDES
728autodepend
729PKG_CONFIG_LIBDIR
730PKG_CONFIG_PATH
731PKG_CONFIG
732TAS
733GCC
734CPP
735CFLAGS_SL
736BITCODE_CXXFLAGS
737BITCODE_CFLAGS
738CFLAGS_VECTORIZE
739CFLAGS_UNROLL_LOOPS
740PERMIT_DECLARATION_AFTER_STATEMENT
741LLVM_BINPATH
742LLVM_CXXFLAGS
743LLVM_CFLAGS
744LLVM_CPPFLAGS
745LLVM_LIBS
746CLANG
747LLVM_CONFIG
748AWK
749with_llvm
750SUN_STUDIO_CC
751ac_ct_CXX
752CXXFLAGS
753CXX
754OBJEXT
755EXEEXT
756ac_ct_CC
757CPPFLAGS
758LDFLAGS
759CFLAGS
760CC
761enable_tap_tests
762enable_dtrace
763DTRACEFLAGS
764DTRACE
765enable_coverage
766GENHTML
767LCOV
768GCOV
769enable_debug
770enable_rpath
771default_port
772WANTED_LANGUAGES
773enable_nls
774PORTNAME
775host_os
776host_vendor
777host_cpu
778host
779build_os
780build_vendor
781build_cpu
782build
783PG_MAJORVERSION
784target_alias
785host_alias
786build_alias
787LIBS
788ECHO_T
789ECHO_N
790ECHO_C
791DEFS
792mandir
793localedir
794libdir
795psdir
796pdfdir
797dvidir
798htmldir
799infodir
800docdir
801oldincludedir
802includedir
803localstatedir
804sharedstatedir
805sysconfdir
806datadir
807datarootdir
808libexecdir
809sbindir
810bindir
811program_transform_name
812prefix
813exec_prefix
814PACKAGE_URL
815PACKAGE_BUGREPORT
816PACKAGE_STRING
817PACKAGE_VERSION
818PACKAGE_TARNAME
819PACKAGE_NAME
820PATH_SEPARATOR
821SHELL'
822ac_subst_files=''
823ac_user_opts='
824enable_option_checking
825with_extra_version
826with_template
827with_includes
828with_libraries
829with_libs
830enable_integer_datetimes
831enable_nls
832with_pgport
833enable_rpath
834enable_spinlocks
835enable_atomics
836enable_debug
837enable_profiling
838enable_coverage
839enable_dtrace
840enable_tap_tests
841with_blocksize
842with_segsize
843with_wal_blocksize
844with_CC
845with_llvm
846enable_depend
847enable_cassert
848enable_thread_safety
849with_icu
850with_tcl
851with_tclconfig
852with_perl
853with_python
854with_gssapi
855with_krb_srvnam
856with_pam
857with_bsd_auth
858with_ldap
859with_bonjour
860with_selinux
861with_systemd
862with_readline
863with_libedit_preferred
864with_uuid
865with_ossp_uuid
866with_libxml
867with_libxslt
868with_system_tzdata
869with_zlib
870with_lz4
871with_gnu_ld
872with_ssl
873with_openssl
874enable_largefile
875'
876      ac_precious_vars='build_alias
877host_alias
878target_alias
879CC
880CFLAGS
881LDFLAGS
882LIBS
883CPPFLAGS
884CXX
885CXXFLAGS
886CCC
887LLVM_CONFIG
888CLANG
889CPP
890PKG_CONFIG
891PKG_CONFIG_PATH
892PKG_CONFIG_LIBDIR
893ICU_CFLAGS
894ICU_LIBS
895XML2_CONFIG
896XML2_CFLAGS
897XML2_LIBS
898LZ4_CFLAGS
899LZ4_LIBS
900LDFLAGS_EX
901LDFLAGS_SL
902PERL
903PYTHON
904MSGFMT
905TCLSH'
906
907
908# Initialize some variables set by options.
909ac_init_help=
910ac_init_version=false
911ac_unrecognized_opts=
912ac_unrecognized_sep=
913# The variables have the same names as the options, with
914# dashes changed to underlines.
915cache_file=/dev/null
916exec_prefix=NONE
917no_create=
918no_recursion=
919prefix=NONE
920program_prefix=NONE
921program_suffix=NONE
922program_transform_name=s,x,x,
923silent=
924site=
925srcdir=
926verbose=
927x_includes=NONE
928x_libraries=NONE
929
930# Installation directory options.
931# These are left unexpanded so users can "make install exec_prefix=/foo"
932# and all the variables that are supposed to be based on exec_prefix
933# by default will actually change.
934# Use braces instead of parens because sh, perl, etc. also accept them.
935# (The list follows the same order as the GNU Coding Standards.)
936bindir='${exec_prefix}/bin'
937sbindir='${exec_prefix}/sbin'
938libexecdir='${exec_prefix}/libexec'
939datarootdir='${prefix}/share'
940datadir='${datarootdir}'
941sysconfdir='${prefix}/etc'
942sharedstatedir='${prefix}/com'
943localstatedir='${prefix}/var'
944includedir='${prefix}/include'
945oldincludedir='/usr/include'
946docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
947infodir='${datarootdir}/info'
948htmldir='${docdir}'
949dvidir='${docdir}'
950pdfdir='${docdir}'
951psdir='${docdir}'
952libdir='${exec_prefix}/lib'
953localedir='${datarootdir}/locale'
954mandir='${datarootdir}/man'
955
956ac_prev=
957ac_dashdash=
958for ac_option
959do
960  # If the previous option needs an argument, assign it.
961  if test -n "$ac_prev"; then
962    eval $ac_prev=\$ac_option
963    ac_prev=
964    continue
965  fi
966
967  case $ac_option in
968  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
969  *=)   ac_optarg= ;;
970  *)    ac_optarg=yes ;;
971  esac
972
973  # Accept the important Cygnus configure options, so we can diagnose typos.
974
975  case $ac_dashdash$ac_option in
976  --)
977    ac_dashdash=yes ;;
978
979  -bindir | --bindir | --bindi | --bind | --bin | --bi)
980    ac_prev=bindir ;;
981  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
982    bindir=$ac_optarg ;;
983
984  -build | --build | --buil | --bui | --bu)
985    ac_prev=build_alias ;;
986  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
987    build_alias=$ac_optarg ;;
988
989  -cache-file | --cache-file | --cache-fil | --cache-fi \
990  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
991    ac_prev=cache_file ;;
992  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
993  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
994    cache_file=$ac_optarg ;;
995
996  --config-cache | -C)
997    cache_file=config.cache ;;
998
999  -datadir | --datadir | --datadi | --datad)
1000    ac_prev=datadir ;;
1001  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1002    datadir=$ac_optarg ;;
1003
1004  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1005  | --dataroo | --dataro | --datar)
1006    ac_prev=datarootdir ;;
1007  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1008  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1009    datarootdir=$ac_optarg ;;
1010
1011  -disable-* | --disable-*)
1012    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1013    # Reject names that are not valid shell variable names.
1014    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1015      as_fn_error $? "invalid feature name: $ac_useropt"
1016    ac_useropt_orig=$ac_useropt
1017    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1018    case $ac_user_opts in
1019      *"
1020"enable_$ac_useropt"
1021"*) ;;
1022      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1023	 ac_unrecognized_sep=', ';;
1024    esac
1025    eval enable_$ac_useropt=no ;;
1026
1027  -docdir | --docdir | --docdi | --doc | --do)
1028    ac_prev=docdir ;;
1029  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1030    docdir=$ac_optarg ;;
1031
1032  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1033    ac_prev=dvidir ;;
1034  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1035    dvidir=$ac_optarg ;;
1036
1037  -enable-* | --enable-*)
1038    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1039    # Reject names that are not valid shell variable names.
1040    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1041      as_fn_error $? "invalid feature name: $ac_useropt"
1042    ac_useropt_orig=$ac_useropt
1043    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1044    case $ac_user_opts in
1045      *"
1046"enable_$ac_useropt"
1047"*) ;;
1048      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1049	 ac_unrecognized_sep=', ';;
1050    esac
1051    eval enable_$ac_useropt=\$ac_optarg ;;
1052
1053  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1054  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1055  | --exec | --exe | --ex)
1056    ac_prev=exec_prefix ;;
1057  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1058  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1059  | --exec=* | --exe=* | --ex=*)
1060    exec_prefix=$ac_optarg ;;
1061
1062  -gas | --gas | --ga | --g)
1063    # Obsolete; use --with-gas.
1064    with_gas=yes ;;
1065
1066  -help | --help | --hel | --he | -h)
1067    ac_init_help=long ;;
1068  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1069    ac_init_help=recursive ;;
1070  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1071    ac_init_help=short ;;
1072
1073  -host | --host | --hos | --ho)
1074    ac_prev=host_alias ;;
1075  -host=* | --host=* | --hos=* | --ho=*)
1076    host_alias=$ac_optarg ;;
1077
1078  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1079    ac_prev=htmldir ;;
1080  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1081  | --ht=*)
1082    htmldir=$ac_optarg ;;
1083
1084  -includedir | --includedir | --includedi | --included | --include \
1085  | --includ | --inclu | --incl | --inc)
1086    ac_prev=includedir ;;
1087  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1088  | --includ=* | --inclu=* | --incl=* | --inc=*)
1089    includedir=$ac_optarg ;;
1090
1091  -infodir | --infodir | --infodi | --infod | --info | --inf)
1092    ac_prev=infodir ;;
1093  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1094    infodir=$ac_optarg ;;
1095
1096  -libdir | --libdir | --libdi | --libd)
1097    ac_prev=libdir ;;
1098  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1099    libdir=$ac_optarg ;;
1100
1101  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1102  | --libexe | --libex | --libe)
1103    ac_prev=libexecdir ;;
1104  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1105  | --libexe=* | --libex=* | --libe=*)
1106    libexecdir=$ac_optarg ;;
1107
1108  -localedir | --localedir | --localedi | --localed | --locale)
1109    ac_prev=localedir ;;
1110  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1111    localedir=$ac_optarg ;;
1112
1113  -localstatedir | --localstatedir | --localstatedi | --localstated \
1114  | --localstate | --localstat | --localsta | --localst | --locals)
1115    ac_prev=localstatedir ;;
1116  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1117  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1118    localstatedir=$ac_optarg ;;
1119
1120  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1121    ac_prev=mandir ;;
1122  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1123    mandir=$ac_optarg ;;
1124
1125  -nfp | --nfp | --nf)
1126    # Obsolete; use --without-fp.
1127    with_fp=no ;;
1128
1129  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1130  | --no-cr | --no-c | -n)
1131    no_create=yes ;;
1132
1133  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1134  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1135    no_recursion=yes ;;
1136
1137  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1138  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1139  | --oldin | --oldi | --old | --ol | --o)
1140    ac_prev=oldincludedir ;;
1141  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1142  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1143  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1144    oldincludedir=$ac_optarg ;;
1145
1146  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1147    ac_prev=prefix ;;
1148  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1149    prefix=$ac_optarg ;;
1150
1151  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1152  | --program-pre | --program-pr | --program-p)
1153    ac_prev=program_prefix ;;
1154  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1155  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1156    program_prefix=$ac_optarg ;;
1157
1158  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1159  | --program-suf | --program-su | --program-s)
1160    ac_prev=program_suffix ;;
1161  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1162  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1163    program_suffix=$ac_optarg ;;
1164
1165  -program-transform-name | --program-transform-name \
1166  | --program-transform-nam | --program-transform-na \
1167  | --program-transform-n | --program-transform- \
1168  | --program-transform | --program-transfor \
1169  | --program-transfo | --program-transf \
1170  | --program-trans | --program-tran \
1171  | --progr-tra | --program-tr | --program-t)
1172    ac_prev=program_transform_name ;;
1173  -program-transform-name=* | --program-transform-name=* \
1174  | --program-transform-nam=* | --program-transform-na=* \
1175  | --program-transform-n=* | --program-transform-=* \
1176  | --program-transform=* | --program-transfor=* \
1177  | --program-transfo=* | --program-transf=* \
1178  | --program-trans=* | --program-tran=* \
1179  | --progr-tra=* | --program-tr=* | --program-t=*)
1180    program_transform_name=$ac_optarg ;;
1181
1182  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1183    ac_prev=pdfdir ;;
1184  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1185    pdfdir=$ac_optarg ;;
1186
1187  -psdir | --psdir | --psdi | --psd | --ps)
1188    ac_prev=psdir ;;
1189  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1190    psdir=$ac_optarg ;;
1191
1192  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1193  | -silent | --silent | --silen | --sile | --sil)
1194    silent=yes ;;
1195
1196  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1197    ac_prev=sbindir ;;
1198  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1199  | --sbi=* | --sb=*)
1200    sbindir=$ac_optarg ;;
1201
1202  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1203  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1204  | --sharedst | --shareds | --shared | --share | --shar \
1205  | --sha | --sh)
1206    ac_prev=sharedstatedir ;;
1207  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1208  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1209  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1210  | --sha=* | --sh=*)
1211    sharedstatedir=$ac_optarg ;;
1212
1213  -site | --site | --sit)
1214    ac_prev=site ;;
1215  -site=* | --site=* | --sit=*)
1216    site=$ac_optarg ;;
1217
1218  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1219    ac_prev=srcdir ;;
1220  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1221    srcdir=$ac_optarg ;;
1222
1223  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1224  | --syscon | --sysco | --sysc | --sys | --sy)
1225    ac_prev=sysconfdir ;;
1226  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1227  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1228    sysconfdir=$ac_optarg ;;
1229
1230  -target | --target | --targe | --targ | --tar | --ta | --t)
1231    ac_prev=target_alias ;;
1232  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1233    target_alias=$ac_optarg ;;
1234
1235  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1236    verbose=yes ;;
1237
1238  -version | --version | --versio | --versi | --vers | -V)
1239    ac_init_version=: ;;
1240
1241  -with-* | --with-*)
1242    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1243    # Reject names that are not valid shell variable names.
1244    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1245      as_fn_error $? "invalid package name: $ac_useropt"
1246    ac_useropt_orig=$ac_useropt
1247    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1248    case $ac_user_opts in
1249      *"
1250"with_$ac_useropt"
1251"*) ;;
1252      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1253	 ac_unrecognized_sep=', ';;
1254    esac
1255    eval with_$ac_useropt=\$ac_optarg ;;
1256
1257  -without-* | --without-*)
1258    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1259    # Reject names that are not valid shell variable names.
1260    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1261      as_fn_error $? "invalid package name: $ac_useropt"
1262    ac_useropt_orig=$ac_useropt
1263    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1264    case $ac_user_opts in
1265      *"
1266"with_$ac_useropt"
1267"*) ;;
1268      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1269	 ac_unrecognized_sep=', ';;
1270    esac
1271    eval with_$ac_useropt=no ;;
1272
1273  --x)
1274    # Obsolete; use --with-x.
1275    with_x=yes ;;
1276
1277  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1278  | --x-incl | --x-inc | --x-in | --x-i)
1279    ac_prev=x_includes ;;
1280  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1281  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1282    x_includes=$ac_optarg ;;
1283
1284  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1285  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1286    ac_prev=x_libraries ;;
1287  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1288  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1289    x_libraries=$ac_optarg ;;
1290
1291  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1292Try \`$0 --help' for more information"
1293    ;;
1294
1295  *=*)
1296    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1297    # Reject names that are not valid shell variable names.
1298    case $ac_envvar in #(
1299      '' | [0-9]* | *[!_$as_cr_alnum]* )
1300      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1301    esac
1302    eval $ac_envvar=\$ac_optarg
1303    export $ac_envvar ;;
1304
1305  *)
1306    # FIXME: should be removed in autoconf 3.0.
1307    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1308    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1309      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1310    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1311    ;;
1312
1313  esac
1314done
1315
1316if test -n "$ac_prev"; then
1317  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1318  as_fn_error $? "missing argument to $ac_option"
1319fi
1320
1321if test -n "$ac_unrecognized_opts"; then
1322  case $enable_option_checking in
1323    no) ;;
1324    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1325    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1326  esac
1327fi
1328
1329# Check all directory arguments for consistency.
1330for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1331		datadir sysconfdir sharedstatedir localstatedir includedir \
1332		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1333		libdir localedir mandir
1334do
1335  eval ac_val=\$$ac_var
1336  # Remove trailing slashes.
1337  case $ac_val in
1338    */ )
1339      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1340      eval $ac_var=\$ac_val;;
1341  esac
1342  # Be sure to have absolute directory names.
1343  case $ac_val in
1344    [\\/$]* | ?:[\\/]* )  continue;;
1345    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1346  esac
1347  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1348done
1349
1350# There might be people who depend on the old broken behavior: `$host'
1351# used to hold the argument of --host etc.
1352# FIXME: To remove some day.
1353build=$build_alias
1354host=$host_alias
1355target=$target_alias
1356
1357# FIXME: To remove some day.
1358if test "x$host_alias" != x; then
1359  if test "x$build_alias" = x; then
1360    cross_compiling=maybe
1361  elif test "x$build_alias" != "x$host_alias"; then
1362    cross_compiling=yes
1363  fi
1364fi
1365
1366ac_tool_prefix=
1367test -n "$host_alias" && ac_tool_prefix=$host_alias-
1368
1369test "$silent" = yes && exec 6>/dev/null
1370
1371
1372ac_pwd=`pwd` && test -n "$ac_pwd" &&
1373ac_ls_di=`ls -di .` &&
1374ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1375  as_fn_error $? "working directory cannot be determined"
1376test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1377  as_fn_error $? "pwd does not report name of working directory"
1378
1379
1380# Find the source files, if location was not specified.
1381if test -z "$srcdir"; then
1382  ac_srcdir_defaulted=yes
1383  # Try the directory containing this script, then the parent directory.
1384  ac_confdir=`$as_dirname -- "$as_myself" ||
1385$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1386	 X"$as_myself" : 'X\(//\)[^/]' \| \
1387	 X"$as_myself" : 'X\(//\)$' \| \
1388	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1389$as_echo X"$as_myself" |
1390    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1391	    s//\1/
1392	    q
1393	  }
1394	  /^X\(\/\/\)[^/].*/{
1395	    s//\1/
1396	    q
1397	  }
1398	  /^X\(\/\/\)$/{
1399	    s//\1/
1400	    q
1401	  }
1402	  /^X\(\/\).*/{
1403	    s//\1/
1404	    q
1405	  }
1406	  s/.*/./; q'`
1407  srcdir=$ac_confdir
1408  if test ! -r "$srcdir/$ac_unique_file"; then
1409    srcdir=..
1410  fi
1411else
1412  ac_srcdir_defaulted=no
1413fi
1414if test ! -r "$srcdir/$ac_unique_file"; then
1415  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1416  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1417fi
1418ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1419ac_abs_confdir=`(
1420	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1421	pwd)`
1422# When building in place, set srcdir=.
1423if test "$ac_abs_confdir" = "$ac_pwd"; then
1424  srcdir=.
1425fi
1426# Remove unnecessary trailing slashes from srcdir.
1427# Double slashes in file names in object file debugging info
1428# mess up M-x gdb in Emacs.
1429case $srcdir in
1430*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1431esac
1432for ac_var in $ac_precious_vars; do
1433  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1434  eval ac_env_${ac_var}_value=\$${ac_var}
1435  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1436  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1437done
1438
1439#
1440# Report the --help message.
1441#
1442if test "$ac_init_help" = "long"; then
1443  # Omit some internal or obsolete options to make the list less imposing.
1444  # This message is too long to be a string in the A/UX 3.1 sh.
1445  cat <<_ACEOF
1446\`configure' configures PostgreSQL 14.1 to adapt to many kinds of systems.
1447
1448Usage: $0 [OPTION]... [VAR=VALUE]...
1449
1450To assign environment variables (e.g., CC, CFLAGS...), specify them as
1451VAR=VALUE.  See below for descriptions of some of the useful variables.
1452
1453Defaults for the options are specified in brackets.
1454
1455Configuration:
1456  -h, --help              display this help and exit
1457      --help=short        display options specific to this package
1458      --help=recursive    display the short help of all the included packages
1459  -V, --version           display version information and exit
1460  -q, --quiet, --silent   do not print \`checking ...' messages
1461      --cache-file=FILE   cache test results in FILE [disabled]
1462  -C, --config-cache      alias for \`--cache-file=config.cache'
1463  -n, --no-create         do not create output files
1464      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1465
1466Installation directories:
1467  --prefix=PREFIX         install architecture-independent files in PREFIX
1468                          [$ac_default_prefix]
1469  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1470                          [PREFIX]
1471
1472By default, \`make install' will install all the files in
1473\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1474an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1475for instance \`--prefix=\$HOME'.
1476
1477For better control, use the options below.
1478
1479Fine tuning of the installation directories:
1480  --bindir=DIR            user executables [EPREFIX/bin]
1481  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1482  --libexecdir=DIR        program executables [EPREFIX/libexec]
1483  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1484  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1485  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1486  --libdir=DIR            object code libraries [EPREFIX/lib]
1487  --includedir=DIR        C header files [PREFIX/include]
1488  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1489  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1490  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1491  --infodir=DIR           info documentation [DATAROOTDIR/info]
1492  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1493  --mandir=DIR            man documentation [DATAROOTDIR/man]
1494  --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1495  --htmldir=DIR           html documentation [DOCDIR]
1496  --dvidir=DIR            dvi documentation [DOCDIR]
1497  --pdfdir=DIR            pdf documentation [DOCDIR]
1498  --psdir=DIR             ps documentation [DOCDIR]
1499_ACEOF
1500
1501  cat <<\_ACEOF
1502
1503System types:
1504  --build=BUILD     configure for building on BUILD [guessed]
1505  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1506_ACEOF
1507fi
1508
1509if test -n "$ac_init_help"; then
1510  case $ac_init_help in
1511     short | recursive ) echo "Configuration of PostgreSQL 14.1:";;
1512   esac
1513  cat <<\_ACEOF
1514
1515Optional Features:
1516  --disable-option-checking  ignore unrecognized --enable/--with options
1517  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1518  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1519  --disable-integer-datetimes
1520                          obsolete option, no longer supported
1521  --enable-nls[=LANGUAGES]
1522                          enable Native Language Support
1523  --disable-rpath         do not embed shared library search path in
1524                          executables
1525  --disable-spinlocks     do not use spinlocks
1526  --disable-atomics       do not use atomic operations
1527  --enable-debug          build with debugging symbols (-g)
1528  --enable-profiling      build with profiling enabled
1529  --enable-coverage       build with coverage testing instrumentation
1530  --enable-dtrace         build with DTrace support
1531  --enable-tap-tests      enable TAP tests (requires Perl and IPC::Run)
1532  --enable-depend         turn on automatic dependency tracking
1533  --enable-cassert        enable assertion checks (for debugging)
1534  --disable-thread-safety disable thread-safety in client libraries
1535  --disable-largefile     omit support for large files
1536
1537Optional Packages:
1538  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1539  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1540  --with-extra-version=STRING
1541                          append STRING to version
1542  --with-template=NAME    override operating system template
1543  --with-includes=DIRS    look for additional header files in DIRS
1544  --with-libraries=DIRS   look for additional libraries in DIRS
1545  --with-libs=DIRS        alternative spelling of --with-libraries
1546  --with-pgport=PORTNUM   set default port number [5432]
1547  --with-blocksize=BLOCKSIZE
1548                          set table block size in kB [8]
1549  --with-segsize=SEGSIZE  set table segment size in GB [1]
1550  --with-wal-blocksize=BLOCKSIZE
1551                          set WAL block size in kB [8]
1552  --with-CC=CMD           set compiler (deprecated)
1553  --with-llvm             build with LLVM based JIT support
1554  --with-icu              build with ICU support
1555  --with-tcl              build Tcl modules (PL/Tcl)
1556  --with-tclconfig=DIR    tclConfig.sh is in DIR
1557  --with-perl             build Perl modules (PL/Perl)
1558  --with-python           build Python modules (PL/Python)
1559  --with-gssapi           build with GSSAPI support
1560  --with-krb-srvnam=NAME  default service principal name in Kerberos (GSSAPI)
1561                          [postgres]
1562  --with-pam              build with PAM support
1563  --with-bsd-auth         build with BSD Authentication support
1564  --with-ldap             build with LDAP support
1565  --with-bonjour          build with Bonjour support
1566  --with-selinux          build with SELinux support
1567  --with-systemd          build with systemd support
1568  --without-readline      do not use GNU Readline nor BSD Libedit for editing
1569  --with-libedit-preferred
1570                          prefer BSD Libedit over GNU Readline
1571  --with-uuid=LIB         build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1572  --with-ossp-uuid        obsolete spelling of --with-uuid=ossp
1573  --with-libxml           build with XML support
1574  --with-libxslt          use XSLT support when building contrib/xml2
1575  --with-system-tzdata=DIR
1576                          use system time zone data in DIR
1577  --without-zlib          do not use Zlib
1578  --with-lz4              build with LZ4 support
1579  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1580  --with-ssl=LIB          use LIB for SSL/TLS support (openssl)
1581  --with-openssl          obsolete spelling of --with-ssl=openssl
1582
1583Some influential environment variables:
1584  CC          C compiler command
1585  CFLAGS      C compiler flags
1586  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1587              nonstandard directory <lib dir>
1588  LIBS        libraries to pass to the linker, e.g. -l<library>
1589  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1590              you have headers in a nonstandard directory <include dir>
1591  CXX         C++ compiler command
1592  CXXFLAGS    C++ compiler flags
1593  LLVM_CONFIG path to llvm-config command
1594  CLANG       path to clang compiler to generate bitcode
1595  CPP         C preprocessor
1596  PKG_CONFIG  path to pkg-config utility
1597  PKG_CONFIG_PATH
1598              directories to add to pkg-config's search path
1599  PKG_CONFIG_LIBDIR
1600              path overriding pkg-config's built-in search path
1601  ICU_CFLAGS  C compiler flags for ICU, overriding pkg-config
1602  ICU_LIBS    linker flags for ICU, overriding pkg-config
1603  XML2_CONFIG path to xml2-config utility
1604  XML2_CFLAGS C compiler flags for XML2, overriding pkg-config
1605  XML2_LIBS   linker flags for XML2, overriding pkg-config
1606  LZ4_CFLAGS  C compiler flags for LZ4, overriding pkg-config
1607  LZ4_LIBS    linker flags for LZ4, overriding pkg-config
1608  LDFLAGS_EX  extra linker flags for linking executables only
1609  LDFLAGS_SL  extra linker flags for linking shared libraries only
1610  PERL        Perl program
1611  PYTHON      Python program
1612  MSGFMT      msgfmt program for NLS
1613  TCLSH       Tcl interpreter program (tclsh)
1614
1615Use these variables to override the choices made by `configure' or to help
1616it to find libraries and programs with nonstandard names/locations.
1617
1618Report bugs to <pgsql-bugs@lists.postgresql.org>.
1619PostgreSQL home page: <https://www.postgresql.org/>.
1620_ACEOF
1621ac_status=$?
1622fi
1623
1624if test "$ac_init_help" = "recursive"; then
1625  # If there are subdirs, report their specific --help.
1626  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1627    test -d "$ac_dir" ||
1628      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1629      continue
1630    ac_builddir=.
1631
1632case "$ac_dir" in
1633.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1634*)
1635  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1636  # A ".." for each directory in $ac_dir_suffix.
1637  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1638  case $ac_top_builddir_sub in
1639  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1640  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1641  esac ;;
1642esac
1643ac_abs_top_builddir=$ac_pwd
1644ac_abs_builddir=$ac_pwd$ac_dir_suffix
1645# for backward compatibility:
1646ac_top_builddir=$ac_top_build_prefix
1647
1648case $srcdir in
1649  .)  # We are building in place.
1650    ac_srcdir=.
1651    ac_top_srcdir=$ac_top_builddir_sub
1652    ac_abs_top_srcdir=$ac_pwd ;;
1653  [\\/]* | ?:[\\/]* )  # Absolute name.
1654    ac_srcdir=$srcdir$ac_dir_suffix;
1655    ac_top_srcdir=$srcdir
1656    ac_abs_top_srcdir=$srcdir ;;
1657  *) # Relative name.
1658    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1659    ac_top_srcdir=$ac_top_build_prefix$srcdir
1660    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1661esac
1662ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1663
1664    cd "$ac_dir" || { ac_status=$?; continue; }
1665    # Check for guested configure.
1666    if test -f "$ac_srcdir/configure.gnu"; then
1667      echo &&
1668      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1669    elif test -f "$ac_srcdir/configure"; then
1670      echo &&
1671      $SHELL "$ac_srcdir/configure" --help=recursive
1672    else
1673      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1674    fi || ac_status=$?
1675    cd "$ac_pwd" || { ac_status=$?; break; }
1676  done
1677fi
1678
1679test -n "$ac_init_help" && exit $ac_status
1680if $ac_init_version; then
1681  cat <<\_ACEOF
1682PostgreSQL configure 14.1
1683generated by GNU Autoconf 2.69
1684
1685Copyright (C) 2012 Free Software Foundation, Inc.
1686This configure script is free software; the Free Software Foundation
1687gives unlimited permission to copy, distribute and modify it.
1688
1689Copyright (c) 1996-2021, PostgreSQL Global Development Group
1690_ACEOF
1691  exit
1692fi
1693
1694## ------------------------ ##
1695## Autoconf initialization. ##
1696## ------------------------ ##
1697
1698# ac_fn_c_try_compile LINENO
1699# --------------------------
1700# Try to compile conftest.$ac_ext, and return whether this succeeded.
1701ac_fn_c_try_compile ()
1702{
1703  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1704  rm -f conftest.$ac_objext
1705  if { { ac_try="$ac_compile"
1706case "(($ac_try" in
1707  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1708  *) ac_try_echo=$ac_try;;
1709esac
1710eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1711$as_echo "$ac_try_echo"; } >&5
1712  (eval "$ac_compile") 2>conftest.err
1713  ac_status=$?
1714  if test -s conftest.err; then
1715    grep -v '^ *+' conftest.err >conftest.er1
1716    cat conftest.er1 >&5
1717    mv -f conftest.er1 conftest.err
1718  fi
1719  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1720  test $ac_status = 0; } && {
1721	 test -z "$ac_c_werror_flag" ||
1722	 test ! -s conftest.err
1723       } && test -s conftest.$ac_objext; then :
1724  ac_retval=0
1725else
1726  $as_echo "$as_me: failed program was:" >&5
1727sed 's/^/| /' conftest.$ac_ext >&5
1728
1729	ac_retval=1
1730fi
1731  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1732  as_fn_set_status $ac_retval
1733
1734} # ac_fn_c_try_compile
1735
1736# ac_fn_cxx_try_compile LINENO
1737# ----------------------------
1738# Try to compile conftest.$ac_ext, and return whether this succeeded.
1739ac_fn_cxx_try_compile ()
1740{
1741  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1742  rm -f conftest.$ac_objext
1743  if { { ac_try="$ac_compile"
1744case "(($ac_try" in
1745  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1746  *) ac_try_echo=$ac_try;;
1747esac
1748eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1749$as_echo "$ac_try_echo"; } >&5
1750  (eval "$ac_compile") 2>conftest.err
1751  ac_status=$?
1752  if test -s conftest.err; then
1753    grep -v '^ *+' conftest.err >conftest.er1
1754    cat conftest.er1 >&5
1755    mv -f conftest.er1 conftest.err
1756  fi
1757  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1758  test $ac_status = 0; } && {
1759	 test -z "$ac_cxx_werror_flag" ||
1760	 test ! -s conftest.err
1761       } && test -s conftest.$ac_objext; then :
1762  ac_retval=0
1763else
1764  $as_echo "$as_me: failed program was:" >&5
1765sed 's/^/| /' conftest.$ac_ext >&5
1766
1767	ac_retval=1
1768fi
1769  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1770  as_fn_set_status $ac_retval
1771
1772} # ac_fn_cxx_try_compile
1773
1774# ac_fn_c_try_link LINENO
1775# -----------------------
1776# Try to link conftest.$ac_ext, and return whether this succeeded.
1777ac_fn_c_try_link ()
1778{
1779  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1780  rm -f conftest.$ac_objext conftest$ac_exeext
1781  if { { ac_try="$ac_link"
1782case "(($ac_try" in
1783  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1784  *) ac_try_echo=$ac_try;;
1785esac
1786eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1787$as_echo "$ac_try_echo"; } >&5
1788  (eval "$ac_link") 2>conftest.err
1789  ac_status=$?
1790  if test -s conftest.err; then
1791    grep -v '^ *+' conftest.err >conftest.er1
1792    cat conftest.er1 >&5
1793    mv -f conftest.er1 conftest.err
1794  fi
1795  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1796  test $ac_status = 0; } && {
1797	 test -z "$ac_c_werror_flag" ||
1798	 test ! -s conftest.err
1799       } && test -s conftest$ac_exeext && {
1800	 test "$cross_compiling" = yes ||
1801	 test -x conftest$ac_exeext
1802       }; then :
1803  ac_retval=0
1804else
1805  $as_echo "$as_me: failed program was:" >&5
1806sed 's/^/| /' conftest.$ac_ext >&5
1807
1808	ac_retval=1
1809fi
1810  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1811  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1812  # interfere with the next link command; also delete a directory that is
1813  # left behind by Apple's compiler.  We do this before executing the actions.
1814  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1815  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1816  as_fn_set_status $ac_retval
1817
1818} # ac_fn_c_try_link
1819
1820# ac_fn_c_try_cpp LINENO
1821# ----------------------
1822# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1823ac_fn_c_try_cpp ()
1824{
1825  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1826  if { { ac_try="$ac_cpp conftest.$ac_ext"
1827case "(($ac_try" in
1828  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1829  *) ac_try_echo=$ac_try;;
1830esac
1831eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1832$as_echo "$ac_try_echo"; } >&5
1833  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1834  ac_status=$?
1835  if test -s conftest.err; then
1836    grep -v '^ *+' conftest.err >conftest.er1
1837    cat conftest.er1 >&5
1838    mv -f conftest.er1 conftest.err
1839  fi
1840  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1841  test $ac_status = 0; } > conftest.i && {
1842	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1843	 test ! -s conftest.err
1844       }; then :
1845  ac_retval=0
1846else
1847  $as_echo "$as_me: failed program was:" >&5
1848sed 's/^/| /' conftest.$ac_ext >&5
1849
1850    ac_retval=1
1851fi
1852  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1853  as_fn_set_status $ac_retval
1854
1855} # ac_fn_c_try_cpp
1856
1857# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1858# -------------------------------------------------------
1859# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1860# the include files in INCLUDES and setting the cache variable VAR
1861# accordingly.
1862ac_fn_c_check_header_mongrel ()
1863{
1864  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1865  if eval \${$3+:} false; then :
1866  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1867$as_echo_n "checking for $2... " >&6; }
1868if eval \${$3+:} false; then :
1869  $as_echo_n "(cached) " >&6
1870fi
1871eval ac_res=\$$3
1872	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1873$as_echo "$ac_res" >&6; }
1874else
1875  # Is the header compilable?
1876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1877$as_echo_n "checking $2 usability... " >&6; }
1878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1879/* end confdefs.h.  */
1880$4
1881#include <$2>
1882_ACEOF
1883if ac_fn_c_try_compile "$LINENO"; then :
1884  ac_header_compiler=yes
1885else
1886  ac_header_compiler=no
1887fi
1888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1890$as_echo "$ac_header_compiler" >&6; }
1891
1892# Is the header present?
1893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1894$as_echo_n "checking $2 presence... " >&6; }
1895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1896/* end confdefs.h.  */
1897#include <$2>
1898_ACEOF
1899if ac_fn_c_try_cpp "$LINENO"; then :
1900  ac_header_preproc=yes
1901else
1902  ac_header_preproc=no
1903fi
1904rm -f conftest.err conftest.i conftest.$ac_ext
1905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1906$as_echo "$ac_header_preproc" >&6; }
1907
1908# So?  What about this header?
1909case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1910  yes:no: )
1911    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1912$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1913    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1914$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1915    ;;
1916  no:yes:* )
1917    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1918$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1919    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1920$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1921    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1922$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1923    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1924$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1925    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1926$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1927( $as_echo "## ---------------------------------------------- ##
1928## Report this to pgsql-bugs@lists.postgresql.org ##
1929## ---------------------------------------------- ##"
1930     ) | sed "s/^/$as_me: WARNING:     /" >&2
1931    ;;
1932esac
1933  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1934$as_echo_n "checking for $2... " >&6; }
1935if eval \${$3+:} false; then :
1936  $as_echo_n "(cached) " >&6
1937else
1938  eval "$3=\$ac_header_compiler"
1939fi
1940eval ac_res=\$$3
1941	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1942$as_echo "$ac_res" >&6; }
1943fi
1944  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1945
1946} # ac_fn_c_check_header_mongrel
1947
1948# ac_fn_c_try_run LINENO
1949# ----------------------
1950# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1951# that executables *can* be run.
1952ac_fn_c_try_run ()
1953{
1954  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1955  if { { ac_try="$ac_link"
1956case "(($ac_try" in
1957  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1958  *) ac_try_echo=$ac_try;;
1959esac
1960eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1961$as_echo "$ac_try_echo"; } >&5
1962  (eval "$ac_link") 2>&5
1963  ac_status=$?
1964  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1965  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1966  { { case "(($ac_try" in
1967  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1968  *) ac_try_echo=$ac_try;;
1969esac
1970eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1971$as_echo "$ac_try_echo"; } >&5
1972  (eval "$ac_try") 2>&5
1973  ac_status=$?
1974  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1975  test $ac_status = 0; }; }; then :
1976  ac_retval=0
1977else
1978  $as_echo "$as_me: program exited with status $ac_status" >&5
1979       $as_echo "$as_me: failed program was:" >&5
1980sed 's/^/| /' conftest.$ac_ext >&5
1981
1982       ac_retval=$ac_status
1983fi
1984  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1985  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1986  as_fn_set_status $ac_retval
1987
1988} # ac_fn_c_try_run
1989
1990# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1991# -------------------------------------------------------
1992# Tests whether HEADER exists and can be compiled using the include files in
1993# INCLUDES, setting the cache variable VAR accordingly.
1994ac_fn_c_check_header_compile ()
1995{
1996  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1997  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1998$as_echo_n "checking for $2... " >&6; }
1999if eval \${$3+:} false; then :
2000  $as_echo_n "(cached) " >&6
2001else
2002  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2003/* end confdefs.h.  */
2004$4
2005#include <$2>
2006_ACEOF
2007if ac_fn_c_try_compile "$LINENO"; then :
2008  eval "$3=yes"
2009else
2010  eval "$3=no"
2011fi
2012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2013fi
2014eval ac_res=\$$3
2015	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2016$as_echo "$ac_res" >&6; }
2017  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2018
2019} # ac_fn_c_check_header_compile
2020
2021# ac_fn_c_check_func LINENO FUNC VAR
2022# ----------------------------------
2023# Tests whether FUNC exists, setting the cache variable VAR accordingly
2024ac_fn_c_check_func ()
2025{
2026  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2027  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2028$as_echo_n "checking for $2... " >&6; }
2029if eval \${$3+:} false; then :
2030  $as_echo_n "(cached) " >&6
2031else
2032  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2033/* end confdefs.h.  */
2034/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2035   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2036#define $2 innocuous_$2
2037
2038/* System header to define __stub macros and hopefully few prototypes,
2039    which can conflict with char $2 (); below.
2040    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2041    <limits.h> exists even on freestanding compilers.  */
2042
2043#ifdef __STDC__
2044# include <limits.h>
2045#else
2046# include <assert.h>
2047#endif
2048
2049#undef $2
2050
2051/* Override any GCC internal prototype to avoid an error.
2052   Use char because int might match the return type of a GCC
2053   builtin and then its argument prototype would still apply.  */
2054#ifdef __cplusplus
2055extern "C"
2056#endif
2057char $2 ();
2058/* The GNU C library defines this for functions which it implements
2059    to always fail with ENOSYS.  Some functions are actually named
2060    something starting with __ and the normal name is an alias.  */
2061#if defined __stub_$2 || defined __stub___$2
2062choke me
2063#endif
2064
2065int
2066main ()
2067{
2068return $2 ();
2069  ;
2070  return 0;
2071}
2072_ACEOF
2073if ac_fn_c_try_link "$LINENO"; then :
2074  eval "$3=yes"
2075else
2076  eval "$3=no"
2077fi
2078rm -f core conftest.err conftest.$ac_objext \
2079    conftest$ac_exeext conftest.$ac_ext
2080fi
2081eval ac_res=\$$3
2082	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2083$as_echo "$ac_res" >&6; }
2084  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2085
2086} # ac_fn_c_check_func
2087
2088# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2089# -------------------------------------------
2090# Tests whether TYPE exists after having included INCLUDES, setting cache
2091# variable VAR accordingly.
2092ac_fn_c_check_type ()
2093{
2094  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2095  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2096$as_echo_n "checking for $2... " >&6; }
2097if eval \${$3+:} false; then :
2098  $as_echo_n "(cached) " >&6
2099else
2100  eval "$3=no"
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  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2115/* end confdefs.h.  */
2116$4
2117int
2118main ()
2119{
2120if (sizeof (($2)))
2121	    return 0;
2122  ;
2123  return 0;
2124}
2125_ACEOF
2126if ac_fn_c_try_compile "$LINENO"; then :
2127
2128else
2129  eval "$3=yes"
2130fi
2131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2132fi
2133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2134fi
2135eval ac_res=\$$3
2136	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2137$as_echo "$ac_res" >&6; }
2138  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2139
2140} # ac_fn_c_check_type
2141
2142# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2143# ----------------------------------------------------
2144# Tries to find if the field MEMBER exists in type AGGR, after including
2145# INCLUDES, setting cache variable VAR accordingly.
2146ac_fn_c_check_member ()
2147{
2148  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2149  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2150$as_echo_n "checking for $2.$3... " >&6; }
2151if eval \${$4+:} false; then :
2152  $as_echo_n "(cached) " >&6
2153else
2154  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2155/* end confdefs.h.  */
2156$5
2157int
2158main ()
2159{
2160static $2 ac_aggr;
2161if (ac_aggr.$3)
2162return 0;
2163  ;
2164  return 0;
2165}
2166_ACEOF
2167if ac_fn_c_try_compile "$LINENO"; then :
2168  eval "$4=yes"
2169else
2170  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2171/* end confdefs.h.  */
2172$5
2173int
2174main ()
2175{
2176static $2 ac_aggr;
2177if (sizeof ac_aggr.$3)
2178return 0;
2179  ;
2180  return 0;
2181}
2182_ACEOF
2183if ac_fn_c_try_compile "$LINENO"; then :
2184  eval "$4=yes"
2185else
2186  eval "$4=no"
2187fi
2188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2189fi
2190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2191fi
2192eval ac_res=\$$4
2193	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2194$as_echo "$ac_res" >&6; }
2195  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2196
2197} # ac_fn_c_check_member
2198
2199# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2200# --------------------------------------------
2201# Tries to find the compile-time value of EXPR in a program that includes
2202# INCLUDES, setting VAR accordingly. Returns whether the value could be
2203# computed
2204ac_fn_c_compute_int ()
2205{
2206  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2207  if test "$cross_compiling" = yes; then
2208    # Depending upon the size, compute the lo and hi bounds.
2209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2210/* end confdefs.h.  */
2211$4
2212int
2213main ()
2214{
2215static int test_array [1 - 2 * !(($2) >= 0)];
2216test_array [0] = 0;
2217return test_array [0];
2218
2219  ;
2220  return 0;
2221}
2222_ACEOF
2223if ac_fn_c_try_compile "$LINENO"; then :
2224  ac_lo=0 ac_mid=0
2225  while :; do
2226    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2227/* end confdefs.h.  */
2228$4
2229int
2230main ()
2231{
2232static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2233test_array [0] = 0;
2234return test_array [0];
2235
2236  ;
2237  return 0;
2238}
2239_ACEOF
2240if ac_fn_c_try_compile "$LINENO"; then :
2241  ac_hi=$ac_mid; break
2242else
2243  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2244			if test $ac_lo -le $ac_mid; then
2245			  ac_lo= ac_hi=
2246			  break
2247			fi
2248			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2249fi
2250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2251  done
2252else
2253  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2254/* end confdefs.h.  */
2255$4
2256int
2257main ()
2258{
2259static int test_array [1 - 2 * !(($2) < 0)];
2260test_array [0] = 0;
2261return test_array [0];
2262
2263  ;
2264  return 0;
2265}
2266_ACEOF
2267if ac_fn_c_try_compile "$LINENO"; then :
2268  ac_hi=-1 ac_mid=-1
2269  while :; do
2270    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2271/* end confdefs.h.  */
2272$4
2273int
2274main ()
2275{
2276static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2277test_array [0] = 0;
2278return test_array [0];
2279
2280  ;
2281  return 0;
2282}
2283_ACEOF
2284if ac_fn_c_try_compile "$LINENO"; then :
2285  ac_lo=$ac_mid; break
2286else
2287  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2288			if test $ac_mid -le $ac_hi; then
2289			  ac_lo= ac_hi=
2290			  break
2291			fi
2292			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2293fi
2294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2295  done
2296else
2297  ac_lo= ac_hi=
2298fi
2299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2300fi
2301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2302# Binary search between lo and hi bounds.
2303while test "x$ac_lo" != "x$ac_hi"; do
2304  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2305  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2306/* end confdefs.h.  */
2307$4
2308int
2309main ()
2310{
2311static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2312test_array [0] = 0;
2313return test_array [0];
2314
2315  ;
2316  return 0;
2317}
2318_ACEOF
2319if ac_fn_c_try_compile "$LINENO"; then :
2320  ac_hi=$ac_mid
2321else
2322  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2323fi
2324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2325done
2326case $ac_lo in #((
2327?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2328'') ac_retval=1 ;;
2329esac
2330  else
2331    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2332/* end confdefs.h.  */
2333$4
2334static long int longval () { return $2; }
2335static unsigned long int ulongval () { return $2; }
2336#include <stdio.h>
2337#include <stdlib.h>
2338int
2339main ()
2340{
2341
2342  FILE *f = fopen ("conftest.val", "w");
2343  if (! f)
2344    return 1;
2345  if (($2) < 0)
2346    {
2347      long int i = longval ();
2348      if (i != ($2))
2349	return 1;
2350      fprintf (f, "%ld", i);
2351    }
2352  else
2353    {
2354      unsigned long int i = ulongval ();
2355      if (i != ($2))
2356	return 1;
2357      fprintf (f, "%lu", i);
2358    }
2359  /* Do not output a trailing newline, as this causes \r\n confusion
2360     on some platforms.  */
2361  return ferror (f) || fclose (f) != 0;
2362
2363  ;
2364  return 0;
2365}
2366_ACEOF
2367if ac_fn_c_try_run "$LINENO"; then :
2368  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2369else
2370  ac_retval=1
2371fi
2372rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2373  conftest.$ac_objext conftest.beam conftest.$ac_ext
2374rm -f conftest.val
2375
2376  fi
2377  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2378  as_fn_set_status $ac_retval
2379
2380} # ac_fn_c_compute_int
2381
2382# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2383# ---------------------------------------------
2384# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2385# accordingly.
2386ac_fn_c_check_decl ()
2387{
2388  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2389  # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2390      as_decl_name=`echo $2|sed 's/ *(.*//'`
2391  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2392  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2393$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2394if eval \${$3+:} false; then :
2395  $as_echo_n "(cached) " >&6
2396else
2397  ac_save_werror_flag=$ac_c_werror_flag
2398  ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2399  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2400/* end confdefs.h.  */
2401$4
2402int
2403main ()
2404{
2405#ifndef $as_decl_name
2406#ifdef __cplusplus
2407  (void) $as_decl_use;
2408#else
2409  (void) $as_decl_name;
2410#endif
2411#endif
2412
2413  ;
2414  return 0;
2415}
2416_ACEOF
2417if ac_fn_c_try_compile "$LINENO"; then :
2418  eval "$3=yes"
2419else
2420  eval "$3=no"
2421fi
2422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2423  ac_c_werror_flag=$ac_save_werror_flag
2424fi
2425eval ac_res=\$$3
2426	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2427$as_echo "$ac_res" >&6; }
2428  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2429
2430} # ac_fn_c_check_decl
2431cat >config.log <<_ACEOF
2432This file contains any messages produced by compilers while
2433running configure, to aid debugging if configure makes a mistake.
2434
2435It was created by PostgreSQL $as_me 14.1, which was
2436generated by GNU Autoconf 2.69.  Invocation command line was
2437
2438  $ $0 $@
2439
2440_ACEOF
2441exec 5>>config.log
2442{
2443cat <<_ASUNAME
2444## --------- ##
2445## Platform. ##
2446## --------- ##
2447
2448hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2449uname -m = `(uname -m) 2>/dev/null || echo unknown`
2450uname -r = `(uname -r) 2>/dev/null || echo unknown`
2451uname -s = `(uname -s) 2>/dev/null || echo unknown`
2452uname -v = `(uname -v) 2>/dev/null || echo unknown`
2453
2454/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2455/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2456
2457/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2458/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2459/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2460/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2461/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2462/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2463/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2464
2465_ASUNAME
2466
2467as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2468for as_dir in $PATH
2469do
2470  IFS=$as_save_IFS
2471  test -z "$as_dir" && as_dir=.
2472    $as_echo "PATH: $as_dir"
2473  done
2474IFS=$as_save_IFS
2475
2476} >&5
2477
2478cat >&5 <<_ACEOF
2479
2480
2481## ----------- ##
2482## Core tests. ##
2483## ----------- ##
2484
2485_ACEOF
2486
2487
2488# Keep a trace of the command line.
2489# Strip out --no-create and --no-recursion so they do not pile up.
2490# Strip out --silent because we don't want to record it for future runs.
2491# Also quote any args containing shell meta-characters.
2492# Make two passes to allow for proper duplicate-argument suppression.
2493ac_configure_args=
2494ac_configure_args0=
2495ac_configure_args1=
2496ac_must_keep_next=false
2497for ac_pass in 1 2
2498do
2499  for ac_arg
2500  do
2501    case $ac_arg in
2502    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2503    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2504    | -silent | --silent | --silen | --sile | --sil)
2505      continue ;;
2506    *\'*)
2507      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2508    esac
2509    case $ac_pass in
2510    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2511    2)
2512      as_fn_append ac_configure_args1 " '$ac_arg'"
2513      if test $ac_must_keep_next = true; then
2514	ac_must_keep_next=false # Got value, back to normal.
2515      else
2516	case $ac_arg in
2517	  *=* | --config-cache | -C | -disable-* | --disable-* \
2518	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2519	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2520	  | -with-* | --with-* | -without-* | --without-* | --x)
2521	    case "$ac_configure_args0 " in
2522	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2523	    esac
2524	    ;;
2525	  -* ) ac_must_keep_next=true ;;
2526	esac
2527      fi
2528      as_fn_append ac_configure_args " '$ac_arg'"
2529      ;;
2530    esac
2531  done
2532done
2533{ ac_configure_args0=; unset ac_configure_args0;}
2534{ ac_configure_args1=; unset ac_configure_args1;}
2535
2536# When interrupted or exit'd, cleanup temporary files, and complete
2537# config.log.  We remove comments because anyway the quotes in there
2538# would cause problems or look ugly.
2539# WARNING: Use '\'' to represent an apostrophe within the trap.
2540# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2541trap 'exit_status=$?
2542  # Save into config.log some information that might help in debugging.
2543  {
2544    echo
2545
2546    $as_echo "## ---------------- ##
2547## Cache variables. ##
2548## ---------------- ##"
2549    echo
2550    # The following way of writing the cache mishandles newlines in values,
2551(
2552  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2553    eval ac_val=\$$ac_var
2554    case $ac_val in #(
2555    *${as_nl}*)
2556      case $ac_var in #(
2557      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2558$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2559      esac
2560      case $ac_var in #(
2561      _ | IFS | as_nl) ;; #(
2562      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2563      *) { eval $ac_var=; unset $ac_var;} ;;
2564      esac ;;
2565    esac
2566  done
2567  (set) 2>&1 |
2568    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2569    *${as_nl}ac_space=\ *)
2570      sed -n \
2571	"s/'\''/'\''\\\\'\'''\''/g;
2572	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2573      ;; #(
2574    *)
2575      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2576      ;;
2577    esac |
2578    sort
2579)
2580    echo
2581
2582    $as_echo "## ----------------- ##
2583## Output variables. ##
2584## ----------------- ##"
2585    echo
2586    for ac_var in $ac_subst_vars
2587    do
2588      eval ac_val=\$$ac_var
2589      case $ac_val in
2590      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2591      esac
2592      $as_echo "$ac_var='\''$ac_val'\''"
2593    done | sort
2594    echo
2595
2596    if test -n "$ac_subst_files"; then
2597      $as_echo "## ------------------- ##
2598## File substitutions. ##
2599## ------------------- ##"
2600      echo
2601      for ac_var in $ac_subst_files
2602      do
2603	eval ac_val=\$$ac_var
2604	case $ac_val in
2605	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2606	esac
2607	$as_echo "$ac_var='\''$ac_val'\''"
2608      done | sort
2609      echo
2610    fi
2611
2612    if test -s confdefs.h; then
2613      $as_echo "## ----------- ##
2614## confdefs.h. ##
2615## ----------- ##"
2616      echo
2617      cat confdefs.h
2618      echo
2619    fi
2620    test "$ac_signal" != 0 &&
2621      $as_echo "$as_me: caught signal $ac_signal"
2622    $as_echo "$as_me: exit $exit_status"
2623  } >&5
2624  rm -f core *.core core.conftest.* &&
2625    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2626    exit $exit_status
2627' 0
2628for ac_signal in 1 2 13 15; do
2629  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2630done
2631ac_signal=0
2632
2633# confdefs.h avoids OS command line length limits that DEFS can exceed.
2634rm -f -r conftest* confdefs.h
2635
2636$as_echo "/* confdefs.h */" > confdefs.h
2637
2638# Predefined preprocessor variables.
2639
2640cat >>confdefs.h <<_ACEOF
2641#define PACKAGE_NAME "$PACKAGE_NAME"
2642_ACEOF
2643
2644cat >>confdefs.h <<_ACEOF
2645#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2646_ACEOF
2647
2648cat >>confdefs.h <<_ACEOF
2649#define PACKAGE_VERSION "$PACKAGE_VERSION"
2650_ACEOF
2651
2652cat >>confdefs.h <<_ACEOF
2653#define PACKAGE_STRING "$PACKAGE_STRING"
2654_ACEOF
2655
2656cat >>confdefs.h <<_ACEOF
2657#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2658_ACEOF
2659
2660cat >>confdefs.h <<_ACEOF
2661#define PACKAGE_URL "$PACKAGE_URL"
2662_ACEOF
2663
2664
2665# Let the site file select an alternate cache file if it wants to.
2666# Prefer an explicitly selected file to automatically selected ones.
2667ac_site_file1=NONE
2668ac_site_file2=NONE
2669if test -n "$CONFIG_SITE"; then
2670  # We do not want a PATH search for config.site.
2671  case $CONFIG_SITE in #((
2672    -*)  ac_site_file1=./$CONFIG_SITE;;
2673    */*) ac_site_file1=$CONFIG_SITE;;
2674    *)   ac_site_file1=./$CONFIG_SITE;;
2675  esac
2676elif test "x$prefix" != xNONE; then
2677  ac_site_file1=$prefix/share/config.site
2678  ac_site_file2=$prefix/etc/config.site
2679else
2680  ac_site_file1=$ac_default_prefix/share/config.site
2681  ac_site_file2=$ac_default_prefix/etc/config.site
2682fi
2683for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2684do
2685  test "x$ac_site_file" = xNONE && continue
2686  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2687    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2688$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2689    sed 's/^/| /' "$ac_site_file" >&5
2690    . "$ac_site_file" \
2691      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2692$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2693as_fn_error $? "failed to load site script $ac_site_file
2694See \`config.log' for more details" "$LINENO" 5; }
2695  fi
2696done
2697
2698if test -r "$cache_file"; then
2699  # Some versions of bash will fail to source /dev/null (special files
2700  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2701  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2702    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2703$as_echo "$as_me: loading cache $cache_file" >&6;}
2704    case $cache_file in
2705      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2706      *)                      . "./$cache_file";;
2707    esac
2708  fi
2709else
2710  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2711$as_echo "$as_me: creating cache $cache_file" >&6;}
2712  >$cache_file
2713fi
2714
2715# Check that the precious variables saved in the cache have kept the same
2716# value.
2717ac_cache_corrupted=false
2718for ac_var in $ac_precious_vars; do
2719  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2720  eval ac_new_set=\$ac_env_${ac_var}_set
2721  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2722  eval ac_new_val=\$ac_env_${ac_var}_value
2723  case $ac_old_set,$ac_new_set in
2724    set,)
2725      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2726$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2727      ac_cache_corrupted=: ;;
2728    ,set)
2729      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2730$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2731      ac_cache_corrupted=: ;;
2732    ,);;
2733    *)
2734      if test "x$ac_old_val" != "x$ac_new_val"; then
2735	# differences in whitespace do not lead to failure.
2736	ac_old_val_w=`echo x $ac_old_val`
2737	ac_new_val_w=`echo x $ac_new_val`
2738	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2739	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2740$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2741	  ac_cache_corrupted=:
2742	else
2743	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2744$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2745	  eval $ac_var=\$ac_old_val
2746	fi
2747	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2748$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2749	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2750$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2751      fi;;
2752  esac
2753  # Pass precious variables to config.status.
2754  if test "$ac_new_set" = set; then
2755    case $ac_new_val in
2756    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2757    *) ac_arg=$ac_var=$ac_new_val ;;
2758    esac
2759    case " $ac_configure_args " in
2760      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2761      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2762    esac
2763  fi
2764done
2765if $ac_cache_corrupted; then
2766  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2767$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2768  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2769$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2770  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2771fi
2772## -------------------- ##
2773## Main body of script. ##
2774## -------------------- ##
2775
2776ac_ext=c
2777ac_cpp='$CPP $CPPFLAGS'
2778ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2779ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2780ac_compiler_gnu=$ac_cv_c_compiler_gnu
2781
2782
2783
2784
2785
2786
2787ac_aux_dir=
2788for ac_dir in config "$srcdir"/config; do
2789  if test -f "$ac_dir/install-sh"; then
2790    ac_aux_dir=$ac_dir
2791    ac_install_sh="$ac_aux_dir/install-sh -c"
2792    break
2793  elif test -f "$ac_dir/install.sh"; then
2794    ac_aux_dir=$ac_dir
2795    ac_install_sh="$ac_aux_dir/install.sh -c"
2796    break
2797  elif test -f "$ac_dir/shtool"; then
2798    ac_aux_dir=$ac_dir
2799    ac_install_sh="$ac_aux_dir/shtool install -c"
2800    break
2801  fi
2802done
2803if test -z "$ac_aux_dir"; then
2804  as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2805fi
2806
2807# These three variables are undocumented and unsupported,
2808# and are intended to be withdrawn in a future Autoconf release.
2809# They can cause serious problems if a builder's source tree is in a directory
2810# whose full name contains unusual characters.
2811ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2812ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2813ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2814
2815
2816
2817
2818cat >>confdefs.h <<_ACEOF
2819#define CONFIGURE_ARGS "$ac_configure_args"
2820_ACEOF
2821
2822
2823PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2824PG_MINORVERSION=`expr "$PACKAGE_VERSION" : '.*\.\([0-9][0-9]*\)'`
2825test -n "$PG_MINORVERSION" || PG_MINORVERSION=0
2826
2827
2828cat >>confdefs.h <<_ACEOF
2829#define PG_MAJORVERSION "$PG_MAJORVERSION"
2830_ACEOF
2831
2832
2833cat >>confdefs.h <<_ACEOF
2834#define PG_MAJORVERSION_NUM $PG_MAJORVERSION
2835_ACEOF
2836
2837
2838cat >>confdefs.h <<_ACEOF
2839#define PG_MINORVERSION_NUM $PG_MINORVERSION
2840_ACEOF
2841
2842
2843
2844
2845
2846# Check whether --with-extra-version was given.
2847if test "${with_extra_version+set}" = set; then :
2848  withval=$with_extra_version;
2849  case $withval in
2850    yes)
2851      as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2852      ;;
2853    no)
2854      as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2855      ;;
2856    *)
2857      PG_VERSION="$PACKAGE_VERSION$withval"
2858      ;;
2859  esac
2860
2861else
2862  PG_VERSION="$PACKAGE_VERSION"
2863fi
2864
2865
2866
2867cat >>confdefs.h <<_ACEOF
2868#define PG_VERSION "$PG_VERSION"
2869_ACEOF
2870
2871
2872# Make sure we can run config.sub.
2873$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2874  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2875
2876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2877$as_echo_n "checking build system type... " >&6; }
2878if ${ac_cv_build+:} false; then :
2879  $as_echo_n "(cached) " >&6
2880else
2881  ac_build_alias=$build_alias
2882test "x$ac_build_alias" = x &&
2883  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2884test "x$ac_build_alias" = x &&
2885  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2886ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2887  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2888
2889fi
2890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2891$as_echo "$ac_cv_build" >&6; }
2892case $ac_cv_build in
2893*-*-*) ;;
2894*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2895esac
2896build=$ac_cv_build
2897ac_save_IFS=$IFS; IFS='-'
2898set x $ac_cv_build
2899shift
2900build_cpu=$1
2901build_vendor=$2
2902shift; shift
2903# Remember, the first character of IFS is used to create $*,
2904# except with old shells:
2905build_os=$*
2906IFS=$ac_save_IFS
2907case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2908
2909
2910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2911$as_echo_n "checking host system type... " >&6; }
2912if ${ac_cv_host+:} false; then :
2913  $as_echo_n "(cached) " >&6
2914else
2915  if test "x$host_alias" = x; then
2916  ac_cv_host=$ac_cv_build
2917else
2918  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2919    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2920fi
2921
2922fi
2923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2924$as_echo "$ac_cv_host" >&6; }
2925case $ac_cv_host in
2926*-*-*) ;;
2927*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2928esac
2929host=$ac_cv_host
2930ac_save_IFS=$IFS; IFS='-'
2931set x $ac_cv_host
2932shift
2933host_cpu=$1
2934host_vendor=$2
2935shift; shift
2936# Remember, the first character of IFS is used to create $*,
2937# except with old shells:
2938host_os=$*
2939IFS=$ac_save_IFS
2940case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2941
2942
2943
2944template=
2945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2946$as_echo_n "checking which template to use... " >&6; }
2947
2948
2949
2950
2951# Check whether --with-template was given.
2952if test "${with_template+set}" = set; then :
2953  withval=$with_template;
2954  case $withval in
2955    yes)
2956      as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2957      ;;
2958    no)
2959      as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2960      ;;
2961    *)
2962
2963  case $withval in
2964    list)   echo; ls "$srcdir/src/template"; exit;;
2965    *)      if test -f "$srcdir/src/template/$with_template" ; then
2966              template=$withval
2967            else
2968              as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2969            fi;;
2970  esac
2971
2972      ;;
2973  esac
2974
2975else
2976
2977# --with-template not given
2978
2979case $host_os in
2980     aix*) template=aix ;;
2981  cygwin*|msys*) template=cygwin ;;
2982  darwin*) template=darwin ;;
2983dragonfly*) template=netbsd ;;
2984 freebsd*) template=freebsd ;;
2985    hpux*) template=hpux ;;
2986 linux*|gnu*|k*bsd*-gnu)
2987           template=linux ;;
2988   mingw*) template=win32 ;;
2989  netbsd*) template=netbsd ;;
2990 openbsd*) template=openbsd ;;
2991 solaris*) template=solaris ;;
2992esac
2993
2994  if test x"$template" = x"" ; then
2995    as_fn_error $? "
2996*******************************************************************
2997PostgreSQL has apparently not been ported to your platform yet.
2998To try a manual configuration, look into the src/template directory
2999for a similar platform and use the '--with-template=' option.
3000
3001Please also contact <pgsql-bugs@lists.postgresql.org> to see about
3002rectifying this.  Include the above 'checking host system type...'
3003line.
3004*******************************************************************
3005" "$LINENO" 5
3006  fi
3007
3008
3009fi
3010
3011
3012
3013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
3014$as_echo "$template" >&6; }
3015
3016PORTNAME=$template
3017
3018
3019# Initialize default assumption that we do not need separate assembly code
3020# for TAS (test-and-set).  This can be overridden by the template file
3021# when it's executed.
3022need_tas=no
3023tas_file=dummy.s
3024
3025
3026
3027##
3028## Command line options
3029##
3030
3031#
3032# Add non-standard directories to the include path
3033#
3034
3035
3036
3037# Check whether --with-includes was given.
3038if test "${with_includes+set}" = set; then :
3039  withval=$with_includes;
3040  case $withval in
3041    yes)
3042      as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3043      ;;
3044    no)
3045      as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3046      ;;
3047    *)
3048
3049      ;;
3050  esac
3051
3052fi
3053
3054
3055
3056
3057#
3058# Add non-standard directories to the library search path
3059#
3060
3061
3062
3063# Check whether --with-libraries was given.
3064if test "${with_libraries+set}" = set; then :
3065  withval=$with_libraries;
3066  case $withval in
3067    yes)
3068      as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3069      ;;
3070    no)
3071      as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3072      ;;
3073    *)
3074      LIBRARY_DIRS=$withval
3075      ;;
3076  esac
3077
3078fi
3079
3080
3081
3082
3083
3084
3085# Check whether --with-libs was given.
3086if test "${with_libs+set}" = set; then :
3087  withval=$with_libs;
3088  case $withval in
3089    yes)
3090      as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3091      ;;
3092    no)
3093      as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3094      ;;
3095    *)
3096      LIBRARY_DIRS=$withval
3097      ;;
3098  esac
3099
3100fi
3101
3102
3103
3104
3105#
3106# 64-bit integer date/time storage is now the only option, but to avoid
3107# unnecessary breakage of build scripts, continue to accept an explicit
3108# "--enable-integer-datetimes" switch.
3109#
3110
3111
3112# Check whether --enable-integer-datetimes was given.
3113if test "${enable_integer_datetimes+set}" = set; then :
3114  enableval=$enable_integer_datetimes;
3115  case $enableval in
3116    yes)
3117      :
3118      ;;
3119    no)
3120      as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3121      ;;
3122    *)
3123      as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3124      ;;
3125  esac
3126
3127else
3128  enable_integer_datetimes=yes
3129
3130fi
3131
3132
3133
3134
3135#
3136# NLS
3137#
3138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3139$as_echo_n "checking whether NLS is wanted... " >&6; }
3140
3141
3142# Check whether --enable-nls was given.
3143if test "${enable_nls+set}" = set; then :
3144  enableval=$enable_nls;
3145  case $enableval in
3146    yes)
3147      :
3148      ;;
3149    no)
3150      :
3151      ;;
3152    *)
3153      enable_nls=yes
3154WANTED_LANGUAGES=$enableval
3155      ;;
3156  esac
3157
3158else
3159  enable_nls=no
3160fi
3161
3162
3163
3164if test "$enable_nls" = yes; then
3165
3166$as_echo "#define ENABLE_NLS 1" >>confdefs.h
3167
3168fi
3169
3170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3171$as_echo "$enable_nls" >&6; }
3172
3173
3174
3175#
3176# Default port number (--with-pgport), default 5432
3177#
3178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3179$as_echo_n "checking for default port number... " >&6; }
3180
3181
3182
3183# Check whether --with-pgport was given.
3184if test "${with_pgport+set}" = set; then :
3185  withval=$with_pgport;
3186  case $withval in
3187    yes)
3188      as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3189      ;;
3190    no)
3191      as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3192      ;;
3193    *)
3194      default_port=$withval
3195      ;;
3196  esac
3197
3198else
3199  default_port=5432
3200fi
3201
3202
3203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3204$as_echo "$default_port" >&6; }
3205# Need both of these because some places want an integer and some a string
3206
3207cat >>confdefs.h <<_ACEOF
3208#define DEF_PGPORT ${default_port}
3209_ACEOF
3210
3211
3212cat >>confdefs.h <<_ACEOF
3213#define DEF_PGPORT_STR "${default_port}"
3214_ACEOF
3215
3216
3217
3218# It's worth validating port; you can get very confusing errors otherwise
3219if test x"$default_port" = x""; then
3220  as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3221elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3222  as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3223elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3224  as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3225elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3226  as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3227fi
3228
3229#
3230# '-rpath'-like feature can be disabled
3231#
3232
3233
3234# Check whether --enable-rpath was given.
3235if test "${enable_rpath+set}" = set; then :
3236  enableval=$enable_rpath;
3237  case $enableval in
3238    yes)
3239      :
3240      ;;
3241    no)
3242      :
3243      ;;
3244    *)
3245      as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3246      ;;
3247  esac
3248
3249else
3250  enable_rpath=yes
3251
3252fi
3253
3254
3255
3256
3257#
3258# Spinlocks
3259#
3260
3261
3262# Check whether --enable-spinlocks was given.
3263if test "${enable_spinlocks+set}" = set; then :
3264  enableval=$enable_spinlocks;
3265  case $enableval in
3266    yes)
3267      :
3268      ;;
3269    no)
3270      :
3271      ;;
3272    *)
3273      as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3274      ;;
3275  esac
3276
3277else
3278  enable_spinlocks=yes
3279
3280fi
3281
3282
3283
3284#
3285# Atomic operations
3286#
3287
3288
3289# Check whether --enable-atomics was given.
3290if test "${enable_atomics+set}" = set; then :
3291  enableval=$enable_atomics;
3292  case $enableval in
3293    yes)
3294      :
3295      ;;
3296    no)
3297      :
3298      ;;
3299    *)
3300      as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3301      ;;
3302  esac
3303
3304else
3305  enable_atomics=yes
3306
3307fi
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
4442   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4443$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4444if ${ac_cv_prog_cc_c99+:} false; then :
4445  $as_echo_n "(cached) " >&6
4446else
4447  ac_cv_prog_cc_c99=no
4448ac_save_CC=$CC
4449cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4450/* end confdefs.h.  */
4451#include <stdarg.h>
4452#include <stdbool.h>
4453#include <stdlib.h>
4454#include <wchar.h>
4455#include <stdio.h>
4456
4457// Check varargs macros.  These examples are taken from C99 6.10.3.5.
4458#define debug(...) fprintf (stderr, __VA_ARGS__)
4459#define showlist(...) puts (#__VA_ARGS__)
4460#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4461static void
4462test_varargs_macros (void)
4463{
4464  int x = 1234;
4465  int y = 5678;
4466  debug ("Flag");
4467  debug ("X = %d\n", x);
4468  showlist (The first, second, and third items.);
4469  report (x>y, "x is %d but y is %d", x, y);
4470}
4471
4472// Check long long types.
4473#define BIG64 18446744073709551615ull
4474#define BIG32 4294967295ul
4475#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4476#if !BIG_OK
4477  your preprocessor is broken;
4478#endif
4479#if BIG_OK
4480#else
4481  your preprocessor is broken;
4482#endif
4483static long long int bignum = -9223372036854775807LL;
4484static unsigned long long int ubignum = BIG64;
4485
4486struct incomplete_array
4487{
4488  int datasize;
4489  double data[];
4490};
4491
4492struct named_init {
4493  int number;
4494  const wchar_t *name;
4495  double average;
4496};
4497
4498typedef const char *ccp;
4499
4500static inline int
4501test_restrict (ccp restrict text)
4502{
4503  // See if C++-style comments work.
4504  // Iterate through items via the restricted pointer.
4505  // Also check for declarations in for loops.
4506  for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4507    continue;
4508  return 0;
4509}
4510
4511// Check varargs and va_copy.
4512static void
4513test_varargs (const char *format, ...)
4514{
4515  va_list args;
4516  va_start (args, format);
4517  va_list args_copy;
4518  va_copy (args_copy, args);
4519
4520  const char *str;
4521  int number;
4522  float fnumber;
4523
4524  while (*format)
4525    {
4526      switch (*format++)
4527	{
4528	case 's': // string
4529	  str = va_arg (args_copy, const char *);
4530	  break;
4531	case 'd': // int
4532	  number = va_arg (args_copy, int);
4533	  break;
4534	case 'f': // float
4535	  fnumber = va_arg (args_copy, double);
4536	  break;
4537	default:
4538	  break;
4539	}
4540    }
4541  va_end (args_copy);
4542  va_end (args);
4543}
4544
4545int
4546main ()
4547{
4548
4549  // Check bool.
4550  _Bool success = false;
4551
4552  // Check restrict.
4553  if (test_restrict ("String literal") == 0)
4554    success = true;
4555  char *restrict newvar = "Another string";
4556
4557  // Check varargs.
4558  test_varargs ("s, d' f .", "string", 65, 34.234);
4559  test_varargs_macros ();
4560
4561  // Check flexible array members.
4562  struct incomplete_array *ia =
4563    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4564  ia->datasize = 10;
4565  for (int i = 0; i < ia->datasize; ++i)
4566    ia->data[i] = i * 1.234;
4567
4568  // Check named initializers.
4569  struct named_init ni = {
4570    .number = 34,
4571    .name = L"Test wide string",
4572    .average = 543.34343,
4573  };
4574
4575  ni.number = 58;
4576
4577  int dynamic_array[ni.number];
4578  dynamic_array[ni.number - 1] = 543;
4579
4580  // work around unused variable warnings
4581  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4582	  || dynamic_array[ni.number - 1] != 543);
4583
4584  ;
4585  return 0;
4586}
4587_ACEOF
4588for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4589do
4590  CC="$ac_save_CC $ac_arg"
4591  if ac_fn_c_try_compile "$LINENO"; then :
4592  ac_cv_prog_cc_c99=$ac_arg
4593fi
4594rm -f core conftest.err conftest.$ac_objext
4595  test "x$ac_cv_prog_cc_c99" != "xno" && break
4596done
4597rm -f conftest.$ac_ext
4598CC=$ac_save_CC
4599
4600fi
4601# AC_CACHE_VAL
4602case "x$ac_cv_prog_cc_c99" in
4603  x)
4604    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4605$as_echo "none needed" >&6; } ;;
4606  xno)
4607    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4608$as_echo "unsupported" >&6; } ;;
4609  *)
4610    CC="$CC $ac_cv_prog_cc_c99"
4611    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4612$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4613esac
4614if test "x$ac_cv_prog_cc_c99" != xno; then :
4615
4616fi
4617
4618
4619
4620# Error out if the compiler does not support C99, as the codebase
4621# relies on that.
4622if test "$ac_cv_prog_cc_c99" = no; then
4623    as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4624fi
4625
4626ac_ext=cpp
4627ac_cpp='$CXXCPP $CPPFLAGS'
4628ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4629ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4630ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4631if test -z "$CXX"; then
4632  if test -n "$CCC"; then
4633    CXX=$CCC
4634  else
4635    if test -n "$ac_tool_prefix"; then
4636  for ac_prog in $pgac_cxx_list
4637  do
4638    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4639set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4641$as_echo_n "checking for $ac_word... " >&6; }
4642if ${ac_cv_prog_CXX+:} false; then :
4643  $as_echo_n "(cached) " >&6
4644else
4645  if test -n "$CXX"; then
4646  ac_cv_prog_CXX="$CXX" # Let the user override the test.
4647else
4648as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4649for as_dir in $PATH
4650do
4651  IFS=$as_save_IFS
4652  test -z "$as_dir" && as_dir=.
4653    for ac_exec_ext in '' $ac_executable_extensions; do
4654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4655    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4657    break 2
4658  fi
4659done
4660  done
4661IFS=$as_save_IFS
4662
4663fi
4664fi
4665CXX=$ac_cv_prog_CXX
4666if test -n "$CXX"; then
4667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4668$as_echo "$CXX" >&6; }
4669else
4670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4671$as_echo "no" >&6; }
4672fi
4673
4674
4675    test -n "$CXX" && break
4676  done
4677fi
4678if test -z "$CXX"; then
4679  ac_ct_CXX=$CXX
4680  for ac_prog in $pgac_cxx_list
4681do
4682  # Extract the first word of "$ac_prog", so it can be a program name with args.
4683set dummy $ac_prog; ac_word=$2
4684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4685$as_echo_n "checking for $ac_word... " >&6; }
4686if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4687  $as_echo_n "(cached) " >&6
4688else
4689  if test -n "$ac_ct_CXX"; then
4690  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4691else
4692as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4693for as_dir in $PATH
4694do
4695  IFS=$as_save_IFS
4696  test -z "$as_dir" && as_dir=.
4697    for ac_exec_ext in '' $ac_executable_extensions; do
4698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4699    ac_cv_prog_ac_ct_CXX="$ac_prog"
4700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4701    break 2
4702  fi
4703done
4704  done
4705IFS=$as_save_IFS
4706
4707fi
4708fi
4709ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4710if test -n "$ac_ct_CXX"; then
4711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4712$as_echo "$ac_ct_CXX" >&6; }
4713else
4714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4715$as_echo "no" >&6; }
4716fi
4717
4718
4719  test -n "$ac_ct_CXX" && break
4720done
4721
4722  if test "x$ac_ct_CXX" = x; then
4723    CXX="g++"
4724  else
4725    case $cross_compiling:$ac_tool_warned in
4726yes:)
4727{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4728$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4729ac_tool_warned=yes ;;
4730esac
4731    CXX=$ac_ct_CXX
4732  fi
4733fi
4734
4735  fi
4736fi
4737# Provide some information about the compiler.
4738$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4739set X $ac_compile
4740ac_compiler=$2
4741for ac_option in --version -v -V -qversion; do
4742  { { ac_try="$ac_compiler $ac_option >&5"
4743case "(($ac_try" in
4744  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4745  *) ac_try_echo=$ac_try;;
4746esac
4747eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4748$as_echo "$ac_try_echo"; } >&5
4749  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4750  ac_status=$?
4751  if test -s conftest.err; then
4752    sed '10a\
4753... rest of stderr output deleted ...
4754         10q' conftest.err >conftest.er1
4755    cat conftest.er1 >&5
4756  fi
4757  rm -f conftest.er1 conftest.err
4758  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4759  test $ac_status = 0; }
4760done
4761
4762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4763$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4764if ${ac_cv_cxx_compiler_gnu+:} false; then :
4765  $as_echo_n "(cached) " >&6
4766else
4767  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4768/* end confdefs.h.  */
4769
4770int
4771main ()
4772{
4773#ifndef __GNUC__
4774       choke me
4775#endif
4776
4777  ;
4778  return 0;
4779}
4780_ACEOF
4781if ac_fn_cxx_try_compile "$LINENO"; then :
4782  ac_compiler_gnu=yes
4783else
4784  ac_compiler_gnu=no
4785fi
4786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4787ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4788
4789fi
4790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4791$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4792if test $ac_compiler_gnu = yes; then
4793  GXX=yes
4794else
4795  GXX=
4796fi
4797ac_test_CXXFLAGS=${CXXFLAGS+set}
4798ac_save_CXXFLAGS=$CXXFLAGS
4799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4800$as_echo_n "checking whether $CXX accepts -g... " >&6; }
4801if ${ac_cv_prog_cxx_g+:} false; then :
4802  $as_echo_n "(cached) " >&6
4803else
4804  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4805   ac_cxx_werror_flag=yes
4806   ac_cv_prog_cxx_g=no
4807   CXXFLAGS="-g"
4808   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4809/* end confdefs.h.  */
4810
4811int
4812main ()
4813{
4814
4815  ;
4816  return 0;
4817}
4818_ACEOF
4819if ac_fn_cxx_try_compile "$LINENO"; then :
4820  ac_cv_prog_cxx_g=yes
4821else
4822  CXXFLAGS=""
4823      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4824/* end confdefs.h.  */
4825
4826int
4827main ()
4828{
4829
4830  ;
4831  return 0;
4832}
4833_ACEOF
4834if ac_fn_cxx_try_compile "$LINENO"; then :
4835
4836else
4837  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4838	 CXXFLAGS="-g"
4839	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4840/* end confdefs.h.  */
4841
4842int
4843main ()
4844{
4845
4846  ;
4847  return 0;
4848}
4849_ACEOF
4850if ac_fn_cxx_try_compile "$LINENO"; then :
4851  ac_cv_prog_cxx_g=yes
4852fi
4853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4854fi
4855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4856fi
4857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4858   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4859fi
4860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4861$as_echo "$ac_cv_prog_cxx_g" >&6; }
4862if test "$ac_test_CXXFLAGS" = set; then
4863  CXXFLAGS=$ac_save_CXXFLAGS
4864elif test $ac_cv_prog_cxx_g = yes; then
4865  if test "$GXX" = yes; then
4866    CXXFLAGS="-g -O2"
4867  else
4868    CXXFLAGS="-g"
4869  fi
4870else
4871  if test "$GXX" = yes; then
4872    CXXFLAGS="-O2"
4873  else
4874    CXXFLAGS=
4875  fi
4876fi
4877ac_ext=c
4878ac_cpp='$CPP $CPPFLAGS'
4879ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4880ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4881ac_compiler_gnu=$ac_cv_c_compiler_gnu
4882
4883
4884# Check if it's Intel's compiler, which (usually) pretends to be gcc,
4885# but has idiosyncrasies of its own.  We assume icc will define
4886# __INTEL_COMPILER regardless of CFLAGS.
4887
4888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4889/* end confdefs.h.  */
4890
4891int
4892main ()
4893{
4894#ifndef __INTEL_COMPILER
4895choke me
4896#endif
4897  ;
4898  return 0;
4899}
4900_ACEOF
4901if ac_fn_c_try_compile "$LINENO"; then :
4902  ICC=yes
4903else
4904  ICC=no
4905fi
4906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4907
4908# Check if it's Sun Studio compiler. We assume that
4909# __SUNPRO_C will be defined for Sun Studio compilers
4910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4911/* end confdefs.h.  */
4912
4913int
4914main ()
4915{
4916#ifndef __SUNPRO_C
4917choke me
4918#endif
4919  ;
4920  return 0;
4921}
4922_ACEOF
4923if ac_fn_c_try_compile "$LINENO"; then :
4924  SUN_STUDIO_CC=yes
4925else
4926  SUN_STUDIO_CC=no
4927fi
4928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4929
4930
4931
4932
4933#
4934# LLVM
4935#
4936# Checked early because subsequent tests depend on it.
4937
4938
4939
4940# Check whether --with-llvm was given.
4941if test "${with_llvm+set}" = set; then :
4942  withval=$with_llvm;
4943  case $withval in
4944    yes)
4945
4946$as_echo "#define USE_LLVM 1" >>confdefs.h
4947
4948      ;;
4949    no)
4950      :
4951      ;;
4952    *)
4953      as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4954      ;;
4955  esac
4956
4957else
4958  with_llvm=no
4959
4960fi
4961
4962
4963
4964for ac_prog in gawk mawk nawk awk
4965do
4966  # Extract the first word of "$ac_prog", so it can be a program name with args.
4967set dummy $ac_prog; ac_word=$2
4968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4969$as_echo_n "checking for $ac_word... " >&6; }
4970if ${ac_cv_prog_AWK+:} false; then :
4971  $as_echo_n "(cached) " >&6
4972else
4973  if test -n "$AWK"; then
4974  ac_cv_prog_AWK="$AWK" # Let the user override the test.
4975else
4976as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4977for as_dir in $PATH
4978do
4979  IFS=$as_save_IFS
4980  test -z "$as_dir" && as_dir=.
4981    for ac_exec_ext in '' $ac_executable_extensions; do
4982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4983    ac_cv_prog_AWK="$ac_prog"
4984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4985    break 2
4986  fi
4987done
4988  done
4989IFS=$as_save_IFS
4990
4991fi
4992fi
4993AWK=$ac_cv_prog_AWK
4994if test -n "$AWK"; then
4995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4996$as_echo "$AWK" >&6; }
4997else
4998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4999$as_echo "no" >&6; }
5000fi
5001
5002
5003  test -n "$AWK" && break
5004done
5005
5006if test "$with_llvm" = yes; then :
5007
5008
5009
5010
5011
5012  if test -z "$LLVM_CONFIG"; then
5013  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
5014do
5015  # Extract the first word of "$ac_prog", so it can be a program name with args.
5016set dummy $ac_prog; ac_word=$2
5017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5018$as_echo_n "checking for $ac_word... " >&6; }
5019if ${ac_cv_path_LLVM_CONFIG+:} false; then :
5020  $as_echo_n "(cached) " >&6
5021else
5022  case $LLVM_CONFIG in
5023  [\\/]* | ?:[\\/]*)
5024  ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
5025  ;;
5026  *)
5027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5028for as_dir in $PATH
5029do
5030  IFS=$as_save_IFS
5031  test -z "$as_dir" && as_dir=.
5032    for ac_exec_ext in '' $ac_executable_extensions; do
5033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5034    ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5036    break 2
5037  fi
5038done
5039  done
5040IFS=$as_save_IFS
5041
5042  ;;
5043esac
5044fi
5045LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5046if test -n "$LLVM_CONFIG"; then
5047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5048$as_echo "$LLVM_CONFIG" >&6; }
5049else
5050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5051$as_echo "no" >&6; }
5052fi
5053
5054
5055  test -n "$LLVM_CONFIG" && break
5056done
5057
5058else
5059  # Report the value of LLVM_CONFIG in configure's output in all cases.
5060  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5061$as_echo_n "checking for LLVM_CONFIG... " >&6; }
5062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5063$as_echo "$LLVM_CONFIG" >&6; }
5064fi
5065
5066
5067  # no point continuing if llvm wasn't found
5068  if test -z "$LLVM_CONFIG"; then
5069    as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5070  fi
5071  # check if detected $LLVM_CONFIG is executable
5072  pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5073  if test "x$pgac_llvm_version" = "xno"; then
5074    as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5075  fi
5076  # and whether the version is supported
5077  if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 4 || ($1 == 3 && $2 >= 9)) exit 1; else exit 0;}';then
5078    as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 3.9 is required" "$LINENO" 5
5079  fi
5080
5081  # need clang to create some bitcode files
5082
5083  if test -z "$CLANG"; then
5084  for ac_prog in clang clang-7 clang-6.0 clang-5.0 clang-4.0 clang-3.9
5085do
5086  # Extract the first word of "$ac_prog", so it can be a program name with args.
5087set dummy $ac_prog; ac_word=$2
5088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5089$as_echo_n "checking for $ac_word... " >&6; }
5090if ${ac_cv_path_CLANG+:} false; then :
5091  $as_echo_n "(cached) " >&6
5092else
5093  case $CLANG in
5094  [\\/]* | ?:[\\/]*)
5095  ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5096  ;;
5097  *)
5098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5099for as_dir in $PATH
5100do
5101  IFS=$as_save_IFS
5102  test -z "$as_dir" && as_dir=.
5103    for ac_exec_ext in '' $ac_executable_extensions; do
5104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5105    ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5107    break 2
5108  fi
5109done
5110  done
5111IFS=$as_save_IFS
5112
5113  ;;
5114esac
5115fi
5116CLANG=$ac_cv_path_CLANG
5117if test -n "$CLANG"; then
5118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5119$as_echo "$CLANG" >&6; }
5120else
5121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5122$as_echo "no" >&6; }
5123fi
5124
5125
5126  test -n "$CLANG" && break
5127done
5128
5129else
5130  # Report the value of CLANG in configure's output in all cases.
5131  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5132$as_echo_n "checking for CLANG... " >&6; }
5133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5134$as_echo "$CLANG" >&6; }
5135fi
5136
5137  if test -z "$CLANG"; then
5138    as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5139  fi
5140  # make sure clang is executable
5141  if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5142    as_fn_error $? "$CLANG does not work" "$LINENO" 5
5143  fi
5144  # Could check clang version, but it doesn't seem that
5145  # important. Systems with a new enough LLVM version are usually
5146  # going to have a decent clang version too. It's also not entirely
5147  # clear what the minimum version is.
5148
5149  # Collect compiler flags necessary to build the LLVM dependent
5150  # shared library.
5151  for pgac_option in `$LLVM_CONFIG --cppflags`; do
5152    case $pgac_option in
5153      -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5154    esac
5155  done
5156
5157  for pgac_option in `$LLVM_CONFIG --ldflags`; do
5158    case $pgac_option in
5159      -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5160    esac
5161  done
5162
5163  # ABI influencing options, standard influencing options
5164  for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5165    case $pgac_option in
5166      -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5167      -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5168    esac
5169  done
5170
5171  # Look for components we're interested in, collect necessary
5172  # libs. As some components are optional, we can't just list all of
5173  # them as it'd raise an error.
5174  pgac_components='';
5175  for pgac_component in `$LLVM_CONFIG --components`; do
5176    case $pgac_component in
5177      engine) pgac_components="$pgac_components $pgac_component";;
5178      debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5179      orcjit) pgac_components="$pgac_components $pgac_component";;
5180      passes) pgac_components="$pgac_components $pgac_component";;
5181      native) pgac_components="$pgac_components $pgac_component";;
5182      perfjitevents) pgac_components="$pgac_components $pgac_component";;
5183    esac
5184  done;
5185
5186  # And then get the libraries that need to be linked in for the
5187  # selected components.  They're large libraries, we only want to
5188  # link them into the LLVM using shared library.
5189  for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5190    case $pgac_option in
5191      -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5192    esac
5193  done
5194
5195  LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205fi # fi
5206
5207
5208unset CFLAGS
5209unset CXXFLAGS
5210
5211#
5212# Read the template
5213#
5214. "$srcdir/src/template/$template" || exit
5215
5216# C[XX]FLAGS are selected so:
5217# If the user specifies something in the environment, that is used.
5218# else:  If the template file set something, that is used.
5219# else:  If coverage was enabled, don't set anything.
5220# else:  If the compiler is GCC, then we use -O2.
5221# else:  If the compiler is something else, then we use -O, unless debugging.
5222
5223if test "$ac_env_CFLAGS_set" = set; then
5224  CFLAGS=$ac_env_CFLAGS_value
5225elif test "${CFLAGS+set}" = set; then
5226  : # (keep what template set)
5227elif test "$enable_coverage" = yes; then
5228  : # no optimization by default
5229elif test "$GCC" = yes; then
5230  CFLAGS="-O2"
5231else
5232  # if the user selected debug mode, don't use -O
5233  if test "$enable_debug" != yes; then
5234    CFLAGS="-O"
5235  fi
5236fi
5237
5238if test "$ac_env_CXXFLAGS_set" = set; then
5239  CXXFLAGS=$ac_env_CXXFLAGS_value
5240elif test "${CXXFLAGS+set}" = set; then
5241  : # (keep what template set)
5242elif test "$enable_coverage" = yes; then
5243  : # no optimization by default
5244elif test "$GCC" = yes; then
5245  CXXFLAGS="-O2"
5246else
5247  # if the user selected debug mode, don't use -O
5248  if test "$enable_debug" != yes; then
5249    CXXFLAGS="-O"
5250  fi
5251fi
5252
5253# When generating bitcode (for inlining) we always want to use -O2
5254# even when --enable-debug is specified. The bitcode it's not going to
5255# be used for line-by-line debugging, and JIT inlining doesn't work
5256# without at least -O1 (otherwise clang will emit 'noinline'
5257# attributes everywhere), which is bad for testing.  Still allow the
5258# environment to override if done explicitly.
5259if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5260  BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5261else
5262  BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5263fi
5264if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5265  BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5266else
5267  BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5268fi
5269
5270# C[XX]FLAGS we determined above will be added back at the end
5271user_CFLAGS=$CFLAGS
5272CFLAGS=""
5273user_CXXFLAGS=$CXXFLAGS
5274CXXFLAGS=""
5275user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5276BITCODE_CFLAGS=""
5277user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5278BITCODE_CXXFLAGS=""
5279
5280# set CFLAGS_UNROLL_LOOPS and CFLAGS_VECTORIZE from the environment, if present
5281if test "$ac_env_CFLAGS_UNROLL_LOOPS_set" = set; then
5282  CFLAGS_UNROLL_LOOPS=$ac_env_CFLAGS_UNROLL_LOOPS_value
5283fi
5284if test "$ac_env_CFLAGS_VECTORIZE_set" = set; then
5285  CFLAGS_VECTORIZE=$ac_env_CFLAGS_VECTORIZE_value
5286fi
5287
5288# Some versions of GCC support some additional useful warning flags.
5289# Check whether they are supported, and add them to CFLAGS if so.
5290# ICC pretends to be GCC but it's lying; it doesn't support these flags,
5291# but has its own.  Also check other compiler-specific flags here.
5292
5293if test "$GCC" = yes -a "$ICC" = no; then
5294  CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5295  CXXFLAGS="-Wall -Wpointer-arith"
5296  # These work in some but not all gcc versions
5297  save_CFLAGS=$CFLAGS
5298
5299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5300$as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5301if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5302  $as_echo_n "(cached) " >&6
5303else
5304  pgac_save_CFLAGS=$CFLAGS
5305pgac_save_CC=$CC
5306CC=${CC}
5307CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5308ac_save_c_werror_flag=$ac_c_werror_flag
5309ac_c_werror_flag=yes
5310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5311/* end confdefs.h.  */
5312
5313int
5314main ()
5315{
5316
5317  ;
5318  return 0;
5319}
5320_ACEOF
5321if ac_fn_c_try_compile "$LINENO"; then :
5322  pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5323else
5324  pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5325fi
5326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5327ac_c_werror_flag=$ac_save_c_werror_flag
5328CFLAGS="$pgac_save_CFLAGS"
5329CC="$pgac_save_CC"
5330fi
5331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5332$as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5333if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5334  CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5335fi
5336
5337
5338  # -Wdeclaration-after-statement isn't applicable for C++.  Specific C files
5339  # disable it, so AC_SUBST the negative form.
5340  PERMIT_DECLARATION_AFTER_STATEMENT=
5341  if test x"$save_CFLAGS" != x"$CFLAGS"; then
5342    PERMIT_DECLARATION_AFTER_STATEMENT=-Wno-declaration-after-statement
5343  fi
5344
5345  # Really don't want VLAs to be used in our dialect of C
5346
5347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5348$as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5349if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5350  $as_echo_n "(cached) " >&6
5351else
5352  pgac_save_CFLAGS=$CFLAGS
5353pgac_save_CC=$CC
5354CC=${CC}
5355CFLAGS="${CFLAGS} -Werror=vla"
5356ac_save_c_werror_flag=$ac_c_werror_flag
5357ac_c_werror_flag=yes
5358cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5359/* end confdefs.h.  */
5360
5361int
5362main ()
5363{
5364
5365  ;
5366  return 0;
5367}
5368_ACEOF
5369if ac_fn_c_try_compile "$LINENO"; then :
5370  pgac_cv_prog_CC_cflags__Werror_vla=yes
5371else
5372  pgac_cv_prog_CC_cflags__Werror_vla=no
5373fi
5374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5375ac_c_werror_flag=$ac_save_c_werror_flag
5376CFLAGS="$pgac_save_CFLAGS"
5377CC="$pgac_save_CC"
5378fi
5379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5380$as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5381if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5382  CFLAGS="${CFLAGS} -Werror=vla"
5383fi
5384
5385
5386  # On macOS, complain about usage of symbols newer than the deployment target
5387
5388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS" >&5
5389$as_echo_n "checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS... " >&6; }
5390if ${pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new+:} false; then :
5391  $as_echo_n "(cached) " >&6
5392else
5393  pgac_save_CFLAGS=$CFLAGS
5394pgac_save_CC=$CC
5395CC=${CC}
5396CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5397ac_save_c_werror_flag=$ac_c_werror_flag
5398ac_c_werror_flag=yes
5399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5400/* end confdefs.h.  */
5401
5402int
5403main ()
5404{
5405
5406  ;
5407  return 0;
5408}
5409_ACEOF
5410if ac_fn_c_try_compile "$LINENO"; then :
5411  pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=yes
5412else
5413  pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=no
5414fi
5415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5416ac_c_werror_flag=$ac_save_c_werror_flag
5417CFLAGS="$pgac_save_CFLAGS"
5418CC="$pgac_save_CC"
5419fi
5420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&5
5421$as_echo "$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&6; }
5422if test x"$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" = x"yes"; then
5423  CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5424fi
5425
5426
5427  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS" >&5
5428$as_echo_n "checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS... " >&6; }
5429if ${pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new+:} false; then :
5430  $as_echo_n "(cached) " >&6
5431else
5432  pgac_save_CXXFLAGS=$CXXFLAGS
5433pgac_save_CXX=$CXX
5434CXX=${CXX}
5435CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5436ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5437ac_cxx_werror_flag=yes
5438ac_ext=cpp
5439ac_cpp='$CXXCPP $CPPFLAGS'
5440ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5441ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5442ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5443
5444cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5445/* end confdefs.h.  */
5446
5447int
5448main ()
5449{
5450
5451  ;
5452  return 0;
5453}
5454_ACEOF
5455if ac_fn_cxx_try_compile "$LINENO"; then :
5456  pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=yes
5457else
5458  pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=no
5459fi
5460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5461ac_ext=c
5462ac_cpp='$CPP $CPPFLAGS'
5463ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5464ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5465ac_compiler_gnu=$ac_cv_c_compiler_gnu
5466
5467ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5468CXXFLAGS="$pgac_save_CXXFLAGS"
5469CXX="$pgac_save_CXX"
5470fi
5471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&5
5472$as_echo "$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&6; }
5473if test x"$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" = x"yes"; then
5474  CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5475fi
5476
5477
5478  # -Wvla is not applicable for C++
5479
5480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5481$as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5482if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5483  $as_echo_n "(cached) " >&6
5484else
5485  pgac_save_CFLAGS=$CFLAGS
5486pgac_save_CC=$CC
5487CC=${CC}
5488CFLAGS="${CFLAGS} -Wendif-labels"
5489ac_save_c_werror_flag=$ac_c_werror_flag
5490ac_c_werror_flag=yes
5491cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5492/* end confdefs.h.  */
5493
5494int
5495main ()
5496{
5497
5498  ;
5499  return 0;
5500}
5501_ACEOF
5502if ac_fn_c_try_compile "$LINENO"; then :
5503  pgac_cv_prog_CC_cflags__Wendif_labels=yes
5504else
5505  pgac_cv_prog_CC_cflags__Wendif_labels=no
5506fi
5507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5508ac_c_werror_flag=$ac_save_c_werror_flag
5509CFLAGS="$pgac_save_CFLAGS"
5510CC="$pgac_save_CC"
5511fi
5512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5513$as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5514if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5515  CFLAGS="${CFLAGS} -Wendif-labels"
5516fi
5517
5518
5519  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5520$as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5521if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5522  $as_echo_n "(cached) " >&6
5523else
5524  pgac_save_CXXFLAGS=$CXXFLAGS
5525pgac_save_CXX=$CXX
5526CXX=${CXX}
5527CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5528ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5529ac_cxx_werror_flag=yes
5530ac_ext=cpp
5531ac_cpp='$CXXCPP $CPPFLAGS'
5532ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5533ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5534ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5535
5536cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5537/* end confdefs.h.  */
5538
5539int
5540main ()
5541{
5542
5543  ;
5544  return 0;
5545}
5546_ACEOF
5547if ac_fn_cxx_try_compile "$LINENO"; then :
5548  pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5549else
5550  pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5551fi
5552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5553ac_ext=c
5554ac_cpp='$CPP $CPPFLAGS'
5555ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5556ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5557ac_compiler_gnu=$ac_cv_c_compiler_gnu
5558
5559ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5560CXXFLAGS="$pgac_save_CXXFLAGS"
5561CXX="$pgac_save_CXX"
5562fi
5563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5564$as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5565if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5566  CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5567fi
5568
5569
5570
5571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5572$as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5573if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5574  $as_echo_n "(cached) " >&6
5575else
5576  pgac_save_CFLAGS=$CFLAGS
5577pgac_save_CC=$CC
5578CC=${CC}
5579CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5580ac_save_c_werror_flag=$ac_c_werror_flag
5581ac_c_werror_flag=yes
5582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5583/* end confdefs.h.  */
5584
5585int
5586main ()
5587{
5588
5589  ;
5590  return 0;
5591}
5592_ACEOF
5593if ac_fn_c_try_compile "$LINENO"; then :
5594  pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5595else
5596  pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5597fi
5598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5599ac_c_werror_flag=$ac_save_c_werror_flag
5600CFLAGS="$pgac_save_CFLAGS"
5601CC="$pgac_save_CC"
5602fi
5603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5604$as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5605if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5606  CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5607fi
5608
5609
5610  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5611$as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5612if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5613  $as_echo_n "(cached) " >&6
5614else
5615  pgac_save_CXXFLAGS=$CXXFLAGS
5616pgac_save_CXX=$CXX
5617CXX=${CXX}
5618CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5619ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5620ac_cxx_werror_flag=yes
5621ac_ext=cpp
5622ac_cpp='$CXXCPP $CPPFLAGS'
5623ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5624ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5625ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5626
5627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5628/* end confdefs.h.  */
5629
5630int
5631main ()
5632{
5633
5634  ;
5635  return 0;
5636}
5637_ACEOF
5638if ac_fn_cxx_try_compile "$LINENO"; then :
5639  pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5640else
5641  pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5642fi
5643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5644ac_ext=c
5645ac_cpp='$CPP $CPPFLAGS'
5646ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5647ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5648ac_compiler_gnu=$ac_cv_c_compiler_gnu
5649
5650ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5651CXXFLAGS="$pgac_save_CXXFLAGS"
5652CXX="$pgac_save_CXX"
5653fi
5654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5655$as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5656if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5657  CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5658fi
5659
5660
5661
5662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS" >&5
5663$as_echo_n "checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS... " >&6; }
5664if ${pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3+:} false; then :
5665  $as_echo_n "(cached) " >&6
5666else
5667  pgac_save_CFLAGS=$CFLAGS
5668pgac_save_CC=$CC
5669CC=${CC}
5670CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5671ac_save_c_werror_flag=$ac_c_werror_flag
5672ac_c_werror_flag=yes
5673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5674/* end confdefs.h.  */
5675
5676int
5677main ()
5678{
5679
5680  ;
5681  return 0;
5682}
5683_ACEOF
5684if ac_fn_c_try_compile "$LINENO"; then :
5685  pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=yes
5686else
5687  pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=no
5688fi
5689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5690ac_c_werror_flag=$ac_save_c_werror_flag
5691CFLAGS="$pgac_save_CFLAGS"
5692CC="$pgac_save_CC"
5693fi
5694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&5
5695$as_echo "$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&6; }
5696if test x"$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" = x"yes"; then
5697  CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5698fi
5699
5700
5701  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS" >&5
5702$as_echo_n "checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS... " >&6; }
5703if ${pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3+:} false; then :
5704  $as_echo_n "(cached) " >&6
5705else
5706  pgac_save_CXXFLAGS=$CXXFLAGS
5707pgac_save_CXX=$CXX
5708CXX=${CXX}
5709CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5710ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5711ac_cxx_werror_flag=yes
5712ac_ext=cpp
5713ac_cpp='$CXXCPP $CPPFLAGS'
5714ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5715ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5716ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5717
5718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5719/* end confdefs.h.  */
5720
5721int
5722main ()
5723{
5724
5725  ;
5726  return 0;
5727}
5728_ACEOF
5729if ac_fn_cxx_try_compile "$LINENO"; then :
5730  pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=yes
5731else
5732  pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=no
5733fi
5734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5735ac_ext=c
5736ac_cpp='$CPP $CPPFLAGS'
5737ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5738ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5739ac_compiler_gnu=$ac_cv_c_compiler_gnu
5740
5741ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5742CXXFLAGS="$pgac_save_CXXFLAGS"
5743CXX="$pgac_save_CXX"
5744fi
5745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&5
5746$as_echo "$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&6; }
5747if test x"$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" = x"yes"; then
5748  CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5749fi
5750
5751
5752
5753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type, for CFLAGS" >&5
5754$as_echo_n "checking whether ${CC} supports -Wcast-function-type, for CFLAGS... " >&6; }
5755if ${pgac_cv_prog_CC_cflags__Wcast_function_type+:} false; then :
5756  $as_echo_n "(cached) " >&6
5757else
5758  pgac_save_CFLAGS=$CFLAGS
5759pgac_save_CC=$CC
5760CC=${CC}
5761CFLAGS="${CFLAGS} -Wcast-function-type"
5762ac_save_c_werror_flag=$ac_c_werror_flag
5763ac_c_werror_flag=yes
5764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5765/* end confdefs.h.  */
5766
5767int
5768main ()
5769{
5770
5771  ;
5772  return 0;
5773}
5774_ACEOF
5775if ac_fn_c_try_compile "$LINENO"; then :
5776  pgac_cv_prog_CC_cflags__Wcast_function_type=yes
5777else
5778  pgac_cv_prog_CC_cflags__Wcast_function_type=no
5779fi
5780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5781ac_c_werror_flag=$ac_save_c_werror_flag
5782CFLAGS="$pgac_save_CFLAGS"
5783CC="$pgac_save_CC"
5784fi
5785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type" >&5
5786$as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type" >&6; }
5787if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type" = x"yes"; then
5788  CFLAGS="${CFLAGS} -Wcast-function-type"
5789fi
5790
5791
5792  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS" >&5
5793$as_echo_n "checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS... " >&6; }
5794if ${pgac_cv_prog_CXX_cxxflags__Wcast_function_type+:} false; then :
5795  $as_echo_n "(cached) " >&6
5796else
5797  pgac_save_CXXFLAGS=$CXXFLAGS
5798pgac_save_CXX=$CXX
5799CXX=${CXX}
5800CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5801ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5802ac_cxx_werror_flag=yes
5803ac_ext=cpp
5804ac_cpp='$CXXCPP $CPPFLAGS'
5805ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5806ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5807ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5808
5809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5810/* end confdefs.h.  */
5811
5812int
5813main ()
5814{
5815
5816  ;
5817  return 0;
5818}
5819_ACEOF
5820if ac_fn_cxx_try_compile "$LINENO"; then :
5821  pgac_cv_prog_CXX_cxxflags__Wcast_function_type=yes
5822else
5823  pgac_cv_prog_CXX_cxxflags__Wcast_function_type=no
5824fi
5825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5826ac_ext=c
5827ac_cpp='$CPP $CPPFLAGS'
5828ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5829ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5830ac_compiler_gnu=$ac_cv_c_compiler_gnu
5831
5832ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5833CXXFLAGS="$pgac_save_CXXFLAGS"
5834CXX="$pgac_save_CXX"
5835fi
5836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&5
5837$as_echo "$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&6; }
5838if test x"$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" = x"yes"; then
5839  CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5840fi
5841
5842
5843  # This was included in -Wall/-Wformat in older GCC versions
5844
5845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5846$as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5847if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5848  $as_echo_n "(cached) " >&6
5849else
5850  pgac_save_CFLAGS=$CFLAGS
5851pgac_save_CC=$CC
5852CC=${CC}
5853CFLAGS="${CFLAGS} -Wformat-security"
5854ac_save_c_werror_flag=$ac_c_werror_flag
5855ac_c_werror_flag=yes
5856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5857/* end confdefs.h.  */
5858
5859int
5860main ()
5861{
5862
5863  ;
5864  return 0;
5865}
5866_ACEOF
5867if ac_fn_c_try_compile "$LINENO"; then :
5868  pgac_cv_prog_CC_cflags__Wformat_security=yes
5869else
5870  pgac_cv_prog_CC_cflags__Wformat_security=no
5871fi
5872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5873ac_c_werror_flag=$ac_save_c_werror_flag
5874CFLAGS="$pgac_save_CFLAGS"
5875CC="$pgac_save_CC"
5876fi
5877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5878$as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5879if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5880  CFLAGS="${CFLAGS} -Wformat-security"
5881fi
5882
5883
5884  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5885$as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5886if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5887  $as_echo_n "(cached) " >&6
5888else
5889  pgac_save_CXXFLAGS=$CXXFLAGS
5890pgac_save_CXX=$CXX
5891CXX=${CXX}
5892CXXFLAGS="${CXXFLAGS} -Wformat-security"
5893ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5894ac_cxx_werror_flag=yes
5895ac_ext=cpp
5896ac_cpp='$CXXCPP $CPPFLAGS'
5897ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5898ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5899ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5900
5901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5902/* end confdefs.h.  */
5903
5904int
5905main ()
5906{
5907
5908  ;
5909  return 0;
5910}
5911_ACEOF
5912if ac_fn_cxx_try_compile "$LINENO"; then :
5913  pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
5914else
5915  pgac_cv_prog_CXX_cxxflags__Wformat_security=no
5916fi
5917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5918ac_ext=c
5919ac_cpp='$CPP $CPPFLAGS'
5920ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5921ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5922ac_compiler_gnu=$ac_cv_c_compiler_gnu
5923
5924ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5925CXXFLAGS="$pgac_save_CXXFLAGS"
5926CXX="$pgac_save_CXX"
5927fi
5928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
5929$as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
5930if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
5931  CXXFLAGS="${CXXFLAGS} -Wformat-security"
5932fi
5933
5934
5935  # Disable strict-aliasing rules; needed for gcc 3.3+
5936
5937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
5938$as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
5939if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
5940  $as_echo_n "(cached) " >&6
5941else
5942  pgac_save_CFLAGS=$CFLAGS
5943pgac_save_CC=$CC
5944CC=${CC}
5945CFLAGS="${CFLAGS} -fno-strict-aliasing"
5946ac_save_c_werror_flag=$ac_c_werror_flag
5947ac_c_werror_flag=yes
5948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5949/* end confdefs.h.  */
5950
5951int
5952main ()
5953{
5954
5955  ;
5956  return 0;
5957}
5958_ACEOF
5959if ac_fn_c_try_compile "$LINENO"; then :
5960  pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
5961else
5962  pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
5963fi
5964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5965ac_c_werror_flag=$ac_save_c_werror_flag
5966CFLAGS="$pgac_save_CFLAGS"
5967CC="$pgac_save_CC"
5968fi
5969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
5970$as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
5971if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
5972  CFLAGS="${CFLAGS} -fno-strict-aliasing"
5973fi
5974
5975
5976  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
5977$as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
5978if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
5979  $as_echo_n "(cached) " >&6
5980else
5981  pgac_save_CXXFLAGS=$CXXFLAGS
5982pgac_save_CXX=$CXX
5983CXX=${CXX}
5984CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5985ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5986ac_cxx_werror_flag=yes
5987ac_ext=cpp
5988ac_cpp='$CXXCPP $CPPFLAGS'
5989ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5990ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5991ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5992
5993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5994/* end confdefs.h.  */
5995
5996int
5997main ()
5998{
5999
6000  ;
6001  return 0;
6002}
6003_ACEOF
6004if ac_fn_cxx_try_compile "$LINENO"; then :
6005  pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6006else
6007  pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6008fi
6009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6010ac_ext=c
6011ac_cpp='$CPP $CPPFLAGS'
6012ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6013ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6014ac_compiler_gnu=$ac_cv_c_compiler_gnu
6015
6016ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6017CXXFLAGS="$pgac_save_CXXFLAGS"
6018CXX="$pgac_save_CXX"
6019fi
6020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6021$as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6022if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6023  CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6024fi
6025
6026
6027  # Disable optimizations that assume no overflow; needed for gcc 4.3+
6028
6029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
6030$as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
6031if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
6032  $as_echo_n "(cached) " >&6
6033else
6034  pgac_save_CFLAGS=$CFLAGS
6035pgac_save_CC=$CC
6036CC=${CC}
6037CFLAGS="${CFLAGS} -fwrapv"
6038ac_save_c_werror_flag=$ac_c_werror_flag
6039ac_c_werror_flag=yes
6040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6041/* end confdefs.h.  */
6042
6043int
6044main ()
6045{
6046
6047  ;
6048  return 0;
6049}
6050_ACEOF
6051if ac_fn_c_try_compile "$LINENO"; then :
6052  pgac_cv_prog_CC_cflags__fwrapv=yes
6053else
6054  pgac_cv_prog_CC_cflags__fwrapv=no
6055fi
6056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6057ac_c_werror_flag=$ac_save_c_werror_flag
6058CFLAGS="$pgac_save_CFLAGS"
6059CC="$pgac_save_CC"
6060fi
6061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
6062$as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
6063if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
6064  CFLAGS="${CFLAGS} -fwrapv"
6065fi
6066
6067
6068  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
6069$as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
6070if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
6071  $as_echo_n "(cached) " >&6
6072else
6073  pgac_save_CXXFLAGS=$CXXFLAGS
6074pgac_save_CXX=$CXX
6075CXX=${CXX}
6076CXXFLAGS="${CXXFLAGS} -fwrapv"
6077ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6078ac_cxx_werror_flag=yes
6079ac_ext=cpp
6080ac_cpp='$CXXCPP $CPPFLAGS'
6081ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6082ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6083ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6084
6085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6086/* end confdefs.h.  */
6087
6088int
6089main ()
6090{
6091
6092  ;
6093  return 0;
6094}
6095_ACEOF
6096if ac_fn_cxx_try_compile "$LINENO"; then :
6097  pgac_cv_prog_CXX_cxxflags__fwrapv=yes
6098else
6099  pgac_cv_prog_CXX_cxxflags__fwrapv=no
6100fi
6101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6102ac_ext=c
6103ac_cpp='$CPP $CPPFLAGS'
6104ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6105ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6106ac_compiler_gnu=$ac_cv_c_compiler_gnu
6107
6108ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6109CXXFLAGS="$pgac_save_CXXFLAGS"
6110CXX="$pgac_save_CXX"
6111fi
6112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
6113$as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
6114if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
6115  CXXFLAGS="${CXXFLAGS} -fwrapv"
6116fi
6117
6118
6119  # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
6120
6121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
6122$as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
6123if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
6124  $as_echo_n "(cached) " >&6
6125else
6126  pgac_save_CFLAGS=$CFLAGS
6127pgac_save_CC=$CC
6128CC=${CC}
6129CFLAGS="${CFLAGS} -fexcess-precision=standard"
6130ac_save_c_werror_flag=$ac_c_werror_flag
6131ac_c_werror_flag=yes
6132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6133/* end confdefs.h.  */
6134
6135int
6136main ()
6137{
6138
6139  ;
6140  return 0;
6141}
6142_ACEOF
6143if ac_fn_c_try_compile "$LINENO"; then :
6144  pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
6145else
6146  pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
6147fi
6148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6149ac_c_werror_flag=$ac_save_c_werror_flag
6150CFLAGS="$pgac_save_CFLAGS"
6151CC="$pgac_save_CC"
6152fi
6153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
6154$as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
6155if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
6156  CFLAGS="${CFLAGS} -fexcess-precision=standard"
6157fi
6158
6159
6160  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
6161$as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
6162if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
6163  $as_echo_n "(cached) " >&6
6164else
6165  pgac_save_CXXFLAGS=$CXXFLAGS
6166pgac_save_CXX=$CXX
6167CXX=${CXX}
6168CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6169ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6170ac_cxx_werror_flag=yes
6171ac_ext=cpp
6172ac_cpp='$CXXCPP $CPPFLAGS'
6173ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6174ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6175ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6176
6177cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6178/* end confdefs.h.  */
6179
6180int
6181main ()
6182{
6183
6184  ;
6185  return 0;
6186}
6187_ACEOF
6188if ac_fn_cxx_try_compile "$LINENO"; then :
6189  pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
6190else
6191  pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
6192fi
6193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6194ac_ext=c
6195ac_cpp='$CPP $CPPFLAGS'
6196ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6197ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6198ac_compiler_gnu=$ac_cv_c_compiler_gnu
6199
6200ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6201CXXFLAGS="$pgac_save_CXXFLAGS"
6202CXX="$pgac_save_CXX"
6203fi
6204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
6205$as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
6206if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6207  CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6208fi
6209
6210
6211  # Optimization flags for specific files that benefit from loop unrolling
6212  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS" >&5
6213$as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS... " >&6; }
6214if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
6215  $as_echo_n "(cached) " >&6
6216else
6217  pgac_save_CFLAGS=$CFLAGS
6218pgac_save_CC=$CC
6219CC=${CC}
6220CFLAGS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6221ac_save_c_werror_flag=$ac_c_werror_flag
6222ac_c_werror_flag=yes
6223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6224/* end confdefs.h.  */
6225
6226int
6227main ()
6228{
6229
6230  ;
6231  return 0;
6232}
6233_ACEOF
6234if ac_fn_c_try_compile "$LINENO"; then :
6235  pgac_cv_prog_CC_cflags__funroll_loops=yes
6236else
6237  pgac_cv_prog_CC_cflags__funroll_loops=no
6238fi
6239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6240ac_c_werror_flag=$ac_save_c_werror_flag
6241CFLAGS="$pgac_save_CFLAGS"
6242CC="$pgac_save_CC"
6243fi
6244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
6245$as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
6246if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
6247  CFLAGS_UNROLL_LOOPS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6248fi
6249
6250
6251  # Optimization flags for specific files that benefit from vectorization
6252  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE" >&5
6253$as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE... " >&6; }
6254if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
6255  $as_echo_n "(cached) " >&6
6256else
6257  pgac_save_CFLAGS=$CFLAGS
6258pgac_save_CC=$CC
6259CC=${CC}
6260CFLAGS="${CFLAGS_VECTORIZE} -ftree-vectorize"
6261ac_save_c_werror_flag=$ac_c_werror_flag
6262ac_c_werror_flag=yes
6263cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6264/* end confdefs.h.  */
6265
6266int
6267main ()
6268{
6269
6270  ;
6271  return 0;
6272}
6273_ACEOF
6274if ac_fn_c_try_compile "$LINENO"; then :
6275  pgac_cv_prog_CC_cflags__ftree_vectorize=yes
6276else
6277  pgac_cv_prog_CC_cflags__ftree_vectorize=no
6278fi
6279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6280ac_c_werror_flag=$ac_save_c_werror_flag
6281CFLAGS="$pgac_save_CFLAGS"
6282CC="$pgac_save_CC"
6283fi
6284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
6285$as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
6286if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
6287  CFLAGS_VECTORIZE="${CFLAGS_VECTORIZE} -ftree-vectorize"
6288fi
6289
6290
6291  # We want to suppress clang's unhelpful unused-command-line-argument warnings
6292  # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
6293  # test for the positive form and if that works, add the negative form
6294  NOT_THE_CFLAGS=""
6295  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
6296$as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
6297if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
6298  $as_echo_n "(cached) " >&6
6299else
6300  pgac_save_CFLAGS=$CFLAGS
6301pgac_save_CC=$CC
6302CC=${CC}
6303CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6304ac_save_c_werror_flag=$ac_c_werror_flag
6305ac_c_werror_flag=yes
6306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6307/* end confdefs.h.  */
6308
6309int
6310main ()
6311{
6312
6313  ;
6314  return 0;
6315}
6316_ACEOF
6317if ac_fn_c_try_compile "$LINENO"; then :
6318  pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6319else
6320  pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6321fi
6322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6323ac_c_werror_flag=$ac_save_c_werror_flag
6324CFLAGS="$pgac_save_CFLAGS"
6325CC="$pgac_save_CC"
6326fi
6327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6328$as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6329if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6330  NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6331fi
6332
6333
6334  if test -n "$NOT_THE_CFLAGS"; then
6335    CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6336  fi
6337  # Similarly disable useless truncation warnings from gcc 8+
6338  NOT_THE_CFLAGS=""
6339  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6340$as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6341if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6342  $as_echo_n "(cached) " >&6
6343else
6344  pgac_save_CFLAGS=$CFLAGS
6345pgac_save_CC=$CC
6346CC=${CC}
6347CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6348ac_save_c_werror_flag=$ac_c_werror_flag
6349ac_c_werror_flag=yes
6350cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6351/* end confdefs.h.  */
6352
6353int
6354main ()
6355{
6356
6357  ;
6358  return 0;
6359}
6360_ACEOF
6361if ac_fn_c_try_compile "$LINENO"; then :
6362  pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6363else
6364  pgac_cv_prog_CC_cflags__Wformat_truncation=no
6365fi
6366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6367ac_c_werror_flag=$ac_save_c_werror_flag
6368CFLAGS="$pgac_save_CFLAGS"
6369CC="$pgac_save_CC"
6370fi
6371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6372$as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6373if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6374  NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6375fi
6376
6377
6378  if test -n "$NOT_THE_CFLAGS"; then
6379    CFLAGS="$CFLAGS -Wno-format-truncation"
6380  fi
6381  NOT_THE_CFLAGS=""
6382  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6383$as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6384if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6385  $as_echo_n "(cached) " >&6
6386else
6387  pgac_save_CFLAGS=$CFLAGS
6388pgac_save_CC=$CC
6389CC=${CC}
6390CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6391ac_save_c_werror_flag=$ac_c_werror_flag
6392ac_c_werror_flag=yes
6393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6394/* end confdefs.h.  */
6395
6396int
6397main ()
6398{
6399
6400  ;
6401  return 0;
6402}
6403_ACEOF
6404if ac_fn_c_try_compile "$LINENO"; then :
6405  pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6406else
6407  pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6408fi
6409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6410ac_c_werror_flag=$ac_save_c_werror_flag
6411CFLAGS="$pgac_save_CFLAGS"
6412CC="$pgac_save_CC"
6413fi
6414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6415$as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6416if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6417  NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6418fi
6419
6420
6421  if test -n "$NOT_THE_CFLAGS"; then
6422    CFLAGS="$CFLAGS -Wno-stringop-truncation"
6423  fi
6424elif test "$ICC" = yes; then
6425  # Intel's compiler has a bug/misoptimization in checking for
6426  # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6427
6428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6429$as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6430if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6431  $as_echo_n "(cached) " >&6
6432else
6433  pgac_save_CFLAGS=$CFLAGS
6434pgac_save_CC=$CC
6435CC=${CC}
6436CFLAGS="${CFLAGS} -mp1"
6437ac_save_c_werror_flag=$ac_c_werror_flag
6438ac_c_werror_flag=yes
6439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6440/* end confdefs.h.  */
6441
6442int
6443main ()
6444{
6445
6446  ;
6447  return 0;
6448}
6449_ACEOF
6450if ac_fn_c_try_compile "$LINENO"; then :
6451  pgac_cv_prog_CC_cflags__mp1=yes
6452else
6453  pgac_cv_prog_CC_cflags__mp1=no
6454fi
6455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6456ac_c_werror_flag=$ac_save_c_werror_flag
6457CFLAGS="$pgac_save_CFLAGS"
6458CC="$pgac_save_CC"
6459fi
6460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6461$as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6462if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6463  CFLAGS="${CFLAGS} -mp1"
6464fi
6465
6466
6467  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6468$as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6469if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6470  $as_echo_n "(cached) " >&6
6471else
6472  pgac_save_CXXFLAGS=$CXXFLAGS
6473pgac_save_CXX=$CXX
6474CXX=${CXX}
6475CXXFLAGS="${CXXFLAGS} -mp1"
6476ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6477ac_cxx_werror_flag=yes
6478ac_ext=cpp
6479ac_cpp='$CXXCPP $CPPFLAGS'
6480ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6481ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6482ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6483
6484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6485/* end confdefs.h.  */
6486
6487int
6488main ()
6489{
6490
6491  ;
6492  return 0;
6493}
6494_ACEOF
6495if ac_fn_cxx_try_compile "$LINENO"; then :
6496  pgac_cv_prog_CXX_cxxflags__mp1=yes
6497else
6498  pgac_cv_prog_CXX_cxxflags__mp1=no
6499fi
6500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6501ac_ext=c
6502ac_cpp='$CPP $CPPFLAGS'
6503ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6504ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6505ac_compiler_gnu=$ac_cv_c_compiler_gnu
6506
6507ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6508CXXFLAGS="$pgac_save_CXXFLAGS"
6509CXX="$pgac_save_CXX"
6510fi
6511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6512$as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6513if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6514  CXXFLAGS="${CXXFLAGS} -mp1"
6515fi
6516
6517
6518  # Make sure strict aliasing is off (though this is said to be the default)
6519
6520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6521$as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6522if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6523  $as_echo_n "(cached) " >&6
6524else
6525  pgac_save_CFLAGS=$CFLAGS
6526pgac_save_CC=$CC
6527CC=${CC}
6528CFLAGS="${CFLAGS} -fno-strict-aliasing"
6529ac_save_c_werror_flag=$ac_c_werror_flag
6530ac_c_werror_flag=yes
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_c_try_compile "$LINENO"; then :
6543  pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6544else
6545  pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6546fi
6547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6548ac_c_werror_flag=$ac_save_c_werror_flag
6549CFLAGS="$pgac_save_CFLAGS"
6550CC="$pgac_save_CC"
6551fi
6552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6553$as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6554if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6555  CFLAGS="${CFLAGS} -fno-strict-aliasing"
6556fi
6557
6558
6559  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6560$as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6561if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6562  $as_echo_n "(cached) " >&6
6563else
6564  pgac_save_CXXFLAGS=$CXXFLAGS
6565pgac_save_CXX=$CXX
6566CXX=${CXX}
6567CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6568ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6569ac_cxx_werror_flag=yes
6570ac_ext=cpp
6571ac_cpp='$CXXCPP $CPPFLAGS'
6572ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6573ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6574ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6575
6576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6577/* end confdefs.h.  */
6578
6579int
6580main ()
6581{
6582
6583  ;
6584  return 0;
6585}
6586_ACEOF
6587if ac_fn_cxx_try_compile "$LINENO"; then :
6588  pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6589else
6590  pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6591fi
6592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6593ac_ext=c
6594ac_cpp='$CPP $CPPFLAGS'
6595ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6596ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6597ac_compiler_gnu=$ac_cv_c_compiler_gnu
6598
6599ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6600CXXFLAGS="$pgac_save_CXXFLAGS"
6601CXX="$pgac_save_CXX"
6602fi
6603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6604$as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6605if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6606  CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6607fi
6608
6609
6610elif test "$PORTNAME" = "aix"; then
6611  # AIX's xlc has to have strict aliasing turned off too
6612
6613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6614$as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6615if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6616  $as_echo_n "(cached) " >&6
6617else
6618  pgac_save_CFLAGS=$CFLAGS
6619pgac_save_CC=$CC
6620CC=${CC}
6621CFLAGS="${CFLAGS} -qnoansialias"
6622ac_save_c_werror_flag=$ac_c_werror_flag
6623ac_c_werror_flag=yes
6624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6625/* end confdefs.h.  */
6626
6627int
6628main ()
6629{
6630
6631  ;
6632  return 0;
6633}
6634_ACEOF
6635if ac_fn_c_try_compile "$LINENO"; then :
6636  pgac_cv_prog_CC_cflags__qnoansialias=yes
6637else
6638  pgac_cv_prog_CC_cflags__qnoansialias=no
6639fi
6640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6641ac_c_werror_flag=$ac_save_c_werror_flag
6642CFLAGS="$pgac_save_CFLAGS"
6643CC="$pgac_save_CC"
6644fi
6645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6646$as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6647if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6648  CFLAGS="${CFLAGS} -qnoansialias"
6649fi
6650
6651
6652  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6653$as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6654if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6655  $as_echo_n "(cached) " >&6
6656else
6657  pgac_save_CXXFLAGS=$CXXFLAGS
6658pgac_save_CXX=$CXX
6659CXX=${CXX}
6660CXXFLAGS="${CXXFLAGS} -qnoansialias"
6661ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6662ac_cxx_werror_flag=yes
6663ac_ext=cpp
6664ac_cpp='$CXXCPP $CPPFLAGS'
6665ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6666ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6667ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6668
6669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6670/* end confdefs.h.  */
6671
6672int
6673main ()
6674{
6675
6676  ;
6677  return 0;
6678}
6679_ACEOF
6680if ac_fn_cxx_try_compile "$LINENO"; then :
6681  pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6682else
6683  pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6684fi
6685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6686ac_ext=c
6687ac_cpp='$CPP $CPPFLAGS'
6688ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6689ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6690ac_compiler_gnu=$ac_cv_c_compiler_gnu
6691
6692ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6693CXXFLAGS="$pgac_save_CXXFLAGS"
6694CXX="$pgac_save_CXX"
6695fi
6696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6697$as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6698if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6699  CXXFLAGS="${CXXFLAGS} -qnoansialias"
6700fi
6701
6702
6703
6704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6705$as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6706if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6707  $as_echo_n "(cached) " >&6
6708else
6709  pgac_save_CFLAGS=$CFLAGS
6710pgac_save_CC=$CC
6711CC=${CC}
6712CFLAGS="${CFLAGS} -qlonglong"
6713ac_save_c_werror_flag=$ac_c_werror_flag
6714ac_c_werror_flag=yes
6715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6716/* end confdefs.h.  */
6717
6718int
6719main ()
6720{
6721
6722  ;
6723  return 0;
6724}
6725_ACEOF
6726if ac_fn_c_try_compile "$LINENO"; then :
6727  pgac_cv_prog_CC_cflags__qlonglong=yes
6728else
6729  pgac_cv_prog_CC_cflags__qlonglong=no
6730fi
6731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6732ac_c_werror_flag=$ac_save_c_werror_flag
6733CFLAGS="$pgac_save_CFLAGS"
6734CC="$pgac_save_CC"
6735fi
6736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6737$as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6738if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6739  CFLAGS="${CFLAGS} -qlonglong"
6740fi
6741
6742
6743  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6744$as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6745if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6746  $as_echo_n "(cached) " >&6
6747else
6748  pgac_save_CXXFLAGS=$CXXFLAGS
6749pgac_save_CXX=$CXX
6750CXX=${CXX}
6751CXXFLAGS="${CXXFLAGS} -qlonglong"
6752ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6753ac_cxx_werror_flag=yes
6754ac_ext=cpp
6755ac_cpp='$CXXCPP $CPPFLAGS'
6756ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6757ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6758ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6759
6760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6761/* end confdefs.h.  */
6762
6763int
6764main ()
6765{
6766
6767  ;
6768  return 0;
6769}
6770_ACEOF
6771if ac_fn_cxx_try_compile "$LINENO"; then :
6772  pgac_cv_prog_CXX_cxxflags__qlonglong=yes
6773else
6774  pgac_cv_prog_CXX_cxxflags__qlonglong=no
6775fi
6776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6777ac_ext=c
6778ac_cpp='$CPP $CPPFLAGS'
6779ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6780ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6781ac_compiler_gnu=$ac_cv_c_compiler_gnu
6782
6783ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6784CXXFLAGS="$pgac_save_CXXFLAGS"
6785CXX="$pgac_save_CXX"
6786fi
6787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
6788$as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
6789if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
6790  CXXFLAGS="${CXXFLAGS} -qlonglong"
6791fi
6792
6793
6794elif test "$PORTNAME" = "hpux"; then
6795  # On some versions of HP-UX, libm functions do not set errno by default.
6796  # Fix that by using +Olibmerrno if the compiler recognizes it.
6797
6798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports +Olibmerrno, for CFLAGS" >&5
6799$as_echo_n "checking whether ${CC} supports +Olibmerrno, for CFLAGS... " >&6; }
6800if ${pgac_cv_prog_CC_cflags_pOlibmerrno+:} false; then :
6801  $as_echo_n "(cached) " >&6
6802else
6803  pgac_save_CFLAGS=$CFLAGS
6804pgac_save_CC=$CC
6805CC=${CC}
6806CFLAGS="${CFLAGS} +Olibmerrno"
6807ac_save_c_werror_flag=$ac_c_werror_flag
6808ac_c_werror_flag=yes
6809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6810/* end confdefs.h.  */
6811
6812int
6813main ()
6814{
6815
6816  ;
6817  return 0;
6818}
6819_ACEOF
6820if ac_fn_c_try_compile "$LINENO"; then :
6821  pgac_cv_prog_CC_cflags_pOlibmerrno=yes
6822else
6823  pgac_cv_prog_CC_cflags_pOlibmerrno=no
6824fi
6825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6826ac_c_werror_flag=$ac_save_c_werror_flag
6827CFLAGS="$pgac_save_CFLAGS"
6828CC="$pgac_save_CC"
6829fi
6830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags_pOlibmerrno" >&5
6831$as_echo "$pgac_cv_prog_CC_cflags_pOlibmerrno" >&6; }
6832if test x"$pgac_cv_prog_CC_cflags_pOlibmerrno" = x"yes"; then
6833  CFLAGS="${CFLAGS} +Olibmerrno"
6834fi
6835
6836
6837  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS" >&5
6838$as_echo_n "checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS... " >&6; }
6839if ${pgac_cv_prog_CXX_cxxflags_pOlibmerrno+:} false; then :
6840  $as_echo_n "(cached) " >&6
6841else
6842  pgac_save_CXXFLAGS=$CXXFLAGS
6843pgac_save_CXX=$CXX
6844CXX=${CXX}
6845CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6846ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6847ac_cxx_werror_flag=yes
6848ac_ext=cpp
6849ac_cpp='$CXXCPP $CPPFLAGS'
6850ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6851ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6852ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6853
6854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6855/* end confdefs.h.  */
6856
6857int
6858main ()
6859{
6860
6861  ;
6862  return 0;
6863}
6864_ACEOF
6865if ac_fn_cxx_try_compile "$LINENO"; then :
6866  pgac_cv_prog_CXX_cxxflags_pOlibmerrno=yes
6867else
6868  pgac_cv_prog_CXX_cxxflags_pOlibmerrno=no
6869fi
6870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6871ac_ext=c
6872ac_cpp='$CPP $CPPFLAGS'
6873ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6874ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6875ac_compiler_gnu=$ac_cv_c_compiler_gnu
6876
6877ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6878CXXFLAGS="$pgac_save_CXXFLAGS"
6879CXX="$pgac_save_CXX"
6880fi
6881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&5
6882$as_echo "$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&6; }
6883if test x"$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" = x"yes"; then
6884  CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6885fi
6886
6887
6888fi
6889
6890
6891
6892
6893# Determine flags used to emit bitcode for JIT inlining. Need to test
6894# for behaviour changing compiler flags, to keep compatibility with
6895# compiler used for normal postgres code.
6896if test "$with_llvm" = yes ; then
6897  CLANGXX="$CLANG -xc++"
6898
6899  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
6900$as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
6901if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
6902  $as_echo_n "(cached) " >&6
6903else
6904  pgac_save_CFLAGS=$CFLAGS
6905pgac_save_CC=$CC
6906CC=${CLANG}
6907CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6908ac_save_c_werror_flag=$ac_c_werror_flag
6909ac_c_werror_flag=yes
6910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6911/* end confdefs.h.  */
6912
6913int
6914main ()
6915{
6916
6917  ;
6918  return 0;
6919}
6920_ACEOF
6921if ac_fn_c_try_compile "$LINENO"; then :
6922  pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
6923else
6924  pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
6925fi
6926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6927ac_c_werror_flag=$ac_save_c_werror_flag
6928CFLAGS="$pgac_save_CFLAGS"
6929CC="$pgac_save_CC"
6930fi
6931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
6932$as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
6933if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
6934  BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6935fi
6936
6937  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
6938$as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
6939if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
6940  $as_echo_n "(cached) " >&6
6941else
6942  pgac_save_CXXFLAGS=$CXXFLAGS
6943pgac_save_CXX=$CXX
6944CXX=${CLANGXX}
6945CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6946ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6947ac_cxx_werror_flag=yes
6948ac_ext=cpp
6949ac_cpp='$CXXCPP $CPPFLAGS'
6950ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6951ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6952ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6953
6954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6955/* end confdefs.h.  */
6956
6957int
6958main ()
6959{
6960
6961  ;
6962  return 0;
6963}
6964_ACEOF
6965if ac_fn_cxx_try_compile "$LINENO"; then :
6966  pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
6967else
6968  pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
6969fi
6970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6971ac_ext=c
6972ac_cpp='$CPP $CPPFLAGS'
6973ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6974ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6975ac_compiler_gnu=$ac_cv_c_compiler_gnu
6976
6977ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6978CXXFLAGS="$pgac_save_CXXFLAGS"
6979CXX="$pgac_save_CXX"
6980fi
6981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
6982$as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
6983if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6984  BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6985fi
6986
6987  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
6988$as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
6989if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
6990  $as_echo_n "(cached) " >&6
6991else
6992  pgac_save_CFLAGS=$CFLAGS
6993pgac_save_CC=$CC
6994CC=${CLANG}
6995CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6996ac_save_c_werror_flag=$ac_c_werror_flag
6997ac_c_werror_flag=yes
6998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6999/* end confdefs.h.  */
7000
7001int
7002main ()
7003{
7004
7005  ;
7006  return 0;
7007}
7008_ACEOF
7009if ac_fn_c_try_compile "$LINENO"; then :
7010  pgac_cv_prog_CLANG_cflags__fwrapv=yes
7011else
7012  pgac_cv_prog_CLANG_cflags__fwrapv=no
7013fi
7014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7015ac_c_werror_flag=$ac_save_c_werror_flag
7016CFLAGS="$pgac_save_CFLAGS"
7017CC="$pgac_save_CC"
7018fi
7019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
7020$as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
7021if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
7022  BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7023fi
7024
7025  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
7026$as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
7027if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
7028  $as_echo_n "(cached) " >&6
7029else
7030  pgac_save_CXXFLAGS=$CXXFLAGS
7031pgac_save_CXX=$CXX
7032CXX=${CLANGXX}
7033CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7034ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7035ac_cxx_werror_flag=yes
7036ac_ext=cpp
7037ac_cpp='$CXXCPP $CPPFLAGS'
7038ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7039ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7040ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7041
7042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7043/* end confdefs.h.  */
7044
7045int
7046main ()
7047{
7048
7049  ;
7050  return 0;
7051}
7052_ACEOF
7053if ac_fn_cxx_try_compile "$LINENO"; then :
7054  pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
7055else
7056  pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
7057fi
7058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7059ac_ext=c
7060ac_cpp='$CPP $CPPFLAGS'
7061ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7062ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7063ac_compiler_gnu=$ac_cv_c_compiler_gnu
7064
7065ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7066CXXFLAGS="$pgac_save_CXXFLAGS"
7067CXX="$pgac_save_CXX"
7068fi
7069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
7070$as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
7071if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
7072  BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7073fi
7074
7075  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
7076$as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
7077if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
7078  $as_echo_n "(cached) " >&6
7079else
7080  pgac_save_CFLAGS=$CFLAGS
7081pgac_save_CC=$CC
7082CC=${CLANG}
7083CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7084ac_save_c_werror_flag=$ac_c_werror_flag
7085ac_c_werror_flag=yes
7086cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7087/* end confdefs.h.  */
7088
7089int
7090main ()
7091{
7092
7093  ;
7094  return 0;
7095}
7096_ACEOF
7097if ac_fn_c_try_compile "$LINENO"; then :
7098  pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
7099else
7100  pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
7101fi
7102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7103ac_c_werror_flag=$ac_save_c_werror_flag
7104CFLAGS="$pgac_save_CFLAGS"
7105CC="$pgac_save_CC"
7106fi
7107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
7108$as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
7109if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
7110  BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7111fi
7112
7113  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
7114$as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
7115if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
7116  $as_echo_n "(cached) " >&6
7117else
7118  pgac_save_CXXFLAGS=$CXXFLAGS
7119pgac_save_CXX=$CXX
7120CXX=${CLANGXX}
7121CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7122ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7123ac_cxx_werror_flag=yes
7124ac_ext=cpp
7125ac_cpp='$CXXCPP $CPPFLAGS'
7126ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7127ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7128ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7129
7130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7131/* end confdefs.h.  */
7132
7133int
7134main ()
7135{
7136
7137  ;
7138  return 0;
7139}
7140_ACEOF
7141if ac_fn_cxx_try_compile "$LINENO"; then :
7142  pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
7143else
7144  pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
7145fi
7146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7147ac_ext=c
7148ac_cpp='$CPP $CPPFLAGS'
7149ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7150ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7151ac_compiler_gnu=$ac_cv_c_compiler_gnu
7152
7153ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7154CXXFLAGS="$pgac_save_CXXFLAGS"
7155CXX="$pgac_save_CXX"
7156fi
7157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
7158$as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
7159if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
7160  BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7161fi
7162
7163fi
7164
7165# supply -g if --enable-debug
7166if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
7167  CFLAGS="$CFLAGS -g"
7168fi
7169
7170if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
7171  CXXFLAGS="$CXXFLAGS -g"
7172fi
7173
7174# enable code coverage if --enable-coverage
7175if test "$enable_coverage" = yes; then
7176  if test "$GCC" = yes; then
7177    CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
7178    CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
7179  else
7180    as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
7181  fi
7182fi
7183
7184# enable profiling if --enable-profiling
7185if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
7186  if test "$GCC" = yes; then
7187
7188$as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
7189
7190    CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7191    CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7192  else
7193    as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
7194  fi
7195fi
7196
7197# We already have this in Makefile.win32, but configure needs it too
7198if test "$PORTNAME" = "win32"; then
7199  CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32"
7200fi
7201
7202# Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
7203# user-specified flags (if any) at the end.  This lets users override
7204# the automatic additions.
7205CFLAGS="$CFLAGS $user_CFLAGS"
7206CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
7207BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
7208BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
7209
7210
7211
7212
7213# The template file must set up CFLAGS_SL; we don't support user override
7214
7215
7216# Check if the compiler still works with the final flag settings
7217# (note, we're not checking that for CXX, which is optional)
7218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
7219$as_echo_n "checking whether the C compiler still works... " >&6; }
7220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7221/* end confdefs.h.  */
7222
7223int
7224main ()
7225{
7226return 0;
7227  ;
7228  return 0;
7229}
7230_ACEOF
7231if ac_fn_c_try_link "$LINENO"; then :
7232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7233$as_echo "yes" >&6; }
7234else
7235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7236$as_echo "no" >&6; }
7237   as_fn_error $? "cannot proceed" "$LINENO" 5
7238fi
7239rm -f core conftest.err conftest.$ac_objext \
7240    conftest$ac_exeext conftest.$ac_ext
7241
7242# Defend against gcc -ffast-math
7243if test "$GCC" = yes; then
7244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7245/* end confdefs.h.  */
7246
7247int
7248main ()
7249{
7250#ifdef __FAST_MATH__
7251choke me
7252#endif
7253  ;
7254  return 0;
7255}
7256_ACEOF
7257if ac_fn_c_try_compile "$LINENO"; then :
7258
7259else
7260  as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
7261fi
7262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7263fi
7264
7265# Defend against clang being used on x86-32 without SSE2 enabled.  As current
7266# versions of clang do not understand -fexcess-precision=standard, the use of
7267# x87 floating point operations leads to problems like isinf possibly returning
7268# false for a value that is infinite when converted from the 80bit register to
7269# the 8byte memory representation.
7270#
7271# Only perform the test if the compiler doesn't understand
7272# -fexcess-precision=standard, that way a potentially fixed compiler will work
7273# automatically.
7274if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
7275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7276/* end confdefs.h.  */
7277
7278int
7279main ()
7280{
7281
7282#if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
7283choke me
7284#endif
7285
7286  ;
7287  return 0;
7288}
7289_ACEOF
7290if ac_fn_c_try_compile "$LINENO"; then :
7291
7292else
7293  as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
7294fi
7295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7296fi
7297
7298ac_ext=c
7299ac_cpp='$CPP $CPPFLAGS'
7300ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7301ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7302ac_compiler_gnu=$ac_cv_c_compiler_gnu
7303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7304$as_echo_n "checking how to run the C preprocessor... " >&6; }
7305# On Suns, sometimes $CPP names a directory.
7306if test -n "$CPP" && test -d "$CPP"; then
7307  CPP=
7308fi
7309if test -z "$CPP"; then
7310  if ${ac_cv_prog_CPP+:} false; then :
7311  $as_echo_n "(cached) " >&6
7312else
7313      # Double quotes because CPP needs to be expanded
7314    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7315    do
7316      ac_preproc_ok=false
7317for ac_c_preproc_warn_flag in '' yes
7318do
7319  # Use a header file that comes with gcc, so configuring glibc
7320  # with a fresh cross-compiler works.
7321  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7322  # <limits.h> exists even on freestanding compilers.
7323  # On the NeXT, cc -E runs the code through the compiler's parser,
7324  # not just through cpp. "Syntax error" is here to catch this case.
7325  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7326/* end confdefs.h.  */
7327#ifdef __STDC__
7328# include <limits.h>
7329#else
7330# include <assert.h>
7331#endif
7332		     Syntax error
7333_ACEOF
7334if ac_fn_c_try_cpp "$LINENO"; then :
7335
7336else
7337  # Broken: fails on valid input.
7338continue
7339fi
7340rm -f conftest.err conftest.i conftest.$ac_ext
7341
7342  # OK, works on sane cases.  Now check whether nonexistent headers
7343  # can be detected and how.
7344  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7345/* end confdefs.h.  */
7346#include <ac_nonexistent.h>
7347_ACEOF
7348if ac_fn_c_try_cpp "$LINENO"; then :
7349  # Broken: success on invalid input.
7350continue
7351else
7352  # Passes both tests.
7353ac_preproc_ok=:
7354break
7355fi
7356rm -f conftest.err conftest.i conftest.$ac_ext
7357
7358done
7359# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7360rm -f conftest.i conftest.err conftest.$ac_ext
7361if $ac_preproc_ok; then :
7362  break
7363fi
7364
7365    done
7366    ac_cv_prog_CPP=$CPP
7367
7368fi
7369  CPP=$ac_cv_prog_CPP
7370else
7371  ac_cv_prog_CPP=$CPP
7372fi
7373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7374$as_echo "$CPP" >&6; }
7375ac_preproc_ok=false
7376for ac_c_preproc_warn_flag in '' yes
7377do
7378  # Use a header file that comes with gcc, so configuring glibc
7379  # with a fresh cross-compiler works.
7380  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7381  # <limits.h> exists even on freestanding compilers.
7382  # On the NeXT, cc -E runs the code through the compiler's parser,
7383  # not just through cpp. "Syntax error" is here to catch this case.
7384  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7385/* end confdefs.h.  */
7386#ifdef __STDC__
7387# include <limits.h>
7388#else
7389# include <assert.h>
7390#endif
7391		     Syntax error
7392_ACEOF
7393if ac_fn_c_try_cpp "$LINENO"; then :
7394
7395else
7396  # Broken: fails on valid input.
7397continue
7398fi
7399rm -f conftest.err conftest.i conftest.$ac_ext
7400
7401  # OK, works on sane cases.  Now check whether nonexistent headers
7402  # can be detected and how.
7403  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7404/* end confdefs.h.  */
7405#include <ac_nonexistent.h>
7406_ACEOF
7407if ac_fn_c_try_cpp "$LINENO"; then :
7408  # Broken: success on invalid input.
7409continue
7410else
7411  # Passes both tests.
7412ac_preproc_ok=:
7413break
7414fi
7415rm -f conftest.err conftest.i conftest.$ac_ext
7416
7417done
7418# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7419rm -f conftest.i conftest.err conftest.$ac_ext
7420if $ac_preproc_ok; then :
7421
7422else
7423  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7424$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7425as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7426See \`config.log' for more details" "$LINENO" 5; }
7427fi
7428
7429ac_ext=c
7430ac_cpp='$CPP $CPPFLAGS'
7431ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7432ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7433ac_compiler_gnu=$ac_cv_c_compiler_gnu
7434
7435
7436
7437
7438#
7439# Set up TAS assembly code if needed; the template file has now had its
7440# chance to request this.
7441#
7442ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
7443
7444
7445if test "$need_tas" = yes ; then
7446  TAS=tas.o
7447else
7448  TAS=""
7449fi
7450
7451
7452#
7453# Set up pkg_config in case we need it below
7454#
7455
7456
7457
7458
7459
7460
7461
7462if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7463	if test -n "$ac_tool_prefix"; then
7464  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7465set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7467$as_echo_n "checking for $ac_word... " >&6; }
7468if ${ac_cv_path_PKG_CONFIG+:} false; then :
7469  $as_echo_n "(cached) " >&6
7470else
7471  case $PKG_CONFIG in
7472  [\\/]* | ?:[\\/]*)
7473  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7474  ;;
7475  *)
7476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7477for as_dir in $PATH
7478do
7479  IFS=$as_save_IFS
7480  test -z "$as_dir" && as_dir=.
7481    for ac_exec_ext in '' $ac_executable_extensions; do
7482  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7483    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7485    break 2
7486  fi
7487done
7488  done
7489IFS=$as_save_IFS
7490
7491  ;;
7492esac
7493fi
7494PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7495if test -n "$PKG_CONFIG"; then
7496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7497$as_echo "$PKG_CONFIG" >&6; }
7498else
7499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7500$as_echo "no" >&6; }
7501fi
7502
7503
7504fi
7505if test -z "$ac_cv_path_PKG_CONFIG"; then
7506  ac_pt_PKG_CONFIG=$PKG_CONFIG
7507  # Extract the first word of "pkg-config", so it can be a program name with args.
7508set dummy pkg-config; ac_word=$2
7509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7510$as_echo_n "checking for $ac_word... " >&6; }
7511if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7512  $as_echo_n "(cached) " >&6
7513else
7514  case $ac_pt_PKG_CONFIG in
7515  [\\/]* | ?:[\\/]*)
7516  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7517  ;;
7518  *)
7519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7520for as_dir in $PATH
7521do
7522  IFS=$as_save_IFS
7523  test -z "$as_dir" && as_dir=.
7524    for ac_exec_ext in '' $ac_executable_extensions; do
7525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7526    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7528    break 2
7529  fi
7530done
7531  done
7532IFS=$as_save_IFS
7533
7534  ;;
7535esac
7536fi
7537ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7538if test -n "$ac_pt_PKG_CONFIG"; then
7539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7540$as_echo "$ac_pt_PKG_CONFIG" >&6; }
7541else
7542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7543$as_echo "no" >&6; }
7544fi
7545
7546  if test "x$ac_pt_PKG_CONFIG" = x; then
7547    PKG_CONFIG=""
7548  else
7549    case $cross_compiling:$ac_tool_warned in
7550yes:)
7551{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7552$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7553ac_tool_warned=yes ;;
7554esac
7555    PKG_CONFIG=$ac_pt_PKG_CONFIG
7556  fi
7557else
7558  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7559fi
7560
7561fi
7562if test -n "$PKG_CONFIG"; then
7563	_pkg_min_version=0.9.0
7564	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7565$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7566	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7567		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7568$as_echo "yes" >&6; }
7569	else
7570		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7571$as_echo "no" >&6; }
7572		PKG_CONFIG=""
7573	fi
7574fi
7575
7576#
7577# Automatic dependency tracking
7578#
7579
7580
7581# Check whether --enable-depend was given.
7582if test "${enable_depend+set}" = set; then :
7583  enableval=$enable_depend;
7584  case $enableval in
7585    yes)
7586      autodepend=yes
7587      ;;
7588    no)
7589      :
7590      ;;
7591    *)
7592      as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
7593      ;;
7594  esac
7595
7596else
7597  enable_depend=no
7598
7599fi
7600
7601
7602
7603
7604
7605#
7606# Enable assert checks
7607#
7608
7609
7610# Check whether --enable-cassert was given.
7611if test "${enable_cassert+set}" = set; then :
7612  enableval=$enable_cassert;
7613  case $enableval in
7614    yes)
7615
7616$as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
7617
7618      ;;
7619    no)
7620      :
7621      ;;
7622    *)
7623      as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
7624      ;;
7625  esac
7626
7627else
7628  enable_cassert=no
7629
7630fi
7631
7632
7633
7634
7635#
7636# Include directories
7637#
7638ac_save_IFS=$IFS
7639IFS="${IFS}${PATH_SEPARATOR}"
7640# SRCH_INC comes from the template file
7641for dir in $with_includes $SRCH_INC; do
7642  if test -d "$dir"; then
7643    INCLUDES="$INCLUDES -I$dir"
7644  else
7645    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
7646$as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
7647  fi
7648done
7649IFS=$ac_save_IFS
7650
7651
7652
7653#
7654# Library directories
7655#
7656ac_save_IFS=$IFS
7657IFS="${IFS}${PATH_SEPARATOR}"
7658# LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
7659for dir in $LIBRARY_DIRS $SRCH_LIB; do
7660  if test -d "$dir"; then
7661    LIBDIRS="$LIBDIRS -L$dir"
7662  else
7663    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
7664$as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
7665  fi
7666done
7667IFS=$ac_save_IFS
7668
7669#
7670# Enable thread-safe client libraries
7671#
7672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
7673$as_echo_n "checking allow thread-safe client libraries... " >&6; }
7674
7675
7676# Check whether --enable-thread-safety was given.
7677if test "${enable_thread_safety+set}" = set; then :
7678  enableval=$enable_thread_safety;
7679  case $enableval in
7680    yes)
7681      :
7682      ;;
7683    no)
7684      :
7685      ;;
7686    *)
7687      as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
7688      ;;
7689  esac
7690
7691else
7692  enable_thread_safety=yes
7693
7694fi
7695
7696
7697if test "$enable_thread_safety" = yes; then
7698
7699$as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
7700
7701fi
7702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
7703$as_echo "$enable_thread_safety" >&6; }
7704
7705
7706#
7707# ICU
7708#
7709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
7710$as_echo_n "checking whether to build with ICU support... " >&6; }
7711
7712
7713
7714# Check whether --with-icu was given.
7715if test "${with_icu+set}" = set; then :
7716  withval=$with_icu;
7717  case $withval in
7718    yes)
7719
7720$as_echo "#define USE_ICU 1" >>confdefs.h
7721
7722      ;;
7723    no)
7724      :
7725      ;;
7726    *)
7727      as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
7728      ;;
7729  esac
7730
7731else
7732  with_icu=no
7733
7734fi
7735
7736
7737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
7738$as_echo "$with_icu" >&6; }
7739
7740
7741if test "$with_icu" = yes; then
7742
7743pkg_failed=no
7744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
7745$as_echo_n "checking for icu-uc icu-i18n... " >&6; }
7746
7747if test -n "$ICU_CFLAGS"; then
7748    pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
7749 elif test -n "$PKG_CONFIG"; then
7750    if test -n "$PKG_CONFIG" && \
7751    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7752  ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7753  ac_status=$?
7754  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7755  test $ac_status = 0; }; then
7756  pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
7757		      test "x$?" != "x0" && pkg_failed=yes
7758else
7759  pkg_failed=yes
7760fi
7761 else
7762    pkg_failed=untried
7763fi
7764if test -n "$ICU_LIBS"; then
7765    pkg_cv_ICU_LIBS="$ICU_LIBS"
7766 elif test -n "$PKG_CONFIG"; then
7767    if test -n "$PKG_CONFIG" && \
7768    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7769  ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7770  ac_status=$?
7771  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7772  test $ac_status = 0; }; then
7773  pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
7774		      test "x$?" != "x0" && pkg_failed=yes
7775else
7776  pkg_failed=yes
7777fi
7778 else
7779    pkg_failed=untried
7780fi
7781
7782
7783
7784if test $pkg_failed = yes; then
7785        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7786$as_echo "no" >&6; }
7787
7788if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7789        _pkg_short_errors_supported=yes
7790else
7791        _pkg_short_errors_supported=no
7792fi
7793        if test $_pkg_short_errors_supported = yes; then
7794	        ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7795        else
7796	        ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7797        fi
7798	# Put the nasty error message in config.log where it belongs
7799	echo "$ICU_PKG_ERRORS" >&5
7800
7801	as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
7802
7803$ICU_PKG_ERRORS
7804
7805Consider adjusting the PKG_CONFIG_PATH environment variable if you
7806installed software in a non-standard prefix.
7807
7808Alternatively, you may set the environment variables ICU_CFLAGS
7809and ICU_LIBS to avoid the need to call pkg-config.
7810See the pkg-config man page for more details." "$LINENO" 5
7811elif test $pkg_failed = untried; then
7812        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7813$as_echo "no" >&6; }
7814	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7815$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7816as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
7817is in your PATH or set the PKG_CONFIG environment variable to the full
7818path to pkg-config.
7819
7820Alternatively, you may set the environment variables ICU_CFLAGS
7821and ICU_LIBS to avoid the need to call pkg-config.
7822See the pkg-config man page for more details.
7823
7824To get pkg-config, see <http://pkg-config.freedesktop.org/>.
7825See \`config.log' for more details" "$LINENO" 5; }
7826else
7827	ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
7828	ICU_LIBS=$pkg_cv_ICU_LIBS
7829        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7830$as_echo "yes" >&6; }
7831
7832fi
7833fi
7834
7835#
7836# Optionally build Tcl modules (PL/Tcl)
7837#
7838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
7839$as_echo_n "checking whether to build with Tcl... " >&6; }
7840
7841
7842
7843# Check whether --with-tcl was given.
7844if test "${with_tcl+set}" = set; then :
7845  withval=$with_tcl;
7846  case $withval in
7847    yes)
7848      :
7849      ;;
7850    no)
7851      :
7852      ;;
7853    *)
7854      as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
7855      ;;
7856  esac
7857
7858else
7859  with_tcl=no
7860
7861fi
7862
7863
7864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
7865$as_echo "$with_tcl" >&6; }
7866
7867
7868# We see if the path to the Tcl/Tk configuration scripts is specified.
7869# This will override the use of tclsh to find the paths to search.
7870
7871
7872
7873
7874# Check whether --with-tclconfig was given.
7875if test "${with_tclconfig+set}" = set; then :
7876  withval=$with_tclconfig;
7877  case $withval in
7878    yes)
7879      as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7880      ;;
7881    no)
7882      as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7883      ;;
7884    *)
7885
7886      ;;
7887  esac
7888
7889fi
7890
7891
7892
7893#
7894# Optionally build Perl modules (PL/Perl)
7895#
7896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
7897$as_echo_n "checking whether to build Perl modules... " >&6; }
7898
7899
7900
7901# Check whether --with-perl was given.
7902if test "${with_perl+set}" = set; then :
7903  withval=$with_perl;
7904  case $withval in
7905    yes)
7906      :
7907      ;;
7908    no)
7909      :
7910      ;;
7911    *)
7912      as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
7913      ;;
7914  esac
7915
7916else
7917  with_perl=no
7918
7919fi
7920
7921
7922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
7923$as_echo "$with_perl" >&6; }
7924
7925
7926#
7927# Optionally build Python modules (PL/Python)
7928#
7929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
7930$as_echo_n "checking whether to build Python modules... " >&6; }
7931
7932
7933
7934# Check whether --with-python was given.
7935if test "${with_python+set}" = set; then :
7936  withval=$with_python;
7937  case $withval in
7938    yes)
7939      :
7940      ;;
7941    no)
7942      :
7943      ;;
7944    *)
7945      as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
7946      ;;
7947  esac
7948
7949else
7950  with_python=no
7951
7952fi
7953
7954
7955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
7956$as_echo "$with_python" >&6; }
7957
7958
7959#
7960# GSSAPI
7961#
7962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
7963$as_echo_n "checking whether to build with GSSAPI support... " >&6; }
7964
7965
7966
7967# Check whether --with-gssapi was given.
7968if test "${with_gssapi+set}" = set; then :
7969  withval=$with_gssapi;
7970  case $withval in
7971    yes)
7972
7973
7974$as_echo "#define ENABLE_GSS 1" >>confdefs.h
7975
7976  krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
7977
7978      ;;
7979    no)
7980      :
7981      ;;
7982    *)
7983      as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
7984      ;;
7985  esac
7986
7987else
7988  with_gssapi=no
7989
7990fi
7991
7992
7993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
7994$as_echo "$with_gssapi" >&6; }
7995
7996
7997
7998
7999
8000
8001#
8002# Kerberos configuration parameters
8003#
8004
8005
8006
8007# Check whether --with-krb-srvnam was given.
8008if test "${with_krb_srvnam+set}" = set; then :
8009  withval=$with_krb_srvnam;
8010  case $withval in
8011    yes)
8012      as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8013      ;;
8014    no)
8015      as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8016      ;;
8017    *)
8018
8019      ;;
8020  esac
8021
8022else
8023  with_krb_srvnam="postgres"
8024fi
8025
8026
8027
8028
8029cat >>confdefs.h <<_ACEOF
8030#define PG_KRB_SRVNAM "$with_krb_srvnam"
8031_ACEOF
8032
8033
8034
8035#
8036# PAM
8037#
8038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
8039$as_echo_n "checking whether to build with PAM support... " >&6; }
8040
8041
8042
8043# Check whether --with-pam was given.
8044if test "${with_pam+set}" = set; then :
8045  withval=$with_pam;
8046  case $withval in
8047    yes)
8048
8049$as_echo "#define USE_PAM 1" >>confdefs.h
8050
8051      ;;
8052    no)
8053      :
8054      ;;
8055    *)
8056      as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
8057      ;;
8058  esac
8059
8060else
8061  with_pam=no
8062
8063fi
8064
8065
8066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
8067$as_echo "$with_pam" >&6; }
8068
8069
8070#
8071# BSD AUTH
8072#
8073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
8074$as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
8075
8076
8077
8078# Check whether --with-bsd-auth was given.
8079if test "${with_bsd_auth+set}" = set; then :
8080  withval=$with_bsd_auth;
8081  case $withval in
8082    yes)
8083
8084$as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
8085
8086      ;;
8087    no)
8088      :
8089      ;;
8090    *)
8091      as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
8092      ;;
8093  esac
8094
8095else
8096  with_bsd_auth=no
8097
8098fi
8099
8100
8101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
8102$as_echo "$with_bsd_auth" >&6; }
8103
8104
8105#
8106# LDAP
8107#
8108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
8109$as_echo_n "checking whether to build with LDAP support... " >&6; }
8110
8111
8112
8113# Check whether --with-ldap was given.
8114if test "${with_ldap+set}" = set; then :
8115  withval=$with_ldap;
8116  case $withval in
8117    yes)
8118
8119$as_echo "#define USE_LDAP 1" >>confdefs.h
8120
8121      ;;
8122    no)
8123      :
8124      ;;
8125    *)
8126      as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
8127      ;;
8128  esac
8129
8130else
8131  with_ldap=no
8132
8133fi
8134
8135
8136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
8137$as_echo "$with_ldap" >&6; }
8138
8139
8140
8141#
8142# Bonjour
8143#
8144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
8145$as_echo_n "checking whether to build with Bonjour support... " >&6; }
8146
8147
8148
8149# Check whether --with-bonjour was given.
8150if test "${with_bonjour+set}" = set; then :
8151  withval=$with_bonjour;
8152  case $withval in
8153    yes)
8154
8155$as_echo "#define USE_BONJOUR 1" >>confdefs.h
8156
8157      ;;
8158    no)
8159      :
8160      ;;
8161    *)
8162      as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
8163      ;;
8164  esac
8165
8166else
8167  with_bonjour=no
8168
8169fi
8170
8171
8172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
8173$as_echo "$with_bonjour" >&6; }
8174
8175
8176#
8177# SELinux
8178#
8179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
8180$as_echo_n "checking whether to build with SELinux support... " >&6; }
8181
8182
8183
8184# Check whether --with-selinux was given.
8185if test "${with_selinux+set}" = set; then :
8186  withval=$with_selinux;
8187  case $withval in
8188    yes)
8189      :
8190      ;;
8191    no)
8192      :
8193      ;;
8194    *)
8195      as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
8196      ;;
8197  esac
8198
8199else
8200  with_selinux=no
8201
8202fi
8203
8204
8205
8206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
8207$as_echo "$with_selinux" >&6; }
8208
8209#
8210# Systemd
8211#
8212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
8213$as_echo_n "checking whether to build with systemd support... " >&6; }
8214
8215
8216
8217# Check whether --with-systemd was given.
8218if test "${with_systemd+set}" = set; then :
8219  withval=$with_systemd;
8220  case $withval in
8221    yes)
8222
8223$as_echo "#define USE_SYSTEMD 1" >>confdefs.h
8224
8225      ;;
8226    no)
8227      :
8228      ;;
8229    *)
8230      as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
8231      ;;
8232  esac
8233
8234else
8235  with_systemd=no
8236
8237fi
8238
8239
8240
8241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
8242$as_echo "$with_systemd" >&6; }
8243
8244#
8245# Readline
8246#
8247
8248
8249
8250# Check whether --with-readline was given.
8251if test "${with_readline+set}" = set; then :
8252  withval=$with_readline;
8253  case $withval in
8254    yes)
8255      :
8256      ;;
8257    no)
8258      :
8259      ;;
8260    *)
8261      as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
8262      ;;
8263  esac
8264
8265else
8266  with_readline=yes
8267
8268fi
8269
8270
8271# readline on MinGW has problems with backslashes in psql and other bugs.
8272# This is particularly a problem with non-US code pages.
8273# Therefore disable its use until we understand the cause. 2004-07-20
8274if test "$PORTNAME" = "win32"; then
8275  if test "$with_readline" = yes; then
8276    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8277$as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8278    with_readline=no
8279  fi
8280fi
8281
8282
8283
8284#
8285# Prefer libedit
8286#
8287
8288
8289
8290# Check whether --with-libedit-preferred was given.
8291if test "${with_libedit_preferred+set}" = set; then :
8292  withval=$with_libedit_preferred;
8293  case $withval in
8294    yes)
8295      :
8296      ;;
8297    no)
8298      :
8299      ;;
8300    *)
8301      as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8302      ;;
8303  esac
8304
8305else
8306  with_libedit_preferred=no
8307
8308fi
8309
8310
8311
8312
8313#
8314# UUID library
8315#
8316# There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8317# library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8318# UUID library.  More than one of these might be present on a given platform,
8319# so we make the user say which one she wants.
8320#
8321
8322
8323
8324# Check whether --with-uuid was given.
8325if test "${with_uuid+set}" = set; then :
8326  withval=$with_uuid;
8327  case $withval in
8328    yes)
8329      as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8330      ;;
8331    no)
8332      as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8333      ;;
8334    *)
8335
8336      ;;
8337  esac
8338
8339fi
8340
8341
8342if test x"$with_uuid" = x"" ; then
8343  with_uuid=no
8344fi
8345
8346
8347
8348# Check whether --with-ossp-uuid was given.
8349if test "${with_ossp_uuid+set}" = set; then :
8350  withval=$with_ossp_uuid;
8351  case $withval in
8352    yes)
8353      :
8354      ;;
8355    no)
8356      :
8357      ;;
8358    *)
8359      as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8360      ;;
8361  esac
8362
8363else
8364  with_ossp_uuid=no
8365
8366fi
8367
8368
8369if test "$with_ossp_uuid" = yes ; then
8370  with_uuid=ossp
8371fi
8372
8373if test "$with_uuid" != no ; then
8374  if test "$with_uuid" = bsd ; then
8375
8376$as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8377
8378  elif test "$with_uuid" = e2fs ; then
8379
8380$as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
8381
8382  elif test "$with_uuid" = ossp ; then
8383
8384$as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
8385
8386  else
8387    as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
8388  fi
8389fi
8390
8391
8392
8393#
8394# XML
8395#
8396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with XML support" >&5
8397$as_echo_n "checking whether to build with XML support... " >&6; }
8398
8399
8400
8401# Check whether --with-libxml was given.
8402if test "${with_libxml+set}" = set; then :
8403  withval=$with_libxml;
8404  case $withval in
8405    yes)
8406
8407$as_echo "#define USE_LIBXML 1" >>confdefs.h
8408
8409      ;;
8410    no)
8411      :
8412      ;;
8413    *)
8414      as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
8415      ;;
8416  esac
8417
8418else
8419  with_libxml=no
8420
8421fi
8422
8423
8424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libxml" >&5
8425$as_echo "$with_libxml" >&6; }
8426
8427
8428if test "$with_libxml" = yes ; then
8429  # Check pkg-config, then xml2-config.  But for backwards compatibility,
8430  # setting XML2_CONFIG overrides pkg-config.
8431    have_libxml2_pkg_config=no
8432  if test -z "$XML2_CONFIG" -a -n "$PKG_CONFIG"; then
8433
8434pkg_failed=no
8435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.6.23" >&5
8436$as_echo_n "checking for libxml-2.0 >= 2.6.23... " >&6; }
8437
8438if test -n "$XML2_CFLAGS"; then
8439    pkg_cv_XML2_CFLAGS="$XML2_CFLAGS"
8440 elif test -n "$PKG_CONFIG"; then
8441    if test -n "$PKG_CONFIG" && \
8442    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8443  ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8444  ac_status=$?
8445  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8446  test $ac_status = 0; }; then
8447  pkg_cv_XML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.6.23" 2>/dev/null`
8448		      test "x$?" != "x0" && pkg_failed=yes
8449else
8450  pkg_failed=yes
8451fi
8452 else
8453    pkg_failed=untried
8454fi
8455if test -n "$XML2_LIBS"; then
8456    pkg_cv_XML2_LIBS="$XML2_LIBS"
8457 elif test -n "$PKG_CONFIG"; then
8458    if test -n "$PKG_CONFIG" && \
8459    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8460  ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8461  ac_status=$?
8462  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8463  test $ac_status = 0; }; then
8464  pkg_cv_XML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.6.23" 2>/dev/null`
8465		      test "x$?" != "x0" && pkg_failed=yes
8466else
8467  pkg_failed=yes
8468fi
8469 else
8470    pkg_failed=untried
8471fi
8472
8473
8474
8475if test $pkg_failed = yes; then
8476        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8477$as_echo "no" >&6; }
8478
8479if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8480        _pkg_short_errors_supported=yes
8481else
8482        _pkg_short_errors_supported=no
8483fi
8484        if test $_pkg_short_errors_supported = yes; then
8485	        XML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8486        else
8487	        XML2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8488        fi
8489	# Put the nasty error message in config.log where it belongs
8490	echo "$XML2_PKG_ERRORS" >&5
8491
8492	# do nothing
8493elif test $pkg_failed = untried; then
8494        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8495$as_echo "no" >&6; }
8496	# do nothing
8497else
8498	XML2_CFLAGS=$pkg_cv_XML2_CFLAGS
8499	XML2_LIBS=$pkg_cv_XML2_LIBS
8500        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8501$as_echo "yes" >&6; }
8502	have_libxml2_pkg_config=yes
8503fi
8504  fi
8505  if test "$have_libxml2_pkg_config" = no ; then
8506    if test -z "$XML2_CONFIG"; then
8507  for ac_prog in xml2-config
8508do
8509  # Extract the first word of "$ac_prog", so it can be a program name with args.
8510set dummy $ac_prog; ac_word=$2
8511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8512$as_echo_n "checking for $ac_word... " >&6; }
8513if ${ac_cv_path_XML2_CONFIG+:} false; then :
8514  $as_echo_n "(cached) " >&6
8515else
8516  case $XML2_CONFIG in
8517  [\\/]* | ?:[\\/]*)
8518  ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
8519  ;;
8520  *)
8521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8522for as_dir in $PATH
8523do
8524  IFS=$as_save_IFS
8525  test -z "$as_dir" && as_dir=.
8526    for ac_exec_ext in '' $ac_executable_extensions; do
8527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8528    ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8530    break 2
8531  fi
8532done
8533  done
8534IFS=$as_save_IFS
8535
8536  ;;
8537esac
8538fi
8539XML2_CONFIG=$ac_cv_path_XML2_CONFIG
8540if test -n "$XML2_CONFIG"; then
8541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8542$as_echo "$XML2_CONFIG" >&6; }
8543else
8544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8545$as_echo "no" >&6; }
8546fi
8547
8548
8549  test -n "$XML2_CONFIG" && break
8550done
8551
8552else
8553  # Report the value of XML2_CONFIG in configure's output in all cases.
8554  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
8555$as_echo_n "checking for XML2_CONFIG... " >&6; }
8556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8557$as_echo "$XML2_CONFIG" >&6; }
8558fi
8559
8560    if test -n "$XML2_CONFIG"; then
8561      XML2_CFLAGS=`$XML2_CONFIG --cflags`
8562      XML2_LIBS=`$XML2_CONFIG --libs`
8563    fi
8564  fi
8565  # Note the user could also set XML2_CFLAGS/XML2_LIBS directly
8566  for pgac_option in $XML2_CFLAGS; do
8567    case $pgac_option in
8568      -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8569    esac
8570  done
8571  for pgac_option in $XML2_LIBS; do
8572    case $pgac_option in
8573      -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8574    esac
8575  done
8576fi
8577
8578
8579#
8580# XSLT
8581#
8582
8583
8584
8585# Check whether --with-libxslt was given.
8586if test "${with_libxslt+set}" = set; then :
8587  withval=$with_libxslt;
8588  case $withval in
8589    yes)
8590
8591$as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8592
8593      ;;
8594    no)
8595      :
8596      ;;
8597    *)
8598      as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8599      ;;
8600  esac
8601
8602else
8603  with_libxslt=no
8604
8605fi
8606
8607
8608
8609
8610
8611
8612#
8613# tzdata
8614#
8615
8616
8617
8618# Check whether --with-system-tzdata was given.
8619if test "${with_system_tzdata+set}" = set; then :
8620  withval=$with_system_tzdata;
8621  case $withval in
8622    yes)
8623      as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8624      ;;
8625    no)
8626      as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8627      ;;
8628    *)
8629
8630      ;;
8631  esac
8632
8633fi
8634
8635
8636
8637
8638#
8639# Zlib
8640#
8641
8642
8643
8644# Check whether --with-zlib was given.
8645if test "${with_zlib+set}" = set; then :
8646  withval=$with_zlib;
8647  case $withval in
8648    yes)
8649      :
8650      ;;
8651    no)
8652      :
8653      ;;
8654    *)
8655      as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
8656      ;;
8657  esac
8658
8659else
8660  with_zlib=yes
8661
8662fi
8663
8664
8665
8666
8667#
8668# LZ4
8669#
8670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LZ4 support" >&5
8671$as_echo_n "checking whether to build with LZ4 support... " >&6; }
8672
8673
8674
8675# Check whether --with-lz4 was given.
8676if test "${with_lz4+set}" = set; then :
8677  withval=$with_lz4;
8678  case $withval in
8679    yes)
8680
8681$as_echo "#define USE_LZ4 1" >>confdefs.h
8682
8683      ;;
8684    no)
8685      :
8686      ;;
8687    *)
8688      as_fn_error $? "no argument expected for --with-lz4 option" "$LINENO" 5
8689      ;;
8690  esac
8691
8692else
8693  with_lz4=no
8694
8695fi
8696
8697
8698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lz4" >&5
8699$as_echo "$with_lz4" >&6; }
8700
8701
8702if test "$with_lz4" = yes; then
8703
8704pkg_failed=no
8705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblz4" >&5
8706$as_echo_n "checking for liblz4... " >&6; }
8707
8708if test -n "$LZ4_CFLAGS"; then
8709    pkg_cv_LZ4_CFLAGS="$LZ4_CFLAGS"
8710 elif test -n "$PKG_CONFIG"; then
8711    if test -n "$PKG_CONFIG" && \
8712    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
8713  ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
8714  ac_status=$?
8715  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8716  test $ac_status = 0; }; then
8717  pkg_cv_LZ4_CFLAGS=`$PKG_CONFIG --cflags "liblz4" 2>/dev/null`
8718		      test "x$?" != "x0" && pkg_failed=yes
8719else
8720  pkg_failed=yes
8721fi
8722 else
8723    pkg_failed=untried
8724fi
8725if test -n "$LZ4_LIBS"; then
8726    pkg_cv_LZ4_LIBS="$LZ4_LIBS"
8727 elif test -n "$PKG_CONFIG"; then
8728    if test -n "$PKG_CONFIG" && \
8729    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
8730  ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
8731  ac_status=$?
8732  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8733  test $ac_status = 0; }; then
8734  pkg_cv_LZ4_LIBS=`$PKG_CONFIG --libs "liblz4" 2>/dev/null`
8735		      test "x$?" != "x0" && pkg_failed=yes
8736else
8737  pkg_failed=yes
8738fi
8739 else
8740    pkg_failed=untried
8741fi
8742
8743
8744
8745if test $pkg_failed = yes; then
8746        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8747$as_echo "no" >&6; }
8748
8749if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8750        _pkg_short_errors_supported=yes
8751else
8752        _pkg_short_errors_supported=no
8753fi
8754        if test $_pkg_short_errors_supported = yes; then
8755	        LZ4_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblz4" 2>&1`
8756        else
8757	        LZ4_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblz4" 2>&1`
8758        fi
8759	# Put the nasty error message in config.log where it belongs
8760	echo "$LZ4_PKG_ERRORS" >&5
8761
8762	as_fn_error $? "Package requirements (liblz4) were not met:
8763
8764$LZ4_PKG_ERRORS
8765
8766Consider adjusting the PKG_CONFIG_PATH environment variable if you
8767installed software in a non-standard prefix.
8768
8769Alternatively, you may set the environment variables LZ4_CFLAGS
8770and LZ4_LIBS to avoid the need to call pkg-config.
8771See the pkg-config man page for more details." "$LINENO" 5
8772elif test $pkg_failed = untried; then
8773        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8774$as_echo "no" >&6; }
8775	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8776$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8777as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
8778is in your PATH or set the PKG_CONFIG environment variable to the full
8779path to pkg-config.
8780
8781Alternatively, you may set the environment variables LZ4_CFLAGS
8782and LZ4_LIBS to avoid the need to call pkg-config.
8783See the pkg-config man page for more details.
8784
8785To get pkg-config, see <http://pkg-config.freedesktop.org/>.
8786See \`config.log' for more details" "$LINENO" 5; }
8787else
8788	LZ4_CFLAGS=$pkg_cv_LZ4_CFLAGS
8789	LZ4_LIBS=$pkg_cv_LZ4_LIBS
8790        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8791$as_echo "yes" >&6; }
8792
8793fi
8794  # We only care about -I, -D, and -L switches;
8795  # note that -llz4 will be added by AC_CHECK_LIB below.
8796  for pgac_option in $LZ4_CFLAGS; do
8797    case $pgac_option in
8798      -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8799    esac
8800  done
8801  for pgac_option in $LZ4_LIBS; do
8802    case $pgac_option in
8803      -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8804    esac
8805  done
8806fi
8807
8808#
8809# Assignments
8810#
8811
8812CPPFLAGS="$CPPFLAGS $INCLUDES"
8813LDFLAGS="$LDFLAGS $LIBDIRS"
8814
8815
8816
8817
8818
8819# Check whether --with-gnu-ld was given.
8820if test "${with_gnu_ld+set}" = set; then :
8821  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8822else
8823  with_gnu_ld=no
8824fi
8825
8826ac_prog=ld
8827if test "$GCC" = yes; then
8828  # Check if gcc -print-prog-name=ld gives a path.
8829  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8830$as_echo_n "checking for ld used by GCC... " >&6; }
8831  case $host in
8832  *-*-mingw*)
8833    # gcc leaves a trailing carriage return which upsets mingw
8834    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8835  *)
8836    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8837  esac
8838  case "$ac_prog" in
8839    # Accept absolute paths.
8840    [\\/]* | [A-Za-z]:[\\/]*)
8841      re_direlt='/[^/][^/]*/\.\./'
8842      # Canonicalize the path of ld
8843      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8844      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8845	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8846      done
8847      test -z "$LD" && LD="$ac_prog"
8848      ;;
8849  "")
8850    # If it fails, then pretend we aren't using GCC.
8851    ac_prog=ld
8852    ;;
8853  *)
8854    # If it is relative, then search for the first ld in PATH.
8855    with_gnu_ld=unknown
8856    ;;
8857  esac
8858elif test "$with_gnu_ld" = yes; then
8859  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8860$as_echo_n "checking for GNU ld... " >&6; }
8861else
8862  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8863$as_echo_n "checking for non-GNU ld... " >&6; }
8864fi
8865if ${ac_cv_path_LD+:} false; then :
8866  $as_echo_n "(cached) " >&6
8867else
8868  if test -z "$LD"; then
8869  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8870  for ac_dir in $PATH; do
8871    test -z "$ac_dir" && ac_dir=.
8872    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8873      ac_cv_path_LD="$ac_dir/$ac_prog"
8874      # Check to see if the program is GNU ld.  I'd rather use --version,
8875      # but apparently some GNU ld's only accept -v.
8876      # Break only if it was the GNU/non-GNU ld that we prefer.
8877      if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8878	test "$with_gnu_ld" != no && break
8879      else
8880	test "$with_gnu_ld" != yes && break
8881      fi
8882    fi
8883  done
8884  IFS="$ac_save_ifs"
8885else
8886  ac_cv_path_LD="$LD" # Let the user override the test with a path.
8887fi
8888fi
8889
8890LD="$ac_cv_path_LD"
8891if test -n "$LD"; then
8892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8893$as_echo "$LD" >&6; }
8894else
8895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8896$as_echo "no" >&6; }
8897fi
8898test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8900$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8901if ${ac_cv_prog_gnu_ld+:} false; then :
8902  $as_echo_n "(cached) " >&6
8903else
8904  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8905if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8906  ac_cv_prog_gnu_ld=yes
8907else
8908  ac_cv_prog_gnu_ld=no
8909fi
8910fi
8911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
8912$as_echo "$ac_cv_prog_gnu_ld" >&6; }
8913with_gnu_ld=$ac_cv_prog_gnu_ld
8914
8915
8916
8917
8918if test -n "$ac_tool_prefix"; then
8919  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8920set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8922$as_echo_n "checking for $ac_word... " >&6; }
8923if ${ac_cv_prog_RANLIB+:} false; then :
8924  $as_echo_n "(cached) " >&6
8925else
8926  if test -n "$RANLIB"; then
8927  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8928else
8929as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8930for as_dir in $PATH
8931do
8932  IFS=$as_save_IFS
8933  test -z "$as_dir" && as_dir=.
8934    for ac_exec_ext in '' $ac_executable_extensions; do
8935  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8936    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8938    break 2
8939  fi
8940done
8941  done
8942IFS=$as_save_IFS
8943
8944fi
8945fi
8946RANLIB=$ac_cv_prog_RANLIB
8947if test -n "$RANLIB"; then
8948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8949$as_echo "$RANLIB" >&6; }
8950else
8951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8952$as_echo "no" >&6; }
8953fi
8954
8955
8956fi
8957if test -z "$ac_cv_prog_RANLIB"; then
8958  ac_ct_RANLIB=$RANLIB
8959  # Extract the first word of "ranlib", so it can be a program name with args.
8960set dummy ranlib; ac_word=$2
8961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8962$as_echo_n "checking for $ac_word... " >&6; }
8963if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8964  $as_echo_n "(cached) " >&6
8965else
8966  if test -n "$ac_ct_RANLIB"; then
8967  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8968else
8969as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8970for as_dir in $PATH
8971do
8972  IFS=$as_save_IFS
8973  test -z "$as_dir" && as_dir=.
8974    for ac_exec_ext in '' $ac_executable_extensions; do
8975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8976    ac_cv_prog_ac_ct_RANLIB="ranlib"
8977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8978    break 2
8979  fi
8980done
8981  done
8982IFS=$as_save_IFS
8983
8984fi
8985fi
8986ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8987if test -n "$ac_ct_RANLIB"; then
8988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8989$as_echo "$ac_ct_RANLIB" >&6; }
8990else
8991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8992$as_echo "no" >&6; }
8993fi
8994
8995  if test "x$ac_ct_RANLIB" = x; then
8996    RANLIB=":"
8997  else
8998    case $cross_compiling:$ac_tool_warned in
8999yes:)
9000{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9001$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9002ac_tool_warned=yes ;;
9003esac
9004    RANLIB=$ac_ct_RANLIB
9005  fi
9006else
9007  RANLIB="$ac_cv_prog_RANLIB"
9008fi
9009
9010
9011  if test -n "$ac_tool_prefix"; then
9012  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
9013set dummy ${ac_tool_prefix}strip; ac_word=$2
9014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9015$as_echo_n "checking for $ac_word... " >&6; }
9016if ${ac_cv_prog_STRIP+:} false; then :
9017  $as_echo_n "(cached) " >&6
9018else
9019  if test -n "$STRIP"; then
9020  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
9021else
9022as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9023for as_dir in $PATH
9024do
9025  IFS=$as_save_IFS
9026  test -z "$as_dir" && as_dir=.
9027    for ac_exec_ext in '' $ac_executable_extensions; do
9028  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9029    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
9030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9031    break 2
9032  fi
9033done
9034  done
9035IFS=$as_save_IFS
9036
9037fi
9038fi
9039STRIP=$ac_cv_prog_STRIP
9040if test -n "$STRIP"; then
9041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
9042$as_echo "$STRIP" >&6; }
9043else
9044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9045$as_echo "no" >&6; }
9046fi
9047
9048
9049fi
9050if test -z "$ac_cv_prog_STRIP"; then
9051  ac_ct_STRIP=$STRIP
9052  # Extract the first word of "strip", so it can be a program name with args.
9053set dummy strip; ac_word=$2
9054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9055$as_echo_n "checking for $ac_word... " >&6; }
9056if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
9057  $as_echo_n "(cached) " >&6
9058else
9059  if test -n "$ac_ct_STRIP"; then
9060  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
9061else
9062as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9063for as_dir in $PATH
9064do
9065  IFS=$as_save_IFS
9066  test -z "$as_dir" && as_dir=.
9067    for ac_exec_ext in '' $ac_executable_extensions; do
9068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9069    ac_cv_prog_ac_ct_STRIP="strip"
9070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9071    break 2
9072  fi
9073done
9074  done
9075IFS=$as_save_IFS
9076
9077fi
9078fi
9079ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
9080if test -n "$ac_ct_STRIP"; then
9081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
9082$as_echo "$ac_ct_STRIP" >&6; }
9083else
9084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9085$as_echo "no" >&6; }
9086fi
9087
9088  if test "x$ac_ct_STRIP" = x; then
9089    STRIP=":"
9090  else
9091    case $cross_compiling:$ac_tool_warned in
9092yes:)
9093{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9094$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9095ac_tool_warned=yes ;;
9096esac
9097    STRIP=$ac_ct_STRIP
9098  fi
9099else
9100  STRIP="$ac_cv_prog_STRIP"
9101fi
9102
9103
9104  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
9105$as_echo_n "checking whether it is possible to strip libraries... " >&6; }
9106  if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
9107    STRIP_STATIC_LIB="$STRIP -x"
9108    STRIP_SHARED_LIB="$STRIP --strip-unneeded"
9109    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9110$as_echo "yes" >&6; }
9111  else
9112    case $host_os in
9113      darwin*)
9114        STRIP="$STRIP -x"
9115        STRIP_STATIC_LIB=$STRIP
9116        STRIP_SHARED_LIB=$STRIP
9117        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9118$as_echo "yes" >&6; }
9119        ;;
9120      *)
9121        STRIP_STATIC_LIB=:
9122        STRIP_SHARED_LIB=:
9123        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9124$as_echo "no" >&6; }
9125        ;;
9126    esac
9127  fi
9128
9129
9130
9131if test -n "$ac_tool_prefix"; then
9132  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
9133set dummy ${ac_tool_prefix}ar; ac_word=$2
9134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9135$as_echo_n "checking for $ac_word... " >&6; }
9136if ${ac_cv_prog_AR+:} false; then :
9137  $as_echo_n "(cached) " >&6
9138else
9139  if test -n "$AR"; then
9140  ac_cv_prog_AR="$AR" # Let the user override the test.
9141else
9142as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9143for as_dir in $PATH
9144do
9145  IFS=$as_save_IFS
9146  test -z "$as_dir" && as_dir=.
9147    for ac_exec_ext in '' $ac_executable_extensions; do
9148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9149    ac_cv_prog_AR="${ac_tool_prefix}ar"
9150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9151    break 2
9152  fi
9153done
9154  done
9155IFS=$as_save_IFS
9156
9157fi
9158fi
9159AR=$ac_cv_prog_AR
9160if test -n "$AR"; then
9161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9162$as_echo "$AR" >&6; }
9163else
9164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9165$as_echo "no" >&6; }
9166fi
9167
9168
9169fi
9170if test -z "$ac_cv_prog_AR"; then
9171  ac_ct_AR=$AR
9172  # Extract the first word of "ar", so it can be a program name with args.
9173set dummy ar; ac_word=$2
9174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9175$as_echo_n "checking for $ac_word... " >&6; }
9176if ${ac_cv_prog_ac_ct_AR+:} false; then :
9177  $as_echo_n "(cached) " >&6
9178else
9179  if test -n "$ac_ct_AR"; then
9180  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9181else
9182as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9183for as_dir in $PATH
9184do
9185  IFS=$as_save_IFS
9186  test -z "$as_dir" && as_dir=.
9187    for ac_exec_ext in '' $ac_executable_extensions; do
9188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9189    ac_cv_prog_ac_ct_AR="ar"
9190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9191    break 2
9192  fi
9193done
9194  done
9195IFS=$as_save_IFS
9196
9197fi
9198fi
9199ac_ct_AR=$ac_cv_prog_ac_ct_AR
9200if test -n "$ac_ct_AR"; then
9201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9202$as_echo "$ac_ct_AR" >&6; }
9203else
9204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9205$as_echo "no" >&6; }
9206fi
9207
9208  if test "x$ac_ct_AR" = x; then
9209    AR="ar"
9210  else
9211    case $cross_compiling:$ac_tool_warned in
9212yes:)
9213{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9214$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9215ac_tool_warned=yes ;;
9216esac
9217    AR=$ac_ct_AR
9218  fi
9219else
9220  AR="$ac_cv_prog_AR"
9221fi
9222
9223if test "$PORTNAME" = "win32"; then
9224  if test -n "$ac_tool_prefix"; then
9225  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
9226set dummy ${ac_tool_prefix}dlltool; ac_word=$2
9227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9228$as_echo_n "checking for $ac_word... " >&6; }
9229if ${ac_cv_prog_DLLTOOL+:} false; then :
9230  $as_echo_n "(cached) " >&6
9231else
9232  if test -n "$DLLTOOL"; then
9233  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
9234else
9235as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9236for as_dir in $PATH
9237do
9238  IFS=$as_save_IFS
9239  test -z "$as_dir" && as_dir=.
9240    for ac_exec_ext in '' $ac_executable_extensions; do
9241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9242    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
9243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9244    break 2
9245  fi
9246done
9247  done
9248IFS=$as_save_IFS
9249
9250fi
9251fi
9252DLLTOOL=$ac_cv_prog_DLLTOOL
9253if test -n "$DLLTOOL"; then
9254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
9255$as_echo "$DLLTOOL" >&6; }
9256else
9257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9258$as_echo "no" >&6; }
9259fi
9260
9261
9262fi
9263if test -z "$ac_cv_prog_DLLTOOL"; then
9264  ac_ct_DLLTOOL=$DLLTOOL
9265  # Extract the first word of "dlltool", so it can be a program name with args.
9266set dummy dlltool; ac_word=$2
9267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9268$as_echo_n "checking for $ac_word... " >&6; }
9269if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
9270  $as_echo_n "(cached) " >&6
9271else
9272  if test -n "$ac_ct_DLLTOOL"; then
9273  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
9274else
9275as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9276for as_dir in $PATH
9277do
9278  IFS=$as_save_IFS
9279  test -z "$as_dir" && as_dir=.
9280    for ac_exec_ext in '' $ac_executable_extensions; do
9281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9282    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
9283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9284    break 2
9285  fi
9286done
9287  done
9288IFS=$as_save_IFS
9289
9290fi
9291fi
9292ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
9293if test -n "$ac_ct_DLLTOOL"; then
9294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
9295$as_echo "$ac_ct_DLLTOOL" >&6; }
9296else
9297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9298$as_echo "no" >&6; }
9299fi
9300
9301  if test "x$ac_ct_DLLTOOL" = x; then
9302    DLLTOOL="dlltool"
9303  else
9304    case $cross_compiling:$ac_tool_warned in
9305yes:)
9306{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9307$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9308ac_tool_warned=yes ;;
9309esac
9310    DLLTOOL=$ac_ct_DLLTOOL
9311  fi
9312else
9313  DLLTOOL="$ac_cv_prog_DLLTOOL"
9314fi
9315
9316  if test -n "$ac_tool_prefix"; then
9317  # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
9318set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
9319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9320$as_echo_n "checking for $ac_word... " >&6; }
9321if ${ac_cv_prog_DLLWRAP+:} false; then :
9322  $as_echo_n "(cached) " >&6
9323else
9324  if test -n "$DLLWRAP"; then
9325  ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
9326else
9327as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9328for as_dir in $PATH
9329do
9330  IFS=$as_save_IFS
9331  test -z "$as_dir" && as_dir=.
9332    for ac_exec_ext in '' $ac_executable_extensions; do
9333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9334    ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
9335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9336    break 2
9337  fi
9338done
9339  done
9340IFS=$as_save_IFS
9341
9342fi
9343fi
9344DLLWRAP=$ac_cv_prog_DLLWRAP
9345if test -n "$DLLWRAP"; then
9346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
9347$as_echo "$DLLWRAP" >&6; }
9348else
9349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9350$as_echo "no" >&6; }
9351fi
9352
9353
9354fi
9355if test -z "$ac_cv_prog_DLLWRAP"; then
9356  ac_ct_DLLWRAP=$DLLWRAP
9357  # Extract the first word of "dllwrap", so it can be a program name with args.
9358set dummy dllwrap; ac_word=$2
9359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9360$as_echo_n "checking for $ac_word... " >&6; }
9361if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
9362  $as_echo_n "(cached) " >&6
9363else
9364  if test -n "$ac_ct_DLLWRAP"; then
9365  ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
9366else
9367as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9368for as_dir in $PATH
9369do
9370  IFS=$as_save_IFS
9371  test -z "$as_dir" && as_dir=.
9372    for ac_exec_ext in '' $ac_executable_extensions; do
9373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9374    ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
9375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9376    break 2
9377  fi
9378done
9379  done
9380IFS=$as_save_IFS
9381
9382fi
9383fi
9384ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
9385if test -n "$ac_ct_DLLWRAP"; then
9386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
9387$as_echo "$ac_ct_DLLWRAP" >&6; }
9388else
9389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9390$as_echo "no" >&6; }
9391fi
9392
9393  if test "x$ac_ct_DLLWRAP" = x; then
9394    DLLWRAP="dllwrap"
9395  else
9396    case $cross_compiling:$ac_tool_warned in
9397yes:)
9398{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9399$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9400ac_tool_warned=yes ;;
9401esac
9402    DLLWRAP=$ac_ct_DLLWRAP
9403  fi
9404else
9405  DLLWRAP="$ac_cv_prog_DLLWRAP"
9406fi
9407
9408  if test -n "$ac_tool_prefix"; then
9409  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9410set dummy ${ac_tool_prefix}windres; ac_word=$2
9411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9412$as_echo_n "checking for $ac_word... " >&6; }
9413if ${ac_cv_prog_WINDRES+:} false; then :
9414  $as_echo_n "(cached) " >&6
9415else
9416  if test -n "$WINDRES"; then
9417  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9418else
9419as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9420for as_dir in $PATH
9421do
9422  IFS=$as_save_IFS
9423  test -z "$as_dir" && as_dir=.
9424    for ac_exec_ext in '' $ac_executable_extensions; do
9425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9426    ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9428    break 2
9429  fi
9430done
9431  done
9432IFS=$as_save_IFS
9433
9434fi
9435fi
9436WINDRES=$ac_cv_prog_WINDRES
9437if test -n "$WINDRES"; then
9438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9439$as_echo "$WINDRES" >&6; }
9440else
9441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9442$as_echo "no" >&6; }
9443fi
9444
9445
9446fi
9447if test -z "$ac_cv_prog_WINDRES"; then
9448  ac_ct_WINDRES=$WINDRES
9449  # Extract the first word of "windres", so it can be a program name with args.
9450set dummy windres; ac_word=$2
9451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9452$as_echo_n "checking for $ac_word... " >&6; }
9453if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9454  $as_echo_n "(cached) " >&6
9455else
9456  if test -n "$ac_ct_WINDRES"; then
9457  ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9458else
9459as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9460for as_dir in $PATH
9461do
9462  IFS=$as_save_IFS
9463  test -z "$as_dir" && as_dir=.
9464    for ac_exec_ext in '' $ac_executable_extensions; do
9465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9466    ac_cv_prog_ac_ct_WINDRES="windres"
9467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9468    break 2
9469  fi
9470done
9471  done
9472IFS=$as_save_IFS
9473
9474fi
9475fi
9476ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9477if test -n "$ac_ct_WINDRES"; then
9478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9479$as_echo "$ac_ct_WINDRES" >&6; }
9480else
9481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9482$as_echo "no" >&6; }
9483fi
9484
9485  if test "x$ac_ct_WINDRES" = x; then
9486    WINDRES="windres"
9487  else
9488    case $cross_compiling:$ac_tool_warned in
9489yes:)
9490{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9491$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9492ac_tool_warned=yes ;;
9493esac
9494    WINDRES=$ac_ct_WINDRES
9495  fi
9496else
9497  WINDRES="$ac_cv_prog_WINDRES"
9498fi
9499
9500fi
9501
9502# Find a good install program.  We prefer a C program (faster),
9503# so one script is as good as another.  But avoid the broken or
9504# incompatible versions:
9505# SysV /etc/install, /usr/sbin/install
9506# SunOS /usr/etc/install
9507# IRIX /sbin/install
9508# AIX /bin/install
9509# AmigaOS /C/install, which installs bootblocks on floppy discs
9510# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9511# AFS /usr/afsws/bin/install, which mishandles nonexistent args
9512# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9513# OS/2's system install, which has a completely different semantic
9514# ./install, which can be erroneously created by make from ./install.sh.
9515# Reject install programs that cannot install multiple files.
9516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9517$as_echo_n "checking for a BSD-compatible install... " >&6; }
9518if test -z "$INSTALL"; then
9519if ${ac_cv_path_install+:} false; then :
9520  $as_echo_n "(cached) " >&6
9521else
9522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9523for as_dir in $PATH
9524do
9525  IFS=$as_save_IFS
9526  test -z "$as_dir" && as_dir=.
9527    # Account for people who put trailing slashes in PATH elements.
9528case $as_dir/ in #((
9529  ./ | .// | /[cC]/* | \
9530  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9531  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9532  /usr/ucb/* ) ;;
9533  *)
9534    # OSF1 and SCO ODT 3.0 have their own names for install.
9535    # Don't use installbsd from OSF since it installs stuff as root
9536    # by default.
9537    for ac_prog in ginstall scoinst install; do
9538      for ac_exec_ext in '' $ac_executable_extensions; do
9539	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9540	  if test $ac_prog = install &&
9541	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9542	    # AIX install.  It has an incompatible calling convention.
9543	    :
9544	  elif test $ac_prog = install &&
9545	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9546	    # program-specific install script used by HP pwplus--don't use.
9547	    :
9548	  else
9549	    rm -rf conftest.one conftest.two conftest.dir
9550	    echo one > conftest.one
9551	    echo two > conftest.two
9552	    mkdir conftest.dir
9553	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9554	      test -s conftest.one && test -s conftest.two &&
9555	      test -s conftest.dir/conftest.one &&
9556	      test -s conftest.dir/conftest.two
9557	    then
9558	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9559	      break 3
9560	    fi
9561	  fi
9562	fi
9563      done
9564    done
9565    ;;
9566esac
9567
9568  done
9569IFS=$as_save_IFS
9570
9571rm -rf conftest.one conftest.two conftest.dir
9572
9573fi
9574  if test "${ac_cv_path_install+set}" = set; then
9575    INSTALL=$ac_cv_path_install
9576  else
9577    # As a last resort, use the slow shell script.  Don't cache a
9578    # value for INSTALL within a source directory, because that will
9579    # break other packages using the cache if that directory is
9580    # removed, or if the value is a relative name.
9581    INSTALL=$ac_install_sh
9582  fi
9583fi
9584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9585$as_echo "$INSTALL" >&6; }
9586
9587# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9588# It thinks the first close brace ends the variable substitution.
9589test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9590
9591test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9592
9593test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9594
9595# When Autoconf chooses install-sh as install program it tries to generate
9596# a relative path to it in each makefile where it substitutes it. This clashes
9597# with our Makefile.global concept. This workaround helps.
9598case $INSTALL in
9599  *install-sh*) install_bin='';;
9600  *) install_bin=$INSTALL;;
9601esac
9602
9603
9604if test -z "$TAR"; then
9605  for ac_prog in tar
9606do
9607  # Extract the first word of "$ac_prog", so it can be a program name with args.
9608set dummy $ac_prog; ac_word=$2
9609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9610$as_echo_n "checking for $ac_word... " >&6; }
9611if ${ac_cv_path_TAR+:} false; then :
9612  $as_echo_n "(cached) " >&6
9613else
9614  case $TAR in
9615  [\\/]* | ?:[\\/]*)
9616  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9617  ;;
9618  *)
9619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9620for as_dir in $PATH
9621do
9622  IFS=$as_save_IFS
9623  test -z "$as_dir" && as_dir=.
9624    for ac_exec_ext in '' $ac_executable_extensions; do
9625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9626    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9628    break 2
9629  fi
9630done
9631  done
9632IFS=$as_save_IFS
9633
9634  ;;
9635esac
9636fi
9637TAR=$ac_cv_path_TAR
9638if test -n "$TAR"; then
9639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9640$as_echo "$TAR" >&6; }
9641else
9642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9643$as_echo "no" >&6; }
9644fi
9645
9646
9647  test -n "$TAR" && break
9648done
9649
9650else
9651  # Report the value of TAR in configure's output in all cases.
9652  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9653$as_echo_n "checking for TAR... " >&6; }
9654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9655$as_echo "$TAR" >&6; }
9656fi
9657
9658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9659$as_echo_n "checking whether ln -s works... " >&6; }
9660LN_S=$as_ln_s
9661if test "$LN_S" = "ln -s"; then
9662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9663$as_echo "yes" >&6; }
9664else
9665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9666$as_echo "no, using $LN_S" >&6; }
9667fi
9668
9669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
9670$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
9671if test -z "$MKDIR_P"; then
9672  if ${ac_cv_path_mkdir+:} false; then :
9673  $as_echo_n "(cached) " >&6
9674else
9675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9676for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
9677do
9678  IFS=$as_save_IFS
9679  test -z "$as_dir" && as_dir=.
9680    for ac_prog in mkdir gmkdir; do
9681	 for ac_exec_ext in '' $ac_executable_extensions; do
9682	   as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
9683	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
9684	     'mkdir (GNU coreutils) '* | \
9685	     'mkdir (coreutils) '* | \
9686	     'mkdir (fileutils) '4.1*)
9687	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
9688	       break 3;;
9689	   esac
9690	 done
9691       done
9692  done
9693IFS=$as_save_IFS
9694
9695fi
9696
9697  test -d ./--version && rmdir ./--version
9698  if test "${ac_cv_path_mkdir+set}" = set; then
9699    MKDIR_P="$ac_cv_path_mkdir -p"
9700  else
9701    # As a last resort, use the slow shell script.  Don't cache a
9702    # value for MKDIR_P within a source directory, because that will
9703    # break other packages using the cache if that directory is
9704    # removed, or if the value is a relative name.
9705    MKDIR_P="$ac_install_sh -d"
9706  fi
9707fi
9708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
9709$as_echo "$MKDIR_P" >&6; }
9710
9711# When Autoconf chooses install-sh as mkdir -p program it tries to generate
9712# a relative path to it in each makefile where it substitutes it. This clashes
9713# with our Makefile.global concept. This workaround helps.
9714case $MKDIR_P in
9715  *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
9716esac
9717
9718if test -z "$BISON"; then
9719  for ac_prog in bison
9720do
9721  # Extract the first word of "$ac_prog", so it can be a program name with args.
9722set dummy $ac_prog; ac_word=$2
9723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9724$as_echo_n "checking for $ac_word... " >&6; }
9725if ${ac_cv_path_BISON+:} false; then :
9726  $as_echo_n "(cached) " >&6
9727else
9728  case $BISON in
9729  [\\/]* | ?:[\\/]*)
9730  ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
9731  ;;
9732  *)
9733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9734for as_dir in $PATH
9735do
9736  IFS=$as_save_IFS
9737  test -z "$as_dir" && as_dir=.
9738    for ac_exec_ext in '' $ac_executable_extensions; do
9739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9740    ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
9741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9742    break 2
9743  fi
9744done
9745  done
9746IFS=$as_save_IFS
9747
9748  ;;
9749esac
9750fi
9751BISON=$ac_cv_path_BISON
9752if test -n "$BISON"; then
9753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9754$as_echo "$BISON" >&6; }
9755else
9756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9757$as_echo "no" >&6; }
9758fi
9759
9760
9761  test -n "$BISON" && break
9762done
9763
9764else
9765  # Report the value of BISON in configure's output in all cases.
9766  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
9767$as_echo_n "checking for BISON... " >&6; }
9768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9769$as_echo "$BISON" >&6; }
9770fi
9771
9772
9773if test "$BISON"; then
9774  pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
9775  { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
9776$as_echo "$as_me: using $pgac_bison_version" >&6;}
9777  if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
9778  then
9779    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9780*** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9781*** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
9782$as_echo "$as_me: WARNING:
9783*** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9784*** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
9785    BISON=""
9786  fi
9787  # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
9788  # of the now preferred %name-prefix "base_yy", but the latter
9789  # doesn't work with Bison 2.3 or less.  So for now we silence the
9790  # deprecation warnings.
9791  if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
9792  then
9793    BISONFLAGS="$BISONFLAGS -Wno-deprecated"
9794  fi
9795fi
9796
9797if test -z "$BISON"; then
9798  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9799*** Without Bison you will not be able to build PostgreSQL from Git nor
9800*** change any of the parser definition files.  You can obtain Bison from
9801*** a GNU mirror site.  (If you are using the official distribution of
9802*** PostgreSQL then you do not need to worry about this, because the Bison
9803*** output is pre-generated.)" >&5
9804$as_echo "$as_me: WARNING:
9805*** Without Bison you will not be able to build PostgreSQL from Git nor
9806*** change any of the parser definition files.  You can obtain Bison from
9807*** a GNU mirror site.  (If you are using the official distribution of
9808*** PostgreSQL then you do not need to worry about this, because the Bison
9809*** output is pre-generated.)" >&2;}
9810fi
9811
9812
9813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
9814$as_echo_n "checking for flex... " >&6; }
9815if ${pgac_cv_path_flex+:} false; then :
9816  $as_echo_n "(cached) " >&6
9817else
9818  # Let the user override the test
9819if test -n "$FLEX"; then
9820  pgac_cv_path_flex=$FLEX
9821else
9822  pgac_save_IFS=$IFS
9823  IFS=$PATH_SEPARATOR
9824  for pgac_dir in $PATH; do
9825    IFS=$pgac_save_IFS
9826    if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
9827      pgac_dir=`pwd`
9828    fi
9829    for pgac_prog in flex lex; do
9830      pgac_candidate="$pgac_dir/$pgac_prog"
9831      if test -f "$pgac_candidate" \
9832        && $pgac_candidate --version </dev/null >/dev/null 2>&1
9833      then
9834        echo '%%'  > conftest.l
9835        if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
9836          pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
9837          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;}'
9838          then
9839            pgac_cv_path_flex=$pgac_candidate
9840            break 2
9841          else
9842            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9843*** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9844*** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
9845$as_echo "$as_me: WARNING:
9846*** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9847*** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
9848          fi
9849        fi
9850      fi
9851    done
9852  done
9853  rm -f conftest.l lex.yy.c
9854  : ${pgac_cv_path_flex=no}
9855fi
9856
9857fi
9858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
9859$as_echo "$pgac_cv_path_flex" >&6; }
9860if test x"$pgac_cv_path_flex" = x"no"; then
9861  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9862*** Without Flex you will not be able to build PostgreSQL from Git nor
9863*** change any of the scanner definition files.  You can obtain Flex from
9864*** a GNU mirror site.  (If you are using the official distribution of
9865*** PostgreSQL then you do not need to worry about this because the Flex
9866*** output is pre-generated.)" >&5
9867$as_echo "$as_me: WARNING:
9868*** Without Flex you will not be able to build PostgreSQL from Git nor
9869*** change any of the scanner definition files.  You can obtain Flex from
9870*** a GNU mirror site.  (If you are using the official distribution of
9871*** PostgreSQL then you do not need to worry about this because the Flex
9872*** output is pre-generated.)" >&2;}
9873
9874  FLEX=
9875else
9876  FLEX=$pgac_cv_path_flex
9877  pgac_flex_version=`$FLEX --version 2>/dev/null`
9878  { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
9879$as_echo "$as_me: using $pgac_flex_version" >&6;}
9880fi
9881
9882
9883
9884
9885
9886if test -z "$PERL"; then
9887  for ac_prog in perl
9888do
9889  # Extract the first word of "$ac_prog", so it can be a program name with args.
9890set dummy $ac_prog; ac_word=$2
9891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9892$as_echo_n "checking for $ac_word... " >&6; }
9893if ${ac_cv_path_PERL+:} false; then :
9894  $as_echo_n "(cached) " >&6
9895else
9896  case $PERL in
9897  [\\/]* | ?:[\\/]*)
9898  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
9899  ;;
9900  *)
9901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9902for as_dir in $PATH
9903do
9904  IFS=$as_save_IFS
9905  test -z "$as_dir" && as_dir=.
9906    for ac_exec_ext in '' $ac_executable_extensions; do
9907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9908    ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
9909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9910    break 2
9911  fi
9912done
9913  done
9914IFS=$as_save_IFS
9915
9916  ;;
9917esac
9918fi
9919PERL=$ac_cv_path_PERL
9920if test -n "$PERL"; then
9921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9922$as_echo "$PERL" >&6; }
9923else
9924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9925$as_echo "no" >&6; }
9926fi
9927
9928
9929  test -n "$PERL" && break
9930done
9931
9932else
9933  # Report the value of PERL in configure's output in all cases.
9934  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
9935$as_echo_n "checking for PERL... " >&6; }
9936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9937$as_echo "$PERL" >&6; }
9938fi
9939
9940
9941if test "$PERL"; then
9942  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'`
9943  { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
9944$as_echo "$as_me: using perl $pgac_perl_version" >&6;}
9945  if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
9946    $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
9947  then
9948    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9949*** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9950*** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
9951$as_echo "$as_me: WARNING:
9952*** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9953*** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
9954    PERL=""
9955  fi
9956fi
9957
9958if test -z "$PERL"; then
9959  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9960*** Without Perl you will not be able to build PostgreSQL from Git.
9961*** You can obtain Perl from any CPAN mirror site.
9962*** (If you are using the official distribution of PostgreSQL then you do not
9963*** need to worry about this, because the Perl output is pre-generated.)" >&5
9964$as_echo "$as_me: WARNING:
9965*** Without Perl you will not be able to build PostgreSQL from Git.
9966*** You can obtain Perl from any CPAN mirror site.
9967*** (If you are using the official distribution of PostgreSQL then you do not
9968*** need to worry about this, because the Perl output is pre-generated.)" >&2;}
9969fi
9970
9971if test "$with_perl" = yes; then
9972  if test -z "$PERL"; then
9973    as_fn_error $? "Perl not found" "$LINENO" 5
9974  fi
9975
9976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
9977$as_echo_n "checking for Perl archlibexp... " >&6; }
9978perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
9979test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
9980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
9981$as_echo "$perl_archlibexp" >&6; }
9982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
9983$as_echo_n "checking for Perl privlibexp... " >&6; }
9984perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
9985test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
9986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
9987$as_echo "$perl_privlibexp" >&6; }
9988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
9989$as_echo_n "checking for Perl useshrplib... " >&6; }
9990perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
9991test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
9992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
9993$as_echo "$perl_useshrplib" >&6; }
9994  if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
9995    as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
9996You might have to rebuild your Perl installation.  Refer to the
9997documentation for details.  Use --without-perl to disable building
9998PL/Perl." "$LINENO" 5
9999  fi
10000  # On most platforms, archlibexp is also where the Perl include files live ...
10001  perl_includespec="-I$perl_archlibexp/CORE"
10002  # ... but on newer macOS versions, we must use -iwithsysroot to look
10003  # under $PG_SYSROOT
10004  if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
10005    if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
10006      perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
10007    fi
10008  fi
10009
10010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
10011$as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
10012perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
10013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
10014$as_echo "$perl_ccflags" >&6; }
10015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
10016$as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
10017perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
10018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
10019$as_echo "$perl_embed_ccflags" >&6; }
10020
10021
10022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
10023$as_echo_n "checking for flags to link embedded Perl... " >&6; }
10024if test "$PORTNAME" = "win32" ; then
10025	perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
10026	if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
10027		perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10028	else
10029		perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
10030		if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
10031			perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10032		fi
10033	fi
10034else
10035	pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
10036	pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
10037	perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
10038fi
10039if test -z "$perl_embed_ldflags" ; then
10040	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10041$as_echo "no" >&6; }
10042	as_fn_error $? "could not determine flags for linking embedded Perl.
10043This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
10044installed." "$LINENO" 5
10045else
10046	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
10047$as_echo "$perl_embed_ldflags" >&6; }
10048fi
10049
10050fi
10051
10052if test "$with_python" = yes; then
10053  if test -z "$PYTHON"; then
10054  for ac_prog in python python3 python2
10055do
10056  # Extract the first word of "$ac_prog", so it can be a program name with args.
10057set dummy $ac_prog; ac_word=$2
10058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10059$as_echo_n "checking for $ac_word... " >&6; }
10060if ${ac_cv_path_PYTHON+:} false; then :
10061  $as_echo_n "(cached) " >&6
10062else
10063  case $PYTHON in
10064  [\\/]* | ?:[\\/]*)
10065  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
10066  ;;
10067  *)
10068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10069for as_dir in $PATH
10070do
10071  IFS=$as_save_IFS
10072  test -z "$as_dir" && as_dir=.
10073    for ac_exec_ext in '' $ac_executable_extensions; do
10074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10075    ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
10076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10077    break 2
10078  fi
10079done
10080  done
10081IFS=$as_save_IFS
10082
10083  ;;
10084esac
10085fi
10086PYTHON=$ac_cv_path_PYTHON
10087if test -n "$PYTHON"; then
10088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10089$as_echo "$PYTHON" >&6; }
10090else
10091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10092$as_echo "no" >&6; }
10093fi
10094
10095
10096  test -n "$PYTHON" && break
10097done
10098
10099else
10100  # Report the value of PYTHON in configure's output in all cases.
10101  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
10102$as_echo_n "checking for PYTHON... " >&6; }
10103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10104$as_echo "$PYTHON" >&6; }
10105fi
10106
10107if test x"$PYTHON" = x""; then
10108  as_fn_error $? "Python not found" "$LINENO" 5
10109fi
10110
10111
10112python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
10113{ $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
10114$as_echo "$as_me: using python $python_fullversion" >&6;}
10115# python_fullversion is typically n.n.n plus some trailing junk
10116python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
10117python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
10118python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
10119# Reject unsupported Python versions as soon as practical.
10120if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 6; then
10121  as_fn_error $? "Python version $python_version is too old (version 2.6 or later is required)" "$LINENO" 5
10122fi
10123
10124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
10125$as_echo_n "checking for Python distutils module... " >&6; }
10126if "${PYTHON}" -c 'import distutils' 2>&5
10127then
10128    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10129$as_echo "yes" >&6; }
10130else
10131    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10132$as_echo "no" >&6; }
10133    as_fn_error $? "distutils module not found" "$LINENO" 5
10134fi
10135
10136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
10137$as_echo_n "checking Python configuration directory... " >&6; }
10138python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
10139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
10140$as_echo "$python_configdir" >&6; }
10141
10142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
10143$as_echo_n "checking Python include directories... " >&6; }
10144python_includespec=`${PYTHON} -c "
10145import distutils.sysconfig
10146a = '-I' + distutils.sysconfig.get_python_inc(False)
10147b = '-I' + distutils.sysconfig.get_python_inc(True)
10148if a == b:
10149    print(a)
10150else:
10151    print(a + ' ' + b)"`
10152if test "$PORTNAME" = win32 ; then
10153    python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
10154fi
10155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
10156$as_echo "$python_includespec" >&6; }
10157
10158
10159
10160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
10161$as_echo_n "checking how to link an embedded Python application... " >&6; }
10162
10163python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
10164python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
10165
10166# If LDLIBRARY exists and has a shlib extension, use it verbatim.
10167ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
10168if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
10169then
10170	ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
10171	found_shlib=1
10172else
10173	# Otherwise, guess the base name of the shlib.
10174	# LDVERSION was added in Python 3.2, before that use VERSION,
10175	# or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
10176	python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
10177	if test x"${python_ldversion}" != x""; then
10178		ldlibrary="python${python_ldversion}"
10179	else
10180		python_version_var=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('VERSION'))))"`
10181		if test x"${python_version_var}" != x""; then
10182			ldlibrary="python${python_version_var}"
10183		else
10184			ldlibrary="python${python_version}"
10185		fi
10186	fi
10187	# Search for a likely-looking file.
10188	found_shlib=0
10189	for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10190	do
10191		# We don't know the platform DLSUFFIX here, so check 'em all.
10192		for e in .so .dll .dylib .sl; do
10193			if test -e "$d/lib${ldlibrary}$e"; then
10194				python_libdir="$d"
10195				found_shlib=1
10196				break 2
10197			fi
10198		done
10199	done
10200	# Some platforms (OpenBSD) require us to accept a bare versioned shlib
10201	# (".so.n.n") as well. However, check this only after failing to find
10202	# ".so" anywhere, because yet other platforms (Debian) put the .so
10203	# symlink in a different directory from the underlying versioned shlib.
10204	if test "$found_shlib" != 1; then
10205		for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10206		do
10207			for f in "$d/lib${ldlibrary}.so."* ; do
10208				if test -e "$f"; then
10209					python_libdir="$d"
10210					found_shlib=1
10211					break 2
10212				fi
10213			done
10214		done
10215	fi
10216	# As usual, Windows has its own ideas.  Possible default library
10217	# locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
10218	# and the "lib" prefix might not be there.
10219	if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
10220		for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
10221		do
10222			for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
10223				if test -e "$f"; then
10224					python_libdir="$d"
10225					found_shlib=1
10226					break 2
10227				fi
10228			done
10229		done
10230	fi
10231fi
10232if test "$found_shlib" != 1; then
10233	as_fn_error $? "could not find shared library for Python
10234You might have to rebuild your Python installation.  Refer to the
10235documentation for details.  Use --without-python to disable building
10236PL/Python." "$LINENO" 5
10237fi
10238python_libspec="-L${python_libdir} -l${ldlibrary}"
10239
10240python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
10241
10242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
10243$as_echo "${python_libspec} ${python_additional_libs}" >&6; }
10244
10245
10246
10247fi
10248
10249if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
10250  if test -z "$ZIC"; then
10251  for ac_prog in zic
10252do
10253  # Extract the first word of "$ac_prog", so it can be a program name with args.
10254set dummy $ac_prog; ac_word=$2
10255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10256$as_echo_n "checking for $ac_word... " >&6; }
10257if ${ac_cv_path_ZIC+:} false; then :
10258  $as_echo_n "(cached) " >&6
10259else
10260  case $ZIC in
10261  [\\/]* | ?:[\\/]*)
10262  ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
10263  ;;
10264  *)
10265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10266for as_dir in $PATH
10267do
10268  IFS=$as_save_IFS
10269  test -z "$as_dir" && as_dir=.
10270    for ac_exec_ext in '' $ac_executable_extensions; do
10271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10272    ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
10273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10274    break 2
10275  fi
10276done
10277  done
10278IFS=$as_save_IFS
10279
10280  ;;
10281esac
10282fi
10283ZIC=$ac_cv_path_ZIC
10284if test -n "$ZIC"; then
10285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10286$as_echo "$ZIC" >&6; }
10287else
10288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10289$as_echo "no" >&6; }
10290fi
10291
10292
10293  test -n "$ZIC" && break
10294done
10295
10296else
10297  # Report the value of ZIC in configure's output in all cases.
10298  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
10299$as_echo_n "checking for ZIC... " >&6; }
10300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10301$as_echo "$ZIC" >&6; }
10302fi
10303
10304  if test -z "$ZIC"; then
10305    as_fn_error $? "
10306When cross-compiling, either use the option --with-system-tzdata to use
10307existing time-zone data, or set the environment variable ZIC to a zic
10308program to use during the build." "$LINENO" 5
10309  fi
10310fi
10311
10312#
10313# Pthreads
10314#
10315# For each platform, we need to know about any special compile and link
10316# libraries, and whether the normal C function names are thread-safe.
10317# See the comment at the top of src/port/thread.c for more information.
10318# WIN32 doesn't need the pthread tests;  it always uses threads
10319#
10320# These tests are run before the library-tests, because linking with the
10321# other libraries can pull in the pthread functions as a side-effect.  We
10322# want to use the -pthread or similar flags directly, and not rely on
10323# the side-effects of linking with some other library.
10324
10325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
10326$as_echo_n "checking for a sed that does not truncate output... " >&6; }
10327if ${ac_cv_path_SED+:} false; then :
10328  $as_echo_n "(cached) " >&6
10329else
10330            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
10331     for ac_i in 1 2 3 4 5 6 7; do
10332       ac_script="$ac_script$as_nl$ac_script"
10333     done
10334     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
10335     { ac_script=; unset ac_script;}
10336     if test -z "$SED"; then
10337  ac_path_SED_found=false
10338  # Loop through the user's path and test for each of PROGNAME-LIST
10339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10340for as_dir in $PATH
10341do
10342  IFS=$as_save_IFS
10343  test -z "$as_dir" && as_dir=.
10344    for ac_prog in sed gsed; do
10345    for ac_exec_ext in '' $ac_executable_extensions; do
10346      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
10347      as_fn_executable_p "$ac_path_SED" || continue
10348# Check for GNU ac_path_SED and select it if it is found.
10349  # Check for GNU $ac_path_SED
10350case `"$ac_path_SED" --version 2>&1` in
10351*GNU*)
10352  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10353*)
10354  ac_count=0
10355  $as_echo_n 0123456789 >"conftest.in"
10356  while :
10357  do
10358    cat "conftest.in" "conftest.in" >"conftest.tmp"
10359    mv "conftest.tmp" "conftest.in"
10360    cp "conftest.in" "conftest.nl"
10361    $as_echo '' >> "conftest.nl"
10362    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10363    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10364    as_fn_arith $ac_count + 1 && ac_count=$as_val
10365    if test $ac_count -gt ${ac_path_SED_max-0}; then
10366      # Best one so far, save it but keep looking for a better one
10367      ac_cv_path_SED="$ac_path_SED"
10368      ac_path_SED_max=$ac_count
10369    fi
10370    # 10*(2^10) chars as input seems more than enough
10371    test $ac_count -gt 10 && break
10372  done
10373  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10374esac
10375
10376      $ac_path_SED_found && break 3
10377    done
10378  done
10379  done
10380IFS=$as_save_IFS
10381  if test -z "$ac_cv_path_SED"; then
10382    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10383  fi
10384else
10385  ac_cv_path_SED=$SED
10386fi
10387
10388fi
10389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10390$as_echo "$ac_cv_path_SED" >&6; }
10391 SED="$ac_cv_path_SED"
10392  rm -f conftest.sed
10393
10394
10395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
10396$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
10397if ${ac_cv_path_GREP+:} false; then :
10398  $as_echo_n "(cached) " >&6
10399else
10400  if test -z "$GREP"; then
10401  ac_path_GREP_found=false
10402  # Loop through the user's path and test for each of PROGNAME-LIST
10403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10404for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10405do
10406  IFS=$as_save_IFS
10407  test -z "$as_dir" && as_dir=.
10408    for ac_prog in grep ggrep; do
10409    for ac_exec_ext in '' $ac_executable_extensions; do
10410      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
10411      as_fn_executable_p "$ac_path_GREP" || continue
10412# Check for GNU ac_path_GREP and select it if it is found.
10413  # Check for GNU $ac_path_GREP
10414case `"$ac_path_GREP" --version 2>&1` in
10415*GNU*)
10416  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
10417*)
10418  ac_count=0
10419  $as_echo_n 0123456789 >"conftest.in"
10420  while :
10421  do
10422    cat "conftest.in" "conftest.in" >"conftest.tmp"
10423    mv "conftest.tmp" "conftest.in"
10424    cp "conftest.in" "conftest.nl"
10425    $as_echo 'GREP' >> "conftest.nl"
10426    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10427    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10428    as_fn_arith $ac_count + 1 && ac_count=$as_val
10429    if test $ac_count -gt ${ac_path_GREP_max-0}; then
10430      # Best one so far, save it but keep looking for a better one
10431      ac_cv_path_GREP="$ac_path_GREP"
10432      ac_path_GREP_max=$ac_count
10433    fi
10434    # 10*(2^10) chars as input seems more than enough
10435    test $ac_count -gt 10 && break
10436  done
10437  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10438esac
10439
10440      $ac_path_GREP_found && break 3
10441    done
10442  done
10443  done
10444IFS=$as_save_IFS
10445  if test -z "$ac_cv_path_GREP"; then
10446    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10447  fi
10448else
10449  ac_cv_path_GREP=$GREP
10450fi
10451
10452fi
10453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
10454$as_echo "$ac_cv_path_GREP" >&6; }
10455 GREP="$ac_cv_path_GREP"
10456
10457
10458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
10459$as_echo_n "checking for egrep... " >&6; }
10460if ${ac_cv_path_EGREP+:} false; then :
10461  $as_echo_n "(cached) " >&6
10462else
10463  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
10464   then ac_cv_path_EGREP="$GREP -E"
10465   else
10466     if test -z "$EGREP"; then
10467  ac_path_EGREP_found=false
10468  # Loop through the user's path and test for each of PROGNAME-LIST
10469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10470for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10471do
10472  IFS=$as_save_IFS
10473  test -z "$as_dir" && as_dir=.
10474    for ac_prog in egrep; do
10475    for ac_exec_ext in '' $ac_executable_extensions; do
10476      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
10477      as_fn_executable_p "$ac_path_EGREP" || continue
10478# Check for GNU ac_path_EGREP and select it if it is found.
10479  # Check for GNU $ac_path_EGREP
10480case `"$ac_path_EGREP" --version 2>&1` in
10481*GNU*)
10482  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
10483*)
10484  ac_count=0
10485  $as_echo_n 0123456789 >"conftest.in"
10486  while :
10487  do
10488    cat "conftest.in" "conftest.in" >"conftest.tmp"
10489    mv "conftest.tmp" "conftest.in"
10490    cp "conftest.in" "conftest.nl"
10491    $as_echo 'EGREP' >> "conftest.nl"
10492    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10493    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10494    as_fn_arith $ac_count + 1 && ac_count=$as_val
10495    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
10496      # Best one so far, save it but keep looking for a better one
10497      ac_cv_path_EGREP="$ac_path_EGREP"
10498      ac_path_EGREP_max=$ac_count
10499    fi
10500    # 10*(2^10) chars as input seems more than enough
10501    test $ac_count -gt 10 && break
10502  done
10503  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10504esac
10505
10506      $ac_path_EGREP_found && break 3
10507    done
10508  done
10509  done
10510IFS=$as_save_IFS
10511  if test -z "$ac_cv_path_EGREP"; then
10512    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10513  fi
10514else
10515  ac_cv_path_EGREP=$EGREP
10516fi
10517
10518   fi
10519fi
10520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
10521$as_echo "$ac_cv_path_EGREP" >&6; }
10522 EGREP="$ac_cv_path_EGREP"
10523
10524
10525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10526$as_echo_n "checking for ANSI C header files... " >&6; }
10527if ${ac_cv_header_stdc+:} false; then :
10528  $as_echo_n "(cached) " >&6
10529else
10530  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10531/* end confdefs.h.  */
10532#include <stdlib.h>
10533#include <stdarg.h>
10534#include <string.h>
10535#include <float.h>
10536
10537int
10538main ()
10539{
10540
10541  ;
10542  return 0;
10543}
10544_ACEOF
10545if ac_fn_c_try_compile "$LINENO"; then :
10546  ac_cv_header_stdc=yes
10547else
10548  ac_cv_header_stdc=no
10549fi
10550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10551
10552if test $ac_cv_header_stdc = yes; then
10553  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10554  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10555/* end confdefs.h.  */
10556#include <string.h>
10557
10558_ACEOF
10559if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10560  $EGREP "memchr" >/dev/null 2>&1; then :
10561
10562else
10563  ac_cv_header_stdc=no
10564fi
10565rm -f conftest*
10566
10567fi
10568
10569if test $ac_cv_header_stdc = yes; then
10570  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10571  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10572/* end confdefs.h.  */
10573#include <stdlib.h>
10574
10575_ACEOF
10576if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10577  $EGREP "free" >/dev/null 2>&1; then :
10578
10579else
10580  ac_cv_header_stdc=no
10581fi
10582rm -f conftest*
10583
10584fi
10585
10586if test $ac_cv_header_stdc = yes; then
10587  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10588  if test "$cross_compiling" = yes; then :
10589  :
10590else
10591  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10592/* end confdefs.h.  */
10593#include <ctype.h>
10594#include <stdlib.h>
10595#if ((' ' & 0x0FF) == 0x020)
10596# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10597# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10598#else
10599# define ISLOWER(c) \
10600		   (('a' <= (c) && (c) <= 'i') \
10601		     || ('j' <= (c) && (c) <= 'r') \
10602		     || ('s' <= (c) && (c) <= 'z'))
10603# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10604#endif
10605
10606#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10607int
10608main ()
10609{
10610  int i;
10611  for (i = 0; i < 256; i++)
10612    if (XOR (islower (i), ISLOWER (i))
10613	|| toupper (i) != TOUPPER (i))
10614      return 2;
10615  return 0;
10616}
10617_ACEOF
10618if ac_fn_c_try_run "$LINENO"; then :
10619
10620else
10621  ac_cv_header_stdc=no
10622fi
10623rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10624  conftest.$ac_objext conftest.beam conftest.$ac_ext
10625fi
10626
10627fi
10628fi
10629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10630$as_echo "$ac_cv_header_stdc" >&6; }
10631if test $ac_cv_header_stdc = yes; then
10632
10633$as_echo "#define STDC_HEADERS 1" >>confdefs.h
10634
10635fi
10636
10637# On IRIX 5.3, sys/types and inttypes.h are conflicting.
10638for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10639		  inttypes.h stdint.h unistd.h
10640do :
10641  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10642ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
10643"
10644if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10645  cat >>confdefs.h <<_ACEOF
10646#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10647_ACEOF
10648
10649fi
10650
10651done
10652
10653
10654if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
10655   # then
10656
10657
10658
10659
10660ac_ext=c
10661ac_cpp='$CPP $CPPFLAGS'
10662ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10663ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10664ac_compiler_gnu=$ac_cv_c_compiler_gnu
10665
10666ax_pthread_ok=no
10667
10668# We used to check for pthread.h first, but this fails if pthread.h
10669# requires special compiler flags (e.g. on Tru64 or Sequent).
10670# It gets checked for in the link test anyway.
10671
10672# First of all, check if the user has set any of the PTHREAD_LIBS,
10673# etcetera environment variables, and if threads linking works using
10674# them:
10675if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
10676        ax_pthread_save_CC="$CC"
10677        ax_pthread_save_CFLAGS="$CFLAGS"
10678        ax_pthread_save_LIBS="$LIBS"
10679        if test "x$PTHREAD_CC" != "x"; then :
10680  CC="$PTHREAD_CC"
10681fi
10682        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10683        LIBS="$PTHREAD_LIBS $LIBS"
10684        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
10685$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
10686        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10687/* end confdefs.h.  */
10688
10689/* Override any GCC internal prototype to avoid an error.
10690   Use char because int might match the return type of a GCC
10691   builtin and then its argument prototype would still apply.  */
10692#ifdef __cplusplus
10693extern "C"
10694#endif
10695char pthread_join ();
10696int
10697main ()
10698{
10699return pthread_join ();
10700  ;
10701  return 0;
10702}
10703_ACEOF
10704if ac_fn_c_try_link "$LINENO"; then :
10705  ax_pthread_ok=yes
10706fi
10707rm -f core conftest.err conftest.$ac_objext \
10708    conftest$ac_exeext conftest.$ac_ext
10709        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10710$as_echo "$ax_pthread_ok" >&6; }
10711        if test "x$ax_pthread_ok" = "xno"; then
10712                PTHREAD_LIBS=""
10713                PTHREAD_CFLAGS=""
10714        fi
10715        CC="$ax_pthread_save_CC"
10716        CFLAGS="$ax_pthread_save_CFLAGS"
10717        LIBS="$ax_pthread_save_LIBS"
10718fi
10719
10720# We must check for the threads library under a number of different
10721# names; the ordering is very important because some systems
10722# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
10723# libraries is broken (non-POSIX).
10724
10725# Create a list of thread flags to try.  Items starting with a "-" are
10726# C compiler flags, and other items are library names, except for "none"
10727# which indicates that we try without any flags at all, and "pthread-config"
10728# which is a program returning the flags for the Pth emulation library.
10729
10730ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
10731
10732# The ordering *is* (sometimes) important.  Some notes on the
10733# individual items follow:
10734
10735# pthreads: AIX (must check this before -lpthread)
10736# none: in case threads are in libc; should be tried before -Kthread and
10737#       other compiler flags to prevent continual compiler warnings
10738# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
10739# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
10740#           (Note: HP C rejects this with "bad form for `-t' option")
10741# -pthreads: Solaris/gcc (Note: HP C also rejects)
10742# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
10743#      doesn't hurt to check since this sometimes defines pthreads and
10744#      -D_REENTRANT too), HP C (must be checked before -lpthread, which
10745#      is present but should not be used directly; and before -mthreads,
10746#      because the compiler interprets this as "-mt" + "-hreads")
10747# -mthreads: Mingw32/gcc, Lynx/gcc
10748# pthread: Linux, etcetera
10749# --thread-safe: KAI C++
10750# pthread-config: use pthread-config program (for GNU Pth library)
10751
10752case $host_os in
10753
10754        freebsd*)
10755
10756        # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
10757        # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
10758
10759        ax_pthread_flags="-kthread lthread $ax_pthread_flags"
10760        ;;
10761
10762        hpux*)
10763
10764        # From the cc(1) man page: "[-mt] Sets various -D flags to enable
10765        # multi-threading and also sets -lpthread."
10766
10767        ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
10768        ;;
10769
10770        openedition*)
10771
10772        # IBM z/OS requires a feature-test macro to be defined in order to
10773        # enable POSIX threads at all, so give the user a hint if this is
10774        # not set. (We don't define these ourselves, as they can affect
10775        # other portions of the system API in unpredictable ways.)
10776
10777        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10778/* end confdefs.h.  */
10779
10780#            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
10781             AX_PTHREAD_ZOS_MISSING
10782#            endif
10783
10784_ACEOF
10785if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10786  $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
10787  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
10788$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
10789fi
10790rm -f conftest*
10791
10792        ;;
10793
10794        solaris*)
10795
10796        # On Solaris (at least, for some versions), libc contains stubbed
10797        # (non-functional) versions of the pthreads routines, so link-based
10798        # tests will erroneously succeed. (N.B.: The stubs are missing
10799        # pthread_cleanup_push, or rather a function called by this macro,
10800        # so we could check for that, but who knows whether they'll stub
10801        # that too in a future libc.)  So we'll check first for the
10802        # standard Solaris way of linking pthreads (-mt -lpthread).
10803
10804        ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
10805        ;;
10806esac
10807
10808# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
10809
10810if test "x$GCC" = "xyes"; then :
10811  ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
10812fi
10813
10814# The presence of a feature test macro requesting re-entrant function
10815# definitions is, on some systems, a strong hint that pthreads support is
10816# correctly enabled
10817
10818case $host_os in
10819        darwin* | hpux* | linux* | osf* | solaris*)
10820        ax_pthread_check_macro="_REENTRANT"
10821        ;;
10822
10823        aix*)
10824        ax_pthread_check_macro="_THREAD_SAFE"
10825        ;;
10826
10827        *)
10828        ax_pthread_check_macro="--"
10829        ;;
10830esac
10831if test "x$ax_pthread_check_macro" = "x--"; then :
10832  ax_pthread_check_cond=0
10833else
10834  ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
10835fi
10836
10837# Are we compiling with Clang?
10838
10839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
10840$as_echo_n "checking whether $CC is Clang... " >&6; }
10841if ${ax_cv_PTHREAD_CLANG+:} false; then :
10842  $as_echo_n "(cached) " >&6
10843else
10844  ax_cv_PTHREAD_CLANG=no
10845     # Note that Autoconf sets GCC=yes for Clang as well as GCC
10846     if test "x$GCC" = "xyes"; then
10847        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10848/* end confdefs.h.  */
10849/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
10850#            if defined(__clang__) && defined(__llvm__)
10851             AX_PTHREAD_CC_IS_CLANG
10852#            endif
10853
10854_ACEOF
10855if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10856  $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
10857  ax_cv_PTHREAD_CLANG=yes
10858fi
10859rm -f conftest*
10860
10861     fi
10862
10863fi
10864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
10865$as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
10866ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
10867
10868ax_pthread_clang_warning=no
10869
10870# Clang needs special handling, because older versions handle the -pthread
10871# option in a rather... idiosyncratic way
10872
10873if test "x$ax_pthread_clang" = "xyes"; then
10874
10875        # Clang takes -pthread; it has never supported any other flag
10876
10877        # (Note 1: This will need to be revisited if a system that Clang
10878        # supports has POSIX threads in a separate library.  This tends not
10879        # to be the way of modern systems, but it's conceivable.)
10880
10881        # (Note 2: On some systems, notably Darwin, -pthread is not needed
10882        # to get POSIX threads support; the API is always present and
10883        # active.  We could reasonably leave PTHREAD_CFLAGS empty.  But
10884        # -pthread does define _REENTRANT, and while the Darwin headers
10885        # ignore this macro, third-party headers might not.)
10886
10887        PTHREAD_CFLAGS="-pthread"
10888        PTHREAD_LIBS=
10889
10890        ax_pthread_ok=yes
10891
10892        # However, older versions of Clang make a point of warning the user
10893        # that, in an invocation where only linking and no compilation is
10894        # taking place, the -pthread option has no effect ("argument unused
10895        # during compilation").  They expect -pthread to be passed in only
10896        # when source code is being compiled.
10897        #
10898        # Problem is, this is at odds with the way Automake and most other
10899        # C build frameworks function, which is that the same flags used in
10900        # compilation (CFLAGS) are also used in linking.  Many systems
10901        # supported by AX_PTHREAD require exactly this for POSIX threads
10902        # support, and in fact it is often not straightforward to specify a
10903        # flag that is used only in the compilation phase and not in
10904        # linking.  Such a scenario is extremely rare in practice.
10905        #
10906        # Even though use of the -pthread flag in linking would only print
10907        # a warning, this can be a nuisance for well-run software projects
10908        # that build with -Werror.  So if the active version of Clang has
10909        # this misfeature, we search for an option to squash it.
10910
10911        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
10912$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
10913if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
10914  $as_echo_n "(cached) " >&6
10915else
10916  ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
10917             # Create an alternate version of $ac_link that compiles and
10918             # links in two steps (.c -> .o, .o -> exe) instead of one
10919             # (.c -> exe), because the warning occurs only in the second
10920             # step
10921             ax_pthread_save_ac_link="$ac_link"
10922             ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
10923             ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
10924             ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
10925             ax_pthread_save_CFLAGS="$CFLAGS"
10926             for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
10927                if test "x$ax_pthread_try" = "xunknown"; then :
10928  break
10929fi
10930                CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
10931                ac_link="$ax_pthread_save_ac_link"
10932                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10933/* end confdefs.h.  */
10934int main(void){return 0;}
10935_ACEOF
10936if ac_fn_c_try_link "$LINENO"; then :
10937  ac_link="$ax_pthread_2step_ac_link"
10938                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10939/* end confdefs.h.  */
10940int main(void){return 0;}
10941_ACEOF
10942if ac_fn_c_try_link "$LINENO"; then :
10943  break
10944fi
10945rm -f core conftest.err conftest.$ac_objext \
10946    conftest$ac_exeext conftest.$ac_ext
10947
10948fi
10949rm -f core conftest.err conftest.$ac_objext \
10950    conftest$ac_exeext conftest.$ac_ext
10951             done
10952             ac_link="$ax_pthread_save_ac_link"
10953             CFLAGS="$ax_pthread_save_CFLAGS"
10954             if test "x$ax_pthread_try" = "x"; then :
10955  ax_pthread_try=no
10956fi
10957             ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
10958
10959fi
10960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
10961$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
10962
10963        case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
10964                no | unknown) ;;
10965                *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
10966        esac
10967
10968fi # $ax_pthread_clang = yes
10969
10970if test "x$ax_pthread_ok" = "xno"; then
10971for ax_pthread_try_flag in $ax_pthread_flags; do
10972
10973        case $ax_pthread_try_flag in
10974                none)
10975                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
10976$as_echo_n "checking whether pthreads work without any flags... " >&6; }
10977                ;;
10978
10979                -mt,pthread)
10980                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
10981$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
10982                PTHREAD_CFLAGS="-mt"
10983                PTHREAD_LIBS="-lpthread"
10984                ;;
10985
10986                -*)
10987                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
10988$as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
10989                PTHREAD_CFLAGS="$ax_pthread_try_flag"
10990                ;;
10991
10992                pthread-config)
10993                # Extract the first word of "pthread-config", so it can be a program name with args.
10994set dummy pthread-config; ac_word=$2
10995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10996$as_echo_n "checking for $ac_word... " >&6; }
10997if ${ac_cv_prog_ax_pthread_config+:} false; then :
10998  $as_echo_n "(cached) " >&6
10999else
11000  if test -n "$ax_pthread_config"; then
11001  ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
11002else
11003as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11004for as_dir in $PATH
11005do
11006  IFS=$as_save_IFS
11007  test -z "$as_dir" && as_dir=.
11008    for ac_exec_ext in '' $ac_executable_extensions; do
11009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11010    ac_cv_prog_ax_pthread_config="yes"
11011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11012    break 2
11013  fi
11014done
11015  done
11016IFS=$as_save_IFS
11017
11018  test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
11019fi
11020fi
11021ax_pthread_config=$ac_cv_prog_ax_pthread_config
11022if test -n "$ax_pthread_config"; then
11023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
11024$as_echo "$ax_pthread_config" >&6; }
11025else
11026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11027$as_echo "no" >&6; }
11028fi
11029
11030
11031                if test "x$ax_pthread_config" = "xno"; then :
11032  continue
11033fi
11034                PTHREAD_CFLAGS="`pthread-config --cflags`"
11035                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
11036                ;;
11037
11038                *)
11039                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
11040$as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
11041                PTHREAD_LIBS="-l$ax_pthread_try_flag"
11042                ;;
11043        esac
11044
11045        ax_pthread_save_CFLAGS="$CFLAGS"
11046        ax_pthread_save_LIBS="$LIBS"
11047        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11048        LIBS="$PTHREAD_LIBS $LIBS"
11049
11050        # Check for various functions.  We must include pthread.h,
11051        # since some functions may be macros.  (On the Sequent, we
11052        # need a special flag -Kthread to make this header compile.)
11053        # We check for pthread_join because it is in -lpthread on IRIX
11054        # while pthread_create is in libc.  We check for pthread_attr_init
11055        # due to DEC craziness with -lpthreads.  We check for
11056        # pthread_cleanup_push because it is one of the few pthread
11057        # functions on Solaris that doesn't have a non-functional libc stub.
11058        # We try pthread_create on general principles.
11059
11060        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11061/* end confdefs.h.  */
11062#include <pthread.h>
11063#                       if $ax_pthread_check_cond
11064#                        error "$ax_pthread_check_macro must be defined"
11065#                       endif
11066                        static void routine(void *a) { a = 0; }
11067                        static void *start_routine(void *a) { return a; }
11068int
11069main ()
11070{
11071pthread_t th; pthread_attr_t attr;
11072                        pthread_create(&th, 0, start_routine, 0);
11073                        pthread_join(th, 0);
11074                        pthread_attr_init(&attr);
11075                        pthread_cleanup_push(routine, 0);
11076                        pthread_cleanup_pop(0) /* ; */
11077  ;
11078  return 0;
11079}
11080_ACEOF
11081if ac_fn_c_try_link "$LINENO"; then :
11082  ax_pthread_ok=yes
11083fi
11084rm -f core conftest.err conftest.$ac_objext \
11085    conftest$ac_exeext conftest.$ac_ext
11086
11087        CFLAGS="$ax_pthread_save_CFLAGS"
11088        LIBS="$ax_pthread_save_LIBS"
11089
11090        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
11091$as_echo "$ax_pthread_ok" >&6; }
11092        if test "x$ax_pthread_ok" = "xyes"; then :
11093  break
11094fi
11095
11096        PTHREAD_LIBS=""
11097        PTHREAD_CFLAGS=""
11098done
11099fi
11100
11101# Various other checks:
11102if test "x$ax_pthread_ok" = "xyes"; then
11103        ax_pthread_save_CFLAGS="$CFLAGS"
11104        ax_pthread_save_LIBS="$LIBS"
11105        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11106        LIBS="$PTHREAD_LIBS $LIBS"
11107
11108        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
11109        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
11110$as_echo_n "checking for joinable pthread attribute... " >&6; }
11111if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
11112  $as_echo_n "(cached) " >&6
11113else
11114  ax_cv_PTHREAD_JOINABLE_ATTR=unknown
11115             for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
11116                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11117/* end confdefs.h.  */
11118#include <pthread.h>
11119int
11120main ()
11121{
11122int attr = $ax_pthread_attr; return attr /* ; */
11123  ;
11124  return 0;
11125}
11126_ACEOF
11127if ac_fn_c_try_link "$LINENO"; then :
11128  ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
11129fi
11130rm -f core conftest.err conftest.$ac_objext \
11131    conftest$ac_exeext conftest.$ac_ext
11132             done
11133
11134fi
11135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
11136$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
11137        if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
11138               test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
11139               test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
11140
11141cat >>confdefs.h <<_ACEOF
11142#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
11143_ACEOF
11144
11145               ax_pthread_joinable_attr_defined=yes
11146
11147fi
11148
11149        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
11150$as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
11151if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
11152  $as_echo_n "(cached) " >&6
11153else
11154  ax_cv_PTHREAD_SPECIAL_FLAGS=no
11155             case $host_os in
11156             solaris*)
11157             ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
11158             ;;
11159             esac
11160
11161fi
11162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
11163$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
11164        if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
11165               test "x$ax_pthread_special_flags_added" != "xyes"; then :
11166  PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
11167               ax_pthread_special_flags_added=yes
11168fi
11169
11170        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
11171$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
11172if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
11173  $as_echo_n "(cached) " >&6
11174else
11175  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11176/* end confdefs.h.  */
11177#include <pthread.h>
11178int
11179main ()
11180{
11181int i = PTHREAD_PRIO_INHERIT;
11182  ;
11183  return 0;
11184}
11185_ACEOF
11186if ac_fn_c_try_link "$LINENO"; then :
11187  ax_cv_PTHREAD_PRIO_INHERIT=yes
11188else
11189  ax_cv_PTHREAD_PRIO_INHERIT=no
11190fi
11191rm -f core conftest.err conftest.$ac_objext \
11192    conftest$ac_exeext conftest.$ac_ext
11193
11194fi
11195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
11196$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
11197        if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
11198               test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
11199
11200$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
11201
11202               ax_pthread_prio_inherit_defined=yes
11203
11204fi
11205
11206        CFLAGS="$ax_pthread_save_CFLAGS"
11207        LIBS="$ax_pthread_save_LIBS"
11208
11209        # More AIX lossage: compile with *_r variant
11210        if test "x$GCC" != "xyes"; then
11211            case $host_os in
11212                aix*)
11213                case "x/$CC" in #(
11214  x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
11215    #handle absolute path differently from PATH based program lookup
11216                     case "x$CC" in #(
11217  x/*) :
11218    if as_fn_executable_p ${CC}_r; then :
11219  PTHREAD_CC="${CC}_r"
11220fi ;; #(
11221  *) :
11222    for ac_prog in ${CC}_r
11223do
11224  # Extract the first word of "$ac_prog", so it can be a program name with args.
11225set dummy $ac_prog; ac_word=$2
11226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11227$as_echo_n "checking for $ac_word... " >&6; }
11228if ${ac_cv_prog_PTHREAD_CC+:} false; then :
11229  $as_echo_n "(cached) " >&6
11230else
11231  if test -n "$PTHREAD_CC"; then
11232  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
11233else
11234as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11235for as_dir in $PATH
11236do
11237  IFS=$as_save_IFS
11238  test -z "$as_dir" && as_dir=.
11239    for ac_exec_ext in '' $ac_executable_extensions; do
11240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11241    ac_cv_prog_PTHREAD_CC="$ac_prog"
11242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11243    break 2
11244  fi
11245done
11246  done
11247IFS=$as_save_IFS
11248
11249fi
11250fi
11251PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
11252if test -n "$PTHREAD_CC"; then
11253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
11254$as_echo "$PTHREAD_CC" >&6; }
11255else
11256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11257$as_echo "no" >&6; }
11258fi
11259
11260
11261  test -n "$PTHREAD_CC" && break
11262done
11263test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11264 ;;
11265esac ;; #(
11266  *) :
11267     ;;
11268esac
11269                ;;
11270            esac
11271        fi
11272fi
11273
11274test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11275
11276
11277
11278
11279
11280# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
11281if test "x$ax_pthread_ok" = "xyes"; then
11282
11283$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
11284
11285        :
11286else
11287        ax_pthread_ok=no
11288
11289fi
11290ac_ext=c
11291ac_cpp='$CPP $CPPFLAGS'
11292ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11293ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11294ac_compiler_gnu=$ac_cv_c_compiler_gnu
11295
11296	# set thread flags
11297
11298# Some platforms use these, so just define them.  They can't hurt if they
11299# are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
11300# enables 5-arg getpwuid_r, among other things.
11301PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
11302
11303# Check for *_r functions
11304_CFLAGS="$CFLAGS"
11305_LIBS="$LIBS"
11306CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11307LIBS="$LIBS $PTHREAD_LIBS"
11308
11309ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11310if test "x$ac_cv_header_pthread_h" = xyes; then :
11311
11312else
11313  as_fn_error $? "
11314pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
11315fi
11316
11317
11318
11319for ac_func in strerror_r getpwuid_r gethostbyname_r
11320do :
11321  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11322ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11323if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11324  cat >>confdefs.h <<_ACEOF
11325#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11326_ACEOF
11327
11328fi
11329done
11330
11331
11332# Do test here with the proper thread flags
11333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
11334$as_echo_n "checking whether strerror_r returns int... " >&6; }
11335if ${pgac_cv_func_strerror_r_int+:} false; then :
11336  $as_echo_n "(cached) " >&6
11337else
11338  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11339/* end confdefs.h.  */
11340#include <string.h>
11341int
11342main ()
11343{
11344char buf[100];
11345  switch (strerror_r(1, buf, sizeof(buf)))
11346  { case 0: break; default: break; }
11347
11348  ;
11349  return 0;
11350}
11351_ACEOF
11352if ac_fn_c_try_compile "$LINENO"; then :
11353  pgac_cv_func_strerror_r_int=yes
11354else
11355  pgac_cv_func_strerror_r_int=no
11356fi
11357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11358fi
11359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
11360$as_echo "$pgac_cv_func_strerror_r_int" >&6; }
11361if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
11362
11363$as_echo "#define STRERROR_R_INT 1" >>confdefs.h
11364
11365fi
11366
11367
11368CFLAGS="$_CFLAGS"
11369LIBS="$_LIBS"
11370
11371
11372else
11373   # else
11374# do not use values from template file
11375PTHREAD_CFLAGS=
11376PTHREAD_LIBS=
11377
11378fi # fi
11379
11380
11381
11382
11383
11384##
11385## Libraries
11386##
11387## Most libraries are included only if they demonstrably provide a function
11388## we need, but libm is an exception: always include it, because there are
11389## too many compilers that play cute optimization games that will break
11390## probes for standard functions such as pow().
11391##
11392
11393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
11394$as_echo_n "checking for main in -lm... " >&6; }
11395if ${ac_cv_lib_m_main+:} false; then :
11396  $as_echo_n "(cached) " >&6
11397else
11398  ac_check_lib_save_LIBS=$LIBS
11399LIBS="-lm  $LIBS"
11400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11401/* end confdefs.h.  */
11402
11403
11404int
11405main ()
11406{
11407return main ();
11408  ;
11409  return 0;
11410}
11411_ACEOF
11412if ac_fn_c_try_link "$LINENO"; then :
11413  ac_cv_lib_m_main=yes
11414else
11415  ac_cv_lib_m_main=no
11416fi
11417rm -f core conftest.err conftest.$ac_objext \
11418    conftest$ac_exeext conftest.$ac_ext
11419LIBS=$ac_check_lib_save_LIBS
11420fi
11421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
11422$as_echo "$ac_cv_lib_m_main" >&6; }
11423if test "x$ac_cv_lib_m_main" = xyes; then :
11424  cat >>confdefs.h <<_ACEOF
11425#define HAVE_LIBM 1
11426_ACEOF
11427
11428  LIBS="-lm $LIBS"
11429
11430fi
11431
11432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
11433$as_echo_n "checking for library containing setproctitle... " >&6; }
11434if ${ac_cv_search_setproctitle+:} false; then :
11435  $as_echo_n "(cached) " >&6
11436else
11437  ac_func_search_save_LIBS=$LIBS
11438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11439/* end confdefs.h.  */
11440
11441/* Override any GCC internal prototype to avoid an error.
11442   Use char because int might match the return type of a GCC
11443   builtin and then its argument prototype would still apply.  */
11444#ifdef __cplusplus
11445extern "C"
11446#endif
11447char setproctitle ();
11448int
11449main ()
11450{
11451return setproctitle ();
11452  ;
11453  return 0;
11454}
11455_ACEOF
11456for ac_lib in '' util; do
11457  if test -z "$ac_lib"; then
11458    ac_res="none required"
11459  else
11460    ac_res=-l$ac_lib
11461    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11462  fi
11463  if ac_fn_c_try_link "$LINENO"; then :
11464  ac_cv_search_setproctitle=$ac_res
11465fi
11466rm -f core conftest.err conftest.$ac_objext \
11467    conftest$ac_exeext
11468  if ${ac_cv_search_setproctitle+:} false; then :
11469  break
11470fi
11471done
11472if ${ac_cv_search_setproctitle+:} false; then :
11473
11474else
11475  ac_cv_search_setproctitle=no
11476fi
11477rm conftest.$ac_ext
11478LIBS=$ac_func_search_save_LIBS
11479fi
11480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
11481$as_echo "$ac_cv_search_setproctitle" >&6; }
11482ac_res=$ac_cv_search_setproctitle
11483if test "$ac_res" != no; then :
11484  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11485
11486fi
11487
11488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
11489$as_echo_n "checking for library containing dlopen... " >&6; }
11490if ${ac_cv_search_dlopen+:} false; then :
11491  $as_echo_n "(cached) " >&6
11492else
11493  ac_func_search_save_LIBS=$LIBS
11494cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11495/* end confdefs.h.  */
11496
11497/* Override any GCC internal prototype to avoid an error.
11498   Use char because int might match the return type of a GCC
11499   builtin and then its argument prototype would still apply.  */
11500#ifdef __cplusplus
11501extern "C"
11502#endif
11503char dlopen ();
11504int
11505main ()
11506{
11507return dlopen ();
11508  ;
11509  return 0;
11510}
11511_ACEOF
11512for ac_lib in '' dl; do
11513  if test -z "$ac_lib"; then
11514    ac_res="none required"
11515  else
11516    ac_res=-l$ac_lib
11517    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11518  fi
11519  if ac_fn_c_try_link "$LINENO"; then :
11520  ac_cv_search_dlopen=$ac_res
11521fi
11522rm -f core conftest.err conftest.$ac_objext \
11523    conftest$ac_exeext
11524  if ${ac_cv_search_dlopen+:} false; then :
11525  break
11526fi
11527done
11528if ${ac_cv_search_dlopen+:} false; then :
11529
11530else
11531  ac_cv_search_dlopen=no
11532fi
11533rm conftest.$ac_ext
11534LIBS=$ac_func_search_save_LIBS
11535fi
11536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
11537$as_echo "$ac_cv_search_dlopen" >&6; }
11538ac_res=$ac_cv_search_dlopen
11539if test "$ac_res" != no; then :
11540  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11541
11542fi
11543
11544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11545$as_echo_n "checking for library containing socket... " >&6; }
11546if ${ac_cv_search_socket+:} false; then :
11547  $as_echo_n "(cached) " >&6
11548else
11549  ac_func_search_save_LIBS=$LIBS
11550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11551/* end confdefs.h.  */
11552
11553/* Override any GCC internal prototype to avoid an error.
11554   Use char because int might match the return type of a GCC
11555   builtin and then its argument prototype would still apply.  */
11556#ifdef __cplusplus
11557extern "C"
11558#endif
11559char socket ();
11560int
11561main ()
11562{
11563return socket ();
11564  ;
11565  return 0;
11566}
11567_ACEOF
11568for ac_lib in '' socket ws2_32; do
11569  if test -z "$ac_lib"; then
11570    ac_res="none required"
11571  else
11572    ac_res=-l$ac_lib
11573    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11574  fi
11575  if ac_fn_c_try_link "$LINENO"; then :
11576  ac_cv_search_socket=$ac_res
11577fi
11578rm -f core conftest.err conftest.$ac_objext \
11579    conftest$ac_exeext
11580  if ${ac_cv_search_socket+:} false; then :
11581  break
11582fi
11583done
11584if ${ac_cv_search_socket+:} false; then :
11585
11586else
11587  ac_cv_search_socket=no
11588fi
11589rm conftest.$ac_ext
11590LIBS=$ac_func_search_save_LIBS
11591fi
11592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11593$as_echo "$ac_cv_search_socket" >&6; }
11594ac_res=$ac_cv_search_socket
11595if test "$ac_res" != no; then :
11596  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11597
11598fi
11599
11600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
11601$as_echo_n "checking for library containing shl_load... " >&6; }
11602if ${ac_cv_search_shl_load+:} false; then :
11603  $as_echo_n "(cached) " >&6
11604else
11605  ac_func_search_save_LIBS=$LIBS
11606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11607/* end confdefs.h.  */
11608
11609/* Override any GCC internal prototype to avoid an error.
11610   Use char because int might match the return type of a GCC
11611   builtin and then its argument prototype would still apply.  */
11612#ifdef __cplusplus
11613extern "C"
11614#endif
11615char shl_load ();
11616int
11617main ()
11618{
11619return shl_load ();
11620  ;
11621  return 0;
11622}
11623_ACEOF
11624for ac_lib in '' dld; do
11625  if test -z "$ac_lib"; then
11626    ac_res="none required"
11627  else
11628    ac_res=-l$ac_lib
11629    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11630  fi
11631  if ac_fn_c_try_link "$LINENO"; then :
11632  ac_cv_search_shl_load=$ac_res
11633fi
11634rm -f core conftest.err conftest.$ac_objext \
11635    conftest$ac_exeext
11636  if ${ac_cv_search_shl_load+:} false; then :
11637  break
11638fi
11639done
11640if ${ac_cv_search_shl_load+:} false; then :
11641
11642else
11643  ac_cv_search_shl_load=no
11644fi
11645rm conftest.$ac_ext
11646LIBS=$ac_func_search_save_LIBS
11647fi
11648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
11649$as_echo "$ac_cv_search_shl_load" >&6; }
11650ac_res=$ac_cv_search_shl_load
11651if test "$ac_res" != no; then :
11652  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11653
11654fi
11655
11656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
11657$as_echo_n "checking for library containing getopt_long... " >&6; }
11658if ${ac_cv_search_getopt_long+:} false; then :
11659  $as_echo_n "(cached) " >&6
11660else
11661  ac_func_search_save_LIBS=$LIBS
11662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11663/* end confdefs.h.  */
11664
11665/* Override any GCC internal prototype to avoid an error.
11666   Use char because int might match the return type of a GCC
11667   builtin and then its argument prototype would still apply.  */
11668#ifdef __cplusplus
11669extern "C"
11670#endif
11671char getopt_long ();
11672int
11673main ()
11674{
11675return getopt_long ();
11676  ;
11677  return 0;
11678}
11679_ACEOF
11680for ac_lib in '' getopt gnugetopt; do
11681  if test -z "$ac_lib"; then
11682    ac_res="none required"
11683  else
11684    ac_res=-l$ac_lib
11685    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11686  fi
11687  if ac_fn_c_try_link "$LINENO"; then :
11688  ac_cv_search_getopt_long=$ac_res
11689fi
11690rm -f core conftest.err conftest.$ac_objext \
11691    conftest$ac_exeext
11692  if ${ac_cv_search_getopt_long+:} false; then :
11693  break
11694fi
11695done
11696if ${ac_cv_search_getopt_long+:} false; then :
11697
11698else
11699  ac_cv_search_getopt_long=no
11700fi
11701rm conftest.$ac_ext
11702LIBS=$ac_func_search_save_LIBS
11703fi
11704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
11705$as_echo "$ac_cv_search_getopt_long" >&6; }
11706ac_res=$ac_cv_search_getopt_long
11707if test "$ac_res" != no; then :
11708  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11709
11710fi
11711
11712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
11713$as_echo_n "checking for library containing shm_open... " >&6; }
11714if ${ac_cv_search_shm_open+:} false; then :
11715  $as_echo_n "(cached) " >&6
11716else
11717  ac_func_search_save_LIBS=$LIBS
11718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11719/* end confdefs.h.  */
11720
11721/* Override any GCC internal prototype to avoid an error.
11722   Use char because int might match the return type of a GCC
11723   builtin and then its argument prototype would still apply.  */
11724#ifdef __cplusplus
11725extern "C"
11726#endif
11727char shm_open ();
11728int
11729main ()
11730{
11731return shm_open ();
11732  ;
11733  return 0;
11734}
11735_ACEOF
11736for ac_lib in '' rt; do
11737  if test -z "$ac_lib"; then
11738    ac_res="none required"
11739  else
11740    ac_res=-l$ac_lib
11741    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11742  fi
11743  if ac_fn_c_try_link "$LINENO"; then :
11744  ac_cv_search_shm_open=$ac_res
11745fi
11746rm -f core conftest.err conftest.$ac_objext \
11747    conftest$ac_exeext
11748  if ${ac_cv_search_shm_open+:} false; then :
11749  break
11750fi
11751done
11752if ${ac_cv_search_shm_open+:} false; then :
11753
11754else
11755  ac_cv_search_shm_open=no
11756fi
11757rm conftest.$ac_ext
11758LIBS=$ac_func_search_save_LIBS
11759fi
11760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
11761$as_echo "$ac_cv_search_shm_open" >&6; }
11762ac_res=$ac_cv_search_shm_open
11763if test "$ac_res" != no; then :
11764  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11765
11766fi
11767
11768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
11769$as_echo_n "checking for library containing shm_unlink... " >&6; }
11770if ${ac_cv_search_shm_unlink+:} 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 shm_unlink ();
11784int
11785main ()
11786{
11787return shm_unlink ();
11788  ;
11789  return 0;
11790}
11791_ACEOF
11792for ac_lib in '' rt; 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_shm_unlink=$ac_res
11801fi
11802rm -f core conftest.err conftest.$ac_objext \
11803    conftest$ac_exeext
11804  if ${ac_cv_search_shm_unlink+:} false; then :
11805  break
11806fi
11807done
11808if ${ac_cv_search_shm_unlink+:} false; then :
11809
11810else
11811  ac_cv_search_shm_unlink=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_shm_unlink" >&5
11817$as_echo "$ac_cv_search_shm_unlink" >&6; }
11818ac_res=$ac_cv_search_shm_unlink
11819if test "$ac_res" != no; then :
11820  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11821
11822fi
11823
11824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11825$as_echo_n "checking for library containing clock_gettime... " >&6; }
11826if ${ac_cv_search_clock_gettime+:} false; then :
11827  $as_echo_n "(cached) " >&6
11828else
11829  ac_func_search_save_LIBS=$LIBS
11830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11831/* end confdefs.h.  */
11832
11833/* Override any GCC internal prototype to avoid an error.
11834   Use char because int might match the return type of a GCC
11835   builtin and then its argument prototype would still apply.  */
11836#ifdef __cplusplus
11837extern "C"
11838#endif
11839char clock_gettime ();
11840int
11841main ()
11842{
11843return clock_gettime ();
11844  ;
11845  return 0;
11846}
11847_ACEOF
11848for ac_lib in '' rt posix4; do
11849  if test -z "$ac_lib"; then
11850    ac_res="none required"
11851  else
11852    ac_res=-l$ac_lib
11853    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11854  fi
11855  if ac_fn_c_try_link "$LINENO"; then :
11856  ac_cv_search_clock_gettime=$ac_res
11857fi
11858rm -f core conftest.err conftest.$ac_objext \
11859    conftest$ac_exeext
11860  if ${ac_cv_search_clock_gettime+:} false; then :
11861  break
11862fi
11863done
11864if ${ac_cv_search_clock_gettime+:} false; then :
11865
11866else
11867  ac_cv_search_clock_gettime=no
11868fi
11869rm conftest.$ac_ext
11870LIBS=$ac_func_search_save_LIBS
11871fi
11872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11873$as_echo "$ac_cv_search_clock_gettime" >&6; }
11874ac_res=$ac_cv_search_clock_gettime
11875if test "$ac_res" != no; then :
11876  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11877
11878fi
11879
11880# Solaris:
11881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
11882$as_echo_n "checking for library containing fdatasync... " >&6; }
11883if ${ac_cv_search_fdatasync+:} false; then :
11884  $as_echo_n "(cached) " >&6
11885else
11886  ac_func_search_save_LIBS=$LIBS
11887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11888/* end confdefs.h.  */
11889
11890/* Override any GCC internal prototype to avoid an error.
11891   Use char because int might match the return type of a GCC
11892   builtin and then its argument prototype would still apply.  */
11893#ifdef __cplusplus
11894extern "C"
11895#endif
11896char fdatasync ();
11897int
11898main ()
11899{
11900return fdatasync ();
11901  ;
11902  return 0;
11903}
11904_ACEOF
11905for ac_lib in '' rt posix4; do
11906  if test -z "$ac_lib"; then
11907    ac_res="none required"
11908  else
11909    ac_res=-l$ac_lib
11910    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11911  fi
11912  if ac_fn_c_try_link "$LINENO"; then :
11913  ac_cv_search_fdatasync=$ac_res
11914fi
11915rm -f core conftest.err conftest.$ac_objext \
11916    conftest$ac_exeext
11917  if ${ac_cv_search_fdatasync+:} false; then :
11918  break
11919fi
11920done
11921if ${ac_cv_search_fdatasync+:} false; then :
11922
11923else
11924  ac_cv_search_fdatasync=no
11925fi
11926rm conftest.$ac_ext
11927LIBS=$ac_func_search_save_LIBS
11928fi
11929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
11930$as_echo "$ac_cv_search_fdatasync" >&6; }
11931ac_res=$ac_cv_search_fdatasync
11932if test "$ac_res" != no; then :
11933  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11934
11935fi
11936
11937# Cygwin:
11938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
11939$as_echo_n "checking for library containing shmget... " >&6; }
11940if ${ac_cv_search_shmget+:} false; then :
11941  $as_echo_n "(cached) " >&6
11942else
11943  ac_func_search_save_LIBS=$LIBS
11944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11945/* end confdefs.h.  */
11946
11947/* Override any GCC internal prototype to avoid an error.
11948   Use char because int might match the return type of a GCC
11949   builtin and then its argument prototype would still apply.  */
11950#ifdef __cplusplus
11951extern "C"
11952#endif
11953char shmget ();
11954int
11955main ()
11956{
11957return shmget ();
11958  ;
11959  return 0;
11960}
11961_ACEOF
11962for ac_lib in '' cygipc; do
11963  if test -z "$ac_lib"; then
11964    ac_res="none required"
11965  else
11966    ac_res=-l$ac_lib
11967    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11968  fi
11969  if ac_fn_c_try_link "$LINENO"; then :
11970  ac_cv_search_shmget=$ac_res
11971fi
11972rm -f core conftest.err conftest.$ac_objext \
11973    conftest$ac_exeext
11974  if ${ac_cv_search_shmget+:} false; then :
11975  break
11976fi
11977done
11978if ${ac_cv_search_shmget+:} false; then :
11979
11980else
11981  ac_cv_search_shmget=no
11982fi
11983rm conftest.$ac_ext
11984LIBS=$ac_func_search_save_LIBS
11985fi
11986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
11987$as_echo "$ac_cv_search_shmget" >&6; }
11988ac_res=$ac_cv_search_shmget
11989if test "$ac_res" != no; then :
11990  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11991
11992fi
11993
11994# *BSD:
11995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols" >&5
11996$as_echo_n "checking for library containing backtrace_symbols... " >&6; }
11997if ${ac_cv_search_backtrace_symbols+:} false; then :
11998  $as_echo_n "(cached) " >&6
11999else
12000  ac_func_search_save_LIBS=$LIBS
12001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12002/* end confdefs.h.  */
12003
12004/* Override any GCC internal prototype to avoid an error.
12005   Use char because int might match the return type of a GCC
12006   builtin and then its argument prototype would still apply.  */
12007#ifdef __cplusplus
12008extern "C"
12009#endif
12010char backtrace_symbols ();
12011int
12012main ()
12013{
12014return backtrace_symbols ();
12015  ;
12016  return 0;
12017}
12018_ACEOF
12019for ac_lib in '' execinfo; do
12020  if test -z "$ac_lib"; then
12021    ac_res="none required"
12022  else
12023    ac_res=-l$ac_lib
12024    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
12025  fi
12026  if ac_fn_c_try_link "$LINENO"; then :
12027  ac_cv_search_backtrace_symbols=$ac_res
12028fi
12029rm -f core conftest.err conftest.$ac_objext \
12030    conftest$ac_exeext
12031  if ${ac_cv_search_backtrace_symbols+:} false; then :
12032  break
12033fi
12034done
12035if ${ac_cv_search_backtrace_symbols+:} false; then :
12036
12037else
12038  ac_cv_search_backtrace_symbols=no
12039fi
12040rm conftest.$ac_ext
12041LIBS=$ac_func_search_save_LIBS
12042fi
12043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols" >&5
12044$as_echo "$ac_cv_search_backtrace_symbols" >&6; }
12045ac_res=$ac_cv_search_backtrace_symbols
12046if test "$ac_res" != no; then :
12047  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12048
12049fi
12050
12051
12052if test "$enable_thread_safety" = yes; then
12053  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
12054$as_echo_n "checking for library containing gethostbyname_r... " >&6; }
12055if ${ac_cv_search_gethostbyname_r+:} false; then :
12056  $as_echo_n "(cached) " >&6
12057else
12058  ac_func_search_save_LIBS=$LIBS
12059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12060/* end confdefs.h.  */
12061
12062/* Override any GCC internal prototype to avoid an error.
12063   Use char because int might match the return type of a GCC
12064   builtin and then its argument prototype would still apply.  */
12065#ifdef __cplusplus
12066extern "C"
12067#endif
12068char gethostbyname_r ();
12069int
12070main ()
12071{
12072return gethostbyname_r ();
12073  ;
12074  return 0;
12075}
12076_ACEOF
12077for ac_lib in '' nsl; do
12078  if test -z "$ac_lib"; then
12079    ac_res="none required"
12080  else
12081    ac_res=-l$ac_lib
12082    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
12083  fi
12084  if ac_fn_c_try_link "$LINENO"; then :
12085  ac_cv_search_gethostbyname_r=$ac_res
12086fi
12087rm -f core conftest.err conftest.$ac_objext \
12088    conftest$ac_exeext
12089  if ${ac_cv_search_gethostbyname_r+:} false; then :
12090  break
12091fi
12092done
12093if ${ac_cv_search_gethostbyname_r+:} false; then :
12094
12095else
12096  ac_cv_search_gethostbyname_r=no
12097fi
12098rm conftest.$ac_ext
12099LIBS=$ac_func_search_save_LIBS
12100fi
12101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
12102$as_echo "$ac_cv_search_gethostbyname_r" >&6; }
12103ac_res=$ac_cv_search_gethostbyname_r
12104if test "$ac_res" != no; then :
12105  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12106
12107fi
12108
12109  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_barrier_wait" >&5
12110$as_echo_n "checking for library containing pthread_barrier_wait... " >&6; }
12111if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12112  $as_echo_n "(cached) " >&6
12113else
12114  ac_func_search_save_LIBS=$LIBS
12115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12116/* end confdefs.h.  */
12117
12118/* Override any GCC internal prototype to avoid an error.
12119   Use char because int might match the return type of a GCC
12120   builtin and then its argument prototype would still apply.  */
12121#ifdef __cplusplus
12122extern "C"
12123#endif
12124char pthread_barrier_wait ();
12125int
12126main ()
12127{
12128return pthread_barrier_wait ();
12129  ;
12130  return 0;
12131}
12132_ACEOF
12133for ac_lib in '' pthread; do
12134  if test -z "$ac_lib"; then
12135    ac_res="none required"
12136  else
12137    ac_res=-l$ac_lib
12138    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
12139  fi
12140  if ac_fn_c_try_link "$LINENO"; then :
12141  ac_cv_search_pthread_barrier_wait=$ac_res
12142fi
12143rm -f core conftest.err conftest.$ac_objext \
12144    conftest$ac_exeext
12145  if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12146  break
12147fi
12148done
12149if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12150
12151else
12152  ac_cv_search_pthread_barrier_wait=no
12153fi
12154rm conftest.$ac_ext
12155LIBS=$ac_func_search_save_LIBS
12156fi
12157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_barrier_wait" >&5
12158$as_echo "$ac_cv_search_pthread_barrier_wait" >&6; }
12159ac_res=$ac_cv_search_pthread_barrier_wait
12160if test "$ac_res" != no; then :
12161  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12162
12163fi
12164
12165fi
12166
12167if test "$with_readline" = yes; then
12168
12169
12170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
12171$as_echo_n "checking for library containing readline... " >&6; }
12172if ${pgac_cv_check_readline+:} false; then :
12173  $as_echo_n "(cached) " >&6
12174else
12175  pgac_cv_check_readline=no
12176pgac_save_LIBS=$LIBS
12177if test x"$with_libedit_preferred" != x"yes"
12178then	READLINE_ORDER="-lreadline -ledit"
12179else	READLINE_ORDER="-ledit -lreadline"
12180fi
12181for pgac_rllib in $READLINE_ORDER ; do
12182  for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
12183    LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
12184    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12185/* end confdefs.h.  */
12186
12187/* Override any GCC internal prototype to avoid an error.
12188   Use char because int might match the return type of a GCC
12189   builtin and then its argument prototype would still apply.  */
12190#ifdef __cplusplus
12191extern "C"
12192#endif
12193char readline ();
12194int
12195main ()
12196{
12197return readline ();
12198  ;
12199  return 0;
12200}
12201_ACEOF
12202if ac_fn_c_try_link "$LINENO"; then :
12203
12204      # Older NetBSD and OpenBSD have a broken linker that does not
12205      # recognize dependent libraries; assume curses is needed if we didn't
12206      # find any dependency.
12207      case $host_os in
12208        netbsd* | openbsd*)
12209          if test x"$pgac_lib" = x"" ; then
12210            pgac_lib=" -lcurses"
12211          fi ;;
12212      esac
12213
12214      pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
12215      break
12216
12217fi
12218rm -f core conftest.err conftest.$ac_objext \
12219    conftest$ac_exeext conftest.$ac_ext
12220  done
12221  if test "$pgac_cv_check_readline" != no ; then
12222    break
12223  fi
12224done
12225LIBS=$pgac_save_LIBS
12226
12227fi
12228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
12229$as_echo "$pgac_cv_check_readline" >&6; }
12230if test "$pgac_cv_check_readline" != no ; then
12231  LIBS="$pgac_cv_check_readline $LIBS"
12232
12233$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
12234
12235fi
12236
12237
12238  if test x"$pgac_cv_check_readline" = x"no"; then
12239    as_fn_error $? "readline library not found
12240If you have readline already installed, see config.log for details on the
12241failure.  It is possible the compiler isn't looking in the proper directory.
12242Use --without-readline to disable readline support." "$LINENO" 5
12243  fi
12244fi
12245
12246if test "$with_zlib" = yes; then
12247  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
12248$as_echo_n "checking for inflate in -lz... " >&6; }
12249if ${ac_cv_lib_z_inflate+:} false; then :
12250  $as_echo_n "(cached) " >&6
12251else
12252  ac_check_lib_save_LIBS=$LIBS
12253LIBS="-lz  $LIBS"
12254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12255/* end confdefs.h.  */
12256
12257/* Override any GCC internal prototype to avoid an error.
12258   Use char because int might match the return type of a GCC
12259   builtin and then its argument prototype would still apply.  */
12260#ifdef __cplusplus
12261extern "C"
12262#endif
12263char inflate ();
12264int
12265main ()
12266{
12267return inflate ();
12268  ;
12269  return 0;
12270}
12271_ACEOF
12272if ac_fn_c_try_link "$LINENO"; then :
12273  ac_cv_lib_z_inflate=yes
12274else
12275  ac_cv_lib_z_inflate=no
12276fi
12277rm -f core conftest.err conftest.$ac_objext \
12278    conftest$ac_exeext conftest.$ac_ext
12279LIBS=$ac_check_lib_save_LIBS
12280fi
12281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
12282$as_echo "$ac_cv_lib_z_inflate" >&6; }
12283if test "x$ac_cv_lib_z_inflate" = xyes; then :
12284  cat >>confdefs.h <<_ACEOF
12285#define HAVE_LIBZ 1
12286_ACEOF
12287
12288  LIBS="-lz $LIBS"
12289
12290else
12291  as_fn_error $? "zlib library not found
12292If you have zlib already installed, see config.log for details on the
12293failure.  It is possible the compiler isn't looking in the proper directory.
12294Use --without-zlib to disable zlib support." "$LINENO" 5
12295fi
12296
12297fi
12298
12299if test "$enable_spinlocks" = yes; then
12300
12301$as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
12302
12303else
12304  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12305*** Not using spinlocks will cause poor performance." >&5
12306$as_echo "$as_me: WARNING:
12307*** Not using spinlocks will cause poor performance." >&2;}
12308fi
12309
12310if test "$enable_atomics" = yes; then
12311
12312$as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
12313
12314else
12315  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12316*** Not using atomic operations will cause poor performance." >&5
12317$as_echo "$as_me: WARNING:
12318*** Not using atomic operations will cause poor performance." >&2;}
12319fi
12320
12321if test "$with_gssapi" = yes ; then
12322  if test "$PORTNAME" != "win32"; then
12323    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
12324$as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
12325if ${ac_cv_search_gss_init_sec_context+:} false; then :
12326  $as_echo_n "(cached) " >&6
12327else
12328  ac_func_search_save_LIBS=$LIBS
12329cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12330/* end confdefs.h.  */
12331
12332/* Override any GCC internal prototype to avoid an error.
12333   Use char because int might match the return type of a GCC
12334   builtin and then its argument prototype would still apply.  */
12335#ifdef __cplusplus
12336extern "C"
12337#endif
12338char gss_init_sec_context ();
12339int
12340main ()
12341{
12342return gss_init_sec_context ();
12343  ;
12344  return 0;
12345}
12346_ACEOF
12347for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
12348  if test -z "$ac_lib"; then
12349    ac_res="none required"
12350  else
12351    ac_res=-l$ac_lib
12352    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
12353  fi
12354  if ac_fn_c_try_link "$LINENO"; then :
12355  ac_cv_search_gss_init_sec_context=$ac_res
12356fi
12357rm -f core conftest.err conftest.$ac_objext \
12358    conftest$ac_exeext
12359  if ${ac_cv_search_gss_init_sec_context+:} false; then :
12360  break
12361fi
12362done
12363if ${ac_cv_search_gss_init_sec_context+:} false; then :
12364
12365else
12366  ac_cv_search_gss_init_sec_context=no
12367fi
12368rm conftest.$ac_ext
12369LIBS=$ac_func_search_save_LIBS
12370fi
12371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
12372$as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
12373ac_res=$ac_cv_search_gss_init_sec_context
12374if test "$ac_res" != no; then :
12375  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12376
12377else
12378  as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
12379fi
12380
12381  else
12382    LIBS="$LIBS -lgssapi32"
12383  fi
12384fi
12385
12386#
12387# SSL Library
12388#
12389# There is currently only one supported SSL/TLS library: OpenSSL.
12390#
12391
12392
12393
12394# Check whether --with-ssl was given.
12395if test "${with_ssl+set}" = set; then :
12396  withval=$with_ssl;
12397  case $withval in
12398    yes)
12399      as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12400      ;;
12401    no)
12402      as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12403      ;;
12404    *)
12405
12406      ;;
12407  esac
12408
12409fi
12410
12411
12412if test x"$with_ssl" = x"" ; then
12413  with_ssl=no
12414fi
12415
12416
12417
12418# Check whether --with-openssl was given.
12419if test "${with_openssl+set}" = set; then :
12420  withval=$with_openssl;
12421  case $withval in
12422    yes)
12423      :
12424      ;;
12425    no)
12426      :
12427      ;;
12428    *)
12429      as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
12430      ;;
12431  esac
12432
12433else
12434  with_openssl=no
12435
12436fi
12437
12438
12439if test "$with_openssl" = yes ; then
12440  with_ssl=openssl
12441fi
12442
12443if test "$with_ssl" = openssl ; then
12444    # Minimum required OpenSSL version is 1.0.1
12445
12446$as_echo "#define OPENSSL_API_COMPAT 0x10001000L" >>confdefs.h
12447
12448  if test "$PORTNAME" != "win32"; then
12449     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
12450$as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
12451if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
12452  $as_echo_n "(cached) " >&6
12453else
12454  ac_check_lib_save_LIBS=$LIBS
12455LIBS="-lcrypto  $LIBS"
12456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12457/* end confdefs.h.  */
12458
12459/* Override any GCC internal prototype to avoid an error.
12460   Use char because int might match the return type of a GCC
12461   builtin and then its argument prototype would still apply.  */
12462#ifdef __cplusplus
12463extern "C"
12464#endif
12465char CRYPTO_new_ex_data ();
12466int
12467main ()
12468{
12469return CRYPTO_new_ex_data ();
12470  ;
12471  return 0;
12472}
12473_ACEOF
12474if ac_fn_c_try_link "$LINENO"; then :
12475  ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
12476else
12477  ac_cv_lib_crypto_CRYPTO_new_ex_data=no
12478fi
12479rm -f core conftest.err conftest.$ac_objext \
12480    conftest$ac_exeext conftest.$ac_ext
12481LIBS=$ac_check_lib_save_LIBS
12482fi
12483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
12484$as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
12485if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
12486  cat >>confdefs.h <<_ACEOF
12487#define HAVE_LIBCRYPTO 1
12488_ACEOF
12489
12490  LIBS="-lcrypto $LIBS"
12491
12492else
12493  as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
12494fi
12495
12496     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
12497$as_echo_n "checking for SSL_new in -lssl... " >&6; }
12498if ${ac_cv_lib_ssl_SSL_new+:} false; then :
12499  $as_echo_n "(cached) " >&6
12500else
12501  ac_check_lib_save_LIBS=$LIBS
12502LIBS="-lssl  $LIBS"
12503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12504/* end confdefs.h.  */
12505
12506/* Override any GCC internal prototype to avoid an error.
12507   Use char because int might match the return type of a GCC
12508   builtin and then its argument prototype would still apply.  */
12509#ifdef __cplusplus
12510extern "C"
12511#endif
12512char SSL_new ();
12513int
12514main ()
12515{
12516return SSL_new ();
12517  ;
12518  return 0;
12519}
12520_ACEOF
12521if ac_fn_c_try_link "$LINENO"; then :
12522  ac_cv_lib_ssl_SSL_new=yes
12523else
12524  ac_cv_lib_ssl_SSL_new=no
12525fi
12526rm -f core conftest.err conftest.$ac_objext \
12527    conftest$ac_exeext conftest.$ac_ext
12528LIBS=$ac_check_lib_save_LIBS
12529fi
12530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
12531$as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
12532if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
12533  cat >>confdefs.h <<_ACEOF
12534#define HAVE_LIBSSL 1
12535_ACEOF
12536
12537  LIBS="-lssl $LIBS"
12538
12539else
12540  as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
12541fi
12542
12543  else
12544     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
12545$as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
12546if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12547  $as_echo_n "(cached) " >&6
12548else
12549  ac_func_search_save_LIBS=$LIBS
12550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12551/* end confdefs.h.  */
12552
12553/* Override any GCC internal prototype to avoid an error.
12554   Use char because int might match the return type of a GCC
12555   builtin and then its argument prototype would still apply.  */
12556#ifdef __cplusplus
12557extern "C"
12558#endif
12559char CRYPTO_new_ex_data ();
12560int
12561main ()
12562{
12563return CRYPTO_new_ex_data ();
12564  ;
12565  return 0;
12566}
12567_ACEOF
12568for ac_lib in '' eay32 crypto; do
12569  if test -z "$ac_lib"; then
12570    ac_res="none required"
12571  else
12572    ac_res=-l$ac_lib
12573    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
12574  fi
12575  if ac_fn_c_try_link "$LINENO"; then :
12576  ac_cv_search_CRYPTO_new_ex_data=$ac_res
12577fi
12578rm -f core conftest.err conftest.$ac_objext \
12579    conftest$ac_exeext
12580  if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12581  break
12582fi
12583done
12584if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12585
12586else
12587  ac_cv_search_CRYPTO_new_ex_data=no
12588fi
12589rm conftest.$ac_ext
12590LIBS=$ac_func_search_save_LIBS
12591fi
12592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
12593$as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
12594ac_res=$ac_cv_search_CRYPTO_new_ex_data
12595if test "$ac_res" != no; then :
12596  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12597
12598else
12599  as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
12600fi
12601
12602     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
12603$as_echo_n "checking for library containing SSL_new... " >&6; }
12604if ${ac_cv_search_SSL_new+:} false; then :
12605  $as_echo_n "(cached) " >&6
12606else
12607  ac_func_search_save_LIBS=$LIBS
12608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12609/* end confdefs.h.  */
12610
12611/* Override any GCC internal prototype to avoid an error.
12612   Use char because int might match the return type of a GCC
12613   builtin and then its argument prototype would still apply.  */
12614#ifdef __cplusplus
12615extern "C"
12616#endif
12617char SSL_new ();
12618int
12619main ()
12620{
12621return SSL_new ();
12622  ;
12623  return 0;
12624}
12625_ACEOF
12626for ac_lib in '' ssleay32 ssl; do
12627  if test -z "$ac_lib"; then
12628    ac_res="none required"
12629  else
12630    ac_res=-l$ac_lib
12631    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
12632  fi
12633  if ac_fn_c_try_link "$LINENO"; then :
12634  ac_cv_search_SSL_new=$ac_res
12635fi
12636rm -f core conftest.err conftest.$ac_objext \
12637    conftest$ac_exeext
12638  if ${ac_cv_search_SSL_new+:} false; then :
12639  break
12640fi
12641done
12642if ${ac_cv_search_SSL_new+:} false; then :
12643
12644else
12645  ac_cv_search_SSL_new=no
12646fi
12647rm conftest.$ac_ext
12648LIBS=$ac_func_search_save_LIBS
12649fi
12650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12651$as_echo "$ac_cv_search_SSL_new" >&6; }
12652ac_res=$ac_cv_search_SSL_new
12653if test "$ac_res" != no; then :
12654  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12655
12656else
12657  as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12658fi
12659
12660  fi
12661  # Function introduced in OpenSSL 1.0.2.
12662  for ac_func in X509_get_signature_nid
12663do :
12664  ac_fn_c_check_func "$LINENO" "X509_get_signature_nid" "ac_cv_func_X509_get_signature_nid"
12665if test "x$ac_cv_func_X509_get_signature_nid" = xyes; then :
12666  cat >>confdefs.h <<_ACEOF
12667#define HAVE_X509_GET_SIGNATURE_NID 1
12668_ACEOF
12669
12670fi
12671done
12672
12673  # Functions introduced in OpenSSL 1.1.0. We used to check for
12674  # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
12675  # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
12676  # doesn't have these OpenSSL 1.1.0 functions. So check for individual
12677  # functions.
12678  for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data HMAC_CTX_new HMAC_CTX_free
12679do :
12680  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12681ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12682if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12683  cat >>confdefs.h <<_ACEOF
12684#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12685_ACEOF
12686
12687fi
12688done
12689
12690  # OpenSSL versions before 1.1.0 required setting callback functions, for
12691  # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
12692  # function was removed.
12693  for ac_func in CRYPTO_lock
12694do :
12695  ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
12696if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
12697  cat >>confdefs.h <<_ACEOF
12698#define HAVE_CRYPTO_LOCK 1
12699_ACEOF
12700
12701fi
12702done
12703
12704
12705$as_echo "#define USE_OPENSSL 1" >>confdefs.h
12706
12707elif test "$with_ssl" != no ; then
12708  as_fn_error $? "--with-ssl must specify openssl" "$LINENO" 5
12709fi
12710
12711
12712if test "$with_pam" = yes ; then
12713  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
12714$as_echo_n "checking for pam_start in -lpam... " >&6; }
12715if ${ac_cv_lib_pam_pam_start+:} false; then :
12716  $as_echo_n "(cached) " >&6
12717else
12718  ac_check_lib_save_LIBS=$LIBS
12719LIBS="-lpam  $LIBS"
12720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12721/* end confdefs.h.  */
12722
12723/* Override any GCC internal prototype to avoid an error.
12724   Use char because int might match the return type of a GCC
12725   builtin and then its argument prototype would still apply.  */
12726#ifdef __cplusplus
12727extern "C"
12728#endif
12729char pam_start ();
12730int
12731main ()
12732{
12733return pam_start ();
12734  ;
12735  return 0;
12736}
12737_ACEOF
12738if ac_fn_c_try_link "$LINENO"; then :
12739  ac_cv_lib_pam_pam_start=yes
12740else
12741  ac_cv_lib_pam_pam_start=no
12742fi
12743rm -f core conftest.err conftest.$ac_objext \
12744    conftest$ac_exeext conftest.$ac_ext
12745LIBS=$ac_check_lib_save_LIBS
12746fi
12747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
12748$as_echo "$ac_cv_lib_pam_pam_start" >&6; }
12749if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
12750  cat >>confdefs.h <<_ACEOF
12751#define HAVE_LIBPAM 1
12752_ACEOF
12753
12754  LIBS="-lpam $LIBS"
12755
12756else
12757  as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
12758fi
12759
12760fi
12761
12762if test "$with_libxml" = yes ; then
12763  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
12764$as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
12765if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
12766  $as_echo_n "(cached) " >&6
12767else
12768  ac_check_lib_save_LIBS=$LIBS
12769LIBS="-lxml2  $LIBS"
12770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12771/* end confdefs.h.  */
12772
12773/* Override any GCC internal prototype to avoid an error.
12774   Use char because int might match the return type of a GCC
12775   builtin and then its argument prototype would still apply.  */
12776#ifdef __cplusplus
12777extern "C"
12778#endif
12779char xmlSaveToBuffer ();
12780int
12781main ()
12782{
12783return xmlSaveToBuffer ();
12784  ;
12785  return 0;
12786}
12787_ACEOF
12788if ac_fn_c_try_link "$LINENO"; then :
12789  ac_cv_lib_xml2_xmlSaveToBuffer=yes
12790else
12791  ac_cv_lib_xml2_xmlSaveToBuffer=no
12792fi
12793rm -f core conftest.err conftest.$ac_objext \
12794    conftest$ac_exeext conftest.$ac_ext
12795LIBS=$ac_check_lib_save_LIBS
12796fi
12797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
12798$as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
12799if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
12800  cat >>confdefs.h <<_ACEOF
12801#define HAVE_LIBXML2 1
12802_ACEOF
12803
12804  LIBS="-lxml2 $LIBS"
12805
12806else
12807  as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
12808fi
12809
12810fi
12811
12812if test "$with_libxslt" = yes ; then
12813  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
12814$as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
12815if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
12816  $as_echo_n "(cached) " >&6
12817else
12818  ac_check_lib_save_LIBS=$LIBS
12819LIBS="-lxslt  $LIBS"
12820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12821/* end confdefs.h.  */
12822
12823/* Override any GCC internal prototype to avoid an error.
12824   Use char because int might match the return type of a GCC
12825   builtin and then its argument prototype would still apply.  */
12826#ifdef __cplusplus
12827extern "C"
12828#endif
12829char xsltCleanupGlobals ();
12830int
12831main ()
12832{
12833return xsltCleanupGlobals ();
12834  ;
12835  return 0;
12836}
12837_ACEOF
12838if ac_fn_c_try_link "$LINENO"; then :
12839  ac_cv_lib_xslt_xsltCleanupGlobals=yes
12840else
12841  ac_cv_lib_xslt_xsltCleanupGlobals=no
12842fi
12843rm -f core conftest.err conftest.$ac_objext \
12844    conftest$ac_exeext conftest.$ac_ext
12845LIBS=$ac_check_lib_save_LIBS
12846fi
12847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
12848$as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
12849if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
12850  cat >>confdefs.h <<_ACEOF
12851#define HAVE_LIBXSLT 1
12852_ACEOF
12853
12854  LIBS="-lxslt $LIBS"
12855
12856else
12857  as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
12858fi
12859
12860fi
12861
12862if test "$with_lz4" = yes ; then
12863  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4_compress_default in -llz4" >&5
12864$as_echo_n "checking for LZ4_compress_default in -llz4... " >&6; }
12865if ${ac_cv_lib_lz4_LZ4_compress_default+:} false; then :
12866  $as_echo_n "(cached) " >&6
12867else
12868  ac_check_lib_save_LIBS=$LIBS
12869LIBS="-llz4  $LIBS"
12870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12871/* end confdefs.h.  */
12872
12873/* Override any GCC internal prototype to avoid an error.
12874   Use char because int might match the return type of a GCC
12875   builtin and then its argument prototype would still apply.  */
12876#ifdef __cplusplus
12877extern "C"
12878#endif
12879char LZ4_compress_default ();
12880int
12881main ()
12882{
12883return LZ4_compress_default ();
12884  ;
12885  return 0;
12886}
12887_ACEOF
12888if ac_fn_c_try_link "$LINENO"; then :
12889  ac_cv_lib_lz4_LZ4_compress_default=yes
12890else
12891  ac_cv_lib_lz4_LZ4_compress_default=no
12892fi
12893rm -f core conftest.err conftest.$ac_objext \
12894    conftest$ac_exeext conftest.$ac_ext
12895LIBS=$ac_check_lib_save_LIBS
12896fi
12897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lz4_LZ4_compress_default" >&5
12898$as_echo "$ac_cv_lib_lz4_LZ4_compress_default" >&6; }
12899if test "x$ac_cv_lib_lz4_LZ4_compress_default" = xyes; then :
12900  cat >>confdefs.h <<_ACEOF
12901#define HAVE_LIBLZ4 1
12902_ACEOF
12903
12904  LIBS="-llz4 $LIBS"
12905
12906else
12907  as_fn_error $? "library 'lz4' is required for LZ4 support" "$LINENO" 5
12908fi
12909
12910fi
12911
12912# Note: We can test for libldap_r only after we know PTHREAD_LIBS;
12913# also, on AIX, we may need to have openssl in LIBS for this step.
12914if test "$with_ldap" = yes ; then
12915  _LIBS="$LIBS"
12916  if test "$PORTNAME" != "win32"; then
12917    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12918$as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12919if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12920  $as_echo_n "(cached) " >&6
12921else
12922  ac_check_lib_save_LIBS=$LIBS
12923LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12925/* end confdefs.h.  */
12926
12927/* Override any GCC internal prototype to avoid an error.
12928   Use char because int might match the return type of a GCC
12929   builtin and then its argument prototype would still apply.  */
12930#ifdef __cplusplus
12931extern "C"
12932#endif
12933char ldap_bind ();
12934int
12935main ()
12936{
12937return ldap_bind ();
12938  ;
12939  return 0;
12940}
12941_ACEOF
12942if ac_fn_c_try_link "$LINENO"; then :
12943  ac_cv_lib_ldap_ldap_bind=yes
12944else
12945  ac_cv_lib_ldap_ldap_bind=no
12946fi
12947rm -f core conftest.err conftest.$ac_objext \
12948    conftest$ac_exeext conftest.$ac_ext
12949LIBS=$ac_check_lib_save_LIBS
12950fi
12951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12952$as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12953if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12954  cat >>confdefs.h <<_ACEOF
12955#define HAVE_LIBLDAP 1
12956_ACEOF
12957
12958  LIBS="-lldap $LIBS"
12959
12960else
12961  as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12962fi
12963
12964    LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12965    # This test is carried out against libldap.
12966    for ac_func in ldap_initialize
12967do :
12968  ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
12969if test "x$ac_cv_func_ldap_initialize" = xyes; then :
12970  cat >>confdefs.h <<_ACEOF
12971#define HAVE_LDAP_INITIALIZE 1
12972_ACEOF
12973
12974fi
12975done
12976
12977    if test "$enable_thread_safety" = yes; then
12978      # Use ldap_r for FE if available, else assume ldap is thread-safe.
12979      # On some platforms ldap_r fails to link without PTHREAD_LIBS.
12980      LIBS="$_LIBS"
12981      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap_r" >&5
12982$as_echo_n "checking for ldap_bind in -lldap_r... " >&6; }
12983if ${ac_cv_lib_ldap_r_ldap_bind+:} false; then :
12984  $as_echo_n "(cached) " >&6
12985else
12986  ac_check_lib_save_LIBS=$LIBS
12987LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12989/* end confdefs.h.  */
12990
12991/* Override any GCC internal prototype to avoid an error.
12992   Use char because int might match the return type of a GCC
12993   builtin and then its argument prototype would still apply.  */
12994#ifdef __cplusplus
12995extern "C"
12996#endif
12997char ldap_bind ();
12998int
12999main ()
13000{
13001return ldap_bind ();
13002  ;
13003  return 0;
13004}
13005_ACEOF
13006if ac_fn_c_try_link "$LINENO"; then :
13007  ac_cv_lib_ldap_r_ldap_bind=yes
13008else
13009  ac_cv_lib_ldap_r_ldap_bind=no
13010fi
13011rm -f core conftest.err conftest.$ac_objext \
13012    conftest$ac_exeext conftest.$ac_ext
13013LIBS=$ac_check_lib_save_LIBS
13014fi
13015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_bind" >&5
13016$as_echo "$ac_cv_lib_ldap_r_ldap_bind" >&6; }
13017if test "x$ac_cv_lib_ldap_r_ldap_bind" = xyes; then :
13018  LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
13019else
13020  LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
13021fi
13022
13023    else
13024      LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
13025    fi
13026  else
13027    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
13028$as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
13029if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
13030  $as_echo_n "(cached) " >&6
13031else
13032  ac_check_lib_save_LIBS=$LIBS
13033LIBS="-lwldap32  $LIBS"
13034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13035/* end confdefs.h.  */
13036
13037/* Override any GCC internal prototype to avoid an error.
13038   Use char because int might match the return type of a GCC
13039   builtin and then its argument prototype would still apply.  */
13040#ifdef __cplusplus
13041extern "C"
13042#endif
13043char ldap_bind ();
13044int
13045main ()
13046{
13047return ldap_bind ();
13048  ;
13049  return 0;
13050}
13051_ACEOF
13052if ac_fn_c_try_link "$LINENO"; then :
13053  ac_cv_lib_wldap32_ldap_bind=yes
13054else
13055  ac_cv_lib_wldap32_ldap_bind=no
13056fi
13057rm -f core conftest.err conftest.$ac_objext \
13058    conftest$ac_exeext conftest.$ac_ext
13059LIBS=$ac_check_lib_save_LIBS
13060fi
13061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
13062$as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
13063if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
13064  cat >>confdefs.h <<_ACEOF
13065#define HAVE_LIBWLDAP32 1
13066_ACEOF
13067
13068  LIBS="-lwldap32 $LIBS"
13069
13070else
13071  as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
13072fi
13073
13074    LDAP_LIBS_FE="-lwldap32"
13075    LDAP_LIBS_BE="-lwldap32"
13076  fi
13077  LIBS="$_LIBS"
13078fi
13079
13080
13081
13082# for contrib/sepgsql
13083if test "$with_selinux" = yes; then
13084  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
13085$as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
13086if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
13087  $as_echo_n "(cached) " >&6
13088else
13089  ac_check_lib_save_LIBS=$LIBS
13090LIBS="-lselinux  $LIBS"
13091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13092/* end confdefs.h.  */
13093
13094/* Override any GCC internal prototype to avoid an error.
13095   Use char because int might match the return type of a GCC
13096   builtin and then its argument prototype would still apply.  */
13097#ifdef __cplusplus
13098extern "C"
13099#endif
13100char security_compute_create_name ();
13101int
13102main ()
13103{
13104return security_compute_create_name ();
13105  ;
13106  return 0;
13107}
13108_ACEOF
13109if ac_fn_c_try_link "$LINENO"; then :
13110  ac_cv_lib_selinux_security_compute_create_name=yes
13111else
13112  ac_cv_lib_selinux_security_compute_create_name=no
13113fi
13114rm -f core conftest.err conftest.$ac_objext \
13115    conftest$ac_exeext conftest.$ac_ext
13116LIBS=$ac_check_lib_save_LIBS
13117fi
13118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
13119$as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
13120if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
13121  cat >>confdefs.h <<_ACEOF
13122#define HAVE_LIBSELINUX 1
13123_ACEOF
13124
13125  LIBS="-lselinux $LIBS"
13126
13127else
13128  as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
13129fi
13130
13131fi
13132
13133# for contrib/uuid-ossp
13134if test "$with_uuid" = bsd ; then
13135  # On BSD, the UUID functions are in libc
13136  ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
13137if test "x$ac_cv_func_uuid_to_string" = xyes; then :
13138  UUID_LIBS=""
13139else
13140  as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
13141fi
13142
13143elif test "$with_uuid" = e2fs ; then
13144  # On macOS, the UUID functions are in libc
13145  ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
13146if test "x$ac_cv_func_uuid_generate" = xyes; then :
13147  UUID_LIBS=""
13148else
13149  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
13150$as_echo_n "checking for uuid_generate in -luuid... " >&6; }
13151if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
13152  $as_echo_n "(cached) " >&6
13153else
13154  ac_check_lib_save_LIBS=$LIBS
13155LIBS="-luuid  $LIBS"
13156cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13157/* end confdefs.h.  */
13158
13159/* Override any GCC internal prototype to avoid an error.
13160   Use char because int might match the return type of a GCC
13161   builtin and then its argument prototype would still apply.  */
13162#ifdef __cplusplus
13163extern "C"
13164#endif
13165char uuid_generate ();
13166int
13167main ()
13168{
13169return uuid_generate ();
13170  ;
13171  return 0;
13172}
13173_ACEOF
13174if ac_fn_c_try_link "$LINENO"; then :
13175  ac_cv_lib_uuid_uuid_generate=yes
13176else
13177  ac_cv_lib_uuid_uuid_generate=no
13178fi
13179rm -f core conftest.err conftest.$ac_objext \
13180    conftest$ac_exeext conftest.$ac_ext
13181LIBS=$ac_check_lib_save_LIBS
13182fi
13183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
13184$as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
13185if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
13186  UUID_LIBS="-luuid"
13187else
13188  as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
13189fi
13190
13191fi
13192
13193elif test "$with_uuid" = ossp ; then
13194  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
13195$as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
13196if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
13197  $as_echo_n "(cached) " >&6
13198else
13199  ac_check_lib_save_LIBS=$LIBS
13200LIBS="-lossp-uuid  $LIBS"
13201cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13202/* end confdefs.h.  */
13203
13204/* Override any GCC internal prototype to avoid an error.
13205   Use char because int might match the return type of a GCC
13206   builtin and then its argument prototype would still apply.  */
13207#ifdef __cplusplus
13208extern "C"
13209#endif
13210char uuid_export ();
13211int
13212main ()
13213{
13214return uuid_export ();
13215  ;
13216  return 0;
13217}
13218_ACEOF
13219if ac_fn_c_try_link "$LINENO"; then :
13220  ac_cv_lib_ossp_uuid_uuid_export=yes
13221else
13222  ac_cv_lib_ossp_uuid_uuid_export=no
13223fi
13224rm -f core conftest.err conftest.$ac_objext \
13225    conftest$ac_exeext conftest.$ac_ext
13226LIBS=$ac_check_lib_save_LIBS
13227fi
13228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
13229$as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
13230if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
13231  UUID_LIBS="-lossp-uuid"
13232else
13233  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
13234$as_echo_n "checking for uuid_export in -luuid... " >&6; }
13235if ${ac_cv_lib_uuid_uuid_export+:} false; then :
13236  $as_echo_n "(cached) " >&6
13237else
13238  ac_check_lib_save_LIBS=$LIBS
13239LIBS="-luuid  $LIBS"
13240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13241/* end confdefs.h.  */
13242
13243/* Override any GCC internal prototype to avoid an error.
13244   Use char because int might match the return type of a GCC
13245   builtin and then its argument prototype would still apply.  */
13246#ifdef __cplusplus
13247extern "C"
13248#endif
13249char uuid_export ();
13250int
13251main ()
13252{
13253return uuid_export ();
13254  ;
13255  return 0;
13256}
13257_ACEOF
13258if ac_fn_c_try_link "$LINENO"; then :
13259  ac_cv_lib_uuid_uuid_export=yes
13260else
13261  ac_cv_lib_uuid_uuid_export=no
13262fi
13263rm -f core conftest.err conftest.$ac_objext \
13264    conftest$ac_exeext conftest.$ac_ext
13265LIBS=$ac_check_lib_save_LIBS
13266fi
13267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
13268$as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
13269if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
13270  UUID_LIBS="-luuid"
13271else
13272  as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
13273fi
13274
13275fi
13276
13277fi
13278
13279
13280
13281##
13282## Header files
13283##
13284
13285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
13286$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
13287if ${ac_cv_header_stdbool_h+:} false; then :
13288  $as_echo_n "(cached) " >&6
13289else
13290  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13291/* end confdefs.h.  */
13292
13293             #include <stdbool.h>
13294             #ifndef bool
13295              "error: bool is not defined"
13296             #endif
13297             #ifndef false
13298              "error: false is not defined"
13299             #endif
13300             #if false
13301              "error: false is not 0"
13302             #endif
13303             #ifndef true
13304              "error: true is not defined"
13305             #endif
13306             #if true != 1
13307              "error: true is not 1"
13308             #endif
13309             #ifndef __bool_true_false_are_defined
13310              "error: __bool_true_false_are_defined is not defined"
13311             #endif
13312
13313             struct s { _Bool s: 1; _Bool t; } s;
13314
13315             char a[true == 1 ? 1 : -1];
13316             char b[false == 0 ? 1 : -1];
13317             char c[__bool_true_false_are_defined == 1 ? 1 : -1];
13318             char d[(bool) 0.5 == true ? 1 : -1];
13319             /* See body of main program for 'e'.  */
13320             char f[(_Bool) 0.0 == false ? 1 : -1];
13321             char g[true];
13322             char h[sizeof (_Bool)];
13323             char i[sizeof s.t];
13324             enum { j = false, k = true, l = false * true, m = true * 256 };
13325             /* The following fails for
13326                HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
13327             _Bool n[m];
13328             char o[sizeof n == m * sizeof n[0] ? 1 : -1];
13329             char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
13330             /* Catch a bug in an HP-UX C compiler.  See
13331                http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
13332                http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
13333              */
13334             _Bool q = true;
13335             _Bool *pq = &q;
13336
13337int
13338main ()
13339{
13340
13341             bool e = &s;
13342             *pq |= q;
13343             *pq |= ! q;
13344             /* Refer to every declared value, to avoid compiler optimizations.  */
13345             return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
13346                     + !m + !n + !o + !p + !q + !pq);
13347
13348  ;
13349  return 0;
13350}
13351_ACEOF
13352if ac_fn_c_try_compile "$LINENO"; then :
13353  ac_cv_header_stdbool_h=yes
13354else
13355  ac_cv_header_stdbool_h=no
13356fi
13357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13358fi
13359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
13360$as_echo "$ac_cv_header_stdbool_h" >&6; }
13361   ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
13362if test "x$ac_cv_type__Bool" = xyes; then :
13363
13364cat >>confdefs.h <<_ACEOF
13365#define HAVE__BOOL 1
13366_ACEOF
13367
13368
13369fi
13370
13371
13372if test $ac_cv_header_stdbool_h = yes; then
13373
13374$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
13375
13376fi
13377
13378
13379for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/event.h sys/ipc.h sys/prctl.h sys/procctl.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/sockio.h sys/tas.h sys/uio.h sys/un.h termios.h ucred.h wctype.h
13380do :
13381  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13382ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13383if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13384  cat >>confdefs.h <<_ACEOF
13385#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13386_ACEOF
13387
13388fi
13389
13390done
13391
13392
13393# On BSD, test for net/if.h will fail unless sys/socket.h
13394# is included first.
13395for ac_header in net/if.h
13396do :
13397  ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
13398#include <sys/socket.h>
13399
13400"
13401if test "x$ac_cv_header_net_if_h" = xyes; then :
13402  cat >>confdefs.h <<_ACEOF
13403#define HAVE_NET_IF_H 1
13404_ACEOF
13405
13406fi
13407
13408done
13409
13410
13411# On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
13412# is included first.
13413for ac_header in sys/ucred.h
13414do :
13415  ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
13416#include <sys/param.h>
13417
13418"
13419if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
13420  cat >>confdefs.h <<_ACEOF
13421#define HAVE_SYS_UCRED_H 1
13422_ACEOF
13423
13424fi
13425
13426done
13427
13428
13429# At least on IRIX, test for netinet/tcp.h will fail unless
13430# netinet/in.h is included first.
13431for ac_header in netinet/tcp.h
13432do :
13433  ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
13434#include <netinet/in.h>
13435
13436"
13437if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
13438  cat >>confdefs.h <<_ACEOF
13439#define HAVE_NETINET_TCP_H 1
13440_ACEOF
13441
13442fi
13443
13444done
13445
13446
13447if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
13448  for ac_header in readline/readline.h
13449do :
13450  ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13451if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13452  cat >>confdefs.h <<_ACEOF
13453#define HAVE_READLINE_READLINE_H 1
13454_ACEOF
13455
13456else
13457  for ac_header in readline.h
13458do :
13459  ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13460if test "x$ac_cv_header_readline_h" = xyes; then :
13461  cat >>confdefs.h <<_ACEOF
13462#define HAVE_READLINE_H 1
13463_ACEOF
13464
13465else
13466  as_fn_error $? "readline header not found
13467If you have readline already installed, see config.log for details on the
13468failure.  It is possible the compiler isn't looking in the proper directory.
13469Use --without-readline to disable readline support." "$LINENO" 5
13470fi
13471
13472done
13473
13474fi
13475
13476done
13477
13478  for ac_header in readline/history.h
13479do :
13480  ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13481if test "x$ac_cv_header_readline_history_h" = xyes; then :
13482  cat >>confdefs.h <<_ACEOF
13483#define HAVE_READLINE_HISTORY_H 1
13484_ACEOF
13485
13486else
13487  for ac_header in history.h
13488do :
13489  ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13490if test "x$ac_cv_header_history_h" = xyes; then :
13491  cat >>confdefs.h <<_ACEOF
13492#define HAVE_HISTORY_H 1
13493_ACEOF
13494
13495else
13496  as_fn_error $? "history header not found
13497If you have readline already installed, see config.log for details on the
13498failure.  It is possible the compiler isn't looking in the proper directory.
13499Use --without-readline to disable readline support." "$LINENO" 5
13500fi
13501
13502done
13503
13504fi
13505
13506done
13507
13508fi
13509
13510if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
13511# Some installations of libedit usurp /usr/include/readline/, which seems
13512# bad practice, since in combined installations readline will have its headers
13513# there.  We might have to resort to AC_EGREP checks to make sure we found
13514# the proper header...
13515  for ac_header in editline/readline.h
13516do :
13517  ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
13518if test "x$ac_cv_header_editline_readline_h" = xyes; then :
13519  cat >>confdefs.h <<_ACEOF
13520#define HAVE_EDITLINE_READLINE_H 1
13521_ACEOF
13522
13523else
13524  for ac_header in readline.h
13525do :
13526  ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13527if test "x$ac_cv_header_readline_h" = xyes; then :
13528  cat >>confdefs.h <<_ACEOF
13529#define HAVE_READLINE_H 1
13530_ACEOF
13531
13532else
13533  for ac_header in readline/readline.h
13534do :
13535  ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13536if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13537  cat >>confdefs.h <<_ACEOF
13538#define HAVE_READLINE_READLINE_H 1
13539_ACEOF
13540
13541else
13542  as_fn_error $? "readline header not found
13543If you have libedit already installed, see config.log for details on the
13544failure.  It is possible the compiler isn't looking in the proper directory.
13545Use --without-readline to disable libedit support." "$LINENO" 5
13546fi
13547
13548done
13549
13550fi
13551
13552done
13553
13554fi
13555
13556done
13557
13558# Note: in a libedit installation, history.h is sometimes a dummy, and may
13559# not be there at all.  Hence, don't complain if not found.  We must check
13560# though, since in yet other versions it is an independent header.
13561  for ac_header in editline/history.h
13562do :
13563  ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
13564if test "x$ac_cv_header_editline_history_h" = xyes; then :
13565  cat >>confdefs.h <<_ACEOF
13566#define HAVE_EDITLINE_HISTORY_H 1
13567_ACEOF
13568
13569else
13570  for ac_header in history.h
13571do :
13572  ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13573if test "x$ac_cv_header_history_h" = xyes; then :
13574  cat >>confdefs.h <<_ACEOF
13575#define HAVE_HISTORY_H 1
13576_ACEOF
13577
13578else
13579  for ac_header in readline/history.h
13580do :
13581  ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13582if test "x$ac_cv_header_readline_history_h" = xyes; then :
13583  cat >>confdefs.h <<_ACEOF
13584#define HAVE_READLINE_HISTORY_H 1
13585_ACEOF
13586
13587fi
13588
13589done
13590
13591fi
13592
13593done
13594
13595fi
13596
13597done
13598
13599fi
13600
13601if test "$with_zlib" = yes; then
13602  ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
13603if test "x$ac_cv_header_zlib_h" = xyes; then :
13604
13605else
13606  as_fn_error $? "zlib header not found
13607If you have zlib already installed, see config.log for details on the
13608failure.  It is possible the compiler isn't looking in the proper directory.
13609Use --without-zlib to disable zlib support." "$LINENO" 5
13610fi
13611
13612
13613fi
13614
13615if test "$with_lz4" = yes; then
13616  for ac_header in lz4.h
13617do :
13618  ac_fn_c_check_header_mongrel "$LINENO" "lz4.h" "ac_cv_header_lz4_h" "$ac_includes_default"
13619if test "x$ac_cv_header_lz4_h" = xyes; then :
13620  cat >>confdefs.h <<_ACEOF
13621#define HAVE_LZ4_H 1
13622_ACEOF
13623
13624else
13625  as_fn_error $? "lz4.h header file is required for LZ4" "$LINENO" 5
13626fi
13627
13628done
13629
13630fi
13631
13632if test "$with_gssapi" = yes ; then
13633  for ac_header in gssapi/gssapi.h
13634do :
13635  ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
13636if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
13637  cat >>confdefs.h <<_ACEOF
13638#define HAVE_GSSAPI_GSSAPI_H 1
13639_ACEOF
13640
13641else
13642  for ac_header in gssapi.h
13643do :
13644  ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
13645if test "x$ac_cv_header_gssapi_h" = xyes; then :
13646  cat >>confdefs.h <<_ACEOF
13647#define HAVE_GSSAPI_H 1
13648_ACEOF
13649
13650else
13651  as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
13652fi
13653
13654done
13655
13656fi
13657
13658done
13659
13660fi
13661
13662if test "$with_ssl" = openssl ; then
13663  ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
13664if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
13665
13666else
13667  as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
13668fi
13669
13670
13671  ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
13672if test "x$ac_cv_header_openssl_err_h" = xyes; then :
13673
13674else
13675  as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
13676fi
13677
13678
13679fi
13680
13681if test "$with_pam" = yes ; then
13682  for ac_header in security/pam_appl.h
13683do :
13684  ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
13685if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
13686  cat >>confdefs.h <<_ACEOF
13687#define HAVE_SECURITY_PAM_APPL_H 1
13688_ACEOF
13689
13690else
13691  for ac_header in pam/pam_appl.h
13692do :
13693  ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
13694if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
13695  cat >>confdefs.h <<_ACEOF
13696#define HAVE_PAM_PAM_APPL_H 1
13697_ACEOF
13698
13699else
13700  as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
13701fi
13702
13703done
13704
13705fi
13706
13707done
13708
13709fi
13710
13711if test "$with_bsd_auth" = yes ; then
13712  ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
13713if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
13714
13715else
13716  as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
13717fi
13718
13719
13720fi
13721
13722if test "$with_systemd" = yes ; then
13723  ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
13724if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
13725
13726else
13727  as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
13728fi
13729
13730
13731fi
13732
13733if test "$with_libxml" = yes ; then
13734  ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
13735if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
13736
13737else
13738  as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
13739fi
13740
13741
13742fi
13743
13744if test "$with_libxslt" = yes ; then
13745  ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
13746if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
13747
13748else
13749  as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
13750fi
13751
13752
13753fi
13754
13755if test "$with_ldap" = yes ; then
13756  if test "$PORTNAME" != "win32"; then
13757     for ac_header in ldap.h
13758do :
13759  ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
13760if test "x$ac_cv_header_ldap_h" = xyes; then :
13761  cat >>confdefs.h <<_ACEOF
13762#define HAVE_LDAP_H 1
13763_ACEOF
13764
13765else
13766  as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
13767fi
13768
13769done
13770
13771     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
13772$as_echo_n "checking for compatible LDAP implementation... " >&6; }
13773if ${pgac_cv_ldap_safe+:} false; then :
13774  $as_echo_n "(cached) " >&6
13775else
13776  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13777/* end confdefs.h.  */
13778#include <ldap.h>
13779#if !defined(LDAP_VENDOR_VERSION) || \
13780     (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
13781      LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
13782choke me
13783#endif
13784int
13785main ()
13786{
13787
13788  ;
13789  return 0;
13790}
13791_ACEOF
13792if ac_fn_c_try_compile "$LINENO"; then :
13793  pgac_cv_ldap_safe=yes
13794else
13795  pgac_cv_ldap_safe=no
13796fi
13797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13798fi
13799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
13800$as_echo "$pgac_cv_ldap_safe" >&6; }
13801
13802if test "$pgac_cv_ldap_safe" != yes; then
13803  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
13804*** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13805*** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13806*** also uses LDAP will crash on exit." >&5
13807$as_echo "$as_me: WARNING:
13808*** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13809*** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13810*** also uses LDAP will crash on exit." >&2;}
13811fi
13812  else
13813     for ac_header in winldap.h
13814do :
13815  ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
13816#include <windows.h>
13817
13818"
13819if test "x$ac_cv_header_winldap_h" = xyes; then :
13820  cat >>confdefs.h <<_ACEOF
13821#define HAVE_WINLDAP_H 1
13822_ACEOF
13823
13824else
13825  as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
13826fi
13827
13828done
13829
13830  fi
13831fi
13832
13833if test "$with_bonjour" = yes ; then
13834  ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
13835if test "x$ac_cv_header_dns_sd_h" = xyes; then :
13836
13837else
13838  as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
13839fi
13840
13841
13842fi
13843
13844# for contrib/uuid-ossp
13845if test "$with_uuid" = bsd ; then
13846  for ac_header in uuid.h
13847do :
13848  ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13849if test "x$ac_cv_header_uuid_h" = xyes; then :
13850  cat >>confdefs.h <<_ACEOF
13851#define HAVE_UUID_H 1
13852_ACEOF
13853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13854/* end confdefs.h.  */
13855#include <uuid.h>
13856
13857_ACEOF
13858if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13859  $EGREP "uuid_to_string" >/dev/null 2>&1; then :
13860
13861else
13862  as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
13863fi
13864rm -f conftest*
13865
13866else
13867  as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
13868fi
13869
13870done
13871
13872elif test "$with_uuid" = e2fs ; then
13873  for ac_header in uuid/uuid.h
13874do :
13875  ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
13876if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
13877  cat >>confdefs.h <<_ACEOF
13878#define HAVE_UUID_UUID_H 1
13879_ACEOF
13880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13881/* end confdefs.h.  */
13882#include <uuid/uuid.h>
13883
13884_ACEOF
13885if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13886  $EGREP "uuid_generate" >/dev/null 2>&1; then :
13887
13888else
13889  as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
13890fi
13891rm -f conftest*
13892
13893else
13894  for ac_header in uuid.h
13895do :
13896  ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13897if test "x$ac_cv_header_uuid_h" = xyes; then :
13898  cat >>confdefs.h <<_ACEOF
13899#define HAVE_UUID_H 1
13900_ACEOF
13901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13902/* end confdefs.h.  */
13903#include <uuid.h>
13904
13905_ACEOF
13906if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13907  $EGREP "uuid_generate" >/dev/null 2>&1; then :
13908
13909else
13910  as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
13911fi
13912rm -f conftest*
13913
13914else
13915  as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
13916fi
13917
13918done
13919
13920fi
13921
13922done
13923
13924elif test "$with_uuid" = ossp ; then
13925  for ac_header in ossp/uuid.h
13926do :
13927  ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
13928if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
13929  cat >>confdefs.h <<_ACEOF
13930#define HAVE_OSSP_UUID_H 1
13931_ACEOF
13932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13933/* end confdefs.h.  */
13934#include <ossp/uuid.h>
13935
13936_ACEOF
13937if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13938  $EGREP "uuid_export" >/dev/null 2>&1; then :
13939
13940else
13941  as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
13942fi
13943rm -f conftest*
13944
13945else
13946  for ac_header in uuid.h
13947do :
13948  ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13949if test "x$ac_cv_header_uuid_h" = xyes; then :
13950  cat >>confdefs.h <<_ACEOF
13951#define HAVE_UUID_H 1
13952_ACEOF
13953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13954/* end confdefs.h.  */
13955#include <uuid.h>
13956
13957_ACEOF
13958if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13959  $EGREP "uuid_export" >/dev/null 2>&1; then :
13960
13961else
13962  as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
13963fi
13964rm -f conftest*
13965
13966else
13967  as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
13968fi
13969
13970done
13971
13972fi
13973
13974done
13975
13976fi
13977
13978if test "$PORTNAME" = "win32" ; then
13979   for ac_header in crtdefs.h
13980do :
13981  ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
13982if test "x$ac_cv_header_crtdefs_h" = xyes; then :
13983  cat >>confdefs.h <<_ACEOF
13984#define HAVE_CRTDEFS_H 1
13985_ACEOF
13986
13987fi
13988
13989done
13990
13991fi
13992
13993##
13994## Types, structures, compiler characteristics
13995##
13996
13997  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13998$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13999if ${ac_cv_c_bigendian+:} false; then :
14000  $as_echo_n "(cached) " >&6
14001else
14002  ac_cv_c_bigendian=unknown
14003    # See if we're dealing with a universal compiler.
14004    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14005/* end confdefs.h.  */
14006#ifndef __APPLE_CC__
14007	       not a universal capable compiler
14008	     #endif
14009	     typedef int dummy;
14010
14011_ACEOF
14012if ac_fn_c_try_compile "$LINENO"; then :
14013
14014	# Check for potential -arch flags.  It is not universal unless
14015	# there are at least two -arch flags with different values.
14016	ac_arch=
14017	ac_prev=
14018	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14019	 if test -n "$ac_prev"; then
14020	   case $ac_word in
14021	     i?86 | x86_64 | ppc | ppc64)
14022	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14023		 ac_arch=$ac_word
14024	       else
14025		 ac_cv_c_bigendian=universal
14026		 break
14027	       fi
14028	       ;;
14029	   esac
14030	   ac_prev=
14031	 elif test "x$ac_word" = "x-arch"; then
14032	   ac_prev=arch
14033	 fi
14034       done
14035fi
14036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14037    if test $ac_cv_c_bigendian = unknown; then
14038      # See if sys/param.h defines the BYTE_ORDER macro.
14039      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14040/* end confdefs.h.  */
14041#include <sys/types.h>
14042	     #include <sys/param.h>
14043
14044int
14045main ()
14046{
14047#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14048		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14049		     && LITTLE_ENDIAN)
14050	      bogus endian macros
14051	     #endif
14052
14053  ;
14054  return 0;
14055}
14056_ACEOF
14057if ac_fn_c_try_compile "$LINENO"; then :
14058  # It does; now see whether it defined to BIG_ENDIAN or not.
14059	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14060/* end confdefs.h.  */
14061#include <sys/types.h>
14062		#include <sys/param.h>
14063
14064int
14065main ()
14066{
14067#if BYTE_ORDER != BIG_ENDIAN
14068		 not big endian
14069		#endif
14070
14071  ;
14072  return 0;
14073}
14074_ACEOF
14075if ac_fn_c_try_compile "$LINENO"; then :
14076  ac_cv_c_bigendian=yes
14077else
14078  ac_cv_c_bigendian=no
14079fi
14080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14081fi
14082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14083    fi
14084    if test $ac_cv_c_bigendian = unknown; then
14085      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14086      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14087/* end confdefs.h.  */
14088#include <limits.h>
14089
14090int
14091main ()
14092{
14093#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14094	      bogus endian macros
14095	     #endif
14096
14097  ;
14098  return 0;
14099}
14100_ACEOF
14101if ac_fn_c_try_compile "$LINENO"; then :
14102  # It does; now see whether it defined to _BIG_ENDIAN or not.
14103	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14104/* end confdefs.h.  */
14105#include <limits.h>
14106
14107int
14108main ()
14109{
14110#ifndef _BIG_ENDIAN
14111		 not big endian
14112		#endif
14113
14114  ;
14115  return 0;
14116}
14117_ACEOF
14118if ac_fn_c_try_compile "$LINENO"; then :
14119  ac_cv_c_bigendian=yes
14120else
14121  ac_cv_c_bigendian=no
14122fi
14123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14124fi
14125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14126    fi
14127    if test $ac_cv_c_bigendian = unknown; then
14128      # Compile a test program.
14129      if test "$cross_compiling" = yes; then :
14130  # Try to guess by grepping values from an object file.
14131	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14132/* end confdefs.h.  */
14133short int ascii_mm[] =
14134		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14135		short int ascii_ii[] =
14136		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14137		int use_ascii (int i) {
14138		  return ascii_mm[i] + ascii_ii[i];
14139		}
14140		short int ebcdic_ii[] =
14141		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14142		short int ebcdic_mm[] =
14143		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14144		int use_ebcdic (int i) {
14145		  return ebcdic_mm[i] + ebcdic_ii[i];
14146		}
14147		extern int foo;
14148
14149int
14150main ()
14151{
14152return use_ascii (foo) == use_ebcdic (foo);
14153  ;
14154  return 0;
14155}
14156_ACEOF
14157if ac_fn_c_try_compile "$LINENO"; then :
14158  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14159	      ac_cv_c_bigendian=yes
14160	    fi
14161	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14162	      if test "$ac_cv_c_bigendian" = unknown; then
14163		ac_cv_c_bigendian=no
14164	      else
14165		# finding both strings is unlikely to happen, but who knows?
14166		ac_cv_c_bigendian=unknown
14167	      fi
14168	    fi
14169fi
14170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14171else
14172  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14173/* end confdefs.h.  */
14174$ac_includes_default
14175int
14176main ()
14177{
14178
14179	     /* Are we little or big endian?  From Harbison&Steele.  */
14180	     union
14181	     {
14182	       long int l;
14183	       char c[sizeof (long int)];
14184	     } u;
14185	     u.l = 1;
14186	     return u.c[sizeof (long int) - 1] == 1;
14187
14188  ;
14189  return 0;
14190}
14191_ACEOF
14192if ac_fn_c_try_run "$LINENO"; then :
14193  ac_cv_c_bigendian=no
14194else
14195  ac_cv_c_bigendian=yes
14196fi
14197rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14198  conftest.$ac_objext conftest.beam conftest.$ac_ext
14199fi
14200
14201    fi
14202fi
14203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14204$as_echo "$ac_cv_c_bigendian" >&6; }
14205 case $ac_cv_c_bigendian in #(
14206   yes)
14207     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14208;; #(
14209   no)
14210      ;; #(
14211   universal)
14212
14213$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
14214
14215     ;; #(
14216   *)
14217     as_fn_error $? "unknown endianness
14218 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
14219 esac
14220
14221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
14222$as_echo_n "checking for inline... " >&6; }
14223if ${ac_cv_c_inline+:} false; then :
14224  $as_echo_n "(cached) " >&6
14225else
14226  ac_cv_c_inline=no
14227for ac_kw in inline __inline__ __inline; do
14228  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14229/* end confdefs.h.  */
14230#ifndef __cplusplus
14231typedef int foo_t;
14232static $ac_kw foo_t static_foo () {return 0; }
14233$ac_kw foo_t foo () {return 0; }
14234#endif
14235
14236_ACEOF
14237if ac_fn_c_try_compile "$LINENO"; then :
14238  ac_cv_c_inline=$ac_kw
14239fi
14240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14241  test "$ac_cv_c_inline" != no && break
14242done
14243
14244fi
14245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
14246$as_echo "$ac_cv_c_inline" >&6; }
14247
14248case $ac_cv_c_inline in
14249  inline | yes) ;;
14250  *)
14251    case $ac_cv_c_inline in
14252      no) ac_val=;;
14253      *) ac_val=$ac_cv_c_inline;;
14254    esac
14255    cat >>confdefs.h <<_ACEOF
14256#ifndef __cplusplus
14257#define inline $ac_val
14258#endif
14259_ACEOF
14260    ;;
14261esac
14262
14263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
14264$as_echo_n "checking for printf format archetype... " >&6; }
14265if ${pgac_cv_printf_archetype+:} false; then :
14266  $as_echo_n "(cached) " >&6
14267else
14268  pgac_cv_printf_archetype=gnu_printf
14269ac_save_c_werror_flag=$ac_c_werror_flag
14270ac_c_werror_flag=yes
14271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14272/* end confdefs.h.  */
14273extern void pgac_write(int ignore, const char *fmt,...)
14274__attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14275int
14276main ()
14277{
14278pgac_write(0, "error %s: %m", "foo");
14279  ;
14280  return 0;
14281}
14282_ACEOF
14283if ac_fn_c_try_compile "$LINENO"; then :
14284  ac_archetype_ok=yes
14285else
14286  ac_archetype_ok=no
14287fi
14288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14289ac_c_werror_flag=$ac_save_c_werror_flag
14290
14291if [ "$ac_archetype_ok" = no ]; then
14292  pgac_cv_printf_archetype=__syslog__
14293  ac_save_c_werror_flag=$ac_c_werror_flag
14294ac_c_werror_flag=yes
14295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14296/* end confdefs.h.  */
14297extern void pgac_write(int ignore, const char *fmt,...)
14298__attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14299int
14300main ()
14301{
14302pgac_write(0, "error %s: %m", "foo");
14303  ;
14304  return 0;
14305}
14306_ACEOF
14307if ac_fn_c_try_compile "$LINENO"; then :
14308  ac_archetype_ok=yes
14309else
14310  ac_archetype_ok=no
14311fi
14312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14313ac_c_werror_flag=$ac_save_c_werror_flag
14314
14315  if [ "$ac_archetype_ok" = no ]; then
14316    pgac_cv_printf_archetype=printf
14317  fi
14318fi
14319fi
14320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
14321$as_echo "$pgac_cv_printf_archetype" >&6; }
14322
14323cat >>confdefs.h <<_ACEOF
14324#define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
14325_ACEOF
14326
14327
14328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
14329$as_echo_n "checking for __func__... " >&6; }
14330if ${pgac_cv_funcname_func_support+:} false; then :
14331  $as_echo_n "(cached) " >&6
14332else
14333  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14334/* end confdefs.h.  */
14335#include <stdio.h>
14336int
14337main ()
14338{
14339printf("%s\n", __func__);
14340  ;
14341  return 0;
14342}
14343_ACEOF
14344if ac_fn_c_try_compile "$LINENO"; then :
14345  pgac_cv_funcname_func_support=yes
14346else
14347  pgac_cv_funcname_func_support=no
14348fi
14349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14350fi
14351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
14352$as_echo "$pgac_cv_funcname_func_support" >&6; }
14353if test x"$pgac_cv_funcname_func_support" = xyes ; then
14354
14355$as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
14356
14357else
14358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
14359$as_echo_n "checking for __FUNCTION__... " >&6; }
14360if ${pgac_cv_funcname_function_support+:} false; then :
14361  $as_echo_n "(cached) " >&6
14362else
14363  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14364/* end confdefs.h.  */
14365#include <stdio.h>
14366int
14367main ()
14368{
14369printf("%s\n", __FUNCTION__);
14370  ;
14371  return 0;
14372}
14373_ACEOF
14374if ac_fn_c_try_compile "$LINENO"; then :
14375  pgac_cv_funcname_function_support=yes
14376else
14377  pgac_cv_funcname_function_support=no
14378fi
14379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14380fi
14381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
14382$as_echo "$pgac_cv_funcname_function_support" >&6; }
14383if test x"$pgac_cv_funcname_function_support" = xyes ; then
14384
14385$as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
14386
14387fi
14388fi
14389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
14390$as_echo_n "checking for _Static_assert... " >&6; }
14391if ${pgac_cv__static_assert+:} false; then :
14392  $as_echo_n "(cached) " >&6
14393else
14394  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14395/* end confdefs.h.  */
14396
14397int
14398main ()
14399{
14400({ _Static_assert(1, "foo"); })
14401  ;
14402  return 0;
14403}
14404_ACEOF
14405if ac_fn_c_try_link "$LINENO"; then :
14406  pgac_cv__static_assert=yes
14407else
14408  pgac_cv__static_assert=no
14409fi
14410rm -f core conftest.err conftest.$ac_objext \
14411    conftest$ac_exeext conftest.$ac_ext
14412fi
14413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
14414$as_echo "$pgac_cv__static_assert" >&6; }
14415if test x"$pgac_cv__static_assert" = xyes ; then
14416
14417$as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
14418
14419fi
14420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
14421$as_echo_n "checking for typeof... " >&6; }
14422if ${pgac_cv_c_typeof+:} false; then :
14423  $as_echo_n "(cached) " >&6
14424else
14425  pgac_cv_c_typeof=no
14426for pgac_kw in typeof __typeof__ decltype; do
14427  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14428/* end confdefs.h.  */
14429
14430int
14431main ()
14432{
14433int x = 0;
14434$pgac_kw(x) y;
14435y = x;
14436return y;
14437  ;
14438  return 0;
14439}
14440_ACEOF
14441if ac_fn_c_try_compile "$LINENO"; then :
14442  pgac_cv_c_typeof=$pgac_kw
14443fi
14444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14445  test "$pgac_cv_c_typeof" != no && break
14446done
14447fi
14448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
14449$as_echo "$pgac_cv_c_typeof" >&6; }
14450if test "$pgac_cv_c_typeof" != no; then
14451
14452$as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
14453
14454  if test "$pgac_cv_c_typeof" != typeof; then
14455
14456cat >>confdefs.h <<_ACEOF
14457#define typeof $pgac_cv_c_typeof
14458_ACEOF
14459
14460  fi
14461fi
14462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
14463$as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
14464if ${pgac_cv__types_compatible+:} false; then :
14465  $as_echo_n "(cached) " >&6
14466else
14467  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14468/* end confdefs.h.  */
14469
14470int
14471main ()
14472{
14473 int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
14474  ;
14475  return 0;
14476}
14477_ACEOF
14478if ac_fn_c_try_compile "$LINENO"; then :
14479  pgac_cv__types_compatible=yes
14480else
14481  pgac_cv__types_compatible=no
14482fi
14483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14484fi
14485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
14486$as_echo "$pgac_cv__types_compatible" >&6; }
14487if test x"$pgac_cv__types_compatible" = xyes ; then
14488
14489$as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
14490
14491fi
14492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
14493$as_echo_n "checking for __builtin_constant_p... " >&6; }
14494if ${pgac_cv__builtin_constant_p+:} false; then :
14495  $as_echo_n "(cached) " >&6
14496else
14497  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14498/* end confdefs.h.  */
14499static int x;
14500  static int y[__builtin_constant_p(x) ? x : 1];
14501  static int z[__builtin_constant_p("string literal") ? 1 : x];
14502
14503
14504_ACEOF
14505if ac_fn_c_try_compile "$LINENO"; then :
14506  pgac_cv__builtin_constant_p=yes
14507else
14508  pgac_cv__builtin_constant_p=no
14509fi
14510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14511fi
14512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
14513$as_echo "$pgac_cv__builtin_constant_p" >&6; }
14514if test x"$pgac_cv__builtin_constant_p" = xyes ; then
14515
14516$as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
14517
14518fi
14519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
14520$as_echo_n "checking for __builtin_unreachable... " >&6; }
14521if ${pgac_cv__builtin_unreachable+:} false; then :
14522  $as_echo_n "(cached) " >&6
14523else
14524  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14525/* end confdefs.h.  */
14526
14527int
14528main ()
14529{
14530__builtin_unreachable();
14531  ;
14532  return 0;
14533}
14534_ACEOF
14535if ac_fn_c_try_link "$LINENO"; then :
14536  pgac_cv__builtin_unreachable=yes
14537else
14538  pgac_cv__builtin_unreachable=no
14539fi
14540rm -f core conftest.err conftest.$ac_objext \
14541    conftest$ac_exeext conftest.$ac_ext
14542fi
14543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
14544$as_echo "$pgac_cv__builtin_unreachable" >&6; }
14545if test x"$pgac_cv__builtin_unreachable" = xyes ; then
14546
14547$as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
14548
14549fi
14550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
14551$as_echo_n "checking for computed goto support... " >&6; }
14552if ${pgac_cv_computed_goto+:} false; then :
14553  $as_echo_n "(cached) " >&6
14554else
14555  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14556/* end confdefs.h.  */
14557
14558int
14559main ()
14560{
14561void *labeladdrs[] = {&&my_label};
14562  goto *labeladdrs[0];
14563  my_label:
14564  return 1;
14565
14566  ;
14567  return 0;
14568}
14569_ACEOF
14570if ac_fn_c_try_compile "$LINENO"; then :
14571  pgac_cv_computed_goto=yes
14572else
14573  pgac_cv_computed_goto=no
14574fi
14575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14576fi
14577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
14578$as_echo "$pgac_cv_computed_goto" >&6; }
14579if test x"$pgac_cv_computed_goto" = xyes ; then
14580
14581$as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
14582
14583fi
14584ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14585#include <time.h>
14586
14587"
14588if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
14589
14590cat >>confdefs.h <<_ACEOF
14591#define HAVE_STRUCT_TM_TM_ZONE 1
14592_ACEOF
14593
14594
14595fi
14596
14597
14598ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14599#ifdef HAVE_SYS_IPC_H
14600#include <sys/ipc.h>
14601#endif
14602#ifdef HAVE_SYS_SEM_H
14603#include <sys/sem.h>
14604#endif
14605"
14606if test "x$ac_cv_type_union_semun" = xyes; then :
14607
14608cat >>confdefs.h <<_ACEOF
14609#define HAVE_UNION_SEMUN 1
14610_ACEOF
14611
14612
14613fi
14614
14615ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
14616#ifdef HAVE_SYS_UN_H
14617#include <sys/un.h>
14618#endif
14619
14620"
14621if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
14622
14623cat >>confdefs.h <<_ACEOF
14624#define HAVE_STRUCT_SOCKADDR_UN 1
14625_ACEOF
14626
14627
14628fi
14629
14630ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
14631#include <sys/socket.h>
14632
14633"
14634if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
14635
14636cat >>confdefs.h <<_ACEOF
14637#define HAVE_STRUCT_SOCKADDR_STORAGE 1
14638_ACEOF
14639
14640
14641fi
14642
14643ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
14644#include <sys/socket.h>
14645
14646"
14647if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
14648
14649cat >>confdefs.h <<_ACEOF
14650#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
14651_ACEOF
14652
14653
14654fi
14655ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
14656#include <sys/socket.h>
14657
14658"
14659if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
14660
14661cat >>confdefs.h <<_ACEOF
14662#define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
14663_ACEOF
14664
14665
14666fi
14667ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
14668#include <sys/socket.h>
14669
14670"
14671if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
14672
14673cat >>confdefs.h <<_ACEOF
14674#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
14675_ACEOF
14676
14677
14678fi
14679ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
14680#include <sys/socket.h>
14681
14682"
14683if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
14684
14685cat >>confdefs.h <<_ACEOF
14686#define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
14687_ACEOF
14688
14689
14690fi
14691ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14692#include <sys/socket.h>
14693
14694"
14695if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14696
14697cat >>confdefs.h <<_ACEOF
14698#define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14699_ACEOF
14700
14701
14702fi
14703
14704ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
14705#include <sys/socket.h>
14706#include <netdb.h>
14707
14708"
14709if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
14710
14711cat >>confdefs.h <<_ACEOF
14712#define HAVE_STRUCT_ADDRINFO 1
14713_ACEOF
14714
14715
14716fi
14717
14718
14719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
14720$as_echo_n "checking for locale_t... " >&6; }
14721if ${pgac_cv_type_locale_t+:} false; then :
14722  $as_echo_n "(cached) " >&6
14723else
14724  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14725/* end confdefs.h.  */
14726#include <locale.h>
14727locale_t x;
14728int
14729main ()
14730{
14731
14732  ;
14733  return 0;
14734}
14735_ACEOF
14736if ac_fn_c_try_compile "$LINENO"; then :
14737  pgac_cv_type_locale_t=yes
14738else
14739  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14740/* end confdefs.h.  */
14741#include <xlocale.h>
14742locale_t x;
14743int
14744main ()
14745{
14746
14747  ;
14748  return 0;
14749}
14750_ACEOF
14751if ac_fn_c_try_compile "$LINENO"; then :
14752  pgac_cv_type_locale_t='yes (in xlocale.h)'
14753else
14754  pgac_cv_type_locale_t=no
14755fi
14756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14757fi
14758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14759fi
14760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
14761$as_echo "$pgac_cv_type_locale_t" >&6; }
14762if test "$pgac_cv_type_locale_t" != no; then
14763
14764$as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
14765
14766fi
14767if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
14768
14769$as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
14770
14771fi
14772
14773# MSVC doesn't cope well with defining restrict to __restrict, the
14774# spelling it understands, because it conflicts with
14775# __declspec(restrict). Therefore we define pg_restrict to the
14776# appropriate definition, which presumably won't conflict.
14777#
14778# Allow platforms with buggy compilers to force restrict to not be
14779# used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
14780# template.
14781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14782$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
14783if ${ac_cv_c_restrict+:} false; then :
14784  $as_echo_n "(cached) " >&6
14785else
14786  ac_cv_c_restrict=no
14787   # The order here caters to the fact that C++ does not require restrict.
14788   for ac_kw in __restrict __restrict__ _Restrict restrict; do
14789     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14790/* end confdefs.h.  */
14791typedef int * int_ptr;
14792	int foo (int_ptr $ac_kw ip) {
14793	return ip[0];
14794       }
14795int
14796main ()
14797{
14798int s[1];
14799	int * $ac_kw t = s;
14800	t[0] = 0;
14801	return foo(t)
14802  ;
14803  return 0;
14804}
14805_ACEOF
14806if ac_fn_c_try_compile "$LINENO"; then :
14807  ac_cv_c_restrict=$ac_kw
14808fi
14809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14810     test "$ac_cv_c_restrict" != no && break
14811   done
14812
14813fi
14814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14815$as_echo "$ac_cv_c_restrict" >&6; }
14816
14817 case $ac_cv_c_restrict in
14818   restrict) ;;
14819   no) $as_echo "#define restrict /**/" >>confdefs.h
14820 ;;
14821   *)  cat >>confdefs.h <<_ACEOF
14822#define restrict $ac_cv_c_restrict
14823_ACEOF
14824 ;;
14825 esac
14826
14827if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
14828  pg_restrict=""
14829else
14830  pg_restrict="$ac_cv_c_restrict"
14831fi
14832
14833cat >>confdefs.h <<_ACEOF
14834#define pg_restrict $pg_restrict
14835_ACEOF
14836
14837
14838ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
14839#include <sys/param.h>
14840#ifdef HAVE_SYS_UCRED_H
14841#include <sys/ucred.h>
14842#endif
14843"
14844if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
14845
14846cat >>confdefs.h <<_ACEOF
14847#define HAVE_STRUCT_CMSGCRED 1
14848_ACEOF
14849
14850
14851fi
14852
14853
14854ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
14855#include <getopt.h>
14856#endif
14857"
14858if test "x$ac_cv_type_struct_option" = xyes; then :
14859
14860cat >>confdefs.h <<_ACEOF
14861#define HAVE_STRUCT_OPTION 1
14862_ACEOF
14863
14864
14865fi
14866
14867
14868if test "$with_zlib" = yes; then
14869  # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
14870  # did not).  While we could work around the lack of z_streamp, it
14871  # seems unwise to encourage people to use such old zlib versions...
14872  ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
14873"
14874if test "x$ac_cv_type_z_streamp" = xyes; then :
14875
14876else
14877  as_fn_error $? "zlib version is too old
14878Use --without-zlib to disable zlib support." "$LINENO" 5
14879fi
14880
14881fi
14882
14883case $host_cpu in
14884  x86_64)
14885    # On x86_64, check if we can compile a popcntq instruction
14886    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports x86_64 popcntq" >&5
14887$as_echo_n "checking whether assembler supports x86_64 popcntq... " >&6; }
14888if ${pgac_cv_have_x86_64_popcntq+:} false; then :
14889  $as_echo_n "(cached) " >&6
14890else
14891  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14892/* end confdefs.h.  */
14893
14894int
14895main ()
14896{
14897long long x = 1; long long r;
14898	 __asm__ __volatile__ (" popcntq %1,%0\n" : "=q"(r) : "rm"(x));
14899  ;
14900  return 0;
14901}
14902_ACEOF
14903if ac_fn_c_try_compile "$LINENO"; then :
14904  pgac_cv_have_x86_64_popcntq=yes
14905else
14906  pgac_cv_have_x86_64_popcntq=no
14907fi
14908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14909fi
14910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_x86_64_popcntq" >&5
14911$as_echo "$pgac_cv_have_x86_64_popcntq" >&6; }
14912    if test x"$pgac_cv_have_x86_64_popcntq" = xyes ; then
14913
14914$as_echo "#define HAVE_X86_64_POPCNTQ 1" >>confdefs.h
14915
14916    fi
14917  ;;
14918  ppc*|powerpc*)
14919    # On PPC, check if assembler supports LWARX instruction's mutex hint bit
14920    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
14921$as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
14922if ${pgac_cv_have_ppc_mutex_hint+:} false; then :
14923  $as_echo_n "(cached) " >&6
14924else
14925  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14926/* end confdefs.h.  */
14927
14928int
14929main ()
14930{
14931int a = 0; int *p = &a; int r;
14932	 __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
14933  ;
14934  return 0;
14935}
14936_ACEOF
14937if ac_fn_c_try_compile "$LINENO"; then :
14938  pgac_cv_have_ppc_mutex_hint=yes
14939else
14940  pgac_cv_have_ppc_mutex_hint=no
14941fi
14942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14943fi
14944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
14945$as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
14946    if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
14947
14948$as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
14949
14950    fi
14951    # Check if compiler accepts "i"(x) when __builtin_constant_p(x).
14952    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance" >&5
14953$as_echo_n "checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance... " >&6; }
14954if ${pgac_cv_have_i_constraint__builtin_constant_p+:} false; then :
14955  $as_echo_n "(cached) " >&6
14956else
14957  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14958/* end confdefs.h.  */
14959static inline int
14960     addi(int ra, int si)
14961     {
14962         int res = 0;
14963         if (__builtin_constant_p(si))
14964             __asm__ __volatile__(
14965                 " addi %0,%1,%2\n" : "=r"(res) : "b"(ra), "i"(si));
14966         return res;
14967     }
14968     int test_adds(int x) { return addi(3, x) + addi(x, 5); }
14969int
14970main ()
14971{
14972
14973  ;
14974  return 0;
14975}
14976_ACEOF
14977if ac_fn_c_try_compile "$LINENO"; then :
14978  pgac_cv_have_i_constraint__builtin_constant_p=yes
14979else
14980  pgac_cv_have_i_constraint__builtin_constant_p=no
14981fi
14982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14983fi
14984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_i_constraint__builtin_constant_p" >&5
14985$as_echo "$pgac_cv_have_i_constraint__builtin_constant_p" >&6; }
14986    if test x"$pgac_cv_have_i_constraint__builtin_constant_p" = xyes ; then
14987
14988$as_echo "#define HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P 1" >>confdefs.h
14989
14990    fi
14991  ;;
14992esac
14993
14994# Check largefile support.  You might think this is a system service not a
14995# compiler characteristic, but you'd be wrong.  We must check this before
14996# probing existence of related functions such as fseeko, since the largefile
14997# defines can affect what is generated for that.
14998if test "$PORTNAME" != "win32"; then
14999   # Check whether --enable-largefile was given.
15000if test "${enable_largefile+set}" = set; then :
15001  enableval=$enable_largefile;
15002fi
15003
15004if test "$enable_largefile" != no; then
15005
15006  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
15007$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
15008if ${ac_cv_sys_largefile_CC+:} false; then :
15009  $as_echo_n "(cached) " >&6
15010else
15011  ac_cv_sys_largefile_CC=no
15012     if test "$GCC" != yes; then
15013       ac_save_CC=$CC
15014       while :; do
15015	 # IRIX 6.2 and later do not support large files by default,
15016	 # so use the C compiler's -n32 option if that helps.
15017	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15018/* end confdefs.h.  */
15019#include <sys/types.h>
15020 /* Check that off_t can represent 2**63 - 1 correctly.
15021    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15022    since some C++ compilers masquerading as C compilers
15023    incorrectly reject 9223372036854775807.  */
15024#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15025  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15026		       && LARGE_OFF_T % 2147483647 == 1)
15027		      ? 1 : -1];
15028int
15029main ()
15030{
15031
15032  ;
15033  return 0;
15034}
15035_ACEOF
15036	 if ac_fn_c_try_compile "$LINENO"; then :
15037  break
15038fi
15039rm -f core conftest.err conftest.$ac_objext
15040	 CC="$CC -n32"
15041	 if ac_fn_c_try_compile "$LINENO"; then :
15042  ac_cv_sys_largefile_CC=' -n32'; break
15043fi
15044rm -f core conftest.err conftest.$ac_objext
15045	 break
15046       done
15047       CC=$ac_save_CC
15048       rm -f conftest.$ac_ext
15049    fi
15050fi
15051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
15052$as_echo "$ac_cv_sys_largefile_CC" >&6; }
15053  if test "$ac_cv_sys_largefile_CC" != no; then
15054    CC=$CC$ac_cv_sys_largefile_CC
15055  fi
15056
15057  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15058$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
15059if ${ac_cv_sys_file_offset_bits+:} false; then :
15060  $as_echo_n "(cached) " >&6
15061else
15062  while :; do
15063  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15064/* end confdefs.h.  */
15065#include <sys/types.h>
15066 /* Check that off_t can represent 2**63 - 1 correctly.
15067    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15068    since some C++ compilers masquerading as C compilers
15069    incorrectly reject 9223372036854775807.  */
15070#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15071  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15072		       && LARGE_OFF_T % 2147483647 == 1)
15073		      ? 1 : -1];
15074int
15075main ()
15076{
15077
15078  ;
15079  return 0;
15080}
15081_ACEOF
15082if ac_fn_c_try_compile "$LINENO"; then :
15083  ac_cv_sys_file_offset_bits=no; break
15084fi
15085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15086  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15087/* end confdefs.h.  */
15088#define _FILE_OFFSET_BITS 64
15089#include <sys/types.h>
15090 /* Check that off_t can represent 2**63 - 1 correctly.
15091    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15092    since some C++ compilers masquerading as C compilers
15093    incorrectly reject 9223372036854775807.  */
15094#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15095  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15096		       && LARGE_OFF_T % 2147483647 == 1)
15097		      ? 1 : -1];
15098int
15099main ()
15100{
15101
15102  ;
15103  return 0;
15104}
15105_ACEOF
15106if ac_fn_c_try_compile "$LINENO"; then :
15107  ac_cv_sys_file_offset_bits=64; break
15108fi
15109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15110  ac_cv_sys_file_offset_bits=unknown
15111  break
15112done
15113fi
15114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
15115$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
15116case $ac_cv_sys_file_offset_bits in #(
15117  no | unknown) ;;
15118  *)
15119cat >>confdefs.h <<_ACEOF
15120#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15121_ACEOF
15122;;
15123esac
15124rm -rf conftest*
15125  if test $ac_cv_sys_file_offset_bits = unknown; then
15126    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15127$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15128if ${ac_cv_sys_large_files+:} false; then :
15129  $as_echo_n "(cached) " >&6
15130else
15131  while :; do
15132  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15133/* end confdefs.h.  */
15134#include <sys/types.h>
15135 /* Check that off_t can represent 2**63 - 1 correctly.
15136    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15137    since some C++ compilers masquerading as C compilers
15138    incorrectly reject 9223372036854775807.  */
15139#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15140  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15141		       && LARGE_OFF_T % 2147483647 == 1)
15142		      ? 1 : -1];
15143int
15144main ()
15145{
15146
15147  ;
15148  return 0;
15149}
15150_ACEOF
15151if ac_fn_c_try_compile "$LINENO"; then :
15152  ac_cv_sys_large_files=no; break
15153fi
15154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15155  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15156/* end confdefs.h.  */
15157#define _LARGE_FILES 1
15158#include <sys/types.h>
15159 /* Check that off_t can represent 2**63 - 1 correctly.
15160    We can't simply define LARGE_OFF_T to be 9223372036854775807,
15161    since some C++ compilers masquerading as C compilers
15162    incorrectly reject 9223372036854775807.  */
15163#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15164  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15165		       && LARGE_OFF_T % 2147483647 == 1)
15166		      ? 1 : -1];
15167int
15168main ()
15169{
15170
15171  ;
15172  return 0;
15173}
15174_ACEOF
15175if ac_fn_c_try_compile "$LINENO"; then :
15176  ac_cv_sys_large_files=1; break
15177fi
15178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15179  ac_cv_sys_large_files=unknown
15180  break
15181done
15182fi
15183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15184$as_echo "$ac_cv_sys_large_files" >&6; }
15185case $ac_cv_sys_large_files in #(
15186  no | unknown) ;;
15187  *)
15188cat >>confdefs.h <<_ACEOF
15189#define _LARGE_FILES $ac_cv_sys_large_files
15190_ACEOF
15191;;
15192esac
15193rm -rf conftest*
15194  fi
15195
15196
15197fi
15198
15199
15200fi
15201
15202# The cast to long int works around a bug in the HP C Compiler
15203# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15204# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15205# This bug is HP SR number 8606223364.
15206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
15207$as_echo_n "checking size of off_t... " >&6; }
15208if ${ac_cv_sizeof_off_t+:} false; then :
15209  $as_echo_n "(cached) " >&6
15210else
15211  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
15212
15213else
15214  if test "$ac_cv_type_off_t" = yes; then
15215     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15216$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15217as_fn_error 77 "cannot compute sizeof (off_t)
15218See \`config.log' for more details" "$LINENO" 5; }
15219   else
15220     ac_cv_sizeof_off_t=0
15221   fi
15222fi
15223
15224fi
15225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
15226$as_echo "$ac_cv_sizeof_off_t" >&6; }
15227
15228
15229
15230cat >>confdefs.h <<_ACEOF
15231#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
15232_ACEOF
15233
15234
15235
15236# If we don't have largefile support, can't handle segsize >= 2GB.
15237if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
15238   as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
15239fi
15240
15241# The cast to long int works around a bug in the HP C Compiler
15242# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15243# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15244# This bug is HP SR number 8606223364.
15245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
15246$as_echo_n "checking size of bool... " >&6; }
15247if ${ac_cv_sizeof_bool+:} false; then :
15248  $as_echo_n "(cached) " >&6
15249else
15250  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool"        "#ifdef HAVE_STDBOOL_H
15251#include <stdbool.h>
15252#endif
15253"; then :
15254
15255else
15256  if test "$ac_cv_type_bool" = yes; then
15257     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15258$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15259as_fn_error 77 "cannot compute sizeof (bool)
15260See \`config.log' for more details" "$LINENO" 5; }
15261   else
15262     ac_cv_sizeof_bool=0
15263   fi
15264fi
15265
15266fi
15267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
15268$as_echo "$ac_cv_sizeof_bool" >&6; }
15269
15270
15271
15272cat >>confdefs.h <<_ACEOF
15273#define SIZEOF_BOOL $ac_cv_sizeof_bool
15274_ACEOF
15275
15276
15277
15278if test "$ac_cv_header_stdbool_h" = yes -a "$ac_cv_sizeof_bool" = 1; then
15279
15280$as_echo "#define PG_USE_STDBOOL 1" >>confdefs.h
15281
15282fi
15283
15284
15285##
15286## Functions, global variables
15287##
15288
15289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
15290$as_echo_n "checking for int timezone... " >&6; }
15291if ${pgac_cv_var_int_timezone+:} false; then :
15292  $as_echo_n "(cached) " >&6
15293else
15294  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15295/* end confdefs.h.  */
15296#include <time.h>
15297int res;
15298int
15299main ()
15300{
15301#ifndef __CYGWIN__
15302res = timezone / 60;
15303#else
15304res = _timezone / 60;
15305#endif
15306  ;
15307  return 0;
15308}
15309_ACEOF
15310if ac_fn_c_try_link "$LINENO"; then :
15311  pgac_cv_var_int_timezone=yes
15312else
15313  pgac_cv_var_int_timezone=no
15314fi
15315rm -f core conftest.err conftest.$ac_objext \
15316    conftest$ac_exeext conftest.$ac_ext
15317fi
15318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
15319$as_echo "$pgac_cv_var_int_timezone" >&6; }
15320if test x"$pgac_cv_var_int_timezone" = xyes ; then
15321
15322$as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
15323
15324fi
15325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
15326$as_echo_n "checking types of arguments for accept()... " >&6; }
15327 if ${ac_cv_func_accept_return+:} false; then :
15328  $as_echo_n "(cached) " >&6
15329else
15330   if ${ac_cv_func_accept_arg1+:} false; then :
15331  $as_echo_n "(cached) " >&6
15332else
15333    if ${ac_cv_func_accept_arg2+:} false; then :
15334  $as_echo_n "(cached) " >&6
15335else
15336     if ${ac_cv_func_accept_arg3+:} false; then :
15337  $as_echo_n "(cached) " >&6
15338else
15339      for ac_cv_func_accept_return in 'int' 'SOCKET WSAAPI' 'unsigned int PASCAL'; do
15340      for ac_cv_func_accept_arg1 in 'int' 'SOCKET' 'unsigned int'; do
15341       for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
15342        for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
15343         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15344/* end confdefs.h.  */
15345#include <sys/types.h>
15346#include <sys/socket.h>
15347extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
15348_ACEOF
15349if ac_fn_c_try_compile "$LINENO"; then :
15350  ac_not_found=no; break 4
15351else
15352  ac_not_found=yes
15353fi
15354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15355       done
15356      done
15357     done
15358    done
15359    if test "$ac_not_found" = yes; then
15360      as_fn_error $? "could not determine argument types" "$LINENO" 5
15361    fi
15362    if test "$ac_cv_func_accept_arg3" = "void"; then
15363      ac_cv_func_accept_arg3=int
15364    fi
15365
15366fi
15367
15368fi
15369
15370fi
15371
15372fi
15373 { $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
15374$as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
15375
15376cat >>confdefs.h <<_ACEOF
15377#define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
15378_ACEOF
15379
15380
15381cat >>confdefs.h <<_ACEOF
15382#define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
15383_ACEOF
15384
15385
15386cat >>confdefs.h <<_ACEOF
15387#define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
15388_ACEOF
15389
15390
15391cat >>confdefs.h <<_ACEOF
15392#define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
15393_ACEOF
15394
15395
15396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
15397$as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
15398if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
15399  $as_echo_n "(cached) " >&6
15400else
15401  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15402/* end confdefs.h.  */
15403#include <sys/time.h>
15404int
15405main ()
15406{
15407struct timeval *tp;
15408struct timezone *tzp;
15409gettimeofday(tp,tzp);
15410  ;
15411  return 0;
15412}
15413_ACEOF
15414if ac_fn_c_try_compile "$LINENO"; then :
15415  pgac_cv_func_gettimeofday_1arg=no
15416else
15417  pgac_cv_func_gettimeofday_1arg=yes
15418fi
15419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15420fi
15421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
15422$as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
15423if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
15424
15425$as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
15426
15427fi
15428
15429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
15430$as_echo_n "checking for wcstombs_l declaration... " >&6; }
15431if ${pgac_cv_func_wcstombs_l+:} false; then :
15432  $as_echo_n "(cached) " >&6
15433else
15434  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15435/* end confdefs.h.  */
15436#include <stdlib.h>
15437#include <locale.h>
15438int
15439main ()
15440{
15441#ifndef wcstombs_l
15442(void) wcstombs_l;
15443#endif
15444  ;
15445  return 0;
15446}
15447_ACEOF
15448if ac_fn_c_try_compile "$LINENO"; then :
15449  pgac_cv_func_wcstombs_l='yes'
15450else
15451  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15452/* end confdefs.h.  */
15453#include <stdlib.h>
15454#include <locale.h>
15455#include <xlocale.h>
15456int
15457main ()
15458{
15459#ifndef wcstombs_l
15460(void) wcstombs_l;
15461#endif
15462  ;
15463  return 0;
15464}
15465_ACEOF
15466if ac_fn_c_try_compile "$LINENO"; then :
15467  pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
15468else
15469  pgac_cv_func_wcstombs_l='no'
15470fi
15471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15472fi
15473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15474fi
15475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
15476$as_echo "$pgac_cv_func_wcstombs_l" >&6; }
15477if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
15478
15479$as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
15480
15481fi
15482
15483# Some versions of libedit contain strlcpy(), setproctitle(), and other
15484# symbols that that library has no business exposing to the world.  Pending
15485# acquisition of a clue by those developers, ignore libedit (including its
15486# possible alias of libreadline) while checking for everything else.
15487LIBS_including_readline="$LIBS"
15488LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15489
15490for ac_func in backtrace_symbols clock_gettime copyfile fdatasync getifaddrs getpeerucred getrlimit kqueue mbstowcs_l memset_s poll posix_fallocate ppoll pstat pthread_is_threaded_np readlink readv setproctitle setproctitle_fast setsid shm_open strchrnul strsignal symlink syncfs sync_file_range uselocale wcstombs_l writev
15491do :
15492  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15493ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15494if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15495  cat >>confdefs.h <<_ACEOF
15496#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15497_ACEOF
15498
15499fi
15500done
15501
15502
15503# These typically are compiler builtins, for which AC_CHECK_FUNCS fails.
15504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
15505$as_echo_n "checking for __builtin_bswap16... " >&6; }
15506if ${pgac_cv__builtin_bswap16+:} false; then :
15507  $as_echo_n "(cached) " >&6
15508else
15509  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15510/* end confdefs.h.  */
15511
15512int
15513call__builtin_bswap16(int x)
15514{
15515    return __builtin_bswap16(x);
15516}
15517int
15518main ()
15519{
15520
15521  ;
15522  return 0;
15523}
15524_ACEOF
15525if ac_fn_c_try_link "$LINENO"; then :
15526  pgac_cv__builtin_bswap16=yes
15527else
15528  pgac_cv__builtin_bswap16=no
15529fi
15530rm -f core conftest.err conftest.$ac_objext \
15531    conftest$ac_exeext conftest.$ac_ext
15532fi
15533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
15534$as_echo "$pgac_cv__builtin_bswap16" >&6; }
15535if test x"${pgac_cv__builtin_bswap16}" = xyes ; then
15536
15537cat >>confdefs.h <<_ACEOF
15538#define HAVE__BUILTIN_BSWAP16 1
15539_ACEOF
15540
15541fi
15542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
15543$as_echo_n "checking for __builtin_bswap32... " >&6; }
15544if ${pgac_cv__builtin_bswap32+:} false; then :
15545  $as_echo_n "(cached) " >&6
15546else
15547  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15548/* end confdefs.h.  */
15549
15550int
15551call__builtin_bswap32(int x)
15552{
15553    return __builtin_bswap32(x);
15554}
15555int
15556main ()
15557{
15558
15559  ;
15560  return 0;
15561}
15562_ACEOF
15563if ac_fn_c_try_link "$LINENO"; then :
15564  pgac_cv__builtin_bswap32=yes
15565else
15566  pgac_cv__builtin_bswap32=no
15567fi
15568rm -f core conftest.err conftest.$ac_objext \
15569    conftest$ac_exeext conftest.$ac_ext
15570fi
15571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
15572$as_echo "$pgac_cv__builtin_bswap32" >&6; }
15573if test x"${pgac_cv__builtin_bswap32}" = xyes ; then
15574
15575cat >>confdefs.h <<_ACEOF
15576#define HAVE__BUILTIN_BSWAP32 1
15577_ACEOF
15578
15579fi
15580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
15581$as_echo_n "checking for __builtin_bswap64... " >&6; }
15582if ${pgac_cv__builtin_bswap64+:} false; then :
15583  $as_echo_n "(cached) " >&6
15584else
15585  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15586/* end confdefs.h.  */
15587
15588int
15589call__builtin_bswap64(long int x)
15590{
15591    return __builtin_bswap64(x);
15592}
15593int
15594main ()
15595{
15596
15597  ;
15598  return 0;
15599}
15600_ACEOF
15601if ac_fn_c_try_link "$LINENO"; then :
15602  pgac_cv__builtin_bswap64=yes
15603else
15604  pgac_cv__builtin_bswap64=no
15605fi
15606rm -f core conftest.err conftest.$ac_objext \
15607    conftest$ac_exeext conftest.$ac_ext
15608fi
15609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
15610$as_echo "$pgac_cv__builtin_bswap64" >&6; }
15611if test x"${pgac_cv__builtin_bswap64}" = xyes ; then
15612
15613cat >>confdefs.h <<_ACEOF
15614#define HAVE__BUILTIN_BSWAP64 1
15615_ACEOF
15616
15617fi
15618# We assume that we needn't test all widths of these explicitly:
15619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_clz" >&5
15620$as_echo_n "checking for __builtin_clz... " >&6; }
15621if ${pgac_cv__builtin_clz+:} false; then :
15622  $as_echo_n "(cached) " >&6
15623else
15624  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15625/* end confdefs.h.  */
15626
15627int
15628call__builtin_clz(unsigned int x)
15629{
15630    return __builtin_clz(x);
15631}
15632int
15633main ()
15634{
15635
15636  ;
15637  return 0;
15638}
15639_ACEOF
15640if ac_fn_c_try_link "$LINENO"; then :
15641  pgac_cv__builtin_clz=yes
15642else
15643  pgac_cv__builtin_clz=no
15644fi
15645rm -f core conftest.err conftest.$ac_objext \
15646    conftest$ac_exeext conftest.$ac_ext
15647fi
15648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_clz" >&5
15649$as_echo "$pgac_cv__builtin_clz" >&6; }
15650if test x"${pgac_cv__builtin_clz}" = xyes ; then
15651
15652cat >>confdefs.h <<_ACEOF
15653#define HAVE__BUILTIN_CLZ 1
15654_ACEOF
15655
15656fi
15657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctz" >&5
15658$as_echo_n "checking for __builtin_ctz... " >&6; }
15659if ${pgac_cv__builtin_ctz+:} false; then :
15660  $as_echo_n "(cached) " >&6
15661else
15662  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15663/* end confdefs.h.  */
15664
15665int
15666call__builtin_ctz(unsigned int x)
15667{
15668    return __builtin_ctz(x);
15669}
15670int
15671main ()
15672{
15673
15674  ;
15675  return 0;
15676}
15677_ACEOF
15678if ac_fn_c_try_link "$LINENO"; then :
15679  pgac_cv__builtin_ctz=yes
15680else
15681  pgac_cv__builtin_ctz=no
15682fi
15683rm -f core conftest.err conftest.$ac_objext \
15684    conftest$ac_exeext conftest.$ac_ext
15685fi
15686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_ctz" >&5
15687$as_echo "$pgac_cv__builtin_ctz" >&6; }
15688if test x"${pgac_cv__builtin_ctz}" = xyes ; then
15689
15690cat >>confdefs.h <<_ACEOF
15691#define HAVE__BUILTIN_CTZ 1
15692_ACEOF
15693
15694fi
15695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
15696$as_echo_n "checking for __builtin_popcount... " >&6; }
15697if ${pgac_cv__builtin_popcount+:} false; then :
15698  $as_echo_n "(cached) " >&6
15699else
15700  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15701/* end confdefs.h.  */
15702
15703int
15704call__builtin_popcount(unsigned int x)
15705{
15706    return __builtin_popcount(x);
15707}
15708int
15709main ()
15710{
15711
15712  ;
15713  return 0;
15714}
15715_ACEOF
15716if ac_fn_c_try_link "$LINENO"; then :
15717  pgac_cv__builtin_popcount=yes
15718else
15719  pgac_cv__builtin_popcount=no
15720fi
15721rm -f core conftest.err conftest.$ac_objext \
15722    conftest$ac_exeext conftest.$ac_ext
15723fi
15724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_popcount" >&5
15725$as_echo "$pgac_cv__builtin_popcount" >&6; }
15726if test x"${pgac_cv__builtin_popcount}" = xyes ; then
15727
15728cat >>confdefs.h <<_ACEOF
15729#define HAVE__BUILTIN_POPCOUNT 1
15730_ACEOF
15731
15732fi
15733
15734# We require 64-bit fseeko() to be available, but run this check anyway
15735# in case it finds that _LARGEFILE_SOURCE has to be #define'd for that.
15736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15737$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15738if ${ac_cv_sys_largefile_source+:} false; then :
15739  $as_echo_n "(cached) " >&6
15740else
15741  while :; do
15742  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15743/* end confdefs.h.  */
15744#include <sys/types.h> /* for off_t */
15745     #include <stdio.h>
15746int
15747main ()
15748{
15749int (*fp) (FILE *, off_t, int) = fseeko;
15750     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15751  ;
15752  return 0;
15753}
15754_ACEOF
15755if ac_fn_c_try_link "$LINENO"; then :
15756  ac_cv_sys_largefile_source=no; break
15757fi
15758rm -f core conftest.err conftest.$ac_objext \
15759    conftest$ac_exeext conftest.$ac_ext
15760  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15761/* end confdefs.h.  */
15762#define _LARGEFILE_SOURCE 1
15763#include <sys/types.h> /* for off_t */
15764     #include <stdio.h>
15765int
15766main ()
15767{
15768int (*fp) (FILE *, off_t, int) = fseeko;
15769     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15770  ;
15771  return 0;
15772}
15773_ACEOF
15774if ac_fn_c_try_link "$LINENO"; then :
15775  ac_cv_sys_largefile_source=1; break
15776fi
15777rm -f core conftest.err conftest.$ac_objext \
15778    conftest$ac_exeext conftest.$ac_ext
15779  ac_cv_sys_largefile_source=unknown
15780  break
15781done
15782fi
15783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15784$as_echo "$ac_cv_sys_largefile_source" >&6; }
15785case $ac_cv_sys_largefile_source in #(
15786  no | unknown) ;;
15787  *)
15788cat >>confdefs.h <<_ACEOF
15789#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15790_ACEOF
15791;;
15792esac
15793rm -rf conftest*
15794
15795# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15796# in glibc 2.1.3, but that breaks too many other things.
15797# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15798if test $ac_cv_sys_largefile_source != unknown; then
15799
15800$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15801
15802fi
15803
15804
15805# posix_fadvise() is a no-op on Solaris, so don't incur function overhead
15806# by calling it, 2009-04-02
15807# http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
15808# The Clang compiler raises a warning for an undeclared identifier that matches
15809# a compiler builtin function.  All extant Clang versions are affected, as of
15810# Clang 3.6.0.  Test a builtin known to every version.  This problem affects the
15811# C and Objective C languages, but Clang does report an error under C++ and
15812# Objective C++.
15813#
15814# Passing -fno-builtin to the compiler would suppress this problem.  That
15815# strategy would have the advantage of being insensitive to stray warnings, but
15816# it would make tests less realistic.
15817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
15818$as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
15819if ${ac_cv_c_decl_report+:} false; then :
15820  $as_echo_n "(cached) " >&6
15821else
15822  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15823/* end confdefs.h.  */
15824
15825int
15826main ()
15827{
15828(void) strchr;
15829  ;
15830  return 0;
15831}
15832_ACEOF
15833if ac_fn_c_try_compile "$LINENO"; then :
15834  if test -s conftest.err; then :
15835      # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
15836    # valid AC_CHECK_DECL input.  No library function is consistently available
15837    # on freestanding implementations, so test against a dummy declaration.
15838    # Include always-available headers on the off chance that they somehow
15839    # elicit warnings.
15840    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15841/* end confdefs.h.  */
15842#include <float.h>
15843#include <limits.h>
15844#include <stdarg.h>
15845#include <stddef.h>
15846extern void ac_decl (int, char *);
15847int
15848main ()
15849{
15850#ifdef __cplusplus
15851  (void) ac_decl ((int) 0, (char *) 0);
15852  (void) ac_decl;
15853#else
15854  (void) ac_decl;
15855#endif
15856
15857  ;
15858  return 0;
15859}
15860_ACEOF
15861if ac_fn_c_try_compile "$LINENO"; then :
15862  if test -s conftest.err; then :
15863  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15864$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15865as_fn_error $? "cannot detect from compiler exit status or warnings
15866See \`config.log' for more details" "$LINENO" 5; }
15867else
15868  ac_cv_c_decl_report=warning
15869fi
15870else
15871  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15872$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15873as_fn_error $? "cannot compile a simple declaration test
15874See \`config.log' for more details" "$LINENO" 5; }
15875fi
15876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15877else
15878  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15879$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15880as_fn_error $? "compiler does not report undeclared identifiers
15881See \`config.log' for more details" "$LINENO" 5; }
15882fi
15883else
15884  ac_cv_c_decl_report=error
15885fi
15886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15887fi
15888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
15889$as_echo "$ac_cv_c_decl_report" >&6; }
15890
15891case $ac_cv_c_decl_report in
15892  warning) ac_c_decl_warn_flag=yes ;;
15893  *) ac_c_decl_warn_flag= ;;
15894esac
15895
15896if test "$PORTNAME" != "solaris"; then :
15897
15898for ac_func in posix_fadvise
15899do :
15900  ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
15901if test "x$ac_cv_func_posix_fadvise" = xyes; then :
15902  cat >>confdefs.h <<_ACEOF
15903#define HAVE_POSIX_FADVISE 1
15904_ACEOF
15905
15906fi
15907done
15908
15909ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
15910"
15911if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
15912  ac_have_decl=1
15913else
15914  ac_have_decl=0
15915fi
15916
15917cat >>confdefs.h <<_ACEOF
15918#define HAVE_DECL_POSIX_FADVISE $ac_have_decl
15919_ACEOF
15920
15921
15922fi # fi
15923
15924ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
15925"
15926if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
15927  ac_have_decl=1
15928else
15929  ac_have_decl=0
15930fi
15931
15932cat >>confdefs.h <<_ACEOF
15933#define HAVE_DECL_FDATASYNC $ac_have_decl
15934_ACEOF
15935
15936ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
15937if test "x$ac_cv_have_decl_strlcat" = xyes; then :
15938  ac_have_decl=1
15939else
15940  ac_have_decl=0
15941fi
15942
15943cat >>confdefs.h <<_ACEOF
15944#define HAVE_DECL_STRLCAT $ac_have_decl
15945_ACEOF
15946ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
15947if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
15948  ac_have_decl=1
15949else
15950  ac_have_decl=0
15951fi
15952
15953cat >>confdefs.h <<_ACEOF
15954#define HAVE_DECL_STRLCPY $ac_have_decl
15955_ACEOF
15956ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15957if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15958  ac_have_decl=1
15959else
15960  ac_have_decl=0
15961fi
15962
15963cat >>confdefs.h <<_ACEOF
15964#define HAVE_DECL_STRNLEN $ac_have_decl
15965_ACEOF
15966
15967
15968# We can't use AC_REPLACE_FUNCS to replace these functions, because it
15969# won't handle deployment target restrictions on macOS
15970ac_fn_c_check_decl "$LINENO" "preadv" "ac_cv_have_decl_preadv" "#include <sys/uio.h>
15971"
15972if test "x$ac_cv_have_decl_preadv" = xyes; then :
15973  ac_have_decl=1
15974else
15975  ac_have_decl=0
15976fi
15977
15978cat >>confdefs.h <<_ACEOF
15979#define HAVE_DECL_PREADV $ac_have_decl
15980_ACEOF
15981if test $ac_have_decl = 1; then :
15982
15983else
15984  case " $LIBOBJS " in
15985  *" preadv.$ac_objext "* ) ;;
15986  *) LIBOBJS="$LIBOBJS preadv.$ac_objext"
15987 ;;
15988esac
15989
15990fi
15991
15992ac_fn_c_check_decl "$LINENO" "pwritev" "ac_cv_have_decl_pwritev" "#include <sys/uio.h>
15993"
15994if test "x$ac_cv_have_decl_pwritev" = xyes; then :
15995  ac_have_decl=1
15996else
15997  ac_have_decl=0
15998fi
15999
16000cat >>confdefs.h <<_ACEOF
16001#define HAVE_DECL_PWRITEV $ac_have_decl
16002_ACEOF
16003if test $ac_have_decl = 1; then :
16004
16005else
16006  case " $LIBOBJS " in
16007  *" pwritev.$ac_objext "* ) ;;
16008  *) LIBOBJS="$LIBOBJS pwritev.$ac_objext"
16009 ;;
16010esac
16011
16012fi
16013
16014
16015# This is probably only present on macOS, but may as well check always
16016ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
16017"
16018if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
16019  ac_have_decl=1
16020else
16021  ac_have_decl=0
16022fi
16023
16024cat >>confdefs.h <<_ACEOF
16025#define HAVE_DECL_F_FULLFSYNC $ac_have_decl
16026_ACEOF
16027
16028
16029ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
16030"
16031if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
16032  ac_have_decl=1
16033else
16034  ac_have_decl=0
16035fi
16036
16037cat >>confdefs.h <<_ACEOF
16038#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
16039_ACEOF
16040ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
16041"
16042if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
16043  ac_have_decl=1
16044else
16045  ac_have_decl=0
16046fi
16047
16048cat >>confdefs.h <<_ACEOF
16049#define HAVE_DECL_RTLD_NOW $ac_have_decl
16050_ACEOF
16051
16052
16053ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
16054#include <netinet/in.h>
16055"
16056if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
16057
16058$as_echo "#define HAVE_IPV6 1" >>confdefs.h
16059
16060fi
16061
16062
16063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
16064$as_echo_n "checking for PS_STRINGS... " >&6; }
16065if ${pgac_cv_var_PS_STRINGS+:} false; then :
16066  $as_echo_n "(cached) " >&6
16067else
16068  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16069/* end confdefs.h.  */
16070#include <machine/vmparam.h>
16071#include <sys/exec.h>
16072
16073int
16074main ()
16075{
16076PS_STRINGS->ps_nargvstr = 1;
16077PS_STRINGS->ps_argvstr = "foo";
16078  ;
16079  return 0;
16080}
16081_ACEOF
16082if ac_fn_c_try_link "$LINENO"; then :
16083  pgac_cv_var_PS_STRINGS=yes
16084else
16085  pgac_cv_var_PS_STRINGS=no
16086fi
16087rm -f core conftest.err conftest.$ac_objext \
16088    conftest$ac_exeext conftest.$ac_ext
16089fi
16090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
16091$as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
16092if test "$pgac_cv_var_PS_STRINGS" = yes ; then
16093
16094$as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
16095
16096fi
16097
16098ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
16099if test "x$ac_cv_func_dlopen" = xyes; then :
16100  $as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
16101
16102else
16103  case " $LIBOBJS " in
16104  *" dlopen.$ac_objext "* ) ;;
16105  *) LIBOBJS="$LIBOBJS dlopen.$ac_objext"
16106 ;;
16107esac
16108
16109fi
16110
16111ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
16112if test "x$ac_cv_func_explicit_bzero" = xyes; then :
16113  $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
16114
16115else
16116  case " $LIBOBJS " in
16117  *" explicit_bzero.$ac_objext "* ) ;;
16118  *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
16119 ;;
16120esac
16121
16122fi
16123
16124ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
16125if test "x$ac_cv_func_fls" = xyes; then :
16126  $as_echo "#define HAVE_FLS 1" >>confdefs.h
16127
16128else
16129  case " $LIBOBJS " in
16130  *" fls.$ac_objext "* ) ;;
16131  *) LIBOBJS="$LIBOBJS fls.$ac_objext"
16132 ;;
16133esac
16134
16135fi
16136
16137ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
16138if test "x$ac_cv_func_getopt" = xyes; then :
16139  $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
16140
16141else
16142  case " $LIBOBJS " in
16143  *" getopt.$ac_objext "* ) ;;
16144  *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16145 ;;
16146esac
16147
16148fi
16149
16150ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
16151if test "x$ac_cv_func_getpeereid" = xyes; then :
16152  $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
16153
16154else
16155  case " $LIBOBJS " in
16156  *" getpeereid.$ac_objext "* ) ;;
16157  *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
16158 ;;
16159esac
16160
16161fi
16162
16163ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
16164if test "x$ac_cv_func_getrusage" = xyes; then :
16165  $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
16166
16167else
16168  case " $LIBOBJS " in
16169  *" getrusage.$ac_objext "* ) ;;
16170  *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
16171 ;;
16172esac
16173
16174fi
16175
16176ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
16177if test "x$ac_cv_func_inet_aton" = xyes; then :
16178  $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
16179
16180else
16181  case " $LIBOBJS " in
16182  *" inet_aton.$ac_objext "* ) ;;
16183  *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
16184 ;;
16185esac
16186
16187fi
16188
16189ac_fn_c_check_func "$LINENO" "link" "ac_cv_func_link"
16190if test "x$ac_cv_func_link" = xyes; then :
16191  $as_echo "#define HAVE_LINK 1" >>confdefs.h
16192
16193else
16194  case " $LIBOBJS " in
16195  *" link.$ac_objext "* ) ;;
16196  *) LIBOBJS="$LIBOBJS link.$ac_objext"
16197 ;;
16198esac
16199
16200fi
16201
16202ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
16203if test "x$ac_cv_func_mkdtemp" = xyes; then :
16204  $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
16205
16206else
16207  case " $LIBOBJS " in
16208  *" mkdtemp.$ac_objext "* ) ;;
16209  *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
16210 ;;
16211esac
16212
16213fi
16214
16215ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread"
16216if test "x$ac_cv_func_pread" = xyes; then :
16217  $as_echo "#define HAVE_PREAD 1" >>confdefs.h
16218
16219else
16220  case " $LIBOBJS " in
16221  *" pread.$ac_objext "* ) ;;
16222  *) LIBOBJS="$LIBOBJS pread.$ac_objext"
16223 ;;
16224esac
16225
16226fi
16227
16228ac_fn_c_check_func "$LINENO" "pwrite" "ac_cv_func_pwrite"
16229if test "x$ac_cv_func_pwrite" = xyes; then :
16230  $as_echo "#define HAVE_PWRITE 1" >>confdefs.h
16231
16232else
16233  case " $LIBOBJS " in
16234  *" pwrite.$ac_objext "* ) ;;
16235  *) LIBOBJS="$LIBOBJS pwrite.$ac_objext"
16236 ;;
16237esac
16238
16239fi
16240
16241ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
16242if test "x$ac_cv_func_random" = xyes; then :
16243  $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
16244
16245else
16246  case " $LIBOBJS " in
16247  *" random.$ac_objext "* ) ;;
16248  *) LIBOBJS="$LIBOBJS random.$ac_objext"
16249 ;;
16250esac
16251
16252fi
16253
16254ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
16255if test "x$ac_cv_func_srandom" = xyes; then :
16256  $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
16257
16258else
16259  case " $LIBOBJS " in
16260  *" srandom.$ac_objext "* ) ;;
16261  *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
16262 ;;
16263esac
16264
16265fi
16266
16267ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
16268if test "x$ac_cv_func_strlcat" = xyes; then :
16269  $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
16270
16271else
16272  case " $LIBOBJS " in
16273  *" strlcat.$ac_objext "* ) ;;
16274  *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
16275 ;;
16276esac
16277
16278fi
16279
16280ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
16281if test "x$ac_cv_func_strlcpy" = xyes; then :
16282  $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
16283
16284else
16285  case " $LIBOBJS " in
16286  *" strlcpy.$ac_objext "* ) ;;
16287  *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
16288 ;;
16289esac
16290
16291fi
16292
16293ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
16294if test "x$ac_cv_func_strnlen" = xyes; then :
16295  $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
16296
16297else
16298  case " $LIBOBJS " in
16299  *" strnlen.$ac_objext "* ) ;;
16300  *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
16301 ;;
16302esac
16303
16304fi
16305
16306ac_fn_c_check_func "$LINENO" "strtof" "ac_cv_func_strtof"
16307if test "x$ac_cv_func_strtof" = xyes; then :
16308  $as_echo "#define HAVE_STRTOF 1" >>confdefs.h
16309
16310else
16311  case " $LIBOBJS " in
16312  *" strtof.$ac_objext "* ) ;;
16313  *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
16314 ;;
16315esac
16316
16317fi
16318
16319
16320
16321if test "$enable_thread_safety" = yes; then
16322  ac_fn_c_check_func "$LINENO" "pthread_barrier_wait" "ac_cv_func_pthread_barrier_wait"
16323if test "x$ac_cv_func_pthread_barrier_wait" = xyes; then :
16324  $as_echo "#define HAVE_PTHREAD_BARRIER_WAIT 1" >>confdefs.h
16325
16326else
16327  case " $LIBOBJS " in
16328  *" pthread_barrier_wait.$ac_objext "* ) ;;
16329  *) LIBOBJS="$LIBOBJS pthread_barrier_wait.$ac_objext"
16330 ;;
16331esac
16332
16333fi
16334
16335
16336fi
16337
16338if test "$PORTNAME" = "win32" -o "$PORTNAME" = "cygwin"; then
16339	# Cygwin and (apparently, based on test results) Mingw both
16340	# have a broken strtof(), so substitute the same replacement
16341	# code we use with VS2013. That's not a perfect fix, since
16342	# (unlike with VS2013) it doesn't avoid double-rounding, but
16343	# we have no better options. To get that, though, we have to
16344	# force the file to be compiled despite HAVE_STRTOF.
16345	case " $LIBOBJS " in
16346  *" strtof.$ac_objext "* ) ;;
16347  *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
16348 ;;
16349esac
16350
16351	{ $as_echo "$as_me:${as_lineno-$LINENO}: On $host_os we will use our strtof wrapper." >&5
16352$as_echo "$as_me: On $host_os we will use our strtof wrapper." >&6;}
16353fi
16354
16355case $host_os in
16356        # Windows uses a specialised env handler
16357        mingw*)
16358
16359$as_echo "#define HAVE_SETENV 1" >>confdefs.h
16360
16361
16362$as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
16363
16364                ac_cv_func_setenv=yes
16365                ac_cv_func_unsetenv=yes
16366                ;;
16367        *)
16368                ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv"
16369if test "x$ac_cv_func_setenv" = xyes; then :
16370  $as_echo "#define HAVE_SETENV 1" >>confdefs.h
16371
16372else
16373  case " $LIBOBJS " in
16374  *" setenv.$ac_objext "* ) ;;
16375  *) LIBOBJS="$LIBOBJS setenv.$ac_objext"
16376 ;;
16377esac
16378
16379fi
16380
16381ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
16382if test "x$ac_cv_func_unsetenv" = xyes; then :
16383  $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
16384
16385else
16386  case " $LIBOBJS " in
16387  *" unsetenv.$ac_objext "* ) ;;
16388  *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
16389 ;;
16390esac
16391
16392fi
16393
16394
16395                ;;
16396esac
16397
16398# System's version of getaddrinfo(), if any, may be used only if we found
16399# a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
16400# We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
16401if test x"$ac_cv_type_struct_addrinfo" = xyes && \
16402   test "$PORTNAME" != "win32"; then
16403  ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
16404if test "x$ac_cv_func_getaddrinfo" = xyes; then :
16405  $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
16406
16407else
16408  case " $LIBOBJS " in
16409  *" getaddrinfo.$ac_objext "* ) ;;
16410  *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
16411 ;;
16412esac
16413
16414fi
16415
16416
16417else
16418  case " $LIBOBJS " in
16419  *" getaddrinfo.$ac_objext "* ) ;;
16420  *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
16421 ;;
16422esac
16423
16424fi
16425
16426# Similarly, use system's getopt_long() only if system provides struct option.
16427if test x"$ac_cv_type_struct_option" = xyes ; then
16428  ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
16429if test "x$ac_cv_func_getopt_long" = xyes; then :
16430  $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
16431
16432else
16433  case " $LIBOBJS " in
16434  *" getopt_long.$ac_objext "* ) ;;
16435  *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16436 ;;
16437esac
16438
16439fi
16440
16441
16442else
16443  case " $LIBOBJS " in
16444  *" getopt_long.$ac_objext "* ) ;;
16445  *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16446 ;;
16447esac
16448
16449fi
16450
16451# On OpenBSD and Solaris, getopt() doesn't do what we want for long options
16452# (i.e., allow '-' as a flag character), so use our version on those platforms.
16453if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
16454  case " $LIBOBJS " in
16455  *" getopt.$ac_objext "* ) ;;
16456  *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16457 ;;
16458esac
16459
16460fi
16461
16462# mingw has adopted a GNU-centric interpretation of optind/optreset,
16463# so always use our version on Windows.
16464if test "$PORTNAME" = "win32"; then
16465  case " $LIBOBJS " in
16466  *" getopt.$ac_objext "* ) ;;
16467  *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16468 ;;
16469esac
16470
16471  case " $LIBOBJS " in
16472  *" getopt_long.$ac_objext "* ) ;;
16473  *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16474 ;;
16475esac
16476
16477fi
16478
16479# Win32 (really MinGW) support
16480if test "$PORTNAME" = "win32"; then
16481  for ac_func in _configthreadlocale
16482do :
16483  ac_fn_c_check_func "$LINENO" "_configthreadlocale" "ac_cv_func__configthreadlocale"
16484if test "x$ac_cv_func__configthreadlocale" = xyes; then :
16485  cat >>confdefs.h <<_ACEOF
16486#define HAVE__CONFIGTHREADLOCALE 1
16487_ACEOF
16488
16489fi
16490done
16491
16492  ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
16493if test "x$ac_cv_func_gettimeofday" = xyes; then :
16494  $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
16495
16496else
16497  case " $LIBOBJS " in
16498  *" gettimeofday.$ac_objext "* ) ;;
16499  *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
16500 ;;
16501esac
16502
16503fi
16504
16505
16506  case " $LIBOBJS " in
16507  *" dirmod.$ac_objext "* ) ;;
16508  *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16509 ;;
16510esac
16511
16512  case " $LIBOBJS " in
16513  *" kill.$ac_objext "* ) ;;
16514  *) LIBOBJS="$LIBOBJS kill.$ac_objext"
16515 ;;
16516esac
16517
16518  case " $LIBOBJS " in
16519  *" open.$ac_objext "* ) ;;
16520  *) LIBOBJS="$LIBOBJS open.$ac_objext"
16521 ;;
16522esac
16523
16524  case " $LIBOBJS " in
16525  *" system.$ac_objext "* ) ;;
16526  *) LIBOBJS="$LIBOBJS system.$ac_objext"
16527 ;;
16528esac
16529
16530  case " $LIBOBJS " in
16531  *" win32env.$ac_objext "* ) ;;
16532  *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
16533 ;;
16534esac
16535
16536  case " $LIBOBJS " in
16537  *" win32error.$ac_objext "* ) ;;
16538  *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
16539 ;;
16540esac
16541
16542  case " $LIBOBJS " in
16543  *" win32security.$ac_objext "* ) ;;
16544  *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
16545 ;;
16546esac
16547
16548  case " $LIBOBJS " in
16549  *" win32setlocale.$ac_objext "* ) ;;
16550  *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
16551 ;;
16552esac
16553
16554  case " $LIBOBJS " in
16555  *" win32stat.$ac_objext "* ) ;;
16556  *) LIBOBJS="$LIBOBJS win32stat.$ac_objext"
16557 ;;
16558esac
16559
16560
16561$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
16562
16563  ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
16564#define WIN32_LEAN_AND_MEAN
16565#include <windows.h>
16566#include <string.h>
16567#include <dbghelp.h>
16568"
16569if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
16570
16571cat >>confdefs.h <<_ACEOF
16572#define HAVE_MINIDUMP_TYPE 1
16573_ACEOF
16574
16575pgac_minidump_type=yes
16576else
16577  pgac_minidump_type=no
16578fi
16579
16580fi
16581if test x"$pgac_minidump_type" = x"yes" ; then
16582  have_win32_dbghelp=yes
16583
16584else
16585  have_win32_dbghelp=no
16586
16587fi
16588
16589# Cygwin needs only a bit of that
16590if test "$PORTNAME" = "cygwin"; then
16591  case " $LIBOBJS " in
16592  *" dirmod.$ac_objext "* ) ;;
16593  *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16594 ;;
16595esac
16596
16597fi
16598
16599ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
16600if test "x$ac_cv_func_syslog" = xyes; then :
16601  ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
16602if test "x$ac_cv_header_syslog_h" = xyes; then :
16603
16604$as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
16605
16606fi
16607
16608
16609fi
16610
16611
16612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
16613$as_echo_n "checking for opterr... " >&6; }
16614if ${pgac_cv_var_int_opterr+:} false; then :
16615  $as_echo_n "(cached) " >&6
16616else
16617  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16618/* end confdefs.h.  */
16619#include <unistd.h>
16620int
16621main ()
16622{
16623extern int opterr; opterr = 1;
16624  ;
16625  return 0;
16626}
16627_ACEOF
16628if ac_fn_c_try_link "$LINENO"; then :
16629  pgac_cv_var_int_opterr=yes
16630else
16631  pgac_cv_var_int_opterr=no
16632fi
16633rm -f core conftest.err conftest.$ac_objext \
16634    conftest$ac_exeext conftest.$ac_ext
16635fi
16636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
16637$as_echo "$pgac_cv_var_int_opterr" >&6; }
16638if test x"$pgac_cv_var_int_opterr" = x"yes"; then
16639
16640$as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
16641
16642fi
16643
16644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
16645$as_echo_n "checking for optreset... " >&6; }
16646if ${pgac_cv_var_int_optreset+:} false; then :
16647  $as_echo_n "(cached) " >&6
16648else
16649  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16650/* end confdefs.h.  */
16651#include <unistd.h>
16652int
16653main ()
16654{
16655extern int optreset; optreset = 1;
16656  ;
16657  return 0;
16658}
16659_ACEOF
16660if ac_fn_c_try_link "$LINENO"; then :
16661  pgac_cv_var_int_optreset=yes
16662else
16663  pgac_cv_var_int_optreset=no
16664fi
16665rm -f core conftest.err conftest.$ac_objext \
16666    conftest$ac_exeext conftest.$ac_ext
16667fi
16668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
16669$as_echo "$pgac_cv_var_int_optreset" >&6; }
16670if test x"$pgac_cv_var_int_optreset" = x"yes"; then
16671
16672$as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
16673
16674fi
16675
16676for ac_func in strtoll __strtoll strtoq
16677do :
16678  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16679ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16680if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16681  cat >>confdefs.h <<_ACEOF
16682#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16683_ACEOF
16684 break
16685fi
16686done
16687
16688for ac_func in strtoull __strtoull strtouq
16689do :
16690  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16691ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16692if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16693  cat >>confdefs.h <<_ACEOF
16694#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16695_ACEOF
16696 break
16697fi
16698done
16699
16700# strto[u]ll may exist but not be declared
16701ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
16702if test "x$ac_cv_have_decl_strtoll" = xyes; then :
16703  ac_have_decl=1
16704else
16705  ac_have_decl=0
16706fi
16707
16708cat >>confdefs.h <<_ACEOF
16709#define HAVE_DECL_STRTOLL $ac_have_decl
16710_ACEOF
16711ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
16712if test "x$ac_cv_have_decl_strtoull" = xyes; then :
16713  ac_have_decl=1
16714else
16715  ac_have_decl=0
16716fi
16717
16718cat >>confdefs.h <<_ACEOF
16719#define HAVE_DECL_STRTOULL $ac_have_decl
16720_ACEOF
16721
16722
16723if test "$with_icu" = yes; then
16724  ac_save_CPPFLAGS=$CPPFLAGS
16725  CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16726
16727  # Verify we have ICU's header files
16728  ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16729if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16730
16731else
16732  as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16733fi
16734
16735
16736
16737  CPPFLAGS=$ac_save_CPPFLAGS
16738fi
16739
16740if test "$with_llvm" = yes; then
16741
16742  # Check which functionality is present
16743  SAVE_CPPFLAGS="$CPPFLAGS"
16744  CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
16745  ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
16746"
16747if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
16748  ac_have_decl=1
16749else
16750  ac_have_decl=0
16751fi
16752
16753cat >>confdefs.h <<_ACEOF
16754#define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
16755_ACEOF
16756
16757  ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
16758"
16759if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
16760  ac_have_decl=1
16761else
16762  ac_have_decl=0
16763fi
16764
16765cat >>confdefs.h <<_ACEOF
16766#define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
16767_ACEOF
16768ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUFeatures" "ac_cv_have_decl_LLVMGetHostCPUFeatures" "#include <llvm-c/TargetMachine.h>
16769"
16770if test "x$ac_cv_have_decl_LLVMGetHostCPUFeatures" = xyes; then :
16771  ac_have_decl=1
16772else
16773  ac_have_decl=0
16774fi
16775
16776cat >>confdefs.h <<_ACEOF
16777#define HAVE_DECL_LLVMGETHOSTCPUFEATURES $ac_have_decl
16778_ACEOF
16779
16780  ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
16781"
16782if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
16783  ac_have_decl=1
16784else
16785  ac_have_decl=0
16786fi
16787
16788cat >>confdefs.h <<_ACEOF
16789#define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
16790_ACEOF
16791ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
16792"
16793if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
16794  ac_have_decl=1
16795else
16796  ac_have_decl=0
16797fi
16798
16799cat >>confdefs.h <<_ACEOF
16800#define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
16801_ACEOF
16802
16803  CPPFLAGS="$SAVE_CPPFLAGS"
16804
16805fi
16806
16807# Lastly, restore full LIBS list and check for readline/libedit symbols
16808LIBS="$LIBS_including_readline"
16809
16810if test "$with_readline" = yes; then
16811  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
16812$as_echo_n "checking for rl_completion_append_character... " >&6; }
16813if ${pgac_cv_var_rl_completion_append_character+:} false; then :
16814  $as_echo_n "(cached) " >&6
16815else
16816  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16817/* end confdefs.h.  */
16818#include <stdio.h>
16819#if defined(HAVE_READLINE_READLINE_H)
16820#include <readline/readline.h>
16821#elif defined(HAVE_EDITLINE_READLINE_H)
16822#include <editline/readline.h>
16823#elif defined(HAVE_READLINE_H)
16824#include <readline.h>
16825#endif
16826
16827int
16828main ()
16829{
16830rl_completion_append_character = 'x';
16831  ;
16832  return 0;
16833}
16834_ACEOF
16835if ac_fn_c_try_link "$LINENO"; then :
16836  pgac_cv_var_rl_completion_append_character=yes
16837else
16838  pgac_cv_var_rl_completion_append_character=no
16839fi
16840rm -f core conftest.err conftest.$ac_objext \
16841    conftest$ac_exeext conftest.$ac_ext
16842fi
16843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
16844$as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
16845if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
16846
16847$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
16848
16849fi
16850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_suppress_quote" >&5
16851$as_echo_n "checking for rl_completion_suppress_quote... " >&6; }
16852if ${pgac_cv_var_rl_completion_suppress_quote+:} false; then :
16853  $as_echo_n "(cached) " >&6
16854else
16855  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16856/* end confdefs.h.  */
16857#include <stdio.h>
16858#if defined(HAVE_READLINE_READLINE_H)
16859#include <readline/readline.h>
16860#elif defined(HAVE_EDITLINE_READLINE_H)
16861#include <editline/readline.h>
16862#elif defined(HAVE_READLINE_H)
16863#include <readline.h>
16864#endif
16865
16866int
16867main ()
16868{
16869rl_completion_suppress_quote = 1;
16870  ;
16871  return 0;
16872}
16873_ACEOF
16874if ac_fn_c_try_link "$LINENO"; then :
16875  pgac_cv_var_rl_completion_suppress_quote=yes
16876else
16877  pgac_cv_var_rl_completion_suppress_quote=no
16878fi
16879rm -f core conftest.err conftest.$ac_objext \
16880    conftest$ac_exeext conftest.$ac_ext
16881fi
16882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_suppress_quote" >&5
16883$as_echo "$pgac_cv_var_rl_completion_suppress_quote" >&6; }
16884if test x"$pgac_cv_var_rl_completion_suppress_quote" = x"yes"; then
16885
16886$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_QUOTE 1" >>confdefs.h
16887
16888fi
16889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quote_characters" >&5
16890$as_echo_n "checking for rl_filename_quote_characters... " >&6; }
16891if ${pgac_cv_var_rl_filename_quote_characters+:} false; then :
16892  $as_echo_n "(cached) " >&6
16893else
16894  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16895/* end confdefs.h.  */
16896#include <stdio.h>
16897#if defined(HAVE_READLINE_READLINE_H)
16898#include <readline/readline.h>
16899#elif defined(HAVE_EDITLINE_READLINE_H)
16900#include <editline/readline.h>
16901#elif defined(HAVE_READLINE_H)
16902#include <readline.h>
16903#endif
16904
16905int
16906main ()
16907{
16908rl_filename_quote_characters = "x";
16909  ;
16910  return 0;
16911}
16912_ACEOF
16913if ac_fn_c_try_link "$LINENO"; then :
16914  pgac_cv_var_rl_filename_quote_characters=yes
16915else
16916  pgac_cv_var_rl_filename_quote_characters=no
16917fi
16918rm -f core conftest.err conftest.$ac_objext \
16919    conftest$ac_exeext conftest.$ac_ext
16920fi
16921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quote_characters" >&5
16922$as_echo "$pgac_cv_var_rl_filename_quote_characters" >&6; }
16923if test x"$pgac_cv_var_rl_filename_quote_characters" = x"yes"; then
16924
16925$as_echo "#define HAVE_RL_FILENAME_QUOTE_CHARACTERS 1" >>confdefs.h
16926
16927fi
16928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quoting_function" >&5
16929$as_echo_n "checking for rl_filename_quoting_function... " >&6; }
16930if ${pgac_cv_var_rl_filename_quoting_function+:} false; then :
16931  $as_echo_n "(cached) " >&6
16932else
16933  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16934/* end confdefs.h.  */
16935#include <stdio.h>
16936#if defined(HAVE_READLINE_READLINE_H)
16937#include <readline/readline.h>
16938#elif defined(HAVE_EDITLINE_READLINE_H)
16939#include <editline/readline.h>
16940#elif defined(HAVE_READLINE_H)
16941#include <readline.h>
16942#endif
16943
16944int
16945main ()
16946{
16947rl_filename_quoting_function = 0;
16948  ;
16949  return 0;
16950}
16951_ACEOF
16952if ac_fn_c_try_link "$LINENO"; then :
16953  pgac_cv_var_rl_filename_quoting_function=yes
16954else
16955  pgac_cv_var_rl_filename_quoting_function=no
16956fi
16957rm -f core conftest.err conftest.$ac_objext \
16958    conftest$ac_exeext conftest.$ac_ext
16959fi
16960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quoting_function" >&5
16961$as_echo "$pgac_cv_var_rl_filename_quoting_function" >&6; }
16962if test x"$pgac_cv_var_rl_filename_quoting_function" = x"yes"; then
16963
16964$as_echo "#define HAVE_RL_FILENAME_QUOTING_FUNCTION 1" >>confdefs.h
16965
16966fi
16967
16968  for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
16969do :
16970  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16971ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16972if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16973  cat >>confdefs.h <<_ACEOF
16974#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16975_ACEOF
16976
16977fi
16978done
16979
16980  for ac_func in append_history history_truncate_file
16981do :
16982  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16983ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16984if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16985  cat >>confdefs.h <<_ACEOF
16986#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16987_ACEOF
16988
16989fi
16990done
16991
16992fi
16993
16994
16995# This test makes sure that run tests work at all.  Sometimes a shared
16996# library is found by the linker, but the runtime linker can't find it.
16997# This check should come after all modifications of compiler or linker
16998# variables, and before any other run tests.
16999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
17000$as_echo_n "checking test program... " >&6; }
17001if test "$cross_compiling" = yes; then :
17002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
17003$as_echo "cross-compiling" >&6; }
17004else
17005  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17006/* end confdefs.h.  */
17007int main() { return 0; }
17008_ACEOF
17009if ac_fn_c_try_run "$LINENO"; then :
17010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17011$as_echo "ok" >&6; }
17012else
17013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
17014$as_echo "failed" >&6; }
17015as_fn_error $? "
17016Could not execute a simple test program.  This may be a problem
17017related to locating shared libraries.  Check the file 'config.log'
17018for the exact reason." "$LINENO" 5
17019fi
17020rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17021  conftest.$ac_objext conftest.beam conftest.$ac_ext
17022fi
17023
17024
17025# --------------------
17026# Run tests below here
17027# --------------------
17028
17029
17030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
17031$as_echo_n "checking whether long int is 64 bits... " >&6; }
17032if ${pgac_cv_type_long_int_64+:} false; then :
17033  $as_echo_n "(cached) " >&6
17034else
17035  if test "$cross_compiling" = yes; then :
17036  # If cross-compiling, check the size reported by the compiler and
17037# trust that the arithmetic works.
17038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17039/* end confdefs.h.  */
17040
17041int
17042main ()
17043{
17044static int test_array [1 - 2 * !(sizeof(long int) == 8)];
17045test_array [0] = 0;
17046return test_array [0];
17047
17048  ;
17049  return 0;
17050}
17051_ACEOF
17052if ac_fn_c_try_compile "$LINENO"; then :
17053  pgac_cv_type_long_int_64=yes
17054else
17055  pgac_cv_type_long_int_64=no
17056fi
17057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17058else
17059  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17060/* end confdefs.h.  */
17061typedef long int ac_int64;
17062
17063/*
17064 * These are globals to discourage the compiler from folding all the
17065 * arithmetic tests down to compile-time constants.
17066 */
17067ac_int64 a = 20000001;
17068ac_int64 b = 40000005;
17069
17070int does_int64_work()
17071{
17072  ac_int64 c,d;
17073
17074  if (sizeof(ac_int64) != 8)
17075    return 0;			/* definitely not the right size */
17076
17077  /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17078  c = a * b;
17079  d = (c + b) / b;
17080  if (d != a+1)
17081    return 0;
17082  return 1;
17083}
17084
17085int
17086main() {
17087  return (! does_int64_work());
17088}
17089_ACEOF
17090if ac_fn_c_try_run "$LINENO"; then :
17091  pgac_cv_type_long_int_64=yes
17092else
17093  pgac_cv_type_long_int_64=no
17094fi
17095rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17096  conftest.$ac_objext conftest.beam conftest.$ac_ext
17097fi
17098
17099fi
17100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
17101$as_echo "$pgac_cv_type_long_int_64" >&6; }
17102
17103HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
17104if test x"$pgac_cv_type_long_int_64" = xyes ; then
17105
17106$as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
17107
17108fi
17109
17110
17111if test x"$HAVE_LONG_INT_64" = x"yes" ; then
17112  pg_int64_type="long int"
17113else
17114  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
17115$as_echo_n "checking whether long long int is 64 bits... " >&6; }
17116if ${pgac_cv_type_long_long_int_64+:} false; then :
17117  $as_echo_n "(cached) " >&6
17118else
17119  if test "$cross_compiling" = yes; then :
17120  # If cross-compiling, check the size reported by the compiler and
17121# trust that the arithmetic works.
17122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17123/* end confdefs.h.  */
17124
17125int
17126main ()
17127{
17128static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
17129test_array [0] = 0;
17130return test_array [0];
17131
17132  ;
17133  return 0;
17134}
17135_ACEOF
17136if ac_fn_c_try_compile "$LINENO"; then :
17137  pgac_cv_type_long_long_int_64=yes
17138else
17139  pgac_cv_type_long_long_int_64=no
17140fi
17141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17142else
17143  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17144/* end confdefs.h.  */
17145typedef long long int ac_int64;
17146
17147/*
17148 * These are globals to discourage the compiler from folding all the
17149 * arithmetic tests down to compile-time constants.
17150 */
17151ac_int64 a = 20000001;
17152ac_int64 b = 40000005;
17153
17154int does_int64_work()
17155{
17156  ac_int64 c,d;
17157
17158  if (sizeof(ac_int64) != 8)
17159    return 0;			/* definitely not the right size */
17160
17161  /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17162  c = a * b;
17163  d = (c + b) / b;
17164  if (d != a+1)
17165    return 0;
17166  return 1;
17167}
17168
17169int
17170main() {
17171  return (! does_int64_work());
17172}
17173_ACEOF
17174if ac_fn_c_try_run "$LINENO"; then :
17175  pgac_cv_type_long_long_int_64=yes
17176else
17177  pgac_cv_type_long_long_int_64=no
17178fi
17179rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17180  conftest.$ac_objext conftest.beam conftest.$ac_ext
17181fi
17182
17183fi
17184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
17185$as_echo "$pgac_cv_type_long_long_int_64" >&6; }
17186
17187HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
17188if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
17189
17190$as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
17191
17192fi
17193
17194  if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
17195    pg_int64_type="long long int"
17196  else
17197    as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
17198  fi
17199fi
17200
17201
17202cat >>confdefs.h <<_ACEOF
17203#define PG_INT64_TYPE $pg_int64_type
17204_ACEOF
17205
17206
17207# Select the printf length modifier that goes with that, too.
17208if test x"$pg_int64_type" = x"long long int" ; then
17209  INT64_MODIFIER='"ll"'
17210else
17211  INT64_MODIFIER='"l"'
17212fi
17213
17214
17215cat >>confdefs.h <<_ACEOF
17216#define INT64_MODIFIER $INT64_MODIFIER
17217_ACEOF
17218
17219
17220# has to be down here, rather than with the other builtins, because
17221# the test uses PG_INT64_TYPE.
17222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
17223$as_echo_n "checking for __builtin_mul_overflow... " >&6; }
17224if ${pgac_cv__builtin_op_overflow+:} false; then :
17225  $as_echo_n "(cached) " >&6
17226else
17227  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17228/* end confdefs.h.  */
17229
17230PG_INT64_TYPE a = 1;
17231PG_INT64_TYPE b = 1;
17232PG_INT64_TYPE result;
17233int oflo;
17234
17235int
17236main ()
17237{
17238oflo = __builtin_mul_overflow(a, b, &result);
17239  ;
17240  return 0;
17241}
17242_ACEOF
17243if ac_fn_c_try_link "$LINENO"; then :
17244  pgac_cv__builtin_op_overflow=yes
17245else
17246  pgac_cv__builtin_op_overflow=no
17247fi
17248rm -f core conftest.err conftest.$ac_objext \
17249    conftest$ac_exeext conftest.$ac_ext
17250fi
17251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
17252$as_echo "$pgac_cv__builtin_op_overflow" >&6; }
17253if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
17254
17255$as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
17256
17257fi
17258
17259# Check size of void *, size_t (enables tweaks for > 32bit address space)
17260# The cast to long int works around a bug in the HP C Compiler
17261# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17262# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17263# This bug is HP SR number 8606223364.
17264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
17265$as_echo_n "checking size of void *... " >&6; }
17266if ${ac_cv_sizeof_void_p+:} false; then :
17267  $as_echo_n "(cached) " >&6
17268else
17269  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
17270
17271else
17272  if test "$ac_cv_type_void_p" = yes; then
17273     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17274$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17275as_fn_error 77 "cannot compute sizeof (void *)
17276See \`config.log' for more details" "$LINENO" 5; }
17277   else
17278     ac_cv_sizeof_void_p=0
17279   fi
17280fi
17281
17282fi
17283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
17284$as_echo "$ac_cv_sizeof_void_p" >&6; }
17285
17286
17287
17288cat >>confdefs.h <<_ACEOF
17289#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
17290_ACEOF
17291
17292
17293# The cast to long int works around a bug in the HP C Compiler
17294# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17295# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17296# This bug is HP SR number 8606223364.
17297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
17298$as_echo_n "checking size of size_t... " >&6; }
17299if ${ac_cv_sizeof_size_t+:} false; then :
17300  $as_echo_n "(cached) " >&6
17301else
17302  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
17303
17304else
17305  if test "$ac_cv_type_size_t" = yes; then
17306     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17307$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17308as_fn_error 77 "cannot compute sizeof (size_t)
17309See \`config.log' for more details" "$LINENO" 5; }
17310   else
17311     ac_cv_sizeof_size_t=0
17312   fi
17313fi
17314
17315fi
17316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
17317$as_echo "$ac_cv_sizeof_size_t" >&6; }
17318
17319
17320
17321cat >>confdefs.h <<_ACEOF
17322#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
17323_ACEOF
17324
17325
17326# The cast to long int works around a bug in the HP C Compiler
17327# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17328# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17329# This bug is HP SR number 8606223364.
17330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
17331$as_echo_n "checking size of long... " >&6; }
17332if ${ac_cv_sizeof_long+:} false; then :
17333  $as_echo_n "(cached) " >&6
17334else
17335  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
17336
17337else
17338  if test "$ac_cv_type_long" = yes; then
17339     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17340$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17341as_fn_error 77 "cannot compute sizeof (long)
17342See \`config.log' for more details" "$LINENO" 5; }
17343   else
17344     ac_cv_sizeof_long=0
17345   fi
17346fi
17347
17348fi
17349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
17350$as_echo "$ac_cv_sizeof_long" >&6; }
17351
17352
17353
17354cat >>confdefs.h <<_ACEOF
17355#define SIZEOF_LONG $ac_cv_sizeof_long
17356_ACEOF
17357
17358
17359
17360# Determine memory alignment requirements for the basic C data types.
17361
17362# The cast to long int works around a bug in the HP C Compiler,
17363# see AC_CHECK_SIZEOF for more information.
17364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
17365$as_echo_n "checking alignment of short... " >&6; }
17366if ${ac_cv_alignof_short+:} false; then :
17367  $as_echo_n "(cached) " >&6
17368else
17369  if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
17370#ifndef offsetof
17371# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17372#endif
17373typedef struct { char x; short y; } ac__type_alignof_;"; then :
17374
17375else
17376  if test "$ac_cv_type_short" = yes; then
17377     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17378$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17379as_fn_error 77 "cannot compute alignment of short
17380See \`config.log' for more details" "$LINENO" 5; }
17381   else
17382     ac_cv_alignof_short=0
17383   fi
17384fi
17385
17386fi
17387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
17388$as_echo "$ac_cv_alignof_short" >&6; }
17389
17390
17391
17392cat >>confdefs.h <<_ACEOF
17393#define ALIGNOF_SHORT $ac_cv_alignof_short
17394_ACEOF
17395
17396
17397# The cast to long int works around a bug in the HP C Compiler,
17398# see AC_CHECK_SIZEOF for more information.
17399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
17400$as_echo_n "checking alignment of int... " >&6; }
17401if ${ac_cv_alignof_int+:} false; then :
17402  $as_echo_n "(cached) " >&6
17403else
17404  if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
17405#ifndef offsetof
17406# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17407#endif
17408typedef struct { char x; int y; } ac__type_alignof_;"; then :
17409
17410else
17411  if test "$ac_cv_type_int" = yes; then
17412     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17413$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17414as_fn_error 77 "cannot compute alignment of int
17415See \`config.log' for more details" "$LINENO" 5; }
17416   else
17417     ac_cv_alignof_int=0
17418   fi
17419fi
17420
17421fi
17422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
17423$as_echo "$ac_cv_alignof_int" >&6; }
17424
17425
17426
17427cat >>confdefs.h <<_ACEOF
17428#define ALIGNOF_INT $ac_cv_alignof_int
17429_ACEOF
17430
17431
17432# The cast to long int works around a bug in the HP C Compiler,
17433# see AC_CHECK_SIZEOF for more information.
17434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
17435$as_echo_n "checking alignment of long... " >&6; }
17436if ${ac_cv_alignof_long+:} false; then :
17437  $as_echo_n "(cached) " >&6
17438else
17439  if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
17440#ifndef offsetof
17441# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17442#endif
17443typedef struct { char x; long y; } ac__type_alignof_;"; then :
17444
17445else
17446  if test "$ac_cv_type_long" = yes; then
17447     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17448$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17449as_fn_error 77 "cannot compute alignment of long
17450See \`config.log' for more details" "$LINENO" 5; }
17451   else
17452     ac_cv_alignof_long=0
17453   fi
17454fi
17455
17456fi
17457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
17458$as_echo "$ac_cv_alignof_long" >&6; }
17459
17460
17461
17462cat >>confdefs.h <<_ACEOF
17463#define ALIGNOF_LONG $ac_cv_alignof_long
17464_ACEOF
17465
17466
17467if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
17468  # The cast to long int works around a bug in the HP C Compiler,
17469# see AC_CHECK_SIZEOF for more information.
17470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
17471$as_echo_n "checking alignment of long long int... " >&6; }
17472if ${ac_cv_alignof_long_long_int+:} false; then :
17473  $as_echo_n "(cached) " >&6
17474else
17475  if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
17476#ifndef offsetof
17477# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17478#endif
17479typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
17480
17481else
17482  if test "$ac_cv_type_long_long_int" = yes; then
17483     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17484$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17485as_fn_error 77 "cannot compute alignment of long long int
17486See \`config.log' for more details" "$LINENO" 5; }
17487   else
17488     ac_cv_alignof_long_long_int=0
17489   fi
17490fi
17491
17492fi
17493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
17494$as_echo "$ac_cv_alignof_long_long_int" >&6; }
17495
17496
17497
17498cat >>confdefs.h <<_ACEOF
17499#define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
17500_ACEOF
17501
17502
17503fi
17504# The cast to long int works around a bug in the HP C Compiler,
17505# see AC_CHECK_SIZEOF for more information.
17506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
17507$as_echo_n "checking alignment of double... " >&6; }
17508if ${ac_cv_alignof_double+:} false; then :
17509  $as_echo_n "(cached) " >&6
17510else
17511  if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
17512#ifndef offsetof
17513# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17514#endif
17515typedef struct { char x; double y; } ac__type_alignof_;"; then :
17516
17517else
17518  if test "$ac_cv_type_double" = yes; then
17519     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17520$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17521as_fn_error 77 "cannot compute alignment of double
17522See \`config.log' for more details" "$LINENO" 5; }
17523   else
17524     ac_cv_alignof_double=0
17525   fi
17526fi
17527
17528fi
17529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
17530$as_echo "$ac_cv_alignof_double" >&6; }
17531
17532
17533
17534cat >>confdefs.h <<_ACEOF
17535#define ALIGNOF_DOUBLE $ac_cv_alignof_double
17536_ACEOF
17537
17538
17539
17540# Compute maximum alignment of any basic type.
17541# We assume long's alignment is at least as strong as char, short, or int;
17542# but we must check long long (if it is being used for int64) and double.
17543# Note that we intentionally do not consider any types wider than 64 bits,
17544# as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
17545# for disk and memory space.
17546
17547MAX_ALIGNOF=$ac_cv_alignof_long
17548if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
17549  MAX_ALIGNOF=$ac_cv_alignof_double
17550fi
17551if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
17552  MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
17553fi
17554
17555cat >>confdefs.h <<_ACEOF
17556#define MAXIMUM_ALIGNOF $MAX_ALIGNOF
17557_ACEOF
17558
17559
17560
17561# Some platforms predefine the types int8, int16, etc.  Only check
17562# a (hopefully) representative subset.
17563ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
17564"
17565if test "x$ac_cv_type_int8" = xyes; then :
17566
17567cat >>confdefs.h <<_ACEOF
17568#define HAVE_INT8 1
17569_ACEOF
17570
17571
17572fi
17573ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
17574"
17575if test "x$ac_cv_type_uint8" = xyes; then :
17576
17577cat >>confdefs.h <<_ACEOF
17578#define HAVE_UINT8 1
17579_ACEOF
17580
17581
17582fi
17583ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
17584"
17585if test "x$ac_cv_type_int64" = xyes; then :
17586
17587cat >>confdefs.h <<_ACEOF
17588#define HAVE_INT64 1
17589_ACEOF
17590
17591
17592fi
17593ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
17594"
17595if test "x$ac_cv_type_uint64" = xyes; then :
17596
17597cat >>confdefs.h <<_ACEOF
17598#define HAVE_UINT64 1
17599_ACEOF
17600
17601
17602fi
17603
17604
17605# Some compilers offer a 128-bit integer scalar type.
17606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
17607$as_echo_n "checking for __int128... " >&6; }
17608if ${pgac_cv__128bit_int+:} false; then :
17609  $as_echo_n "(cached) " >&6
17610else
17611  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17612/* end confdefs.h.  */
17613
17614/*
17615 * We don't actually run this test, just link it to verify that any support
17616 * functions needed for __int128 are present.
17617 *
17618 * These are globals to discourage the compiler from folding all the
17619 * arithmetic tests down to compile-time constants.  We do not have
17620 * convenient support for 128bit literals at this point...
17621 */
17622__int128 a = 48828125;
17623__int128 b = 97656250;
17624
17625int
17626main ()
17627{
17628
17629__int128 c,d;
17630a = (a << 12) + 1; /* 200000000001 */
17631b = (b << 12) + 5; /* 400000000005 */
17632/* try the most relevant arithmetic ops */
17633c = a * b;
17634d = (c + b) / b;
17635/* must use the results, else compiler may optimize arithmetic away */
17636if (d != a+1)
17637  return 1;
17638
17639  ;
17640  return 0;
17641}
17642_ACEOF
17643if ac_fn_c_try_link "$LINENO"; then :
17644  pgac_cv__128bit_int=yes
17645else
17646  pgac_cv__128bit_int=no
17647fi
17648rm -f core conftest.err conftest.$ac_objext \
17649    conftest$ac_exeext conftest.$ac_ext
17650fi
17651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
17652$as_echo "$pgac_cv__128bit_int" >&6; }
17653if test x"$pgac_cv__128bit_int" = xyes ; then
17654  # Use of non-default alignment with __int128 tickles bugs in some compilers.
17655  # If not cross-compiling, we can test for bugs and disable use of __int128
17656  # with buggy compilers.  If cross-compiling, hope for the best.
17657  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
17658  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
17659$as_echo_n "checking for __int128 alignment bug... " >&6; }
17660if ${pgac_cv__128bit_int_bug+:} false; then :
17661  $as_echo_n "(cached) " >&6
17662else
17663  if test "$cross_compiling" = yes; then :
17664  pgac_cv__128bit_int_bug="assuming ok"
17665else
17666  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17667/* end confdefs.h.  */
17668
17669/* This must match the corresponding code in c.h: */
17670#if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
17671#define pg_attribute_aligned(a) __attribute__((aligned(a)))
17672#endif
17673typedef __int128 int128a
17674#if defined(pg_attribute_aligned)
17675pg_attribute_aligned(8)
17676#endif
17677;
17678int128a holder;
17679void pass_by_val(void *buffer, int128a par) { holder = par; }
17680
17681int
17682main ()
17683{
17684
17685long int i64 = 97656225L << 12;
17686int128a q;
17687pass_by_val(main, (int128a) i64);
17688q = (int128a) i64;
17689if (q != holder)
17690  return 1;
17691
17692  ;
17693  return 0;
17694}
17695_ACEOF
17696if ac_fn_c_try_run "$LINENO"; then :
17697  pgac_cv__128bit_int_bug=ok
17698else
17699  pgac_cv__128bit_int_bug=broken
17700fi
17701rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17702  conftest.$ac_objext conftest.beam conftest.$ac_ext
17703fi
17704
17705fi
17706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
17707$as_echo "$pgac_cv__128bit_int_bug" >&6; }
17708  if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
17709
17710$as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
17711
17712    # The cast to long int works around a bug in the HP C Compiler,
17713# see AC_CHECK_SIZEOF for more information.
17714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
17715$as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
17716if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
17717  $as_echo_n "(cached) " >&6
17718else
17719  if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE"        "$ac_includes_default
17720#ifndef offsetof
17721# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17722#endif
17723typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
17724
17725else
17726  if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
17727     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17728$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17729as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
17730See \`config.log' for more details" "$LINENO" 5; }
17731   else
17732     ac_cv_alignof_PG_INT128_TYPE=0
17733   fi
17734fi
17735
17736fi
17737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
17738$as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
17739
17740
17741
17742cat >>confdefs.h <<_ACEOF
17743#define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
17744_ACEOF
17745
17746
17747  fi
17748fi
17749
17750# Check for various atomic operations now that we have checked how to declare
17751# 64bit integers.
17752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
17753$as_echo_n "checking for builtin __sync char locking functions... " >&6; }
17754if ${pgac_cv_gcc_sync_char_tas+:} false; then :
17755  $as_echo_n "(cached) " >&6
17756else
17757  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17758/* end confdefs.h.  */
17759
17760int
17761main ()
17762{
17763char lock = 0;
17764   __sync_lock_test_and_set(&lock, 1);
17765   __sync_lock_release(&lock);
17766  ;
17767  return 0;
17768}
17769_ACEOF
17770if ac_fn_c_try_link "$LINENO"; then :
17771  pgac_cv_gcc_sync_char_tas="yes"
17772else
17773  pgac_cv_gcc_sync_char_tas="no"
17774fi
17775rm -f core conftest.err conftest.$ac_objext \
17776    conftest$ac_exeext conftest.$ac_ext
17777fi
17778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
17779$as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
17780if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
17781
17782$as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
17783
17784fi
17785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
17786$as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
17787if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
17788  $as_echo_n "(cached) " >&6
17789else
17790  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17791/* end confdefs.h.  */
17792
17793int
17794main ()
17795{
17796int lock = 0;
17797   __sync_lock_test_and_set(&lock, 1);
17798   __sync_lock_release(&lock);
17799  ;
17800  return 0;
17801}
17802_ACEOF
17803if ac_fn_c_try_link "$LINENO"; then :
17804  pgac_cv_gcc_sync_int32_tas="yes"
17805else
17806  pgac_cv_gcc_sync_int32_tas="no"
17807fi
17808rm -f core conftest.err conftest.$ac_objext \
17809    conftest$ac_exeext conftest.$ac_ext
17810fi
17811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
17812$as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
17813if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
17814
17815$as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
17816
17817fi
17818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17819$as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17820if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17821  $as_echo_n "(cached) " >&6
17822else
17823  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17824/* end confdefs.h.  */
17825
17826int
17827main ()
17828{
17829int val = 0;
17830   __sync_val_compare_and_swap(&val, 0, 37);
17831  ;
17832  return 0;
17833}
17834_ACEOF
17835if ac_fn_c_try_link "$LINENO"; then :
17836  pgac_cv_gcc_sync_int32_cas="yes"
17837else
17838  pgac_cv_gcc_sync_int32_cas="no"
17839fi
17840rm -f core conftest.err conftest.$ac_objext \
17841    conftest$ac_exeext conftest.$ac_ext
17842fi
17843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17844$as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17845if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17846
17847$as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17848
17849fi
17850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17851$as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17852if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17853  $as_echo_n "(cached) " >&6
17854else
17855  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17856/* end confdefs.h.  */
17857
17858int
17859main ()
17860{
17861PG_INT64_TYPE lock = 0;
17862   __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17863  ;
17864  return 0;
17865}
17866_ACEOF
17867if ac_fn_c_try_link "$LINENO"; then :
17868  pgac_cv_gcc_sync_int64_cas="yes"
17869else
17870  pgac_cv_gcc_sync_int64_cas="no"
17871fi
17872rm -f core conftest.err conftest.$ac_objext \
17873    conftest$ac_exeext conftest.$ac_ext
17874fi
17875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17876$as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17877if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17878
17879$as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17880
17881fi
17882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17883$as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17884if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17885  $as_echo_n "(cached) " >&6
17886else
17887  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17888/* end confdefs.h.  */
17889
17890int
17891main ()
17892{
17893int val = 0;
17894   int expect = 0;
17895   __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17896  ;
17897  return 0;
17898}
17899_ACEOF
17900if ac_fn_c_try_link "$LINENO"; then :
17901  pgac_cv_gcc_atomic_int32_cas="yes"
17902else
17903  pgac_cv_gcc_atomic_int32_cas="no"
17904fi
17905rm -f core conftest.err conftest.$ac_objext \
17906    conftest$ac_exeext conftest.$ac_ext
17907fi
17908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17909$as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17910if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17911
17912$as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17913
17914fi
17915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17916$as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17917if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17918  $as_echo_n "(cached) " >&6
17919else
17920  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17921/* end confdefs.h.  */
17922
17923int
17924main ()
17925{
17926PG_INT64_TYPE val = 0;
17927   PG_INT64_TYPE expect = 0;
17928   __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17929  ;
17930  return 0;
17931}
17932_ACEOF
17933if ac_fn_c_try_link "$LINENO"; then :
17934  pgac_cv_gcc_atomic_int64_cas="yes"
17935else
17936  pgac_cv_gcc_atomic_int64_cas="no"
17937fi
17938rm -f core conftest.err conftest.$ac_objext \
17939    conftest$ac_exeext conftest.$ac_ext
17940fi
17941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17942$as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17943if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17944
17945$as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17946
17947fi
17948
17949
17950# Check for x86 cpuid instruction
17951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17952$as_echo_n "checking for __get_cpuid... " >&6; }
17953if ${pgac_cv__get_cpuid+:} false; then :
17954  $as_echo_n "(cached) " >&6
17955else
17956  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17957/* end confdefs.h.  */
17958#include <cpuid.h>
17959int
17960main ()
17961{
17962unsigned int exx[4] = {0, 0, 0, 0};
17963  __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17964
17965  ;
17966  return 0;
17967}
17968_ACEOF
17969if ac_fn_c_try_link "$LINENO"; then :
17970  pgac_cv__get_cpuid="yes"
17971else
17972  pgac_cv__get_cpuid="no"
17973fi
17974rm -f core conftest.err conftest.$ac_objext \
17975    conftest$ac_exeext conftest.$ac_ext
17976fi
17977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17978$as_echo "$pgac_cv__get_cpuid" >&6; }
17979if test x"$pgac_cv__get_cpuid" = x"yes"; then
17980
17981$as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17982
17983fi
17984
17985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17986$as_echo_n "checking for __cpuid... " >&6; }
17987if ${pgac_cv__cpuid+:} false; then :
17988  $as_echo_n "(cached) " >&6
17989else
17990  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17991/* end confdefs.h.  */
17992#include <intrin.h>
17993int
17994main ()
17995{
17996unsigned int exx[4] = {0, 0, 0, 0};
17997  __get_cpuid(exx[0], 1);
17998
17999  ;
18000  return 0;
18001}
18002_ACEOF
18003if ac_fn_c_try_link "$LINENO"; then :
18004  pgac_cv__cpuid="yes"
18005else
18006  pgac_cv__cpuid="no"
18007fi
18008rm -f core conftest.err conftest.$ac_objext \
18009    conftest$ac_exeext conftest.$ac_ext
18010fi
18011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
18012$as_echo "$pgac_cv__cpuid" >&6; }
18013if test x"$pgac_cv__cpuid" = x"yes"; then
18014
18015$as_echo "#define HAVE__CPUID 1" >>confdefs.h
18016
18017fi
18018
18019# Check for Intel SSE 4.2 intrinsics to do CRC calculations.
18020#
18021# First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
18022# with the default compiler flags. If not, check if adding the -msse4.2
18023# flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
18024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
18025$as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
18026if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
18027  $as_echo_n "(cached) " >&6
18028else
18029  pgac_save_CFLAGS=$CFLAGS
18030CFLAGS="$pgac_save_CFLAGS "
18031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18032/* end confdefs.h.  */
18033#include <nmmintrin.h>
18034int
18035main ()
18036{
18037unsigned int crc = 0;
18038   crc = _mm_crc32_u8(crc, 0);
18039   crc = _mm_crc32_u32(crc, 0);
18040   /* return computed value, to prevent the above being optimized away */
18041   return crc == 0;
18042  ;
18043  return 0;
18044}
18045_ACEOF
18046if ac_fn_c_try_link "$LINENO"; then :
18047  pgac_cv_sse42_crc32_intrinsics_=yes
18048else
18049  pgac_cv_sse42_crc32_intrinsics_=no
18050fi
18051rm -f core conftest.err conftest.$ac_objext \
18052    conftest$ac_exeext conftest.$ac_ext
18053CFLAGS="$pgac_save_CFLAGS"
18054fi
18055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
18056$as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
18057if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
18058  CFLAGS_SSE42=""
18059  pgac_sse42_crc32_intrinsics=yes
18060fi
18061
18062if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
18063  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
18064$as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
18065if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
18066  $as_echo_n "(cached) " >&6
18067else
18068  pgac_save_CFLAGS=$CFLAGS
18069CFLAGS="$pgac_save_CFLAGS -msse4.2"
18070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18071/* end confdefs.h.  */
18072#include <nmmintrin.h>
18073int
18074main ()
18075{
18076unsigned int crc = 0;
18077   crc = _mm_crc32_u8(crc, 0);
18078   crc = _mm_crc32_u32(crc, 0);
18079   /* return computed value, to prevent the above being optimized away */
18080   return crc == 0;
18081  ;
18082  return 0;
18083}
18084_ACEOF
18085if ac_fn_c_try_link "$LINENO"; then :
18086  pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
18087else
18088  pgac_cv_sse42_crc32_intrinsics__msse4_2=no
18089fi
18090rm -f core conftest.err conftest.$ac_objext \
18091    conftest$ac_exeext conftest.$ac_ext
18092CFLAGS="$pgac_save_CFLAGS"
18093fi
18094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
18095$as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
18096if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
18097  CFLAGS_SSE42="-msse4.2"
18098  pgac_sse42_crc32_intrinsics=yes
18099fi
18100
18101fi
18102
18103
18104# Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
18105# define __SSE4_2__ in that case.
18106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18107/* end confdefs.h.  */
18108
18109int
18110main ()
18111{
18112
18113#ifndef __SSE4_2__
18114#error __SSE4_2__ not defined
18115#endif
18116
18117  ;
18118  return 0;
18119}
18120_ACEOF
18121if ac_fn_c_try_compile "$LINENO"; then :
18122  SSE4_2_TARGETED=1
18123fi
18124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18125
18126# Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
18127#
18128# First check if __crc32c* intrinsics can be used with the default compiler
18129# flags. If not, check if adding -march=armv8-a+crc flag helps.
18130# CFLAGS_ARMV8_CRC32C is set if the extra flag is required.
18131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
18132$as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
18133if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
18134  $as_echo_n "(cached) " >&6
18135else
18136  pgac_save_CFLAGS=$CFLAGS
18137CFLAGS="$pgac_save_CFLAGS "
18138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18139/* end confdefs.h.  */
18140#include <arm_acle.h>
18141int
18142main ()
18143{
18144unsigned int crc = 0;
18145   crc = __crc32cb(crc, 0);
18146   crc = __crc32ch(crc, 0);
18147   crc = __crc32cw(crc, 0);
18148   crc = __crc32cd(crc, 0);
18149   /* return computed value, to prevent the above being optimized away */
18150   return crc == 0;
18151  ;
18152  return 0;
18153}
18154_ACEOF
18155if ac_fn_c_try_link "$LINENO"; then :
18156  pgac_cv_armv8_crc32c_intrinsics_=yes
18157else
18158  pgac_cv_armv8_crc32c_intrinsics_=no
18159fi
18160rm -f core conftest.err conftest.$ac_objext \
18161    conftest$ac_exeext conftest.$ac_ext
18162CFLAGS="$pgac_save_CFLAGS"
18163fi
18164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
18165$as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
18166if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
18167  CFLAGS_ARMV8_CRC32C=""
18168  pgac_armv8_crc32c_intrinsics=yes
18169fi
18170
18171if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
18172  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
18173$as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
18174if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
18175  $as_echo_n "(cached) " >&6
18176else
18177  pgac_save_CFLAGS=$CFLAGS
18178CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
18179cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18180/* end confdefs.h.  */
18181#include <arm_acle.h>
18182int
18183main ()
18184{
18185unsigned int crc = 0;
18186   crc = __crc32cb(crc, 0);
18187   crc = __crc32ch(crc, 0);
18188   crc = __crc32cw(crc, 0);
18189   crc = __crc32cd(crc, 0);
18190   /* return computed value, to prevent the above being optimized away */
18191   return crc == 0;
18192  ;
18193  return 0;
18194}
18195_ACEOF
18196if ac_fn_c_try_link "$LINENO"; then :
18197  pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
18198else
18199  pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
18200fi
18201rm -f core conftest.err conftest.$ac_objext \
18202    conftest$ac_exeext conftest.$ac_ext
18203CFLAGS="$pgac_save_CFLAGS"
18204fi
18205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
18206$as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
18207if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
18208  CFLAGS_ARMV8_CRC32C="-march=armv8-a+crc"
18209  pgac_armv8_crc32c_intrinsics=yes
18210fi
18211
18212fi
18213
18214
18215# Select CRC-32C implementation.
18216#
18217# If we are targeting a processor that has Intel SSE 4.2 instructions, we can
18218# use the special CRC instructions for calculating CRC-32C. If we're not
18219# targeting such a processor, but we can nevertheless produce code that uses
18220# the SSE intrinsics, perhaps with some extra CFLAGS, compile both
18221# implementations and select which one to use at runtime, depending on whether
18222# SSE 4.2 is supported by the processor we're running on.
18223#
18224# Similarly, if we are targeting an ARM processor that has the CRC
18225# instructions that are part of the ARMv8 CRC Extension, use them. And if
18226# we're not targeting such a processor, but can nevertheless produce code that
18227# uses the CRC instructions, compile both, and select at runtime.
18228#
18229# You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
18230# in the template or configure command line.
18231if 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
18232  # Use Intel SSE 4.2 if available.
18233  if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
18234    USE_SSE42_CRC32C=1
18235  else
18236    # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
18237    # the runtime check.
18238    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
18239      USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
18240    else
18241      # Use ARM CRC Extension if available.
18242      if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_ARMV8_CRC32C" = x""; then
18243        USE_ARMV8_CRC32C=1
18244      else
18245        # ARM CRC Extension, with runtime check?
18246        if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
18247          USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
18248        else
18249          # fall back to slicing-by-8 algorithm, which doesn't require any
18250          # special CPU support.
18251          USE_SLICING_BY_8_CRC32C=1
18252	fi
18253      fi
18254    fi
18255  fi
18256fi
18257
18258# Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
18259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
18260$as_echo_n "checking which CRC-32C implementation to use... " >&6; }
18261if test x"$USE_SSE42_CRC32C" = x"1"; then
18262
18263$as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
18264
18265  PG_CRC32C_OBJS="pg_crc32c_sse42.o"
18266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
18267$as_echo "SSE 4.2" >&6; }
18268else
18269  if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18270
18271$as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18272
18273    PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
18274    { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
18275$as_echo "SSE 4.2 with runtime check" >&6; }
18276  else
18277    if test x"$USE_ARMV8_CRC32C" = x"1"; then
18278
18279$as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
18280
18281      PG_CRC32C_OBJS="pg_crc32c_armv8.o"
18282      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
18283$as_echo "ARMv8 CRC instructions" >&6; }
18284    else
18285      if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18286
18287$as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18288
18289        PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
18290        { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
18291$as_echo "ARMv8 CRC instructions with runtime check" >&6; }
18292      else
18293
18294$as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
18295
18296        PG_CRC32C_OBJS="pg_crc32c_sb8.o"
18297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
18298$as_echo "slicing-by-8" >&6; }
18299      fi
18300    fi
18301  fi
18302fi
18303
18304
18305
18306# Select semaphore implementation type.
18307if test "$PORTNAME" != "win32"; then
18308  if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
18309    # Need sem_open for this
18310    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
18311$as_echo_n "checking for library containing sem_open... " >&6; }
18312if ${ac_cv_search_sem_open+:} false; then :
18313  $as_echo_n "(cached) " >&6
18314else
18315  ac_func_search_save_LIBS=$LIBS
18316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18317/* end confdefs.h.  */
18318
18319/* Override any GCC internal prototype to avoid an error.
18320   Use char because int might match the return type of a GCC
18321   builtin and then its argument prototype would still apply.  */
18322#ifdef __cplusplus
18323extern "C"
18324#endif
18325char sem_open ();
18326int
18327main ()
18328{
18329return sem_open ();
18330  ;
18331  return 0;
18332}
18333_ACEOF
18334for ac_lib in '' rt pthread; do
18335  if test -z "$ac_lib"; then
18336    ac_res="none required"
18337  else
18338    ac_res=-l$ac_lib
18339    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18340  fi
18341  if ac_fn_c_try_link "$LINENO"; then :
18342  ac_cv_search_sem_open=$ac_res
18343fi
18344rm -f core conftest.err conftest.$ac_objext \
18345    conftest$ac_exeext
18346  if ${ac_cv_search_sem_open+:} false; then :
18347  break
18348fi
18349done
18350if ${ac_cv_search_sem_open+:} false; then :
18351
18352else
18353  ac_cv_search_sem_open=no
18354fi
18355rm conftest.$ac_ext
18356LIBS=$ac_func_search_save_LIBS
18357fi
18358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
18359$as_echo "$ac_cv_search_sem_open" >&6; }
18360ac_res=$ac_cv_search_sem_open
18361if test "$ac_res" != no; then :
18362  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18363  USE_NAMED_POSIX_SEMAPHORES=1
18364fi
18365
18366  fi
18367  if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
18368    # Need sem_init for this
18369    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
18370$as_echo_n "checking for library containing sem_init... " >&6; }
18371if ${ac_cv_search_sem_init+:} false; then :
18372  $as_echo_n "(cached) " >&6
18373else
18374  ac_func_search_save_LIBS=$LIBS
18375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18376/* end confdefs.h.  */
18377
18378/* Override any GCC internal prototype to avoid an error.
18379   Use char because int might match the return type of a GCC
18380   builtin and then its argument prototype would still apply.  */
18381#ifdef __cplusplus
18382extern "C"
18383#endif
18384char sem_init ();
18385int
18386main ()
18387{
18388return sem_init ();
18389  ;
18390  return 0;
18391}
18392_ACEOF
18393for ac_lib in '' rt pthread; do
18394  if test -z "$ac_lib"; then
18395    ac_res="none required"
18396  else
18397    ac_res=-l$ac_lib
18398    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18399  fi
18400  if ac_fn_c_try_link "$LINENO"; then :
18401  ac_cv_search_sem_init=$ac_res
18402fi
18403rm -f core conftest.err conftest.$ac_objext \
18404    conftest$ac_exeext
18405  if ${ac_cv_search_sem_init+:} false; then :
18406  break
18407fi
18408done
18409if ${ac_cv_search_sem_init+:} false; then :
18410
18411else
18412  ac_cv_search_sem_init=no
18413fi
18414rm conftest.$ac_ext
18415LIBS=$ac_func_search_save_LIBS
18416fi
18417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
18418$as_echo "$ac_cv_search_sem_init" >&6; }
18419ac_res=$ac_cv_search_sem_init
18420if test "$ac_res" != no; then :
18421  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18422  USE_UNNAMED_POSIX_SEMAPHORES=1
18423fi
18424
18425  fi
18426  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
18427$as_echo_n "checking which semaphore API to use... " >&6; }
18428  if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
18429
18430$as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18431
18432    SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18433    sematype="named POSIX"
18434  else
18435    if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
18436
18437$as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18438
18439      SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18440      sematype="unnamed POSIX"
18441    else
18442
18443$as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
18444
18445      SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
18446      sematype="System V"
18447    fi
18448  fi
18449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
18450$as_echo "$sematype" >&6; }
18451else
18452
18453$as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
18454
18455  SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
18456fi
18457
18458
18459# Select shared-memory implementation type.
18460if test "$PORTNAME" != "win32"; then
18461
18462$as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
18463
18464  SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
18465else
18466
18467$as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
18468
18469  SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
18470fi
18471
18472# Select random number source. If a TLS library is used then it will be the
18473# first choice, else the native platform sources (Windows API or /dev/urandom)
18474# will be used.
18475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
18476$as_echo_n "checking which random number source to use... " >&6; }
18477if test x"$with_ssl" = x"openssl" ; then
18478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
18479$as_echo "OpenSSL" >&6; }
18480elif test x"$PORTNAME" = x"win32" ; then
18481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
18482$as_echo "Windows native" >&6; }
18483else
18484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
18485$as_echo "/dev/urandom" >&6; }
18486  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
18487$as_echo_n "checking for /dev/urandom... " >&6; }
18488if ${ac_cv_file__dev_urandom+:} false; then :
18489  $as_echo_n "(cached) " >&6
18490else
18491  test "$cross_compiling" = yes &&
18492  as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
18493if test -r "/dev/urandom"; then
18494  ac_cv_file__dev_urandom=yes
18495else
18496  ac_cv_file__dev_urandom=no
18497fi
18498fi
18499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
18500$as_echo "$ac_cv_file__dev_urandom" >&6; }
18501if test "x$ac_cv_file__dev_urandom" = xyes; then :
18502
18503fi
18504
18505
18506  if test x"$ac_cv_file__dev_urandom" = x"no" ; then
18507    as_fn_error $? "
18508no source of strong random numbers was found
18509PostgreSQL can use OpenSSL, native Windows API or /dev/urandom as a source of random numbers." "$LINENO" 5
18510  fi
18511fi
18512
18513# If not set in template file, set bytes to use libc memset()
18514if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
18515  MEMSET_LOOP_LIMIT=1024
18516fi
18517
18518cat >>confdefs.h <<_ACEOF
18519#define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
18520_ACEOF
18521
18522
18523
18524if test "$enable_nls" = yes ; then
18525
18526  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
18527$as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
18528if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18529  $as_echo_n "(cached) " >&6
18530else
18531  ac_func_search_save_LIBS=$LIBS
18532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18533/* end confdefs.h.  */
18534
18535/* Override any GCC internal prototype to avoid an error.
18536   Use char because int might match the return type of a GCC
18537   builtin and then its argument prototype would still apply.  */
18538#ifdef __cplusplus
18539extern "C"
18540#endif
18541char bind_textdomain_codeset ();
18542int
18543main ()
18544{
18545return bind_textdomain_codeset ();
18546  ;
18547  return 0;
18548}
18549_ACEOF
18550for ac_lib in '' intl; do
18551  if test -z "$ac_lib"; then
18552    ac_res="none required"
18553  else
18554    ac_res=-l$ac_lib
18555    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18556  fi
18557  if ac_fn_c_try_link "$LINENO"; then :
18558  ac_cv_search_bind_textdomain_codeset=$ac_res
18559fi
18560rm -f core conftest.err conftest.$ac_objext \
18561    conftest$ac_exeext
18562  if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18563  break
18564fi
18565done
18566if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18567
18568else
18569  ac_cv_search_bind_textdomain_codeset=no
18570fi
18571rm conftest.$ac_ext
18572LIBS=$ac_func_search_save_LIBS
18573fi
18574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
18575$as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
18576ac_res=$ac_cv_search_bind_textdomain_codeset
18577if test "$ac_res" != no; then :
18578  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18579
18580else
18581  as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
18582fi
18583
18584  ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
18585if test "x$ac_cv_header_libintl_h" = xyes; then :
18586
18587else
18588  as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
18589fi
18590
18591
18592  if test -z "$MSGFMT"; then
18593  for ac_prog in msgfmt
18594do
18595  # Extract the first word of "$ac_prog", so it can be a program name with args.
18596set dummy $ac_prog; ac_word=$2
18597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18598$as_echo_n "checking for $ac_word... " >&6; }
18599if ${ac_cv_path_MSGFMT+:} false; then :
18600  $as_echo_n "(cached) " >&6
18601else
18602  case $MSGFMT in
18603  [\\/]* | ?:[\\/]*)
18604  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
18605  ;;
18606  *)
18607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18608for as_dir in $PATH
18609do
18610  IFS=$as_save_IFS
18611  test -z "$as_dir" && as_dir=.
18612    for ac_exec_ext in '' $ac_executable_extensions; do
18613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18614    ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
18615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18616    break 2
18617  fi
18618done
18619  done
18620IFS=$as_save_IFS
18621
18622  ;;
18623esac
18624fi
18625MSGFMT=$ac_cv_path_MSGFMT
18626if test -n "$MSGFMT"; then
18627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18628$as_echo "$MSGFMT" >&6; }
18629else
18630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18631$as_echo "no" >&6; }
18632fi
18633
18634
18635  test -n "$MSGFMT" && break
18636done
18637
18638else
18639  # Report the value of MSGFMT in configure's output in all cases.
18640  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
18641$as_echo_n "checking for MSGFMT... " >&6; }
18642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18643$as_echo "$MSGFMT" >&6; }
18644fi
18645
18646    if test -z "$MSGFMT"; then
18647    as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
18648  fi
18649  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
18650$as_echo_n "checking for msgfmt flags... " >&6; }
18651if ${pgac_cv_msgfmt_flags+:} false; then :
18652  $as_echo_n "(cached) " >&6
18653else
18654  if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
18655    pgac_cv_msgfmt_flags=-c
18656fi
18657fi
18658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
18659$as_echo "$pgac_cv_msgfmt_flags" >&6; }
18660  MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
18661
18662  if test -z "$MSGMERGE"; then
18663  for ac_prog in msgmerge
18664do
18665  # Extract the first word of "$ac_prog", so it can be a program name with args.
18666set dummy $ac_prog; ac_word=$2
18667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18668$as_echo_n "checking for $ac_word... " >&6; }
18669if ${ac_cv_path_MSGMERGE+:} false; then :
18670  $as_echo_n "(cached) " >&6
18671else
18672  case $MSGMERGE in
18673  [\\/]* | ?:[\\/]*)
18674  ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18675  ;;
18676  *)
18677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18678for as_dir in $PATH
18679do
18680  IFS=$as_save_IFS
18681  test -z "$as_dir" && as_dir=.
18682    for ac_exec_ext in '' $ac_executable_extensions; do
18683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18684    ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
18685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18686    break 2
18687  fi
18688done
18689  done
18690IFS=$as_save_IFS
18691
18692  ;;
18693esac
18694fi
18695MSGMERGE=$ac_cv_path_MSGMERGE
18696if test -n "$MSGMERGE"; then
18697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18698$as_echo "$MSGMERGE" >&6; }
18699else
18700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18701$as_echo "no" >&6; }
18702fi
18703
18704
18705  test -n "$MSGMERGE" && break
18706done
18707
18708else
18709  # Report the value of MSGMERGE in configure's output in all cases.
18710  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18711$as_echo_n "checking for MSGMERGE... " >&6; }
18712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18713$as_echo "$MSGMERGE" >&6; }
18714fi
18715
18716  if test -z "$XGETTEXT"; then
18717  for ac_prog in xgettext
18718do
18719  # Extract the first word of "$ac_prog", so it can be a program name with args.
18720set dummy $ac_prog; ac_word=$2
18721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18722$as_echo_n "checking for $ac_word... " >&6; }
18723if ${ac_cv_path_XGETTEXT+:} false; then :
18724  $as_echo_n "(cached) " >&6
18725else
18726  case $XGETTEXT in
18727  [\\/]* | ?:[\\/]*)
18728  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18729  ;;
18730  *)
18731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18732for as_dir in $PATH
18733do
18734  IFS=$as_save_IFS
18735  test -z "$as_dir" && as_dir=.
18736    for ac_exec_ext in '' $ac_executable_extensions; do
18737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18738    ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18740    break 2
18741  fi
18742done
18743  done
18744IFS=$as_save_IFS
18745
18746  ;;
18747esac
18748fi
18749XGETTEXT=$ac_cv_path_XGETTEXT
18750if test -n "$XGETTEXT"; then
18751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18752$as_echo "$XGETTEXT" >&6; }
18753else
18754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18755$as_echo "no" >&6; }
18756fi
18757
18758
18759  test -n "$XGETTEXT" && break
18760done
18761
18762else
18763  # Report the value of XGETTEXT in configure's output in all cases.
18764  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18765$as_echo_n "checking for XGETTEXT... " >&6; }
18766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18767$as_echo "$XGETTEXT" >&6; }
18768fi
18769
18770
18771fi
18772
18773# Check for Tcl configuration script tclConfig.sh
18774if test "$with_tcl" = yes; then
18775    if test -z "$TCLSH"; then
18776  for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18777do
18778  # Extract the first word of "$ac_prog", so it can be a program name with args.
18779set dummy $ac_prog; ac_word=$2
18780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18781$as_echo_n "checking for $ac_word... " >&6; }
18782if ${ac_cv_path_TCLSH+:} false; then :
18783  $as_echo_n "(cached) " >&6
18784else
18785  case $TCLSH in
18786  [\\/]* | ?:[\\/]*)
18787  ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18788  ;;
18789  *)
18790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18791for as_dir in $PATH
18792do
18793  IFS=$as_save_IFS
18794  test -z "$as_dir" && as_dir=.
18795    for ac_exec_ext in '' $ac_executable_extensions; do
18796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18797    ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18799    break 2
18800  fi
18801done
18802  done
18803IFS=$as_save_IFS
18804
18805  ;;
18806esac
18807fi
18808TCLSH=$ac_cv_path_TCLSH
18809if test -n "$TCLSH"; then
18810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18811$as_echo "$TCLSH" >&6; }
18812else
18813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18814$as_echo "no" >&6; }
18815fi
18816
18817
18818  test -n "$TCLSH" && break
18819done
18820
18821else
18822  # Report the value of TCLSH in configure's output in all cases.
18823  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18824$as_echo_n "checking for TCLSH... " >&6; }
18825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18826$as_echo "$TCLSH" >&6; }
18827fi
18828
18829if test x"$TCLSH" = x""; then
18830  as_fn_error $? "Tcl shell not found" "$LINENO" 5
18831fi
18832
18833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18834$as_echo_n "checking for tclConfig.sh... " >&6; }
18835# Let user override test
18836if test -z "$TCL_CONFIG_SH"; then
18837    pgac_test_dirs="$with_tclconfig"
18838
18839    set X $pgac_test_dirs; shift
18840    if test $# -eq 0; then
18841        test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18842        pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18843        # On newer macOS, $auto_path frequently doesn't include the place
18844        # where tclConfig.sh actually lives.  Append that to the end, so as not
18845        # to break cases where a non-default Tcl installation is being used.
18846        if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18847            pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18848        fi
18849        set X $pgac_test_dirs; shift
18850    fi
18851
18852    for pgac_dir do
18853        if test -r "$pgac_dir/tclConfig.sh"; then
18854            TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18855            break
18856        fi
18857    done
18858fi
18859
18860if test -z "$TCL_CONFIG_SH"; then
18861    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18862$as_echo "no" >&6; }
18863    as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18864else
18865    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18866$as_echo "$TCL_CONFIG_SH" >&6; }
18867fi
18868
18869
18870
18871    . "$TCL_CONFIG_SH"
18872eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18873eval TCL_LIBS=\"$TCL_LIBS\"
18874eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18875eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18876
18877        if test "$TCL_SHARED_BUILD" != 1; then
18878      as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18879Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18880    fi
18881    # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18882    ac_save_CPPFLAGS=$CPPFLAGS
18883    CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18884    ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18885if test "x$ac_cv_header_tcl_h" = xyes; then :
18886
18887else
18888  as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18889fi
18890
18891
18892    CPPFLAGS=$ac_save_CPPFLAGS
18893fi
18894
18895# check for <perl.h>
18896if test "$with_perl" = yes; then
18897  ac_save_CPPFLAGS=$CPPFLAGS
18898  CPPFLAGS="$CPPFLAGS $perl_includespec"
18899  ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18900"
18901if test "x$ac_cv_header_perl_h" = xyes; then :
18902
18903else
18904  as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18905fi
18906
18907
18908  # While we're at it, check that we can link to libperl.
18909  # On most platforms, if perl.h is there then libperl.so will be too, but at
18910  # this writing Debian packages them separately.  There is no known reason to
18911  # waste cycles on separate probes for the Tcl or Python libraries, though.
18912  # On some Red Hat platforms, the link attempt can fail if we don't use
18913  # CFLAGS_SL while building the test program.
18914  ac_save_CFLAGS=$CFLAGS
18915  CFLAGS="$CFLAGS $CFLAGS_SL"
18916  pgac_save_LIBS=$LIBS
18917  LIBS="$perl_embed_ldflags"
18918  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18919$as_echo_n "checking for libperl... " >&6; }
18920  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18921/* end confdefs.h.  */
18922
18923#include <EXTERN.h>
18924#include <perl.h>
18925
18926int
18927main ()
18928{
18929perl_alloc();
18930  ;
18931  return 0;
18932}
18933_ACEOF
18934if ac_fn_c_try_link "$LINENO"; then :
18935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18936$as_echo "yes" >&6; }
18937else
18938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18939$as_echo "no" >&6; }
18940     as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18941fi
18942rm -f core conftest.err conftest.$ac_objext \
18943    conftest$ac_exeext conftest.$ac_ext
18944  LIBS=$pgac_save_LIBS
18945  CFLAGS=$ac_save_CFLAGS
18946  CPPFLAGS=$ac_save_CPPFLAGS
18947fi
18948
18949# check for <Python.h>
18950if test "$with_python" = yes; then
18951  ac_save_CPPFLAGS=$CPPFLAGS
18952  CPPFLAGS="$python_includespec $CPPFLAGS"
18953  ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18954if test "x$ac_cv_header_Python_h" = xyes; then :
18955
18956else
18957  as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18958fi
18959
18960
18961  CPPFLAGS=$ac_save_CPPFLAGS
18962fi
18963
18964#
18965# Check for documentation-building tools
18966#
18967if test -z "$XMLLINT"; then
18968  for ac_prog in xmllint
18969do
18970  # Extract the first word of "$ac_prog", so it can be a program name with args.
18971set dummy $ac_prog; ac_word=$2
18972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18973$as_echo_n "checking for $ac_word... " >&6; }
18974if ${ac_cv_path_XMLLINT+:} false; then :
18975  $as_echo_n "(cached) " >&6
18976else
18977  case $XMLLINT in
18978  [\\/]* | ?:[\\/]*)
18979  ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18980  ;;
18981  *)
18982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18983for as_dir in $PATH
18984do
18985  IFS=$as_save_IFS
18986  test -z "$as_dir" && as_dir=.
18987    for ac_exec_ext in '' $ac_executable_extensions; do
18988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18989    ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18991    break 2
18992  fi
18993done
18994  done
18995IFS=$as_save_IFS
18996
18997  ;;
18998esac
18999fi
19000XMLLINT=$ac_cv_path_XMLLINT
19001if test -n "$XMLLINT"; then
19002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
19003$as_echo "$XMLLINT" >&6; }
19004else
19005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19006$as_echo "no" >&6; }
19007fi
19008
19009
19010  test -n "$XMLLINT" && break
19011done
19012
19013else
19014  # Report the value of XMLLINT in configure's output in all cases.
19015  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
19016$as_echo_n "checking for XMLLINT... " >&6; }
19017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
19018$as_echo "$XMLLINT" >&6; }
19019fi
19020
19021if test -z "$XSLTPROC"; then
19022  for ac_prog in xsltproc
19023do
19024  # Extract the first word of "$ac_prog", so it can be a program name with args.
19025set dummy $ac_prog; ac_word=$2
19026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19027$as_echo_n "checking for $ac_word... " >&6; }
19028if ${ac_cv_path_XSLTPROC+:} false; then :
19029  $as_echo_n "(cached) " >&6
19030else
19031  case $XSLTPROC in
19032  [\\/]* | ?:[\\/]*)
19033  ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
19034  ;;
19035  *)
19036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19037for as_dir in $PATH
19038do
19039  IFS=$as_save_IFS
19040  test -z "$as_dir" && as_dir=.
19041    for ac_exec_ext in '' $ac_executable_extensions; do
19042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19043    ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
19044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19045    break 2
19046  fi
19047done
19048  done
19049IFS=$as_save_IFS
19050
19051  ;;
19052esac
19053fi
19054XSLTPROC=$ac_cv_path_XSLTPROC
19055if test -n "$XSLTPROC"; then
19056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19057$as_echo "$XSLTPROC" >&6; }
19058else
19059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19060$as_echo "no" >&6; }
19061fi
19062
19063
19064  test -n "$XSLTPROC" && break
19065done
19066
19067else
19068  # Report the value of XSLTPROC in configure's output in all cases.
19069  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
19070$as_echo_n "checking for XSLTPROC... " >&6; }
19071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19072$as_echo "$XSLTPROC" >&6; }
19073fi
19074
19075if test -z "$FOP"; then
19076  for ac_prog in fop
19077do
19078  # Extract the first word of "$ac_prog", so it can be a program name with args.
19079set dummy $ac_prog; ac_word=$2
19080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19081$as_echo_n "checking for $ac_word... " >&6; }
19082if ${ac_cv_path_FOP+:} false; then :
19083  $as_echo_n "(cached) " >&6
19084else
19085  case $FOP in
19086  [\\/]* | ?:[\\/]*)
19087  ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
19088  ;;
19089  *)
19090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19091for as_dir in $PATH
19092do
19093  IFS=$as_save_IFS
19094  test -z "$as_dir" && as_dir=.
19095    for ac_exec_ext in '' $ac_executable_extensions; do
19096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19097    ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
19098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19099    break 2
19100  fi
19101done
19102  done
19103IFS=$as_save_IFS
19104
19105  ;;
19106esac
19107fi
19108FOP=$ac_cv_path_FOP
19109if test -n "$FOP"; then
19110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
19111$as_echo "$FOP" >&6; }
19112else
19113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19114$as_echo "no" >&6; }
19115fi
19116
19117
19118  test -n "$FOP" && break
19119done
19120
19121else
19122  # Report the value of FOP in configure's output in all cases.
19123  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
19124$as_echo_n "checking for FOP... " >&6; }
19125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
19126$as_echo "$FOP" >&6; }
19127fi
19128
19129if test -z "$DBTOEPUB"; then
19130  for ac_prog in dbtoepub
19131do
19132  # Extract the first word of "$ac_prog", so it can be a program name with args.
19133set dummy $ac_prog; ac_word=$2
19134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19135$as_echo_n "checking for $ac_word... " >&6; }
19136if ${ac_cv_path_DBTOEPUB+:} false; then :
19137  $as_echo_n "(cached) " >&6
19138else
19139  case $DBTOEPUB in
19140  [\\/]* | ?:[\\/]*)
19141  ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
19142  ;;
19143  *)
19144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19145for as_dir in $PATH
19146do
19147  IFS=$as_save_IFS
19148  test -z "$as_dir" && as_dir=.
19149    for ac_exec_ext in '' $ac_executable_extensions; do
19150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19151    ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
19152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19153    break 2
19154  fi
19155done
19156  done
19157IFS=$as_save_IFS
19158
19159  ;;
19160esac
19161fi
19162DBTOEPUB=$ac_cv_path_DBTOEPUB
19163if test -n "$DBTOEPUB"; then
19164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
19165$as_echo "$DBTOEPUB" >&6; }
19166else
19167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19168$as_echo "no" >&6; }
19169fi
19170
19171
19172  test -n "$DBTOEPUB" && break
19173done
19174
19175else
19176  # Report the value of DBTOEPUB in configure's output in all cases.
19177  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
19178$as_echo_n "checking for DBTOEPUB... " >&6; }
19179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
19180$as_echo "$DBTOEPUB" >&6; }
19181fi
19182
19183
19184#
19185# Check for test tools
19186#
19187if test "$enable_tap_tests" = yes; then
19188  # Check for necessary modules, unless user has specified the "prove" to use;
19189  # in that case it's her responsibility to have a working configuration.
19190  # (prove might be part of a different Perl installation than perl, eg on
19191  # MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)
19192  if test -z "$PROVE"; then
19193    # Test::More and Time::HiRes are supposed to be part of core Perl,
19194    # but some distros omit them in a minimal installation.
19195
19196
19197
19198
19199
19200
19201
19202
19203
19204
19205# Make sure we have perl
19206if test -z "$PERL"; then
19207# Extract the first word of "perl", so it can be a program name with args.
19208set dummy perl; ac_word=$2
19209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19210$as_echo_n "checking for $ac_word... " >&6; }
19211if ${ac_cv_prog_PERL+:} false; then :
19212  $as_echo_n "(cached) " >&6
19213else
19214  if test -n "$PERL"; then
19215  ac_cv_prog_PERL="$PERL" # Let the user override the test.
19216else
19217as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19218for as_dir in $PATH
19219do
19220  IFS=$as_save_IFS
19221  test -z "$as_dir" && as_dir=.
19222    for ac_exec_ext in '' $ac_executable_extensions; do
19223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19224    ac_cv_prog_PERL="perl"
19225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19226    break 2
19227  fi
19228done
19229  done
19230IFS=$as_save_IFS
19231
19232fi
19233fi
19234PERL=$ac_cv_prog_PERL
19235if test -n "$PERL"; then
19236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
19237$as_echo "$PERL" >&6; }
19238else
19239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19240$as_echo "no" >&6; }
19241fi
19242
19243
19244fi
19245
19246if test "x$PERL" != x; then
19247  ax_perl_modules_failed=0
19248  for ax_perl_module in 'IPC::Run' 'Test::More 0.87' 'Time::HiRes' ; do
19249    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl module $ax_perl_module" >&5
19250$as_echo_n "checking for perl module $ax_perl_module... " >&6; }
19251
19252    # Would be nice to log result here, but can't rely on autoconf internals
19253    $PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1
19254    if test $? -ne 0; then
19255      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19256$as_echo "no" >&6; };
19257      ax_perl_modules_failed=1
19258   else
19259      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
19260$as_echo "ok" >&6; };
19261    fi
19262  done
19263
19264  # Run optional shell commands
19265  if test "$ax_perl_modules_failed" = 0; then
19266    :
19267
19268  else
19269    :
19270    as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
19271  fi
19272else
19273  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5
19274$as_echo "$as_me: WARNING: could not find perl" >&2;}
19275fi
19276  fi
19277  # Now make sure we know where prove is
19278  if test -z "$PROVE"; then
19279  for ac_prog in prove
19280do
19281  # Extract the first word of "$ac_prog", so it can be a program name with args.
19282set dummy $ac_prog; ac_word=$2
19283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19284$as_echo_n "checking for $ac_word... " >&6; }
19285if ${ac_cv_path_PROVE+:} false; then :
19286  $as_echo_n "(cached) " >&6
19287else
19288  case $PROVE in
19289  [\\/]* | ?:[\\/]*)
19290  ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
19291  ;;
19292  *)
19293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19294for as_dir in $PATH
19295do
19296  IFS=$as_save_IFS
19297  test -z "$as_dir" && as_dir=.
19298    for ac_exec_ext in '' $ac_executable_extensions; do
19299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19300    ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
19301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19302    break 2
19303  fi
19304done
19305  done
19306IFS=$as_save_IFS
19307
19308  ;;
19309esac
19310fi
19311PROVE=$ac_cv_path_PROVE
19312if test -n "$PROVE"; then
19313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19314$as_echo "$PROVE" >&6; }
19315else
19316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19317$as_echo "no" >&6; }
19318fi
19319
19320
19321  test -n "$PROVE" && break
19322done
19323
19324else
19325  # Report the value of PROVE in configure's output in all cases.
19326  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
19327$as_echo_n "checking for PROVE... " >&6; }
19328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19329$as_echo "$PROVE" >&6; }
19330fi
19331
19332  if test -z "$PROVE"; then
19333    as_fn_error $? "prove not found" "$LINENO" 5
19334  fi
19335fi
19336
19337# If compiler will take -Wl,--as-needed (or various platform-specific
19338# spellings thereof) then add that to LDFLAGS.  This is much easier than
19339# trying to filter LIBS to the minimum for each executable.
19340# On (at least) some Red-Hat-derived systems, this switch breaks linking to
19341# libreadline; therefore we postpone testing it until we know what library
19342# dependencies readline has.  The test code will try to link with $LIBS.
19343if test "$with_readline" = yes; then
19344  link_test_func=readline
19345else
19346  link_test_func=exit
19347fi
19348
19349if test "$PORTNAME" = "darwin"; then
19350  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
19351$as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
19352if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
19353  $as_echo_n "(cached) " >&6
19354else
19355  pgac_save_LDFLAGS=$LDFLAGS
19356LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
19357if test "$cross_compiling" = yes; then :
19358  pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
19359else
19360  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19361/* end confdefs.h.  */
19362extern void $link_test_func (); void (*fptr) () = $link_test_func;
19363int
19364main ()
19365{
19366
19367  ;
19368  return 0;
19369}
19370_ACEOF
19371if ac_fn_c_try_run "$LINENO"; then :
19372  pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
19373else
19374  pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
19375fi
19376rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19377  conftest.$ac_objext conftest.beam conftest.$ac_ext
19378fi
19379
19380LDFLAGS="$pgac_save_LDFLAGS"
19381fi
19382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
19383$as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
19384if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
19385  LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
19386fi
19387
19388elif test "$PORTNAME" = "openbsd"; then
19389  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
19390$as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
19391if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
19392  $as_echo_n "(cached) " >&6
19393else
19394  pgac_save_LDFLAGS=$LDFLAGS
19395LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
19396if test "$cross_compiling" = yes; then :
19397  pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
19398else
19399  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19400/* end confdefs.h.  */
19401extern void $link_test_func (); void (*fptr) () = $link_test_func;
19402int
19403main ()
19404{
19405
19406  ;
19407  return 0;
19408}
19409_ACEOF
19410if ac_fn_c_try_run "$LINENO"; then :
19411  pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
19412else
19413  pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
19414fi
19415rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19416  conftest.$ac_objext conftest.beam conftest.$ac_ext
19417fi
19418
19419LDFLAGS="$pgac_save_LDFLAGS"
19420fi
19421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
19422$as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
19423if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
19424  LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
19425fi
19426
19427else
19428  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
19429$as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
19430if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
19431  $as_echo_n "(cached) " >&6
19432else
19433  pgac_save_LDFLAGS=$LDFLAGS
19434LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
19435if test "$cross_compiling" = yes; then :
19436  pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
19437else
19438  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19439/* end confdefs.h.  */
19440extern void $link_test_func (); void (*fptr) () = $link_test_func;
19441int
19442main ()
19443{
19444
19445  ;
19446  return 0;
19447}
19448_ACEOF
19449if ac_fn_c_try_run "$LINENO"; then :
19450  pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
19451else
19452  pgac_cv_prog_cc_ldflags__Wl___as_needed=no
19453fi
19454rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19455  conftest.$ac_objext conftest.beam conftest.$ac_ext
19456fi
19457
19458LDFLAGS="$pgac_save_LDFLAGS"
19459fi
19460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
19461$as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
19462if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
19463  LDFLAGS="$LDFLAGS -Wl,--as-needed"
19464fi
19465
19466fi
19467
19468# Create compiler version string
19469if test x"$GCC" = x"yes" ; then
19470  cc_string=`${CC} --version | sed q`
19471  case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
19472elif test x"$SUN_STUDIO_CC" = x"yes" ; then
19473  cc_string=`${CC} -V 2>&1 | sed q`
19474else
19475  cc_string=$CC
19476fi
19477
19478
19479cat >>confdefs.h <<_ACEOF
19480#define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
19481_ACEOF
19482
19483
19484# Supply a numeric version string for use by 3rd party add-ons
19485# awk -F is a regex on some platforms, and not on others, so make "." a tab
19486PG_VERSION_NUM="`echo $PG_MAJORVERSION $PG_MINORVERSION |
19487$AWK '{printf "%d%04d", $1, $2}'`"
19488
19489cat >>confdefs.h <<_ACEOF
19490#define PG_VERSION_NUM $PG_VERSION_NUM
19491_ACEOF
19492
19493
19494
19495# If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
19496# literally, so that it's possible to override it at build time using
19497# a command like "make ... PG_SYSROOT=path".  This has to be done after
19498# we've finished all configure checks that depend on CPPFLAGS.
19499# The same for LDFLAGS, too.
19500if test x"$PG_SYSROOT" != x; then
19501  CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19502  LDFLAGS=`echo "$LDFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19503fi
19504
19505
19506
19507# Begin output steps
19508
19509{ $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
19510$as_echo "$as_me: using compiler=$cc_string" >&6;}
19511{ $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
19512$as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
19513{ $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
19514$as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
19515{ $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
19516$as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
19517# Currently only used when LLVM is used
19518if test "$with_llvm" = yes ; then
19519   { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
19520$as_echo "$as_me: using CXX=$CXX" >&6;}
19521   { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
19522$as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
19523   { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
19524$as_echo "$as_me: using CLANG=$CLANG" >&6;}
19525   { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
19526$as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
19527   { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
19528$as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
19529fi
19530
19531# prepare build tree if outside source tree
19532# Note 1: test -ef might not exist, but it's more reliable than `pwd`.
19533# Note 2: /bin/pwd might be better than shell's built-in at getting
19534#         a symlink-free name.
19535if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
19536  vpath_build=no
19537else
19538  vpath_build=yes
19539  if test "$no_create" != yes; then
19540    $as_echo_n "preparing build tree... " >&6
19541    pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
19542    $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
19543      || as_fn_error $? "failed" "$LINENO" 5
19544    { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
19545$as_echo "done" >&6; }
19546  fi
19547fi
19548
19549
19550
19551ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
19552
19553
19554ac_config_links="$ac_config_links src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION} src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION} src/include/pg_config_os.h:src/include/port/${template}.h src/Makefile.port:src/makefiles/Makefile.${template}"
19555
19556
19557if test "$PORTNAME" = "win32"; then
19558ac_config_commands="$ac_config_commands check_win32_symlinks"
19559
19560fi
19561
19562ac_config_headers="$ac_config_headers src/include/pg_config.h"
19563
19564
19565ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
19566
19567
19568ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
19569
19570
19571cat >confcache <<\_ACEOF
19572# This file is a shell script that caches the results of configure
19573# tests run on this system so they can be shared between configure
19574# scripts and configure runs, see configure's option --config-cache.
19575# It is not useful on other systems.  If it contains results you don't
19576# want to keep, you may remove or edit it.
19577#
19578# config.status only pays attention to the cache file if you give it
19579# the --recheck option to rerun configure.
19580#
19581# `ac_cv_env_foo' variables (set or unset) will be overridden when
19582# loading this file, other *unset* `ac_cv_foo' will be assigned the
19583# following values.
19584
19585_ACEOF
19586
19587# The following way of writing the cache mishandles newlines in values,
19588# but we know of no workaround that is simple, portable, and efficient.
19589# So, we kill variables containing newlines.
19590# Ultrix sh set writes to stderr and can't be redirected directly,
19591# and sets the high bit in the cache file unless we assign to the vars.
19592(
19593  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19594    eval ac_val=\$$ac_var
19595    case $ac_val in #(
19596    *${as_nl}*)
19597      case $ac_var in #(
19598      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19599$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19600      esac
19601      case $ac_var in #(
19602      _ | IFS | as_nl) ;; #(
19603      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19604      *) { eval $ac_var=; unset $ac_var;} ;;
19605      esac ;;
19606    esac
19607  done
19608
19609  (set) 2>&1 |
19610    case $as_nl`(ac_space=' '; set) 2>&1` in #(
19611    *${as_nl}ac_space=\ *)
19612      # `set' does not quote correctly, so add quotes: double-quote
19613      # substitution turns \\\\ into \\, and sed turns \\ into \.
19614      sed -n \
19615	"s/'/'\\\\''/g;
19616	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19617      ;; #(
19618    *)
19619      # `set' quotes correctly as required by POSIX, so do not add quotes.
19620      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19621      ;;
19622    esac |
19623    sort
19624) |
19625  sed '
19626     /^ac_cv_env_/b end
19627     t clear
19628     :clear
19629     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19630     t end
19631     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19632     :end' >>confcache
19633if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19634  if test -w "$cache_file"; then
19635    if test "x$cache_file" != "x/dev/null"; then
19636      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19637$as_echo "$as_me: updating cache $cache_file" >&6;}
19638      if test ! -f "$cache_file" || test -h "$cache_file"; then
19639	cat confcache >"$cache_file"
19640      else
19641        case $cache_file in #(
19642        */* | ?:*)
19643	  mv -f confcache "$cache_file"$$ &&
19644	  mv -f "$cache_file"$$ "$cache_file" ;; #(
19645        *)
19646	  mv -f confcache "$cache_file" ;;
19647	esac
19648      fi
19649    fi
19650  else
19651    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19652$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19653  fi
19654fi
19655rm -f confcache
19656
19657test "x$prefix" = xNONE && prefix=$ac_default_prefix
19658# Let make expand exec_prefix.
19659test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19660
19661DEFS=-DHAVE_CONFIG_H
19662
19663ac_libobjs=
19664ac_ltlibobjs=
19665U=
19666for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19667  # 1. Remove the extension, and $U if already installed.
19668  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19669  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19670  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
19671  #    will be set to the directory where LIBOBJS objects are built.
19672  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19673  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19674done
19675LIBOBJS=$ac_libobjs
19676
19677LTLIBOBJS=$ac_ltlibobjs
19678
19679
19680
19681
19682: "${CONFIG_STATUS=./config.status}"
19683ac_write_fail=0
19684ac_clean_files_save=$ac_clean_files
19685ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19686{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19687$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19688as_write_fail=0
19689cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19690#! $SHELL
19691# Generated by $as_me.
19692# Run this file to recreate the current configuration.
19693# Compiler output produced by configure, useful for debugging
19694# configure, is in config.log if it exists.
19695
19696debug=false
19697ac_cs_recheck=false
19698ac_cs_silent=false
19699
19700SHELL=\${CONFIG_SHELL-$SHELL}
19701export SHELL
19702_ASEOF
19703cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19704## -------------------- ##
19705## M4sh Initialization. ##
19706## -------------------- ##
19707
19708# Be more Bourne compatible
19709DUALCASE=1; export DUALCASE # for MKS sh
19710if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19711  emulate sh
19712  NULLCMD=:
19713  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19714  # is contrary to our usage.  Disable this feature.
19715  alias -g '${1+"$@"}'='"$@"'
19716  setopt NO_GLOB_SUBST
19717else
19718  case `(set -o) 2>/dev/null` in #(
19719  *posix*) :
19720    set -o posix ;; #(
19721  *) :
19722     ;;
19723esac
19724fi
19725
19726
19727as_nl='
19728'
19729export as_nl
19730# Printing a long string crashes Solaris 7 /usr/bin/printf.
19731as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19732as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19733as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19734# Prefer a ksh shell builtin over an external printf program on Solaris,
19735# but without wasting forks for bash or zsh.
19736if test -z "$BASH_VERSION$ZSH_VERSION" \
19737    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19738  as_echo='print -r --'
19739  as_echo_n='print -rn --'
19740elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19741  as_echo='printf %s\n'
19742  as_echo_n='printf %s'
19743else
19744  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19745    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19746    as_echo_n='/usr/ucb/echo -n'
19747  else
19748    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19749    as_echo_n_body='eval
19750      arg=$1;
19751      case $arg in #(
19752      *"$as_nl"*)
19753	expr "X$arg" : "X\\(.*\\)$as_nl";
19754	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19755      esac;
19756      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19757    '
19758    export as_echo_n_body
19759    as_echo_n='sh -c $as_echo_n_body as_echo'
19760  fi
19761  export as_echo_body
19762  as_echo='sh -c $as_echo_body as_echo'
19763fi
19764
19765# The user is always right.
19766if test "${PATH_SEPARATOR+set}" != set; then
19767  PATH_SEPARATOR=:
19768  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19769    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19770      PATH_SEPARATOR=';'
19771  }
19772fi
19773
19774
19775# IFS
19776# We need space, tab and new line, in precisely that order.  Quoting is
19777# there to prevent editors from complaining about space-tab.
19778# (If _AS_PATH_WALK were called with IFS unset, it would disable word
19779# splitting by setting IFS to empty value.)
19780IFS=" ""	$as_nl"
19781
19782# Find who we are.  Look in the path if we contain no directory separator.
19783as_myself=
19784case $0 in #((
19785  *[\\/]* ) as_myself=$0 ;;
19786  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19787for as_dir in $PATH
19788do
19789  IFS=$as_save_IFS
19790  test -z "$as_dir" && as_dir=.
19791    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19792  done
19793IFS=$as_save_IFS
19794
19795     ;;
19796esac
19797# We did not find ourselves, most probably we were run as `sh COMMAND'
19798# in which case we are not to be found in the path.
19799if test "x$as_myself" = x; then
19800  as_myself=$0
19801fi
19802if test ! -f "$as_myself"; then
19803  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19804  exit 1
19805fi
19806
19807# Unset variables that we do not need and which cause bugs (e.g. in
19808# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
19809# suppresses any "Segmentation fault" message there.  '((' could
19810# trigger a bug in pdksh 5.2.14.
19811for as_var in BASH_ENV ENV MAIL MAILPATH
19812do eval test x\${$as_var+set} = xset \
19813  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19814done
19815PS1='$ '
19816PS2='> '
19817PS4='+ '
19818
19819# NLS nuisances.
19820LC_ALL=C
19821export LC_ALL
19822LANGUAGE=C
19823export LANGUAGE
19824
19825# CDPATH.
19826(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19827
19828
19829# as_fn_error STATUS ERROR [LINENO LOG_FD]
19830# ----------------------------------------
19831# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19832# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19833# script with STATUS, using 1 if that was 0.
19834as_fn_error ()
19835{
19836  as_status=$1; test $as_status -eq 0 && as_status=1
19837  if test "$4"; then
19838    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19839    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19840  fi
19841  $as_echo "$as_me: error: $2" >&2
19842  as_fn_exit $as_status
19843} # as_fn_error
19844
19845
19846# as_fn_set_status STATUS
19847# -----------------------
19848# Set $? to STATUS, without forking.
19849as_fn_set_status ()
19850{
19851  return $1
19852} # as_fn_set_status
19853
19854# as_fn_exit STATUS
19855# -----------------
19856# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19857as_fn_exit ()
19858{
19859  set +e
19860  as_fn_set_status $1
19861  exit $1
19862} # as_fn_exit
19863
19864# as_fn_unset VAR
19865# ---------------
19866# Portably unset VAR.
19867as_fn_unset ()
19868{
19869  { eval $1=; unset $1;}
19870}
19871as_unset=as_fn_unset
19872# as_fn_append VAR VALUE
19873# ----------------------
19874# Append the text in VALUE to the end of the definition contained in VAR. Take
19875# advantage of any shell optimizations that allow amortized linear growth over
19876# repeated appends, instead of the typical quadratic growth present in naive
19877# implementations.
19878if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19879  eval 'as_fn_append ()
19880  {
19881    eval $1+=\$2
19882  }'
19883else
19884  as_fn_append ()
19885  {
19886    eval $1=\$$1\$2
19887  }
19888fi # as_fn_append
19889
19890# as_fn_arith ARG...
19891# ------------------
19892# Perform arithmetic evaluation on the ARGs, and store the result in the
19893# global $as_val. Take advantage of shells that can avoid forks. The arguments
19894# must be portable across $(()) and expr.
19895if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19896  eval 'as_fn_arith ()
19897  {
19898    as_val=$(( $* ))
19899  }'
19900else
19901  as_fn_arith ()
19902  {
19903    as_val=`expr "$@" || test $? -eq 1`
19904  }
19905fi # as_fn_arith
19906
19907
19908if expr a : '\(a\)' >/dev/null 2>&1 &&
19909   test "X`expr 00001 : '.*\(...\)'`" = X001; then
19910  as_expr=expr
19911else
19912  as_expr=false
19913fi
19914
19915if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19916  as_basename=basename
19917else
19918  as_basename=false
19919fi
19920
19921if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19922  as_dirname=dirname
19923else
19924  as_dirname=false
19925fi
19926
19927as_me=`$as_basename -- "$0" ||
19928$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19929	 X"$0" : 'X\(//\)$' \| \
19930	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19931$as_echo X/"$0" |
19932    sed '/^.*\/\([^/][^/]*\)\/*$/{
19933	    s//\1/
19934	    q
19935	  }
19936	  /^X\/\(\/\/\)$/{
19937	    s//\1/
19938	    q
19939	  }
19940	  /^X\/\(\/\).*/{
19941	    s//\1/
19942	    q
19943	  }
19944	  s/.*/./; q'`
19945
19946# Avoid depending upon Character Ranges.
19947as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19948as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19949as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19950as_cr_digits='0123456789'
19951as_cr_alnum=$as_cr_Letters$as_cr_digits
19952
19953ECHO_C= ECHO_N= ECHO_T=
19954case `echo -n x` in #(((((
19955-n*)
19956  case `echo 'xy\c'` in
19957  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
19958  xy)  ECHO_C='\c';;
19959  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
19960       ECHO_T='	';;
19961  esac;;
19962*)
19963  ECHO_N='-n';;
19964esac
19965
19966rm -f conf$$ conf$$.exe conf$$.file
19967if test -d conf$$.dir; then
19968  rm -f conf$$.dir/conf$$.file
19969else
19970  rm -f conf$$.dir
19971  mkdir conf$$.dir 2>/dev/null
19972fi
19973if (echo >conf$$.file) 2>/dev/null; then
19974  if ln -s conf$$.file conf$$ 2>/dev/null; then
19975    as_ln_s='ln -s'
19976    # ... but there are two gotchas:
19977    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19978    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19979    # In both cases, we have to default to `cp -pR'.
19980    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19981      as_ln_s='cp -pR'
19982  elif ln conf$$.file conf$$ 2>/dev/null; then
19983    as_ln_s=ln
19984  else
19985    as_ln_s='cp -pR'
19986  fi
19987else
19988  as_ln_s='cp -pR'
19989fi
19990rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19991rmdir conf$$.dir 2>/dev/null
19992
19993
19994# as_fn_mkdir_p
19995# -------------
19996# Create "$as_dir" as a directory, including parents if necessary.
19997as_fn_mkdir_p ()
19998{
19999
20000  case $as_dir in #(
20001  -*) as_dir=./$as_dir;;
20002  esac
20003  test -d "$as_dir" || eval $as_mkdir_p || {
20004    as_dirs=
20005    while :; do
20006      case $as_dir in #(
20007      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
20008      *) as_qdir=$as_dir;;
20009      esac
20010      as_dirs="'$as_qdir' $as_dirs"
20011      as_dir=`$as_dirname -- "$as_dir" ||
20012$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20013	 X"$as_dir" : 'X\(//\)[^/]' \| \
20014	 X"$as_dir" : 'X\(//\)$' \| \
20015	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
20016$as_echo X"$as_dir" |
20017    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20018	    s//\1/
20019	    q
20020	  }
20021	  /^X\(\/\/\)[^/].*/{
20022	    s//\1/
20023	    q
20024	  }
20025	  /^X\(\/\/\)$/{
20026	    s//\1/
20027	    q
20028	  }
20029	  /^X\(\/\).*/{
20030	    s//\1/
20031	    q
20032	  }
20033	  s/.*/./; q'`
20034      test -d "$as_dir" && break
20035    done
20036    test -z "$as_dirs" || eval "mkdir $as_dirs"
20037  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
20038
20039
20040} # as_fn_mkdir_p
20041if mkdir -p . 2>/dev/null; then
20042  as_mkdir_p='mkdir -p "$as_dir"'
20043else
20044  test -d ./-p && rmdir ./-p
20045  as_mkdir_p=false
20046fi
20047
20048
20049# as_fn_executable_p FILE
20050# -----------------------
20051# Test if FILE is an executable regular file.
20052as_fn_executable_p ()
20053{
20054  test -f "$1" && test -x "$1"
20055} # as_fn_executable_p
20056as_test_x='test -x'
20057as_executable_p=as_fn_executable_p
20058
20059# Sed expression to map a string onto a valid CPP name.
20060as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20061
20062# Sed expression to map a string onto a valid variable name.
20063as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20064
20065
20066exec 6>&1
20067## ----------------------------------- ##
20068## Main body of $CONFIG_STATUS script. ##
20069## ----------------------------------- ##
20070_ASEOF
20071test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
20072
20073cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20074# Save the log message, to keep $0 and so on meaningful, and to
20075# report actual input values of CONFIG_FILES etc. instead of their
20076# values after options handling.
20077ac_log="
20078This file was extended by PostgreSQL $as_me 14.1, which was
20079generated by GNU Autoconf 2.69.  Invocation command line was
20080
20081  CONFIG_FILES    = $CONFIG_FILES
20082  CONFIG_HEADERS  = $CONFIG_HEADERS
20083  CONFIG_LINKS    = $CONFIG_LINKS
20084  CONFIG_COMMANDS = $CONFIG_COMMANDS
20085  $ $0 $@
20086
20087on `(hostname || uname -n) 2>/dev/null | sed 1q`
20088"
20089
20090_ACEOF
20091
20092case $ac_config_files in *"
20093"*) set x $ac_config_files; shift; ac_config_files=$*;;
20094esac
20095
20096case $ac_config_headers in *"
20097"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
20098esac
20099
20100
20101cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20102# Files that config.status was made for.
20103config_files="$ac_config_files"
20104config_headers="$ac_config_headers"
20105config_links="$ac_config_links"
20106config_commands="$ac_config_commands"
20107
20108_ACEOF
20109
20110cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20111ac_cs_usage="\
20112\`$as_me' instantiates files and other configuration actions
20113from templates according to the current configuration.  Unless the files
20114and actions are specified as TAGs, all are instantiated by default.
20115
20116Usage: $0 [OPTION]... [TAG]...
20117
20118  -h, --help       print this help, then exit
20119  -V, --version    print version number and configuration settings, then exit
20120      --config     print configuration, then exit
20121  -q, --quiet, --silent
20122                   do not print progress messages
20123  -d, --debug      don't remove temporary files
20124      --recheck    update $as_me by reconfiguring in the same conditions
20125      --file=FILE[:TEMPLATE]
20126                   instantiate the configuration file FILE
20127      --header=FILE[:TEMPLATE]
20128                   instantiate the configuration header FILE
20129
20130Configuration files:
20131$config_files
20132
20133Configuration headers:
20134$config_headers
20135
20136Configuration links:
20137$config_links
20138
20139Configuration commands:
20140$config_commands
20141
20142Report bugs to <pgsql-bugs@lists.postgresql.org>.
20143PostgreSQL home page: <https://www.postgresql.org/>."
20144
20145_ACEOF
20146cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20147ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
20148ac_cs_version="\\
20149PostgreSQL config.status 14.1
20150configured by $0, generated by GNU Autoconf 2.69,
20151  with options \\"\$ac_cs_config\\"
20152
20153Copyright (C) 2012 Free Software Foundation, Inc.
20154This config.status script is free software; the Free Software Foundation
20155gives unlimited permission to copy, distribute and modify it."
20156
20157ac_pwd='$ac_pwd'
20158srcdir='$srcdir'
20159INSTALL='$INSTALL'
20160MKDIR_P='$MKDIR_P'
20161AWK='$AWK'
20162test -n "\$AWK" || AWK=awk
20163_ACEOF
20164
20165cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20166# The default lists apply if the user does not specify any file.
20167ac_need_defaults=:
20168while test $# != 0
20169do
20170  case $1 in
20171  --*=?*)
20172    ac_option=`expr "X$1" : 'X\([^=]*\)='`
20173    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20174    ac_shift=:
20175    ;;
20176  --*=)
20177    ac_option=`expr "X$1" : 'X\([^=]*\)='`
20178    ac_optarg=
20179    ac_shift=:
20180    ;;
20181  *)
20182    ac_option=$1
20183    ac_optarg=$2
20184    ac_shift=shift
20185    ;;
20186  esac
20187
20188  case $ac_option in
20189  # Handling of the options.
20190  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20191    ac_cs_recheck=: ;;
20192  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20193    $as_echo "$ac_cs_version"; exit ;;
20194  --config | --confi | --conf | --con | --co | --c )
20195    $as_echo "$ac_cs_config"; exit ;;
20196  --debug | --debu | --deb | --de | --d | -d )
20197    debug=: ;;
20198  --file | --fil | --fi | --f )
20199    $ac_shift
20200    case $ac_optarg in
20201    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20202    '') as_fn_error $? "missing file argument" ;;
20203    esac
20204    as_fn_append CONFIG_FILES " '$ac_optarg'"
20205    ac_need_defaults=false;;
20206  --header | --heade | --head | --hea )
20207    $ac_shift
20208    case $ac_optarg in
20209    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20210    esac
20211    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
20212    ac_need_defaults=false;;
20213  --he | --h)
20214    # Conflict between --help and --header
20215    as_fn_error $? "ambiguous option: \`$1'
20216Try \`$0 --help' for more information.";;
20217  --help | --hel | -h )
20218    $as_echo "$ac_cs_usage"; exit ;;
20219  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20220  | -silent | --silent | --silen | --sile | --sil | --si | --s)
20221    ac_cs_silent=: ;;
20222
20223  # This is an error.
20224  -*) as_fn_error $? "unrecognized option: \`$1'
20225Try \`$0 --help' for more information." ;;
20226
20227  *) as_fn_append ac_config_targets " $1"
20228     ac_need_defaults=false ;;
20229
20230  esac
20231  shift
20232done
20233
20234ac_configure_extra_args=
20235
20236if $ac_cs_silent; then
20237  exec 6>/dev/null
20238  ac_configure_extra_args="$ac_configure_extra_args --silent"
20239fi
20240
20241_ACEOF
20242cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20243if \$ac_cs_recheck; then
20244  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20245  shift
20246  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20247  CONFIG_SHELL='$SHELL'
20248  export CONFIG_SHELL
20249  exec "\$@"
20250fi
20251
20252_ACEOF
20253cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20254exec 5>>config.log
20255{
20256  echo
20257  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20258## Running $as_me. ##
20259_ASBOX
20260  $as_echo "$ac_log"
20261} >&5
20262
20263_ACEOF
20264cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20265_ACEOF
20266
20267cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20268
20269# Handling of arguments.
20270for ac_config_target in $ac_config_targets
20271do
20272  case $ac_config_target in
20273    "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
20274    "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
20275    "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
20276    "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
20277    "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
20278    "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
20279    "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
20280    "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
20281    "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
20282    "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
20283    "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
20284
20285  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20286  esac
20287done
20288
20289
20290# If the user did not use the arguments to specify the items to instantiate,
20291# then the envvar interface is used.  Set only those that are not.
20292# We use the long form for the default assignment because of an extremely
20293# bizarre bug on SunOS 4.1.3.
20294if $ac_need_defaults; then
20295  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20296  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20297  test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20298  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20299fi
20300
20301# Have a temporary directory for convenience.  Make it in the build tree
20302# simply because there is no reason against having it here, and in addition,
20303# creating and moving files from /tmp can sometimes cause problems.
20304# Hook for its removal unless debugging.
20305# Note that there is a small window in which the directory will not be cleaned:
20306# after its creation but before its name has been assigned to `$tmp'.
20307$debug ||
20308{
20309  tmp= ac_tmp=
20310  trap 'exit_status=$?
20311  : "${ac_tmp:=$tmp}"
20312  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20313' 0
20314  trap 'as_fn_exit 1' 1 2 13 15
20315}
20316# Create a (secure) tmp directory for tmp files.
20317
20318{
20319  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20320  test -d "$tmp"
20321}  ||
20322{
20323  tmp=./conf$$-$RANDOM
20324  (umask 077 && mkdir "$tmp")
20325} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20326ac_tmp=$tmp
20327
20328# Set up the scripts for CONFIG_FILES section.
20329# No need to generate them if there are no CONFIG_FILES.
20330# This happens for instance with `./config.status config.h'.
20331if test -n "$CONFIG_FILES"; then
20332
20333
20334ac_cr=`echo X | tr X '\015'`
20335# On cygwin, bash can eat \r inside `` if the user requested igncr.
20336# But we know of no other shell where ac_cr would be empty at this
20337# point, so we can use a bashism as a fallback.
20338if test "x$ac_cr" = x; then
20339  eval ac_cr=\$\'\\r\'
20340fi
20341ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20342if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20343  ac_cs_awk_cr='\\r'
20344else
20345  ac_cs_awk_cr=$ac_cr
20346fi
20347
20348echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20349_ACEOF
20350
20351
20352{
20353  echo "cat >conf$$subs.awk <<_ACEOF" &&
20354  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20355  echo "_ACEOF"
20356} >conf$$subs.sh ||
20357  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20358ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20359ac_delim='%!_!# '
20360for ac_last_try in false false false false false :; do
20361  . ./conf$$subs.sh ||
20362    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20363
20364  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20365  if test $ac_delim_n = $ac_delim_num; then
20366    break
20367  elif $ac_last_try; then
20368    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20369  else
20370    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20371  fi
20372done
20373rm -f conf$$subs.sh
20374
20375cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20376cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20377_ACEOF
20378sed -n '
20379h
20380s/^/S["/; s/!.*/"]=/
20381p
20382g
20383s/^[^!]*!//
20384:repl
20385t repl
20386s/'"$ac_delim"'$//
20387t delim
20388:nl
20389h
20390s/\(.\{148\}\)..*/\1/
20391t more1
20392s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20393p
20394n
20395b repl
20396:more1
20397s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20398p
20399g
20400s/.\{148\}//
20401t nl
20402:delim
20403h
20404s/\(.\{148\}\)..*/\1/
20405t more2
20406s/["\\]/\\&/g; s/^/"/; s/$/"/
20407p
20408b
20409:more2
20410s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20411p
20412g
20413s/.\{148\}//
20414t delim
20415' <conf$$subs.awk | sed '
20416/^[^""]/{
20417  N
20418  s/\n//
20419}
20420' >>$CONFIG_STATUS || ac_write_fail=1
20421rm -f conf$$subs.awk
20422cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20423_ACAWK
20424cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20425  for (key in S) S_is_set[key] = 1
20426  FS = ""
20427
20428}
20429{
20430  line = $ 0
20431  nfields = split(line, field, "@")
20432  substed = 0
20433  len = length(field[1])
20434  for (i = 2; i < nfields; i++) {
20435    key = field[i]
20436    keylen = length(key)
20437    if (S_is_set[key]) {
20438      value = S[key]
20439      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20440      len += length(value) + length(field[++i])
20441      substed = 1
20442    } else
20443      len += 1 + keylen
20444  }
20445
20446  print line
20447}
20448
20449_ACAWK
20450_ACEOF
20451cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20452if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20453  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20454else
20455  cat
20456fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20457  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20458_ACEOF
20459
20460# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20461# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20462# trailing colons and then remove the whole line if VPATH becomes empty
20463# (actually we leave an empty line to preserve line numbers).
20464if test "x$srcdir" = x.; then
20465  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
20466h
20467s///
20468s/^/:/
20469s/[	 ]*$/:/
20470s/:\$(srcdir):/:/g
20471s/:\${srcdir}:/:/g
20472s/:@srcdir@:/:/g
20473s/^:*//
20474s/:*$//
20475x
20476s/\(=[	 ]*\).*/\1/
20477G
20478s/\n//
20479s/^[^=]*=[	 ]*$//
20480}'
20481fi
20482
20483cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20484fi # test -n "$CONFIG_FILES"
20485
20486# Set up the scripts for CONFIG_HEADERS section.
20487# No need to generate them if there are no CONFIG_HEADERS.
20488# This happens for instance with `./config.status Makefile'.
20489if test -n "$CONFIG_HEADERS"; then
20490cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20491BEGIN {
20492_ACEOF
20493
20494# Transform confdefs.h into an awk script `defines.awk', embedded as
20495# here-document in config.status, that substitutes the proper values into
20496# config.h.in to produce config.h.
20497
20498# Create a delimiter string that does not exist in confdefs.h, to ease
20499# handling of long lines.
20500ac_delim='%!_!# '
20501for ac_last_try in false false :; do
20502  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20503  if test -z "$ac_tt"; then
20504    break
20505  elif $ac_last_try; then
20506    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20507  else
20508    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20509  fi
20510done
20511
20512# For the awk script, D is an array of macro values keyed by name,
20513# likewise P contains macro parameters if any.  Preserve backslash
20514# newline sequences.
20515
20516ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20517sed -n '
20518s/.\{148\}/&'"$ac_delim"'/g
20519t rset
20520:rset
20521s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
20522t def
20523d
20524:def
20525s/\\$//
20526t bsnl
20527s/["\\]/\\&/g
20528s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
20529D["\1"]=" \3"/p
20530s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
20531d
20532:bsnl
20533s/["\\]/\\&/g
20534s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
20535D["\1"]=" \3\\\\\\n"\\/p
20536t cont
20537s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20538t cont
20539d
20540:cont
20541n
20542s/.\{148\}/&'"$ac_delim"'/g
20543t clear
20544:clear
20545s/\\$//
20546t bsnlc
20547s/["\\]/\\&/g; s/^/"/; s/$/"/p
20548d
20549:bsnlc
20550s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20551b cont
20552' <confdefs.h | sed '
20553s/'"$ac_delim"'/"\\\
20554"/g' >>$CONFIG_STATUS || ac_write_fail=1
20555
20556cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20557  for (key in D) D_is_set[key] = 1
20558  FS = ""
20559}
20560/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20561  line = \$ 0
20562  split(line, arg, " ")
20563  if (arg[1] == "#") {
20564    defundef = arg[2]
20565    mac1 = arg[3]
20566  } else {
20567    defundef = substr(arg[1], 2)
20568    mac1 = arg[2]
20569  }
20570  split(mac1, mac2, "(") #)
20571  macro = mac2[1]
20572  prefix = substr(line, 1, index(line, defundef) - 1)
20573  if (D_is_set[macro]) {
20574    # Preserve the white space surrounding the "#".
20575    print prefix "define", macro P[macro] D[macro]
20576    next
20577  } else {
20578    # Replace #undef with comments.  This is necessary, for example,
20579    # in the case of _POSIX_SOURCE, which is predefined and required
20580    # on some systems where configure will not decide to define it.
20581    if (defundef == "undef") {
20582      print "/*", prefix defundef, macro, "*/"
20583      next
20584    }
20585  }
20586}
20587{ print }
20588_ACAWK
20589_ACEOF
20590cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20591  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20592fi # test -n "$CONFIG_HEADERS"
20593
20594
20595eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
20596shift
20597for ac_tag
20598do
20599  case $ac_tag in
20600  :[FHLC]) ac_mode=$ac_tag; continue;;
20601  esac
20602  case $ac_mode$ac_tag in
20603  :[FHL]*:*);;
20604  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20605  :[FH]-) ac_tag=-:-;;
20606  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20607  esac
20608  ac_save_IFS=$IFS
20609  IFS=:
20610  set x $ac_tag
20611  IFS=$ac_save_IFS
20612  shift
20613  ac_file=$1
20614  shift
20615
20616  case $ac_mode in
20617  :L) ac_source=$1;;
20618  :[FH])
20619    ac_file_inputs=
20620    for ac_f
20621    do
20622      case $ac_f in
20623      -) ac_f="$ac_tmp/stdin";;
20624      *) # Look for the file first in the build tree, then in the source tree
20625	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
20626	 # because $ac_f cannot contain `:'.
20627	 test -f "$ac_f" ||
20628	   case $ac_f in
20629	   [\\/$]*) false;;
20630	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20631	   esac ||
20632	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20633      esac
20634      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20635      as_fn_append ac_file_inputs " '$ac_f'"
20636    done
20637
20638    # Let's still pretend it is `configure' which instantiates (i.e., don't
20639    # use $as_me), people would be surprised to read:
20640    #    /* config.h.  Generated by config.status.  */
20641    configure_input='Generated from '`
20642	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20643	`' by configure.'
20644    if test x"$ac_file" != x-; then
20645      configure_input="$ac_file.  $configure_input"
20646      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20647$as_echo "$as_me: creating $ac_file" >&6;}
20648    fi
20649    # Neutralize special characters interpreted by sed in replacement strings.
20650    case $configure_input in #(
20651    *\&* | *\|* | *\\* )
20652       ac_sed_conf_input=`$as_echo "$configure_input" |
20653       sed 's/[\\\\&|]/\\\\&/g'`;; #(
20654    *) ac_sed_conf_input=$configure_input;;
20655    esac
20656
20657    case $ac_tag in
20658    *:-:* | *:-) cat >"$ac_tmp/stdin" \
20659      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20660    esac
20661    ;;
20662  esac
20663
20664  ac_dir=`$as_dirname -- "$ac_file" ||
20665$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20666	 X"$ac_file" : 'X\(//\)[^/]' \| \
20667	 X"$ac_file" : 'X\(//\)$' \| \
20668	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20669$as_echo X"$ac_file" |
20670    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20671	    s//\1/
20672	    q
20673	  }
20674	  /^X\(\/\/\)[^/].*/{
20675	    s//\1/
20676	    q
20677	  }
20678	  /^X\(\/\/\)$/{
20679	    s//\1/
20680	    q
20681	  }
20682	  /^X\(\/\).*/{
20683	    s//\1/
20684	    q
20685	  }
20686	  s/.*/./; q'`
20687  as_dir="$ac_dir"; as_fn_mkdir_p
20688  ac_builddir=.
20689
20690case "$ac_dir" in
20691.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20692*)
20693  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20694  # A ".." for each directory in $ac_dir_suffix.
20695  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20696  case $ac_top_builddir_sub in
20697  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20698  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20699  esac ;;
20700esac
20701ac_abs_top_builddir=$ac_pwd
20702ac_abs_builddir=$ac_pwd$ac_dir_suffix
20703# for backward compatibility:
20704ac_top_builddir=$ac_top_build_prefix
20705
20706case $srcdir in
20707  .)  # We are building in place.
20708    ac_srcdir=.
20709    ac_top_srcdir=$ac_top_builddir_sub
20710    ac_abs_top_srcdir=$ac_pwd ;;
20711  [\\/]* | ?:[\\/]* )  # Absolute name.
20712    ac_srcdir=$srcdir$ac_dir_suffix;
20713    ac_top_srcdir=$srcdir
20714    ac_abs_top_srcdir=$srcdir ;;
20715  *) # Relative name.
20716    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20717    ac_top_srcdir=$ac_top_build_prefix$srcdir
20718    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20719esac
20720ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20721
20722
20723  case $ac_mode in
20724  :F)
20725  #
20726  # CONFIG_FILE
20727  #
20728
20729  case $INSTALL in
20730  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20731  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20732  esac
20733  ac_MKDIR_P=$MKDIR_P
20734  case $MKDIR_P in
20735  [\\/$]* | ?:[\\/]* ) ;;
20736  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20737  esac
20738_ACEOF
20739
20740cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20741# If the template does not know about datarootdir, expand it.
20742# FIXME: This hack should be removed a few years after 2.60.
20743ac_datarootdir_hack=; ac_datarootdir_seen=
20744ac_sed_dataroot='
20745/datarootdir/ {
20746  p
20747  q
20748}
20749/@datadir@/p
20750/@docdir@/p
20751/@infodir@/p
20752/@localedir@/p
20753/@mandir@/p'
20754case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20755*datarootdir*) ac_datarootdir_seen=yes;;
20756*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20757  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20758$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20759_ACEOF
20760cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20761  ac_datarootdir_hack='
20762  s&@datadir@&$datadir&g
20763  s&@docdir@&$docdir&g
20764  s&@infodir@&$infodir&g
20765  s&@localedir@&$localedir&g
20766  s&@mandir@&$mandir&g
20767  s&\\\${datarootdir}&$datarootdir&g' ;;
20768esac
20769_ACEOF
20770
20771# Neutralize VPATH when `$srcdir' = `.'.
20772# Shell code in configure.ac might set extrasub.
20773# FIXME: do we really want to maintain this feature?
20774cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20775ac_sed_extra="$ac_vpsub
20776$extrasub
20777_ACEOF
20778cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20779:t
20780/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20781s|@configure_input@|$ac_sed_conf_input|;t t
20782s&@top_builddir@&$ac_top_builddir_sub&;t t
20783s&@top_build_prefix@&$ac_top_build_prefix&;t t
20784s&@srcdir@&$ac_srcdir&;t t
20785s&@abs_srcdir@&$ac_abs_srcdir&;t t
20786s&@top_srcdir@&$ac_top_srcdir&;t t
20787s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20788s&@builddir@&$ac_builddir&;t t
20789s&@abs_builddir@&$ac_abs_builddir&;t t
20790s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20791s&@INSTALL@&$ac_INSTALL&;t t
20792s&@MKDIR_P@&$ac_MKDIR_P&;t t
20793$ac_datarootdir_hack
20794"
20795eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20796  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20797
20798test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20799  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20800  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
20801      "$ac_tmp/out"`; test -z "$ac_out"; } &&
20802  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20803which seems to be undefined.  Please make sure it is defined" >&5
20804$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20805which seems to be undefined.  Please make sure it is defined" >&2;}
20806
20807  rm -f "$ac_tmp/stdin"
20808  case $ac_file in
20809  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20810  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20811  esac \
20812  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20813 ;;
20814  :H)
20815  #
20816  # CONFIG_HEADER
20817  #
20818  if test x"$ac_file" != x-; then
20819    {
20820      $as_echo "/* $configure_input  */" \
20821      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20822    } >"$ac_tmp/config.h" \
20823      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20824    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20825      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20826$as_echo "$as_me: $ac_file is unchanged" >&6;}
20827    else
20828      rm -f "$ac_file"
20829      mv "$ac_tmp/config.h" "$ac_file" \
20830	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
20831    fi
20832  else
20833    $as_echo "/* $configure_input  */" \
20834      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20835      || as_fn_error $? "could not create -" "$LINENO" 5
20836  fi
20837 ;;
20838  :L)
20839  #
20840  # CONFIG_LINK
20841  #
20842
20843  if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20844    :
20845  else
20846    # Prefer the file from the source tree if names are identical.
20847    if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20848      ac_source=$srcdir/$ac_source
20849    fi
20850
20851    { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20852$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20853
20854    if test ! -r "$ac_source"; then
20855      as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20856    fi
20857    rm -f "$ac_file"
20858
20859    # Try a relative symlink, then a hard link, then a copy.
20860    case $ac_source in
20861    [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20862	*) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20863    esac
20864    ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20865      ln "$ac_source" "$ac_file" 2>/dev/null ||
20866      cp -p "$ac_source" "$ac_file" ||
20867      as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20868  fi
20869 ;;
20870  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20871$as_echo "$as_me: executing $ac_file commands" >&6;}
20872 ;;
20873  esac
20874
20875
20876  case $ac_file$ac_mode in
20877    "check_win32_symlinks":C)
20878# Links sometimes fail undetected on Mingw -
20879# so here we detect it and warn the user
20880for FILE in $CONFIG_LINKS
20881 do
20882	# test -e works for symlinks in the MinGW console
20883	test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20884$as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20885 done
20886 ;;
20887    "src/include/pg_config.h":H)
20888# Update timestamp for pg_config.h (see Makefile.global)
20889echo >src/include/stamp-h
20890 ;;
20891    "src/include/pg_config_ext.h":H)
20892# Update timestamp for pg_config_ext.h (see Makefile.global)
20893echo >src/include/stamp-ext-h
20894 ;;
20895    "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20896
20897  esac
20898done # for ac_tag
20899
20900
20901as_fn_exit 0
20902_ACEOF
20903ac_clean_files=$ac_clean_files_save
20904
20905test $ac_write_fail = 0 ||
20906  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20907
20908
20909# configure is writing to config.log, and then calls config.status.
20910# config.status does its own redirection, appending to config.log.
20911# Unfortunately, on DOS this fails, as config.log is still kept open
20912# by configure, so config.status won't be able to write to it; its
20913# output is simply discarded.  So we exec the FD to /dev/null,
20914# effectively closing config.log, so it can be properly (re)opened and
20915# appended to by config.status.  When coming back to configure, we
20916# need to make the FD available again.
20917if test "$no_create" != yes; then
20918  ac_cs_success=:
20919  ac_config_status_args=
20920  test "$silent" = yes &&
20921    ac_config_status_args="$ac_config_status_args --quiet"
20922  exec 5>/dev/null
20923  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20924  exec 5>>config.log
20925  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20926  # would make configure fail if this is the last instruction.
20927  $ac_cs_success || as_fn_exit 1
20928fi
20929if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20930  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20931$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20932fi
20933
20934