1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for PostgreSQL 12.9.
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-2019, 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='12.9'
586PACKAGE_STRING='PostgreSQL 12.9'
587PACKAGE_BUGREPORT='pgsql-bugs@lists.postgresql.org'
588PACKAGE_URL=''
589
590ac_unique_file="src/backend/access/common/heaptuple.c"
591ac_default_prefix=/usr/local/pgsql
592# Factoring default headers for most tests.
593ac_includes_default="\
594#include <stdio.h>
595#ifdef HAVE_SYS_TYPES_H
596# include <sys/types.h>
597#endif
598#ifdef HAVE_SYS_STAT_H
599# include <sys/stat.h>
600#endif
601#ifdef STDC_HEADERS
602# include <stdlib.h>
603# include <stddef.h>
604#else
605# ifdef HAVE_STDLIB_H
606#  include <stdlib.h>
607# endif
608#endif
609#ifdef HAVE_STRING_H
610# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
611#  include <memory.h>
612# endif
613# include <string.h>
614#endif
615#ifdef HAVE_STRINGS_H
616# include <strings.h>
617#endif
618#ifdef HAVE_INTTYPES_H
619# include <inttypes.h>
620#endif
621#ifdef HAVE_STDINT_H
622# include <stdint.h>
623#endif
624#ifdef HAVE_UNISTD_H
625# include <unistd.h>
626#endif"
627
628ac_subst_vars='LTLIBOBJS
629vpath_build
630PG_SYSROOT
631PG_VERSION_NUM
632PROVE
633DBTOEPUB
634FOP
635XSLTPROC
636XMLLINT
637TCL_SHLIB_LD_LIBS
638TCL_SHARED_BUILD
639TCL_LIB_SPEC
640TCL_LIBS
641TCL_INCLUDE_SPEC
642TCL_CONFIG_SH
643TCLSH
644XGETTEXT
645MSGMERGE
646MSGFMT_FLAGS
647MSGFMT
648PG_CRC32C_OBJS
649CFLAGS_ARMV8_CRC32C
650CFLAGS_SSE42
651have_win32_dbghelp
652LIBOBJS
653UUID_LIBS
654LDAP_LIBS_BE
655LDAP_LIBS_FE
656PTHREAD_CFLAGS
657PTHREAD_LIBS
658PTHREAD_CC
659ax_pthread_config
660SED
661ZIC
662python_additional_libs
663python_libspec
664python_libdir
665python_includespec
666python_version
667python_majorversion
668PYTHON
669perl_embed_ldflags
670perl_embed_ccflags
671perl_includespec
672perl_useshrplib
673perl_privlibexp
674perl_archlibexp
675PERL
676FLEXFLAGS
677FLEX
678BISONFLAGS
679BISON
680MKDIR_P
681LN_S
682TAR
683install_bin
684INSTALL_DATA
685INSTALL_SCRIPT
686INSTALL_PROGRAM
687WINDRES
688DLLWRAP
689DLLTOOL
690AR
691STRIP_SHARED_LIB
692STRIP_STATIC_LIB
693STRIP
694RANLIB
695with_gnu_ld
696LD
697LDFLAGS_SL
698LDFLAGS_EX
699ELF_SYS
700EGREP
701GREP
702with_zlib
703with_system_tzdata
704with_libxslt
705XML2_LIBS
706XML2_CFLAGS
707XML2_CONFIG
708with_libxml
709UUID_EXTRA_OBJS
710with_uuid
711with_systemd
712with_selinux
713with_openssl
714with_ldap
715with_krb_srvnam
716krb_srvtab
717with_gssapi
718with_python
719with_perl
720with_tcl
721ICU_LIBS
722ICU_CFLAGS
723with_icu
724enable_thread_safety
725INCLUDES
726autodepend
727PKG_CONFIG_LIBDIR
728PKG_CONFIG_PATH
729PKG_CONFIG
730TAS
731GCC
732CPP
733CFLAGS_SL
734BITCODE_CXXFLAGS
735BITCODE_CFLAGS
736CFLAGS_VECTOR
737PERMIT_DECLARATION_AFTER_STATEMENT
738LLVM_BINPATH
739LLVM_CXXFLAGS
740LLVM_CFLAGS
741LLVM_CPPFLAGS
742LLVM_LIBS
743CLANG
744LLVM_CONFIG
745AWK
746with_llvm
747SUN_STUDIO_CC
748ac_ct_CXX
749CXXFLAGS
750CXX
751OBJEXT
752EXEEXT
753ac_ct_CC
754CPPFLAGS
755LDFLAGS
756CFLAGS
757CC
758enable_tap_tests
759enable_dtrace
760DTRACEFLAGS
761DTRACE
762enable_coverage
763GENHTML
764LCOV
765GCOV
766enable_debug
767enable_rpath
768default_port
769WANTED_LANGUAGES
770enable_nls
771PORTNAME
772host_os
773host_vendor
774host_cpu
775host
776build_os
777build_vendor
778build_cpu
779build
780PG_MAJORVERSION
781configure_args
782target_alias
783host_alias
784build_alias
785LIBS
786ECHO_T
787ECHO_N
788ECHO_C
789DEFS
790mandir
791localedir
792libdir
793psdir
794pdfdir
795dvidir
796htmldir
797infodir
798docdir
799oldincludedir
800includedir
801localstatedir
802sharedstatedir
803sysconfdir
804datadir
805datarootdir
806libexecdir
807sbindir
808bindir
809program_transform_name
810prefix
811exec_prefix
812PACKAGE_URL
813PACKAGE_BUGREPORT
814PACKAGE_STRING
815PACKAGE_VERSION
816PACKAGE_TARNAME
817PACKAGE_NAME
818PATH_SEPARATOR
819SHELL'
820ac_subst_files=''
821ac_user_opts='
822enable_option_checking
823with_extra_version
824with_template
825with_includes
826with_libraries
827with_libs
828enable_integer_datetimes
829enable_nls
830with_pgport
831enable_rpath
832enable_spinlocks
833enable_atomics
834enable_debug
835enable_profiling
836enable_coverage
837enable_dtrace
838enable_tap_tests
839with_blocksize
840with_segsize
841with_wal_blocksize
842with_CC
843with_llvm
844enable_depend
845enable_cassert
846enable_thread_safety
847with_icu
848with_tcl
849with_tclconfig
850with_perl
851with_python
852with_gssapi
853with_krb_srvnam
854with_pam
855with_bsd_auth
856with_ldap
857with_bonjour
858with_openssl
859with_selinux
860with_systemd
861with_readline
862with_libedit_preferred
863with_uuid
864with_ossp_uuid
865with_libxml
866with_libxslt
867with_system_tzdata
868with_zlib
869with_gnu_ld
870enable_largefile
871enable_float4_byval
872enable_float8_byval
873'
874      ac_precious_vars='build_alias
875host_alias
876target_alias
877CC
878CFLAGS
879LDFLAGS
880LIBS
881CPPFLAGS
882CXX
883CXXFLAGS
884CCC
885LLVM_CONFIG
886CLANG
887CPP
888PKG_CONFIG
889PKG_CONFIG_PATH
890PKG_CONFIG_LIBDIR
891ICU_CFLAGS
892ICU_LIBS
893XML2_CONFIG
894XML2_CFLAGS
895XML2_LIBS
896LDFLAGS_EX
897LDFLAGS_SL
898PERL
899PYTHON
900MSGFMT
901TCLSH'
902
903
904# Initialize some variables set by options.
905ac_init_help=
906ac_init_version=false
907ac_unrecognized_opts=
908ac_unrecognized_sep=
909# The variables have the same names as the options, with
910# dashes changed to underlines.
911cache_file=/dev/null
912exec_prefix=NONE
913no_create=
914no_recursion=
915prefix=NONE
916program_prefix=NONE
917program_suffix=NONE
918program_transform_name=s,x,x,
919silent=
920site=
921srcdir=
922verbose=
923x_includes=NONE
924x_libraries=NONE
925
926# Installation directory options.
927# These are left unexpanded so users can "make install exec_prefix=/foo"
928# and all the variables that are supposed to be based on exec_prefix
929# by default will actually change.
930# Use braces instead of parens because sh, perl, etc. also accept them.
931# (The list follows the same order as the GNU Coding Standards.)
932bindir='${exec_prefix}/bin'
933sbindir='${exec_prefix}/sbin'
934libexecdir='${exec_prefix}/libexec'
935datarootdir='${prefix}/share'
936datadir='${datarootdir}'
937sysconfdir='${prefix}/etc'
938sharedstatedir='${prefix}/com'
939localstatedir='${prefix}/var'
940includedir='${prefix}/include'
941oldincludedir='/usr/include'
942docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
943infodir='${datarootdir}/info'
944htmldir='${docdir}'
945dvidir='${docdir}'
946pdfdir='${docdir}'
947psdir='${docdir}'
948libdir='${exec_prefix}/lib'
949localedir='${datarootdir}/locale'
950mandir='${datarootdir}/man'
951
952ac_prev=
953ac_dashdash=
954for ac_option
955do
956  # If the previous option needs an argument, assign it.
957  if test -n "$ac_prev"; then
958    eval $ac_prev=\$ac_option
959    ac_prev=
960    continue
961  fi
962
963  case $ac_option in
964  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
965  *=)   ac_optarg= ;;
966  *)    ac_optarg=yes ;;
967  esac
968
969  # Accept the important Cygnus configure options, so we can diagnose typos.
970
971  case $ac_dashdash$ac_option in
972  --)
973    ac_dashdash=yes ;;
974
975  -bindir | --bindir | --bindi | --bind | --bin | --bi)
976    ac_prev=bindir ;;
977  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
978    bindir=$ac_optarg ;;
979
980  -build | --build | --buil | --bui | --bu)
981    ac_prev=build_alias ;;
982  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
983    build_alias=$ac_optarg ;;
984
985  -cache-file | --cache-file | --cache-fil | --cache-fi \
986  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
987    ac_prev=cache_file ;;
988  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
989  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
990    cache_file=$ac_optarg ;;
991
992  --config-cache | -C)
993    cache_file=config.cache ;;
994
995  -datadir | --datadir | --datadi | --datad)
996    ac_prev=datadir ;;
997  -datadir=* | --datadir=* | --datadi=* | --datad=*)
998    datadir=$ac_optarg ;;
999
1000  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1001  | --dataroo | --dataro | --datar)
1002    ac_prev=datarootdir ;;
1003  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1004  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1005    datarootdir=$ac_optarg ;;
1006
1007  -disable-* | --disable-*)
1008    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1009    # Reject names that are not valid shell variable names.
1010    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1011      as_fn_error $? "invalid feature name: $ac_useropt"
1012    ac_useropt_orig=$ac_useropt
1013    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1014    case $ac_user_opts in
1015      *"
1016"enable_$ac_useropt"
1017"*) ;;
1018      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1019	 ac_unrecognized_sep=', ';;
1020    esac
1021    eval enable_$ac_useropt=no ;;
1022
1023  -docdir | --docdir | --docdi | --doc | --do)
1024    ac_prev=docdir ;;
1025  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1026    docdir=$ac_optarg ;;
1027
1028  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1029    ac_prev=dvidir ;;
1030  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1031    dvidir=$ac_optarg ;;
1032
1033  -enable-* | --enable-*)
1034    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1035    # Reject names that are not valid shell variable names.
1036    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1037      as_fn_error $? "invalid feature name: $ac_useropt"
1038    ac_useropt_orig=$ac_useropt
1039    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1040    case $ac_user_opts in
1041      *"
1042"enable_$ac_useropt"
1043"*) ;;
1044      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1045	 ac_unrecognized_sep=', ';;
1046    esac
1047    eval enable_$ac_useropt=\$ac_optarg ;;
1048
1049  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1050  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1051  | --exec | --exe | --ex)
1052    ac_prev=exec_prefix ;;
1053  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1054  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1055  | --exec=* | --exe=* | --ex=*)
1056    exec_prefix=$ac_optarg ;;
1057
1058  -gas | --gas | --ga | --g)
1059    # Obsolete; use --with-gas.
1060    with_gas=yes ;;
1061
1062  -help | --help | --hel | --he | -h)
1063    ac_init_help=long ;;
1064  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1065    ac_init_help=recursive ;;
1066  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1067    ac_init_help=short ;;
1068
1069  -host | --host | --hos | --ho)
1070    ac_prev=host_alias ;;
1071  -host=* | --host=* | --hos=* | --ho=*)
1072    host_alias=$ac_optarg ;;
1073
1074  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1075    ac_prev=htmldir ;;
1076  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1077  | --ht=*)
1078    htmldir=$ac_optarg ;;
1079
1080  -includedir | --includedir | --includedi | --included | --include \
1081  | --includ | --inclu | --incl | --inc)
1082    ac_prev=includedir ;;
1083  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1084  | --includ=* | --inclu=* | --incl=* | --inc=*)
1085    includedir=$ac_optarg ;;
1086
1087  -infodir | --infodir | --infodi | --infod | --info | --inf)
1088    ac_prev=infodir ;;
1089  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1090    infodir=$ac_optarg ;;
1091
1092  -libdir | --libdir | --libdi | --libd)
1093    ac_prev=libdir ;;
1094  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1095    libdir=$ac_optarg ;;
1096
1097  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1098  | --libexe | --libex | --libe)
1099    ac_prev=libexecdir ;;
1100  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1101  | --libexe=* | --libex=* | --libe=*)
1102    libexecdir=$ac_optarg ;;
1103
1104  -localedir | --localedir | --localedi | --localed | --locale)
1105    ac_prev=localedir ;;
1106  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1107    localedir=$ac_optarg ;;
1108
1109  -localstatedir | --localstatedir | --localstatedi | --localstated \
1110  | --localstate | --localstat | --localsta | --localst | --locals)
1111    ac_prev=localstatedir ;;
1112  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1113  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1114    localstatedir=$ac_optarg ;;
1115
1116  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1117    ac_prev=mandir ;;
1118  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1119    mandir=$ac_optarg ;;
1120
1121  -nfp | --nfp | --nf)
1122    # Obsolete; use --without-fp.
1123    with_fp=no ;;
1124
1125  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1126  | --no-cr | --no-c | -n)
1127    no_create=yes ;;
1128
1129  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1130  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1131    no_recursion=yes ;;
1132
1133  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1134  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1135  | --oldin | --oldi | --old | --ol | --o)
1136    ac_prev=oldincludedir ;;
1137  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1138  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1139  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1140    oldincludedir=$ac_optarg ;;
1141
1142  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1143    ac_prev=prefix ;;
1144  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1145    prefix=$ac_optarg ;;
1146
1147  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1148  | --program-pre | --program-pr | --program-p)
1149    ac_prev=program_prefix ;;
1150  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1151  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1152    program_prefix=$ac_optarg ;;
1153
1154  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1155  | --program-suf | --program-su | --program-s)
1156    ac_prev=program_suffix ;;
1157  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1158  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1159    program_suffix=$ac_optarg ;;
1160
1161  -program-transform-name | --program-transform-name \
1162  | --program-transform-nam | --program-transform-na \
1163  | --program-transform-n | --program-transform- \
1164  | --program-transform | --program-transfor \
1165  | --program-transfo | --program-transf \
1166  | --program-trans | --program-tran \
1167  | --progr-tra | --program-tr | --program-t)
1168    ac_prev=program_transform_name ;;
1169  -program-transform-name=* | --program-transform-name=* \
1170  | --program-transform-nam=* | --program-transform-na=* \
1171  | --program-transform-n=* | --program-transform-=* \
1172  | --program-transform=* | --program-transfor=* \
1173  | --program-transfo=* | --program-transf=* \
1174  | --program-trans=* | --program-tran=* \
1175  | --progr-tra=* | --program-tr=* | --program-t=*)
1176    program_transform_name=$ac_optarg ;;
1177
1178  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1179    ac_prev=pdfdir ;;
1180  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1181    pdfdir=$ac_optarg ;;
1182
1183  -psdir | --psdir | --psdi | --psd | --ps)
1184    ac_prev=psdir ;;
1185  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1186    psdir=$ac_optarg ;;
1187
1188  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1189  | -silent | --silent | --silen | --sile | --sil)
1190    silent=yes ;;
1191
1192  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1193    ac_prev=sbindir ;;
1194  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1195  | --sbi=* | --sb=*)
1196    sbindir=$ac_optarg ;;
1197
1198  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1199  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1200  | --sharedst | --shareds | --shared | --share | --shar \
1201  | --sha | --sh)
1202    ac_prev=sharedstatedir ;;
1203  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1204  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1205  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1206  | --sha=* | --sh=*)
1207    sharedstatedir=$ac_optarg ;;
1208
1209  -site | --site | --sit)
1210    ac_prev=site ;;
1211  -site=* | --site=* | --sit=*)
1212    site=$ac_optarg ;;
1213
1214  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1215    ac_prev=srcdir ;;
1216  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1217    srcdir=$ac_optarg ;;
1218
1219  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1220  | --syscon | --sysco | --sysc | --sys | --sy)
1221    ac_prev=sysconfdir ;;
1222  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1223  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1224    sysconfdir=$ac_optarg ;;
1225
1226  -target | --target | --targe | --targ | --tar | --ta | --t)
1227    ac_prev=target_alias ;;
1228  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1229    target_alias=$ac_optarg ;;
1230
1231  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1232    verbose=yes ;;
1233
1234  -version | --version | --versio | --versi | --vers | -V)
1235    ac_init_version=: ;;
1236
1237  -with-* | --with-*)
1238    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1239    # Reject names that are not valid shell variable names.
1240    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1241      as_fn_error $? "invalid package name: $ac_useropt"
1242    ac_useropt_orig=$ac_useropt
1243    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1244    case $ac_user_opts in
1245      *"
1246"with_$ac_useropt"
1247"*) ;;
1248      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1249	 ac_unrecognized_sep=', ';;
1250    esac
1251    eval with_$ac_useropt=\$ac_optarg ;;
1252
1253  -without-* | --without-*)
1254    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1255    # Reject names that are not valid shell variable names.
1256    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1257      as_fn_error $? "invalid package name: $ac_useropt"
1258    ac_useropt_orig=$ac_useropt
1259    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1260    case $ac_user_opts in
1261      *"
1262"with_$ac_useropt"
1263"*) ;;
1264      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1265	 ac_unrecognized_sep=', ';;
1266    esac
1267    eval with_$ac_useropt=no ;;
1268
1269  --x)
1270    # Obsolete; use --with-x.
1271    with_x=yes ;;
1272
1273  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1274  | --x-incl | --x-inc | --x-in | --x-i)
1275    ac_prev=x_includes ;;
1276  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1277  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1278    x_includes=$ac_optarg ;;
1279
1280  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1281  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1282    ac_prev=x_libraries ;;
1283  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1284  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1285    x_libraries=$ac_optarg ;;
1286
1287  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1288Try \`$0 --help' for more information"
1289    ;;
1290
1291  *=*)
1292    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1293    # Reject names that are not valid shell variable names.
1294    case $ac_envvar in #(
1295      '' | [0-9]* | *[!_$as_cr_alnum]* )
1296      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1297    esac
1298    eval $ac_envvar=\$ac_optarg
1299    export $ac_envvar ;;
1300
1301  *)
1302    # FIXME: should be removed in autoconf 3.0.
1303    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1304    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1305      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1306    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1307    ;;
1308
1309  esac
1310done
1311
1312if test -n "$ac_prev"; then
1313  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1314  as_fn_error $? "missing argument to $ac_option"
1315fi
1316
1317if test -n "$ac_unrecognized_opts"; then
1318  case $enable_option_checking in
1319    no) ;;
1320    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1321    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1322  esac
1323fi
1324
1325# Check all directory arguments for consistency.
1326for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1327		datadir sysconfdir sharedstatedir localstatedir includedir \
1328		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1329		libdir localedir mandir
1330do
1331  eval ac_val=\$$ac_var
1332  # Remove trailing slashes.
1333  case $ac_val in
1334    */ )
1335      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1336      eval $ac_var=\$ac_val;;
1337  esac
1338  # Be sure to have absolute directory names.
1339  case $ac_val in
1340    [\\/$]* | ?:[\\/]* )  continue;;
1341    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1342  esac
1343  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1344done
1345
1346# There might be people who depend on the old broken behavior: `$host'
1347# used to hold the argument of --host etc.
1348# FIXME: To remove some day.
1349build=$build_alias
1350host=$host_alias
1351target=$target_alias
1352
1353# FIXME: To remove some day.
1354if test "x$host_alias" != x; then
1355  if test "x$build_alias" = x; then
1356    cross_compiling=maybe
1357  elif test "x$build_alias" != "x$host_alias"; then
1358    cross_compiling=yes
1359  fi
1360fi
1361
1362ac_tool_prefix=
1363test -n "$host_alias" && ac_tool_prefix=$host_alias-
1364
1365test "$silent" = yes && exec 6>/dev/null
1366
1367
1368ac_pwd=`pwd` && test -n "$ac_pwd" &&
1369ac_ls_di=`ls -di .` &&
1370ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1371  as_fn_error $? "working directory cannot be determined"
1372test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1373  as_fn_error $? "pwd does not report name of working directory"
1374
1375
1376# Find the source files, if location was not specified.
1377if test -z "$srcdir"; then
1378  ac_srcdir_defaulted=yes
1379  # Try the directory containing this script, then the parent directory.
1380  ac_confdir=`$as_dirname -- "$as_myself" ||
1381$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1382	 X"$as_myself" : 'X\(//\)[^/]' \| \
1383	 X"$as_myself" : 'X\(//\)$' \| \
1384	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1385$as_echo X"$as_myself" |
1386    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1387	    s//\1/
1388	    q
1389	  }
1390	  /^X\(\/\/\)[^/].*/{
1391	    s//\1/
1392	    q
1393	  }
1394	  /^X\(\/\/\)$/{
1395	    s//\1/
1396	    q
1397	  }
1398	  /^X\(\/\).*/{
1399	    s//\1/
1400	    q
1401	  }
1402	  s/.*/./; q'`
1403  srcdir=$ac_confdir
1404  if test ! -r "$srcdir/$ac_unique_file"; then
1405    srcdir=..
1406  fi
1407else
1408  ac_srcdir_defaulted=no
1409fi
1410if test ! -r "$srcdir/$ac_unique_file"; then
1411  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1412  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1413fi
1414ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1415ac_abs_confdir=`(
1416	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1417	pwd)`
1418# When building in place, set srcdir=.
1419if test "$ac_abs_confdir" = "$ac_pwd"; then
1420  srcdir=.
1421fi
1422# Remove unnecessary trailing slashes from srcdir.
1423# Double slashes in file names in object file debugging info
1424# mess up M-x gdb in Emacs.
1425case $srcdir in
1426*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1427esac
1428for ac_var in $ac_precious_vars; do
1429  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1430  eval ac_env_${ac_var}_value=\$${ac_var}
1431  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1432  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1433done
1434
1435#
1436# Report the --help message.
1437#
1438if test "$ac_init_help" = "long"; then
1439  # Omit some internal or obsolete options to make the list less imposing.
1440  # This message is too long to be a string in the A/UX 3.1 sh.
1441  cat <<_ACEOF
1442\`configure' configures PostgreSQL 12.9 to adapt to many kinds of systems.
1443
1444Usage: $0 [OPTION]... [VAR=VALUE]...
1445
1446To assign environment variables (e.g., CC, CFLAGS...), specify them as
1447VAR=VALUE.  See below for descriptions of some of the useful variables.
1448
1449Defaults for the options are specified in brackets.
1450
1451Configuration:
1452  -h, --help              display this help and exit
1453      --help=short        display options specific to this package
1454      --help=recursive    display the short help of all the included packages
1455  -V, --version           display version information and exit
1456  -q, --quiet, --silent   do not print \`checking ...' messages
1457      --cache-file=FILE   cache test results in FILE [disabled]
1458  -C, --config-cache      alias for \`--cache-file=config.cache'
1459  -n, --no-create         do not create output files
1460      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1461
1462Installation directories:
1463  --prefix=PREFIX         install architecture-independent files in PREFIX
1464                          [$ac_default_prefix]
1465  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1466                          [PREFIX]
1467
1468By default, \`make install' will install all the files in
1469\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1470an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1471for instance \`--prefix=\$HOME'.
1472
1473For better control, use the options below.
1474
1475Fine tuning of the installation directories:
1476  --bindir=DIR            user executables [EPREFIX/bin]
1477  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1478  --libexecdir=DIR        program executables [EPREFIX/libexec]
1479  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1480  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1481  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1482  --libdir=DIR            object code libraries [EPREFIX/lib]
1483  --includedir=DIR        C header files [PREFIX/include]
1484  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1485  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1486  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1487  --infodir=DIR           info documentation [DATAROOTDIR/info]
1488  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1489  --mandir=DIR            man documentation [DATAROOTDIR/man]
1490  --docdir=DIR            documentation root [DATAROOTDIR/doc/postgresql]
1491  --htmldir=DIR           html documentation [DOCDIR]
1492  --dvidir=DIR            dvi documentation [DOCDIR]
1493  --pdfdir=DIR            pdf documentation [DOCDIR]
1494  --psdir=DIR             ps documentation [DOCDIR]
1495_ACEOF
1496
1497  cat <<\_ACEOF
1498
1499System types:
1500  --build=BUILD     configure for building on BUILD [guessed]
1501  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1502_ACEOF
1503fi
1504
1505if test -n "$ac_init_help"; then
1506  case $ac_init_help in
1507     short | recursive ) echo "Configuration of PostgreSQL 12.9:";;
1508   esac
1509  cat <<\_ACEOF
1510
1511Optional Features:
1512  --disable-option-checking  ignore unrecognized --enable/--with options
1513  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1514  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1515  --disable-integer-datetimes
1516                          obsolete option, no longer supported
1517  --enable-nls[=LANGUAGES]
1518                          enable Native Language Support
1519  --disable-rpath         do not embed shared library search path in
1520                          executables
1521  --disable-spinlocks     do not use spinlocks
1522  --disable-atomics       do not use atomic operations
1523  --enable-debug          build with debugging symbols (-g)
1524  --enable-profiling      build with profiling enabled
1525  --enable-coverage       build with coverage testing instrumentation
1526  --enable-dtrace         build with DTrace support
1527  --enable-tap-tests      enable TAP tests (requires Perl and IPC::Run)
1528  --enable-depend         turn on automatic dependency tracking
1529  --enable-cassert        enable assertion checks (for debugging)
1530  --disable-thread-safety disable thread-safety in client libraries
1531  --disable-largefile     omit support for large files
1532  --disable-float4-byval  disable float4 passed by value
1533  --disable-float8-byval  disable float8 passed by value
1534
1535Optional Packages:
1536  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1537  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1538  --with-extra-version=STRING
1539                          append STRING to version
1540  --with-template=NAME    override operating system template
1541  --with-includes=DIRS    look for additional header files in DIRS
1542  --with-libraries=DIRS   look for additional libraries in DIRS
1543  --with-libs=DIRS        alternative spelling of --with-libraries
1544  --with-pgport=PORTNUM   set default port number [5432]
1545  --with-blocksize=BLOCKSIZE
1546                          set table block size in kB [8]
1547  --with-segsize=SEGSIZE  set table segment size in GB [1]
1548  --with-wal-blocksize=BLOCKSIZE
1549                          set WAL block size in kB [8]
1550  --with-CC=CMD           set compiler (deprecated)
1551  --with-llvm             build with LLVM based JIT support
1552  --with-icu              build with ICU support
1553  --with-tcl              build Tcl modules (PL/Tcl)
1554  --with-tclconfig=DIR    tclConfig.sh is in DIR
1555  --with-perl             build Perl modules (PL/Perl)
1556  --with-python           build Python modules (PL/Python)
1557  --with-gssapi           build with GSSAPI support
1558  --with-krb-srvnam=NAME  default service principal name in Kerberos (GSSAPI)
1559                          [postgres]
1560  --with-pam              build with PAM support
1561  --with-bsd-auth         build with BSD Authentication support
1562  --with-ldap             build with LDAP support
1563  --with-bonjour          build with Bonjour support
1564  --with-openssl          build with OpenSSL support
1565  --with-selinux          build with SELinux support
1566  --with-systemd          build with systemd support
1567  --without-readline      do not use GNU Readline nor BSD Libedit for editing
1568  --with-libedit-preferred
1569                          prefer BSD Libedit over GNU Readline
1570  --with-uuid=LIB         build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1571  --with-ossp-uuid        obsolete spelling of --with-uuid=ossp
1572  --with-libxml           build with XML support
1573  --with-libxslt          use XSLT support when building contrib/xml2
1574  --with-system-tzdata=DIR
1575                          use system time zone data in DIR
1576  --without-zlib          do not use Zlib
1577  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1578
1579Some influential environment variables:
1580  CC          C compiler command
1581  CFLAGS      C compiler flags
1582  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1583              nonstandard directory <lib dir>
1584  LIBS        libraries to pass to the linker, e.g. -l<library>
1585  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1586              you have headers in a nonstandard directory <include dir>
1587  CXX         C++ compiler command
1588  CXXFLAGS    C++ compiler flags
1589  LLVM_CONFIG path to llvm-config command
1590  CLANG       path to clang compiler to generate bitcode
1591  CPP         C preprocessor
1592  PKG_CONFIG  path to pkg-config utility
1593  PKG_CONFIG_PATH
1594              directories to add to pkg-config's search path
1595  PKG_CONFIG_LIBDIR
1596              path overriding pkg-config's built-in search path
1597  ICU_CFLAGS  C compiler flags for ICU, overriding pkg-config
1598  ICU_LIBS    linker flags for ICU, overriding pkg-config
1599  XML2_CONFIG path to xml2-config utility
1600  XML2_CFLAGS C compiler flags for XML2, overriding pkg-config
1601  XML2_LIBS   linker flags for XML2, overriding pkg-config
1602  LDFLAGS_EX  extra linker flags for linking executables only
1603  LDFLAGS_SL  extra linker flags for linking shared libraries only
1604  PERL        Perl program
1605  PYTHON      Python program
1606  MSGFMT      msgfmt program for NLS
1607  TCLSH       Tcl interpreter program (tclsh)
1608
1609Use these variables to override the choices made by `configure' or to help
1610it to find libraries and programs with nonstandard names/locations.
1611
1612Report bugs to <pgsql-bugs@lists.postgresql.org>.
1613_ACEOF
1614ac_status=$?
1615fi
1616
1617if test "$ac_init_help" = "recursive"; then
1618  # If there are subdirs, report their specific --help.
1619  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1620    test -d "$ac_dir" ||
1621      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1622      continue
1623    ac_builddir=.
1624
1625case "$ac_dir" in
1626.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1627*)
1628  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1629  # A ".." for each directory in $ac_dir_suffix.
1630  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1631  case $ac_top_builddir_sub in
1632  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1633  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1634  esac ;;
1635esac
1636ac_abs_top_builddir=$ac_pwd
1637ac_abs_builddir=$ac_pwd$ac_dir_suffix
1638# for backward compatibility:
1639ac_top_builddir=$ac_top_build_prefix
1640
1641case $srcdir in
1642  .)  # We are building in place.
1643    ac_srcdir=.
1644    ac_top_srcdir=$ac_top_builddir_sub
1645    ac_abs_top_srcdir=$ac_pwd ;;
1646  [\\/]* | ?:[\\/]* )  # Absolute name.
1647    ac_srcdir=$srcdir$ac_dir_suffix;
1648    ac_top_srcdir=$srcdir
1649    ac_abs_top_srcdir=$srcdir ;;
1650  *) # Relative name.
1651    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1652    ac_top_srcdir=$ac_top_build_prefix$srcdir
1653    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1654esac
1655ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1656
1657    cd "$ac_dir" || { ac_status=$?; continue; }
1658    # Check for guested configure.
1659    if test -f "$ac_srcdir/configure.gnu"; then
1660      echo &&
1661      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1662    elif test -f "$ac_srcdir/configure"; then
1663      echo &&
1664      $SHELL "$ac_srcdir/configure" --help=recursive
1665    else
1666      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1667    fi || ac_status=$?
1668    cd "$ac_pwd" || { ac_status=$?; break; }
1669  done
1670fi
1671
1672test -n "$ac_init_help" && exit $ac_status
1673if $ac_init_version; then
1674  cat <<\_ACEOF
1675PostgreSQL configure 12.9
1676generated by GNU Autoconf 2.69
1677
1678Copyright (C) 2012 Free Software Foundation, Inc.
1679This configure script is free software; the Free Software Foundation
1680gives unlimited permission to copy, distribute and modify it.
1681
1682Copyright (c) 1996-2019, PostgreSQL Global Development Group
1683_ACEOF
1684  exit
1685fi
1686
1687## ------------------------ ##
1688## Autoconf initialization. ##
1689## ------------------------ ##
1690
1691# ac_fn_c_try_compile LINENO
1692# --------------------------
1693# Try to compile conftest.$ac_ext, and return whether this succeeded.
1694ac_fn_c_try_compile ()
1695{
1696  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1697  rm -f conftest.$ac_objext
1698  if { { ac_try="$ac_compile"
1699case "(($ac_try" in
1700  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1701  *) ac_try_echo=$ac_try;;
1702esac
1703eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1704$as_echo "$ac_try_echo"; } >&5
1705  (eval "$ac_compile") 2>conftest.err
1706  ac_status=$?
1707  if test -s conftest.err; then
1708    grep -v '^ *+' conftest.err >conftest.er1
1709    cat conftest.er1 >&5
1710    mv -f conftest.er1 conftest.err
1711  fi
1712  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1713  test $ac_status = 0; } && {
1714	 test -z "$ac_c_werror_flag" ||
1715	 test ! -s conftest.err
1716       } && test -s conftest.$ac_objext; then :
1717  ac_retval=0
1718else
1719  $as_echo "$as_me: failed program was:" >&5
1720sed 's/^/| /' conftest.$ac_ext >&5
1721
1722	ac_retval=1
1723fi
1724  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1725  as_fn_set_status $ac_retval
1726
1727} # ac_fn_c_try_compile
1728
1729# ac_fn_cxx_try_compile LINENO
1730# ----------------------------
1731# Try to compile conftest.$ac_ext, and return whether this succeeded.
1732ac_fn_cxx_try_compile ()
1733{
1734  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1735  rm -f conftest.$ac_objext
1736  if { { ac_try="$ac_compile"
1737case "(($ac_try" in
1738  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1739  *) ac_try_echo=$ac_try;;
1740esac
1741eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1742$as_echo "$ac_try_echo"; } >&5
1743  (eval "$ac_compile") 2>conftest.err
1744  ac_status=$?
1745  if test -s conftest.err; then
1746    grep -v '^ *+' conftest.err >conftest.er1
1747    cat conftest.er1 >&5
1748    mv -f conftest.er1 conftest.err
1749  fi
1750  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1751  test $ac_status = 0; } && {
1752	 test -z "$ac_cxx_werror_flag" ||
1753	 test ! -s conftest.err
1754       } && test -s conftest.$ac_objext; then :
1755  ac_retval=0
1756else
1757  $as_echo "$as_me: failed program was:" >&5
1758sed 's/^/| /' conftest.$ac_ext >&5
1759
1760	ac_retval=1
1761fi
1762  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1763  as_fn_set_status $ac_retval
1764
1765} # ac_fn_cxx_try_compile
1766
1767# ac_fn_c_try_link LINENO
1768# -----------------------
1769# Try to link conftest.$ac_ext, and return whether this succeeded.
1770ac_fn_c_try_link ()
1771{
1772  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1773  rm -f conftest.$ac_objext conftest$ac_exeext
1774  if { { ac_try="$ac_link"
1775case "(($ac_try" in
1776  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1777  *) ac_try_echo=$ac_try;;
1778esac
1779eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1780$as_echo "$ac_try_echo"; } >&5
1781  (eval "$ac_link") 2>conftest.err
1782  ac_status=$?
1783  if test -s conftest.err; then
1784    grep -v '^ *+' conftest.err >conftest.er1
1785    cat conftest.er1 >&5
1786    mv -f conftest.er1 conftest.err
1787  fi
1788  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1789  test $ac_status = 0; } && {
1790	 test -z "$ac_c_werror_flag" ||
1791	 test ! -s conftest.err
1792       } && test -s conftest$ac_exeext && {
1793	 test "$cross_compiling" = yes ||
1794	 test -x conftest$ac_exeext
1795       }; then :
1796  ac_retval=0
1797else
1798  $as_echo "$as_me: failed program was:" >&5
1799sed 's/^/| /' conftest.$ac_ext >&5
1800
1801	ac_retval=1
1802fi
1803  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1804  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1805  # interfere with the next link command; also delete a directory that is
1806  # left behind by Apple's compiler.  We do this before executing the actions.
1807  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1808  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1809  as_fn_set_status $ac_retval
1810
1811} # ac_fn_c_try_link
1812
1813# ac_fn_c_try_cpp LINENO
1814# ----------------------
1815# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1816ac_fn_c_try_cpp ()
1817{
1818  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1819  if { { ac_try="$ac_cpp conftest.$ac_ext"
1820case "(($ac_try" in
1821  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1822  *) ac_try_echo=$ac_try;;
1823esac
1824eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1825$as_echo "$ac_try_echo"; } >&5
1826  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1827  ac_status=$?
1828  if test -s conftest.err; then
1829    grep -v '^ *+' conftest.err >conftest.er1
1830    cat conftest.er1 >&5
1831    mv -f conftest.er1 conftest.err
1832  fi
1833  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1834  test $ac_status = 0; } > conftest.i && {
1835	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1836	 test ! -s conftest.err
1837       }; then :
1838  ac_retval=0
1839else
1840  $as_echo "$as_me: failed program was:" >&5
1841sed 's/^/| /' conftest.$ac_ext >&5
1842
1843    ac_retval=1
1844fi
1845  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1846  as_fn_set_status $ac_retval
1847
1848} # ac_fn_c_try_cpp
1849
1850# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1851# -------------------------------------------------------
1852# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1853# the include files in INCLUDES and setting the cache variable VAR
1854# accordingly.
1855ac_fn_c_check_header_mongrel ()
1856{
1857  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1858  if eval \${$3+:} false; then :
1859  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1860$as_echo_n "checking for $2... " >&6; }
1861if eval \${$3+:} false; then :
1862  $as_echo_n "(cached) " >&6
1863fi
1864eval ac_res=\$$3
1865	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1866$as_echo "$ac_res" >&6; }
1867else
1868  # Is the header compilable?
1869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1870$as_echo_n "checking $2 usability... " >&6; }
1871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1872/* end confdefs.h.  */
1873$4
1874#include <$2>
1875_ACEOF
1876if ac_fn_c_try_compile "$LINENO"; then :
1877  ac_header_compiler=yes
1878else
1879  ac_header_compiler=no
1880fi
1881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1883$as_echo "$ac_header_compiler" >&6; }
1884
1885# Is the header present?
1886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1887$as_echo_n "checking $2 presence... " >&6; }
1888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1889/* end confdefs.h.  */
1890#include <$2>
1891_ACEOF
1892if ac_fn_c_try_cpp "$LINENO"; then :
1893  ac_header_preproc=yes
1894else
1895  ac_header_preproc=no
1896fi
1897rm -f conftest.err conftest.i conftest.$ac_ext
1898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1899$as_echo "$ac_header_preproc" >&6; }
1900
1901# So?  What about this header?
1902case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1903  yes:no: )
1904    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1905$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1906    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1907$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1908    ;;
1909  no:yes:* )
1910    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1911$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1912    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1913$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1914    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1915$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1916    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1917$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1918    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1919$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1920( $as_echo "## ---------------------------------------------- ##
1921## Report this to pgsql-bugs@lists.postgresql.org ##
1922## ---------------------------------------------- ##"
1923     ) | sed "s/^/$as_me: WARNING:     /" >&2
1924    ;;
1925esac
1926  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1927$as_echo_n "checking for $2... " >&6; }
1928if eval \${$3+:} false; then :
1929  $as_echo_n "(cached) " >&6
1930else
1931  eval "$3=\$ac_header_compiler"
1932fi
1933eval ac_res=\$$3
1934	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1935$as_echo "$ac_res" >&6; }
1936fi
1937  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1938
1939} # ac_fn_c_check_header_mongrel
1940
1941# ac_fn_c_try_run LINENO
1942# ----------------------
1943# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1944# that executables *can* be run.
1945ac_fn_c_try_run ()
1946{
1947  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1948  if { { ac_try="$ac_link"
1949case "(($ac_try" in
1950  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1951  *) ac_try_echo=$ac_try;;
1952esac
1953eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1954$as_echo "$ac_try_echo"; } >&5
1955  (eval "$ac_link") 2>&5
1956  ac_status=$?
1957  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1958  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1959  { { case "(($ac_try" in
1960  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1961  *) ac_try_echo=$ac_try;;
1962esac
1963eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1964$as_echo "$ac_try_echo"; } >&5
1965  (eval "$ac_try") 2>&5
1966  ac_status=$?
1967  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1968  test $ac_status = 0; }; }; then :
1969  ac_retval=0
1970else
1971  $as_echo "$as_me: program exited with status $ac_status" >&5
1972       $as_echo "$as_me: failed program was:" >&5
1973sed 's/^/| /' conftest.$ac_ext >&5
1974
1975       ac_retval=$ac_status
1976fi
1977  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1978  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1979  as_fn_set_status $ac_retval
1980
1981} # ac_fn_c_try_run
1982
1983# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1984# -------------------------------------------------------
1985# Tests whether HEADER exists and can be compiled using the include files in
1986# INCLUDES, setting the cache variable VAR accordingly.
1987ac_fn_c_check_header_compile ()
1988{
1989  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1990  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1991$as_echo_n "checking for $2... " >&6; }
1992if eval \${$3+:} false; then :
1993  $as_echo_n "(cached) " >&6
1994else
1995  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1996/* end confdefs.h.  */
1997$4
1998#include <$2>
1999_ACEOF
2000if ac_fn_c_try_compile "$LINENO"; then :
2001  eval "$3=yes"
2002else
2003  eval "$3=no"
2004fi
2005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2006fi
2007eval ac_res=\$$3
2008	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2009$as_echo "$ac_res" >&6; }
2010  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2011
2012} # ac_fn_c_check_header_compile
2013
2014# ac_fn_c_check_func LINENO FUNC VAR
2015# ----------------------------------
2016# Tests whether FUNC exists, setting the cache variable VAR accordingly
2017ac_fn_c_check_func ()
2018{
2019  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2020  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2021$as_echo_n "checking for $2... " >&6; }
2022if eval \${$3+:} false; then :
2023  $as_echo_n "(cached) " >&6
2024else
2025  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2026/* end confdefs.h.  */
2027/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2028   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2029#define $2 innocuous_$2
2030
2031/* System header to define __stub macros and hopefully few prototypes,
2032    which can conflict with char $2 (); below.
2033    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2034    <limits.h> exists even on freestanding compilers.  */
2035
2036#ifdef __STDC__
2037# include <limits.h>
2038#else
2039# include <assert.h>
2040#endif
2041
2042#undef $2
2043
2044/* Override any GCC internal prototype to avoid an error.
2045   Use char because int might match the return type of a GCC
2046   builtin and then its argument prototype would still apply.  */
2047#ifdef __cplusplus
2048extern "C"
2049#endif
2050char $2 ();
2051/* The GNU C library defines this for functions which it implements
2052    to always fail with ENOSYS.  Some functions are actually named
2053    something starting with __ and the normal name is an alias.  */
2054#if defined __stub_$2 || defined __stub___$2
2055choke me
2056#endif
2057
2058int
2059main ()
2060{
2061return $2 ();
2062  ;
2063  return 0;
2064}
2065_ACEOF
2066if ac_fn_c_try_link "$LINENO"; then :
2067  eval "$3=yes"
2068else
2069  eval "$3=no"
2070fi
2071rm -f core conftest.err conftest.$ac_objext \
2072    conftest$ac_exeext conftest.$ac_ext
2073fi
2074eval ac_res=\$$3
2075	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2076$as_echo "$ac_res" >&6; }
2077  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2078
2079} # ac_fn_c_check_func
2080
2081# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2082# -------------------------------------------
2083# Tests whether TYPE exists after having included INCLUDES, setting cache
2084# variable VAR accordingly.
2085ac_fn_c_check_type ()
2086{
2087  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2088  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2089$as_echo_n "checking for $2... " >&6; }
2090if eval \${$3+:} false; then :
2091  $as_echo_n "(cached) " >&6
2092else
2093  eval "$3=no"
2094  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2095/* end confdefs.h.  */
2096$4
2097int
2098main ()
2099{
2100if (sizeof ($2))
2101	 return 0;
2102  ;
2103  return 0;
2104}
2105_ACEOF
2106if ac_fn_c_try_compile "$LINENO"; then :
2107  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2108/* end confdefs.h.  */
2109$4
2110int
2111main ()
2112{
2113if (sizeof (($2)))
2114	    return 0;
2115  ;
2116  return 0;
2117}
2118_ACEOF
2119if ac_fn_c_try_compile "$LINENO"; then :
2120
2121else
2122  eval "$3=yes"
2123fi
2124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2125fi
2126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2127fi
2128eval ac_res=\$$3
2129	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2130$as_echo "$ac_res" >&6; }
2131  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2132
2133} # ac_fn_c_check_type
2134
2135# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2136# ----------------------------------------------------
2137# Tries to find if the field MEMBER exists in type AGGR, after including
2138# INCLUDES, setting cache variable VAR accordingly.
2139ac_fn_c_check_member ()
2140{
2141  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2142  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2143$as_echo_n "checking for $2.$3... " >&6; }
2144if eval \${$4+:} false; then :
2145  $as_echo_n "(cached) " >&6
2146else
2147  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2148/* end confdefs.h.  */
2149$5
2150int
2151main ()
2152{
2153static $2 ac_aggr;
2154if (ac_aggr.$3)
2155return 0;
2156  ;
2157  return 0;
2158}
2159_ACEOF
2160if ac_fn_c_try_compile "$LINENO"; then :
2161  eval "$4=yes"
2162else
2163  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2164/* end confdefs.h.  */
2165$5
2166int
2167main ()
2168{
2169static $2 ac_aggr;
2170if (sizeof ac_aggr.$3)
2171return 0;
2172  ;
2173  return 0;
2174}
2175_ACEOF
2176if ac_fn_c_try_compile "$LINENO"; then :
2177  eval "$4=yes"
2178else
2179  eval "$4=no"
2180fi
2181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2182fi
2183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2184fi
2185eval ac_res=\$$4
2186	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2187$as_echo "$ac_res" >&6; }
2188  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2189
2190} # ac_fn_c_check_member
2191
2192# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2193# --------------------------------------------
2194# Tries to find the compile-time value of EXPR in a program that includes
2195# INCLUDES, setting VAR accordingly. Returns whether the value could be
2196# computed
2197ac_fn_c_compute_int ()
2198{
2199  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2200  if test "$cross_compiling" = yes; then
2201    # Depending upon the size, compute the lo and hi bounds.
2202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2203/* end confdefs.h.  */
2204$4
2205int
2206main ()
2207{
2208static int test_array [1 - 2 * !(($2) >= 0)];
2209test_array [0] = 0;
2210return test_array [0];
2211
2212  ;
2213  return 0;
2214}
2215_ACEOF
2216if ac_fn_c_try_compile "$LINENO"; then :
2217  ac_lo=0 ac_mid=0
2218  while :; do
2219    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2220/* end confdefs.h.  */
2221$4
2222int
2223main ()
2224{
2225static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2226test_array [0] = 0;
2227return test_array [0];
2228
2229  ;
2230  return 0;
2231}
2232_ACEOF
2233if ac_fn_c_try_compile "$LINENO"; then :
2234  ac_hi=$ac_mid; break
2235else
2236  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2237			if test $ac_lo -le $ac_mid; then
2238			  ac_lo= ac_hi=
2239			  break
2240			fi
2241			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2242fi
2243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2244  done
2245else
2246  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2247/* end confdefs.h.  */
2248$4
2249int
2250main ()
2251{
2252static int test_array [1 - 2 * !(($2) < 0)];
2253test_array [0] = 0;
2254return test_array [0];
2255
2256  ;
2257  return 0;
2258}
2259_ACEOF
2260if ac_fn_c_try_compile "$LINENO"; then :
2261  ac_hi=-1 ac_mid=-1
2262  while :; do
2263    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2264/* end confdefs.h.  */
2265$4
2266int
2267main ()
2268{
2269static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2270test_array [0] = 0;
2271return test_array [0];
2272
2273  ;
2274  return 0;
2275}
2276_ACEOF
2277if ac_fn_c_try_compile "$LINENO"; then :
2278  ac_lo=$ac_mid; break
2279else
2280  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2281			if test $ac_mid -le $ac_hi; then
2282			  ac_lo= ac_hi=
2283			  break
2284			fi
2285			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2286fi
2287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2288  done
2289else
2290  ac_lo= ac_hi=
2291fi
2292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2293fi
2294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2295# Binary search between lo and hi bounds.
2296while test "x$ac_lo" != "x$ac_hi"; do
2297  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2298  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2299/* end confdefs.h.  */
2300$4
2301int
2302main ()
2303{
2304static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2305test_array [0] = 0;
2306return test_array [0];
2307
2308  ;
2309  return 0;
2310}
2311_ACEOF
2312if ac_fn_c_try_compile "$LINENO"; then :
2313  ac_hi=$ac_mid
2314else
2315  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2316fi
2317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2318done
2319case $ac_lo in #((
2320?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2321'') ac_retval=1 ;;
2322esac
2323  else
2324    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2325/* end confdefs.h.  */
2326$4
2327static long int longval () { return $2; }
2328static unsigned long int ulongval () { return $2; }
2329#include <stdio.h>
2330#include <stdlib.h>
2331int
2332main ()
2333{
2334
2335  FILE *f = fopen ("conftest.val", "w");
2336  if (! f)
2337    return 1;
2338  if (($2) < 0)
2339    {
2340      long int i = longval ();
2341      if (i != ($2))
2342	return 1;
2343      fprintf (f, "%ld", i);
2344    }
2345  else
2346    {
2347      unsigned long int i = ulongval ();
2348      if (i != ($2))
2349	return 1;
2350      fprintf (f, "%lu", i);
2351    }
2352  /* Do not output a trailing newline, as this causes \r\n confusion
2353     on some platforms.  */
2354  return ferror (f) || fclose (f) != 0;
2355
2356  ;
2357  return 0;
2358}
2359_ACEOF
2360if ac_fn_c_try_run "$LINENO"; then :
2361  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2362else
2363  ac_retval=1
2364fi
2365rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2366  conftest.$ac_objext conftest.beam conftest.$ac_ext
2367rm -f conftest.val
2368
2369  fi
2370  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2371  as_fn_set_status $ac_retval
2372
2373} # ac_fn_c_compute_int
2374
2375# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2376# ---------------------------------------------
2377# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2378# accordingly.
2379ac_fn_c_check_decl ()
2380{
2381  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2382  # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2383      as_decl_name=`echo $2|sed 's/ *(.*//'`
2384  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2385  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2386$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2387if eval \${$3+:} false; then :
2388  $as_echo_n "(cached) " >&6
2389else
2390  ac_save_werror_flag=$ac_c_werror_flag
2391  ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2392  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2393/* end confdefs.h.  */
2394$4
2395int
2396main ()
2397{
2398#ifndef $as_decl_name
2399#ifdef __cplusplus
2400  (void) $as_decl_use;
2401#else
2402  (void) $as_decl_name;
2403#endif
2404#endif
2405
2406  ;
2407  return 0;
2408}
2409_ACEOF
2410if ac_fn_c_try_compile "$LINENO"; then :
2411  eval "$3=yes"
2412else
2413  eval "$3=no"
2414fi
2415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2416  ac_c_werror_flag=$ac_save_werror_flag
2417fi
2418eval ac_res=\$$3
2419	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2420$as_echo "$ac_res" >&6; }
2421  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2422
2423} # ac_fn_c_check_decl
2424cat >config.log <<_ACEOF
2425This file contains any messages produced by compilers while
2426running configure, to aid debugging if configure makes a mistake.
2427
2428It was created by PostgreSQL $as_me 12.9, which was
2429generated by GNU Autoconf 2.69.  Invocation command line was
2430
2431  $ $0 $@
2432
2433_ACEOF
2434exec 5>>config.log
2435{
2436cat <<_ASUNAME
2437## --------- ##
2438## Platform. ##
2439## --------- ##
2440
2441hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2442uname -m = `(uname -m) 2>/dev/null || echo unknown`
2443uname -r = `(uname -r) 2>/dev/null || echo unknown`
2444uname -s = `(uname -s) 2>/dev/null || echo unknown`
2445uname -v = `(uname -v) 2>/dev/null || echo unknown`
2446
2447/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2448/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2449
2450/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2451/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2452/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2453/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2454/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2455/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2456/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2457
2458_ASUNAME
2459
2460as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2461for as_dir in $PATH
2462do
2463  IFS=$as_save_IFS
2464  test -z "$as_dir" && as_dir=.
2465    $as_echo "PATH: $as_dir"
2466  done
2467IFS=$as_save_IFS
2468
2469} >&5
2470
2471cat >&5 <<_ACEOF
2472
2473
2474## ----------- ##
2475## Core tests. ##
2476## ----------- ##
2477
2478_ACEOF
2479
2480
2481# Keep a trace of the command line.
2482# Strip out --no-create and --no-recursion so they do not pile up.
2483# Strip out --silent because we don't want to record it for future runs.
2484# Also quote any args containing shell meta-characters.
2485# Make two passes to allow for proper duplicate-argument suppression.
2486ac_configure_args=
2487ac_configure_args0=
2488ac_configure_args1=
2489ac_must_keep_next=false
2490for ac_pass in 1 2
2491do
2492  for ac_arg
2493  do
2494    case $ac_arg in
2495    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2496    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2497    | -silent | --silent | --silen | --sile | --sil)
2498      continue ;;
2499    *\'*)
2500      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2501    esac
2502    case $ac_pass in
2503    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2504    2)
2505      as_fn_append ac_configure_args1 " '$ac_arg'"
2506      if test $ac_must_keep_next = true; then
2507	ac_must_keep_next=false # Got value, back to normal.
2508      else
2509	case $ac_arg in
2510	  *=* | --config-cache | -C | -disable-* | --disable-* \
2511	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2512	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2513	  | -with-* | --with-* | -without-* | --without-* | --x)
2514	    case "$ac_configure_args0 " in
2515	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2516	    esac
2517	    ;;
2518	  -* ) ac_must_keep_next=true ;;
2519	esac
2520      fi
2521      as_fn_append ac_configure_args " '$ac_arg'"
2522      ;;
2523    esac
2524  done
2525done
2526{ ac_configure_args0=; unset ac_configure_args0;}
2527{ ac_configure_args1=; unset ac_configure_args1;}
2528
2529# When interrupted or exit'd, cleanup temporary files, and complete
2530# config.log.  We remove comments because anyway the quotes in there
2531# would cause problems or look ugly.
2532# WARNING: Use '\'' to represent an apostrophe within the trap.
2533# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2534trap 'exit_status=$?
2535  # Save into config.log some information that might help in debugging.
2536  {
2537    echo
2538
2539    $as_echo "## ---------------- ##
2540## Cache variables. ##
2541## ---------------- ##"
2542    echo
2543    # The following way of writing the cache mishandles newlines in values,
2544(
2545  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2546    eval ac_val=\$$ac_var
2547    case $ac_val in #(
2548    *${as_nl}*)
2549      case $ac_var in #(
2550      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2551$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2552      esac
2553      case $ac_var in #(
2554      _ | IFS | as_nl) ;; #(
2555      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2556      *) { eval $ac_var=; unset $ac_var;} ;;
2557      esac ;;
2558    esac
2559  done
2560  (set) 2>&1 |
2561    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2562    *${as_nl}ac_space=\ *)
2563      sed -n \
2564	"s/'\''/'\''\\\\'\'''\''/g;
2565	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2566      ;; #(
2567    *)
2568      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2569      ;;
2570    esac |
2571    sort
2572)
2573    echo
2574
2575    $as_echo "## ----------------- ##
2576## Output variables. ##
2577## ----------------- ##"
2578    echo
2579    for ac_var in $ac_subst_vars
2580    do
2581      eval ac_val=\$$ac_var
2582      case $ac_val in
2583      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2584      esac
2585      $as_echo "$ac_var='\''$ac_val'\''"
2586    done | sort
2587    echo
2588
2589    if test -n "$ac_subst_files"; then
2590      $as_echo "## ------------------- ##
2591## File substitutions. ##
2592## ------------------- ##"
2593      echo
2594      for ac_var in $ac_subst_files
2595      do
2596	eval ac_val=\$$ac_var
2597	case $ac_val in
2598	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2599	esac
2600	$as_echo "$ac_var='\''$ac_val'\''"
2601      done | sort
2602      echo
2603    fi
2604
2605    if test -s confdefs.h; then
2606      $as_echo "## ----------- ##
2607## confdefs.h. ##
2608## ----------- ##"
2609      echo
2610      cat confdefs.h
2611      echo
2612    fi
2613    test "$ac_signal" != 0 &&
2614      $as_echo "$as_me: caught signal $ac_signal"
2615    $as_echo "$as_me: exit $exit_status"
2616  } >&5
2617  rm -f core *.core core.conftest.* &&
2618    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2619    exit $exit_status
2620' 0
2621for ac_signal in 1 2 13 15; do
2622  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2623done
2624ac_signal=0
2625
2626# confdefs.h avoids OS command line length limits that DEFS can exceed.
2627rm -f -r conftest* confdefs.h
2628
2629$as_echo "/* confdefs.h */" > confdefs.h
2630
2631# Predefined preprocessor variables.
2632
2633cat >>confdefs.h <<_ACEOF
2634#define PACKAGE_NAME "$PACKAGE_NAME"
2635_ACEOF
2636
2637cat >>confdefs.h <<_ACEOF
2638#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2639_ACEOF
2640
2641cat >>confdefs.h <<_ACEOF
2642#define PACKAGE_VERSION "$PACKAGE_VERSION"
2643_ACEOF
2644
2645cat >>confdefs.h <<_ACEOF
2646#define PACKAGE_STRING "$PACKAGE_STRING"
2647_ACEOF
2648
2649cat >>confdefs.h <<_ACEOF
2650#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2651_ACEOF
2652
2653cat >>confdefs.h <<_ACEOF
2654#define PACKAGE_URL "$PACKAGE_URL"
2655_ACEOF
2656
2657
2658# Let the site file select an alternate cache file if it wants to.
2659# Prefer an explicitly selected file to automatically selected ones.
2660ac_site_file1=NONE
2661ac_site_file2=NONE
2662if test -n "$CONFIG_SITE"; then
2663  # We do not want a PATH search for config.site.
2664  case $CONFIG_SITE in #((
2665    -*)  ac_site_file1=./$CONFIG_SITE;;
2666    */*) ac_site_file1=$CONFIG_SITE;;
2667    *)   ac_site_file1=./$CONFIG_SITE;;
2668  esac
2669elif test "x$prefix" != xNONE; then
2670  ac_site_file1=$prefix/share/config.site
2671  ac_site_file2=$prefix/etc/config.site
2672else
2673  ac_site_file1=$ac_default_prefix/share/config.site
2674  ac_site_file2=$ac_default_prefix/etc/config.site
2675fi
2676for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2677do
2678  test "x$ac_site_file" = xNONE && continue
2679  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2680    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2681$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2682    sed 's/^/| /' "$ac_site_file" >&5
2683    . "$ac_site_file" \
2684      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2685$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2686as_fn_error $? "failed to load site script $ac_site_file
2687See \`config.log' for more details" "$LINENO" 5; }
2688  fi
2689done
2690
2691if test -r "$cache_file"; then
2692  # Some versions of bash will fail to source /dev/null (special files
2693  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2694  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2695    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2696$as_echo "$as_me: loading cache $cache_file" >&6;}
2697    case $cache_file in
2698      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2699      *)                      . "./$cache_file";;
2700    esac
2701  fi
2702else
2703  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2704$as_echo "$as_me: creating cache $cache_file" >&6;}
2705  >$cache_file
2706fi
2707
2708# Check that the precious variables saved in the cache have kept the same
2709# value.
2710ac_cache_corrupted=false
2711for ac_var in $ac_precious_vars; do
2712  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2713  eval ac_new_set=\$ac_env_${ac_var}_set
2714  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2715  eval ac_new_val=\$ac_env_${ac_var}_value
2716  case $ac_old_set,$ac_new_set in
2717    set,)
2718      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2719$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2720      ac_cache_corrupted=: ;;
2721    ,set)
2722      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2723$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2724      ac_cache_corrupted=: ;;
2725    ,);;
2726    *)
2727      if test "x$ac_old_val" != "x$ac_new_val"; then
2728	# differences in whitespace do not lead to failure.
2729	ac_old_val_w=`echo x $ac_old_val`
2730	ac_new_val_w=`echo x $ac_new_val`
2731	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2732	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2733$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2734	  ac_cache_corrupted=:
2735	else
2736	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2737$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2738	  eval $ac_var=\$ac_old_val
2739	fi
2740	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2741$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2742	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2743$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2744      fi;;
2745  esac
2746  # Pass precious variables to config.status.
2747  if test "$ac_new_set" = set; then
2748    case $ac_new_val in
2749    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2750    *) ac_arg=$ac_var=$ac_new_val ;;
2751    esac
2752    case " $ac_configure_args " in
2753      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2754      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2755    esac
2756  fi
2757done
2758if $ac_cache_corrupted; then
2759  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2760$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2761  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2762$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2763  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2764fi
2765## -------------------- ##
2766## Main body of script. ##
2767## -------------------- ##
2768
2769ac_ext=c
2770ac_cpp='$CPP $CPPFLAGS'
2771ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2772ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2773ac_compiler_gnu=$ac_cv_c_compiler_gnu
2774
2775
2776
2777
2778
2779
2780ac_aux_dir=
2781for ac_dir in config "$srcdir"/config; do
2782  if test -f "$ac_dir/install-sh"; then
2783    ac_aux_dir=$ac_dir
2784    ac_install_sh="$ac_aux_dir/install-sh -c"
2785    break
2786  elif test -f "$ac_dir/install.sh"; then
2787    ac_aux_dir=$ac_dir
2788    ac_install_sh="$ac_aux_dir/install.sh -c"
2789    break
2790  elif test -f "$ac_dir/shtool"; then
2791    ac_aux_dir=$ac_dir
2792    ac_install_sh="$ac_aux_dir/shtool install -c"
2793    break
2794  fi
2795done
2796if test -z "$ac_aux_dir"; then
2797  as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2798fi
2799
2800# These three variables are undocumented and unsupported,
2801# and are intended to be withdrawn in a future Autoconf release.
2802# They can cause serious problems if a builder's source tree is in a directory
2803# whose full name contains unusual characters.
2804ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2805ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2806ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2807
2808
2809
2810configure_args=$ac_configure_args
2811
2812
2813PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2814
2815
2816cat >>confdefs.h <<_ACEOF
2817#define PG_MAJORVERSION "$PG_MAJORVERSION"
2818_ACEOF
2819
2820
2821
2822
2823
2824# Check whether --with-extra-version was given.
2825if test "${with_extra_version+set}" = set; then :
2826  withval=$with_extra_version;
2827  case $withval in
2828    yes)
2829      as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2830      ;;
2831    no)
2832      as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2833      ;;
2834    *)
2835      PG_VERSION="$PACKAGE_VERSION$withval"
2836      ;;
2837  esac
2838
2839else
2840  PG_VERSION="$PACKAGE_VERSION"
2841fi
2842
2843
2844
2845cat >>confdefs.h <<_ACEOF
2846#define PG_VERSION "$PG_VERSION"
2847_ACEOF
2848
2849
2850# Make sure we can run config.sub.
2851$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2852  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2853
2854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2855$as_echo_n "checking build system type... " >&6; }
2856if ${ac_cv_build+:} false; then :
2857  $as_echo_n "(cached) " >&6
2858else
2859  ac_build_alias=$build_alias
2860test "x$ac_build_alias" = x &&
2861  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2862test "x$ac_build_alias" = x &&
2863  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2864ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2865  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2866
2867fi
2868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2869$as_echo "$ac_cv_build" >&6; }
2870case $ac_cv_build in
2871*-*-*) ;;
2872*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2873esac
2874build=$ac_cv_build
2875ac_save_IFS=$IFS; IFS='-'
2876set x $ac_cv_build
2877shift
2878build_cpu=$1
2879build_vendor=$2
2880shift; shift
2881# Remember, the first character of IFS is used to create $*,
2882# except with old shells:
2883build_os=$*
2884IFS=$ac_save_IFS
2885case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2886
2887
2888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2889$as_echo_n "checking host system type... " >&6; }
2890if ${ac_cv_host+:} false; then :
2891  $as_echo_n "(cached) " >&6
2892else
2893  if test "x$host_alias" = x; then
2894  ac_cv_host=$ac_cv_build
2895else
2896  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2897    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2898fi
2899
2900fi
2901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2902$as_echo "$ac_cv_host" >&6; }
2903case $ac_cv_host in
2904*-*-*) ;;
2905*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2906esac
2907host=$ac_cv_host
2908ac_save_IFS=$IFS; IFS='-'
2909set x $ac_cv_host
2910shift
2911host_cpu=$1
2912host_vendor=$2
2913shift; shift
2914# Remember, the first character of IFS is used to create $*,
2915# except with old shells:
2916host_os=$*
2917IFS=$ac_save_IFS
2918case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2919
2920
2921
2922template=
2923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2924$as_echo_n "checking which template to use... " >&6; }
2925
2926
2927
2928
2929# Check whether --with-template was given.
2930if test "${with_template+set}" = set; then :
2931  withval=$with_template;
2932  case $withval in
2933    yes)
2934      as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2935      ;;
2936    no)
2937      as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2938      ;;
2939    *)
2940
2941  case $withval in
2942    list)   echo; ls "$srcdir/src/template"; exit;;
2943    *)      if test -f "$srcdir/src/template/$with_template" ; then
2944              template=$withval
2945            else
2946              as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2947            fi;;
2948  esac
2949
2950      ;;
2951  esac
2952
2953else
2954
2955# --with-template not given
2956
2957case $host_os in
2958     aix*) template=aix ;;
2959  cygwin*) template=cygwin ;;
2960  darwin*) template=darwin ;;
2961dragonfly*) template=netbsd ;;
2962 freebsd*) template=freebsd ;;
2963    hpux*) template=hpux ;;
2964 linux*|gnu*|k*bsd*-gnu)
2965           template=linux ;;
2966   mingw*) template=win32 ;;
2967  netbsd*) template=netbsd ;;
2968 openbsd*) template=openbsd ;;
2969 solaris*) template=solaris ;;
2970esac
2971
2972  if test x"$template" = x"" ; then
2973    as_fn_error $? "
2974*******************************************************************
2975PostgreSQL has apparently not been ported to your platform yet.
2976To try a manual configuration, look into the src/template directory
2977for a similar platform and use the '--with-template=' option.
2978
2979Please also contact <pgsql-bugs@lists.postgresql.org> to see about
2980rectifying this.  Include the above 'checking host system type...'
2981line.
2982*******************************************************************
2983" "$LINENO" 5
2984  fi
2985
2986
2987fi
2988
2989
2990
2991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2992$as_echo "$template" >&6; }
2993
2994PORTNAME=$template
2995
2996
2997# Initialize default assumption that we do not need separate assembly code
2998# for TAS (test-and-set).  This can be overridden by the template file
2999# when it's executed.
3000need_tas=no
3001tas_file=dummy.s
3002
3003
3004
3005##
3006## Command line options
3007##
3008
3009#
3010# Add non-standard directories to the include path
3011#
3012
3013
3014
3015# Check whether --with-includes was given.
3016if test "${with_includes+set}" = set; then :
3017  withval=$with_includes;
3018  case $withval in
3019    yes)
3020      as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3021      ;;
3022    no)
3023      as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3024      ;;
3025    *)
3026
3027      ;;
3028  esac
3029
3030fi
3031
3032
3033
3034
3035#
3036# Add non-standard directories to the library search path
3037#
3038
3039
3040
3041# Check whether --with-libraries was given.
3042if test "${with_libraries+set}" = set; then :
3043  withval=$with_libraries;
3044  case $withval in
3045    yes)
3046      as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3047      ;;
3048    no)
3049      as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3050      ;;
3051    *)
3052      LIBRARY_DIRS=$withval
3053      ;;
3054  esac
3055
3056fi
3057
3058
3059
3060
3061
3062
3063# Check whether --with-libs was given.
3064if test "${with_libs+set}" = set; then :
3065  withval=$with_libs;
3066  case $withval in
3067    yes)
3068      as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3069      ;;
3070    no)
3071      as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3072      ;;
3073    *)
3074      LIBRARY_DIRS=$withval
3075      ;;
3076  esac
3077
3078fi
3079
3080
3081
3082
3083#
3084# 64-bit integer date/time storage is now the only option, but to avoid
3085# unnecessary breakage of build scripts, continue to accept an explicit
3086# "--enable-integer-datetimes" switch.
3087#
3088
3089
3090# Check whether --enable-integer-datetimes was given.
3091if test "${enable_integer_datetimes+set}" = set; then :
3092  enableval=$enable_integer_datetimes;
3093  case $enableval in
3094    yes)
3095      :
3096      ;;
3097    no)
3098      as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3099      ;;
3100    *)
3101      as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3102      ;;
3103  esac
3104
3105else
3106  enable_integer_datetimes=yes
3107
3108fi
3109
3110
3111
3112
3113#
3114# NLS
3115#
3116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3117$as_echo_n "checking whether NLS is wanted... " >&6; }
3118
3119
3120# Check whether --enable-nls was given.
3121if test "${enable_nls+set}" = set; then :
3122  enableval=$enable_nls;
3123  case $enableval in
3124    yes)
3125      :
3126      ;;
3127    no)
3128      :
3129      ;;
3130    *)
3131      enable_nls=yes
3132WANTED_LANGUAGES=$enableval
3133      ;;
3134  esac
3135
3136else
3137  enable_nls=no
3138fi
3139
3140
3141
3142if test "$enable_nls" = yes; then
3143
3144$as_echo "#define ENABLE_NLS 1" >>confdefs.h
3145
3146fi
3147
3148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3149$as_echo "$enable_nls" >&6; }
3150
3151
3152
3153#
3154# Default port number (--with-pgport), default 5432
3155#
3156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3157$as_echo_n "checking for default port number... " >&6; }
3158
3159
3160
3161# Check whether --with-pgport was given.
3162if test "${with_pgport+set}" = set; then :
3163  withval=$with_pgport;
3164  case $withval in
3165    yes)
3166      as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3167      ;;
3168    no)
3169      as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3170      ;;
3171    *)
3172      default_port=$withval
3173      ;;
3174  esac
3175
3176else
3177  default_port=5432
3178fi
3179
3180
3181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3182$as_echo "$default_port" >&6; }
3183# Need both of these because some places want an integer and some a string
3184
3185cat >>confdefs.h <<_ACEOF
3186#define DEF_PGPORT ${default_port}
3187_ACEOF
3188
3189
3190cat >>confdefs.h <<_ACEOF
3191#define DEF_PGPORT_STR "${default_port}"
3192_ACEOF
3193
3194
3195
3196# It's worth validating port; you can get very confusing errors otherwise
3197if test x"$default_port" = x""; then
3198  as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3199elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3200  as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3201elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3202  as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3203elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3204  as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3205fi
3206
3207#
3208# '-rpath'-like feature can be disabled
3209#
3210
3211
3212# Check whether --enable-rpath was given.
3213if test "${enable_rpath+set}" = set; then :
3214  enableval=$enable_rpath;
3215  case $enableval in
3216    yes)
3217      :
3218      ;;
3219    no)
3220      :
3221      ;;
3222    *)
3223      as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3224      ;;
3225  esac
3226
3227else
3228  enable_rpath=yes
3229
3230fi
3231
3232
3233
3234
3235#
3236# Spinlocks
3237#
3238
3239
3240# Check whether --enable-spinlocks was given.
3241if test "${enable_spinlocks+set}" = set; then :
3242  enableval=$enable_spinlocks;
3243  case $enableval in
3244    yes)
3245      :
3246      ;;
3247    no)
3248      :
3249      ;;
3250    *)
3251      as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3252      ;;
3253  esac
3254
3255else
3256  enable_spinlocks=yes
3257
3258fi
3259
3260
3261
3262#
3263# Atomic operations
3264#
3265
3266
3267# Check whether --enable-atomics was given.
3268if test "${enable_atomics+set}" = set; then :
3269  enableval=$enable_atomics;
3270  case $enableval in
3271    yes)
3272      :
3273      ;;
3274    no)
3275      :
3276      ;;
3277    *)
3278      as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3279      ;;
3280  esac
3281
3282else
3283  enable_atomics=yes
3284
3285fi
3286
3287
3288
3289#
3290# --enable-debug adds -g to compiler flags
3291#
3292
3293
3294# Check whether --enable-debug was given.
3295if test "${enable_debug+set}" = set; then :
3296  enableval=$enable_debug;
3297  case $enableval in
3298    yes)
3299      :
3300      ;;
3301    no)
3302      :
3303      ;;
3304    *)
3305      as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3306      ;;
3307  esac
3308
3309else
3310  enable_debug=no
3311
3312fi
3313
3314
3315
3316
3317#
3318# --enable-profiling enables gcc profiling
3319#
3320
3321
3322# Check whether --enable-profiling was given.
3323if test "${enable_profiling+set}" = set; then :
3324  enableval=$enable_profiling;
3325  case $enableval in
3326    yes)
3327      :
3328      ;;
3329    no)
3330      :
3331      ;;
3332    *)
3333      as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3334      ;;
3335  esac
3336
3337else
3338  enable_profiling=no
3339
3340fi
3341
3342
3343
3344#
3345# --enable-coverage enables generation of code coverage metrics with gcov
3346#
3347
3348
3349# Check whether --enable-coverage was given.
3350if test "${enable_coverage+set}" = set; then :
3351  enableval=$enable_coverage;
3352  case $enableval in
3353    yes)
3354      if test -z "$GCOV"; then
3355  for ac_prog in gcov
3356do
3357  # Extract the first word of "$ac_prog", so it can be a program name with args.
3358set dummy $ac_prog; ac_word=$2
3359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3360$as_echo_n "checking for $ac_word... " >&6; }
3361if ${ac_cv_path_GCOV+:} false; then :
3362  $as_echo_n "(cached) " >&6
3363else
3364  case $GCOV in
3365  [\\/]* | ?:[\\/]*)
3366  ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3367  ;;
3368  *)
3369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3370for as_dir in $PATH
3371do
3372  IFS=$as_save_IFS
3373  test -z "$as_dir" && as_dir=.
3374    for ac_exec_ext in '' $ac_executable_extensions; do
3375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3376    ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3378    break 2
3379  fi
3380done
3381  done
3382IFS=$as_save_IFS
3383
3384  ;;
3385esac
3386fi
3387GCOV=$ac_cv_path_GCOV
3388if test -n "$GCOV"; then
3389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3390$as_echo "$GCOV" >&6; }
3391else
3392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3393$as_echo "no" >&6; }
3394fi
3395
3396
3397  test -n "$GCOV" && break
3398done
3399
3400else
3401  # Report the value of GCOV in configure's output in all cases.
3402  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3403$as_echo_n "checking for GCOV... " >&6; }
3404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3405$as_echo "$GCOV" >&6; }
3406fi
3407
3408if test -z "$GCOV"; then
3409  as_fn_error $? "gcov not found" "$LINENO" 5
3410fi
3411if test -z "$LCOV"; then
3412  for ac_prog in lcov
3413do
3414  # Extract the first word of "$ac_prog", so it can be a program name with args.
3415set dummy $ac_prog; ac_word=$2
3416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3417$as_echo_n "checking for $ac_word... " >&6; }
3418if ${ac_cv_path_LCOV+:} false; then :
3419  $as_echo_n "(cached) " >&6
3420else
3421  case $LCOV in
3422  [\\/]* | ?:[\\/]*)
3423  ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3424  ;;
3425  *)
3426  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3427for as_dir in $PATH
3428do
3429  IFS=$as_save_IFS
3430  test -z "$as_dir" && as_dir=.
3431    for ac_exec_ext in '' $ac_executable_extensions; do
3432  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3433    ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3435    break 2
3436  fi
3437done
3438  done
3439IFS=$as_save_IFS
3440
3441  ;;
3442esac
3443fi
3444LCOV=$ac_cv_path_LCOV
3445if test -n "$LCOV"; then
3446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3447$as_echo "$LCOV" >&6; }
3448else
3449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3450$as_echo "no" >&6; }
3451fi
3452
3453
3454  test -n "$LCOV" && break
3455done
3456
3457else
3458  # Report the value of LCOV in configure's output in all cases.
3459  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3460$as_echo_n "checking for LCOV... " >&6; }
3461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3462$as_echo "$LCOV" >&6; }
3463fi
3464
3465if test -z "$LCOV"; then
3466  as_fn_error $? "lcov not found" "$LINENO" 5
3467fi
3468if test -z "$GENHTML"; then
3469  for ac_prog in genhtml
3470do
3471  # Extract the first word of "$ac_prog", so it can be a program name with args.
3472set dummy $ac_prog; ac_word=$2
3473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3474$as_echo_n "checking for $ac_word... " >&6; }
3475if ${ac_cv_path_GENHTML+:} false; then :
3476  $as_echo_n "(cached) " >&6
3477else
3478  case $GENHTML in
3479  [\\/]* | ?:[\\/]*)
3480  ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3481  ;;
3482  *)
3483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3484for as_dir in $PATH
3485do
3486  IFS=$as_save_IFS
3487  test -z "$as_dir" && as_dir=.
3488    for ac_exec_ext in '' $ac_executable_extensions; do
3489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3490    ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3492    break 2
3493  fi
3494done
3495  done
3496IFS=$as_save_IFS
3497
3498  ;;
3499esac
3500fi
3501GENHTML=$ac_cv_path_GENHTML
3502if test -n "$GENHTML"; then
3503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3504$as_echo "$GENHTML" >&6; }
3505else
3506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3507$as_echo "no" >&6; }
3508fi
3509
3510
3511  test -n "$GENHTML" && break
3512done
3513
3514else
3515  # Report the value of GENHTML in configure's output in all cases.
3516  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3517$as_echo_n "checking for GENHTML... " >&6; }
3518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3519$as_echo "$GENHTML" >&6; }
3520fi
3521
3522if test -z "$GENHTML"; then
3523  as_fn_error $? "genhtml not found" "$LINENO" 5
3524fi
3525      ;;
3526    no)
3527      :
3528      ;;
3529    *)
3530      as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3531      ;;
3532  esac
3533
3534else
3535  enable_coverage=no
3536
3537fi
3538
3539
3540
3541
3542#
3543# DTrace
3544#
3545
3546
3547# Check whether --enable-dtrace was given.
3548if test "${enable_dtrace+set}" = set; then :
3549  enableval=$enable_dtrace;
3550  case $enableval in
3551    yes)
3552      if test -z "$DTRACE"; then
3553  for ac_prog in dtrace
3554do
3555  # Extract the first word of "$ac_prog", so it can be a program name with args.
3556set dummy $ac_prog; ac_word=$2
3557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3558$as_echo_n "checking for $ac_word... " >&6; }
3559if ${ac_cv_path_DTRACE+:} false; then :
3560  $as_echo_n "(cached) " >&6
3561else
3562  case $DTRACE in
3563  [\\/]* | ?:[\\/]*)
3564  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3565  ;;
3566  *)
3567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3568for as_dir in $PATH
3569do
3570  IFS=$as_save_IFS
3571  test -z "$as_dir" && as_dir=.
3572    for ac_exec_ext in '' $ac_executable_extensions; do
3573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3574    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3576    break 2
3577  fi
3578done
3579  done
3580IFS=$as_save_IFS
3581
3582  ;;
3583esac
3584fi
3585DTRACE=$ac_cv_path_DTRACE
3586if test -n "$DTRACE"; then
3587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3588$as_echo "$DTRACE" >&6; }
3589else
3590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3591$as_echo "no" >&6; }
3592fi
3593
3594
3595  test -n "$DTRACE" && break
3596done
3597
3598else
3599  # Report the value of DTRACE in configure's output in all cases.
3600  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3601$as_echo_n "checking for DTRACE... " >&6; }
3602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3603$as_echo "$DTRACE" >&6; }
3604fi
3605
3606if test -z "$DTRACE"; then
3607  as_fn_error $? "dtrace not found" "$LINENO" 5
3608fi
3609
3610      ;;
3611    no)
3612      :
3613      ;;
3614    *)
3615      as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3616      ;;
3617  esac
3618
3619else
3620  enable_dtrace=no
3621
3622fi
3623
3624
3625
3626
3627#
3628# TAP tests
3629#
3630
3631
3632# Check whether --enable-tap-tests was given.
3633if test "${enable_tap_tests+set}" = set; then :
3634  enableval=$enable_tap_tests;
3635  case $enableval in
3636    yes)
3637      :
3638      ;;
3639    no)
3640      :
3641      ;;
3642    *)
3643      as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3644      ;;
3645  esac
3646
3647else
3648  enable_tap_tests=no
3649
3650fi
3651
3652
3653
3654
3655#
3656# Block size
3657#
3658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3659$as_echo_n "checking for block size... " >&6; }
3660
3661
3662
3663# Check whether --with-blocksize was given.
3664if test "${with_blocksize+set}" = set; then :
3665  withval=$with_blocksize;
3666  case $withval in
3667    yes)
3668      as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3669      ;;
3670    no)
3671      as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3672      ;;
3673    *)
3674      blocksize=$withval
3675      ;;
3676  esac
3677
3678else
3679  blocksize=8
3680fi
3681
3682
3683case ${blocksize} in
3684  1) BLCKSZ=1024;;
3685  2) BLCKSZ=2048;;
3686  4) BLCKSZ=4096;;
3687  8) BLCKSZ=8192;;
3688 16) BLCKSZ=16384;;
3689 32) BLCKSZ=32768;;
3690  *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3691esac
3692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3693$as_echo "${blocksize}kB" >&6; }
3694
3695
3696cat >>confdefs.h <<_ACEOF
3697#define BLCKSZ ${BLCKSZ}
3698_ACEOF
3699
3700
3701#
3702# Relation segment size
3703#
3704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3705$as_echo_n "checking for segment size... " >&6; }
3706
3707
3708
3709# Check whether --with-segsize was given.
3710if test "${with_segsize+set}" = set; then :
3711  withval=$with_segsize;
3712  case $withval in
3713    yes)
3714      as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3715      ;;
3716    no)
3717      as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3718      ;;
3719    *)
3720      segsize=$withval
3721      ;;
3722  esac
3723
3724else
3725  segsize=1
3726fi
3727
3728
3729# this expression is set up to avoid unnecessary integer overflow
3730# blocksize is already guaranteed to be a factor of 1024
3731RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3732test $? -eq 0 || exit 1
3733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3734$as_echo "${segsize}GB" >&6; }
3735
3736
3737cat >>confdefs.h <<_ACEOF
3738#define RELSEG_SIZE ${RELSEG_SIZE}
3739_ACEOF
3740
3741
3742#
3743# WAL block size
3744#
3745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3746$as_echo_n "checking for WAL block size... " >&6; }
3747
3748
3749
3750# Check whether --with-wal-blocksize was given.
3751if test "${with_wal_blocksize+set}" = set; then :
3752  withval=$with_wal_blocksize;
3753  case $withval in
3754    yes)
3755      as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3756      ;;
3757    no)
3758      as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3759      ;;
3760    *)
3761      wal_blocksize=$withval
3762      ;;
3763  esac
3764
3765else
3766  wal_blocksize=8
3767fi
3768
3769
3770case ${wal_blocksize} in
3771  1) XLOG_BLCKSZ=1024;;
3772  2) XLOG_BLCKSZ=2048;;
3773  4) XLOG_BLCKSZ=4096;;
3774  8) XLOG_BLCKSZ=8192;;
3775 16) XLOG_BLCKSZ=16384;;
3776 32) XLOG_BLCKSZ=32768;;
3777 64) XLOG_BLCKSZ=65536;;
3778  *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3779esac
3780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3781$as_echo "${wal_blocksize}kB" >&6; }
3782
3783
3784cat >>confdefs.h <<_ACEOF
3785#define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3786_ACEOF
3787
3788
3789#
3790# C compiler
3791#
3792
3793# For historical reasons you can also use --with-CC to specify the C compiler
3794# to use, although the standard way to do this is to set the CC environment
3795# variable.
3796
3797
3798
3799# Check whether --with-CC was given.
3800if test "${with_CC+set}" = set; then :
3801  withval=$with_CC;
3802  case $withval in
3803    yes)
3804      as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3805      ;;
3806    no)
3807      as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3808      ;;
3809    *)
3810      CC=$with_CC
3811      ;;
3812  esac
3813
3814fi
3815
3816
3817
3818case $template in
3819  aix) pgac_cc_list="gcc xlc"; pgac_cxx_list="g++ xlC";;
3820    *) pgac_cc_list="gcc cc"; pgac_cxx_list="g++ c++";;
3821esac
3822
3823ac_ext=c
3824ac_cpp='$CPP $CPPFLAGS'
3825ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3826ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3827ac_compiler_gnu=$ac_cv_c_compiler_gnu
3828if test -n "$ac_tool_prefix"; then
3829  for ac_prog in $pgac_cc_list
3830  do
3831    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3832set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3834$as_echo_n "checking for $ac_word... " >&6; }
3835if ${ac_cv_prog_CC+:} false; then :
3836  $as_echo_n "(cached) " >&6
3837else
3838  if test -n "$CC"; then
3839  ac_cv_prog_CC="$CC" # Let the user override the test.
3840else
3841as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3842for as_dir in $PATH
3843do
3844  IFS=$as_save_IFS
3845  test -z "$as_dir" && as_dir=.
3846    for ac_exec_ext in '' $ac_executable_extensions; do
3847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3848    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3850    break 2
3851  fi
3852done
3853  done
3854IFS=$as_save_IFS
3855
3856fi
3857fi
3858CC=$ac_cv_prog_CC
3859if test -n "$CC"; then
3860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3861$as_echo "$CC" >&6; }
3862else
3863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3864$as_echo "no" >&6; }
3865fi
3866
3867
3868    test -n "$CC" && break
3869  done
3870fi
3871if test -z "$CC"; then
3872  ac_ct_CC=$CC
3873  for ac_prog in $pgac_cc_list
3874do
3875  # Extract the first word of "$ac_prog", so it can be a program name with args.
3876set dummy $ac_prog; ac_word=$2
3877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3878$as_echo_n "checking for $ac_word... " >&6; }
3879if ${ac_cv_prog_ac_ct_CC+:} false; then :
3880  $as_echo_n "(cached) " >&6
3881else
3882  if test -n "$ac_ct_CC"; then
3883  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3884else
3885as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3886for as_dir in $PATH
3887do
3888  IFS=$as_save_IFS
3889  test -z "$as_dir" && as_dir=.
3890    for ac_exec_ext in '' $ac_executable_extensions; do
3891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3892    ac_cv_prog_ac_ct_CC="$ac_prog"
3893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3894    break 2
3895  fi
3896done
3897  done
3898IFS=$as_save_IFS
3899
3900fi
3901fi
3902ac_ct_CC=$ac_cv_prog_ac_ct_CC
3903if test -n "$ac_ct_CC"; then
3904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3905$as_echo "$ac_ct_CC" >&6; }
3906else
3907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3908$as_echo "no" >&6; }
3909fi
3910
3911
3912  test -n "$ac_ct_CC" && break
3913done
3914
3915  if test "x$ac_ct_CC" = x; then
3916    CC=""
3917  else
3918    case $cross_compiling:$ac_tool_warned in
3919yes:)
3920{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3921$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3922ac_tool_warned=yes ;;
3923esac
3924    CC=$ac_ct_CC
3925  fi
3926fi
3927
3928
3929test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3930$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3931as_fn_error $? "no acceptable C compiler found in \$PATH
3932See \`config.log' for more details" "$LINENO" 5; }
3933
3934# Provide some information about the compiler.
3935$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3936set X $ac_compile
3937ac_compiler=$2
3938for ac_option in --version -v -V -qversion; do
3939  { { ac_try="$ac_compiler $ac_option >&5"
3940case "(($ac_try" in
3941  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3942  *) ac_try_echo=$ac_try;;
3943esac
3944eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3945$as_echo "$ac_try_echo"; } >&5
3946  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3947  ac_status=$?
3948  if test -s conftest.err; then
3949    sed '10a\
3950... rest of stderr output deleted ...
3951         10q' conftest.err >conftest.er1
3952    cat conftest.er1 >&5
3953  fi
3954  rm -f conftest.er1 conftest.err
3955  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3956  test $ac_status = 0; }
3957done
3958
3959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3960/* end confdefs.h.  */
3961
3962int
3963main ()
3964{
3965
3966  ;
3967  return 0;
3968}
3969_ACEOF
3970ac_clean_files_save=$ac_clean_files
3971ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3972# Try to create an executable without -o first, disregard a.out.
3973# It will help us diagnose broken compilers, and finding out an intuition
3974# of exeext.
3975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3976$as_echo_n "checking whether the C compiler works... " >&6; }
3977ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3978
3979# The possible output files:
3980ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3981
3982ac_rmfiles=
3983for ac_file in $ac_files
3984do
3985  case $ac_file in
3986    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3987    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3988  esac
3989done
3990rm -f $ac_rmfiles
3991
3992if { { ac_try="$ac_link_default"
3993case "(($ac_try" in
3994  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3995  *) ac_try_echo=$ac_try;;
3996esac
3997eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3998$as_echo "$ac_try_echo"; } >&5
3999  (eval "$ac_link_default") 2>&5
4000  ac_status=$?
4001  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4002  test $ac_status = 0; }; then :
4003  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4004# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4005# in a Makefile.  We should not override ac_cv_exeext if it was cached,
4006# so that the user can short-circuit this test for compilers unknown to
4007# Autoconf.
4008for ac_file in $ac_files ''
4009do
4010  test -f "$ac_file" || continue
4011  case $ac_file in
4012    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4013	;;
4014    [ab].out )
4015	# We found the default executable, but exeext='' is most
4016	# certainly right.
4017	break;;
4018    *.* )
4019	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4020	then :; else
4021	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4022	fi
4023	# We set ac_cv_exeext here because the later test for it is not
4024	# safe: cross compilers may not add the suffix if given an `-o'
4025	# argument, so we may need to know it at that point already.
4026	# Even if this section looks crufty: it has the advantage of
4027	# actually working.
4028	break;;
4029    * )
4030	break;;
4031  esac
4032done
4033test "$ac_cv_exeext" = no && ac_cv_exeext=
4034
4035else
4036  ac_file=''
4037fi
4038if test -z "$ac_file"; then :
4039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4040$as_echo "no" >&6; }
4041$as_echo "$as_me: failed program was:" >&5
4042sed 's/^/| /' conftest.$ac_ext >&5
4043
4044{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4045$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4046as_fn_error 77 "C compiler cannot create executables
4047See \`config.log' for more details" "$LINENO" 5; }
4048else
4049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4050$as_echo "yes" >&6; }
4051fi
4052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4053$as_echo_n "checking for C compiler default output file name... " >&6; }
4054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4055$as_echo "$ac_file" >&6; }
4056ac_exeext=$ac_cv_exeext
4057
4058rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4059ac_clean_files=$ac_clean_files_save
4060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4061$as_echo_n "checking for suffix of executables... " >&6; }
4062if { { ac_try="$ac_link"
4063case "(($ac_try" in
4064  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4065  *) ac_try_echo=$ac_try;;
4066esac
4067eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4068$as_echo "$ac_try_echo"; } >&5
4069  (eval "$ac_link") 2>&5
4070  ac_status=$?
4071  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4072  test $ac_status = 0; }; then :
4073  # If both `conftest.exe' and `conftest' are `present' (well, observable)
4074# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4075# work properly (i.e., refer to `conftest.exe'), while it won't with
4076# `rm'.
4077for ac_file in conftest.exe conftest conftest.*; do
4078  test -f "$ac_file" || continue
4079  case $ac_file in
4080    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4081    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4082	  break;;
4083    * ) break;;
4084  esac
4085done
4086else
4087  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4088$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4089as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4090See \`config.log' for more details" "$LINENO" 5; }
4091fi
4092rm -f conftest conftest$ac_cv_exeext
4093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4094$as_echo "$ac_cv_exeext" >&6; }
4095
4096rm -f conftest.$ac_ext
4097EXEEXT=$ac_cv_exeext
4098ac_exeext=$EXEEXT
4099cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4100/* end confdefs.h.  */
4101#include <stdio.h>
4102int
4103main ()
4104{
4105FILE *f = fopen ("conftest.out", "w");
4106 return ferror (f) || fclose (f) != 0;
4107
4108  ;
4109  return 0;
4110}
4111_ACEOF
4112ac_clean_files="$ac_clean_files conftest.out"
4113# Check that the compiler produces executables we can run.  If not, either
4114# the compiler is broken, or we cross compile.
4115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4116$as_echo_n "checking whether we are cross compiling... " >&6; }
4117if test "$cross_compiling" != yes; then
4118  { { ac_try="$ac_link"
4119case "(($ac_try" in
4120  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4121  *) ac_try_echo=$ac_try;;
4122esac
4123eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4124$as_echo "$ac_try_echo"; } >&5
4125  (eval "$ac_link") 2>&5
4126  ac_status=$?
4127  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4128  test $ac_status = 0; }
4129  if { ac_try='./conftest$ac_cv_exeext'
4130  { { case "(($ac_try" in
4131  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4132  *) ac_try_echo=$ac_try;;
4133esac
4134eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4135$as_echo "$ac_try_echo"; } >&5
4136  (eval "$ac_try") 2>&5
4137  ac_status=$?
4138  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4139  test $ac_status = 0; }; }; then
4140    cross_compiling=no
4141  else
4142    if test "$cross_compiling" = maybe; then
4143	cross_compiling=yes
4144    else
4145	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4146$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4147as_fn_error $? "cannot run C compiled programs.
4148If you meant to cross compile, use \`--host'.
4149See \`config.log' for more details" "$LINENO" 5; }
4150    fi
4151  fi
4152fi
4153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4154$as_echo "$cross_compiling" >&6; }
4155
4156rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4157ac_clean_files=$ac_clean_files_save
4158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4159$as_echo_n "checking for suffix of object files... " >&6; }
4160if ${ac_cv_objext+:} false; then :
4161  $as_echo_n "(cached) " >&6
4162else
4163  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4164/* end confdefs.h.  */
4165
4166int
4167main ()
4168{
4169
4170  ;
4171  return 0;
4172}
4173_ACEOF
4174rm -f conftest.o conftest.obj
4175if { { ac_try="$ac_compile"
4176case "(($ac_try" in
4177  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4178  *) ac_try_echo=$ac_try;;
4179esac
4180eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4181$as_echo "$ac_try_echo"; } >&5
4182  (eval "$ac_compile") 2>&5
4183  ac_status=$?
4184  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4185  test $ac_status = 0; }; then :
4186  for ac_file in conftest.o conftest.obj conftest.*; do
4187  test -f "$ac_file" || continue;
4188  case $ac_file in
4189    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4190    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4191       break;;
4192  esac
4193done
4194else
4195  $as_echo "$as_me: failed program was:" >&5
4196sed 's/^/| /' conftest.$ac_ext >&5
4197
4198{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4199$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4200as_fn_error $? "cannot compute suffix of object files: cannot compile
4201See \`config.log' for more details" "$LINENO" 5; }
4202fi
4203rm -f conftest.$ac_cv_objext conftest.$ac_ext
4204fi
4205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4206$as_echo "$ac_cv_objext" >&6; }
4207OBJEXT=$ac_cv_objext
4208ac_objext=$OBJEXT
4209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4210$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4211if ${ac_cv_c_compiler_gnu+:} false; then :
4212  $as_echo_n "(cached) " >&6
4213else
4214  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4215/* end confdefs.h.  */
4216
4217int
4218main ()
4219{
4220#ifndef __GNUC__
4221       choke me
4222#endif
4223
4224  ;
4225  return 0;
4226}
4227_ACEOF
4228if ac_fn_c_try_compile "$LINENO"; then :
4229  ac_compiler_gnu=yes
4230else
4231  ac_compiler_gnu=no
4232fi
4233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4234ac_cv_c_compiler_gnu=$ac_compiler_gnu
4235
4236fi
4237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4238$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4239if test $ac_compiler_gnu = yes; then
4240  GCC=yes
4241else
4242  GCC=
4243fi
4244ac_test_CFLAGS=${CFLAGS+set}
4245ac_save_CFLAGS=$CFLAGS
4246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4247$as_echo_n "checking whether $CC accepts -g... " >&6; }
4248if ${ac_cv_prog_cc_g+:} false; then :
4249  $as_echo_n "(cached) " >&6
4250else
4251  ac_save_c_werror_flag=$ac_c_werror_flag
4252   ac_c_werror_flag=yes
4253   ac_cv_prog_cc_g=no
4254   CFLAGS="-g"
4255   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4256/* end confdefs.h.  */
4257
4258int
4259main ()
4260{
4261
4262  ;
4263  return 0;
4264}
4265_ACEOF
4266if ac_fn_c_try_compile "$LINENO"; then :
4267  ac_cv_prog_cc_g=yes
4268else
4269  CFLAGS=""
4270      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4271/* end confdefs.h.  */
4272
4273int
4274main ()
4275{
4276
4277  ;
4278  return 0;
4279}
4280_ACEOF
4281if ac_fn_c_try_compile "$LINENO"; then :
4282
4283else
4284  ac_c_werror_flag=$ac_save_c_werror_flag
4285	 CFLAGS="-g"
4286	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4287/* end confdefs.h.  */
4288
4289int
4290main ()
4291{
4292
4293  ;
4294  return 0;
4295}
4296_ACEOF
4297if ac_fn_c_try_compile "$LINENO"; then :
4298  ac_cv_prog_cc_g=yes
4299fi
4300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4301fi
4302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4303fi
4304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4305   ac_c_werror_flag=$ac_save_c_werror_flag
4306fi
4307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4308$as_echo "$ac_cv_prog_cc_g" >&6; }
4309if test "$ac_test_CFLAGS" = set; then
4310  CFLAGS=$ac_save_CFLAGS
4311elif test $ac_cv_prog_cc_g = yes; then
4312  if test "$GCC" = yes; then
4313    CFLAGS="-g -O2"
4314  else
4315    CFLAGS="-g"
4316  fi
4317else
4318  if test "$GCC" = yes; then
4319    CFLAGS="-O2"
4320  else
4321    CFLAGS=
4322  fi
4323fi
4324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4325$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4326if ${ac_cv_prog_cc_c89+:} false; then :
4327  $as_echo_n "(cached) " >&6
4328else
4329  ac_cv_prog_cc_c89=no
4330ac_save_CC=$CC
4331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4332/* end confdefs.h.  */
4333#include <stdarg.h>
4334#include <stdio.h>
4335struct stat;
4336/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4337struct buf { int x; };
4338FILE * (*rcsopen) (struct buf *, struct stat *, int);
4339static char *e (p, i)
4340     char **p;
4341     int i;
4342{
4343  return p[i];
4344}
4345static char *f (char * (*g) (char **, int), char **p, ...)
4346{
4347  char *s;
4348  va_list v;
4349  va_start (v,p);
4350  s = g (p, va_arg (v,int));
4351  va_end (v);
4352  return s;
4353}
4354
4355/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4356   function prototypes and stuff, but not '\xHH' hex character constants.
4357   These don't provoke an error unfortunately, instead are silently treated
4358   as 'x'.  The following induces an error, until -std is added to get
4359   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4360   array size at least.  It's necessary to write '\x00'==0 to get something
4361   that's true only with -std.  */
4362int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4363
4364/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4365   inside strings and character constants.  */
4366#define FOO(x) 'x'
4367int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4368
4369int test (int i, double x);
4370struct s1 {int (*f) (int a);};
4371struct s2 {int (*f) (double a);};
4372int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4373int argc;
4374char **argv;
4375int
4376main ()
4377{
4378return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4379  ;
4380  return 0;
4381}
4382_ACEOF
4383for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4384	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4385do
4386  CC="$ac_save_CC $ac_arg"
4387  if ac_fn_c_try_compile "$LINENO"; then :
4388  ac_cv_prog_cc_c89=$ac_arg
4389fi
4390rm -f core conftest.err conftest.$ac_objext
4391  test "x$ac_cv_prog_cc_c89" != "xno" && break
4392done
4393rm -f conftest.$ac_ext
4394CC=$ac_save_CC
4395
4396fi
4397# AC_CACHE_VAL
4398case "x$ac_cv_prog_cc_c89" in
4399  x)
4400    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4401$as_echo "none needed" >&6; } ;;
4402  xno)
4403    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4404$as_echo "unsupported" >&6; } ;;
4405  *)
4406    CC="$CC $ac_cv_prog_cc_c89"
4407    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4408$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4409esac
4410if test "x$ac_cv_prog_cc_c89" != xno; then :
4411
4412fi
4413
4414ac_ext=c
4415ac_cpp='$CPP $CPPFLAGS'
4416ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4417ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4418ac_compiler_gnu=$ac_cv_c_compiler_gnu
4419
4420   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4421$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4422if ${ac_cv_prog_cc_c99+:} false; then :
4423  $as_echo_n "(cached) " >&6
4424else
4425  ac_cv_prog_cc_c99=no
4426ac_save_CC=$CC
4427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4428/* end confdefs.h.  */
4429#include <stdarg.h>
4430#include <stdbool.h>
4431#include <stdlib.h>
4432#include <wchar.h>
4433#include <stdio.h>
4434
4435// Check varargs macros.  These examples are taken from C99 6.10.3.5.
4436#define debug(...) fprintf (stderr, __VA_ARGS__)
4437#define showlist(...) puts (#__VA_ARGS__)
4438#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4439static void
4440test_varargs_macros (void)
4441{
4442  int x = 1234;
4443  int y = 5678;
4444  debug ("Flag");
4445  debug ("X = %d\n", x);
4446  showlist (The first, second, and third items.);
4447  report (x>y, "x is %d but y is %d", x, y);
4448}
4449
4450// Check long long types.
4451#define BIG64 18446744073709551615ull
4452#define BIG32 4294967295ul
4453#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4454#if !BIG_OK
4455  your preprocessor is broken;
4456#endif
4457#if BIG_OK
4458#else
4459  your preprocessor is broken;
4460#endif
4461static long long int bignum = -9223372036854775807LL;
4462static unsigned long long int ubignum = BIG64;
4463
4464struct incomplete_array
4465{
4466  int datasize;
4467  double data[];
4468};
4469
4470struct named_init {
4471  int number;
4472  const wchar_t *name;
4473  double average;
4474};
4475
4476typedef const char *ccp;
4477
4478static inline int
4479test_restrict (ccp restrict text)
4480{
4481  // See if C++-style comments work.
4482  // Iterate through items via the restricted pointer.
4483  // Also check for declarations in for loops.
4484  for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4485    continue;
4486  return 0;
4487}
4488
4489// Check varargs and va_copy.
4490static void
4491test_varargs (const char *format, ...)
4492{
4493  va_list args;
4494  va_start (args, format);
4495  va_list args_copy;
4496  va_copy (args_copy, args);
4497
4498  const char *str;
4499  int number;
4500  float fnumber;
4501
4502  while (*format)
4503    {
4504      switch (*format++)
4505	{
4506	case 's': // string
4507	  str = va_arg (args_copy, const char *);
4508	  break;
4509	case 'd': // int
4510	  number = va_arg (args_copy, int);
4511	  break;
4512	case 'f': // float
4513	  fnumber = va_arg (args_copy, double);
4514	  break;
4515	default:
4516	  break;
4517	}
4518    }
4519  va_end (args_copy);
4520  va_end (args);
4521}
4522
4523int
4524main ()
4525{
4526
4527  // Check bool.
4528  _Bool success = false;
4529
4530  // Check restrict.
4531  if (test_restrict ("String literal") == 0)
4532    success = true;
4533  char *restrict newvar = "Another string";
4534
4535  // Check varargs.
4536  test_varargs ("s, d' f .", "string", 65, 34.234);
4537  test_varargs_macros ();
4538
4539  // Check flexible array members.
4540  struct incomplete_array *ia =
4541    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4542  ia->datasize = 10;
4543  for (int i = 0; i < ia->datasize; ++i)
4544    ia->data[i] = i * 1.234;
4545
4546  // Check named initializers.
4547  struct named_init ni = {
4548    .number = 34,
4549    .name = L"Test wide string",
4550    .average = 543.34343,
4551  };
4552
4553  ni.number = 58;
4554
4555  int dynamic_array[ni.number];
4556  dynamic_array[ni.number - 1] = 543;
4557
4558  // work around unused variable warnings
4559  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4560	  || dynamic_array[ni.number - 1] != 543);
4561
4562  ;
4563  return 0;
4564}
4565_ACEOF
4566for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4567do
4568  CC="$ac_save_CC $ac_arg"
4569  if ac_fn_c_try_compile "$LINENO"; then :
4570  ac_cv_prog_cc_c99=$ac_arg
4571fi
4572rm -f core conftest.err conftest.$ac_objext
4573  test "x$ac_cv_prog_cc_c99" != "xno" && break
4574done
4575rm -f conftest.$ac_ext
4576CC=$ac_save_CC
4577
4578fi
4579# AC_CACHE_VAL
4580case "x$ac_cv_prog_cc_c99" in
4581  x)
4582    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4583$as_echo "none needed" >&6; } ;;
4584  xno)
4585    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4586$as_echo "unsupported" >&6; } ;;
4587  *)
4588    CC="$CC $ac_cv_prog_cc_c99"
4589    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4590$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4591esac
4592if test "x$ac_cv_prog_cc_c99" != xno; then :
4593
4594fi
4595
4596
4597
4598# Error out if the compiler does not support C99, as the codebase
4599# relies on that.
4600if test "$ac_cv_prog_cc_c99" = no; then
4601    as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4602fi
4603
4604ac_ext=cpp
4605ac_cpp='$CXXCPP $CPPFLAGS'
4606ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4607ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4608ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4609if test -z "$CXX"; then
4610  if test -n "$CCC"; then
4611    CXX=$CCC
4612  else
4613    if test -n "$ac_tool_prefix"; then
4614  for ac_prog in $pgac_cxx_list
4615  do
4616    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4617set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4619$as_echo_n "checking for $ac_word... " >&6; }
4620if ${ac_cv_prog_CXX+:} false; then :
4621  $as_echo_n "(cached) " >&6
4622else
4623  if test -n "$CXX"; then
4624  ac_cv_prog_CXX="$CXX" # Let the user override the test.
4625else
4626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4627for as_dir in $PATH
4628do
4629  IFS=$as_save_IFS
4630  test -z "$as_dir" && as_dir=.
4631    for ac_exec_ext in '' $ac_executable_extensions; do
4632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4633    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4635    break 2
4636  fi
4637done
4638  done
4639IFS=$as_save_IFS
4640
4641fi
4642fi
4643CXX=$ac_cv_prog_CXX
4644if test -n "$CXX"; then
4645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4646$as_echo "$CXX" >&6; }
4647else
4648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4649$as_echo "no" >&6; }
4650fi
4651
4652
4653    test -n "$CXX" && break
4654  done
4655fi
4656if test -z "$CXX"; then
4657  ac_ct_CXX=$CXX
4658  for ac_prog in $pgac_cxx_list
4659do
4660  # Extract the first word of "$ac_prog", so it can be a program name with args.
4661set dummy $ac_prog; ac_word=$2
4662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4663$as_echo_n "checking for $ac_word... " >&6; }
4664if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4665  $as_echo_n "(cached) " >&6
4666else
4667  if test -n "$ac_ct_CXX"; then
4668  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4669else
4670as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4671for as_dir in $PATH
4672do
4673  IFS=$as_save_IFS
4674  test -z "$as_dir" && as_dir=.
4675    for ac_exec_ext in '' $ac_executable_extensions; do
4676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4677    ac_cv_prog_ac_ct_CXX="$ac_prog"
4678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4679    break 2
4680  fi
4681done
4682  done
4683IFS=$as_save_IFS
4684
4685fi
4686fi
4687ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4688if test -n "$ac_ct_CXX"; then
4689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4690$as_echo "$ac_ct_CXX" >&6; }
4691else
4692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4693$as_echo "no" >&6; }
4694fi
4695
4696
4697  test -n "$ac_ct_CXX" && break
4698done
4699
4700  if test "x$ac_ct_CXX" = x; then
4701    CXX="g++"
4702  else
4703    case $cross_compiling:$ac_tool_warned in
4704yes:)
4705{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4706$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4707ac_tool_warned=yes ;;
4708esac
4709    CXX=$ac_ct_CXX
4710  fi
4711fi
4712
4713  fi
4714fi
4715# Provide some information about the compiler.
4716$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4717set X $ac_compile
4718ac_compiler=$2
4719for ac_option in --version -v -V -qversion; do
4720  { { ac_try="$ac_compiler $ac_option >&5"
4721case "(($ac_try" in
4722  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4723  *) ac_try_echo=$ac_try;;
4724esac
4725eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4726$as_echo "$ac_try_echo"; } >&5
4727  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4728  ac_status=$?
4729  if test -s conftest.err; then
4730    sed '10a\
4731... rest of stderr output deleted ...
4732         10q' conftest.err >conftest.er1
4733    cat conftest.er1 >&5
4734  fi
4735  rm -f conftest.er1 conftest.err
4736  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4737  test $ac_status = 0; }
4738done
4739
4740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4741$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4742if ${ac_cv_cxx_compiler_gnu+:} false; then :
4743  $as_echo_n "(cached) " >&6
4744else
4745  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4746/* end confdefs.h.  */
4747
4748int
4749main ()
4750{
4751#ifndef __GNUC__
4752       choke me
4753#endif
4754
4755  ;
4756  return 0;
4757}
4758_ACEOF
4759if ac_fn_cxx_try_compile "$LINENO"; then :
4760  ac_compiler_gnu=yes
4761else
4762  ac_compiler_gnu=no
4763fi
4764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4765ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4766
4767fi
4768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4769$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4770if test $ac_compiler_gnu = yes; then
4771  GXX=yes
4772else
4773  GXX=
4774fi
4775ac_test_CXXFLAGS=${CXXFLAGS+set}
4776ac_save_CXXFLAGS=$CXXFLAGS
4777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4778$as_echo_n "checking whether $CXX accepts -g... " >&6; }
4779if ${ac_cv_prog_cxx_g+:} false; then :
4780  $as_echo_n "(cached) " >&6
4781else
4782  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4783   ac_cxx_werror_flag=yes
4784   ac_cv_prog_cxx_g=no
4785   CXXFLAGS="-g"
4786   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4787/* end confdefs.h.  */
4788
4789int
4790main ()
4791{
4792
4793  ;
4794  return 0;
4795}
4796_ACEOF
4797if ac_fn_cxx_try_compile "$LINENO"; then :
4798  ac_cv_prog_cxx_g=yes
4799else
4800  CXXFLAGS=""
4801      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4802/* end confdefs.h.  */
4803
4804int
4805main ()
4806{
4807
4808  ;
4809  return 0;
4810}
4811_ACEOF
4812if ac_fn_cxx_try_compile "$LINENO"; then :
4813
4814else
4815  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4816	 CXXFLAGS="-g"
4817	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4818/* end confdefs.h.  */
4819
4820int
4821main ()
4822{
4823
4824  ;
4825  return 0;
4826}
4827_ACEOF
4828if ac_fn_cxx_try_compile "$LINENO"; then :
4829  ac_cv_prog_cxx_g=yes
4830fi
4831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4832fi
4833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4834fi
4835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4836   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4837fi
4838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4839$as_echo "$ac_cv_prog_cxx_g" >&6; }
4840if test "$ac_test_CXXFLAGS" = set; then
4841  CXXFLAGS=$ac_save_CXXFLAGS
4842elif test $ac_cv_prog_cxx_g = yes; then
4843  if test "$GXX" = yes; then
4844    CXXFLAGS="-g -O2"
4845  else
4846    CXXFLAGS="-g"
4847  fi
4848else
4849  if test "$GXX" = yes; then
4850    CXXFLAGS="-O2"
4851  else
4852    CXXFLAGS=
4853  fi
4854fi
4855ac_ext=c
4856ac_cpp='$CPP $CPPFLAGS'
4857ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4858ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4859ac_compiler_gnu=$ac_cv_c_compiler_gnu
4860
4861
4862# Check if it's Intel's compiler, which (usually) pretends to be gcc,
4863# but has idiosyncrasies of its own.  We assume icc will define
4864# __INTEL_COMPILER regardless of CFLAGS.
4865
4866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4867/* end confdefs.h.  */
4868
4869int
4870main ()
4871{
4872#ifndef __INTEL_COMPILER
4873choke me
4874#endif
4875  ;
4876  return 0;
4877}
4878_ACEOF
4879if ac_fn_c_try_compile "$LINENO"; then :
4880  ICC=yes
4881else
4882  ICC=no
4883fi
4884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4885
4886# Check if it's Sun Studio compiler. We assume that
4887# __SUNPRO_C will be defined for Sun Studio compilers
4888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4889/* end confdefs.h.  */
4890
4891int
4892main ()
4893{
4894#ifndef __SUNPRO_C
4895choke me
4896#endif
4897  ;
4898  return 0;
4899}
4900_ACEOF
4901if ac_fn_c_try_compile "$LINENO"; then :
4902  SUN_STUDIO_CC=yes
4903else
4904  SUN_STUDIO_CC=no
4905fi
4906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4907
4908
4909
4910
4911#
4912# LLVM
4913#
4914# Checked early because subsequent tests depend on it.
4915
4916
4917
4918# Check whether --with-llvm was given.
4919if test "${with_llvm+set}" = set; then :
4920  withval=$with_llvm;
4921  case $withval in
4922    yes)
4923
4924$as_echo "#define USE_LLVM 1" >>confdefs.h
4925
4926      ;;
4927    no)
4928      :
4929      ;;
4930    *)
4931      as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4932      ;;
4933  esac
4934
4935else
4936  with_llvm=no
4937
4938fi
4939
4940
4941
4942for ac_prog in gawk mawk nawk awk
4943do
4944  # Extract the first word of "$ac_prog", so it can be a program name with args.
4945set dummy $ac_prog; ac_word=$2
4946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4947$as_echo_n "checking for $ac_word... " >&6; }
4948if ${ac_cv_prog_AWK+:} false; then :
4949  $as_echo_n "(cached) " >&6
4950else
4951  if test -n "$AWK"; then
4952  ac_cv_prog_AWK="$AWK" # Let the user override the test.
4953else
4954as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4955for as_dir in $PATH
4956do
4957  IFS=$as_save_IFS
4958  test -z "$as_dir" && as_dir=.
4959    for ac_exec_ext in '' $ac_executable_extensions; do
4960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4961    ac_cv_prog_AWK="$ac_prog"
4962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4963    break 2
4964  fi
4965done
4966  done
4967IFS=$as_save_IFS
4968
4969fi
4970fi
4971AWK=$ac_cv_prog_AWK
4972if test -n "$AWK"; then
4973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4974$as_echo "$AWK" >&6; }
4975else
4976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4977$as_echo "no" >&6; }
4978fi
4979
4980
4981  test -n "$AWK" && break
4982done
4983
4984if test "$with_llvm" = yes; then :
4985
4986
4987
4988
4989
4990  if test -z "$LLVM_CONFIG"; then
4991  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
4992do
4993  # Extract the first word of "$ac_prog", so it can be a program name with args.
4994set dummy $ac_prog; ac_word=$2
4995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4996$as_echo_n "checking for $ac_word... " >&6; }
4997if ${ac_cv_path_LLVM_CONFIG+:} false; then :
4998  $as_echo_n "(cached) " >&6
4999else
5000  case $LLVM_CONFIG in
5001  [\\/]* | ?:[\\/]*)
5002  ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
5003  ;;
5004  *)
5005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5006for as_dir in $PATH
5007do
5008  IFS=$as_save_IFS
5009  test -z "$as_dir" && as_dir=.
5010    for ac_exec_ext in '' $ac_executable_extensions; do
5011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5012    ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5014    break 2
5015  fi
5016done
5017  done
5018IFS=$as_save_IFS
5019
5020  ;;
5021esac
5022fi
5023LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5024if test -n "$LLVM_CONFIG"; then
5025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5026$as_echo "$LLVM_CONFIG" >&6; }
5027else
5028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5029$as_echo "no" >&6; }
5030fi
5031
5032
5033  test -n "$LLVM_CONFIG" && break
5034done
5035
5036else
5037  # Report the value of LLVM_CONFIG in configure's output in all cases.
5038  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5039$as_echo_n "checking for LLVM_CONFIG... " >&6; }
5040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5041$as_echo "$LLVM_CONFIG" >&6; }
5042fi
5043
5044
5045  # no point continuing if llvm wasn't found
5046  if test -z "$LLVM_CONFIG"; then
5047    as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5048  fi
5049  # check if detected $LLVM_CONFIG is executable
5050  pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5051  if test "x$pgac_llvm_version" = "xno"; then
5052    as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5053  fi
5054  # and whether the version is supported
5055  if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 4 || ($1 == 3 && $2 >= 9)) exit 1; else exit 0;}';then
5056    as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 3.9 is required" "$LINENO" 5
5057  fi
5058
5059  # need clang to create some bitcode files
5060
5061  if test -z "$CLANG"; then
5062  for ac_prog in clang clang-7 clang-6.0 clang-5.0 clang-4.0 clang-3.9
5063do
5064  # Extract the first word of "$ac_prog", so it can be a program name with args.
5065set dummy $ac_prog; ac_word=$2
5066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5067$as_echo_n "checking for $ac_word... " >&6; }
5068if ${ac_cv_path_CLANG+:} false; then :
5069  $as_echo_n "(cached) " >&6
5070else
5071  case $CLANG in
5072  [\\/]* | ?:[\\/]*)
5073  ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5074  ;;
5075  *)
5076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5077for as_dir in $PATH
5078do
5079  IFS=$as_save_IFS
5080  test -z "$as_dir" && as_dir=.
5081    for ac_exec_ext in '' $ac_executable_extensions; do
5082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5083    ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5085    break 2
5086  fi
5087done
5088  done
5089IFS=$as_save_IFS
5090
5091  ;;
5092esac
5093fi
5094CLANG=$ac_cv_path_CLANG
5095if test -n "$CLANG"; then
5096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5097$as_echo "$CLANG" >&6; }
5098else
5099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5100$as_echo "no" >&6; }
5101fi
5102
5103
5104  test -n "$CLANG" && break
5105done
5106
5107else
5108  # Report the value of CLANG in configure's output in all cases.
5109  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5110$as_echo_n "checking for CLANG... " >&6; }
5111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5112$as_echo "$CLANG" >&6; }
5113fi
5114
5115  if test -z "$CLANG"; then
5116    as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5117  fi
5118  # make sure clang is executable
5119  if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5120    as_fn_error $? "$CLANG does not work" "$LINENO" 5
5121  fi
5122  # Could check clang version, but it doesn't seem that
5123  # important. Systems with a new enough LLVM version are usually
5124  # going to have a decent clang version too. It's also not entirely
5125  # clear what the minimum version is.
5126
5127  # Collect compiler flags necessary to build the LLVM dependent
5128  # shared library.
5129  for pgac_option in `$LLVM_CONFIG --cppflags`; do
5130    case $pgac_option in
5131      -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5132    esac
5133  done
5134
5135  for pgac_option in `$LLVM_CONFIG --ldflags`; do
5136    case $pgac_option in
5137      -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5138    esac
5139  done
5140
5141  # ABI influencing options, standard influencing options
5142  for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5143    case $pgac_option in
5144      -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5145      -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5146    esac
5147  done
5148
5149  # Look for components we're interested in, collect necessary
5150  # libs. As some components are optional, we can't just list all of
5151  # them as it'd raise an error.
5152  pgac_components='';
5153  for pgac_component in `$LLVM_CONFIG --components`; do
5154    case $pgac_component in
5155      engine) pgac_components="$pgac_components $pgac_component";;
5156      debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5157      orcjit) pgac_components="$pgac_components $pgac_component";;
5158      passes) pgac_components="$pgac_components $pgac_component";;
5159      native) pgac_components="$pgac_components $pgac_component";;
5160      perfjitevents) pgac_components="$pgac_components $pgac_component";;
5161    esac
5162  done;
5163
5164  # And then get the libraries that need to be linked in for the
5165  # selected components.  They're large libraries, we only want to
5166  # link them into the LLVM using shared library.
5167  for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5168    case $pgac_option in
5169      -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5170    esac
5171  done
5172
5173  LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183fi # fi
5184
5185
5186unset CFLAGS
5187unset CXXFLAGS
5188
5189#
5190# Read the template
5191#
5192. "$srcdir/src/template/$template" || exit
5193
5194# C[XX]FLAGS are selected so:
5195# If the user specifies something in the environment, that is used.
5196# else:  If the template file set something, that is used.
5197# else:  If coverage was enabled, don't set anything.
5198# else:  If the compiler is GCC, then we use -O2.
5199# else:  If the compiler is something else, then we use -O, unless debugging.
5200
5201if test "$ac_env_CFLAGS_set" = set; then
5202  CFLAGS=$ac_env_CFLAGS_value
5203elif test "${CFLAGS+set}" = set; then
5204  : # (keep what template set)
5205elif test "$enable_coverage" = yes; then
5206  : # no optimization by default
5207elif test "$GCC" = yes; then
5208  CFLAGS="-O2"
5209else
5210  # if the user selected debug mode, don't use -O
5211  if test "$enable_debug" != yes; then
5212    CFLAGS="-O"
5213  fi
5214fi
5215
5216if test "$ac_env_CXXFLAGS_set" = set; then
5217  CXXFLAGS=$ac_env_CXXFLAGS_value
5218elif test "${CXXFLAGS+set}" = set; then
5219  : # (keep what template set)
5220elif test "$enable_coverage" = yes; then
5221  : # no optimization by default
5222elif test "$GCC" = yes; then
5223  CXXFLAGS="-O2"
5224else
5225  # if the user selected debug mode, don't use -O
5226  if test "$enable_debug" != yes; then
5227    CXXFLAGS="-O"
5228  fi
5229fi
5230
5231# When generating bitcode (for inlining) we always want to use -O2
5232# even when --enable-debug is specified. The bitcode it's not going to
5233# be used for line-by-line debugging, and JIT inlining doesn't work
5234# without at least -O1 (otherwise clang will emit 'noinline'
5235# attributes everywhere), which is bad for testing.  Still allow the
5236# environment to override if done explicitly.
5237if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5238  BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5239else
5240  BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5241fi
5242if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5243  BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5244else
5245  BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5246fi
5247
5248# C[XX]FLAGS we determined above will be added back at the end
5249user_CFLAGS=$CFLAGS
5250CFLAGS=""
5251user_CXXFLAGS=$CXXFLAGS
5252CXXFLAGS=""
5253user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5254BITCODE_CFLAGS=""
5255user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5256BITCODE_CXXFLAGS=""
5257
5258# set CFLAGS_VECTOR from the environment, if available
5259if test "$ac_env_CFLAGS_VECTOR_set" = set; then
5260  CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
5261fi
5262
5263# Some versions of GCC support some additional useful warning flags.
5264# Check whether they are supported, and add them to CFLAGS if so.
5265# ICC pretends to be GCC but it's lying; it doesn't support these flags,
5266# but has its own.  Also check other compiler-specific flags here.
5267
5268if test "$GCC" = yes -a "$ICC" = no; then
5269  CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5270  CXXFLAGS="-Wall -Wpointer-arith"
5271  # These work in some but not all gcc versions
5272  save_CFLAGS=$CFLAGS
5273
5274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5275$as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5276if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5277  $as_echo_n "(cached) " >&6
5278else
5279  pgac_save_CFLAGS=$CFLAGS
5280pgac_save_CC=$CC
5281CC=${CC}
5282CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5283ac_save_c_werror_flag=$ac_c_werror_flag
5284ac_c_werror_flag=yes
5285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5286/* end confdefs.h.  */
5287
5288int
5289main ()
5290{
5291
5292  ;
5293  return 0;
5294}
5295_ACEOF
5296if ac_fn_c_try_compile "$LINENO"; then :
5297  pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5298else
5299  pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5300fi
5301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5302ac_c_werror_flag=$ac_save_c_werror_flag
5303CFLAGS="$pgac_save_CFLAGS"
5304CC="$pgac_save_CC"
5305fi
5306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5307$as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5308if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5309  CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5310fi
5311
5312
5313  # -Wdeclaration-after-statement isn't applicable for C++.  Specific C files
5314  # disable it, so AC_SUBST the negative form.
5315  PERMIT_DECLARATION_AFTER_STATEMENT=
5316  if test x"$save_CFLAGS" != x"$CFLAGS"; then
5317    PERMIT_DECLARATION_AFTER_STATEMENT=-Wno-declaration-after-statement
5318  fi
5319
5320  # Really don't want VLAs to be used in our dialect of C
5321
5322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5323$as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5324if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5325  $as_echo_n "(cached) " >&6
5326else
5327  pgac_save_CFLAGS=$CFLAGS
5328pgac_save_CC=$CC
5329CC=${CC}
5330CFLAGS="${CFLAGS} -Werror=vla"
5331ac_save_c_werror_flag=$ac_c_werror_flag
5332ac_c_werror_flag=yes
5333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5334/* end confdefs.h.  */
5335
5336int
5337main ()
5338{
5339
5340  ;
5341  return 0;
5342}
5343_ACEOF
5344if ac_fn_c_try_compile "$LINENO"; then :
5345  pgac_cv_prog_CC_cflags__Werror_vla=yes
5346else
5347  pgac_cv_prog_CC_cflags__Werror_vla=no
5348fi
5349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5350ac_c_werror_flag=$ac_save_c_werror_flag
5351CFLAGS="$pgac_save_CFLAGS"
5352CC="$pgac_save_CC"
5353fi
5354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5355$as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5356if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5357  CFLAGS="${CFLAGS} -Werror=vla"
5358fi
5359
5360
5361  # -Wvla is not applicable for C++
5362
5363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5364$as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5365if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5366  $as_echo_n "(cached) " >&6
5367else
5368  pgac_save_CFLAGS=$CFLAGS
5369pgac_save_CC=$CC
5370CC=${CC}
5371CFLAGS="${CFLAGS} -Wendif-labels"
5372ac_save_c_werror_flag=$ac_c_werror_flag
5373ac_c_werror_flag=yes
5374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5375/* end confdefs.h.  */
5376
5377int
5378main ()
5379{
5380
5381  ;
5382  return 0;
5383}
5384_ACEOF
5385if ac_fn_c_try_compile "$LINENO"; then :
5386  pgac_cv_prog_CC_cflags__Wendif_labels=yes
5387else
5388  pgac_cv_prog_CC_cflags__Wendif_labels=no
5389fi
5390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5391ac_c_werror_flag=$ac_save_c_werror_flag
5392CFLAGS="$pgac_save_CFLAGS"
5393CC="$pgac_save_CC"
5394fi
5395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5396$as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5397if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5398  CFLAGS="${CFLAGS} -Wendif-labels"
5399fi
5400
5401
5402  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5403$as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5404if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5405  $as_echo_n "(cached) " >&6
5406else
5407  pgac_save_CXXFLAGS=$CXXFLAGS
5408pgac_save_CXX=$CXX
5409CXX=${CXX}
5410CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5411ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5412ac_cxx_werror_flag=yes
5413ac_ext=cpp
5414ac_cpp='$CXXCPP $CPPFLAGS'
5415ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5416ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5417ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5418
5419cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5420/* end confdefs.h.  */
5421
5422int
5423main ()
5424{
5425
5426  ;
5427  return 0;
5428}
5429_ACEOF
5430if ac_fn_cxx_try_compile "$LINENO"; then :
5431  pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5432else
5433  pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5434fi
5435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5436ac_ext=c
5437ac_cpp='$CPP $CPPFLAGS'
5438ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5439ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5440ac_compiler_gnu=$ac_cv_c_compiler_gnu
5441
5442ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5443CXXFLAGS="$pgac_save_CXXFLAGS"
5444CXX="$pgac_save_CXX"
5445fi
5446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5447$as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5448if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5449  CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5450fi
5451
5452
5453
5454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5455$as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5456if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5457  $as_echo_n "(cached) " >&6
5458else
5459  pgac_save_CFLAGS=$CFLAGS
5460pgac_save_CC=$CC
5461CC=${CC}
5462CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5463ac_save_c_werror_flag=$ac_c_werror_flag
5464ac_c_werror_flag=yes
5465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5466/* end confdefs.h.  */
5467
5468int
5469main ()
5470{
5471
5472  ;
5473  return 0;
5474}
5475_ACEOF
5476if ac_fn_c_try_compile "$LINENO"; then :
5477  pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5478else
5479  pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5480fi
5481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5482ac_c_werror_flag=$ac_save_c_werror_flag
5483CFLAGS="$pgac_save_CFLAGS"
5484CC="$pgac_save_CC"
5485fi
5486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5487$as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5488if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5489  CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5490fi
5491
5492
5493  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5494$as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5495if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5496  $as_echo_n "(cached) " >&6
5497else
5498  pgac_save_CXXFLAGS=$CXXFLAGS
5499pgac_save_CXX=$CXX
5500CXX=${CXX}
5501CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5502ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5503ac_cxx_werror_flag=yes
5504ac_ext=cpp
5505ac_cpp='$CXXCPP $CPPFLAGS'
5506ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5507ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5508ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5509
5510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5511/* end confdefs.h.  */
5512
5513int
5514main ()
5515{
5516
5517  ;
5518  return 0;
5519}
5520_ACEOF
5521if ac_fn_cxx_try_compile "$LINENO"; then :
5522  pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5523else
5524  pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5525fi
5526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5527ac_ext=c
5528ac_cpp='$CPP $CPPFLAGS'
5529ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5530ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5531ac_compiler_gnu=$ac_cv_c_compiler_gnu
5532
5533ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5534CXXFLAGS="$pgac_save_CXXFLAGS"
5535CXX="$pgac_save_CXX"
5536fi
5537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5538$as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5539if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5540  CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5541fi
5542
5543
5544  # This was included in -Wall/-Wformat in older GCC versions
5545
5546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5547$as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5548if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5549  $as_echo_n "(cached) " >&6
5550else
5551  pgac_save_CFLAGS=$CFLAGS
5552pgac_save_CC=$CC
5553CC=${CC}
5554CFLAGS="${CFLAGS} -Wformat-security"
5555ac_save_c_werror_flag=$ac_c_werror_flag
5556ac_c_werror_flag=yes
5557cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5558/* end confdefs.h.  */
5559
5560int
5561main ()
5562{
5563
5564  ;
5565  return 0;
5566}
5567_ACEOF
5568if ac_fn_c_try_compile "$LINENO"; then :
5569  pgac_cv_prog_CC_cflags__Wformat_security=yes
5570else
5571  pgac_cv_prog_CC_cflags__Wformat_security=no
5572fi
5573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5574ac_c_werror_flag=$ac_save_c_werror_flag
5575CFLAGS="$pgac_save_CFLAGS"
5576CC="$pgac_save_CC"
5577fi
5578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5579$as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5580if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5581  CFLAGS="${CFLAGS} -Wformat-security"
5582fi
5583
5584
5585  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5586$as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5587if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5588  $as_echo_n "(cached) " >&6
5589else
5590  pgac_save_CXXFLAGS=$CXXFLAGS
5591pgac_save_CXX=$CXX
5592CXX=${CXX}
5593CXXFLAGS="${CXXFLAGS} -Wformat-security"
5594ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5595ac_cxx_werror_flag=yes
5596ac_ext=cpp
5597ac_cpp='$CXXCPP $CPPFLAGS'
5598ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5599ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5600ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5601
5602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5603/* end confdefs.h.  */
5604
5605int
5606main ()
5607{
5608
5609  ;
5610  return 0;
5611}
5612_ACEOF
5613if ac_fn_cxx_try_compile "$LINENO"; then :
5614  pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
5615else
5616  pgac_cv_prog_CXX_cxxflags__Wformat_security=no
5617fi
5618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5619ac_ext=c
5620ac_cpp='$CPP $CPPFLAGS'
5621ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5622ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5623ac_compiler_gnu=$ac_cv_c_compiler_gnu
5624
5625ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5626CXXFLAGS="$pgac_save_CXXFLAGS"
5627CXX="$pgac_save_CXX"
5628fi
5629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
5630$as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
5631if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
5632  CXXFLAGS="${CXXFLAGS} -Wformat-security"
5633fi
5634
5635
5636  # Disable strict-aliasing rules; needed for gcc 3.3+
5637
5638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
5639$as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
5640if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
5641  $as_echo_n "(cached) " >&6
5642else
5643  pgac_save_CFLAGS=$CFLAGS
5644pgac_save_CC=$CC
5645CC=${CC}
5646CFLAGS="${CFLAGS} -fno-strict-aliasing"
5647ac_save_c_werror_flag=$ac_c_werror_flag
5648ac_c_werror_flag=yes
5649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5650/* end confdefs.h.  */
5651
5652int
5653main ()
5654{
5655
5656  ;
5657  return 0;
5658}
5659_ACEOF
5660if ac_fn_c_try_compile "$LINENO"; then :
5661  pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
5662else
5663  pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
5664fi
5665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5666ac_c_werror_flag=$ac_save_c_werror_flag
5667CFLAGS="$pgac_save_CFLAGS"
5668CC="$pgac_save_CC"
5669fi
5670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
5671$as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
5672if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
5673  CFLAGS="${CFLAGS} -fno-strict-aliasing"
5674fi
5675
5676
5677  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
5678$as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
5679if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
5680  $as_echo_n "(cached) " >&6
5681else
5682  pgac_save_CXXFLAGS=$CXXFLAGS
5683pgac_save_CXX=$CXX
5684CXX=${CXX}
5685CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5686ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5687ac_cxx_werror_flag=yes
5688ac_ext=cpp
5689ac_cpp='$CXXCPP $CPPFLAGS'
5690ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5691ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5692ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5693
5694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5695/* end confdefs.h.  */
5696
5697int
5698main ()
5699{
5700
5701  ;
5702  return 0;
5703}
5704_ACEOF
5705if ac_fn_cxx_try_compile "$LINENO"; then :
5706  pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
5707else
5708  pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
5709fi
5710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5711ac_ext=c
5712ac_cpp='$CPP $CPPFLAGS'
5713ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5714ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5715ac_compiler_gnu=$ac_cv_c_compiler_gnu
5716
5717ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5718CXXFLAGS="$pgac_save_CXXFLAGS"
5719CXX="$pgac_save_CXX"
5720fi
5721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
5722$as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
5723if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
5724  CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5725fi
5726
5727
5728  # Disable optimizations that assume no overflow; needed for gcc 4.3+
5729
5730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
5731$as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
5732if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
5733  $as_echo_n "(cached) " >&6
5734else
5735  pgac_save_CFLAGS=$CFLAGS
5736pgac_save_CC=$CC
5737CC=${CC}
5738CFLAGS="${CFLAGS} -fwrapv"
5739ac_save_c_werror_flag=$ac_c_werror_flag
5740ac_c_werror_flag=yes
5741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5742/* end confdefs.h.  */
5743
5744int
5745main ()
5746{
5747
5748  ;
5749  return 0;
5750}
5751_ACEOF
5752if ac_fn_c_try_compile "$LINENO"; then :
5753  pgac_cv_prog_CC_cflags__fwrapv=yes
5754else
5755  pgac_cv_prog_CC_cflags__fwrapv=no
5756fi
5757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5758ac_c_werror_flag=$ac_save_c_werror_flag
5759CFLAGS="$pgac_save_CFLAGS"
5760CC="$pgac_save_CC"
5761fi
5762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
5763$as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
5764if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
5765  CFLAGS="${CFLAGS} -fwrapv"
5766fi
5767
5768
5769  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
5770$as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
5771if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
5772  $as_echo_n "(cached) " >&6
5773else
5774  pgac_save_CXXFLAGS=$CXXFLAGS
5775pgac_save_CXX=$CXX
5776CXX=${CXX}
5777CXXFLAGS="${CXXFLAGS} -fwrapv"
5778ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5779ac_cxx_werror_flag=yes
5780ac_ext=cpp
5781ac_cpp='$CXXCPP $CPPFLAGS'
5782ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5783ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5784ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5785
5786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5787/* end confdefs.h.  */
5788
5789int
5790main ()
5791{
5792
5793  ;
5794  return 0;
5795}
5796_ACEOF
5797if ac_fn_cxx_try_compile "$LINENO"; then :
5798  pgac_cv_prog_CXX_cxxflags__fwrapv=yes
5799else
5800  pgac_cv_prog_CXX_cxxflags__fwrapv=no
5801fi
5802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5803ac_ext=c
5804ac_cpp='$CPP $CPPFLAGS'
5805ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5806ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5807ac_compiler_gnu=$ac_cv_c_compiler_gnu
5808
5809ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5810CXXFLAGS="$pgac_save_CXXFLAGS"
5811CXX="$pgac_save_CXX"
5812fi
5813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
5814$as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
5815if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
5816  CXXFLAGS="${CXXFLAGS} -fwrapv"
5817fi
5818
5819
5820  # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
5821
5822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
5823$as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
5824if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
5825  $as_echo_n "(cached) " >&6
5826else
5827  pgac_save_CFLAGS=$CFLAGS
5828pgac_save_CC=$CC
5829CC=${CC}
5830CFLAGS="${CFLAGS} -fexcess-precision=standard"
5831ac_save_c_werror_flag=$ac_c_werror_flag
5832ac_c_werror_flag=yes
5833cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5834/* end confdefs.h.  */
5835
5836int
5837main ()
5838{
5839
5840  ;
5841  return 0;
5842}
5843_ACEOF
5844if ac_fn_c_try_compile "$LINENO"; then :
5845  pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
5846else
5847  pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
5848fi
5849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5850ac_c_werror_flag=$ac_save_c_werror_flag
5851CFLAGS="$pgac_save_CFLAGS"
5852CC="$pgac_save_CC"
5853fi
5854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
5855$as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
5856if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
5857  CFLAGS="${CFLAGS} -fexcess-precision=standard"
5858fi
5859
5860
5861  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
5862$as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
5863if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
5864  $as_echo_n "(cached) " >&6
5865else
5866  pgac_save_CXXFLAGS=$CXXFLAGS
5867pgac_save_CXX=$CXX
5868CXX=${CXX}
5869CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5870ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5871ac_cxx_werror_flag=yes
5872ac_ext=cpp
5873ac_cpp='$CXXCPP $CPPFLAGS'
5874ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5875ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5876ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5877
5878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5879/* end confdefs.h.  */
5880
5881int
5882main ()
5883{
5884
5885  ;
5886  return 0;
5887}
5888_ACEOF
5889if ac_fn_cxx_try_compile "$LINENO"; then :
5890  pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
5891else
5892  pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
5893fi
5894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5895ac_ext=c
5896ac_cpp='$CPP $CPPFLAGS'
5897ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5898ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5899ac_compiler_gnu=$ac_cv_c_compiler_gnu
5900
5901ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5902CXXFLAGS="$pgac_save_CXXFLAGS"
5903CXX="$pgac_save_CXX"
5904fi
5905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
5906$as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
5907if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
5908  CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5909fi
5910
5911
5912  # Optimization flags for specific files that benefit from vectorization
5913  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR" >&5
5914$as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR... " >&6; }
5915if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
5916  $as_echo_n "(cached) " >&6
5917else
5918  pgac_save_CFLAGS=$CFLAGS
5919pgac_save_CC=$CC
5920CC=${CC}
5921CFLAGS="${CFLAGS_VECTOR} -funroll-loops"
5922ac_save_c_werror_flag=$ac_c_werror_flag
5923ac_c_werror_flag=yes
5924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5925/* end confdefs.h.  */
5926
5927int
5928main ()
5929{
5930
5931  ;
5932  return 0;
5933}
5934_ACEOF
5935if ac_fn_c_try_compile "$LINENO"; then :
5936  pgac_cv_prog_CC_cflags__funroll_loops=yes
5937else
5938  pgac_cv_prog_CC_cflags__funroll_loops=no
5939fi
5940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5941ac_c_werror_flag=$ac_save_c_werror_flag
5942CFLAGS="$pgac_save_CFLAGS"
5943CC="$pgac_save_CC"
5944fi
5945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
5946$as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
5947if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
5948  CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
5949fi
5950
5951
5952  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR" >&5
5953$as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR... " >&6; }
5954if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
5955  $as_echo_n "(cached) " >&6
5956else
5957  pgac_save_CFLAGS=$CFLAGS
5958pgac_save_CC=$CC
5959CC=${CC}
5960CFLAGS="${CFLAGS_VECTOR} -ftree-vectorize"
5961ac_save_c_werror_flag=$ac_c_werror_flag
5962ac_c_werror_flag=yes
5963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5964/* end confdefs.h.  */
5965
5966int
5967main ()
5968{
5969
5970  ;
5971  return 0;
5972}
5973_ACEOF
5974if ac_fn_c_try_compile "$LINENO"; then :
5975  pgac_cv_prog_CC_cflags__ftree_vectorize=yes
5976else
5977  pgac_cv_prog_CC_cflags__ftree_vectorize=no
5978fi
5979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5980ac_c_werror_flag=$ac_save_c_werror_flag
5981CFLAGS="$pgac_save_CFLAGS"
5982CC="$pgac_save_CC"
5983fi
5984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
5985$as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
5986if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
5987  CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
5988fi
5989
5990
5991  # We want to suppress clang's unhelpful unused-command-line-argument warnings
5992  # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
5993  # test for the positive form and if that works, add the negative form
5994  NOT_THE_CFLAGS=""
5995  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
5996$as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
5997if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
5998  $as_echo_n "(cached) " >&6
5999else
6000  pgac_save_CFLAGS=$CFLAGS
6001pgac_save_CC=$CC
6002CC=${CC}
6003CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6004ac_save_c_werror_flag=$ac_c_werror_flag
6005ac_c_werror_flag=yes
6006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6007/* end confdefs.h.  */
6008
6009int
6010main ()
6011{
6012
6013  ;
6014  return 0;
6015}
6016_ACEOF
6017if ac_fn_c_try_compile "$LINENO"; then :
6018  pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6019else
6020  pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6021fi
6022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6023ac_c_werror_flag=$ac_save_c_werror_flag
6024CFLAGS="$pgac_save_CFLAGS"
6025CC="$pgac_save_CC"
6026fi
6027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6028$as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6029if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6030  NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6031fi
6032
6033
6034  if test -n "$NOT_THE_CFLAGS"; then
6035    CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6036  fi
6037  # Similarly disable useless truncation warnings from gcc 8+
6038  NOT_THE_CFLAGS=""
6039  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6040$as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6041if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6042  $as_echo_n "(cached) " >&6
6043else
6044  pgac_save_CFLAGS=$CFLAGS
6045pgac_save_CC=$CC
6046CC=${CC}
6047CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6048ac_save_c_werror_flag=$ac_c_werror_flag
6049ac_c_werror_flag=yes
6050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6051/* end confdefs.h.  */
6052
6053int
6054main ()
6055{
6056
6057  ;
6058  return 0;
6059}
6060_ACEOF
6061if ac_fn_c_try_compile "$LINENO"; then :
6062  pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6063else
6064  pgac_cv_prog_CC_cflags__Wformat_truncation=no
6065fi
6066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6067ac_c_werror_flag=$ac_save_c_werror_flag
6068CFLAGS="$pgac_save_CFLAGS"
6069CC="$pgac_save_CC"
6070fi
6071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6072$as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6073if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6074  NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6075fi
6076
6077
6078  if test -n "$NOT_THE_CFLAGS"; then
6079    CFLAGS="$CFLAGS -Wno-format-truncation"
6080  fi
6081  NOT_THE_CFLAGS=""
6082  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6083$as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6084if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6085  $as_echo_n "(cached) " >&6
6086else
6087  pgac_save_CFLAGS=$CFLAGS
6088pgac_save_CC=$CC
6089CC=${CC}
6090CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6091ac_save_c_werror_flag=$ac_c_werror_flag
6092ac_c_werror_flag=yes
6093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6094/* end confdefs.h.  */
6095
6096int
6097main ()
6098{
6099
6100  ;
6101  return 0;
6102}
6103_ACEOF
6104if ac_fn_c_try_compile "$LINENO"; then :
6105  pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6106else
6107  pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6108fi
6109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6110ac_c_werror_flag=$ac_save_c_werror_flag
6111CFLAGS="$pgac_save_CFLAGS"
6112CC="$pgac_save_CC"
6113fi
6114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6115$as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6116if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6117  NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6118fi
6119
6120
6121  if test -n "$NOT_THE_CFLAGS"; then
6122    CFLAGS="$CFLAGS -Wno-stringop-truncation"
6123  fi
6124elif test "$ICC" = yes; then
6125  # Intel's compiler has a bug/misoptimization in checking for
6126  # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6127
6128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6129$as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6130if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6131  $as_echo_n "(cached) " >&6
6132else
6133  pgac_save_CFLAGS=$CFLAGS
6134pgac_save_CC=$CC
6135CC=${CC}
6136CFLAGS="${CFLAGS} -mp1"
6137ac_save_c_werror_flag=$ac_c_werror_flag
6138ac_c_werror_flag=yes
6139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6140/* end confdefs.h.  */
6141
6142int
6143main ()
6144{
6145
6146  ;
6147  return 0;
6148}
6149_ACEOF
6150if ac_fn_c_try_compile "$LINENO"; then :
6151  pgac_cv_prog_CC_cflags__mp1=yes
6152else
6153  pgac_cv_prog_CC_cflags__mp1=no
6154fi
6155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6156ac_c_werror_flag=$ac_save_c_werror_flag
6157CFLAGS="$pgac_save_CFLAGS"
6158CC="$pgac_save_CC"
6159fi
6160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6161$as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6162if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6163  CFLAGS="${CFLAGS} -mp1"
6164fi
6165
6166
6167  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6168$as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6169if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6170  $as_echo_n "(cached) " >&6
6171else
6172  pgac_save_CXXFLAGS=$CXXFLAGS
6173pgac_save_CXX=$CXX
6174CXX=${CXX}
6175CXXFLAGS="${CXXFLAGS} -mp1"
6176ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6177ac_cxx_werror_flag=yes
6178ac_ext=cpp
6179ac_cpp='$CXXCPP $CPPFLAGS'
6180ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6181ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6182ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6183
6184cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6185/* end confdefs.h.  */
6186
6187int
6188main ()
6189{
6190
6191  ;
6192  return 0;
6193}
6194_ACEOF
6195if ac_fn_cxx_try_compile "$LINENO"; then :
6196  pgac_cv_prog_CXX_cxxflags__mp1=yes
6197else
6198  pgac_cv_prog_CXX_cxxflags__mp1=no
6199fi
6200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6201ac_ext=c
6202ac_cpp='$CPP $CPPFLAGS'
6203ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6204ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6205ac_compiler_gnu=$ac_cv_c_compiler_gnu
6206
6207ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6208CXXFLAGS="$pgac_save_CXXFLAGS"
6209CXX="$pgac_save_CXX"
6210fi
6211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6212$as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6213if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6214  CXXFLAGS="${CXXFLAGS} -mp1"
6215fi
6216
6217
6218  # Make sure strict aliasing is off (though this is said to be the default)
6219
6220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6221$as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6222if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6223  $as_echo_n "(cached) " >&6
6224else
6225  pgac_save_CFLAGS=$CFLAGS
6226pgac_save_CC=$CC
6227CC=${CC}
6228CFLAGS="${CFLAGS} -fno-strict-aliasing"
6229ac_save_c_werror_flag=$ac_c_werror_flag
6230ac_c_werror_flag=yes
6231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6232/* end confdefs.h.  */
6233
6234int
6235main ()
6236{
6237
6238  ;
6239  return 0;
6240}
6241_ACEOF
6242if ac_fn_c_try_compile "$LINENO"; then :
6243  pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6244else
6245  pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6246fi
6247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6248ac_c_werror_flag=$ac_save_c_werror_flag
6249CFLAGS="$pgac_save_CFLAGS"
6250CC="$pgac_save_CC"
6251fi
6252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6253$as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6254if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6255  CFLAGS="${CFLAGS} -fno-strict-aliasing"
6256fi
6257
6258
6259  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6260$as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6261if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6262  $as_echo_n "(cached) " >&6
6263else
6264  pgac_save_CXXFLAGS=$CXXFLAGS
6265pgac_save_CXX=$CXX
6266CXX=${CXX}
6267CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6268ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6269ac_cxx_werror_flag=yes
6270ac_ext=cpp
6271ac_cpp='$CXXCPP $CPPFLAGS'
6272ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6273ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6274ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6275
6276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6277/* end confdefs.h.  */
6278
6279int
6280main ()
6281{
6282
6283  ;
6284  return 0;
6285}
6286_ACEOF
6287if ac_fn_cxx_try_compile "$LINENO"; then :
6288  pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6289else
6290  pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6291fi
6292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6293ac_ext=c
6294ac_cpp='$CPP $CPPFLAGS'
6295ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6296ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6297ac_compiler_gnu=$ac_cv_c_compiler_gnu
6298
6299ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6300CXXFLAGS="$pgac_save_CXXFLAGS"
6301CXX="$pgac_save_CXX"
6302fi
6303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6304$as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6305if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6306  CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6307fi
6308
6309
6310elif test "$PORTNAME" = "aix"; then
6311  # AIX's xlc has to have strict aliasing turned off too
6312
6313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6314$as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6315if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6316  $as_echo_n "(cached) " >&6
6317else
6318  pgac_save_CFLAGS=$CFLAGS
6319pgac_save_CC=$CC
6320CC=${CC}
6321CFLAGS="${CFLAGS} -qnoansialias"
6322ac_save_c_werror_flag=$ac_c_werror_flag
6323ac_c_werror_flag=yes
6324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6325/* end confdefs.h.  */
6326
6327int
6328main ()
6329{
6330
6331  ;
6332  return 0;
6333}
6334_ACEOF
6335if ac_fn_c_try_compile "$LINENO"; then :
6336  pgac_cv_prog_CC_cflags__qnoansialias=yes
6337else
6338  pgac_cv_prog_CC_cflags__qnoansialias=no
6339fi
6340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6341ac_c_werror_flag=$ac_save_c_werror_flag
6342CFLAGS="$pgac_save_CFLAGS"
6343CC="$pgac_save_CC"
6344fi
6345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6346$as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6347if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6348  CFLAGS="${CFLAGS} -qnoansialias"
6349fi
6350
6351
6352  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6353$as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6354if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6355  $as_echo_n "(cached) " >&6
6356else
6357  pgac_save_CXXFLAGS=$CXXFLAGS
6358pgac_save_CXX=$CXX
6359CXX=${CXX}
6360CXXFLAGS="${CXXFLAGS} -qnoansialias"
6361ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6362ac_cxx_werror_flag=yes
6363ac_ext=cpp
6364ac_cpp='$CXXCPP $CPPFLAGS'
6365ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6366ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6367ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6368
6369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6370/* end confdefs.h.  */
6371
6372int
6373main ()
6374{
6375
6376  ;
6377  return 0;
6378}
6379_ACEOF
6380if ac_fn_cxx_try_compile "$LINENO"; then :
6381  pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6382else
6383  pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6384fi
6385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6386ac_ext=c
6387ac_cpp='$CPP $CPPFLAGS'
6388ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6389ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6390ac_compiler_gnu=$ac_cv_c_compiler_gnu
6391
6392ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6393CXXFLAGS="$pgac_save_CXXFLAGS"
6394CXX="$pgac_save_CXX"
6395fi
6396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6397$as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6398if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6399  CXXFLAGS="${CXXFLAGS} -qnoansialias"
6400fi
6401
6402
6403
6404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6405$as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6406if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6407  $as_echo_n "(cached) " >&6
6408else
6409  pgac_save_CFLAGS=$CFLAGS
6410pgac_save_CC=$CC
6411CC=${CC}
6412CFLAGS="${CFLAGS} -qlonglong"
6413ac_save_c_werror_flag=$ac_c_werror_flag
6414ac_c_werror_flag=yes
6415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6416/* end confdefs.h.  */
6417
6418int
6419main ()
6420{
6421
6422  ;
6423  return 0;
6424}
6425_ACEOF
6426if ac_fn_c_try_compile "$LINENO"; then :
6427  pgac_cv_prog_CC_cflags__qlonglong=yes
6428else
6429  pgac_cv_prog_CC_cflags__qlonglong=no
6430fi
6431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6432ac_c_werror_flag=$ac_save_c_werror_flag
6433CFLAGS="$pgac_save_CFLAGS"
6434CC="$pgac_save_CC"
6435fi
6436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6437$as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6438if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6439  CFLAGS="${CFLAGS} -qlonglong"
6440fi
6441
6442
6443  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6444$as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6445if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6446  $as_echo_n "(cached) " >&6
6447else
6448  pgac_save_CXXFLAGS=$CXXFLAGS
6449pgac_save_CXX=$CXX
6450CXX=${CXX}
6451CXXFLAGS="${CXXFLAGS} -qlonglong"
6452ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6453ac_cxx_werror_flag=yes
6454ac_ext=cpp
6455ac_cpp='$CXXCPP $CPPFLAGS'
6456ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6457ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6458ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6459
6460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6461/* end confdefs.h.  */
6462
6463int
6464main ()
6465{
6466
6467  ;
6468  return 0;
6469}
6470_ACEOF
6471if ac_fn_cxx_try_compile "$LINENO"; then :
6472  pgac_cv_prog_CXX_cxxflags__qlonglong=yes
6473else
6474  pgac_cv_prog_CXX_cxxflags__qlonglong=no
6475fi
6476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6477ac_ext=c
6478ac_cpp='$CPP $CPPFLAGS'
6479ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6480ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6481ac_compiler_gnu=$ac_cv_c_compiler_gnu
6482
6483ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6484CXXFLAGS="$pgac_save_CXXFLAGS"
6485CXX="$pgac_save_CXX"
6486fi
6487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
6488$as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
6489if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
6490  CXXFLAGS="${CXXFLAGS} -qlonglong"
6491fi
6492
6493
6494elif test "$PORTNAME" = "hpux"; then
6495  # On some versions of HP-UX, libm functions do not set errno by default.
6496  # Fix that by using +Olibmerrno if the compiler recognizes it.
6497
6498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports +Olibmerrno, for CFLAGS" >&5
6499$as_echo_n "checking whether ${CC} supports +Olibmerrno, for CFLAGS... " >&6; }
6500if ${pgac_cv_prog_CC_cflags_pOlibmerrno+:} false; then :
6501  $as_echo_n "(cached) " >&6
6502else
6503  pgac_save_CFLAGS=$CFLAGS
6504pgac_save_CC=$CC
6505CC=${CC}
6506CFLAGS="${CFLAGS} +Olibmerrno"
6507ac_save_c_werror_flag=$ac_c_werror_flag
6508ac_c_werror_flag=yes
6509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6510/* end confdefs.h.  */
6511
6512int
6513main ()
6514{
6515
6516  ;
6517  return 0;
6518}
6519_ACEOF
6520if ac_fn_c_try_compile "$LINENO"; then :
6521  pgac_cv_prog_CC_cflags_pOlibmerrno=yes
6522else
6523  pgac_cv_prog_CC_cflags_pOlibmerrno=no
6524fi
6525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6526ac_c_werror_flag=$ac_save_c_werror_flag
6527CFLAGS="$pgac_save_CFLAGS"
6528CC="$pgac_save_CC"
6529fi
6530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags_pOlibmerrno" >&5
6531$as_echo "$pgac_cv_prog_CC_cflags_pOlibmerrno" >&6; }
6532if test x"$pgac_cv_prog_CC_cflags_pOlibmerrno" = x"yes"; then
6533  CFLAGS="${CFLAGS} +Olibmerrno"
6534fi
6535
6536
6537  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS" >&5
6538$as_echo_n "checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS... " >&6; }
6539if ${pgac_cv_prog_CXX_cxxflags_pOlibmerrno+:} false; then :
6540  $as_echo_n "(cached) " >&6
6541else
6542  pgac_save_CXXFLAGS=$CXXFLAGS
6543pgac_save_CXX=$CXX
6544CXX=${CXX}
6545CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6546ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6547ac_cxx_werror_flag=yes
6548ac_ext=cpp
6549ac_cpp='$CXXCPP $CPPFLAGS'
6550ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6551ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6552ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6553
6554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6555/* end confdefs.h.  */
6556
6557int
6558main ()
6559{
6560
6561  ;
6562  return 0;
6563}
6564_ACEOF
6565if ac_fn_cxx_try_compile "$LINENO"; then :
6566  pgac_cv_prog_CXX_cxxflags_pOlibmerrno=yes
6567else
6568  pgac_cv_prog_CXX_cxxflags_pOlibmerrno=no
6569fi
6570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6571ac_ext=c
6572ac_cpp='$CPP $CPPFLAGS'
6573ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6574ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6575ac_compiler_gnu=$ac_cv_c_compiler_gnu
6576
6577ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6578CXXFLAGS="$pgac_save_CXXFLAGS"
6579CXX="$pgac_save_CXX"
6580fi
6581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&5
6582$as_echo "$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&6; }
6583if test x"$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" = x"yes"; then
6584  CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6585fi
6586
6587
6588fi
6589
6590
6591
6592# Determine flags used to emit bitcode for JIT inlining. Need to test
6593# for behaviour changing compiler flags, to keep compatibility with
6594# compiler used for normal postgres code.
6595if test "$with_llvm" = yes ; then
6596  CLANGXX="$CLANG -xc++"
6597
6598  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
6599$as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
6600if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
6601  $as_echo_n "(cached) " >&6
6602else
6603  pgac_save_CFLAGS=$CFLAGS
6604pgac_save_CC=$CC
6605CC=${CLANG}
6606CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6607ac_save_c_werror_flag=$ac_c_werror_flag
6608ac_c_werror_flag=yes
6609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6610/* end confdefs.h.  */
6611
6612int
6613main ()
6614{
6615
6616  ;
6617  return 0;
6618}
6619_ACEOF
6620if ac_fn_c_try_compile "$LINENO"; then :
6621  pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
6622else
6623  pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
6624fi
6625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6626ac_c_werror_flag=$ac_save_c_werror_flag
6627CFLAGS="$pgac_save_CFLAGS"
6628CC="$pgac_save_CC"
6629fi
6630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
6631$as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
6632if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
6633  BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6634fi
6635
6636  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
6637$as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
6638if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
6639  $as_echo_n "(cached) " >&6
6640else
6641  pgac_save_CXXFLAGS=$CXXFLAGS
6642pgac_save_CXX=$CXX
6643CXX=${CLANGXX}
6644CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6645ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6646ac_cxx_werror_flag=yes
6647ac_ext=cpp
6648ac_cpp='$CXXCPP $CPPFLAGS'
6649ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6650ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6651ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6652
6653cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6654/* end confdefs.h.  */
6655
6656int
6657main ()
6658{
6659
6660  ;
6661  return 0;
6662}
6663_ACEOF
6664if ac_fn_cxx_try_compile "$LINENO"; then :
6665  pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
6666else
6667  pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
6668fi
6669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6670ac_ext=c
6671ac_cpp='$CPP $CPPFLAGS'
6672ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6673ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6674ac_compiler_gnu=$ac_cv_c_compiler_gnu
6675
6676ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6677CXXFLAGS="$pgac_save_CXXFLAGS"
6678CXX="$pgac_save_CXX"
6679fi
6680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
6681$as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
6682if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6683  BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6684fi
6685
6686  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
6687$as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
6688if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
6689  $as_echo_n "(cached) " >&6
6690else
6691  pgac_save_CFLAGS=$CFLAGS
6692pgac_save_CC=$CC
6693CC=${CLANG}
6694CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6695ac_save_c_werror_flag=$ac_c_werror_flag
6696ac_c_werror_flag=yes
6697cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6698/* end confdefs.h.  */
6699
6700int
6701main ()
6702{
6703
6704  ;
6705  return 0;
6706}
6707_ACEOF
6708if ac_fn_c_try_compile "$LINENO"; then :
6709  pgac_cv_prog_CLANG_cflags__fwrapv=yes
6710else
6711  pgac_cv_prog_CLANG_cflags__fwrapv=no
6712fi
6713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6714ac_c_werror_flag=$ac_save_c_werror_flag
6715CFLAGS="$pgac_save_CFLAGS"
6716CC="$pgac_save_CC"
6717fi
6718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
6719$as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
6720if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
6721  BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6722fi
6723
6724  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
6725$as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
6726if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
6727  $as_echo_n "(cached) " >&6
6728else
6729  pgac_save_CXXFLAGS=$CXXFLAGS
6730pgac_save_CXX=$CXX
6731CXX=${CLANGXX}
6732CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6733ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6734ac_cxx_werror_flag=yes
6735ac_ext=cpp
6736ac_cpp='$CXXCPP $CPPFLAGS'
6737ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6738ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6739ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6740
6741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6742/* end confdefs.h.  */
6743
6744int
6745main ()
6746{
6747
6748  ;
6749  return 0;
6750}
6751_ACEOF
6752if ac_fn_cxx_try_compile "$LINENO"; then :
6753  pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
6754else
6755  pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
6756fi
6757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6758ac_ext=c
6759ac_cpp='$CPP $CPPFLAGS'
6760ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6761ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6762ac_compiler_gnu=$ac_cv_c_compiler_gnu
6763
6764ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6765CXXFLAGS="$pgac_save_CXXFLAGS"
6766CXX="$pgac_save_CXX"
6767fi
6768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
6769$as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
6770if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
6771  BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6772fi
6773
6774  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
6775$as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
6776if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
6777  $as_echo_n "(cached) " >&6
6778else
6779  pgac_save_CFLAGS=$CFLAGS
6780pgac_save_CC=$CC
6781CC=${CLANG}
6782CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6783ac_save_c_werror_flag=$ac_c_werror_flag
6784ac_c_werror_flag=yes
6785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6786/* end confdefs.h.  */
6787
6788int
6789main ()
6790{
6791
6792  ;
6793  return 0;
6794}
6795_ACEOF
6796if ac_fn_c_try_compile "$LINENO"; then :
6797  pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
6798else
6799  pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
6800fi
6801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6802ac_c_werror_flag=$ac_save_c_werror_flag
6803CFLAGS="$pgac_save_CFLAGS"
6804CC="$pgac_save_CC"
6805fi
6806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
6807$as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
6808if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
6809  BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6810fi
6811
6812  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
6813$as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
6814if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
6815  $as_echo_n "(cached) " >&6
6816else
6817  pgac_save_CXXFLAGS=$CXXFLAGS
6818pgac_save_CXX=$CXX
6819CXX=${CLANGXX}
6820CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6821ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6822ac_cxx_werror_flag=yes
6823ac_ext=cpp
6824ac_cpp='$CXXCPP $CPPFLAGS'
6825ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6826ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6827ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6828
6829cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6830/* end confdefs.h.  */
6831
6832int
6833main ()
6834{
6835
6836  ;
6837  return 0;
6838}
6839_ACEOF
6840if ac_fn_cxx_try_compile "$LINENO"; then :
6841  pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
6842else
6843  pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
6844fi
6845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6846ac_ext=c
6847ac_cpp='$CPP $CPPFLAGS'
6848ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6849ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6850ac_compiler_gnu=$ac_cv_c_compiler_gnu
6851
6852ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6853CXXFLAGS="$pgac_save_CXXFLAGS"
6854CXX="$pgac_save_CXX"
6855fi
6856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
6857$as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
6858if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6859  BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6860fi
6861
6862fi
6863
6864# supply -g if --enable-debug
6865if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
6866  CFLAGS="$CFLAGS -g"
6867fi
6868
6869if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
6870  CXXFLAGS="$CXXFLAGS -g"
6871fi
6872
6873# enable code coverage if --enable-coverage
6874if test "$enable_coverage" = yes; then
6875  if test "$GCC" = yes; then
6876    CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
6877    CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
6878  else
6879    as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
6880  fi
6881fi
6882
6883# enable profiling if --enable-profiling
6884if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
6885  if test "$GCC" = yes; then
6886
6887$as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
6888
6889    CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6890    CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6891  else
6892    as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
6893  fi
6894fi
6895
6896# We already have this in Makefile.win32, but configure needs it too
6897if test "$PORTNAME" = "win32"; then
6898  CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
6899fi
6900
6901# Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
6902# user-specified flags (if any) at the end.  This lets users override
6903# the automatic additions.
6904CFLAGS="$CFLAGS $user_CFLAGS"
6905CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
6906BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
6907BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
6908
6909
6910
6911
6912# The template file must set up CFLAGS_SL; we don't support user override
6913
6914
6915# Check if the compiler still works with the final flag settings
6916# (note, we're not checking that for CXX, which is optional)
6917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
6918$as_echo_n "checking whether the C compiler still works... " >&6; }
6919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6920/* end confdefs.h.  */
6921
6922int
6923main ()
6924{
6925return 0;
6926  ;
6927  return 0;
6928}
6929_ACEOF
6930if ac_fn_c_try_link "$LINENO"; then :
6931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6932$as_echo "yes" >&6; }
6933else
6934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6935$as_echo "no" >&6; }
6936   as_fn_error $? "cannot proceed" "$LINENO" 5
6937fi
6938rm -f core conftest.err conftest.$ac_objext \
6939    conftest$ac_exeext conftest.$ac_ext
6940
6941# Defend against gcc -ffast-math
6942if test "$GCC" = yes; then
6943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6944/* end confdefs.h.  */
6945
6946int
6947main ()
6948{
6949#ifdef __FAST_MATH__
6950choke me
6951#endif
6952  ;
6953  return 0;
6954}
6955_ACEOF
6956if ac_fn_c_try_compile "$LINENO"; then :
6957
6958else
6959  as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
6960fi
6961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6962fi
6963
6964# Defend against clang being used on x86-32 without SSE2 enabled.  As current
6965# versions of clang do not understand -fexcess-precision=standard, the use of
6966# x87 floating point operations leads to problems like isinf possibly returning
6967# false for a value that is infinite when converted from the 80bit register to
6968# the 8byte memory representation.
6969#
6970# Only perform the test if the compiler doesn't understand
6971# -fexcess-precision=standard, that way a potentially fixed compiler will work
6972# automatically.
6973if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
6974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6975/* end confdefs.h.  */
6976
6977int
6978main ()
6979{
6980
6981#if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
6982choke me
6983#endif
6984
6985  ;
6986  return 0;
6987}
6988_ACEOF
6989if ac_fn_c_try_compile "$LINENO"; then :
6990
6991else
6992  as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
6993fi
6994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6995fi
6996
6997ac_ext=c
6998ac_cpp='$CPP $CPPFLAGS'
6999ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7000ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7001ac_compiler_gnu=$ac_cv_c_compiler_gnu
7002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7003$as_echo_n "checking how to run the C preprocessor... " >&6; }
7004# On Suns, sometimes $CPP names a directory.
7005if test -n "$CPP" && test -d "$CPP"; then
7006  CPP=
7007fi
7008if test -z "$CPP"; then
7009  if ${ac_cv_prog_CPP+:} false; then :
7010  $as_echo_n "(cached) " >&6
7011else
7012      # Double quotes because CPP needs to be expanded
7013    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7014    do
7015      ac_preproc_ok=false
7016for ac_c_preproc_warn_flag in '' yes
7017do
7018  # Use a header file that comes with gcc, so configuring glibc
7019  # with a fresh cross-compiler works.
7020  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7021  # <limits.h> exists even on freestanding compilers.
7022  # On the NeXT, cc -E runs the code through the compiler's parser,
7023  # not just through cpp. "Syntax error" is here to catch this case.
7024  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7025/* end confdefs.h.  */
7026#ifdef __STDC__
7027# include <limits.h>
7028#else
7029# include <assert.h>
7030#endif
7031		     Syntax error
7032_ACEOF
7033if ac_fn_c_try_cpp "$LINENO"; then :
7034
7035else
7036  # Broken: fails on valid input.
7037continue
7038fi
7039rm -f conftest.err conftest.i conftest.$ac_ext
7040
7041  # OK, works on sane cases.  Now check whether nonexistent headers
7042  # can be detected and how.
7043  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7044/* end confdefs.h.  */
7045#include <ac_nonexistent.h>
7046_ACEOF
7047if ac_fn_c_try_cpp "$LINENO"; then :
7048  # Broken: success on invalid input.
7049continue
7050else
7051  # Passes both tests.
7052ac_preproc_ok=:
7053break
7054fi
7055rm -f conftest.err conftest.i conftest.$ac_ext
7056
7057done
7058# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7059rm -f conftest.i conftest.err conftest.$ac_ext
7060if $ac_preproc_ok; then :
7061  break
7062fi
7063
7064    done
7065    ac_cv_prog_CPP=$CPP
7066
7067fi
7068  CPP=$ac_cv_prog_CPP
7069else
7070  ac_cv_prog_CPP=$CPP
7071fi
7072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7073$as_echo "$CPP" >&6; }
7074ac_preproc_ok=false
7075for ac_c_preproc_warn_flag in '' yes
7076do
7077  # Use a header file that comes with gcc, so configuring glibc
7078  # with a fresh cross-compiler works.
7079  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7080  # <limits.h> exists even on freestanding compilers.
7081  # On the NeXT, cc -E runs the code through the compiler's parser,
7082  # not just through cpp. "Syntax error" is here to catch this case.
7083  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7084/* end confdefs.h.  */
7085#ifdef __STDC__
7086# include <limits.h>
7087#else
7088# include <assert.h>
7089#endif
7090		     Syntax error
7091_ACEOF
7092if ac_fn_c_try_cpp "$LINENO"; then :
7093
7094else
7095  # Broken: fails on valid input.
7096continue
7097fi
7098rm -f conftest.err conftest.i conftest.$ac_ext
7099
7100  # OK, works on sane cases.  Now check whether nonexistent headers
7101  # can be detected and how.
7102  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7103/* end confdefs.h.  */
7104#include <ac_nonexistent.h>
7105_ACEOF
7106if ac_fn_c_try_cpp "$LINENO"; then :
7107  # Broken: success on invalid input.
7108continue
7109else
7110  # Passes both tests.
7111ac_preproc_ok=:
7112break
7113fi
7114rm -f conftest.err conftest.i conftest.$ac_ext
7115
7116done
7117# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7118rm -f conftest.i conftest.err conftest.$ac_ext
7119if $ac_preproc_ok; then :
7120
7121else
7122  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7123$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7124as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7125See \`config.log' for more details" "$LINENO" 5; }
7126fi
7127
7128ac_ext=c
7129ac_cpp='$CPP $CPPFLAGS'
7130ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7131ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7132ac_compiler_gnu=$ac_cv_c_compiler_gnu
7133
7134
7135
7136
7137#
7138# Set up TAS assembly code if needed; the template file has now had its
7139# chance to request this.
7140#
7141ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
7142
7143
7144if test "$need_tas" = yes ; then
7145  TAS=tas.o
7146else
7147  TAS=""
7148fi
7149
7150
7151#
7152# Set up pkg_config in case we need it below
7153#
7154
7155
7156
7157
7158
7159
7160
7161if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7162	if test -n "$ac_tool_prefix"; then
7163  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7164set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7166$as_echo_n "checking for $ac_word... " >&6; }
7167if ${ac_cv_path_PKG_CONFIG+:} false; then :
7168  $as_echo_n "(cached) " >&6
7169else
7170  case $PKG_CONFIG in
7171  [\\/]* | ?:[\\/]*)
7172  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7173  ;;
7174  *)
7175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7176for as_dir in $PATH
7177do
7178  IFS=$as_save_IFS
7179  test -z "$as_dir" && as_dir=.
7180    for ac_exec_ext in '' $ac_executable_extensions; do
7181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7182    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7184    break 2
7185  fi
7186done
7187  done
7188IFS=$as_save_IFS
7189
7190  ;;
7191esac
7192fi
7193PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7194if test -n "$PKG_CONFIG"; then
7195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7196$as_echo "$PKG_CONFIG" >&6; }
7197else
7198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7199$as_echo "no" >&6; }
7200fi
7201
7202
7203fi
7204if test -z "$ac_cv_path_PKG_CONFIG"; then
7205  ac_pt_PKG_CONFIG=$PKG_CONFIG
7206  # Extract the first word of "pkg-config", so it can be a program name with args.
7207set dummy pkg-config; ac_word=$2
7208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7209$as_echo_n "checking for $ac_word... " >&6; }
7210if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7211  $as_echo_n "(cached) " >&6
7212else
7213  case $ac_pt_PKG_CONFIG in
7214  [\\/]* | ?:[\\/]*)
7215  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7216  ;;
7217  *)
7218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7219for as_dir in $PATH
7220do
7221  IFS=$as_save_IFS
7222  test -z "$as_dir" && as_dir=.
7223    for ac_exec_ext in '' $ac_executable_extensions; do
7224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7225    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7227    break 2
7228  fi
7229done
7230  done
7231IFS=$as_save_IFS
7232
7233  ;;
7234esac
7235fi
7236ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7237if test -n "$ac_pt_PKG_CONFIG"; then
7238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7239$as_echo "$ac_pt_PKG_CONFIG" >&6; }
7240else
7241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7242$as_echo "no" >&6; }
7243fi
7244
7245  if test "x$ac_pt_PKG_CONFIG" = x; then
7246    PKG_CONFIG=""
7247  else
7248    case $cross_compiling:$ac_tool_warned in
7249yes:)
7250{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7251$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7252ac_tool_warned=yes ;;
7253esac
7254    PKG_CONFIG=$ac_pt_PKG_CONFIG
7255  fi
7256else
7257  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7258fi
7259
7260fi
7261if test -n "$PKG_CONFIG"; then
7262	_pkg_min_version=0.9.0
7263	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7264$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7265	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7266		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7267$as_echo "yes" >&6; }
7268	else
7269		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7270$as_echo "no" >&6; }
7271		PKG_CONFIG=""
7272	fi
7273fi
7274
7275#
7276# Automatic dependency tracking
7277#
7278
7279
7280# Check whether --enable-depend was given.
7281if test "${enable_depend+set}" = set; then :
7282  enableval=$enable_depend;
7283  case $enableval in
7284    yes)
7285      autodepend=yes
7286      ;;
7287    no)
7288      :
7289      ;;
7290    *)
7291      as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
7292      ;;
7293  esac
7294
7295else
7296  enable_depend=no
7297
7298fi
7299
7300
7301
7302
7303
7304#
7305# Enable assert checks
7306#
7307
7308
7309# Check whether --enable-cassert was given.
7310if test "${enable_cassert+set}" = set; then :
7311  enableval=$enable_cassert;
7312  case $enableval in
7313    yes)
7314
7315$as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
7316
7317      ;;
7318    no)
7319      :
7320      ;;
7321    *)
7322      as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
7323      ;;
7324  esac
7325
7326else
7327  enable_cassert=no
7328
7329fi
7330
7331
7332
7333
7334#
7335# Include directories
7336#
7337ac_save_IFS=$IFS
7338IFS="${IFS}${PATH_SEPARATOR}"
7339# SRCH_INC comes from the template file
7340for dir in $with_includes $SRCH_INC; do
7341  if test -d "$dir"; then
7342    INCLUDES="$INCLUDES -I$dir"
7343  else
7344    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
7345$as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
7346  fi
7347done
7348IFS=$ac_save_IFS
7349
7350
7351
7352#
7353# Library directories
7354#
7355ac_save_IFS=$IFS
7356IFS="${IFS}${PATH_SEPARATOR}"
7357# LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
7358for dir in $LIBRARY_DIRS $SRCH_LIB; do
7359  if test -d "$dir"; then
7360    LIBDIRS="$LIBDIRS -L$dir"
7361  else
7362    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
7363$as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
7364  fi
7365done
7366IFS=$ac_save_IFS
7367
7368#
7369# Enable thread-safe client libraries
7370#
7371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
7372$as_echo_n "checking allow thread-safe client libraries... " >&6; }
7373
7374
7375# Check whether --enable-thread-safety was given.
7376if test "${enable_thread_safety+set}" = set; then :
7377  enableval=$enable_thread_safety;
7378  case $enableval in
7379    yes)
7380      :
7381      ;;
7382    no)
7383      :
7384      ;;
7385    *)
7386      as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
7387      ;;
7388  esac
7389
7390else
7391  enable_thread_safety=yes
7392
7393fi
7394
7395
7396if test "$enable_thread_safety" = yes; then
7397
7398$as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
7399
7400fi
7401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
7402$as_echo "$enable_thread_safety" >&6; }
7403
7404
7405#
7406# ICU
7407#
7408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
7409$as_echo_n "checking whether to build with ICU support... " >&6; }
7410
7411
7412
7413# Check whether --with-icu was given.
7414if test "${with_icu+set}" = set; then :
7415  withval=$with_icu;
7416  case $withval in
7417    yes)
7418
7419$as_echo "#define USE_ICU 1" >>confdefs.h
7420
7421      ;;
7422    no)
7423      :
7424      ;;
7425    *)
7426      as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
7427      ;;
7428  esac
7429
7430else
7431  with_icu=no
7432
7433fi
7434
7435
7436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
7437$as_echo "$with_icu" >&6; }
7438
7439
7440if test "$with_icu" = yes; then
7441
7442pkg_failed=no
7443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
7444$as_echo_n "checking for icu-uc icu-i18n... " >&6; }
7445
7446if test -n "$ICU_CFLAGS"; then
7447    pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
7448 elif test -n "$PKG_CONFIG"; then
7449    if test -n "$PKG_CONFIG" && \
7450    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7451  ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7452  ac_status=$?
7453  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7454  test $ac_status = 0; }; then
7455  pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
7456		      test "x$?" != "x0" && pkg_failed=yes
7457else
7458  pkg_failed=yes
7459fi
7460 else
7461    pkg_failed=untried
7462fi
7463if test -n "$ICU_LIBS"; then
7464    pkg_cv_ICU_LIBS="$ICU_LIBS"
7465 elif test -n "$PKG_CONFIG"; then
7466    if test -n "$PKG_CONFIG" && \
7467    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7468  ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7469  ac_status=$?
7470  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7471  test $ac_status = 0; }; then
7472  pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
7473		      test "x$?" != "x0" && pkg_failed=yes
7474else
7475  pkg_failed=yes
7476fi
7477 else
7478    pkg_failed=untried
7479fi
7480
7481
7482
7483if test $pkg_failed = yes; then
7484        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7485$as_echo "no" >&6; }
7486
7487if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7488        _pkg_short_errors_supported=yes
7489else
7490        _pkg_short_errors_supported=no
7491fi
7492        if test $_pkg_short_errors_supported = yes; then
7493	        ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7494        else
7495	        ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7496        fi
7497	# Put the nasty error message in config.log where it belongs
7498	echo "$ICU_PKG_ERRORS" >&5
7499
7500	as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
7501
7502$ICU_PKG_ERRORS
7503
7504Consider adjusting the PKG_CONFIG_PATH environment variable if you
7505installed software in a non-standard prefix.
7506
7507Alternatively, you may set the environment variables ICU_CFLAGS
7508and ICU_LIBS to avoid the need to call pkg-config.
7509See the pkg-config man page for more details." "$LINENO" 5
7510elif test $pkg_failed = untried; then
7511        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7512$as_echo "no" >&6; }
7513	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7514$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7515as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
7516is in your PATH or set the PKG_CONFIG environment variable to the full
7517path to pkg-config.
7518
7519Alternatively, you may set the environment variables ICU_CFLAGS
7520and ICU_LIBS to avoid the need to call pkg-config.
7521See the pkg-config man page for more details.
7522
7523To get pkg-config, see <http://pkg-config.freedesktop.org/>.
7524See \`config.log' for more details" "$LINENO" 5; }
7525else
7526	ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
7527	ICU_LIBS=$pkg_cv_ICU_LIBS
7528        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7529$as_echo "yes" >&6; }
7530
7531fi
7532fi
7533
7534#
7535# Optionally build Tcl modules (PL/Tcl)
7536#
7537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
7538$as_echo_n "checking whether to build with Tcl... " >&6; }
7539
7540
7541
7542# Check whether --with-tcl was given.
7543if test "${with_tcl+set}" = set; then :
7544  withval=$with_tcl;
7545  case $withval in
7546    yes)
7547      :
7548      ;;
7549    no)
7550      :
7551      ;;
7552    *)
7553      as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
7554      ;;
7555  esac
7556
7557else
7558  with_tcl=no
7559
7560fi
7561
7562
7563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
7564$as_echo "$with_tcl" >&6; }
7565
7566
7567# We see if the path to the Tcl/Tk configuration scripts is specified.
7568# This will override the use of tclsh to find the paths to search.
7569
7570
7571
7572
7573# Check whether --with-tclconfig was given.
7574if test "${with_tclconfig+set}" = set; then :
7575  withval=$with_tclconfig;
7576  case $withval in
7577    yes)
7578      as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7579      ;;
7580    no)
7581      as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7582      ;;
7583    *)
7584
7585      ;;
7586  esac
7587
7588fi
7589
7590
7591
7592#
7593# Optionally build Perl modules (PL/Perl)
7594#
7595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
7596$as_echo_n "checking whether to build Perl modules... " >&6; }
7597
7598
7599
7600# Check whether --with-perl was given.
7601if test "${with_perl+set}" = set; then :
7602  withval=$with_perl;
7603  case $withval in
7604    yes)
7605      :
7606      ;;
7607    no)
7608      :
7609      ;;
7610    *)
7611      as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
7612      ;;
7613  esac
7614
7615else
7616  with_perl=no
7617
7618fi
7619
7620
7621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
7622$as_echo "$with_perl" >&6; }
7623
7624
7625#
7626# Optionally build Python modules (PL/Python)
7627#
7628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
7629$as_echo_n "checking whether to build Python modules... " >&6; }
7630
7631
7632
7633# Check whether --with-python was given.
7634if test "${with_python+set}" = set; then :
7635  withval=$with_python;
7636  case $withval in
7637    yes)
7638      :
7639      ;;
7640    no)
7641      :
7642      ;;
7643    *)
7644      as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
7645      ;;
7646  esac
7647
7648else
7649  with_python=no
7650
7651fi
7652
7653
7654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
7655$as_echo "$with_python" >&6; }
7656
7657
7658#
7659# GSSAPI
7660#
7661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
7662$as_echo_n "checking whether to build with GSSAPI support... " >&6; }
7663
7664
7665
7666# Check whether --with-gssapi was given.
7667if test "${with_gssapi+set}" = set; then :
7668  withval=$with_gssapi;
7669  case $withval in
7670    yes)
7671
7672
7673$as_echo "#define ENABLE_GSS 1" >>confdefs.h
7674
7675  krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
7676
7677      ;;
7678    no)
7679      :
7680      ;;
7681    *)
7682      as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
7683      ;;
7684  esac
7685
7686else
7687  with_gssapi=no
7688
7689fi
7690
7691
7692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
7693$as_echo "$with_gssapi" >&6; }
7694
7695
7696
7697
7698
7699
7700#
7701# Kerberos configuration parameters
7702#
7703
7704
7705
7706# Check whether --with-krb-srvnam was given.
7707if test "${with_krb_srvnam+set}" = set; then :
7708  withval=$with_krb_srvnam;
7709  case $withval in
7710    yes)
7711      as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7712      ;;
7713    no)
7714      as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7715      ;;
7716    *)
7717
7718      ;;
7719  esac
7720
7721else
7722  with_krb_srvnam="postgres"
7723fi
7724
7725
7726
7727
7728cat >>confdefs.h <<_ACEOF
7729#define PG_KRB_SRVNAM "$with_krb_srvnam"
7730_ACEOF
7731
7732
7733
7734#
7735# PAM
7736#
7737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
7738$as_echo_n "checking whether to build with PAM support... " >&6; }
7739
7740
7741
7742# Check whether --with-pam was given.
7743if test "${with_pam+set}" = set; then :
7744  withval=$with_pam;
7745  case $withval in
7746    yes)
7747
7748$as_echo "#define USE_PAM 1" >>confdefs.h
7749
7750      ;;
7751    no)
7752      :
7753      ;;
7754    *)
7755      as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
7756      ;;
7757  esac
7758
7759else
7760  with_pam=no
7761
7762fi
7763
7764
7765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
7766$as_echo "$with_pam" >&6; }
7767
7768
7769#
7770# BSD AUTH
7771#
7772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
7773$as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
7774
7775
7776
7777# Check whether --with-bsd-auth was given.
7778if test "${with_bsd_auth+set}" = set; then :
7779  withval=$with_bsd_auth;
7780  case $withval in
7781    yes)
7782
7783$as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
7784
7785      ;;
7786    no)
7787      :
7788      ;;
7789    *)
7790      as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
7791      ;;
7792  esac
7793
7794else
7795  with_bsd_auth=no
7796
7797fi
7798
7799
7800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
7801$as_echo "$with_bsd_auth" >&6; }
7802
7803
7804#
7805# LDAP
7806#
7807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
7808$as_echo_n "checking whether to build with LDAP support... " >&6; }
7809
7810
7811
7812# Check whether --with-ldap was given.
7813if test "${with_ldap+set}" = set; then :
7814  withval=$with_ldap;
7815  case $withval in
7816    yes)
7817
7818$as_echo "#define USE_LDAP 1" >>confdefs.h
7819
7820      ;;
7821    no)
7822      :
7823      ;;
7824    *)
7825      as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
7826      ;;
7827  esac
7828
7829else
7830  with_ldap=no
7831
7832fi
7833
7834
7835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
7836$as_echo "$with_ldap" >&6; }
7837
7838
7839
7840#
7841# Bonjour
7842#
7843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
7844$as_echo_n "checking whether to build with Bonjour support... " >&6; }
7845
7846
7847
7848# Check whether --with-bonjour was given.
7849if test "${with_bonjour+set}" = set; then :
7850  withval=$with_bonjour;
7851  case $withval in
7852    yes)
7853
7854$as_echo "#define USE_BONJOUR 1" >>confdefs.h
7855
7856      ;;
7857    no)
7858      :
7859      ;;
7860    *)
7861      as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
7862      ;;
7863  esac
7864
7865else
7866  with_bonjour=no
7867
7868fi
7869
7870
7871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
7872$as_echo "$with_bonjour" >&6; }
7873
7874
7875#
7876# OpenSSL
7877#
7878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
7879$as_echo_n "checking whether to build with OpenSSL support... " >&6; }
7880
7881
7882
7883# Check whether --with-openssl was given.
7884if test "${with_openssl+set}" = set; then :
7885  withval=$with_openssl;
7886  case $withval in
7887    yes)
7888
7889$as_echo "#define USE_OPENSSL 1" >>confdefs.h
7890
7891      ;;
7892    no)
7893      :
7894      ;;
7895    *)
7896      as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
7897      ;;
7898  esac
7899
7900else
7901  with_openssl=no
7902
7903fi
7904
7905
7906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
7907$as_echo "$with_openssl" >&6; }
7908
7909
7910#
7911# SELinux
7912#
7913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
7914$as_echo_n "checking whether to build with SELinux support... " >&6; }
7915
7916
7917
7918# Check whether --with-selinux was given.
7919if test "${with_selinux+set}" = set; then :
7920  withval=$with_selinux;
7921  case $withval in
7922    yes)
7923      :
7924      ;;
7925    no)
7926      :
7927      ;;
7928    *)
7929      as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
7930      ;;
7931  esac
7932
7933else
7934  with_selinux=no
7935
7936fi
7937
7938
7939
7940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
7941$as_echo "$with_selinux" >&6; }
7942
7943#
7944# Systemd
7945#
7946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
7947$as_echo_n "checking whether to build with systemd support... " >&6; }
7948
7949
7950
7951# Check whether --with-systemd was given.
7952if test "${with_systemd+set}" = set; then :
7953  withval=$with_systemd;
7954  case $withval in
7955    yes)
7956
7957$as_echo "#define USE_SYSTEMD 1" >>confdefs.h
7958
7959      ;;
7960    no)
7961      :
7962      ;;
7963    *)
7964      as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
7965      ;;
7966  esac
7967
7968else
7969  with_systemd=no
7970
7971fi
7972
7973
7974
7975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
7976$as_echo "$with_systemd" >&6; }
7977
7978#
7979# Readline
7980#
7981
7982
7983
7984# Check whether --with-readline was given.
7985if test "${with_readline+set}" = set; then :
7986  withval=$with_readline;
7987  case $withval in
7988    yes)
7989      :
7990      ;;
7991    no)
7992      :
7993      ;;
7994    *)
7995      as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
7996      ;;
7997  esac
7998
7999else
8000  with_readline=yes
8001
8002fi
8003
8004
8005# readline on MinGW has problems with backslashes in psql and other bugs.
8006# This is particularly a problem with non-US code pages.
8007# Therefore disable its use until we understand the cause. 2004-07-20
8008if test "$PORTNAME" = "win32"; then
8009  if test "$with_readline" = yes; then
8010    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8011$as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8012    with_readline=no
8013  fi
8014fi
8015
8016
8017#
8018# Prefer libedit
8019#
8020
8021
8022
8023# Check whether --with-libedit-preferred was given.
8024if test "${with_libedit_preferred+set}" = set; then :
8025  withval=$with_libedit_preferred;
8026  case $withval in
8027    yes)
8028      :
8029      ;;
8030    no)
8031      :
8032      ;;
8033    *)
8034      as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8035      ;;
8036  esac
8037
8038else
8039  with_libedit_preferred=no
8040
8041fi
8042
8043
8044
8045
8046#
8047# UUID library
8048#
8049# There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8050# library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8051# UUID library.  More than one of these might be present on a given platform,
8052# so we make the user say which one she wants.
8053#
8054
8055
8056
8057# Check whether --with-uuid was given.
8058if test "${with_uuid+set}" = set; then :
8059  withval=$with_uuid;
8060  case $withval in
8061    yes)
8062      as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8063      ;;
8064    no)
8065      as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8066      ;;
8067    *)
8068
8069      ;;
8070  esac
8071
8072fi
8073
8074
8075if test x"$with_uuid" = x"" ; then
8076  with_uuid=no
8077fi
8078
8079
8080
8081# Check whether --with-ossp-uuid was given.
8082if test "${with_ossp_uuid+set}" = set; then :
8083  withval=$with_ossp_uuid;
8084  case $withval in
8085    yes)
8086      :
8087      ;;
8088    no)
8089      :
8090      ;;
8091    *)
8092      as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8093      ;;
8094  esac
8095
8096else
8097  with_ossp_uuid=no
8098
8099fi
8100
8101
8102if test "$with_ossp_uuid" = yes ; then
8103  with_uuid=ossp
8104fi
8105
8106if test "$with_uuid" = bsd ; then
8107
8108$as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8109
8110  UUID_EXTRA_OBJS="md5.o sha1.o"
8111elif test "$with_uuid" = e2fs ; then
8112
8113$as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
8114
8115  UUID_EXTRA_OBJS="md5.o sha1.o"
8116elif test "$with_uuid" = ossp ; then
8117
8118$as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
8119
8120  UUID_EXTRA_OBJS=""
8121elif test "$with_uuid" = no ; then
8122  UUID_EXTRA_OBJS=""
8123else
8124  as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
8125fi
8126
8127
8128
8129
8130#
8131# XML
8132#
8133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with XML support" >&5
8134$as_echo_n "checking whether to build with XML support... " >&6; }
8135
8136
8137
8138# Check whether --with-libxml was given.
8139if test "${with_libxml+set}" = set; then :
8140  withval=$with_libxml;
8141  case $withval in
8142    yes)
8143
8144$as_echo "#define USE_LIBXML 1" >>confdefs.h
8145
8146      ;;
8147    no)
8148      :
8149      ;;
8150    *)
8151      as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
8152      ;;
8153  esac
8154
8155else
8156  with_libxml=no
8157
8158fi
8159
8160
8161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libxml" >&5
8162$as_echo "$with_libxml" >&6; }
8163
8164
8165if test "$with_libxml" = yes ; then
8166  # Check pkg-config, then xml2-config.  But for backwards compatibility,
8167  # setting XML2_CONFIG overrides pkg-config.
8168    have_libxml2_pkg_config=no
8169  if test -z "$XML2_CONFIG" -a -n "$PKG_CONFIG"; then
8170
8171pkg_failed=no
8172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.6.23" >&5
8173$as_echo_n "checking for libxml-2.0 >= 2.6.23... " >&6; }
8174
8175if test -n "$XML2_CFLAGS"; then
8176    pkg_cv_XML2_CFLAGS="$XML2_CFLAGS"
8177 elif test -n "$PKG_CONFIG"; then
8178    if test -n "$PKG_CONFIG" && \
8179    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8180  ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8181  ac_status=$?
8182  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8183  test $ac_status = 0; }; then
8184  pkg_cv_XML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.6.23" 2>/dev/null`
8185		      test "x$?" != "x0" && pkg_failed=yes
8186else
8187  pkg_failed=yes
8188fi
8189 else
8190    pkg_failed=untried
8191fi
8192if test -n "$XML2_LIBS"; then
8193    pkg_cv_XML2_LIBS="$XML2_LIBS"
8194 elif test -n "$PKG_CONFIG"; then
8195    if test -n "$PKG_CONFIG" && \
8196    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8197  ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8198  ac_status=$?
8199  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8200  test $ac_status = 0; }; then
8201  pkg_cv_XML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.6.23" 2>/dev/null`
8202		      test "x$?" != "x0" && pkg_failed=yes
8203else
8204  pkg_failed=yes
8205fi
8206 else
8207    pkg_failed=untried
8208fi
8209
8210
8211
8212if test $pkg_failed = yes; then
8213        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8214$as_echo "no" >&6; }
8215
8216if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8217        _pkg_short_errors_supported=yes
8218else
8219        _pkg_short_errors_supported=no
8220fi
8221        if test $_pkg_short_errors_supported = yes; then
8222	        XML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8223        else
8224	        XML2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8225        fi
8226	# Put the nasty error message in config.log where it belongs
8227	echo "$XML2_PKG_ERRORS" >&5
8228
8229	# do nothing
8230elif test $pkg_failed = untried; then
8231        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8232$as_echo "no" >&6; }
8233	# do nothing
8234else
8235	XML2_CFLAGS=$pkg_cv_XML2_CFLAGS
8236	XML2_LIBS=$pkg_cv_XML2_LIBS
8237        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8238$as_echo "yes" >&6; }
8239	have_libxml2_pkg_config=yes
8240fi
8241  fi
8242  if test "$have_libxml2_pkg_config" = no ; then
8243    if test -z "$XML2_CONFIG"; then
8244  for ac_prog in xml2-config
8245do
8246  # Extract the first word of "$ac_prog", so it can be a program name with args.
8247set dummy $ac_prog; ac_word=$2
8248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8249$as_echo_n "checking for $ac_word... " >&6; }
8250if ${ac_cv_path_XML2_CONFIG+:} false; then :
8251  $as_echo_n "(cached) " >&6
8252else
8253  case $XML2_CONFIG in
8254  [\\/]* | ?:[\\/]*)
8255  ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
8256  ;;
8257  *)
8258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8259for as_dir in $PATH
8260do
8261  IFS=$as_save_IFS
8262  test -z "$as_dir" && as_dir=.
8263    for ac_exec_ext in '' $ac_executable_extensions; do
8264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8265    ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8267    break 2
8268  fi
8269done
8270  done
8271IFS=$as_save_IFS
8272
8273  ;;
8274esac
8275fi
8276XML2_CONFIG=$ac_cv_path_XML2_CONFIG
8277if test -n "$XML2_CONFIG"; then
8278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8279$as_echo "$XML2_CONFIG" >&6; }
8280else
8281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8282$as_echo "no" >&6; }
8283fi
8284
8285
8286  test -n "$XML2_CONFIG" && break
8287done
8288
8289else
8290  # Report the value of XML2_CONFIG in configure's output in all cases.
8291  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
8292$as_echo_n "checking for XML2_CONFIG... " >&6; }
8293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8294$as_echo "$XML2_CONFIG" >&6; }
8295fi
8296
8297    if test -n "$XML2_CONFIG"; then
8298      XML2_CFLAGS=`$XML2_CONFIG --cflags`
8299      XML2_LIBS=`$XML2_CONFIG --libs`
8300    fi
8301  fi
8302  # Note the user could also set XML2_CFLAGS/XML2_LIBS directly
8303  for pgac_option in $XML2_CFLAGS; do
8304    case $pgac_option in
8305      -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8306    esac
8307  done
8308  for pgac_option in $XML2_LIBS; do
8309    case $pgac_option in
8310      -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8311    esac
8312  done
8313fi
8314
8315
8316#
8317# XSLT
8318#
8319
8320
8321
8322# Check whether --with-libxslt was given.
8323if test "${with_libxslt+set}" = set; then :
8324  withval=$with_libxslt;
8325  case $withval in
8326    yes)
8327
8328$as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8329
8330      ;;
8331    no)
8332      :
8333      ;;
8334    *)
8335      as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8336      ;;
8337  esac
8338
8339else
8340  with_libxslt=no
8341
8342fi
8343
8344
8345
8346
8347
8348
8349#
8350# tzdata
8351#
8352
8353
8354
8355# Check whether --with-system-tzdata was given.
8356if test "${with_system_tzdata+set}" = set; then :
8357  withval=$with_system_tzdata;
8358  case $withval in
8359    yes)
8360      as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8361      ;;
8362    no)
8363      as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8364      ;;
8365    *)
8366
8367      ;;
8368  esac
8369
8370fi
8371
8372
8373
8374
8375#
8376# Zlib
8377#
8378
8379
8380
8381# Check whether --with-zlib was given.
8382if test "${with_zlib+set}" = set; then :
8383  withval=$with_zlib;
8384  case $withval in
8385    yes)
8386      :
8387      ;;
8388    no)
8389      :
8390      ;;
8391    *)
8392      as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
8393      ;;
8394  esac
8395
8396else
8397  with_zlib=yes
8398
8399fi
8400
8401
8402
8403
8404#
8405# Elf
8406#
8407
8408# Assume system is ELF if it predefines __ELF__ as 1,
8409# otherwise believe host_os based default.
8410case $host_os in
8411    freebsd1*|freebsd2*) elf=no;;
8412    freebsd3*|freebsd4*) elf=yes;;
8413esac
8414
8415
8416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
8417$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
8418if ${ac_cv_path_GREP+:} false; then :
8419  $as_echo_n "(cached) " >&6
8420else
8421  if test -z "$GREP"; then
8422  ac_path_GREP_found=false
8423  # Loop through the user's path and test for each of PROGNAME-LIST
8424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8425for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8426do
8427  IFS=$as_save_IFS
8428  test -z "$as_dir" && as_dir=.
8429    for ac_prog in grep ggrep; do
8430    for ac_exec_ext in '' $ac_executable_extensions; do
8431      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
8432      as_fn_executable_p "$ac_path_GREP" || continue
8433# Check for GNU ac_path_GREP and select it if it is found.
8434  # Check for GNU $ac_path_GREP
8435case `"$ac_path_GREP" --version 2>&1` in
8436*GNU*)
8437  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
8438*)
8439  ac_count=0
8440  $as_echo_n 0123456789 >"conftest.in"
8441  while :
8442  do
8443    cat "conftest.in" "conftest.in" >"conftest.tmp"
8444    mv "conftest.tmp" "conftest.in"
8445    cp "conftest.in" "conftest.nl"
8446    $as_echo 'GREP' >> "conftest.nl"
8447    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8448    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8449    as_fn_arith $ac_count + 1 && ac_count=$as_val
8450    if test $ac_count -gt ${ac_path_GREP_max-0}; then
8451      # Best one so far, save it but keep looking for a better one
8452      ac_cv_path_GREP="$ac_path_GREP"
8453      ac_path_GREP_max=$ac_count
8454    fi
8455    # 10*(2^10) chars as input seems more than enough
8456    test $ac_count -gt 10 && break
8457  done
8458  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8459esac
8460
8461      $ac_path_GREP_found && break 3
8462    done
8463  done
8464  done
8465IFS=$as_save_IFS
8466  if test -z "$ac_cv_path_GREP"; then
8467    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8468  fi
8469else
8470  ac_cv_path_GREP=$GREP
8471fi
8472
8473fi
8474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
8475$as_echo "$ac_cv_path_GREP" >&6; }
8476 GREP="$ac_cv_path_GREP"
8477
8478
8479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
8480$as_echo_n "checking for egrep... " >&6; }
8481if ${ac_cv_path_EGREP+:} false; then :
8482  $as_echo_n "(cached) " >&6
8483else
8484  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
8485   then ac_cv_path_EGREP="$GREP -E"
8486   else
8487     if test -z "$EGREP"; then
8488  ac_path_EGREP_found=false
8489  # Loop through the user's path and test for each of PROGNAME-LIST
8490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8491for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8492do
8493  IFS=$as_save_IFS
8494  test -z "$as_dir" && as_dir=.
8495    for ac_prog in egrep; do
8496    for ac_exec_ext in '' $ac_executable_extensions; do
8497      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
8498      as_fn_executable_p "$ac_path_EGREP" || continue
8499# Check for GNU ac_path_EGREP and select it if it is found.
8500  # Check for GNU $ac_path_EGREP
8501case `"$ac_path_EGREP" --version 2>&1` in
8502*GNU*)
8503  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
8504*)
8505  ac_count=0
8506  $as_echo_n 0123456789 >"conftest.in"
8507  while :
8508  do
8509    cat "conftest.in" "conftest.in" >"conftest.tmp"
8510    mv "conftest.tmp" "conftest.in"
8511    cp "conftest.in" "conftest.nl"
8512    $as_echo 'EGREP' >> "conftest.nl"
8513    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8514    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8515    as_fn_arith $ac_count + 1 && ac_count=$as_val
8516    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
8517      # Best one so far, save it but keep looking for a better one
8518      ac_cv_path_EGREP="$ac_path_EGREP"
8519      ac_path_EGREP_max=$ac_count
8520    fi
8521    # 10*(2^10) chars as input seems more than enough
8522    test $ac_count -gt 10 && break
8523  done
8524  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8525esac
8526
8527      $ac_path_EGREP_found && break 3
8528    done
8529  done
8530  done
8531IFS=$as_save_IFS
8532  if test -z "$ac_cv_path_EGREP"; then
8533    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8534  fi
8535else
8536  ac_cv_path_EGREP=$EGREP
8537fi
8538
8539   fi
8540fi
8541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
8542$as_echo "$ac_cv_path_EGREP" >&6; }
8543 EGREP="$ac_cv_path_EGREP"
8544
8545
8546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8547/* end confdefs.h.  */
8548#if __ELF__
8549  yes
8550#endif
8551
8552_ACEOF
8553if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8554  $EGREP "yes" >/dev/null 2>&1; then :
8555  ELF_SYS=true
8556else
8557  if test "X$elf" = "Xyes" ; then
8558  ELF_SYS=true
8559else
8560  ELF_SYS=
8561fi
8562fi
8563rm -f conftest*
8564
8565
8566
8567#
8568# Assignments
8569#
8570
8571CPPFLAGS="$CPPFLAGS $INCLUDES"
8572LDFLAGS="$LDFLAGS $LIBDIRS"
8573
8574
8575
8576
8577
8578# Check whether --with-gnu-ld was given.
8579if test "${with_gnu_ld+set}" = set; then :
8580  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8581else
8582  with_gnu_ld=no
8583fi
8584
8585ac_prog=ld
8586if test "$GCC" = yes; then
8587  # Check if gcc -print-prog-name=ld gives a path.
8588  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8589$as_echo_n "checking for ld used by GCC... " >&6; }
8590  case $host in
8591  *-*-mingw*)
8592    # gcc leaves a trailing carriage return which upsets mingw
8593    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8594  *)
8595    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8596  esac
8597  case "$ac_prog" in
8598    # Accept absolute paths.
8599    [\\/]* | [A-Za-z]:[\\/]*)
8600      re_direlt='/[^/][^/]*/\.\./'
8601      # Canonicalize the path of ld
8602      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8603      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8604	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8605      done
8606      test -z "$LD" && LD="$ac_prog"
8607      ;;
8608  "")
8609    # If it fails, then pretend we aren't using GCC.
8610    ac_prog=ld
8611    ;;
8612  *)
8613    # If it is relative, then search for the first ld in PATH.
8614    with_gnu_ld=unknown
8615    ;;
8616  esac
8617elif test "$with_gnu_ld" = yes; then
8618  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8619$as_echo_n "checking for GNU ld... " >&6; }
8620else
8621  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8622$as_echo_n "checking for non-GNU ld... " >&6; }
8623fi
8624if ${ac_cv_path_LD+:} false; then :
8625  $as_echo_n "(cached) " >&6
8626else
8627  if test -z "$LD"; then
8628  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8629  for ac_dir in $PATH; do
8630    test -z "$ac_dir" && ac_dir=.
8631    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8632      ac_cv_path_LD="$ac_dir/$ac_prog"
8633      # Check to see if the program is GNU ld.  I'd rather use --version,
8634      # but apparently some GNU ld's only accept -v.
8635      # Break only if it was the GNU/non-GNU ld that we prefer.
8636      if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8637	test "$with_gnu_ld" != no && break
8638      else
8639	test "$with_gnu_ld" != yes && break
8640      fi
8641    fi
8642  done
8643  IFS="$ac_save_ifs"
8644else
8645  ac_cv_path_LD="$LD" # Let the user override the test with a path.
8646fi
8647fi
8648
8649LD="$ac_cv_path_LD"
8650if test -n "$LD"; then
8651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8652$as_echo "$LD" >&6; }
8653else
8654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8655$as_echo "no" >&6; }
8656fi
8657test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8659$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8660if ${ac_cv_prog_gnu_ld+:} false; then :
8661  $as_echo_n "(cached) " >&6
8662else
8663  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8664if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8665  ac_cv_prog_gnu_ld=yes
8666else
8667  ac_cv_prog_gnu_ld=no
8668fi
8669fi
8670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
8671$as_echo "$ac_cv_prog_gnu_ld" >&6; }
8672with_gnu_ld=$ac_cv_prog_gnu_ld
8673
8674
8675
8676
8677if test -n "$ac_tool_prefix"; then
8678  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8679set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8681$as_echo_n "checking for $ac_word... " >&6; }
8682if ${ac_cv_prog_RANLIB+:} false; then :
8683  $as_echo_n "(cached) " >&6
8684else
8685  if test -n "$RANLIB"; then
8686  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8687else
8688as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8689for as_dir in $PATH
8690do
8691  IFS=$as_save_IFS
8692  test -z "$as_dir" && as_dir=.
8693    for ac_exec_ext in '' $ac_executable_extensions; do
8694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8695    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8697    break 2
8698  fi
8699done
8700  done
8701IFS=$as_save_IFS
8702
8703fi
8704fi
8705RANLIB=$ac_cv_prog_RANLIB
8706if test -n "$RANLIB"; then
8707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8708$as_echo "$RANLIB" >&6; }
8709else
8710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8711$as_echo "no" >&6; }
8712fi
8713
8714
8715fi
8716if test -z "$ac_cv_prog_RANLIB"; then
8717  ac_ct_RANLIB=$RANLIB
8718  # Extract the first word of "ranlib", so it can be a program name with args.
8719set dummy ranlib; ac_word=$2
8720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8721$as_echo_n "checking for $ac_word... " >&6; }
8722if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8723  $as_echo_n "(cached) " >&6
8724else
8725  if test -n "$ac_ct_RANLIB"; then
8726  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8727else
8728as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8729for as_dir in $PATH
8730do
8731  IFS=$as_save_IFS
8732  test -z "$as_dir" && as_dir=.
8733    for ac_exec_ext in '' $ac_executable_extensions; do
8734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8735    ac_cv_prog_ac_ct_RANLIB="ranlib"
8736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8737    break 2
8738  fi
8739done
8740  done
8741IFS=$as_save_IFS
8742
8743fi
8744fi
8745ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8746if test -n "$ac_ct_RANLIB"; then
8747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8748$as_echo "$ac_ct_RANLIB" >&6; }
8749else
8750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8751$as_echo "no" >&6; }
8752fi
8753
8754  if test "x$ac_ct_RANLIB" = x; then
8755    RANLIB=":"
8756  else
8757    case $cross_compiling:$ac_tool_warned in
8758yes:)
8759{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8760$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8761ac_tool_warned=yes ;;
8762esac
8763    RANLIB=$ac_ct_RANLIB
8764  fi
8765else
8766  RANLIB="$ac_cv_prog_RANLIB"
8767fi
8768
8769
8770  if test -n "$ac_tool_prefix"; then
8771  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8772set dummy ${ac_tool_prefix}strip; ac_word=$2
8773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8774$as_echo_n "checking for $ac_word... " >&6; }
8775if ${ac_cv_prog_STRIP+:} false; then :
8776  $as_echo_n "(cached) " >&6
8777else
8778  if test -n "$STRIP"; then
8779  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8780else
8781as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8782for as_dir in $PATH
8783do
8784  IFS=$as_save_IFS
8785  test -z "$as_dir" && as_dir=.
8786    for ac_exec_ext in '' $ac_executable_extensions; do
8787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8788    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8790    break 2
8791  fi
8792done
8793  done
8794IFS=$as_save_IFS
8795
8796fi
8797fi
8798STRIP=$ac_cv_prog_STRIP
8799if test -n "$STRIP"; then
8800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8801$as_echo "$STRIP" >&6; }
8802else
8803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8804$as_echo "no" >&6; }
8805fi
8806
8807
8808fi
8809if test -z "$ac_cv_prog_STRIP"; then
8810  ac_ct_STRIP=$STRIP
8811  # Extract the first word of "strip", so it can be a program name with args.
8812set dummy strip; ac_word=$2
8813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8814$as_echo_n "checking for $ac_word... " >&6; }
8815if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8816  $as_echo_n "(cached) " >&6
8817else
8818  if test -n "$ac_ct_STRIP"; then
8819  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8820else
8821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8822for as_dir in $PATH
8823do
8824  IFS=$as_save_IFS
8825  test -z "$as_dir" && as_dir=.
8826    for ac_exec_ext in '' $ac_executable_extensions; do
8827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8828    ac_cv_prog_ac_ct_STRIP="strip"
8829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8830    break 2
8831  fi
8832done
8833  done
8834IFS=$as_save_IFS
8835
8836fi
8837fi
8838ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8839if test -n "$ac_ct_STRIP"; then
8840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8841$as_echo "$ac_ct_STRIP" >&6; }
8842else
8843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8844$as_echo "no" >&6; }
8845fi
8846
8847  if test "x$ac_ct_STRIP" = x; then
8848    STRIP=":"
8849  else
8850    case $cross_compiling:$ac_tool_warned in
8851yes:)
8852{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8853$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8854ac_tool_warned=yes ;;
8855esac
8856    STRIP=$ac_ct_STRIP
8857  fi
8858else
8859  STRIP="$ac_cv_prog_STRIP"
8860fi
8861
8862
8863  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
8864$as_echo_n "checking whether it is possible to strip libraries... " >&6; }
8865  if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
8866    STRIP_STATIC_LIB="$STRIP -x"
8867    STRIP_SHARED_LIB="$STRIP --strip-unneeded"
8868    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8869$as_echo "yes" >&6; }
8870  else
8871    case $host_os in
8872      darwin*)
8873        STRIP="$STRIP -x"
8874        STRIP_STATIC_LIB=$STRIP
8875        STRIP_SHARED_LIB=$STRIP
8876        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8877$as_echo "yes" >&6; }
8878        ;;
8879      *)
8880        STRIP_STATIC_LIB=:
8881        STRIP_SHARED_LIB=:
8882        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8883$as_echo "no" >&6; }
8884        ;;
8885    esac
8886  fi
8887
8888
8889
8890if test -n "$ac_tool_prefix"; then
8891  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8892set dummy ${ac_tool_prefix}ar; ac_word=$2
8893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8894$as_echo_n "checking for $ac_word... " >&6; }
8895if ${ac_cv_prog_AR+:} false; then :
8896  $as_echo_n "(cached) " >&6
8897else
8898  if test -n "$AR"; then
8899  ac_cv_prog_AR="$AR" # Let the user override the test.
8900else
8901as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8902for as_dir in $PATH
8903do
8904  IFS=$as_save_IFS
8905  test -z "$as_dir" && as_dir=.
8906    for ac_exec_ext in '' $ac_executable_extensions; do
8907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8908    ac_cv_prog_AR="${ac_tool_prefix}ar"
8909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8910    break 2
8911  fi
8912done
8913  done
8914IFS=$as_save_IFS
8915
8916fi
8917fi
8918AR=$ac_cv_prog_AR
8919if test -n "$AR"; then
8920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8921$as_echo "$AR" >&6; }
8922else
8923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8924$as_echo "no" >&6; }
8925fi
8926
8927
8928fi
8929if test -z "$ac_cv_prog_AR"; then
8930  ac_ct_AR=$AR
8931  # Extract the first word of "ar", so it can be a program name with args.
8932set dummy ar; ac_word=$2
8933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8934$as_echo_n "checking for $ac_word... " >&6; }
8935if ${ac_cv_prog_ac_ct_AR+:} false; then :
8936  $as_echo_n "(cached) " >&6
8937else
8938  if test -n "$ac_ct_AR"; then
8939  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8940else
8941as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8942for as_dir in $PATH
8943do
8944  IFS=$as_save_IFS
8945  test -z "$as_dir" && as_dir=.
8946    for ac_exec_ext in '' $ac_executable_extensions; do
8947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8948    ac_cv_prog_ac_ct_AR="ar"
8949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8950    break 2
8951  fi
8952done
8953  done
8954IFS=$as_save_IFS
8955
8956fi
8957fi
8958ac_ct_AR=$ac_cv_prog_ac_ct_AR
8959if test -n "$ac_ct_AR"; then
8960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8961$as_echo "$ac_ct_AR" >&6; }
8962else
8963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8964$as_echo "no" >&6; }
8965fi
8966
8967  if test "x$ac_ct_AR" = x; then
8968    AR="ar"
8969  else
8970    case $cross_compiling:$ac_tool_warned in
8971yes:)
8972{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8973$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8974ac_tool_warned=yes ;;
8975esac
8976    AR=$ac_ct_AR
8977  fi
8978else
8979  AR="$ac_cv_prog_AR"
8980fi
8981
8982if test "$PORTNAME" = "win32"; then
8983  if test -n "$ac_tool_prefix"; then
8984  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8985set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8987$as_echo_n "checking for $ac_word... " >&6; }
8988if ${ac_cv_prog_DLLTOOL+:} false; then :
8989  $as_echo_n "(cached) " >&6
8990else
8991  if test -n "$DLLTOOL"; then
8992  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8993else
8994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8995for as_dir in $PATH
8996do
8997  IFS=$as_save_IFS
8998  test -z "$as_dir" && as_dir=.
8999    for ac_exec_ext in '' $ac_executable_extensions; do
9000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9001    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
9002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9003    break 2
9004  fi
9005done
9006  done
9007IFS=$as_save_IFS
9008
9009fi
9010fi
9011DLLTOOL=$ac_cv_prog_DLLTOOL
9012if test -n "$DLLTOOL"; then
9013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
9014$as_echo "$DLLTOOL" >&6; }
9015else
9016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9017$as_echo "no" >&6; }
9018fi
9019
9020
9021fi
9022if test -z "$ac_cv_prog_DLLTOOL"; then
9023  ac_ct_DLLTOOL=$DLLTOOL
9024  # Extract the first word of "dlltool", so it can be a program name with args.
9025set dummy dlltool; ac_word=$2
9026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9027$as_echo_n "checking for $ac_word... " >&6; }
9028if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
9029  $as_echo_n "(cached) " >&6
9030else
9031  if test -n "$ac_ct_DLLTOOL"; then
9032  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
9033else
9034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9035for as_dir in $PATH
9036do
9037  IFS=$as_save_IFS
9038  test -z "$as_dir" && as_dir=.
9039    for ac_exec_ext in '' $ac_executable_extensions; do
9040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9041    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
9042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9043    break 2
9044  fi
9045done
9046  done
9047IFS=$as_save_IFS
9048
9049fi
9050fi
9051ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
9052if test -n "$ac_ct_DLLTOOL"; then
9053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
9054$as_echo "$ac_ct_DLLTOOL" >&6; }
9055else
9056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9057$as_echo "no" >&6; }
9058fi
9059
9060  if test "x$ac_ct_DLLTOOL" = x; then
9061    DLLTOOL="dlltool"
9062  else
9063    case $cross_compiling:$ac_tool_warned in
9064yes:)
9065{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9066$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9067ac_tool_warned=yes ;;
9068esac
9069    DLLTOOL=$ac_ct_DLLTOOL
9070  fi
9071else
9072  DLLTOOL="$ac_cv_prog_DLLTOOL"
9073fi
9074
9075  if test -n "$ac_tool_prefix"; then
9076  # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
9077set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
9078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9079$as_echo_n "checking for $ac_word... " >&6; }
9080if ${ac_cv_prog_DLLWRAP+:} false; then :
9081  $as_echo_n "(cached) " >&6
9082else
9083  if test -n "$DLLWRAP"; then
9084  ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
9085else
9086as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9087for as_dir in $PATH
9088do
9089  IFS=$as_save_IFS
9090  test -z "$as_dir" && as_dir=.
9091    for ac_exec_ext in '' $ac_executable_extensions; do
9092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9093    ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
9094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9095    break 2
9096  fi
9097done
9098  done
9099IFS=$as_save_IFS
9100
9101fi
9102fi
9103DLLWRAP=$ac_cv_prog_DLLWRAP
9104if test -n "$DLLWRAP"; then
9105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
9106$as_echo "$DLLWRAP" >&6; }
9107else
9108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9109$as_echo "no" >&6; }
9110fi
9111
9112
9113fi
9114if test -z "$ac_cv_prog_DLLWRAP"; then
9115  ac_ct_DLLWRAP=$DLLWRAP
9116  # Extract the first word of "dllwrap", so it can be a program name with args.
9117set dummy dllwrap; ac_word=$2
9118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9119$as_echo_n "checking for $ac_word... " >&6; }
9120if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
9121  $as_echo_n "(cached) " >&6
9122else
9123  if test -n "$ac_ct_DLLWRAP"; then
9124  ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
9125else
9126as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9127for as_dir in $PATH
9128do
9129  IFS=$as_save_IFS
9130  test -z "$as_dir" && as_dir=.
9131    for ac_exec_ext in '' $ac_executable_extensions; do
9132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9133    ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
9134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9135    break 2
9136  fi
9137done
9138  done
9139IFS=$as_save_IFS
9140
9141fi
9142fi
9143ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
9144if test -n "$ac_ct_DLLWRAP"; then
9145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
9146$as_echo "$ac_ct_DLLWRAP" >&6; }
9147else
9148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9149$as_echo "no" >&6; }
9150fi
9151
9152  if test "x$ac_ct_DLLWRAP" = x; then
9153    DLLWRAP="dllwrap"
9154  else
9155    case $cross_compiling:$ac_tool_warned in
9156yes:)
9157{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9158$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9159ac_tool_warned=yes ;;
9160esac
9161    DLLWRAP=$ac_ct_DLLWRAP
9162  fi
9163else
9164  DLLWRAP="$ac_cv_prog_DLLWRAP"
9165fi
9166
9167  if test -n "$ac_tool_prefix"; then
9168  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9169set dummy ${ac_tool_prefix}windres; ac_word=$2
9170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9171$as_echo_n "checking for $ac_word... " >&6; }
9172if ${ac_cv_prog_WINDRES+:} false; then :
9173  $as_echo_n "(cached) " >&6
9174else
9175  if test -n "$WINDRES"; then
9176  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9177else
9178as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9179for as_dir in $PATH
9180do
9181  IFS=$as_save_IFS
9182  test -z "$as_dir" && as_dir=.
9183    for ac_exec_ext in '' $ac_executable_extensions; do
9184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9185    ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9187    break 2
9188  fi
9189done
9190  done
9191IFS=$as_save_IFS
9192
9193fi
9194fi
9195WINDRES=$ac_cv_prog_WINDRES
9196if test -n "$WINDRES"; then
9197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9198$as_echo "$WINDRES" >&6; }
9199else
9200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9201$as_echo "no" >&6; }
9202fi
9203
9204
9205fi
9206if test -z "$ac_cv_prog_WINDRES"; then
9207  ac_ct_WINDRES=$WINDRES
9208  # Extract the first word of "windres", so it can be a program name with args.
9209set dummy windres; ac_word=$2
9210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9211$as_echo_n "checking for $ac_word... " >&6; }
9212if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9213  $as_echo_n "(cached) " >&6
9214else
9215  if test -n "$ac_ct_WINDRES"; then
9216  ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9217else
9218as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9219for as_dir in $PATH
9220do
9221  IFS=$as_save_IFS
9222  test -z "$as_dir" && as_dir=.
9223    for ac_exec_ext in '' $ac_executable_extensions; do
9224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9225    ac_cv_prog_ac_ct_WINDRES="windres"
9226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9227    break 2
9228  fi
9229done
9230  done
9231IFS=$as_save_IFS
9232
9233fi
9234fi
9235ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9236if test -n "$ac_ct_WINDRES"; then
9237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9238$as_echo "$ac_ct_WINDRES" >&6; }
9239else
9240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9241$as_echo "no" >&6; }
9242fi
9243
9244  if test "x$ac_ct_WINDRES" = x; then
9245    WINDRES="windres"
9246  else
9247    case $cross_compiling:$ac_tool_warned in
9248yes:)
9249{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9250$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9251ac_tool_warned=yes ;;
9252esac
9253    WINDRES=$ac_ct_WINDRES
9254  fi
9255else
9256  WINDRES="$ac_cv_prog_WINDRES"
9257fi
9258
9259fi
9260
9261# Find a good install program.  We prefer a C program (faster),
9262# so one script is as good as another.  But avoid the broken or
9263# incompatible versions:
9264# SysV /etc/install, /usr/sbin/install
9265# SunOS /usr/etc/install
9266# IRIX /sbin/install
9267# AIX /bin/install
9268# AmigaOS /C/install, which installs bootblocks on floppy discs
9269# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9270# AFS /usr/afsws/bin/install, which mishandles nonexistent args
9271# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9272# OS/2's system install, which has a completely different semantic
9273# ./install, which can be erroneously created by make from ./install.sh.
9274# Reject install programs that cannot install multiple files.
9275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9276$as_echo_n "checking for a BSD-compatible install... " >&6; }
9277if test -z "$INSTALL"; then
9278if ${ac_cv_path_install+:} false; then :
9279  $as_echo_n "(cached) " >&6
9280else
9281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9282for as_dir in $PATH
9283do
9284  IFS=$as_save_IFS
9285  test -z "$as_dir" && as_dir=.
9286    # Account for people who put trailing slashes in PATH elements.
9287case $as_dir/ in #((
9288  ./ | .// | /[cC]/* | \
9289  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9290  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9291  /usr/ucb/* ) ;;
9292  *)
9293    # OSF1 and SCO ODT 3.0 have their own names for install.
9294    # Don't use installbsd from OSF since it installs stuff as root
9295    # by default.
9296    for ac_prog in ginstall scoinst install; do
9297      for ac_exec_ext in '' $ac_executable_extensions; do
9298	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9299	  if test $ac_prog = install &&
9300	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9301	    # AIX install.  It has an incompatible calling convention.
9302	    :
9303	  elif test $ac_prog = install &&
9304	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9305	    # program-specific install script used by HP pwplus--don't use.
9306	    :
9307	  else
9308	    rm -rf conftest.one conftest.two conftest.dir
9309	    echo one > conftest.one
9310	    echo two > conftest.two
9311	    mkdir conftest.dir
9312	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9313	      test -s conftest.one && test -s conftest.two &&
9314	      test -s conftest.dir/conftest.one &&
9315	      test -s conftest.dir/conftest.two
9316	    then
9317	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9318	      break 3
9319	    fi
9320	  fi
9321	fi
9322      done
9323    done
9324    ;;
9325esac
9326
9327  done
9328IFS=$as_save_IFS
9329
9330rm -rf conftest.one conftest.two conftest.dir
9331
9332fi
9333  if test "${ac_cv_path_install+set}" = set; then
9334    INSTALL=$ac_cv_path_install
9335  else
9336    # As a last resort, use the slow shell script.  Don't cache a
9337    # value for INSTALL within a source directory, because that will
9338    # break other packages using the cache if that directory is
9339    # removed, or if the value is a relative name.
9340    INSTALL=$ac_install_sh
9341  fi
9342fi
9343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9344$as_echo "$INSTALL" >&6; }
9345
9346# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9347# It thinks the first close brace ends the variable substitution.
9348test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9349
9350test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9351
9352test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9353
9354# When Autoconf chooses install-sh as install program it tries to generate
9355# a relative path to it in each makefile where it substitutes it. This clashes
9356# with our Makefile.global concept. This workaround helps.
9357case $INSTALL in
9358  *install-sh*) install_bin='';;
9359  *) install_bin=$INSTALL;;
9360esac
9361
9362
9363if test -z "$TAR"; then
9364  for ac_prog in tar
9365do
9366  # Extract the first word of "$ac_prog", so it can be a program name with args.
9367set dummy $ac_prog; ac_word=$2
9368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9369$as_echo_n "checking for $ac_word... " >&6; }
9370if ${ac_cv_path_TAR+:} false; then :
9371  $as_echo_n "(cached) " >&6
9372else
9373  case $TAR in
9374  [\\/]* | ?:[\\/]*)
9375  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9376  ;;
9377  *)
9378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9379for as_dir in $PATH
9380do
9381  IFS=$as_save_IFS
9382  test -z "$as_dir" && as_dir=.
9383    for ac_exec_ext in '' $ac_executable_extensions; do
9384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9385    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9387    break 2
9388  fi
9389done
9390  done
9391IFS=$as_save_IFS
9392
9393  ;;
9394esac
9395fi
9396TAR=$ac_cv_path_TAR
9397if test -n "$TAR"; then
9398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9399$as_echo "$TAR" >&6; }
9400else
9401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9402$as_echo "no" >&6; }
9403fi
9404
9405
9406  test -n "$TAR" && break
9407done
9408
9409else
9410  # Report the value of TAR in configure's output in all cases.
9411  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9412$as_echo_n "checking for TAR... " >&6; }
9413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9414$as_echo "$TAR" >&6; }
9415fi
9416
9417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9418$as_echo_n "checking whether ln -s works... " >&6; }
9419LN_S=$as_ln_s
9420if test "$LN_S" = "ln -s"; then
9421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9422$as_echo "yes" >&6; }
9423else
9424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9425$as_echo "no, using $LN_S" >&6; }
9426fi
9427
9428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
9429$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
9430if test -z "$MKDIR_P"; then
9431  if ${ac_cv_path_mkdir+:} false; then :
9432  $as_echo_n "(cached) " >&6
9433else
9434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9435for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
9436do
9437  IFS=$as_save_IFS
9438  test -z "$as_dir" && as_dir=.
9439    for ac_prog in mkdir gmkdir; do
9440	 for ac_exec_ext in '' $ac_executable_extensions; do
9441	   as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
9442	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
9443	     'mkdir (GNU coreutils) '* | \
9444	     'mkdir (coreutils) '* | \
9445	     'mkdir (fileutils) '4.1*)
9446	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
9447	       break 3;;
9448	   esac
9449	 done
9450       done
9451  done
9452IFS=$as_save_IFS
9453
9454fi
9455
9456  test -d ./--version && rmdir ./--version
9457  if test "${ac_cv_path_mkdir+set}" = set; then
9458    MKDIR_P="$ac_cv_path_mkdir -p"
9459  else
9460    # As a last resort, use the slow shell script.  Don't cache a
9461    # value for MKDIR_P within a source directory, because that will
9462    # break other packages using the cache if that directory is
9463    # removed, or if the value is a relative name.
9464    MKDIR_P="$ac_install_sh -d"
9465  fi
9466fi
9467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
9468$as_echo "$MKDIR_P" >&6; }
9469
9470# When Autoconf chooses install-sh as mkdir -p program it tries to generate
9471# a relative path to it in each makefile where it substitutes it. This clashes
9472# with our Makefile.global concept. This workaround helps.
9473case $MKDIR_P in
9474  *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
9475esac
9476
9477if test -z "$BISON"; then
9478  for ac_prog in bison
9479do
9480  # Extract the first word of "$ac_prog", so it can be a program name with args.
9481set dummy $ac_prog; ac_word=$2
9482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9483$as_echo_n "checking for $ac_word... " >&6; }
9484if ${ac_cv_path_BISON+:} false; then :
9485  $as_echo_n "(cached) " >&6
9486else
9487  case $BISON in
9488  [\\/]* | ?:[\\/]*)
9489  ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
9490  ;;
9491  *)
9492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9493for as_dir in $PATH
9494do
9495  IFS=$as_save_IFS
9496  test -z "$as_dir" && as_dir=.
9497    for ac_exec_ext in '' $ac_executable_extensions; do
9498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9499    ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
9500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9501    break 2
9502  fi
9503done
9504  done
9505IFS=$as_save_IFS
9506
9507  ;;
9508esac
9509fi
9510BISON=$ac_cv_path_BISON
9511if test -n "$BISON"; then
9512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9513$as_echo "$BISON" >&6; }
9514else
9515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9516$as_echo "no" >&6; }
9517fi
9518
9519
9520  test -n "$BISON" && break
9521done
9522
9523else
9524  # Report the value of BISON in configure's output in all cases.
9525  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
9526$as_echo_n "checking for BISON... " >&6; }
9527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9528$as_echo "$BISON" >&6; }
9529fi
9530
9531
9532if test "$BISON"; then
9533  pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
9534  { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
9535$as_echo "$as_me: using $pgac_bison_version" >&6;}
9536  if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
9537  then
9538    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9539*** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9540*** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
9541$as_echo "$as_me: WARNING:
9542*** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9543*** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
9544    BISON=""
9545  fi
9546  # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
9547  # of the now preferred %name-prefix "base_yy", but the latter
9548  # doesn't work with Bison 2.3 or less.  So for now we silence the
9549  # deprecation warnings.
9550  if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
9551  then
9552    BISONFLAGS="$BISONFLAGS -Wno-deprecated"
9553  fi
9554fi
9555
9556if test -z "$BISON"; then
9557  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9558*** Without Bison you will not be able to build PostgreSQL from Git nor
9559*** change any of the parser definition files.  You can obtain Bison from
9560*** a GNU mirror site.  (If you are using the official distribution of
9561*** PostgreSQL then you do not need to worry about this, because the Bison
9562*** output is pre-generated.)" >&5
9563$as_echo "$as_me: WARNING:
9564*** Without Bison you will not be able to build PostgreSQL from Git nor
9565*** change any of the parser definition files.  You can obtain Bison from
9566*** a GNU mirror site.  (If you are using the official distribution of
9567*** PostgreSQL then you do not need to worry about this, because the Bison
9568*** output is pre-generated.)" >&2;}
9569fi
9570
9571
9572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
9573$as_echo_n "checking for flex... " >&6; }
9574if ${pgac_cv_path_flex+:} false; then :
9575  $as_echo_n "(cached) " >&6
9576else
9577  # Let the user override the test
9578if test -n "$FLEX"; then
9579  pgac_cv_path_flex=$FLEX
9580else
9581  pgac_save_IFS=$IFS
9582  IFS=$PATH_SEPARATOR
9583  for pgac_dir in $PATH; do
9584    IFS=$pgac_save_IFS
9585    if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
9586      pgac_dir=`pwd`
9587    fi
9588    for pgac_prog in flex lex; do
9589      pgac_candidate="$pgac_dir/$pgac_prog"
9590      if test -f "$pgac_candidate" \
9591        && $pgac_candidate --version </dev/null >/dev/null 2>&1
9592      then
9593        echo '%%'  > conftest.l
9594        if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
9595          pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
9596          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;}'
9597          then
9598            pgac_cv_path_flex=$pgac_candidate
9599            break 2
9600          else
9601            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9602*** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9603*** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
9604$as_echo "$as_me: WARNING:
9605*** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9606*** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
9607          fi
9608        fi
9609      fi
9610    done
9611  done
9612  rm -f conftest.l lex.yy.c
9613  : ${pgac_cv_path_flex=no}
9614fi
9615
9616fi
9617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
9618$as_echo "$pgac_cv_path_flex" >&6; }
9619if test x"$pgac_cv_path_flex" = x"no"; then
9620  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9621*** Without Flex you will not be able to build PostgreSQL from Git nor
9622*** change any of the scanner definition files.  You can obtain Flex from
9623*** a GNU mirror site.  (If you are using the official distribution of
9624*** PostgreSQL then you do not need to worry about this because the Flex
9625*** output is pre-generated.)" >&5
9626$as_echo "$as_me: WARNING:
9627*** Without Flex you will not be able to build PostgreSQL from Git nor
9628*** change any of the scanner definition files.  You can obtain Flex from
9629*** a GNU mirror site.  (If you are using the official distribution of
9630*** PostgreSQL then you do not need to worry about this because the Flex
9631*** output is pre-generated.)" >&2;}
9632
9633  FLEX=
9634else
9635  FLEX=$pgac_cv_path_flex
9636  pgac_flex_version=`$FLEX --version 2>/dev/null`
9637  { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
9638$as_echo "$as_me: using $pgac_flex_version" >&6;}
9639fi
9640
9641
9642
9643
9644
9645if test -z "$PERL"; then
9646  for ac_prog in perl
9647do
9648  # Extract the first word of "$ac_prog", so it can be a program name with args.
9649set dummy $ac_prog; ac_word=$2
9650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9651$as_echo_n "checking for $ac_word... " >&6; }
9652if ${ac_cv_path_PERL+:} false; then :
9653  $as_echo_n "(cached) " >&6
9654else
9655  case $PERL in
9656  [\\/]* | ?:[\\/]*)
9657  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
9658  ;;
9659  *)
9660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9661for as_dir in $PATH
9662do
9663  IFS=$as_save_IFS
9664  test -z "$as_dir" && as_dir=.
9665    for ac_exec_ext in '' $ac_executable_extensions; do
9666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9667    ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
9668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9669    break 2
9670  fi
9671done
9672  done
9673IFS=$as_save_IFS
9674
9675  ;;
9676esac
9677fi
9678PERL=$ac_cv_path_PERL
9679if test -n "$PERL"; then
9680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9681$as_echo "$PERL" >&6; }
9682else
9683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9684$as_echo "no" >&6; }
9685fi
9686
9687
9688  test -n "$PERL" && break
9689done
9690
9691else
9692  # Report the value of PERL in configure's output in all cases.
9693  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
9694$as_echo_n "checking for PERL... " >&6; }
9695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9696$as_echo "$PERL" >&6; }
9697fi
9698
9699
9700if test "$PERL"; then
9701  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'`
9702  { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
9703$as_echo "$as_me: using perl $pgac_perl_version" >&6;}
9704  if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
9705    $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
9706  then
9707    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9708*** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9709*** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
9710$as_echo "$as_me: WARNING:
9711*** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9712*** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
9713    PERL=""
9714  fi
9715fi
9716
9717if test -z "$PERL"; then
9718  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9719*** Without Perl you will not be able to build PostgreSQL from Git.
9720*** You can obtain Perl from any CPAN mirror site.
9721*** (If you are using the official distribution of PostgreSQL then you do not
9722*** need to worry about this, because the Perl output is pre-generated.)" >&5
9723$as_echo "$as_me: WARNING:
9724*** Without Perl you will not be able to build PostgreSQL from Git.
9725*** You can obtain Perl from any CPAN mirror site.
9726*** (If you are using the official distribution of PostgreSQL then you do not
9727*** need to worry about this, because the Perl output is pre-generated.)" >&2;}
9728fi
9729
9730if test "$with_perl" = yes; then
9731  if test -z "$PERL"; then
9732    as_fn_error $? "Perl not found" "$LINENO" 5
9733  fi
9734
9735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
9736$as_echo_n "checking for Perl archlibexp... " >&6; }
9737perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
9738test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
9739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
9740$as_echo "$perl_archlibexp" >&6; }
9741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
9742$as_echo_n "checking for Perl privlibexp... " >&6; }
9743perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
9744test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
9745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
9746$as_echo "$perl_privlibexp" >&6; }
9747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
9748$as_echo_n "checking for Perl useshrplib... " >&6; }
9749perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
9750test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
9751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
9752$as_echo "$perl_useshrplib" >&6; }
9753  if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
9754    as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
9755You might have to rebuild your Perl installation.  Refer to the
9756documentation for details.  Use --without-perl to disable building
9757PL/Perl." "$LINENO" 5
9758  fi
9759  # On most platforms, archlibexp is also where the Perl include files live ...
9760  perl_includespec="-I$perl_archlibexp/CORE"
9761  # ... but on newer macOS versions, we must use -iwithsysroot to look
9762  # under $PG_SYSROOT
9763  if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
9764    if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
9765      perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
9766    fi
9767  fi
9768
9769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
9770$as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
9771perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
9772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
9773$as_echo "$perl_ccflags" >&6; }
9774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
9775$as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
9776perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
9777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
9778$as_echo "$perl_embed_ccflags" >&6; }
9779
9780
9781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
9782$as_echo_n "checking for flags to link embedded Perl... " >&6; }
9783if test "$PORTNAME" = "win32" ; then
9784	perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
9785	if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
9786		perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9787	else
9788		perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
9789		if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
9790			perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9791		fi
9792	fi
9793else
9794	pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
9795	pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
9796	perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
9797fi
9798if test -z "$perl_embed_ldflags" ; then
9799	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9800$as_echo "no" >&6; }
9801	as_fn_error $? "could not determine flags for linking embedded Perl.
9802This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
9803installed." "$LINENO" 5
9804else
9805	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
9806$as_echo "$perl_embed_ldflags" >&6; }
9807fi
9808
9809fi
9810
9811if test "$with_python" = yes; then
9812  if test -z "$PYTHON"; then
9813  for ac_prog in python python3 python2
9814do
9815  # Extract the first word of "$ac_prog", so it can be a program name with args.
9816set dummy $ac_prog; ac_word=$2
9817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9818$as_echo_n "checking for $ac_word... " >&6; }
9819if ${ac_cv_path_PYTHON+:} false; then :
9820  $as_echo_n "(cached) " >&6
9821else
9822  case $PYTHON in
9823  [\\/]* | ?:[\\/]*)
9824  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
9825  ;;
9826  *)
9827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9828for as_dir in $PATH
9829do
9830  IFS=$as_save_IFS
9831  test -z "$as_dir" && as_dir=.
9832    for ac_exec_ext in '' $ac_executable_extensions; do
9833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9834    ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
9835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9836    break 2
9837  fi
9838done
9839  done
9840IFS=$as_save_IFS
9841
9842  ;;
9843esac
9844fi
9845PYTHON=$ac_cv_path_PYTHON
9846if test -n "$PYTHON"; then
9847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9848$as_echo "$PYTHON" >&6; }
9849else
9850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9851$as_echo "no" >&6; }
9852fi
9853
9854
9855  test -n "$PYTHON" && break
9856done
9857
9858else
9859  # Report the value of PYTHON in configure's output in all cases.
9860  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
9861$as_echo_n "checking for PYTHON... " >&6; }
9862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9863$as_echo "$PYTHON" >&6; }
9864fi
9865
9866if test x"$PYTHON" = x""; then
9867  as_fn_error $? "Python not found" "$LINENO" 5
9868fi
9869
9870
9871python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
9872{ $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
9873$as_echo "$as_me: using python $python_fullversion" >&6;}
9874# python_fullversion is typically n.n.n plus some trailing junk
9875python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
9876python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
9877python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
9878# Reject unsupported Python versions as soon as practical.
9879if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 4; then
9880  as_fn_error $? "Python version $python_version is too old (version 2.4 or later is required)" "$LINENO" 5
9881fi
9882
9883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
9884$as_echo_n "checking for Python distutils module... " >&6; }
9885if "${PYTHON}" -c 'import distutils' 2>&5
9886then
9887    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9888$as_echo "yes" >&6; }
9889else
9890    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9891$as_echo "no" >&6; }
9892    as_fn_error $? "distutils module not found" "$LINENO" 5
9893fi
9894
9895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
9896$as_echo_n "checking Python configuration directory... " >&6; }
9897python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
9898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
9899$as_echo "$python_configdir" >&6; }
9900
9901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
9902$as_echo_n "checking Python include directories... " >&6; }
9903python_includespec=`${PYTHON} -c "
9904import distutils.sysconfig
9905a = '-I' + distutils.sysconfig.get_python_inc(False)
9906b = '-I' + distutils.sysconfig.get_python_inc(True)
9907if a == b:
9908    print(a)
9909else:
9910    print(a + ' ' + b)"`
9911if test "$PORTNAME" = win32 ; then
9912    python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
9913fi
9914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
9915$as_echo "$python_includespec" >&6; }
9916
9917
9918
9919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
9920$as_echo_n "checking how to link an embedded Python application... " >&6; }
9921
9922python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
9923python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
9924
9925# If LDLIBRARY exists and has a shlib extension, use it verbatim.
9926ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
9927if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
9928then
9929	ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
9930	found_shlib=1
9931else
9932	# Otherwise, guess the base name of the shlib.
9933	# LDVERSION was added in Python 3.2, before that use VERSION,
9934	# or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
9935	python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
9936	if test x"${python_ldversion}" != x""; then
9937		ldlibrary="python${python_ldversion}"
9938	else
9939		python_version_var=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('VERSION'))))"`
9940		if test x"${python_version_var}" != x""; then
9941			ldlibrary="python${python_version_var}"
9942		else
9943			ldlibrary="python${python_version}"
9944		fi
9945	fi
9946	# Search for a likely-looking file.
9947	found_shlib=0
9948	for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9949	do
9950		# We don't know the platform DLSUFFIX here, so check 'em all.
9951		for e in .so .dll .dylib .sl; do
9952			if test -e "$d/lib${ldlibrary}$e"; then
9953				python_libdir="$d"
9954				found_shlib=1
9955				break 2
9956			fi
9957		done
9958	done
9959	# Some platforms (OpenBSD) require us to accept a bare versioned shlib
9960	# (".so.n.n") as well. However, check this only after failing to find
9961	# ".so" anywhere, because yet other platforms (Debian) put the .so
9962	# symlink in a different directory from the underlying versioned shlib.
9963	if test "$found_shlib" != 1; then
9964		for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9965		do
9966			for f in "$d/lib${ldlibrary}.so."* ; do
9967				if test -e "$f"; then
9968					python_libdir="$d"
9969					found_shlib=1
9970					break 2
9971				fi
9972			done
9973		done
9974	fi
9975	# As usual, Windows has its own ideas.  Possible default library
9976	# locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
9977	# and the "lib" prefix might not be there.
9978	if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
9979		for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
9980		do
9981			for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
9982				if test -e "$f"; then
9983					python_libdir="$d"
9984					found_shlib=1
9985					break 2
9986				fi
9987			done
9988		done
9989	fi
9990fi
9991if test "$found_shlib" != 1; then
9992	as_fn_error $? "could not find shared library for Python
9993You might have to rebuild your Python installation.  Refer to the
9994documentation for details.  Use --without-python to disable building
9995PL/Python." "$LINENO" 5
9996fi
9997python_libspec="-L${python_libdir} -l${ldlibrary}"
9998
9999python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
10000
10001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
10002$as_echo "${python_libspec} ${python_additional_libs}" >&6; }
10003
10004
10005
10006fi
10007
10008if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
10009  if test -z "$ZIC"; then
10010  for ac_prog in zic
10011do
10012  # Extract the first word of "$ac_prog", so it can be a program name with args.
10013set dummy $ac_prog; ac_word=$2
10014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10015$as_echo_n "checking for $ac_word... " >&6; }
10016if ${ac_cv_path_ZIC+:} false; then :
10017  $as_echo_n "(cached) " >&6
10018else
10019  case $ZIC in
10020  [\\/]* | ?:[\\/]*)
10021  ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
10022  ;;
10023  *)
10024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10025for as_dir in $PATH
10026do
10027  IFS=$as_save_IFS
10028  test -z "$as_dir" && as_dir=.
10029    for ac_exec_ext in '' $ac_executable_extensions; do
10030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10031    ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
10032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10033    break 2
10034  fi
10035done
10036  done
10037IFS=$as_save_IFS
10038
10039  ;;
10040esac
10041fi
10042ZIC=$ac_cv_path_ZIC
10043if test -n "$ZIC"; then
10044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10045$as_echo "$ZIC" >&6; }
10046else
10047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10048$as_echo "no" >&6; }
10049fi
10050
10051
10052  test -n "$ZIC" && break
10053done
10054
10055else
10056  # Report the value of ZIC in configure's output in all cases.
10057  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
10058$as_echo_n "checking for ZIC... " >&6; }
10059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10060$as_echo "$ZIC" >&6; }
10061fi
10062
10063  if test -z "$ZIC"; then
10064    as_fn_error $? "
10065When cross-compiling, either use the option --with-system-tzdata to use
10066existing time-zone data, or set the environment variable ZIC to a zic
10067program to use during the build." "$LINENO" 5
10068  fi
10069fi
10070
10071#
10072# Pthreads
10073#
10074# For each platform, we need to know about any special compile and link
10075# libraries, and whether the normal C function names are thread-safe.
10076# See the comment at the top of src/port/thread.c for more information.
10077# WIN32 doesn't need the pthread tests;  it always uses threads
10078#
10079# These tests are run before the library-tests, because linking with the
10080# other libraries can pull in the pthread functions as a side-effect.  We
10081# want to use the -pthread or similar flags directly, and not rely on
10082# the side-effects of linking with some other library.
10083
10084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
10085$as_echo_n "checking for a sed that does not truncate output... " >&6; }
10086if ${ac_cv_path_SED+:} false; then :
10087  $as_echo_n "(cached) " >&6
10088else
10089            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
10090     for ac_i in 1 2 3 4 5 6 7; do
10091       ac_script="$ac_script$as_nl$ac_script"
10092     done
10093     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
10094     { ac_script=; unset ac_script;}
10095     if test -z "$SED"; then
10096  ac_path_SED_found=false
10097  # Loop through the user's path and test for each of PROGNAME-LIST
10098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10099for as_dir in $PATH
10100do
10101  IFS=$as_save_IFS
10102  test -z "$as_dir" && as_dir=.
10103    for ac_prog in sed gsed; do
10104    for ac_exec_ext in '' $ac_executable_extensions; do
10105      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
10106      as_fn_executable_p "$ac_path_SED" || continue
10107# Check for GNU ac_path_SED and select it if it is found.
10108  # Check for GNU $ac_path_SED
10109case `"$ac_path_SED" --version 2>&1` in
10110*GNU*)
10111  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10112*)
10113  ac_count=0
10114  $as_echo_n 0123456789 >"conftest.in"
10115  while :
10116  do
10117    cat "conftest.in" "conftest.in" >"conftest.tmp"
10118    mv "conftest.tmp" "conftest.in"
10119    cp "conftest.in" "conftest.nl"
10120    $as_echo '' >> "conftest.nl"
10121    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10122    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10123    as_fn_arith $ac_count + 1 && ac_count=$as_val
10124    if test $ac_count -gt ${ac_path_SED_max-0}; then
10125      # Best one so far, save it but keep looking for a better one
10126      ac_cv_path_SED="$ac_path_SED"
10127      ac_path_SED_max=$ac_count
10128    fi
10129    # 10*(2^10) chars as input seems more than enough
10130    test $ac_count -gt 10 && break
10131  done
10132  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10133esac
10134
10135      $ac_path_SED_found && break 3
10136    done
10137  done
10138  done
10139IFS=$as_save_IFS
10140  if test -z "$ac_cv_path_SED"; then
10141    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10142  fi
10143else
10144  ac_cv_path_SED=$SED
10145fi
10146
10147fi
10148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10149$as_echo "$ac_cv_path_SED" >&6; }
10150 SED="$ac_cv_path_SED"
10151  rm -f conftest.sed
10152
10153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10154$as_echo_n "checking for ANSI C header files... " >&6; }
10155if ${ac_cv_header_stdc+:} false; then :
10156  $as_echo_n "(cached) " >&6
10157else
10158  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10159/* end confdefs.h.  */
10160#include <stdlib.h>
10161#include <stdarg.h>
10162#include <string.h>
10163#include <float.h>
10164
10165int
10166main ()
10167{
10168
10169  ;
10170  return 0;
10171}
10172_ACEOF
10173if ac_fn_c_try_compile "$LINENO"; then :
10174  ac_cv_header_stdc=yes
10175else
10176  ac_cv_header_stdc=no
10177fi
10178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10179
10180if test $ac_cv_header_stdc = yes; then
10181  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10182  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10183/* end confdefs.h.  */
10184#include <string.h>
10185
10186_ACEOF
10187if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10188  $EGREP "memchr" >/dev/null 2>&1; then :
10189
10190else
10191  ac_cv_header_stdc=no
10192fi
10193rm -f conftest*
10194
10195fi
10196
10197if test $ac_cv_header_stdc = yes; then
10198  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10199  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10200/* end confdefs.h.  */
10201#include <stdlib.h>
10202
10203_ACEOF
10204if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10205  $EGREP "free" >/dev/null 2>&1; then :
10206
10207else
10208  ac_cv_header_stdc=no
10209fi
10210rm -f conftest*
10211
10212fi
10213
10214if test $ac_cv_header_stdc = yes; then
10215  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10216  if test "$cross_compiling" = yes; then :
10217  :
10218else
10219  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10220/* end confdefs.h.  */
10221#include <ctype.h>
10222#include <stdlib.h>
10223#if ((' ' & 0x0FF) == 0x020)
10224# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10225# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10226#else
10227# define ISLOWER(c) \
10228		   (('a' <= (c) && (c) <= 'i') \
10229		     || ('j' <= (c) && (c) <= 'r') \
10230		     || ('s' <= (c) && (c) <= 'z'))
10231# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10232#endif
10233
10234#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10235int
10236main ()
10237{
10238  int i;
10239  for (i = 0; i < 256; i++)
10240    if (XOR (islower (i), ISLOWER (i))
10241	|| toupper (i) != TOUPPER (i))
10242      return 2;
10243  return 0;
10244}
10245_ACEOF
10246if ac_fn_c_try_run "$LINENO"; then :
10247
10248else
10249  ac_cv_header_stdc=no
10250fi
10251rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10252  conftest.$ac_objext conftest.beam conftest.$ac_ext
10253fi
10254
10255fi
10256fi
10257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10258$as_echo "$ac_cv_header_stdc" >&6; }
10259if test $ac_cv_header_stdc = yes; then
10260
10261$as_echo "#define STDC_HEADERS 1" >>confdefs.h
10262
10263fi
10264
10265# On IRIX 5.3, sys/types and inttypes.h are conflicting.
10266for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10267		  inttypes.h stdint.h unistd.h
10268do :
10269  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10270ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
10271"
10272if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10273  cat >>confdefs.h <<_ACEOF
10274#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10275_ACEOF
10276
10277fi
10278
10279done
10280
10281
10282if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
10283   # then
10284
10285
10286
10287
10288ac_ext=c
10289ac_cpp='$CPP $CPPFLAGS'
10290ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10291ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10292ac_compiler_gnu=$ac_cv_c_compiler_gnu
10293
10294ax_pthread_ok=no
10295
10296# We used to check for pthread.h first, but this fails if pthread.h
10297# requires special compiler flags (e.g. on Tru64 or Sequent).
10298# It gets checked for in the link test anyway.
10299
10300# First of all, check if the user has set any of the PTHREAD_LIBS,
10301# etcetera environment variables, and if threads linking works using
10302# them:
10303if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
10304        ax_pthread_save_CC="$CC"
10305        ax_pthread_save_CFLAGS="$CFLAGS"
10306        ax_pthread_save_LIBS="$LIBS"
10307        if test "x$PTHREAD_CC" != "x"; then :
10308  CC="$PTHREAD_CC"
10309fi
10310        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10311        LIBS="$PTHREAD_LIBS $LIBS"
10312        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
10313$as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
10314        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10315/* end confdefs.h.  */
10316
10317/* Override any GCC internal prototype to avoid an error.
10318   Use char because int might match the return type of a GCC
10319   builtin and then its argument prototype would still apply.  */
10320#ifdef __cplusplus
10321extern "C"
10322#endif
10323char pthread_join ();
10324int
10325main ()
10326{
10327return pthread_join ();
10328  ;
10329  return 0;
10330}
10331_ACEOF
10332if ac_fn_c_try_link "$LINENO"; then :
10333  ax_pthread_ok=yes
10334fi
10335rm -f core conftest.err conftest.$ac_objext \
10336    conftest$ac_exeext conftest.$ac_ext
10337        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10338$as_echo "$ax_pthread_ok" >&6; }
10339        if test "x$ax_pthread_ok" = "xno"; then
10340                PTHREAD_LIBS=""
10341                PTHREAD_CFLAGS=""
10342        fi
10343        CC="$ax_pthread_save_CC"
10344        CFLAGS="$ax_pthread_save_CFLAGS"
10345        LIBS="$ax_pthread_save_LIBS"
10346fi
10347
10348# We must check for the threads library under a number of different
10349# names; the ordering is very important because some systems
10350# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
10351# libraries is broken (non-POSIX).
10352
10353# Create a list of thread flags to try.  Items starting with a "-" are
10354# C compiler flags, and other items are library names, except for "none"
10355# which indicates that we try without any flags at all, and "pthread-config"
10356# which is a program returning the flags for the Pth emulation library.
10357
10358ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
10359
10360# The ordering *is* (sometimes) important.  Some notes on the
10361# individual items follow:
10362
10363# pthreads: AIX (must check this before -lpthread)
10364# none: in case threads are in libc; should be tried before -Kthread and
10365#       other compiler flags to prevent continual compiler warnings
10366# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
10367# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
10368#           (Note: HP C rejects this with "bad form for `-t' option")
10369# -pthreads: Solaris/gcc (Note: HP C also rejects)
10370# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
10371#      doesn't hurt to check since this sometimes defines pthreads and
10372#      -D_REENTRANT too), HP C (must be checked before -lpthread, which
10373#      is present but should not be used directly; and before -mthreads,
10374#      because the compiler interprets this as "-mt" + "-hreads")
10375# -mthreads: Mingw32/gcc, Lynx/gcc
10376# pthread: Linux, etcetera
10377# --thread-safe: KAI C++
10378# pthread-config: use pthread-config program (for GNU Pth library)
10379
10380case $host_os in
10381
10382        freebsd*)
10383
10384        # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
10385        # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
10386
10387        ax_pthread_flags="-kthread lthread $ax_pthread_flags"
10388        ;;
10389
10390        hpux*)
10391
10392        # From the cc(1) man page: "[-mt] Sets various -D flags to enable
10393        # multi-threading and also sets -lpthread."
10394
10395        ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
10396        ;;
10397
10398        openedition*)
10399
10400        # IBM z/OS requires a feature-test macro to be defined in order to
10401        # enable POSIX threads at all, so give the user a hint if this is
10402        # not set. (We don't define these ourselves, as they can affect
10403        # other portions of the system API in unpredictable ways.)
10404
10405        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10406/* end confdefs.h.  */
10407
10408#            if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
10409             AX_PTHREAD_ZOS_MISSING
10410#            endif
10411
10412_ACEOF
10413if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10414  $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
10415  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
10416$as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
10417fi
10418rm -f conftest*
10419
10420        ;;
10421
10422        solaris*)
10423
10424        # On Solaris (at least, for some versions), libc contains stubbed
10425        # (non-functional) versions of the pthreads routines, so link-based
10426        # tests will erroneously succeed. (N.B.: The stubs are missing
10427        # pthread_cleanup_push, or rather a function called by this macro,
10428        # so we could check for that, but who knows whether they'll stub
10429        # that too in a future libc.)  So we'll check first for the
10430        # standard Solaris way of linking pthreads (-mt -lpthread).
10431
10432        ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
10433        ;;
10434esac
10435
10436# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
10437
10438if test "x$GCC" = "xyes"; then :
10439  ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
10440fi
10441
10442# The presence of a feature test macro requesting re-entrant function
10443# definitions is, on some systems, a strong hint that pthreads support is
10444# correctly enabled
10445
10446case $host_os in
10447        darwin* | hpux* | linux* | osf* | solaris*)
10448        ax_pthread_check_macro="_REENTRANT"
10449        ;;
10450
10451        aix*)
10452        ax_pthread_check_macro="_THREAD_SAFE"
10453        ;;
10454
10455        *)
10456        ax_pthread_check_macro="--"
10457        ;;
10458esac
10459if test "x$ax_pthread_check_macro" = "x--"; then :
10460  ax_pthread_check_cond=0
10461else
10462  ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
10463fi
10464
10465# Are we compiling with Clang?
10466
10467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
10468$as_echo_n "checking whether $CC is Clang... " >&6; }
10469if ${ax_cv_PTHREAD_CLANG+:} false; then :
10470  $as_echo_n "(cached) " >&6
10471else
10472  ax_cv_PTHREAD_CLANG=no
10473     # Note that Autoconf sets GCC=yes for Clang as well as GCC
10474     if test "x$GCC" = "xyes"; then
10475        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10476/* end confdefs.h.  */
10477/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
10478#            if defined(__clang__) && defined(__llvm__)
10479             AX_PTHREAD_CC_IS_CLANG
10480#            endif
10481
10482_ACEOF
10483if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10484  $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
10485  ax_cv_PTHREAD_CLANG=yes
10486fi
10487rm -f conftest*
10488
10489     fi
10490
10491fi
10492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
10493$as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
10494ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
10495
10496ax_pthread_clang_warning=no
10497
10498# Clang needs special handling, because older versions handle the -pthread
10499# option in a rather... idiosyncratic way
10500
10501if test "x$ax_pthread_clang" = "xyes"; then
10502
10503        # Clang takes -pthread; it has never supported any other flag
10504
10505        # (Note 1: This will need to be revisited if a system that Clang
10506        # supports has POSIX threads in a separate library.  This tends not
10507        # to be the way of modern systems, but it's conceivable.)
10508
10509        # (Note 2: On some systems, notably Darwin, -pthread is not needed
10510        # to get POSIX threads support; the API is always present and
10511        # active.  We could reasonably leave PTHREAD_CFLAGS empty.  But
10512        # -pthread does define _REENTRANT, and while the Darwin headers
10513        # ignore this macro, third-party headers might not.)
10514
10515        PTHREAD_CFLAGS="-pthread"
10516        PTHREAD_LIBS=
10517
10518        ax_pthread_ok=yes
10519
10520        # However, older versions of Clang make a point of warning the user
10521        # that, in an invocation where only linking and no compilation is
10522        # taking place, the -pthread option has no effect ("argument unused
10523        # during compilation").  They expect -pthread to be passed in only
10524        # when source code is being compiled.
10525        #
10526        # Problem is, this is at odds with the way Automake and most other
10527        # C build frameworks function, which is that the same flags used in
10528        # compilation (CFLAGS) are also used in linking.  Many systems
10529        # supported by AX_PTHREAD require exactly this for POSIX threads
10530        # support, and in fact it is often not straightforward to specify a
10531        # flag that is used only in the compilation phase and not in
10532        # linking.  Such a scenario is extremely rare in practice.
10533        #
10534        # Even though use of the -pthread flag in linking would only print
10535        # a warning, this can be a nuisance for well-run software projects
10536        # that build with -Werror.  So if the active version of Clang has
10537        # this misfeature, we search for an option to squash it.
10538
10539        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
10540$as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
10541if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
10542  $as_echo_n "(cached) " >&6
10543else
10544  ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
10545             # Create an alternate version of $ac_link that compiles and
10546             # links in two steps (.c -> .o, .o -> exe) instead of one
10547             # (.c -> exe), because the warning occurs only in the second
10548             # step
10549             ax_pthread_save_ac_link="$ac_link"
10550             ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
10551             ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
10552             ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
10553             ax_pthread_save_CFLAGS="$CFLAGS"
10554             for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
10555                if test "x$ax_pthread_try" = "xunknown"; then :
10556  break
10557fi
10558                CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
10559                ac_link="$ax_pthread_save_ac_link"
10560                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10561/* end confdefs.h.  */
10562int main(void){return 0;}
10563_ACEOF
10564if ac_fn_c_try_link "$LINENO"; then :
10565  ac_link="$ax_pthread_2step_ac_link"
10566                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10567/* end confdefs.h.  */
10568int main(void){return 0;}
10569_ACEOF
10570if ac_fn_c_try_link "$LINENO"; then :
10571  break
10572fi
10573rm -f core conftest.err conftest.$ac_objext \
10574    conftest$ac_exeext conftest.$ac_ext
10575
10576fi
10577rm -f core conftest.err conftest.$ac_objext \
10578    conftest$ac_exeext conftest.$ac_ext
10579             done
10580             ac_link="$ax_pthread_save_ac_link"
10581             CFLAGS="$ax_pthread_save_CFLAGS"
10582             if test "x$ax_pthread_try" = "x"; then :
10583  ax_pthread_try=no
10584fi
10585             ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
10586
10587fi
10588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
10589$as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
10590
10591        case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
10592                no | unknown) ;;
10593                *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
10594        esac
10595
10596fi # $ax_pthread_clang = yes
10597
10598if test "x$ax_pthread_ok" = "xno"; then
10599for ax_pthread_try_flag in $ax_pthread_flags; do
10600
10601        case $ax_pthread_try_flag in
10602                none)
10603                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
10604$as_echo_n "checking whether pthreads work without any flags... " >&6; }
10605                ;;
10606
10607                -mt,pthread)
10608                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
10609$as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
10610                PTHREAD_CFLAGS="-mt"
10611                PTHREAD_LIBS="-lpthread"
10612                ;;
10613
10614                -*)
10615                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
10616$as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
10617                PTHREAD_CFLAGS="$ax_pthread_try_flag"
10618                ;;
10619
10620                pthread-config)
10621                # Extract the first word of "pthread-config", so it can be a program name with args.
10622set dummy pthread-config; ac_word=$2
10623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10624$as_echo_n "checking for $ac_word... " >&6; }
10625if ${ac_cv_prog_ax_pthread_config+:} false; then :
10626  $as_echo_n "(cached) " >&6
10627else
10628  if test -n "$ax_pthread_config"; then
10629  ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
10630else
10631as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10632for as_dir in $PATH
10633do
10634  IFS=$as_save_IFS
10635  test -z "$as_dir" && as_dir=.
10636    for ac_exec_ext in '' $ac_executable_extensions; do
10637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10638    ac_cv_prog_ax_pthread_config="yes"
10639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10640    break 2
10641  fi
10642done
10643  done
10644IFS=$as_save_IFS
10645
10646  test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
10647fi
10648fi
10649ax_pthread_config=$ac_cv_prog_ax_pthread_config
10650if test -n "$ax_pthread_config"; then
10651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
10652$as_echo "$ax_pthread_config" >&6; }
10653else
10654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10655$as_echo "no" >&6; }
10656fi
10657
10658
10659                if test "x$ax_pthread_config" = "xno"; then :
10660  continue
10661fi
10662                PTHREAD_CFLAGS="`pthread-config --cflags`"
10663                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
10664                ;;
10665
10666                *)
10667                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
10668$as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
10669                PTHREAD_LIBS="-l$ax_pthread_try_flag"
10670                ;;
10671        esac
10672
10673        ax_pthread_save_CFLAGS="$CFLAGS"
10674        ax_pthread_save_LIBS="$LIBS"
10675        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10676        LIBS="$PTHREAD_LIBS $LIBS"
10677
10678        # Check for various functions.  We must include pthread.h,
10679        # since some functions may be macros.  (On the Sequent, we
10680        # need a special flag -Kthread to make this header compile.)
10681        # We check for pthread_join because it is in -lpthread on IRIX
10682        # while pthread_create is in libc.  We check for pthread_attr_init
10683        # due to DEC craziness with -lpthreads.  We check for
10684        # pthread_cleanup_push because it is one of the few pthread
10685        # functions on Solaris that doesn't have a non-functional libc stub.
10686        # We try pthread_create on general principles.
10687
10688        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10689/* end confdefs.h.  */
10690#include <pthread.h>
10691#                       if $ax_pthread_check_cond
10692#                        error "$ax_pthread_check_macro must be defined"
10693#                       endif
10694                        static void routine(void *a) { a = 0; }
10695                        static void *start_routine(void *a) { return a; }
10696int
10697main ()
10698{
10699pthread_t th; pthread_attr_t attr;
10700                        pthread_create(&th, 0, start_routine, 0);
10701                        pthread_join(th, 0);
10702                        pthread_attr_init(&attr);
10703                        pthread_cleanup_push(routine, 0);
10704                        pthread_cleanup_pop(0) /* ; */
10705  ;
10706  return 0;
10707}
10708_ACEOF
10709if ac_fn_c_try_link "$LINENO"; then :
10710  ax_pthread_ok=yes
10711fi
10712rm -f core conftest.err conftest.$ac_objext \
10713    conftest$ac_exeext conftest.$ac_ext
10714
10715        CFLAGS="$ax_pthread_save_CFLAGS"
10716        LIBS="$ax_pthread_save_LIBS"
10717
10718        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10719$as_echo "$ax_pthread_ok" >&6; }
10720        if test "x$ax_pthread_ok" = "xyes"; then :
10721  break
10722fi
10723
10724        PTHREAD_LIBS=""
10725        PTHREAD_CFLAGS=""
10726done
10727fi
10728
10729# Various other checks:
10730if test "x$ax_pthread_ok" = "xyes"; then
10731        ax_pthread_save_CFLAGS="$CFLAGS"
10732        ax_pthread_save_LIBS="$LIBS"
10733        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10734        LIBS="$PTHREAD_LIBS $LIBS"
10735
10736        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
10737        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
10738$as_echo_n "checking for joinable pthread attribute... " >&6; }
10739if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
10740  $as_echo_n "(cached) " >&6
10741else
10742  ax_cv_PTHREAD_JOINABLE_ATTR=unknown
10743             for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
10744                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10745/* end confdefs.h.  */
10746#include <pthread.h>
10747int
10748main ()
10749{
10750int attr = $ax_pthread_attr; return attr /* ; */
10751  ;
10752  return 0;
10753}
10754_ACEOF
10755if ac_fn_c_try_link "$LINENO"; then :
10756  ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
10757fi
10758rm -f core conftest.err conftest.$ac_objext \
10759    conftest$ac_exeext conftest.$ac_ext
10760             done
10761
10762fi
10763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
10764$as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
10765        if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
10766               test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
10767               test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
10768
10769cat >>confdefs.h <<_ACEOF
10770#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
10771_ACEOF
10772
10773               ax_pthread_joinable_attr_defined=yes
10774
10775fi
10776
10777        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
10778$as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
10779if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
10780  $as_echo_n "(cached) " >&6
10781else
10782  ax_cv_PTHREAD_SPECIAL_FLAGS=no
10783             case $host_os in
10784             solaris*)
10785             ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
10786             ;;
10787             esac
10788
10789fi
10790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
10791$as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
10792        if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
10793               test "x$ax_pthread_special_flags_added" != "xyes"; then :
10794  PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
10795               ax_pthread_special_flags_added=yes
10796fi
10797
10798        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
10799$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
10800if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
10801  $as_echo_n "(cached) " >&6
10802else
10803  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10804/* end confdefs.h.  */
10805#include <pthread.h>
10806int
10807main ()
10808{
10809int i = PTHREAD_PRIO_INHERIT;
10810  ;
10811  return 0;
10812}
10813_ACEOF
10814if ac_fn_c_try_link "$LINENO"; then :
10815  ax_cv_PTHREAD_PRIO_INHERIT=yes
10816else
10817  ax_cv_PTHREAD_PRIO_INHERIT=no
10818fi
10819rm -f core conftest.err conftest.$ac_objext \
10820    conftest$ac_exeext conftest.$ac_ext
10821
10822fi
10823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
10824$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
10825        if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
10826               test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
10827
10828$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
10829
10830               ax_pthread_prio_inherit_defined=yes
10831
10832fi
10833
10834        CFLAGS="$ax_pthread_save_CFLAGS"
10835        LIBS="$ax_pthread_save_LIBS"
10836
10837        # More AIX lossage: compile with *_r variant
10838        if test "x$GCC" != "xyes"; then
10839            case $host_os in
10840                aix*)
10841                case "x/$CC" in #(
10842  x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
10843    #handle absolute path differently from PATH based program lookup
10844                     case "x$CC" in #(
10845  x/*) :
10846    if as_fn_executable_p ${CC}_r; then :
10847  PTHREAD_CC="${CC}_r"
10848fi ;; #(
10849  *) :
10850    for ac_prog in ${CC}_r
10851do
10852  # Extract the first word of "$ac_prog", so it can be a program name with args.
10853set dummy $ac_prog; ac_word=$2
10854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10855$as_echo_n "checking for $ac_word... " >&6; }
10856if ${ac_cv_prog_PTHREAD_CC+:} false; then :
10857  $as_echo_n "(cached) " >&6
10858else
10859  if test -n "$PTHREAD_CC"; then
10860  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
10861else
10862as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10863for as_dir in $PATH
10864do
10865  IFS=$as_save_IFS
10866  test -z "$as_dir" && as_dir=.
10867    for ac_exec_ext in '' $ac_executable_extensions; do
10868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10869    ac_cv_prog_PTHREAD_CC="$ac_prog"
10870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10871    break 2
10872  fi
10873done
10874  done
10875IFS=$as_save_IFS
10876
10877fi
10878fi
10879PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
10880if test -n "$PTHREAD_CC"; then
10881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
10882$as_echo "$PTHREAD_CC" >&6; }
10883else
10884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10885$as_echo "no" >&6; }
10886fi
10887
10888
10889  test -n "$PTHREAD_CC" && break
10890done
10891test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10892 ;;
10893esac ;; #(
10894  *) :
10895     ;;
10896esac
10897                ;;
10898            esac
10899        fi
10900fi
10901
10902test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10903
10904
10905
10906
10907
10908# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
10909if test "x$ax_pthread_ok" = "xyes"; then
10910
10911$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10912
10913        :
10914else
10915        ax_pthread_ok=no
10916
10917fi
10918ac_ext=c
10919ac_cpp='$CPP $CPPFLAGS'
10920ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10921ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10922ac_compiler_gnu=$ac_cv_c_compiler_gnu
10923
10924	# set thread flags
10925
10926# Some platforms use these, so just define them.  They can't hurt if they
10927# are not supported.  For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
10928# enables 5-arg getpwuid_r, among other things.
10929PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
10930
10931# Check for *_r functions
10932_CFLAGS="$CFLAGS"
10933_LIBS="$LIBS"
10934CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10935LIBS="$LIBS $PTHREAD_LIBS"
10936
10937ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
10938if test "x$ac_cv_header_pthread_h" = xyes; then :
10939
10940else
10941  as_fn_error $? "
10942pthread.h not found;  use --disable-thread-safety to disable thread safety" "$LINENO" 5
10943fi
10944
10945
10946
10947for ac_func in strerror_r getpwuid_r gethostbyname_r
10948do :
10949  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10950ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10951if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10952  cat >>confdefs.h <<_ACEOF
10953#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10954_ACEOF
10955
10956fi
10957done
10958
10959
10960# Do test here with the proper thread flags
10961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
10962$as_echo_n "checking whether strerror_r returns int... " >&6; }
10963if ${pgac_cv_func_strerror_r_int+:} false; then :
10964  $as_echo_n "(cached) " >&6
10965else
10966  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10967/* end confdefs.h.  */
10968#include <string.h>
10969int
10970main ()
10971{
10972char buf[100];
10973  switch (strerror_r(1, buf, sizeof(buf)))
10974  { case 0: break; default: break; }
10975
10976  ;
10977  return 0;
10978}
10979_ACEOF
10980if ac_fn_c_try_compile "$LINENO"; then :
10981  pgac_cv_func_strerror_r_int=yes
10982else
10983  pgac_cv_func_strerror_r_int=no
10984fi
10985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10986fi
10987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
10988$as_echo "$pgac_cv_func_strerror_r_int" >&6; }
10989if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
10990
10991$as_echo "#define STRERROR_R_INT 1" >>confdefs.h
10992
10993fi
10994
10995
10996CFLAGS="$_CFLAGS"
10997LIBS="$_LIBS"
10998
10999
11000else
11001   # else
11002# do not use values from template file
11003PTHREAD_CFLAGS=
11004PTHREAD_LIBS=
11005
11006fi # fi
11007
11008
11009
11010
11011
11012##
11013## Libraries
11014##
11015## Most libraries are included only if they demonstrably provide a function
11016## we need, but libm is an exception: always include it, because there are
11017## too many compilers that play cute optimization games that will break
11018## probes for standard functions such as pow().
11019##
11020
11021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
11022$as_echo_n "checking for main in -lm... " >&6; }
11023if ${ac_cv_lib_m_main+:} false; then :
11024  $as_echo_n "(cached) " >&6
11025else
11026  ac_check_lib_save_LIBS=$LIBS
11027LIBS="-lm  $LIBS"
11028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11029/* end confdefs.h.  */
11030
11031
11032int
11033main ()
11034{
11035return main ();
11036  ;
11037  return 0;
11038}
11039_ACEOF
11040if ac_fn_c_try_link "$LINENO"; then :
11041  ac_cv_lib_m_main=yes
11042else
11043  ac_cv_lib_m_main=no
11044fi
11045rm -f core conftest.err conftest.$ac_objext \
11046    conftest$ac_exeext conftest.$ac_ext
11047LIBS=$ac_check_lib_save_LIBS
11048fi
11049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
11050$as_echo "$ac_cv_lib_m_main" >&6; }
11051if test "x$ac_cv_lib_m_main" = xyes; then :
11052  cat >>confdefs.h <<_ACEOF
11053#define HAVE_LIBM 1
11054_ACEOF
11055
11056  LIBS="-lm $LIBS"
11057
11058fi
11059
11060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
11061$as_echo_n "checking for library containing setproctitle... " >&6; }
11062if ${ac_cv_search_setproctitle+:} false; then :
11063  $as_echo_n "(cached) " >&6
11064else
11065  ac_func_search_save_LIBS=$LIBS
11066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11067/* end confdefs.h.  */
11068
11069/* Override any GCC internal prototype to avoid an error.
11070   Use char because int might match the return type of a GCC
11071   builtin and then its argument prototype would still apply.  */
11072#ifdef __cplusplus
11073extern "C"
11074#endif
11075char setproctitle ();
11076int
11077main ()
11078{
11079return setproctitle ();
11080  ;
11081  return 0;
11082}
11083_ACEOF
11084for ac_lib in '' util; do
11085  if test -z "$ac_lib"; then
11086    ac_res="none required"
11087  else
11088    ac_res=-l$ac_lib
11089    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11090  fi
11091  if ac_fn_c_try_link "$LINENO"; then :
11092  ac_cv_search_setproctitle=$ac_res
11093fi
11094rm -f core conftest.err conftest.$ac_objext \
11095    conftest$ac_exeext
11096  if ${ac_cv_search_setproctitle+:} false; then :
11097  break
11098fi
11099done
11100if ${ac_cv_search_setproctitle+:} false; then :
11101
11102else
11103  ac_cv_search_setproctitle=no
11104fi
11105rm conftest.$ac_ext
11106LIBS=$ac_func_search_save_LIBS
11107fi
11108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
11109$as_echo "$ac_cv_search_setproctitle" >&6; }
11110ac_res=$ac_cv_search_setproctitle
11111if test "$ac_res" != no; then :
11112  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11113
11114fi
11115
11116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
11117$as_echo_n "checking for library containing dlopen... " >&6; }
11118if ${ac_cv_search_dlopen+:} false; then :
11119  $as_echo_n "(cached) " >&6
11120else
11121  ac_func_search_save_LIBS=$LIBS
11122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11123/* end confdefs.h.  */
11124
11125/* Override any GCC internal prototype to avoid an error.
11126   Use char because int might match the return type of a GCC
11127   builtin and then its argument prototype would still apply.  */
11128#ifdef __cplusplus
11129extern "C"
11130#endif
11131char dlopen ();
11132int
11133main ()
11134{
11135return dlopen ();
11136  ;
11137  return 0;
11138}
11139_ACEOF
11140for ac_lib in '' dl; do
11141  if test -z "$ac_lib"; then
11142    ac_res="none required"
11143  else
11144    ac_res=-l$ac_lib
11145    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11146  fi
11147  if ac_fn_c_try_link "$LINENO"; then :
11148  ac_cv_search_dlopen=$ac_res
11149fi
11150rm -f core conftest.err conftest.$ac_objext \
11151    conftest$ac_exeext
11152  if ${ac_cv_search_dlopen+:} false; then :
11153  break
11154fi
11155done
11156if ${ac_cv_search_dlopen+:} false; then :
11157
11158else
11159  ac_cv_search_dlopen=no
11160fi
11161rm conftest.$ac_ext
11162LIBS=$ac_func_search_save_LIBS
11163fi
11164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
11165$as_echo "$ac_cv_search_dlopen" >&6; }
11166ac_res=$ac_cv_search_dlopen
11167if test "$ac_res" != no; then :
11168  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11169
11170fi
11171
11172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11173$as_echo_n "checking for library containing socket... " >&6; }
11174if ${ac_cv_search_socket+:} false; then :
11175  $as_echo_n "(cached) " >&6
11176else
11177  ac_func_search_save_LIBS=$LIBS
11178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11179/* end confdefs.h.  */
11180
11181/* Override any GCC internal prototype to avoid an error.
11182   Use char because int might match the return type of a GCC
11183   builtin and then its argument prototype would still apply.  */
11184#ifdef __cplusplus
11185extern "C"
11186#endif
11187char socket ();
11188int
11189main ()
11190{
11191return socket ();
11192  ;
11193  return 0;
11194}
11195_ACEOF
11196for ac_lib in '' socket ws2_32; do
11197  if test -z "$ac_lib"; then
11198    ac_res="none required"
11199  else
11200    ac_res=-l$ac_lib
11201    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11202  fi
11203  if ac_fn_c_try_link "$LINENO"; then :
11204  ac_cv_search_socket=$ac_res
11205fi
11206rm -f core conftest.err conftest.$ac_objext \
11207    conftest$ac_exeext
11208  if ${ac_cv_search_socket+:} false; then :
11209  break
11210fi
11211done
11212if ${ac_cv_search_socket+:} false; then :
11213
11214else
11215  ac_cv_search_socket=no
11216fi
11217rm conftest.$ac_ext
11218LIBS=$ac_func_search_save_LIBS
11219fi
11220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11221$as_echo "$ac_cv_search_socket" >&6; }
11222ac_res=$ac_cv_search_socket
11223if test "$ac_res" != no; then :
11224  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11225
11226fi
11227
11228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
11229$as_echo_n "checking for library containing shl_load... " >&6; }
11230if ${ac_cv_search_shl_load+:} false; then :
11231  $as_echo_n "(cached) " >&6
11232else
11233  ac_func_search_save_LIBS=$LIBS
11234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11235/* end confdefs.h.  */
11236
11237/* Override any GCC internal prototype to avoid an error.
11238   Use char because int might match the return type of a GCC
11239   builtin and then its argument prototype would still apply.  */
11240#ifdef __cplusplus
11241extern "C"
11242#endif
11243char shl_load ();
11244int
11245main ()
11246{
11247return shl_load ();
11248  ;
11249  return 0;
11250}
11251_ACEOF
11252for ac_lib in '' dld; do
11253  if test -z "$ac_lib"; then
11254    ac_res="none required"
11255  else
11256    ac_res=-l$ac_lib
11257    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11258  fi
11259  if ac_fn_c_try_link "$LINENO"; then :
11260  ac_cv_search_shl_load=$ac_res
11261fi
11262rm -f core conftest.err conftest.$ac_objext \
11263    conftest$ac_exeext
11264  if ${ac_cv_search_shl_load+:} false; then :
11265  break
11266fi
11267done
11268if ${ac_cv_search_shl_load+:} false; then :
11269
11270else
11271  ac_cv_search_shl_load=no
11272fi
11273rm conftest.$ac_ext
11274LIBS=$ac_func_search_save_LIBS
11275fi
11276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
11277$as_echo "$ac_cv_search_shl_load" >&6; }
11278ac_res=$ac_cv_search_shl_load
11279if test "$ac_res" != no; then :
11280  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11281
11282fi
11283
11284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
11285$as_echo_n "checking for library containing getopt_long... " >&6; }
11286if ${ac_cv_search_getopt_long+:} false; then :
11287  $as_echo_n "(cached) " >&6
11288else
11289  ac_func_search_save_LIBS=$LIBS
11290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11291/* end confdefs.h.  */
11292
11293/* Override any GCC internal prototype to avoid an error.
11294   Use char because int might match the return type of a GCC
11295   builtin and then its argument prototype would still apply.  */
11296#ifdef __cplusplus
11297extern "C"
11298#endif
11299char getopt_long ();
11300int
11301main ()
11302{
11303return getopt_long ();
11304  ;
11305  return 0;
11306}
11307_ACEOF
11308for ac_lib in '' getopt gnugetopt; do
11309  if test -z "$ac_lib"; then
11310    ac_res="none required"
11311  else
11312    ac_res=-l$ac_lib
11313    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11314  fi
11315  if ac_fn_c_try_link "$LINENO"; then :
11316  ac_cv_search_getopt_long=$ac_res
11317fi
11318rm -f core conftest.err conftest.$ac_objext \
11319    conftest$ac_exeext
11320  if ${ac_cv_search_getopt_long+:} false; then :
11321  break
11322fi
11323done
11324if ${ac_cv_search_getopt_long+:} false; then :
11325
11326else
11327  ac_cv_search_getopt_long=no
11328fi
11329rm conftest.$ac_ext
11330LIBS=$ac_func_search_save_LIBS
11331fi
11332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
11333$as_echo "$ac_cv_search_getopt_long" >&6; }
11334ac_res=$ac_cv_search_getopt_long
11335if test "$ac_res" != no; then :
11336  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11337
11338fi
11339
11340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
11341$as_echo_n "checking for library containing crypt... " >&6; }
11342if ${ac_cv_search_crypt+:} false; then :
11343  $as_echo_n "(cached) " >&6
11344else
11345  ac_func_search_save_LIBS=$LIBS
11346cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11347/* end confdefs.h.  */
11348
11349/* Override any GCC internal prototype to avoid an error.
11350   Use char because int might match the return type of a GCC
11351   builtin and then its argument prototype would still apply.  */
11352#ifdef __cplusplus
11353extern "C"
11354#endif
11355char crypt ();
11356int
11357main ()
11358{
11359return crypt ();
11360  ;
11361  return 0;
11362}
11363_ACEOF
11364for ac_lib in '' crypt; do
11365  if test -z "$ac_lib"; then
11366    ac_res="none required"
11367  else
11368    ac_res=-l$ac_lib
11369    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11370  fi
11371  if ac_fn_c_try_link "$LINENO"; then :
11372  ac_cv_search_crypt=$ac_res
11373fi
11374rm -f core conftest.err conftest.$ac_objext \
11375    conftest$ac_exeext
11376  if ${ac_cv_search_crypt+:} false; then :
11377  break
11378fi
11379done
11380if ${ac_cv_search_crypt+:} false; then :
11381
11382else
11383  ac_cv_search_crypt=no
11384fi
11385rm conftest.$ac_ext
11386LIBS=$ac_func_search_save_LIBS
11387fi
11388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
11389$as_echo "$ac_cv_search_crypt" >&6; }
11390ac_res=$ac_cv_search_crypt
11391if test "$ac_res" != no; then :
11392  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11393
11394fi
11395
11396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
11397$as_echo_n "checking for library containing shm_open... " >&6; }
11398if ${ac_cv_search_shm_open+:} false; then :
11399  $as_echo_n "(cached) " >&6
11400else
11401  ac_func_search_save_LIBS=$LIBS
11402cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11403/* end confdefs.h.  */
11404
11405/* Override any GCC internal prototype to avoid an error.
11406   Use char because int might match the return type of a GCC
11407   builtin and then its argument prototype would still apply.  */
11408#ifdef __cplusplus
11409extern "C"
11410#endif
11411char shm_open ();
11412int
11413main ()
11414{
11415return shm_open ();
11416  ;
11417  return 0;
11418}
11419_ACEOF
11420for ac_lib in '' rt; do
11421  if test -z "$ac_lib"; then
11422    ac_res="none required"
11423  else
11424    ac_res=-l$ac_lib
11425    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11426  fi
11427  if ac_fn_c_try_link "$LINENO"; then :
11428  ac_cv_search_shm_open=$ac_res
11429fi
11430rm -f core conftest.err conftest.$ac_objext \
11431    conftest$ac_exeext
11432  if ${ac_cv_search_shm_open+:} false; then :
11433  break
11434fi
11435done
11436if ${ac_cv_search_shm_open+:} false; then :
11437
11438else
11439  ac_cv_search_shm_open=no
11440fi
11441rm conftest.$ac_ext
11442LIBS=$ac_func_search_save_LIBS
11443fi
11444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
11445$as_echo "$ac_cv_search_shm_open" >&6; }
11446ac_res=$ac_cv_search_shm_open
11447if test "$ac_res" != no; then :
11448  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11449
11450fi
11451
11452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
11453$as_echo_n "checking for library containing shm_unlink... " >&6; }
11454if ${ac_cv_search_shm_unlink+:} false; then :
11455  $as_echo_n "(cached) " >&6
11456else
11457  ac_func_search_save_LIBS=$LIBS
11458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11459/* end confdefs.h.  */
11460
11461/* Override any GCC internal prototype to avoid an error.
11462   Use char because int might match the return type of a GCC
11463   builtin and then its argument prototype would still apply.  */
11464#ifdef __cplusplus
11465extern "C"
11466#endif
11467char shm_unlink ();
11468int
11469main ()
11470{
11471return shm_unlink ();
11472  ;
11473  return 0;
11474}
11475_ACEOF
11476for ac_lib in '' rt; do
11477  if test -z "$ac_lib"; then
11478    ac_res="none required"
11479  else
11480    ac_res=-l$ac_lib
11481    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11482  fi
11483  if ac_fn_c_try_link "$LINENO"; then :
11484  ac_cv_search_shm_unlink=$ac_res
11485fi
11486rm -f core conftest.err conftest.$ac_objext \
11487    conftest$ac_exeext
11488  if ${ac_cv_search_shm_unlink+:} false; then :
11489  break
11490fi
11491done
11492if ${ac_cv_search_shm_unlink+:} false; then :
11493
11494else
11495  ac_cv_search_shm_unlink=no
11496fi
11497rm conftest.$ac_ext
11498LIBS=$ac_func_search_save_LIBS
11499fi
11500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
11501$as_echo "$ac_cv_search_shm_unlink" >&6; }
11502ac_res=$ac_cv_search_shm_unlink
11503if test "$ac_res" != no; then :
11504  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11505
11506fi
11507
11508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11509$as_echo_n "checking for library containing clock_gettime... " >&6; }
11510if ${ac_cv_search_clock_gettime+:} false; then :
11511  $as_echo_n "(cached) " >&6
11512else
11513  ac_func_search_save_LIBS=$LIBS
11514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11515/* end confdefs.h.  */
11516
11517/* Override any GCC internal prototype to avoid an error.
11518   Use char because int might match the return type of a GCC
11519   builtin and then its argument prototype would still apply.  */
11520#ifdef __cplusplus
11521extern "C"
11522#endif
11523char clock_gettime ();
11524int
11525main ()
11526{
11527return clock_gettime ();
11528  ;
11529  return 0;
11530}
11531_ACEOF
11532for ac_lib in '' rt posix4; do
11533  if test -z "$ac_lib"; then
11534    ac_res="none required"
11535  else
11536    ac_res=-l$ac_lib
11537    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11538  fi
11539  if ac_fn_c_try_link "$LINENO"; then :
11540  ac_cv_search_clock_gettime=$ac_res
11541fi
11542rm -f core conftest.err conftest.$ac_objext \
11543    conftest$ac_exeext
11544  if ${ac_cv_search_clock_gettime+:} false; then :
11545  break
11546fi
11547done
11548if ${ac_cv_search_clock_gettime+:} false; then :
11549
11550else
11551  ac_cv_search_clock_gettime=no
11552fi
11553rm conftest.$ac_ext
11554LIBS=$ac_func_search_save_LIBS
11555fi
11556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11557$as_echo "$ac_cv_search_clock_gettime" >&6; }
11558ac_res=$ac_cv_search_clock_gettime
11559if test "$ac_res" != no; then :
11560  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11561
11562fi
11563
11564# Solaris:
11565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
11566$as_echo_n "checking for library containing fdatasync... " >&6; }
11567if ${ac_cv_search_fdatasync+:} false; then :
11568  $as_echo_n "(cached) " >&6
11569else
11570  ac_func_search_save_LIBS=$LIBS
11571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11572/* end confdefs.h.  */
11573
11574/* Override any GCC internal prototype to avoid an error.
11575   Use char because int might match the return type of a GCC
11576   builtin and then its argument prototype would still apply.  */
11577#ifdef __cplusplus
11578extern "C"
11579#endif
11580char fdatasync ();
11581int
11582main ()
11583{
11584return fdatasync ();
11585  ;
11586  return 0;
11587}
11588_ACEOF
11589for ac_lib in '' rt posix4; do
11590  if test -z "$ac_lib"; then
11591    ac_res="none required"
11592  else
11593    ac_res=-l$ac_lib
11594    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11595  fi
11596  if ac_fn_c_try_link "$LINENO"; then :
11597  ac_cv_search_fdatasync=$ac_res
11598fi
11599rm -f core conftest.err conftest.$ac_objext \
11600    conftest$ac_exeext
11601  if ${ac_cv_search_fdatasync+:} false; then :
11602  break
11603fi
11604done
11605if ${ac_cv_search_fdatasync+:} false; then :
11606
11607else
11608  ac_cv_search_fdatasync=no
11609fi
11610rm conftest.$ac_ext
11611LIBS=$ac_func_search_save_LIBS
11612fi
11613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
11614$as_echo "$ac_cv_search_fdatasync" >&6; }
11615ac_res=$ac_cv_search_fdatasync
11616if test "$ac_res" != no; then :
11617  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11618
11619fi
11620
11621# Required for thread_test.c on Solaris
11622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
11623$as_echo_n "checking for library containing sched_yield... " >&6; }
11624if ${ac_cv_search_sched_yield+:} false; then :
11625  $as_echo_n "(cached) " >&6
11626else
11627  ac_func_search_save_LIBS=$LIBS
11628cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11629/* end confdefs.h.  */
11630
11631/* Override any GCC internal prototype to avoid an error.
11632   Use char because int might match the return type of a GCC
11633   builtin and then its argument prototype would still apply.  */
11634#ifdef __cplusplus
11635extern "C"
11636#endif
11637char sched_yield ();
11638int
11639main ()
11640{
11641return sched_yield ();
11642  ;
11643  return 0;
11644}
11645_ACEOF
11646for ac_lib in '' rt; do
11647  if test -z "$ac_lib"; then
11648    ac_res="none required"
11649  else
11650    ac_res=-l$ac_lib
11651    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11652  fi
11653  if ac_fn_c_try_link "$LINENO"; then :
11654  ac_cv_search_sched_yield=$ac_res
11655fi
11656rm -f core conftest.err conftest.$ac_objext \
11657    conftest$ac_exeext
11658  if ${ac_cv_search_sched_yield+:} false; then :
11659  break
11660fi
11661done
11662if ${ac_cv_search_sched_yield+:} false; then :
11663
11664else
11665  ac_cv_search_sched_yield=no
11666fi
11667rm conftest.$ac_ext
11668LIBS=$ac_func_search_save_LIBS
11669fi
11670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
11671$as_echo "$ac_cv_search_sched_yield" >&6; }
11672ac_res=$ac_cv_search_sched_yield
11673if test "$ac_res" != no; then :
11674  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11675
11676fi
11677
11678# Required for thread_test.c on Solaris 2.5:
11679# Other ports use it too (HP-UX) so test unconditionally
11680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
11681$as_echo_n "checking for library containing gethostbyname_r... " >&6; }
11682if ${ac_cv_search_gethostbyname_r+:} false; then :
11683  $as_echo_n "(cached) " >&6
11684else
11685  ac_func_search_save_LIBS=$LIBS
11686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11687/* end confdefs.h.  */
11688
11689/* Override any GCC internal prototype to avoid an error.
11690   Use char because int might match the return type of a GCC
11691   builtin and then its argument prototype would still apply.  */
11692#ifdef __cplusplus
11693extern "C"
11694#endif
11695char gethostbyname_r ();
11696int
11697main ()
11698{
11699return gethostbyname_r ();
11700  ;
11701  return 0;
11702}
11703_ACEOF
11704for ac_lib in '' nsl; do
11705  if test -z "$ac_lib"; then
11706    ac_res="none required"
11707  else
11708    ac_res=-l$ac_lib
11709    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11710  fi
11711  if ac_fn_c_try_link "$LINENO"; then :
11712  ac_cv_search_gethostbyname_r=$ac_res
11713fi
11714rm -f core conftest.err conftest.$ac_objext \
11715    conftest$ac_exeext
11716  if ${ac_cv_search_gethostbyname_r+:} false; then :
11717  break
11718fi
11719done
11720if ${ac_cv_search_gethostbyname_r+:} false; then :
11721
11722else
11723  ac_cv_search_gethostbyname_r=no
11724fi
11725rm conftest.$ac_ext
11726LIBS=$ac_func_search_save_LIBS
11727fi
11728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
11729$as_echo "$ac_cv_search_gethostbyname_r" >&6; }
11730ac_res=$ac_cv_search_gethostbyname_r
11731if test "$ac_res" != no; then :
11732  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11733
11734fi
11735
11736# Cygwin:
11737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
11738$as_echo_n "checking for library containing shmget... " >&6; }
11739if ${ac_cv_search_shmget+:} false; then :
11740  $as_echo_n "(cached) " >&6
11741else
11742  ac_func_search_save_LIBS=$LIBS
11743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11744/* end confdefs.h.  */
11745
11746/* Override any GCC internal prototype to avoid an error.
11747   Use char because int might match the return type of a GCC
11748   builtin and then its argument prototype would still apply.  */
11749#ifdef __cplusplus
11750extern "C"
11751#endif
11752char shmget ();
11753int
11754main ()
11755{
11756return shmget ();
11757  ;
11758  return 0;
11759}
11760_ACEOF
11761for ac_lib in '' cygipc; do
11762  if test -z "$ac_lib"; then
11763    ac_res="none required"
11764  else
11765    ac_res=-l$ac_lib
11766    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11767  fi
11768  if ac_fn_c_try_link "$LINENO"; then :
11769  ac_cv_search_shmget=$ac_res
11770fi
11771rm -f core conftest.err conftest.$ac_objext \
11772    conftest$ac_exeext
11773  if ${ac_cv_search_shmget+:} false; then :
11774  break
11775fi
11776done
11777if ${ac_cv_search_shmget+:} false; then :
11778
11779else
11780  ac_cv_search_shmget=no
11781fi
11782rm conftest.$ac_ext
11783LIBS=$ac_func_search_save_LIBS
11784fi
11785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
11786$as_echo "$ac_cv_search_shmget" >&6; }
11787ac_res=$ac_cv_search_shmget
11788if test "$ac_res" != no; then :
11789  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11790
11791fi
11792
11793
11794if test "$with_readline" = yes; then
11795
11796
11797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
11798$as_echo_n "checking for library containing readline... " >&6; }
11799if ${pgac_cv_check_readline+:} false; then :
11800  $as_echo_n "(cached) " >&6
11801else
11802  pgac_cv_check_readline=no
11803pgac_save_LIBS=$LIBS
11804if test x"$with_libedit_preferred" != x"yes"
11805then	READLINE_ORDER="-lreadline -ledit"
11806else	READLINE_ORDER="-ledit -lreadline"
11807fi
11808for pgac_rllib in $READLINE_ORDER ; do
11809  for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
11810    LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
11811    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11812/* end confdefs.h.  */
11813
11814/* Override any GCC internal prototype to avoid an error.
11815   Use char because int might match the return type of a GCC
11816   builtin and then its argument prototype would still apply.  */
11817#ifdef __cplusplus
11818extern "C"
11819#endif
11820char readline ();
11821int
11822main ()
11823{
11824return readline ();
11825  ;
11826  return 0;
11827}
11828_ACEOF
11829if ac_fn_c_try_link "$LINENO"; then :
11830
11831      # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
11832      # recognize dependent libraries; assume curses is needed if we didn't
11833      # find any dependency.
11834      case $host_os in
11835        netbsd* | openbsd* | irix*)
11836          if test x"$pgac_lib" = x"" ; then
11837            pgac_lib=" -lcurses"
11838          fi ;;
11839      esac
11840
11841      pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
11842      break
11843
11844fi
11845rm -f core conftest.err conftest.$ac_objext \
11846    conftest$ac_exeext conftest.$ac_ext
11847  done
11848  if test "$pgac_cv_check_readline" != no ; then
11849    break
11850  fi
11851done
11852LIBS=$pgac_save_LIBS
11853
11854fi
11855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
11856$as_echo "$pgac_cv_check_readline" >&6; }
11857if test "$pgac_cv_check_readline" != no ; then
11858  LIBS="$pgac_cv_check_readline $LIBS"
11859
11860$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
11861
11862fi
11863
11864
11865  if test x"$pgac_cv_check_readline" = x"no"; then
11866    as_fn_error $? "readline library not found
11867If you have readline already installed, see config.log for details on the
11868failure.  It is possible the compiler isn't looking in the proper directory.
11869Use --without-readline to disable readline support." "$LINENO" 5
11870  fi
11871fi
11872
11873if test "$with_zlib" = yes; then
11874  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
11875$as_echo_n "checking for inflate in -lz... " >&6; }
11876if ${ac_cv_lib_z_inflate+:} false; then :
11877  $as_echo_n "(cached) " >&6
11878else
11879  ac_check_lib_save_LIBS=$LIBS
11880LIBS="-lz  $LIBS"
11881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11882/* end confdefs.h.  */
11883
11884/* Override any GCC internal prototype to avoid an error.
11885   Use char because int might match the return type of a GCC
11886   builtin and then its argument prototype would still apply.  */
11887#ifdef __cplusplus
11888extern "C"
11889#endif
11890char inflate ();
11891int
11892main ()
11893{
11894return inflate ();
11895  ;
11896  return 0;
11897}
11898_ACEOF
11899if ac_fn_c_try_link "$LINENO"; then :
11900  ac_cv_lib_z_inflate=yes
11901else
11902  ac_cv_lib_z_inflate=no
11903fi
11904rm -f core conftest.err conftest.$ac_objext \
11905    conftest$ac_exeext conftest.$ac_ext
11906LIBS=$ac_check_lib_save_LIBS
11907fi
11908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
11909$as_echo "$ac_cv_lib_z_inflate" >&6; }
11910if test "x$ac_cv_lib_z_inflate" = xyes; then :
11911  cat >>confdefs.h <<_ACEOF
11912#define HAVE_LIBZ 1
11913_ACEOF
11914
11915  LIBS="-lz $LIBS"
11916
11917else
11918  as_fn_error $? "zlib library not found
11919If you have zlib already installed, see config.log for details on the
11920failure.  It is possible the compiler isn't looking in the proper directory.
11921Use --without-zlib to disable zlib support." "$LINENO" 5
11922fi
11923
11924fi
11925
11926if test "$enable_spinlocks" = yes; then
11927
11928$as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
11929
11930else
11931  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11932*** Not using spinlocks will cause poor performance." >&5
11933$as_echo "$as_me: WARNING:
11934*** Not using spinlocks will cause poor performance." >&2;}
11935fi
11936
11937if test "$enable_atomics" = yes; then
11938
11939$as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
11940
11941else
11942  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11943*** Not using atomic operations will cause poor performance." >&5
11944$as_echo "$as_me: WARNING:
11945*** Not using atomic operations will cause poor performance." >&2;}
11946fi
11947
11948if test "$with_gssapi" = yes ; then
11949  if test "$PORTNAME" != "win32"; then
11950    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
11951$as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
11952if ${ac_cv_search_gss_init_sec_context+:} false; then :
11953  $as_echo_n "(cached) " >&6
11954else
11955  ac_func_search_save_LIBS=$LIBS
11956cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11957/* end confdefs.h.  */
11958
11959/* Override any GCC internal prototype to avoid an error.
11960   Use char because int might match the return type of a GCC
11961   builtin and then its argument prototype would still apply.  */
11962#ifdef __cplusplus
11963extern "C"
11964#endif
11965char gss_init_sec_context ();
11966int
11967main ()
11968{
11969return gss_init_sec_context ();
11970  ;
11971  return 0;
11972}
11973_ACEOF
11974for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
11975  if test -z "$ac_lib"; then
11976    ac_res="none required"
11977  else
11978    ac_res=-l$ac_lib
11979    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11980  fi
11981  if ac_fn_c_try_link "$LINENO"; then :
11982  ac_cv_search_gss_init_sec_context=$ac_res
11983fi
11984rm -f core conftest.err conftest.$ac_objext \
11985    conftest$ac_exeext
11986  if ${ac_cv_search_gss_init_sec_context+:} false; then :
11987  break
11988fi
11989done
11990if ${ac_cv_search_gss_init_sec_context+:} false; then :
11991
11992else
11993  ac_cv_search_gss_init_sec_context=no
11994fi
11995rm conftest.$ac_ext
11996LIBS=$ac_func_search_save_LIBS
11997fi
11998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
11999$as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
12000ac_res=$ac_cv_search_gss_init_sec_context
12001if test "$ac_res" != no; then :
12002  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12003
12004else
12005  as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
12006fi
12007
12008  else
12009    LIBS="$LIBS -lgssapi32"
12010  fi
12011fi
12012
12013if test "$with_openssl" = yes ; then
12014    if test "$PORTNAME" != "win32"; then
12015     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
12016$as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
12017if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
12018  $as_echo_n "(cached) " >&6
12019else
12020  ac_check_lib_save_LIBS=$LIBS
12021LIBS="-lcrypto  $LIBS"
12022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12023/* end confdefs.h.  */
12024
12025/* Override any GCC internal prototype to avoid an error.
12026   Use char because int might match the return type of a GCC
12027   builtin and then its argument prototype would still apply.  */
12028#ifdef __cplusplus
12029extern "C"
12030#endif
12031char CRYPTO_new_ex_data ();
12032int
12033main ()
12034{
12035return CRYPTO_new_ex_data ();
12036  ;
12037  return 0;
12038}
12039_ACEOF
12040if ac_fn_c_try_link "$LINENO"; then :
12041  ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
12042else
12043  ac_cv_lib_crypto_CRYPTO_new_ex_data=no
12044fi
12045rm -f core conftest.err conftest.$ac_objext \
12046    conftest$ac_exeext conftest.$ac_ext
12047LIBS=$ac_check_lib_save_LIBS
12048fi
12049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
12050$as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
12051if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
12052  cat >>confdefs.h <<_ACEOF
12053#define HAVE_LIBCRYPTO 1
12054_ACEOF
12055
12056  LIBS="-lcrypto $LIBS"
12057
12058else
12059  as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
12060fi
12061
12062     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
12063$as_echo_n "checking for SSL_new in -lssl... " >&6; }
12064if ${ac_cv_lib_ssl_SSL_new+:} false; then :
12065  $as_echo_n "(cached) " >&6
12066else
12067  ac_check_lib_save_LIBS=$LIBS
12068LIBS="-lssl  $LIBS"
12069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12070/* end confdefs.h.  */
12071
12072/* Override any GCC internal prototype to avoid an error.
12073   Use char because int might match the return type of a GCC
12074   builtin and then its argument prototype would still apply.  */
12075#ifdef __cplusplus
12076extern "C"
12077#endif
12078char SSL_new ();
12079int
12080main ()
12081{
12082return SSL_new ();
12083  ;
12084  return 0;
12085}
12086_ACEOF
12087if ac_fn_c_try_link "$LINENO"; then :
12088  ac_cv_lib_ssl_SSL_new=yes
12089else
12090  ac_cv_lib_ssl_SSL_new=no
12091fi
12092rm -f core conftest.err conftest.$ac_objext \
12093    conftest$ac_exeext conftest.$ac_ext
12094LIBS=$ac_check_lib_save_LIBS
12095fi
12096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
12097$as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
12098if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
12099  cat >>confdefs.h <<_ACEOF
12100#define HAVE_LIBSSL 1
12101_ACEOF
12102
12103  LIBS="-lssl $LIBS"
12104
12105else
12106  as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
12107fi
12108
12109  else
12110     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
12111$as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
12112if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12113  $as_echo_n "(cached) " >&6
12114else
12115  ac_func_search_save_LIBS=$LIBS
12116cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12117/* end confdefs.h.  */
12118
12119/* Override any GCC internal prototype to avoid an error.
12120   Use char because int might match the return type of a GCC
12121   builtin and then its argument prototype would still apply.  */
12122#ifdef __cplusplus
12123extern "C"
12124#endif
12125char CRYPTO_new_ex_data ();
12126int
12127main ()
12128{
12129return CRYPTO_new_ex_data ();
12130  ;
12131  return 0;
12132}
12133_ACEOF
12134for ac_lib in '' eay32 crypto; do
12135  if test -z "$ac_lib"; then
12136    ac_res="none required"
12137  else
12138    ac_res=-l$ac_lib
12139    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
12140  fi
12141  if ac_fn_c_try_link "$LINENO"; then :
12142  ac_cv_search_CRYPTO_new_ex_data=$ac_res
12143fi
12144rm -f core conftest.err conftest.$ac_objext \
12145    conftest$ac_exeext
12146  if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12147  break
12148fi
12149done
12150if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12151
12152else
12153  ac_cv_search_CRYPTO_new_ex_data=no
12154fi
12155rm conftest.$ac_ext
12156LIBS=$ac_func_search_save_LIBS
12157fi
12158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
12159$as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
12160ac_res=$ac_cv_search_CRYPTO_new_ex_data
12161if test "$ac_res" != no; then :
12162  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12163
12164else
12165  as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
12166fi
12167
12168     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
12169$as_echo_n "checking for library containing SSL_new... " >&6; }
12170if ${ac_cv_search_SSL_new+:} false; then :
12171  $as_echo_n "(cached) " >&6
12172else
12173  ac_func_search_save_LIBS=$LIBS
12174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12175/* end confdefs.h.  */
12176
12177/* Override any GCC internal prototype to avoid an error.
12178   Use char because int might match the return type of a GCC
12179   builtin and then its argument prototype would still apply.  */
12180#ifdef __cplusplus
12181extern "C"
12182#endif
12183char SSL_new ();
12184int
12185main ()
12186{
12187return SSL_new ();
12188  ;
12189  return 0;
12190}
12191_ACEOF
12192for ac_lib in '' ssleay32 ssl; do
12193  if test -z "$ac_lib"; then
12194    ac_res="none required"
12195  else
12196    ac_res=-l$ac_lib
12197    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
12198  fi
12199  if ac_fn_c_try_link "$LINENO"; then :
12200  ac_cv_search_SSL_new=$ac_res
12201fi
12202rm -f core conftest.err conftest.$ac_objext \
12203    conftest$ac_exeext
12204  if ${ac_cv_search_SSL_new+:} false; then :
12205  break
12206fi
12207done
12208if ${ac_cv_search_SSL_new+:} false; then :
12209
12210else
12211  ac_cv_search_SSL_new=no
12212fi
12213rm conftest.$ac_ext
12214LIBS=$ac_func_search_save_LIBS
12215fi
12216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12217$as_echo "$ac_cv_search_SSL_new" >&6; }
12218ac_res=$ac_cv_search_SSL_new
12219if test "$ac_res" != no; then :
12220  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12221
12222else
12223  as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12224fi
12225
12226  fi
12227  for ac_func in SSL_get_current_compression X509_get_signature_nid
12228do :
12229  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12230ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12231if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12232  cat >>confdefs.h <<_ACEOF
12233#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12234_ACEOF
12235
12236fi
12237done
12238
12239  # Functions introduced in OpenSSL 1.1.0. We used to check for
12240  # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
12241  # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
12242  # doesn't have these OpenSSL 1.1.0 functions. So check for individual
12243  # functions.
12244  for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data
12245do :
12246  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12247ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12248if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12249  cat >>confdefs.h <<_ACEOF
12250#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12251_ACEOF
12252
12253fi
12254done
12255
12256  # OpenSSL versions before 1.1.0 required setting callback functions, for
12257  # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
12258  # function was removed.
12259  for ac_func in CRYPTO_lock
12260do :
12261  ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
12262if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
12263  cat >>confdefs.h <<_ACEOF
12264#define HAVE_CRYPTO_LOCK 1
12265_ACEOF
12266
12267fi
12268done
12269
12270  # SSL_clear_options is a macro in OpenSSL from 0.9.8 to 1.0.2, and
12271  # a function from 1.1.0 onwards so we cannot use AC_CHECK_FUNCS.
12272  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_clear_options" >&5
12273$as_echo_n "checking for SSL_clear_options... " >&6; }
12274if ${ac_cv_func_ssl_clear_options+:} false; then :
12275  $as_echo_n "(cached) " >&6
12276else
12277  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12278/* end confdefs.h.  */
12279
12280  #include <openssl/ssl.h>
12281  #include <openssl/bio.h>
12282  SSL *ssl;
12283
12284int
12285main ()
12286{
12287return SSL_clear_options(ssl, 0);
12288  ;
12289  return 0;
12290}
12291_ACEOF
12292if ac_fn_c_try_link "$LINENO"; then :
12293  ac_cv_func_ssl_clear_options=yes
12294else
12295  ac_cv_func_ssl_clear_options=no
12296fi
12297rm -f core conftest.err conftest.$ac_objext \
12298    conftest$ac_exeext conftest.$ac_ext
12299fi
12300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_ssl_clear_options" >&5
12301$as_echo "$ac_cv_func_ssl_clear_options" >&6; }
12302  if test $ac_cv_func_ssl_clear_options = yes ; then
12303
12304$as_echo "#define HAVE_SSL_CLEAR_OPTIONS 1" >>confdefs.h
12305
12306  fi
12307fi
12308
12309if test "$with_pam" = yes ; then
12310  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
12311$as_echo_n "checking for pam_start in -lpam... " >&6; }
12312if ${ac_cv_lib_pam_pam_start+:} false; then :
12313  $as_echo_n "(cached) " >&6
12314else
12315  ac_check_lib_save_LIBS=$LIBS
12316LIBS="-lpam  $LIBS"
12317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12318/* end confdefs.h.  */
12319
12320/* Override any GCC internal prototype to avoid an error.
12321   Use char because int might match the return type of a GCC
12322   builtin and then its argument prototype would still apply.  */
12323#ifdef __cplusplus
12324extern "C"
12325#endif
12326char pam_start ();
12327int
12328main ()
12329{
12330return pam_start ();
12331  ;
12332  return 0;
12333}
12334_ACEOF
12335if ac_fn_c_try_link "$LINENO"; then :
12336  ac_cv_lib_pam_pam_start=yes
12337else
12338  ac_cv_lib_pam_pam_start=no
12339fi
12340rm -f core conftest.err conftest.$ac_objext \
12341    conftest$ac_exeext conftest.$ac_ext
12342LIBS=$ac_check_lib_save_LIBS
12343fi
12344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
12345$as_echo "$ac_cv_lib_pam_pam_start" >&6; }
12346if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
12347  cat >>confdefs.h <<_ACEOF
12348#define HAVE_LIBPAM 1
12349_ACEOF
12350
12351  LIBS="-lpam $LIBS"
12352
12353else
12354  as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
12355fi
12356
12357fi
12358
12359if test "$with_libxml" = yes ; then
12360  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
12361$as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
12362if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
12363  $as_echo_n "(cached) " >&6
12364else
12365  ac_check_lib_save_LIBS=$LIBS
12366LIBS="-lxml2  $LIBS"
12367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12368/* end confdefs.h.  */
12369
12370/* Override any GCC internal prototype to avoid an error.
12371   Use char because int might match the return type of a GCC
12372   builtin and then its argument prototype would still apply.  */
12373#ifdef __cplusplus
12374extern "C"
12375#endif
12376char xmlSaveToBuffer ();
12377int
12378main ()
12379{
12380return xmlSaveToBuffer ();
12381  ;
12382  return 0;
12383}
12384_ACEOF
12385if ac_fn_c_try_link "$LINENO"; then :
12386  ac_cv_lib_xml2_xmlSaveToBuffer=yes
12387else
12388  ac_cv_lib_xml2_xmlSaveToBuffer=no
12389fi
12390rm -f core conftest.err conftest.$ac_objext \
12391    conftest$ac_exeext conftest.$ac_ext
12392LIBS=$ac_check_lib_save_LIBS
12393fi
12394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
12395$as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
12396if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
12397  cat >>confdefs.h <<_ACEOF
12398#define HAVE_LIBXML2 1
12399_ACEOF
12400
12401  LIBS="-lxml2 $LIBS"
12402
12403else
12404  as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
12405fi
12406
12407fi
12408
12409if test "$with_libxslt" = yes ; then
12410  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
12411$as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
12412if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
12413  $as_echo_n "(cached) " >&6
12414else
12415  ac_check_lib_save_LIBS=$LIBS
12416LIBS="-lxslt  $LIBS"
12417cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12418/* end confdefs.h.  */
12419
12420/* Override any GCC internal prototype to avoid an error.
12421   Use char because int might match the return type of a GCC
12422   builtin and then its argument prototype would still apply.  */
12423#ifdef __cplusplus
12424extern "C"
12425#endif
12426char xsltCleanupGlobals ();
12427int
12428main ()
12429{
12430return xsltCleanupGlobals ();
12431  ;
12432  return 0;
12433}
12434_ACEOF
12435if ac_fn_c_try_link "$LINENO"; then :
12436  ac_cv_lib_xslt_xsltCleanupGlobals=yes
12437else
12438  ac_cv_lib_xslt_xsltCleanupGlobals=no
12439fi
12440rm -f core conftest.err conftest.$ac_objext \
12441    conftest$ac_exeext conftest.$ac_ext
12442LIBS=$ac_check_lib_save_LIBS
12443fi
12444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
12445$as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
12446if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
12447  cat >>confdefs.h <<_ACEOF
12448#define HAVE_LIBXSLT 1
12449_ACEOF
12450
12451  LIBS="-lxslt $LIBS"
12452
12453else
12454  as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
12455fi
12456
12457fi
12458
12459# Note: We can test for libldap_r only after we know PTHREAD_LIBS;
12460# also, on AIX, we may need to have openssl in LIBS for this step.
12461if test "$with_ldap" = yes ; then
12462  _LIBS="$LIBS"
12463  if test "$PORTNAME" != "win32"; then
12464    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12465$as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12466if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12467  $as_echo_n "(cached) " >&6
12468else
12469  ac_check_lib_save_LIBS=$LIBS
12470LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12472/* end confdefs.h.  */
12473
12474/* Override any GCC internal prototype to avoid an error.
12475   Use char because int might match the return type of a GCC
12476   builtin and then its argument prototype would still apply.  */
12477#ifdef __cplusplus
12478extern "C"
12479#endif
12480char ldap_bind ();
12481int
12482main ()
12483{
12484return ldap_bind ();
12485  ;
12486  return 0;
12487}
12488_ACEOF
12489if ac_fn_c_try_link "$LINENO"; then :
12490  ac_cv_lib_ldap_ldap_bind=yes
12491else
12492  ac_cv_lib_ldap_ldap_bind=no
12493fi
12494rm -f core conftest.err conftest.$ac_objext \
12495    conftest$ac_exeext conftest.$ac_ext
12496LIBS=$ac_check_lib_save_LIBS
12497fi
12498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12499$as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12500if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12501  cat >>confdefs.h <<_ACEOF
12502#define HAVE_LIBLDAP 1
12503_ACEOF
12504
12505  LIBS="-lldap $LIBS"
12506
12507else
12508  as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12509fi
12510
12511    LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12512    # This test is carried out against libldap.
12513    for ac_func in ldap_initialize
12514do :
12515  ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
12516if test "x$ac_cv_func_ldap_initialize" = xyes; then :
12517  cat >>confdefs.h <<_ACEOF
12518#define HAVE_LDAP_INITIALIZE 1
12519_ACEOF
12520
12521fi
12522done
12523
12524    if test "$enable_thread_safety" = yes; then
12525      # Use ldap_r for FE if available, else assume ldap is thread-safe.
12526      # On some platforms ldap_r fails to link without PTHREAD_LIBS.
12527      LIBS="$_LIBS"
12528      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap_r" >&5
12529$as_echo_n "checking for ldap_bind in -lldap_r... " >&6; }
12530if ${ac_cv_lib_ldap_r_ldap_bind+:} false; then :
12531  $as_echo_n "(cached) " >&6
12532else
12533  ac_check_lib_save_LIBS=$LIBS
12534LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12536/* end confdefs.h.  */
12537
12538/* Override any GCC internal prototype to avoid an error.
12539   Use char because int might match the return type of a GCC
12540   builtin and then its argument prototype would still apply.  */
12541#ifdef __cplusplus
12542extern "C"
12543#endif
12544char ldap_bind ();
12545int
12546main ()
12547{
12548return ldap_bind ();
12549  ;
12550  return 0;
12551}
12552_ACEOF
12553if ac_fn_c_try_link "$LINENO"; then :
12554  ac_cv_lib_ldap_r_ldap_bind=yes
12555else
12556  ac_cv_lib_ldap_r_ldap_bind=no
12557fi
12558rm -f core conftest.err conftest.$ac_objext \
12559    conftest$ac_exeext conftest.$ac_ext
12560LIBS=$ac_check_lib_save_LIBS
12561fi
12562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_bind" >&5
12563$as_echo "$ac_cv_lib_ldap_r_ldap_bind" >&6; }
12564if test "x$ac_cv_lib_ldap_r_ldap_bind" = xyes; then :
12565  LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12566else
12567  LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12568fi
12569
12570    else
12571      LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12572    fi
12573  else
12574    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12575$as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12576if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12577  $as_echo_n "(cached) " >&6
12578else
12579  ac_check_lib_save_LIBS=$LIBS
12580LIBS="-lwldap32  $LIBS"
12581cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12582/* end confdefs.h.  */
12583
12584/* Override any GCC internal prototype to avoid an error.
12585   Use char because int might match the return type of a GCC
12586   builtin and then its argument prototype would still apply.  */
12587#ifdef __cplusplus
12588extern "C"
12589#endif
12590char ldap_bind ();
12591int
12592main ()
12593{
12594return ldap_bind ();
12595  ;
12596  return 0;
12597}
12598_ACEOF
12599if ac_fn_c_try_link "$LINENO"; then :
12600  ac_cv_lib_wldap32_ldap_bind=yes
12601else
12602  ac_cv_lib_wldap32_ldap_bind=no
12603fi
12604rm -f core conftest.err conftest.$ac_objext \
12605    conftest$ac_exeext conftest.$ac_ext
12606LIBS=$ac_check_lib_save_LIBS
12607fi
12608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12609$as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12610if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12611  cat >>confdefs.h <<_ACEOF
12612#define HAVE_LIBWLDAP32 1
12613_ACEOF
12614
12615  LIBS="-lwldap32 $LIBS"
12616
12617else
12618  as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
12619fi
12620
12621    LDAP_LIBS_FE="-lwldap32"
12622    LDAP_LIBS_BE="-lwldap32"
12623  fi
12624  LIBS="$_LIBS"
12625fi
12626
12627
12628
12629# for contrib/sepgsql
12630if test "$with_selinux" = yes; then
12631  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
12632$as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
12633if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
12634  $as_echo_n "(cached) " >&6
12635else
12636  ac_check_lib_save_LIBS=$LIBS
12637LIBS="-lselinux  $LIBS"
12638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12639/* end confdefs.h.  */
12640
12641/* Override any GCC internal prototype to avoid an error.
12642   Use char because int might match the return type of a GCC
12643   builtin and then its argument prototype would still apply.  */
12644#ifdef __cplusplus
12645extern "C"
12646#endif
12647char security_compute_create_name ();
12648int
12649main ()
12650{
12651return security_compute_create_name ();
12652  ;
12653  return 0;
12654}
12655_ACEOF
12656if ac_fn_c_try_link "$LINENO"; then :
12657  ac_cv_lib_selinux_security_compute_create_name=yes
12658else
12659  ac_cv_lib_selinux_security_compute_create_name=no
12660fi
12661rm -f core conftest.err conftest.$ac_objext \
12662    conftest$ac_exeext conftest.$ac_ext
12663LIBS=$ac_check_lib_save_LIBS
12664fi
12665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
12666$as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
12667if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
12668  cat >>confdefs.h <<_ACEOF
12669#define HAVE_LIBSELINUX 1
12670_ACEOF
12671
12672  LIBS="-lselinux $LIBS"
12673
12674else
12675  as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
12676fi
12677
12678fi
12679
12680# for contrib/uuid-ossp
12681if test "$with_uuid" = bsd ; then
12682  # On BSD, the UUID functions are in libc
12683  ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
12684if test "x$ac_cv_func_uuid_to_string" = xyes; then :
12685  UUID_LIBS=""
12686else
12687  as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
12688fi
12689
12690elif test "$with_uuid" = e2fs ; then
12691  # On macOS, the UUID functions are in libc
12692  ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
12693if test "x$ac_cv_func_uuid_generate" = xyes; then :
12694  UUID_LIBS=""
12695else
12696  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
12697$as_echo_n "checking for uuid_generate in -luuid... " >&6; }
12698if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
12699  $as_echo_n "(cached) " >&6
12700else
12701  ac_check_lib_save_LIBS=$LIBS
12702LIBS="-luuid  $LIBS"
12703cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12704/* end confdefs.h.  */
12705
12706/* Override any GCC internal prototype to avoid an error.
12707   Use char because int might match the return type of a GCC
12708   builtin and then its argument prototype would still apply.  */
12709#ifdef __cplusplus
12710extern "C"
12711#endif
12712char uuid_generate ();
12713int
12714main ()
12715{
12716return uuid_generate ();
12717  ;
12718  return 0;
12719}
12720_ACEOF
12721if ac_fn_c_try_link "$LINENO"; then :
12722  ac_cv_lib_uuid_uuid_generate=yes
12723else
12724  ac_cv_lib_uuid_uuid_generate=no
12725fi
12726rm -f core conftest.err conftest.$ac_objext \
12727    conftest$ac_exeext conftest.$ac_ext
12728LIBS=$ac_check_lib_save_LIBS
12729fi
12730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
12731$as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
12732if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
12733  UUID_LIBS="-luuid"
12734else
12735  as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
12736fi
12737
12738fi
12739
12740elif test "$with_uuid" = ossp ; then
12741  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
12742$as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
12743if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
12744  $as_echo_n "(cached) " >&6
12745else
12746  ac_check_lib_save_LIBS=$LIBS
12747LIBS="-lossp-uuid  $LIBS"
12748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12749/* end confdefs.h.  */
12750
12751/* Override any GCC internal prototype to avoid an error.
12752   Use char because int might match the return type of a GCC
12753   builtin and then its argument prototype would still apply.  */
12754#ifdef __cplusplus
12755extern "C"
12756#endif
12757char uuid_export ();
12758int
12759main ()
12760{
12761return uuid_export ();
12762  ;
12763  return 0;
12764}
12765_ACEOF
12766if ac_fn_c_try_link "$LINENO"; then :
12767  ac_cv_lib_ossp_uuid_uuid_export=yes
12768else
12769  ac_cv_lib_ossp_uuid_uuid_export=no
12770fi
12771rm -f core conftest.err conftest.$ac_objext \
12772    conftest$ac_exeext conftest.$ac_ext
12773LIBS=$ac_check_lib_save_LIBS
12774fi
12775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
12776$as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
12777if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
12778  UUID_LIBS="-lossp-uuid"
12779else
12780  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
12781$as_echo_n "checking for uuid_export in -luuid... " >&6; }
12782if ${ac_cv_lib_uuid_uuid_export+:} false; then :
12783  $as_echo_n "(cached) " >&6
12784else
12785  ac_check_lib_save_LIBS=$LIBS
12786LIBS="-luuid  $LIBS"
12787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12788/* end confdefs.h.  */
12789
12790/* Override any GCC internal prototype to avoid an error.
12791   Use char because int might match the return type of a GCC
12792   builtin and then its argument prototype would still apply.  */
12793#ifdef __cplusplus
12794extern "C"
12795#endif
12796char uuid_export ();
12797int
12798main ()
12799{
12800return uuid_export ();
12801  ;
12802  return 0;
12803}
12804_ACEOF
12805if ac_fn_c_try_link "$LINENO"; then :
12806  ac_cv_lib_uuid_uuid_export=yes
12807else
12808  ac_cv_lib_uuid_uuid_export=no
12809fi
12810rm -f core conftest.err conftest.$ac_objext \
12811    conftest$ac_exeext conftest.$ac_ext
12812LIBS=$ac_check_lib_save_LIBS
12813fi
12814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
12815$as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
12816if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
12817  UUID_LIBS="-luuid"
12818else
12819  as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
12820fi
12821
12822fi
12823
12824fi
12825
12826
12827
12828##
12829## Header files
12830##
12831
12832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
12833$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
12834if ${ac_cv_header_stdbool_h+:} false; then :
12835  $as_echo_n "(cached) " >&6
12836else
12837  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12838/* end confdefs.h.  */
12839
12840             #include <stdbool.h>
12841             #ifndef bool
12842              "error: bool is not defined"
12843             #endif
12844             #ifndef false
12845              "error: false is not defined"
12846             #endif
12847             #if false
12848              "error: false is not 0"
12849             #endif
12850             #ifndef true
12851              "error: true is not defined"
12852             #endif
12853             #if true != 1
12854              "error: true is not 1"
12855             #endif
12856             #ifndef __bool_true_false_are_defined
12857              "error: __bool_true_false_are_defined is not defined"
12858             #endif
12859
12860             struct s { _Bool s: 1; _Bool t; } s;
12861
12862             char a[true == 1 ? 1 : -1];
12863             char b[false == 0 ? 1 : -1];
12864             char c[__bool_true_false_are_defined == 1 ? 1 : -1];
12865             char d[(bool) 0.5 == true ? 1 : -1];
12866             /* See body of main program for 'e'.  */
12867             char f[(_Bool) 0.0 == false ? 1 : -1];
12868             char g[true];
12869             char h[sizeof (_Bool)];
12870             char i[sizeof s.t];
12871             enum { j = false, k = true, l = false * true, m = true * 256 };
12872             /* The following fails for
12873                HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
12874             _Bool n[m];
12875             char o[sizeof n == m * sizeof n[0] ? 1 : -1];
12876             char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
12877             /* Catch a bug in an HP-UX C compiler.  See
12878                http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
12879                http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
12880              */
12881             _Bool q = true;
12882             _Bool *pq = &q;
12883
12884int
12885main ()
12886{
12887
12888             bool e = &s;
12889             *pq |= q;
12890             *pq |= ! q;
12891             /* Refer to every declared value, to avoid compiler optimizations.  */
12892             return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
12893                     + !m + !n + !o + !p + !q + !pq);
12894
12895  ;
12896  return 0;
12897}
12898_ACEOF
12899if ac_fn_c_try_compile "$LINENO"; then :
12900  ac_cv_header_stdbool_h=yes
12901else
12902  ac_cv_header_stdbool_h=no
12903fi
12904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12905fi
12906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
12907$as_echo "$ac_cv_header_stdbool_h" >&6; }
12908   ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
12909if test "x$ac_cv_type__Bool" = xyes; then :
12910
12911cat >>confdefs.h <<_ACEOF
12912#define HAVE__BOOL 1
12913_ACEOF
12914
12915
12916fi
12917
12918
12919if test $ac_cv_header_stdbool_h = yes; then
12920
12921$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
12922
12923fi
12924
12925
12926for ac_header in atomic.h copyfile.h crypt.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.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/un.h termios.h ucred.h utime.h wchar.h wctype.h
12927do :
12928  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12929ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12930if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12931  cat >>confdefs.h <<_ACEOF
12932#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12933_ACEOF
12934
12935fi
12936
12937done
12938
12939
12940# On BSD, test for net/if.h will fail unless sys/socket.h
12941# is included first.
12942for ac_header in net/if.h
12943do :
12944  ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
12945#include <sys/socket.h>
12946
12947"
12948if test "x$ac_cv_header_net_if_h" = xyes; then :
12949  cat >>confdefs.h <<_ACEOF
12950#define HAVE_NET_IF_H 1
12951_ACEOF
12952
12953fi
12954
12955done
12956
12957
12958# On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
12959# is included first.
12960for ac_header in sys/ucred.h
12961do :
12962  ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
12963#include <sys/param.h>
12964
12965"
12966if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
12967  cat >>confdefs.h <<_ACEOF
12968#define HAVE_SYS_UCRED_H 1
12969_ACEOF
12970
12971fi
12972
12973done
12974
12975
12976# At least on IRIX, test for netinet/tcp.h will fail unless
12977# netinet/in.h is included first.
12978for ac_header in netinet/tcp.h
12979do :
12980  ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
12981#include <netinet/in.h>
12982
12983"
12984if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
12985  cat >>confdefs.h <<_ACEOF
12986#define HAVE_NETINET_TCP_H 1
12987_ACEOF
12988
12989fi
12990
12991done
12992
12993
12994if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
12995  for ac_header in readline/readline.h
12996do :
12997  ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12998if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12999  cat >>confdefs.h <<_ACEOF
13000#define HAVE_READLINE_READLINE_H 1
13001_ACEOF
13002
13003else
13004  for ac_header in readline.h
13005do :
13006  ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13007if test "x$ac_cv_header_readline_h" = xyes; then :
13008  cat >>confdefs.h <<_ACEOF
13009#define HAVE_READLINE_H 1
13010_ACEOF
13011
13012else
13013  as_fn_error $? "readline header not found
13014If you have readline already installed, see config.log for details on the
13015failure.  It is possible the compiler isn't looking in the proper directory.
13016Use --without-readline to disable readline support." "$LINENO" 5
13017fi
13018
13019done
13020
13021fi
13022
13023done
13024
13025  for ac_header in readline/history.h
13026do :
13027  ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13028if test "x$ac_cv_header_readline_history_h" = xyes; then :
13029  cat >>confdefs.h <<_ACEOF
13030#define HAVE_READLINE_HISTORY_H 1
13031_ACEOF
13032
13033else
13034  for ac_header in history.h
13035do :
13036  ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13037if test "x$ac_cv_header_history_h" = xyes; then :
13038  cat >>confdefs.h <<_ACEOF
13039#define HAVE_HISTORY_H 1
13040_ACEOF
13041
13042else
13043  as_fn_error $? "history header not found
13044If you have readline already installed, see config.log for details on the
13045failure.  It is possible the compiler isn't looking in the proper directory.
13046Use --without-readline to disable readline support." "$LINENO" 5
13047fi
13048
13049done
13050
13051fi
13052
13053done
13054
13055fi
13056
13057if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
13058# Some installations of libedit usurp /usr/include/readline/, which seems
13059# bad practice, since in combined installations readline will have its headers
13060# there.  We might have to resort to AC_EGREP checks to make sure we found
13061# the proper header...
13062  for ac_header in editline/readline.h
13063do :
13064  ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
13065if test "x$ac_cv_header_editline_readline_h" = xyes; then :
13066  cat >>confdefs.h <<_ACEOF
13067#define HAVE_EDITLINE_READLINE_H 1
13068_ACEOF
13069
13070else
13071  for ac_header in readline.h
13072do :
13073  ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13074if test "x$ac_cv_header_readline_h" = xyes; then :
13075  cat >>confdefs.h <<_ACEOF
13076#define HAVE_READLINE_H 1
13077_ACEOF
13078
13079else
13080  for ac_header in readline/readline.h
13081do :
13082  ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13083if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13084  cat >>confdefs.h <<_ACEOF
13085#define HAVE_READLINE_READLINE_H 1
13086_ACEOF
13087
13088else
13089  as_fn_error $? "readline header not found
13090If you have libedit already installed, see config.log for details on the
13091failure.  It is possible the compiler isn't looking in the proper directory.
13092Use --without-readline to disable libedit support." "$LINENO" 5
13093fi
13094
13095done
13096
13097fi
13098
13099done
13100
13101fi
13102
13103done
13104
13105# Note: in a libedit installation, history.h is sometimes a dummy, and may
13106# not be there at all.  Hence, don't complain if not found.  We must check
13107# though, since in yet other versions it is an independent header.
13108  for ac_header in editline/history.h
13109do :
13110  ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
13111if test "x$ac_cv_header_editline_history_h" = xyes; then :
13112  cat >>confdefs.h <<_ACEOF
13113#define HAVE_EDITLINE_HISTORY_H 1
13114_ACEOF
13115
13116else
13117  for ac_header in history.h
13118do :
13119  ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13120if test "x$ac_cv_header_history_h" = xyes; then :
13121  cat >>confdefs.h <<_ACEOF
13122#define HAVE_HISTORY_H 1
13123_ACEOF
13124
13125else
13126  for ac_header in readline/history.h
13127do :
13128  ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13129if test "x$ac_cv_header_readline_history_h" = xyes; then :
13130  cat >>confdefs.h <<_ACEOF
13131#define HAVE_READLINE_HISTORY_H 1
13132_ACEOF
13133
13134fi
13135
13136done
13137
13138fi
13139
13140done
13141
13142fi
13143
13144done
13145
13146fi
13147
13148if test "$with_zlib" = yes; then
13149  ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
13150if test "x$ac_cv_header_zlib_h" = xyes; then :
13151
13152else
13153  as_fn_error $? "zlib header not found
13154If you have zlib already installed, see config.log for details on the
13155failure.  It is possible the compiler isn't looking in the proper directory.
13156Use --without-zlib to disable zlib support." "$LINENO" 5
13157fi
13158
13159
13160fi
13161
13162if test "$with_gssapi" = yes ; then
13163  for ac_header in gssapi/gssapi.h
13164do :
13165  ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
13166if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
13167  cat >>confdefs.h <<_ACEOF
13168#define HAVE_GSSAPI_GSSAPI_H 1
13169_ACEOF
13170
13171else
13172  for ac_header in gssapi.h
13173do :
13174  ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
13175if test "x$ac_cv_header_gssapi_h" = xyes; then :
13176  cat >>confdefs.h <<_ACEOF
13177#define HAVE_GSSAPI_H 1
13178_ACEOF
13179
13180else
13181  as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
13182fi
13183
13184done
13185
13186fi
13187
13188done
13189
13190fi
13191
13192if test "$with_openssl" = yes ; then
13193  ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
13194if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
13195
13196else
13197  as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
13198fi
13199
13200
13201  ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
13202if test "x$ac_cv_header_openssl_err_h" = xyes; then :
13203
13204else
13205  as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
13206fi
13207
13208
13209fi
13210
13211if test "$with_pam" = yes ; then
13212  for ac_header in security/pam_appl.h
13213do :
13214  ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
13215if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
13216  cat >>confdefs.h <<_ACEOF
13217#define HAVE_SECURITY_PAM_APPL_H 1
13218_ACEOF
13219
13220else
13221  for ac_header in pam/pam_appl.h
13222do :
13223  ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
13224if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
13225  cat >>confdefs.h <<_ACEOF
13226#define HAVE_PAM_PAM_APPL_H 1
13227_ACEOF
13228
13229else
13230  as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
13231fi
13232
13233done
13234
13235fi
13236
13237done
13238
13239fi
13240
13241if test "$with_bsd_auth" = yes ; then
13242  ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
13243if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
13244
13245else
13246  as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
13247fi
13248
13249
13250fi
13251
13252if test "$with_systemd" = yes ; then
13253  ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
13254if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
13255
13256else
13257  as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
13258fi
13259
13260
13261fi
13262
13263if test "$with_libxml" = yes ; then
13264  ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
13265if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
13266
13267else
13268  as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
13269fi
13270
13271
13272fi
13273
13274if test "$with_libxslt" = yes ; then
13275  ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
13276if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
13277
13278else
13279  as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
13280fi
13281
13282
13283fi
13284
13285if test "$with_ldap" = yes ; then
13286  if test "$PORTNAME" != "win32"; then
13287     for ac_header in ldap.h
13288do :
13289  ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
13290if test "x$ac_cv_header_ldap_h" = xyes; then :
13291  cat >>confdefs.h <<_ACEOF
13292#define HAVE_LDAP_H 1
13293_ACEOF
13294
13295else
13296  as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
13297fi
13298
13299done
13300
13301     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
13302$as_echo_n "checking for compatible LDAP implementation... " >&6; }
13303if ${pgac_cv_ldap_safe+:} false; then :
13304  $as_echo_n "(cached) " >&6
13305else
13306  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13307/* end confdefs.h.  */
13308#include <ldap.h>
13309#if !defined(LDAP_VENDOR_VERSION) || \
13310     (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
13311      LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
13312choke me
13313#endif
13314int
13315main ()
13316{
13317
13318  ;
13319  return 0;
13320}
13321_ACEOF
13322if ac_fn_c_try_compile "$LINENO"; then :
13323  pgac_cv_ldap_safe=yes
13324else
13325  pgac_cv_ldap_safe=no
13326fi
13327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13328fi
13329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
13330$as_echo "$pgac_cv_ldap_safe" >&6; }
13331
13332if test "$pgac_cv_ldap_safe" != yes; then
13333  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
13334*** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13335*** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13336*** also uses LDAP will crash on exit." >&5
13337$as_echo "$as_me: WARNING:
13338*** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13339*** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13340*** also uses LDAP will crash on exit." >&2;}
13341fi
13342  else
13343     for ac_header in winldap.h
13344do :
13345  ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
13346#include <windows.h>
13347
13348"
13349if test "x$ac_cv_header_winldap_h" = xyes; then :
13350  cat >>confdefs.h <<_ACEOF
13351#define HAVE_WINLDAP_H 1
13352_ACEOF
13353
13354else
13355  as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
13356fi
13357
13358done
13359
13360  fi
13361fi
13362
13363if test "$with_bonjour" = yes ; then
13364  ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
13365if test "x$ac_cv_header_dns_sd_h" = xyes; then :
13366
13367else
13368  as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
13369fi
13370
13371
13372fi
13373
13374# for contrib/uuid-ossp
13375if test "$with_uuid" = bsd ; then
13376  for ac_header in uuid.h
13377do :
13378  ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13379if test "x$ac_cv_header_uuid_h" = xyes; then :
13380  cat >>confdefs.h <<_ACEOF
13381#define HAVE_UUID_H 1
13382_ACEOF
13383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13384/* end confdefs.h.  */
13385#include <uuid.h>
13386
13387_ACEOF
13388if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13389  $EGREP "uuid_to_string" >/dev/null 2>&1; then :
13390
13391else
13392  as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
13393fi
13394rm -f conftest*
13395
13396else
13397  as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
13398fi
13399
13400done
13401
13402elif test "$with_uuid" = e2fs ; then
13403  for ac_header in uuid/uuid.h
13404do :
13405  ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
13406if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
13407  cat >>confdefs.h <<_ACEOF
13408#define HAVE_UUID_UUID_H 1
13409_ACEOF
13410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13411/* end confdefs.h.  */
13412#include <uuid/uuid.h>
13413
13414_ACEOF
13415if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13416  $EGREP "uuid_generate" >/dev/null 2>&1; then :
13417
13418else
13419  as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
13420fi
13421rm -f conftest*
13422
13423else
13424  for ac_header in uuid.h
13425do :
13426  ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13427if test "x$ac_cv_header_uuid_h" = xyes; then :
13428  cat >>confdefs.h <<_ACEOF
13429#define HAVE_UUID_H 1
13430_ACEOF
13431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13432/* end confdefs.h.  */
13433#include <uuid.h>
13434
13435_ACEOF
13436if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13437  $EGREP "uuid_generate" >/dev/null 2>&1; then :
13438
13439else
13440  as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
13441fi
13442rm -f conftest*
13443
13444else
13445  as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
13446fi
13447
13448done
13449
13450fi
13451
13452done
13453
13454elif test "$with_uuid" = ossp ; then
13455  for ac_header in ossp/uuid.h
13456do :
13457  ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
13458if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
13459  cat >>confdefs.h <<_ACEOF
13460#define HAVE_OSSP_UUID_H 1
13461_ACEOF
13462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13463/* end confdefs.h.  */
13464#include <ossp/uuid.h>
13465
13466_ACEOF
13467if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13468  $EGREP "uuid_export" >/dev/null 2>&1; then :
13469
13470else
13471  as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
13472fi
13473rm -f conftest*
13474
13475else
13476  for ac_header in uuid.h
13477do :
13478  ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13479if test "x$ac_cv_header_uuid_h" = xyes; then :
13480  cat >>confdefs.h <<_ACEOF
13481#define HAVE_UUID_H 1
13482_ACEOF
13483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13484/* end confdefs.h.  */
13485#include <uuid.h>
13486
13487_ACEOF
13488if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13489  $EGREP "uuid_export" >/dev/null 2>&1; then :
13490
13491else
13492  as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
13493fi
13494rm -f conftest*
13495
13496else
13497  as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
13498fi
13499
13500done
13501
13502fi
13503
13504done
13505
13506fi
13507
13508if test "$PORTNAME" = "win32" ; then
13509   for ac_header in crtdefs.h
13510do :
13511  ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
13512if test "x$ac_cv_header_crtdefs_h" = xyes; then :
13513  cat >>confdefs.h <<_ACEOF
13514#define HAVE_CRTDEFS_H 1
13515_ACEOF
13516
13517fi
13518
13519done
13520
13521fi
13522
13523##
13524## Types, structures, compiler characteristics
13525##
13526
13527  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13528$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13529if ${ac_cv_c_bigendian+:} false; then :
13530  $as_echo_n "(cached) " >&6
13531else
13532  ac_cv_c_bigendian=unknown
13533    # See if we're dealing with a universal compiler.
13534    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13535/* end confdefs.h.  */
13536#ifndef __APPLE_CC__
13537	       not a universal capable compiler
13538	     #endif
13539	     typedef int dummy;
13540
13541_ACEOF
13542if ac_fn_c_try_compile "$LINENO"; then :
13543
13544	# Check for potential -arch flags.  It is not universal unless
13545	# there are at least two -arch flags with different values.
13546	ac_arch=
13547	ac_prev=
13548	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13549	 if test -n "$ac_prev"; then
13550	   case $ac_word in
13551	     i?86 | x86_64 | ppc | ppc64)
13552	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13553		 ac_arch=$ac_word
13554	       else
13555		 ac_cv_c_bigendian=universal
13556		 break
13557	       fi
13558	       ;;
13559	   esac
13560	   ac_prev=
13561	 elif test "x$ac_word" = "x-arch"; then
13562	   ac_prev=arch
13563	 fi
13564       done
13565fi
13566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13567    if test $ac_cv_c_bigendian = unknown; then
13568      # See if sys/param.h defines the BYTE_ORDER macro.
13569      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13570/* end confdefs.h.  */
13571#include <sys/types.h>
13572	     #include <sys/param.h>
13573
13574int
13575main ()
13576{
13577#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13578		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13579		     && LITTLE_ENDIAN)
13580	      bogus endian macros
13581	     #endif
13582
13583  ;
13584  return 0;
13585}
13586_ACEOF
13587if ac_fn_c_try_compile "$LINENO"; then :
13588  # It does; now see whether it defined to BIG_ENDIAN or not.
13589	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13590/* end confdefs.h.  */
13591#include <sys/types.h>
13592		#include <sys/param.h>
13593
13594int
13595main ()
13596{
13597#if BYTE_ORDER != BIG_ENDIAN
13598		 not big endian
13599		#endif
13600
13601  ;
13602  return 0;
13603}
13604_ACEOF
13605if ac_fn_c_try_compile "$LINENO"; then :
13606  ac_cv_c_bigendian=yes
13607else
13608  ac_cv_c_bigendian=no
13609fi
13610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13611fi
13612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13613    fi
13614    if test $ac_cv_c_bigendian = unknown; then
13615      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13616      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13617/* end confdefs.h.  */
13618#include <limits.h>
13619
13620int
13621main ()
13622{
13623#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13624	      bogus endian macros
13625	     #endif
13626
13627  ;
13628  return 0;
13629}
13630_ACEOF
13631if ac_fn_c_try_compile "$LINENO"; then :
13632  # It does; now see whether it defined to _BIG_ENDIAN or not.
13633	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13634/* end confdefs.h.  */
13635#include <limits.h>
13636
13637int
13638main ()
13639{
13640#ifndef _BIG_ENDIAN
13641		 not big endian
13642		#endif
13643
13644  ;
13645  return 0;
13646}
13647_ACEOF
13648if ac_fn_c_try_compile "$LINENO"; then :
13649  ac_cv_c_bigendian=yes
13650else
13651  ac_cv_c_bigendian=no
13652fi
13653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13654fi
13655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13656    fi
13657    if test $ac_cv_c_bigendian = unknown; then
13658      # Compile a test program.
13659      if test "$cross_compiling" = yes; then :
13660  # Try to guess by grepping values from an object file.
13661	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13662/* end confdefs.h.  */
13663short int ascii_mm[] =
13664		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13665		short int ascii_ii[] =
13666		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13667		int use_ascii (int i) {
13668		  return ascii_mm[i] + ascii_ii[i];
13669		}
13670		short int ebcdic_ii[] =
13671		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13672		short int ebcdic_mm[] =
13673		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13674		int use_ebcdic (int i) {
13675		  return ebcdic_mm[i] + ebcdic_ii[i];
13676		}
13677		extern int foo;
13678
13679int
13680main ()
13681{
13682return use_ascii (foo) == use_ebcdic (foo);
13683  ;
13684  return 0;
13685}
13686_ACEOF
13687if ac_fn_c_try_compile "$LINENO"; then :
13688  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13689	      ac_cv_c_bigendian=yes
13690	    fi
13691	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13692	      if test "$ac_cv_c_bigendian" = unknown; then
13693		ac_cv_c_bigendian=no
13694	      else
13695		# finding both strings is unlikely to happen, but who knows?
13696		ac_cv_c_bigendian=unknown
13697	      fi
13698	    fi
13699fi
13700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13701else
13702  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13703/* end confdefs.h.  */
13704$ac_includes_default
13705int
13706main ()
13707{
13708
13709	     /* Are we little or big endian?  From Harbison&Steele.  */
13710	     union
13711	     {
13712	       long int l;
13713	       char c[sizeof (long int)];
13714	     } u;
13715	     u.l = 1;
13716	     return u.c[sizeof (long int) - 1] == 1;
13717
13718  ;
13719  return 0;
13720}
13721_ACEOF
13722if ac_fn_c_try_run "$LINENO"; then :
13723  ac_cv_c_bigendian=no
13724else
13725  ac_cv_c_bigendian=yes
13726fi
13727rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13728  conftest.$ac_objext conftest.beam conftest.$ac_ext
13729fi
13730
13731    fi
13732fi
13733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13734$as_echo "$ac_cv_c_bigendian" >&6; }
13735 case $ac_cv_c_bigendian in #(
13736   yes)
13737     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13738;; #(
13739   no)
13740      ;; #(
13741   universal)
13742
13743$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13744
13745     ;; #(
13746   *)
13747     as_fn_error $? "unknown endianness
13748 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13749 esac
13750
13751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
13752$as_echo_n "checking for inline... " >&6; }
13753if ${ac_cv_c_inline+:} false; then :
13754  $as_echo_n "(cached) " >&6
13755else
13756  ac_cv_c_inline=no
13757for ac_kw in inline __inline__ __inline; do
13758  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13759/* end confdefs.h.  */
13760#ifndef __cplusplus
13761typedef int foo_t;
13762static $ac_kw foo_t static_foo () {return 0; }
13763$ac_kw foo_t foo () {return 0; }
13764#endif
13765
13766_ACEOF
13767if ac_fn_c_try_compile "$LINENO"; then :
13768  ac_cv_c_inline=$ac_kw
13769fi
13770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13771  test "$ac_cv_c_inline" != no && break
13772done
13773
13774fi
13775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
13776$as_echo "$ac_cv_c_inline" >&6; }
13777
13778case $ac_cv_c_inline in
13779  inline | yes) ;;
13780  *)
13781    case $ac_cv_c_inline in
13782      no) ac_val=;;
13783      *) ac_val=$ac_cv_c_inline;;
13784    esac
13785    cat >>confdefs.h <<_ACEOF
13786#ifndef __cplusplus
13787#define inline $ac_val
13788#endif
13789_ACEOF
13790    ;;
13791esac
13792
13793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
13794$as_echo_n "checking for printf format archetype... " >&6; }
13795if ${pgac_cv_printf_archetype+:} false; then :
13796  $as_echo_n "(cached) " >&6
13797else
13798  pgac_cv_printf_archetype=gnu_printf
13799ac_save_c_werror_flag=$ac_c_werror_flag
13800ac_c_werror_flag=yes
13801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13802/* end confdefs.h.  */
13803extern void pgac_write(int ignore, const char *fmt,...)
13804__attribute__((format($pgac_cv_printf_archetype, 2, 3)));
13805int
13806main ()
13807{
13808pgac_write(0, "error %s: %m", "foo");
13809  ;
13810  return 0;
13811}
13812_ACEOF
13813if ac_fn_c_try_compile "$LINENO"; then :
13814  ac_archetype_ok=yes
13815else
13816  ac_archetype_ok=no
13817fi
13818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13819ac_c_werror_flag=$ac_save_c_werror_flag
13820
13821if [ "$ac_archetype_ok" = no ]; then
13822  pgac_cv_printf_archetype=__syslog__
13823  ac_save_c_werror_flag=$ac_c_werror_flag
13824ac_c_werror_flag=yes
13825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13826/* end confdefs.h.  */
13827extern void pgac_write(int ignore, const char *fmt,...)
13828__attribute__((format($pgac_cv_printf_archetype, 2, 3)));
13829int
13830main ()
13831{
13832pgac_write(0, "error %s: %m", "foo");
13833  ;
13834  return 0;
13835}
13836_ACEOF
13837if ac_fn_c_try_compile "$LINENO"; then :
13838  ac_archetype_ok=yes
13839else
13840  ac_archetype_ok=no
13841fi
13842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13843ac_c_werror_flag=$ac_save_c_werror_flag
13844
13845  if [ "$ac_archetype_ok" = no ]; then
13846    pgac_cv_printf_archetype=printf
13847  fi
13848fi
13849fi
13850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
13851$as_echo "$pgac_cv_printf_archetype" >&6; }
13852
13853cat >>confdefs.h <<_ACEOF
13854#define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
13855_ACEOF
13856
13857
13858
13859  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
13860$as_echo_n "checking for flexible array members... " >&6; }
13861if ${ac_cv_c_flexmember+:} false; then :
13862  $as_echo_n "(cached) " >&6
13863else
13864  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13865/* end confdefs.h.  */
13866#include <stdlib.h>
13867	    #include <stdio.h>
13868	    #include <stddef.h>
13869	    struct s { int n; double d[]; };
13870int
13871main ()
13872{
13873int m = getchar ();
13874	    struct s *p = malloc (offsetof (struct s, d)
13875				  + m * sizeof (double));
13876	    p->d[0] = 0.0;
13877	    return p->d != (double *) NULL;
13878  ;
13879  return 0;
13880}
13881_ACEOF
13882if ac_fn_c_try_compile "$LINENO"; then :
13883  ac_cv_c_flexmember=yes
13884else
13885  ac_cv_c_flexmember=no
13886fi
13887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13888fi
13889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
13890$as_echo "$ac_cv_c_flexmember" >&6; }
13891  if test $ac_cv_c_flexmember = yes; then
13892
13893$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
13894
13895  else
13896    $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
13897
13898  fi
13899
13900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
13901$as_echo_n "checking for signed types... " >&6; }
13902if ${pgac_cv_c_signed+:} false; then :
13903  $as_echo_n "(cached) " >&6
13904else
13905  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13906/* end confdefs.h.  */
13907
13908int
13909main ()
13910{
13911signed char c; signed short s; signed int i;
13912  ;
13913  return 0;
13914}
13915_ACEOF
13916if ac_fn_c_try_compile "$LINENO"; then :
13917  pgac_cv_c_signed=yes
13918else
13919  pgac_cv_c_signed=no
13920fi
13921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13922fi
13923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
13924$as_echo "$pgac_cv_c_signed" >&6; }
13925if test x"$pgac_cv_c_signed" = xno ; then
13926
13927$as_echo "#define signed /**/" >>confdefs.h
13928
13929fi
13930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
13931$as_echo_n "checking for __func__... " >&6; }
13932if ${pgac_cv_funcname_func_support+:} false; then :
13933  $as_echo_n "(cached) " >&6
13934else
13935  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13936/* end confdefs.h.  */
13937#include <stdio.h>
13938int
13939main ()
13940{
13941printf("%s\n", __func__);
13942  ;
13943  return 0;
13944}
13945_ACEOF
13946if ac_fn_c_try_compile "$LINENO"; then :
13947  pgac_cv_funcname_func_support=yes
13948else
13949  pgac_cv_funcname_func_support=no
13950fi
13951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13952fi
13953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
13954$as_echo "$pgac_cv_funcname_func_support" >&6; }
13955if test x"$pgac_cv_funcname_func_support" = xyes ; then
13956
13957$as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
13958
13959else
13960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
13961$as_echo_n "checking for __FUNCTION__... " >&6; }
13962if ${pgac_cv_funcname_function_support+:} false; then :
13963  $as_echo_n "(cached) " >&6
13964else
13965  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13966/* end confdefs.h.  */
13967#include <stdio.h>
13968int
13969main ()
13970{
13971printf("%s\n", __FUNCTION__);
13972  ;
13973  return 0;
13974}
13975_ACEOF
13976if ac_fn_c_try_compile "$LINENO"; then :
13977  pgac_cv_funcname_function_support=yes
13978else
13979  pgac_cv_funcname_function_support=no
13980fi
13981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13982fi
13983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
13984$as_echo "$pgac_cv_funcname_function_support" >&6; }
13985if test x"$pgac_cv_funcname_function_support" = xyes ; then
13986
13987$as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
13988
13989fi
13990fi
13991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
13992$as_echo_n "checking for _Static_assert... " >&6; }
13993if ${pgac_cv__static_assert+:} false; then :
13994  $as_echo_n "(cached) " >&6
13995else
13996  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13997/* end confdefs.h.  */
13998
13999int
14000main ()
14001{
14002({ _Static_assert(1, "foo"); })
14003  ;
14004  return 0;
14005}
14006_ACEOF
14007if ac_fn_c_try_link "$LINENO"; then :
14008  pgac_cv__static_assert=yes
14009else
14010  pgac_cv__static_assert=no
14011fi
14012rm -f core conftest.err conftest.$ac_objext \
14013    conftest$ac_exeext conftest.$ac_ext
14014fi
14015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
14016$as_echo "$pgac_cv__static_assert" >&6; }
14017if test x"$pgac_cv__static_assert" = xyes ; then
14018
14019$as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
14020
14021fi
14022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
14023$as_echo_n "checking for typeof... " >&6; }
14024if ${pgac_cv_c_typeof+:} false; then :
14025  $as_echo_n "(cached) " >&6
14026else
14027  pgac_cv_c_typeof=no
14028for pgac_kw in typeof __typeof__ decltype; do
14029  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14030/* end confdefs.h.  */
14031
14032int
14033main ()
14034{
14035int x = 0;
14036$pgac_kw(x) y;
14037y = x;
14038return y;
14039  ;
14040  return 0;
14041}
14042_ACEOF
14043if ac_fn_c_try_compile "$LINENO"; then :
14044  pgac_cv_c_typeof=$pgac_kw
14045fi
14046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14047  test "$pgac_cv_c_typeof" != no && break
14048done
14049fi
14050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
14051$as_echo "$pgac_cv_c_typeof" >&6; }
14052if test "$pgac_cv_c_typeof" != no; then
14053
14054$as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
14055
14056  if test "$pgac_cv_c_typeof" != typeof; then
14057
14058cat >>confdefs.h <<_ACEOF
14059#define typeof $pgac_cv_c_typeof
14060_ACEOF
14061
14062  fi
14063fi
14064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
14065$as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
14066if ${pgac_cv__types_compatible+:} false; then :
14067  $as_echo_n "(cached) " >&6
14068else
14069  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14070/* end confdefs.h.  */
14071
14072int
14073main ()
14074{
14075 int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
14076  ;
14077  return 0;
14078}
14079_ACEOF
14080if ac_fn_c_try_compile "$LINENO"; then :
14081  pgac_cv__types_compatible=yes
14082else
14083  pgac_cv__types_compatible=no
14084fi
14085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14086fi
14087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
14088$as_echo "$pgac_cv__types_compatible" >&6; }
14089if test x"$pgac_cv__types_compatible" = xyes ; then
14090
14091$as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
14092
14093fi
14094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
14095$as_echo_n "checking for __builtin_constant_p... " >&6; }
14096if ${pgac_cv__builtin_constant_p+:} false; then :
14097  $as_echo_n "(cached) " >&6
14098else
14099  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14100/* end confdefs.h.  */
14101static int x;
14102  static int y[__builtin_constant_p(x) ? x : 1];
14103  static int z[__builtin_constant_p("string literal") ? 1 : x];
14104
14105
14106_ACEOF
14107if ac_fn_c_try_compile "$LINENO"; then :
14108  pgac_cv__builtin_constant_p=yes
14109else
14110  pgac_cv__builtin_constant_p=no
14111fi
14112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14113fi
14114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
14115$as_echo "$pgac_cv__builtin_constant_p" >&6; }
14116if test x"$pgac_cv__builtin_constant_p" = xyes ; then
14117
14118$as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
14119
14120fi
14121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
14122$as_echo_n "checking for __builtin_unreachable... " >&6; }
14123if ${pgac_cv__builtin_unreachable+:} false; then :
14124  $as_echo_n "(cached) " >&6
14125else
14126  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14127/* end confdefs.h.  */
14128
14129int
14130main ()
14131{
14132__builtin_unreachable();
14133  ;
14134  return 0;
14135}
14136_ACEOF
14137if ac_fn_c_try_link "$LINENO"; then :
14138  pgac_cv__builtin_unreachable=yes
14139else
14140  pgac_cv__builtin_unreachable=no
14141fi
14142rm -f core conftest.err conftest.$ac_objext \
14143    conftest$ac_exeext conftest.$ac_ext
14144fi
14145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
14146$as_echo "$pgac_cv__builtin_unreachable" >&6; }
14147if test x"$pgac_cv__builtin_unreachable" = xyes ; then
14148
14149$as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
14150
14151fi
14152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
14153$as_echo_n "checking for computed goto support... " >&6; }
14154if ${pgac_cv_computed_goto+:} false; then :
14155  $as_echo_n "(cached) " >&6
14156else
14157  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14158/* end confdefs.h.  */
14159
14160int
14161main ()
14162{
14163void *labeladdrs[] = {&&my_label};
14164  goto *labeladdrs[0];
14165  my_label:
14166  return 1;
14167
14168  ;
14169  return 0;
14170}
14171_ACEOF
14172if ac_fn_c_try_compile "$LINENO"; then :
14173  pgac_cv_computed_goto=yes
14174else
14175  pgac_cv_computed_goto=no
14176fi
14177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14178fi
14179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
14180$as_echo "$pgac_cv_computed_goto" >&6; }
14181if test x"$pgac_cv_computed_goto" = xyes ; then
14182
14183$as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
14184
14185fi
14186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
14187$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
14188if ${ac_cv_struct_tm+:} false; then :
14189  $as_echo_n "(cached) " >&6
14190else
14191  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14192/* end confdefs.h.  */
14193#include <sys/types.h>
14194#include <time.h>
14195
14196int
14197main ()
14198{
14199struct tm tm;
14200				     int *p = &tm.tm_sec;
14201				     return !p;
14202  ;
14203  return 0;
14204}
14205_ACEOF
14206if ac_fn_c_try_compile "$LINENO"; then :
14207  ac_cv_struct_tm=time.h
14208else
14209  ac_cv_struct_tm=sys/time.h
14210fi
14211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14212fi
14213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
14214$as_echo "$ac_cv_struct_tm" >&6; }
14215if test $ac_cv_struct_tm = sys/time.h; then
14216
14217$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
14218
14219fi
14220
14221ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14222#include <$ac_cv_struct_tm>
14223
14224"
14225if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
14226
14227cat >>confdefs.h <<_ACEOF
14228#define HAVE_STRUCT_TM_TM_ZONE 1
14229_ACEOF
14230
14231
14232fi
14233
14234if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14235
14236$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
14237
14238fi
14239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14240$as_echo_n "checking for tzname... " >&6; }
14241if ${ac_cv_var_tzname+:} false; then :
14242  $as_echo_n "(cached) " >&6
14243else
14244  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14245/* end confdefs.h.  */
14246#include <stdlib.h>
14247#include <time.h>
14248#ifndef tzname /* For SGI.  */
14249extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
14250#endif
14251
14252int
14253main ()
14254{
14255atoi(*tzname);
14256  ;
14257  return 0;
14258}
14259_ACEOF
14260if ac_fn_c_try_link "$LINENO"; then :
14261  ac_cv_var_tzname=yes
14262else
14263  ac_cv_var_tzname=no
14264fi
14265rm -f core conftest.err conftest.$ac_objext \
14266    conftest$ac_exeext conftest.$ac_ext
14267fi
14268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14269$as_echo "$ac_cv_var_tzname" >&6; }
14270if test $ac_cv_var_tzname = yes; then
14271
14272$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
14273
14274fi
14275
14276ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14277#ifdef HAVE_SYS_IPC_H
14278#include <sys/ipc.h>
14279#endif
14280#ifdef HAVE_SYS_SEM_H
14281#include <sys/sem.h>
14282#endif
14283"
14284if test "x$ac_cv_type_union_semun" = xyes; then :
14285
14286cat >>confdefs.h <<_ACEOF
14287#define HAVE_UNION_SEMUN 1
14288_ACEOF
14289
14290
14291fi
14292
14293ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
14294#ifdef HAVE_SYS_UN_H
14295#include <sys/un.h>
14296#endif
14297
14298"
14299if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
14300
14301$as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
14302
14303fi
14304
14305ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
14306#include <sys/socket.h>
14307
14308"
14309if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
14310
14311cat >>confdefs.h <<_ACEOF
14312#define HAVE_STRUCT_SOCKADDR_STORAGE 1
14313_ACEOF
14314
14315
14316fi
14317
14318ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
14319#include <sys/socket.h>
14320
14321"
14322if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
14323
14324cat >>confdefs.h <<_ACEOF
14325#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
14326_ACEOF
14327
14328
14329fi
14330ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
14331#include <sys/socket.h>
14332
14333"
14334if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
14335
14336cat >>confdefs.h <<_ACEOF
14337#define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
14338_ACEOF
14339
14340
14341fi
14342ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
14343#include <sys/socket.h>
14344
14345"
14346if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
14347
14348cat >>confdefs.h <<_ACEOF
14349#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
14350_ACEOF
14351
14352
14353fi
14354ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
14355#include <sys/socket.h>
14356
14357"
14358if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
14359
14360cat >>confdefs.h <<_ACEOF
14361#define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
14362_ACEOF
14363
14364
14365fi
14366ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14367#include <sys/socket.h>
14368
14369"
14370if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14371
14372cat >>confdefs.h <<_ACEOF
14373#define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14374_ACEOF
14375
14376
14377fi
14378
14379ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
14380#include <sys/socket.h>
14381#include <netdb.h>
14382
14383"
14384if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
14385
14386cat >>confdefs.h <<_ACEOF
14387#define HAVE_STRUCT_ADDRINFO 1
14388_ACEOF
14389
14390
14391fi
14392
14393
14394  ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
14395if test "x$ac_cv_type_intptr_t" = xyes; then :
14396
14397$as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
14398
14399else
14400  for ac_type in 'int' 'long int' 'long long int'; do
14401       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14402/* end confdefs.h.  */
14403$ac_includes_default
14404int
14405main ()
14406{
14407static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14408test_array [0] = 0;
14409return test_array [0];
14410
14411  ;
14412  return 0;
14413}
14414_ACEOF
14415if ac_fn_c_try_compile "$LINENO"; then :
14416
14417cat >>confdefs.h <<_ACEOF
14418#define intptr_t $ac_type
14419_ACEOF
14420
14421	  ac_type=
14422fi
14423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14424       test -z "$ac_type" && break
14425     done
14426fi
14427
14428
14429
14430  ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
14431if test "x$ac_cv_type_uintptr_t" = xyes; then :
14432
14433$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
14434
14435else
14436  for ac_type in 'unsigned int' 'unsigned long int' \
14437	'unsigned long long int'; do
14438       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14439/* end confdefs.h.  */
14440$ac_includes_default
14441int
14442main ()
14443{
14444static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14445test_array [0] = 0;
14446return test_array [0];
14447
14448  ;
14449  return 0;
14450}
14451_ACEOF
14452if ac_fn_c_try_compile "$LINENO"; then :
14453
14454cat >>confdefs.h <<_ACEOF
14455#define uintptr_t $ac_type
14456_ACEOF
14457
14458	  ac_type=
14459fi
14460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14461       test -z "$ac_type" && break
14462     done
14463fi
14464
14465
14466
14467  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
14468$as_echo_n "checking for unsigned long long int... " >&6; }
14469if ${ac_cv_type_unsigned_long_long_int+:} false; then :
14470  $as_echo_n "(cached) " >&6
14471else
14472  ac_cv_type_unsigned_long_long_int=yes
14473     if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14474       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14475/* end confdefs.h.  */
14476
14477  /* For now, do not test the preprocessor; as of 2007 there are too many
14478	 implementations with broken preprocessors.  Perhaps this can
14479	 be revisited in 2012.  In the meantime, code should not expect
14480	 #if to work with literals wider than 32 bits.  */
14481      /* Test literals.  */
14482      long long int ll = 9223372036854775807ll;
14483      long long int nll = -9223372036854775807LL;
14484      unsigned long long int ull = 18446744073709551615ULL;
14485      /* Test constant expressions.   */
14486      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
14487		     ? 1 : -1)];
14488      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
14489		     ? 1 : -1)];
14490      int i = 63;
14491int
14492main ()
14493{
14494/* Test availability of runtime routines for shift and division.  */
14495      long long int llmax = 9223372036854775807ll;
14496      unsigned long long int ullmax = 18446744073709551615ull;
14497      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
14498	      | (llmax / ll) | (llmax % ll)
14499	      | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
14500	      | (ullmax / ull) | (ullmax % ull));
14501  ;
14502  return 0;
14503}
14504
14505_ACEOF
14506if ac_fn_c_try_link "$LINENO"; then :
14507
14508else
14509  ac_cv_type_unsigned_long_long_int=no
14510fi
14511rm -f core conftest.err conftest.$ac_objext \
14512    conftest$ac_exeext conftest.$ac_ext
14513     fi
14514fi
14515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
14516$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
14517  if test $ac_cv_type_unsigned_long_long_int = yes; then
14518
14519$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
14520
14521  fi
14522
14523
14524
14525  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
14526$as_echo_n "checking for long long int... " >&6; }
14527if ${ac_cv_type_long_long_int+:} false; then :
14528  $as_echo_n "(cached) " >&6
14529else
14530  ac_cv_type_long_long_int=yes
14531      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14532	ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
14533	if test $ac_cv_type_long_long_int = yes; then
14534	  	  	  	  if test "$cross_compiling" = yes; then :
14535  :
14536else
14537  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14538/* end confdefs.h.  */
14539#include <limits.h>
14540		 #ifndef LLONG_MAX
14541		 # define HALF \
14542			  (1LL << (sizeof (long long int) * CHAR_BIT - 2))
14543		 # define LLONG_MAX (HALF - 1 + HALF)
14544		 #endif
14545int
14546main ()
14547{
14548long long int n = 1;
14549		 int i;
14550		 for (i = 0; ; i++)
14551		   {
14552		     long long int m = n << i;
14553		     if (m >> i != n)
14554		       return 1;
14555		     if (LLONG_MAX / 2 < m)
14556		       break;
14557		   }
14558		 return 0;
14559  ;
14560  return 0;
14561}
14562_ACEOF
14563if ac_fn_c_try_run "$LINENO"; then :
14564
14565else
14566  ac_cv_type_long_long_int=no
14567fi
14568rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14569  conftest.$ac_objext conftest.beam conftest.$ac_ext
14570fi
14571
14572	fi
14573      fi
14574fi
14575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
14576$as_echo "$ac_cv_type_long_long_int" >&6; }
14577  if test $ac_cv_type_long_long_int = yes; then
14578
14579$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
14580
14581  fi
14582
14583
14584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
14585$as_echo_n "checking for locale_t... " >&6; }
14586if ${pgac_cv_type_locale_t+:} false; then :
14587  $as_echo_n "(cached) " >&6
14588else
14589  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14590/* end confdefs.h.  */
14591#include <locale.h>
14592locale_t x;
14593int
14594main ()
14595{
14596
14597  ;
14598  return 0;
14599}
14600_ACEOF
14601if ac_fn_c_try_compile "$LINENO"; then :
14602  pgac_cv_type_locale_t=yes
14603else
14604  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14605/* end confdefs.h.  */
14606#include <xlocale.h>
14607locale_t x;
14608int
14609main ()
14610{
14611
14612  ;
14613  return 0;
14614}
14615_ACEOF
14616if ac_fn_c_try_compile "$LINENO"; then :
14617  pgac_cv_type_locale_t='yes (in xlocale.h)'
14618else
14619  pgac_cv_type_locale_t=no
14620fi
14621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14622fi
14623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14624fi
14625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
14626$as_echo "$pgac_cv_type_locale_t" >&6; }
14627if test "$pgac_cv_type_locale_t" != no; then
14628
14629$as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
14630
14631fi
14632if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
14633
14634$as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
14635
14636fi
14637
14638# MSVC doesn't cope well with defining restrict to __restrict, the
14639# spelling it understands, because it conflicts with
14640# __declspec(restrict). Therefore we define pg_restrict to the
14641# appropriate definition, which presumably won't conflict.
14642#
14643# Allow platforms with buggy compilers to force restrict to not be
14644# used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
14645# template.
14646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14647$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
14648if ${ac_cv_c_restrict+:} false; then :
14649  $as_echo_n "(cached) " >&6
14650else
14651  ac_cv_c_restrict=no
14652   # The order here caters to the fact that C++ does not require restrict.
14653   for ac_kw in __restrict __restrict__ _Restrict restrict; do
14654     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14655/* end confdefs.h.  */
14656typedef int * int_ptr;
14657	int foo (int_ptr $ac_kw ip) {
14658	return ip[0];
14659       }
14660int
14661main ()
14662{
14663int s[1];
14664	int * $ac_kw t = s;
14665	t[0] = 0;
14666	return foo(t)
14667  ;
14668  return 0;
14669}
14670_ACEOF
14671if ac_fn_c_try_compile "$LINENO"; then :
14672  ac_cv_c_restrict=$ac_kw
14673fi
14674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14675     test "$ac_cv_c_restrict" != no && break
14676   done
14677
14678fi
14679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14680$as_echo "$ac_cv_c_restrict" >&6; }
14681
14682 case $ac_cv_c_restrict in
14683   restrict) ;;
14684   no) $as_echo "#define restrict /**/" >>confdefs.h
14685 ;;
14686   *)  cat >>confdefs.h <<_ACEOF
14687#define restrict $ac_cv_c_restrict
14688_ACEOF
14689 ;;
14690 esac
14691
14692if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
14693  pg_restrict=""
14694else
14695  pg_restrict="$ac_cv_c_restrict"
14696fi
14697
14698cat >>confdefs.h <<_ACEOF
14699#define pg_restrict $pg_restrict
14700_ACEOF
14701
14702
14703ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
14704#include <sys/param.h>
14705#ifdef HAVE_SYS_UCRED_H
14706#include <sys/ucred.h>
14707#endif
14708"
14709if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
14710
14711cat >>confdefs.h <<_ACEOF
14712#define HAVE_STRUCT_CMSGCRED 1
14713_ACEOF
14714
14715
14716fi
14717
14718
14719ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
14720#include <getopt.h>
14721#endif
14722"
14723if test "x$ac_cv_type_struct_option" = xyes; then :
14724
14725cat >>confdefs.h <<_ACEOF
14726#define HAVE_STRUCT_OPTION 1
14727_ACEOF
14728
14729
14730fi
14731
14732
14733if test "$with_zlib" = yes; then
14734  # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
14735  # did not).  While we could work around the lack of z_streamp, it
14736  # seems unwise to encourage people to use such old zlib versions...
14737  ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
14738"
14739if test "x$ac_cv_type_z_streamp" = xyes; then :
14740
14741else
14742  as_fn_error $? "zlib version is too old
14743Use --without-zlib to disable zlib support." "$LINENO" 5
14744fi
14745
14746fi
14747
14748case $host_cpu in
14749  x86_64)
14750    # On x86_64, check if we can compile a popcntq instruction
14751    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports x86_64 popcntq" >&5
14752$as_echo_n "checking whether assembler supports x86_64 popcntq... " >&6; }
14753if ${pgac_cv_have_x86_64_popcntq+:} false; then :
14754  $as_echo_n "(cached) " >&6
14755else
14756  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14757/* end confdefs.h.  */
14758
14759int
14760main ()
14761{
14762long long x = 1; long long r;
14763	 __asm__ __volatile__ (" popcntq %1,%0\n" : "=q"(r) : "rm"(x));
14764  ;
14765  return 0;
14766}
14767_ACEOF
14768if ac_fn_c_try_compile "$LINENO"; then :
14769  pgac_cv_have_x86_64_popcntq=yes
14770else
14771  pgac_cv_have_x86_64_popcntq=no
14772fi
14773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14774fi
14775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_x86_64_popcntq" >&5
14776$as_echo "$pgac_cv_have_x86_64_popcntq" >&6; }
14777    if test x"$pgac_cv_have_x86_64_popcntq" = xyes ; then
14778
14779$as_echo "#define HAVE_X86_64_POPCNTQ 1" >>confdefs.h
14780
14781    fi
14782  ;;
14783  ppc*|powerpc*)
14784    # On PPC, check if assembler supports LWARX instruction's mutex hint bit
14785    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
14786$as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
14787if ${pgac_cv_have_ppc_mutex_hint+:} false; then :
14788  $as_echo_n "(cached) " >&6
14789else
14790  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14791/* end confdefs.h.  */
14792
14793int
14794main ()
14795{
14796int a = 0; int *p = &a; int r;
14797	 __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
14798  ;
14799  return 0;
14800}
14801_ACEOF
14802if ac_fn_c_try_compile "$LINENO"; then :
14803  pgac_cv_have_ppc_mutex_hint=yes
14804else
14805  pgac_cv_have_ppc_mutex_hint=no
14806fi
14807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14808fi
14809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
14810$as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
14811    if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
14812
14813$as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
14814
14815    fi
14816  ;;
14817esac
14818
14819# Check largefile support.  You might think this is a system service not a
14820# compiler characteristic, but you'd be wrong.  We must check this before
14821# probing existence of related functions such as fseeko, since the largefile
14822# defines can affect what is generated for that.
14823if test "$PORTNAME" != "win32"; then
14824   # Check whether --enable-largefile was given.
14825if test "${enable_largefile+set}" = set; then :
14826  enableval=$enable_largefile;
14827fi
14828
14829if test "$enable_largefile" != no; then
14830
14831  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
14832$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
14833if ${ac_cv_sys_largefile_CC+:} false; then :
14834  $as_echo_n "(cached) " >&6
14835else
14836  ac_cv_sys_largefile_CC=no
14837     if test "$GCC" != yes; then
14838       ac_save_CC=$CC
14839       while :; do
14840	 # IRIX 6.2 and later do not support large files by default,
14841	 # so use the C compiler's -n32 option if that helps.
14842	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14843/* end confdefs.h.  */
14844#include <sys/types.h>
14845 /* Check that off_t can represent 2**63 - 1 correctly.
14846    We can't simply define LARGE_OFF_T to be 9223372036854775807,
14847    since some C++ compilers masquerading as C compilers
14848    incorrectly reject 9223372036854775807.  */
14849#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14850  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14851		       && LARGE_OFF_T % 2147483647 == 1)
14852		      ? 1 : -1];
14853int
14854main ()
14855{
14856
14857  ;
14858  return 0;
14859}
14860_ACEOF
14861	 if ac_fn_c_try_compile "$LINENO"; then :
14862  break
14863fi
14864rm -f core conftest.err conftest.$ac_objext
14865	 CC="$CC -n32"
14866	 if ac_fn_c_try_compile "$LINENO"; then :
14867  ac_cv_sys_largefile_CC=' -n32'; break
14868fi
14869rm -f core conftest.err conftest.$ac_objext
14870	 break
14871       done
14872       CC=$ac_save_CC
14873       rm -f conftest.$ac_ext
14874    fi
14875fi
14876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
14877$as_echo "$ac_cv_sys_largefile_CC" >&6; }
14878  if test "$ac_cv_sys_largefile_CC" != no; then
14879    CC=$CC$ac_cv_sys_largefile_CC
14880  fi
14881
14882  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14883$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
14884if ${ac_cv_sys_file_offset_bits+:} false; then :
14885  $as_echo_n "(cached) " >&6
14886else
14887  while :; do
14888  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14889/* end confdefs.h.  */
14890#include <sys/types.h>
14891 /* Check that off_t can represent 2**63 - 1 correctly.
14892    We can't simply define LARGE_OFF_T to be 9223372036854775807,
14893    since some C++ compilers masquerading as C compilers
14894    incorrectly reject 9223372036854775807.  */
14895#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14896  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14897		       && LARGE_OFF_T % 2147483647 == 1)
14898		      ? 1 : -1];
14899int
14900main ()
14901{
14902
14903  ;
14904  return 0;
14905}
14906_ACEOF
14907if ac_fn_c_try_compile "$LINENO"; then :
14908  ac_cv_sys_file_offset_bits=no; break
14909fi
14910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14911  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14912/* end confdefs.h.  */
14913#define _FILE_OFFSET_BITS 64
14914#include <sys/types.h>
14915 /* Check that off_t can represent 2**63 - 1 correctly.
14916    We can't simply define LARGE_OFF_T to be 9223372036854775807,
14917    since some C++ compilers masquerading as C compilers
14918    incorrectly reject 9223372036854775807.  */
14919#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14920  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14921		       && LARGE_OFF_T % 2147483647 == 1)
14922		      ? 1 : -1];
14923int
14924main ()
14925{
14926
14927  ;
14928  return 0;
14929}
14930_ACEOF
14931if ac_fn_c_try_compile "$LINENO"; then :
14932  ac_cv_sys_file_offset_bits=64; break
14933fi
14934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14935  ac_cv_sys_file_offset_bits=unknown
14936  break
14937done
14938fi
14939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
14940$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
14941case $ac_cv_sys_file_offset_bits in #(
14942  no | unknown) ;;
14943  *)
14944cat >>confdefs.h <<_ACEOF
14945#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14946_ACEOF
14947;;
14948esac
14949rm -rf conftest*
14950  if test $ac_cv_sys_file_offset_bits = unknown; then
14951    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
14952$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
14953if ${ac_cv_sys_large_files+:} false; then :
14954  $as_echo_n "(cached) " >&6
14955else
14956  while :; do
14957  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14958/* end confdefs.h.  */
14959#include <sys/types.h>
14960 /* Check that off_t can represent 2**63 - 1 correctly.
14961    We can't simply define LARGE_OFF_T to be 9223372036854775807,
14962    since some C++ compilers masquerading as C compilers
14963    incorrectly reject 9223372036854775807.  */
14964#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14965  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14966		       && LARGE_OFF_T % 2147483647 == 1)
14967		      ? 1 : -1];
14968int
14969main ()
14970{
14971
14972  ;
14973  return 0;
14974}
14975_ACEOF
14976if ac_fn_c_try_compile "$LINENO"; then :
14977  ac_cv_sys_large_files=no; break
14978fi
14979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14980  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14981/* end confdefs.h.  */
14982#define _LARGE_FILES 1
14983#include <sys/types.h>
14984 /* Check that off_t can represent 2**63 - 1 correctly.
14985    We can't simply define LARGE_OFF_T to be 9223372036854775807,
14986    since some C++ compilers masquerading as C compilers
14987    incorrectly reject 9223372036854775807.  */
14988#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14989  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14990		       && LARGE_OFF_T % 2147483647 == 1)
14991		      ? 1 : -1];
14992int
14993main ()
14994{
14995
14996  ;
14997  return 0;
14998}
14999_ACEOF
15000if ac_fn_c_try_compile "$LINENO"; then :
15001  ac_cv_sys_large_files=1; break
15002fi
15003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15004  ac_cv_sys_large_files=unknown
15005  break
15006done
15007fi
15008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15009$as_echo "$ac_cv_sys_large_files" >&6; }
15010case $ac_cv_sys_large_files in #(
15011  no | unknown) ;;
15012  *)
15013cat >>confdefs.h <<_ACEOF
15014#define _LARGE_FILES $ac_cv_sys_large_files
15015_ACEOF
15016;;
15017esac
15018rm -rf conftest*
15019  fi
15020
15021
15022fi
15023
15024
15025fi
15026
15027# The cast to long int works around a bug in the HP C Compiler
15028# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15029# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15030# This bug is HP SR number 8606223364.
15031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
15032$as_echo_n "checking size of off_t... " >&6; }
15033if ${ac_cv_sizeof_off_t+:} false; then :
15034  $as_echo_n "(cached) " >&6
15035else
15036  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
15037
15038else
15039  if test "$ac_cv_type_off_t" = yes; then
15040     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15041$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15042as_fn_error 77 "cannot compute sizeof (off_t)
15043See \`config.log' for more details" "$LINENO" 5; }
15044   else
15045     ac_cv_sizeof_off_t=0
15046   fi
15047fi
15048
15049fi
15050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
15051$as_echo "$ac_cv_sizeof_off_t" >&6; }
15052
15053
15054
15055cat >>confdefs.h <<_ACEOF
15056#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
15057_ACEOF
15058
15059
15060
15061# If we don't have largefile support, can't handle segsize >= 2GB.
15062if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
15063   as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
15064fi
15065
15066# The cast to long int works around a bug in the HP C Compiler
15067# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15068# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15069# This bug is HP SR number 8606223364.
15070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
15071$as_echo_n "checking size of bool... " >&6; }
15072if ${ac_cv_sizeof_bool+:} false; then :
15073  $as_echo_n "(cached) " >&6
15074else
15075  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool"        "#ifdef HAVE_STDBOOL_H
15076#include <stdbool.h>
15077#endif
15078"; then :
15079
15080else
15081  if test "$ac_cv_type_bool" = yes; then
15082     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15083$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15084as_fn_error 77 "cannot compute sizeof (bool)
15085See \`config.log' for more details" "$LINENO" 5; }
15086   else
15087     ac_cv_sizeof_bool=0
15088   fi
15089fi
15090
15091fi
15092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
15093$as_echo "$ac_cv_sizeof_bool" >&6; }
15094
15095
15096
15097cat >>confdefs.h <<_ACEOF
15098#define SIZEOF_BOOL $ac_cv_sizeof_bool
15099_ACEOF
15100
15101
15102
15103
15104##
15105## Functions, global variables
15106##
15107
15108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
15109$as_echo_n "checking for int timezone... " >&6; }
15110if ${pgac_cv_var_int_timezone+:} false; then :
15111  $as_echo_n "(cached) " >&6
15112else
15113  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15114/* end confdefs.h.  */
15115#include <time.h>
15116int res;
15117int
15118main ()
15119{
15120#ifndef __CYGWIN__
15121res = timezone / 60;
15122#else
15123res = _timezone / 60;
15124#endif
15125  ;
15126  return 0;
15127}
15128_ACEOF
15129if ac_fn_c_try_link "$LINENO"; then :
15130  pgac_cv_var_int_timezone=yes
15131else
15132  pgac_cv_var_int_timezone=no
15133fi
15134rm -f core conftest.err conftest.$ac_objext \
15135    conftest$ac_exeext conftest.$ac_ext
15136fi
15137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
15138$as_echo "$pgac_cv_var_int_timezone" >&6; }
15139if test x"$pgac_cv_var_int_timezone" = xyes ; then
15140
15141$as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
15142
15143fi
15144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
15145$as_echo_n "checking types of arguments for accept()... " >&6; }
15146 if ${ac_cv_func_accept_return+:} false; then :
15147  $as_echo_n "(cached) " >&6
15148else
15149   if ${ac_cv_func_accept_arg1+:} false; then :
15150  $as_echo_n "(cached) " >&6
15151else
15152    if ${ac_cv_func_accept_arg2+:} false; then :
15153  $as_echo_n "(cached) " >&6
15154else
15155     if ${ac_cv_func_accept_arg3+:} false; then :
15156  $as_echo_n "(cached) " >&6
15157else
15158      for ac_cv_func_accept_return in 'int' 'SOCKET WSAAPI' 'unsigned int PASCAL'; do
15159      for ac_cv_func_accept_arg1 in 'int' 'SOCKET' 'unsigned int'; do
15160       for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
15161        for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
15162         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15163/* end confdefs.h.  */
15164#include <sys/types.h>
15165#include <sys/socket.h>
15166extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
15167_ACEOF
15168if ac_fn_c_try_compile "$LINENO"; then :
15169  ac_not_found=no; break 4
15170else
15171  ac_not_found=yes
15172fi
15173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15174       done
15175      done
15176     done
15177    done
15178    if test "$ac_not_found" = yes; then
15179      as_fn_error $? "could not determine argument types" "$LINENO" 5
15180    fi
15181    if test "$ac_cv_func_accept_arg3" = "void"; then
15182      ac_cv_func_accept_arg3=int
15183    fi
15184
15185fi
15186
15187fi
15188
15189fi
15190
15191fi
15192 { $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
15193$as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
15194
15195cat >>confdefs.h <<_ACEOF
15196#define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
15197_ACEOF
15198
15199
15200cat >>confdefs.h <<_ACEOF
15201#define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
15202_ACEOF
15203
15204
15205cat >>confdefs.h <<_ACEOF
15206#define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
15207_ACEOF
15208
15209
15210cat >>confdefs.h <<_ACEOF
15211#define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
15212_ACEOF
15213
15214
15215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
15216$as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
15217if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
15218  $as_echo_n "(cached) " >&6
15219else
15220  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15221/* end confdefs.h.  */
15222#include <sys/time.h>
15223int
15224main ()
15225{
15226struct timeval *tp;
15227struct timezone *tzp;
15228gettimeofday(tp,tzp);
15229  ;
15230  return 0;
15231}
15232_ACEOF
15233if ac_fn_c_try_compile "$LINENO"; then :
15234  pgac_cv_func_gettimeofday_1arg=no
15235else
15236  pgac_cv_func_gettimeofday_1arg=yes
15237fi
15238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15239fi
15240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
15241$as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
15242if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
15243
15244$as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
15245
15246fi
15247
15248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
15249$as_echo_n "checking for wcstombs_l declaration... " >&6; }
15250if ${pgac_cv_func_wcstombs_l+:} false; then :
15251  $as_echo_n "(cached) " >&6
15252else
15253  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15254/* end confdefs.h.  */
15255#include <stdlib.h>
15256#include <locale.h>
15257int
15258main ()
15259{
15260#ifndef wcstombs_l
15261(void) wcstombs_l;
15262#endif
15263  ;
15264  return 0;
15265}
15266_ACEOF
15267if ac_fn_c_try_compile "$LINENO"; then :
15268  pgac_cv_func_wcstombs_l='yes'
15269else
15270  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15271/* end confdefs.h.  */
15272#include <stdlib.h>
15273#include <locale.h>
15274#include <xlocale.h>
15275int
15276main ()
15277{
15278#ifndef wcstombs_l
15279(void) wcstombs_l;
15280#endif
15281  ;
15282  return 0;
15283}
15284_ACEOF
15285if ac_fn_c_try_compile "$LINENO"; then :
15286  pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
15287else
15288  pgac_cv_func_wcstombs_l='no'
15289fi
15290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15291fi
15292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15293fi
15294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
15295$as_echo "$pgac_cv_func_wcstombs_l" >&6; }
15296if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
15297
15298$as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
15299
15300fi
15301
15302# Some versions of libedit contain strlcpy(), setproctitle(), and other
15303# symbols that that library has no business exposing to the world.  Pending
15304# acquisition of a clue by those developers, ignore libedit (including its
15305# possible alias of libreadline) while checking for everything else.
15306LIBS_including_readline="$LIBS"
15307LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15308
15309for ac_func in cbrt clock_gettime copyfile fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate ppoll pstat pthread_is_threaded_np readlink setproctitle setproctitle_fast setsid shm_open strchrnul strsignal symlink sync_file_range uselocale utime utimes wcstombs_l
15310do :
15311  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15312ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15313if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15314  cat >>confdefs.h <<_ACEOF
15315#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15316_ACEOF
15317
15318fi
15319done
15320
15321
15322# These typically are compiler builtins, for which AC_CHECK_FUNCS fails.
15323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
15324$as_echo_n "checking for __builtin_bswap16... " >&6; }
15325if ${pgac_cv__builtin_bswap16+:} false; then :
15326  $as_echo_n "(cached) " >&6
15327else
15328  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15329/* end confdefs.h.  */
15330
15331int
15332call__builtin_bswap16(int x)
15333{
15334    return __builtin_bswap16(x);
15335}
15336int
15337main ()
15338{
15339
15340  ;
15341  return 0;
15342}
15343_ACEOF
15344if ac_fn_c_try_link "$LINENO"; then :
15345  pgac_cv__builtin_bswap16=yes
15346else
15347  pgac_cv__builtin_bswap16=no
15348fi
15349rm -f core conftest.err conftest.$ac_objext \
15350    conftest$ac_exeext conftest.$ac_ext
15351fi
15352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
15353$as_echo "$pgac_cv__builtin_bswap16" >&6; }
15354if test x"${pgac_cv__builtin_bswap16}" = xyes ; then
15355
15356cat >>confdefs.h <<_ACEOF
15357#define HAVE__BUILTIN_BSWAP16 1
15358_ACEOF
15359
15360fi
15361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
15362$as_echo_n "checking for __builtin_bswap32... " >&6; }
15363if ${pgac_cv__builtin_bswap32+:} false; then :
15364  $as_echo_n "(cached) " >&6
15365else
15366  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15367/* end confdefs.h.  */
15368
15369int
15370call__builtin_bswap32(int x)
15371{
15372    return __builtin_bswap32(x);
15373}
15374int
15375main ()
15376{
15377
15378  ;
15379  return 0;
15380}
15381_ACEOF
15382if ac_fn_c_try_link "$LINENO"; then :
15383  pgac_cv__builtin_bswap32=yes
15384else
15385  pgac_cv__builtin_bswap32=no
15386fi
15387rm -f core conftest.err conftest.$ac_objext \
15388    conftest$ac_exeext conftest.$ac_ext
15389fi
15390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
15391$as_echo "$pgac_cv__builtin_bswap32" >&6; }
15392if test x"${pgac_cv__builtin_bswap32}" = xyes ; then
15393
15394cat >>confdefs.h <<_ACEOF
15395#define HAVE__BUILTIN_BSWAP32 1
15396_ACEOF
15397
15398fi
15399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
15400$as_echo_n "checking for __builtin_bswap64... " >&6; }
15401if ${pgac_cv__builtin_bswap64+:} false; then :
15402  $as_echo_n "(cached) " >&6
15403else
15404  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15405/* end confdefs.h.  */
15406
15407int
15408call__builtin_bswap64(long int x)
15409{
15410    return __builtin_bswap64(x);
15411}
15412int
15413main ()
15414{
15415
15416  ;
15417  return 0;
15418}
15419_ACEOF
15420if ac_fn_c_try_link "$LINENO"; then :
15421  pgac_cv__builtin_bswap64=yes
15422else
15423  pgac_cv__builtin_bswap64=no
15424fi
15425rm -f core conftest.err conftest.$ac_objext \
15426    conftest$ac_exeext conftest.$ac_ext
15427fi
15428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
15429$as_echo "$pgac_cv__builtin_bswap64" >&6; }
15430if test x"${pgac_cv__builtin_bswap64}" = xyes ; then
15431
15432cat >>confdefs.h <<_ACEOF
15433#define HAVE__BUILTIN_BSWAP64 1
15434_ACEOF
15435
15436fi
15437# We assume that we needn't test all widths of these explicitly:
15438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_clz" >&5
15439$as_echo_n "checking for __builtin_clz... " >&6; }
15440if ${pgac_cv__builtin_clz+:} false; then :
15441  $as_echo_n "(cached) " >&6
15442else
15443  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15444/* end confdefs.h.  */
15445
15446int
15447call__builtin_clz(unsigned int x)
15448{
15449    return __builtin_clz(x);
15450}
15451int
15452main ()
15453{
15454
15455  ;
15456  return 0;
15457}
15458_ACEOF
15459if ac_fn_c_try_link "$LINENO"; then :
15460  pgac_cv__builtin_clz=yes
15461else
15462  pgac_cv__builtin_clz=no
15463fi
15464rm -f core conftest.err conftest.$ac_objext \
15465    conftest$ac_exeext conftest.$ac_ext
15466fi
15467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_clz" >&5
15468$as_echo "$pgac_cv__builtin_clz" >&6; }
15469if test x"${pgac_cv__builtin_clz}" = xyes ; then
15470
15471cat >>confdefs.h <<_ACEOF
15472#define HAVE__BUILTIN_CLZ 1
15473_ACEOF
15474
15475fi
15476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctz" >&5
15477$as_echo_n "checking for __builtin_ctz... " >&6; }
15478if ${pgac_cv__builtin_ctz+:} false; then :
15479  $as_echo_n "(cached) " >&6
15480else
15481  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15482/* end confdefs.h.  */
15483
15484int
15485call__builtin_ctz(unsigned int x)
15486{
15487    return __builtin_ctz(x);
15488}
15489int
15490main ()
15491{
15492
15493  ;
15494  return 0;
15495}
15496_ACEOF
15497if ac_fn_c_try_link "$LINENO"; then :
15498  pgac_cv__builtin_ctz=yes
15499else
15500  pgac_cv__builtin_ctz=no
15501fi
15502rm -f core conftest.err conftest.$ac_objext \
15503    conftest$ac_exeext conftest.$ac_ext
15504fi
15505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_ctz" >&5
15506$as_echo "$pgac_cv__builtin_ctz" >&6; }
15507if test x"${pgac_cv__builtin_ctz}" = xyes ; then
15508
15509cat >>confdefs.h <<_ACEOF
15510#define HAVE__BUILTIN_CTZ 1
15511_ACEOF
15512
15513fi
15514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
15515$as_echo_n "checking for __builtin_popcount... " >&6; }
15516if ${pgac_cv__builtin_popcount+:} false; then :
15517  $as_echo_n "(cached) " >&6
15518else
15519  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15520/* end confdefs.h.  */
15521
15522int
15523call__builtin_popcount(unsigned int x)
15524{
15525    return __builtin_popcount(x);
15526}
15527int
15528main ()
15529{
15530
15531  ;
15532  return 0;
15533}
15534_ACEOF
15535if ac_fn_c_try_link "$LINENO"; then :
15536  pgac_cv__builtin_popcount=yes
15537else
15538  pgac_cv__builtin_popcount=no
15539fi
15540rm -f core conftest.err conftest.$ac_objext \
15541    conftest$ac_exeext conftest.$ac_ext
15542fi
15543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_popcount" >&5
15544$as_echo "$pgac_cv__builtin_popcount" >&6; }
15545if test x"${pgac_cv__builtin_popcount}" = xyes ; then
15546
15547cat >>confdefs.h <<_ACEOF
15548#define HAVE__BUILTIN_POPCOUNT 1
15549_ACEOF
15550
15551fi
15552
15553ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
15554if test "x$ac_cv_func_fseeko" = xyes; then :
15555  $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15556
15557else
15558  case " $LIBOBJS " in
15559  *" fseeko.$ac_objext "* ) ;;
15560  *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
15561 ;;
15562esac
15563
15564fi
15565
15566
15567case $host_os in
15568	# NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
15569	# Mingw uses macros to access Win32 API calls
15570	netbsd*|mingw*)
15571
15572$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15573
15574		ac_cv_func_fseeko=yes;;
15575	*)
15576		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15577$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15578if ${ac_cv_sys_largefile_source+:} false; then :
15579  $as_echo_n "(cached) " >&6
15580else
15581  while :; do
15582  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15583/* end confdefs.h.  */
15584#include <sys/types.h> /* for off_t */
15585     #include <stdio.h>
15586int
15587main ()
15588{
15589int (*fp) (FILE *, off_t, int) = fseeko;
15590     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15591  ;
15592  return 0;
15593}
15594_ACEOF
15595if ac_fn_c_try_link "$LINENO"; then :
15596  ac_cv_sys_largefile_source=no; break
15597fi
15598rm -f core conftest.err conftest.$ac_objext \
15599    conftest$ac_exeext conftest.$ac_ext
15600  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15601/* end confdefs.h.  */
15602#define _LARGEFILE_SOURCE 1
15603#include <sys/types.h> /* for off_t */
15604     #include <stdio.h>
15605int
15606main ()
15607{
15608int (*fp) (FILE *, off_t, int) = fseeko;
15609     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15610  ;
15611  return 0;
15612}
15613_ACEOF
15614if ac_fn_c_try_link "$LINENO"; then :
15615  ac_cv_sys_largefile_source=1; break
15616fi
15617rm -f core conftest.err conftest.$ac_objext \
15618    conftest$ac_exeext conftest.$ac_ext
15619  ac_cv_sys_largefile_source=unknown
15620  break
15621done
15622fi
15623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15624$as_echo "$ac_cv_sys_largefile_source" >&6; }
15625case $ac_cv_sys_largefile_source in #(
15626  no | unknown) ;;
15627  *)
15628cat >>confdefs.h <<_ACEOF
15629#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15630_ACEOF
15631;;
15632esac
15633rm -rf conftest*
15634
15635# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15636# in glibc 2.1.3, but that breaks too many other things.
15637# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15638if test $ac_cv_sys_largefile_source != unknown; then
15639
15640$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15641
15642fi
15643;;
15644esac
15645
15646# posix_fadvise() is a no-op on Solaris, so don't incur function overhead
15647# by calling it, 2009-04-02
15648# http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
15649# The Clang compiler raises a warning for an undeclared identifier that matches
15650# a compiler builtin function.  All extant Clang versions are affected, as of
15651# Clang 3.6.0.  Test a builtin known to every version.  This problem affects the
15652# C and Objective C languages, but Clang does report an error under C++ and
15653# Objective C++.
15654#
15655# Passing -fno-builtin to the compiler would suppress this problem.  That
15656# strategy would have the advantage of being insensitive to stray warnings, but
15657# it would make tests less realistic.
15658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
15659$as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
15660if ${ac_cv_c_decl_report+:} false; then :
15661  $as_echo_n "(cached) " >&6
15662else
15663  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15664/* end confdefs.h.  */
15665
15666int
15667main ()
15668{
15669(void) strchr;
15670  ;
15671  return 0;
15672}
15673_ACEOF
15674if ac_fn_c_try_compile "$LINENO"; then :
15675  if test -s conftest.err; then :
15676      # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
15677    # valid AC_CHECK_DECL input.  No library function is consistently available
15678    # on freestanding implementations, so test against a dummy declaration.
15679    # Include always-available headers on the off chance that they somehow
15680    # elicit warnings.
15681    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15682/* end confdefs.h.  */
15683#include <float.h>
15684#include <limits.h>
15685#include <stdarg.h>
15686#include <stddef.h>
15687extern void ac_decl (int, char *);
15688int
15689main ()
15690{
15691#ifdef __cplusplus
15692  (void) ac_decl ((int) 0, (char *) 0);
15693  (void) ac_decl;
15694#else
15695  (void) ac_decl;
15696#endif
15697
15698  ;
15699  return 0;
15700}
15701_ACEOF
15702if ac_fn_c_try_compile "$LINENO"; then :
15703  if test -s conftest.err; then :
15704  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15705$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15706as_fn_error $? "cannot detect from compiler exit status or warnings
15707See \`config.log' for more details" "$LINENO" 5; }
15708else
15709  ac_cv_c_decl_report=warning
15710fi
15711else
15712  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15713$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15714as_fn_error $? "cannot compile a simple declaration test
15715See \`config.log' for more details" "$LINENO" 5; }
15716fi
15717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15718else
15719  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15720$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15721as_fn_error $? "compiler does not report undeclared identifiers
15722See \`config.log' for more details" "$LINENO" 5; }
15723fi
15724else
15725  ac_cv_c_decl_report=error
15726fi
15727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15728fi
15729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
15730$as_echo "$ac_cv_c_decl_report" >&6; }
15731
15732case $ac_cv_c_decl_report in
15733  warning) ac_c_decl_warn_flag=yes ;;
15734  *) ac_c_decl_warn_flag= ;;
15735esac
15736
15737if test "$PORTNAME" != "solaris"; then :
15738
15739for ac_func in posix_fadvise
15740do :
15741  ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
15742if test "x$ac_cv_func_posix_fadvise" = xyes; then :
15743  cat >>confdefs.h <<_ACEOF
15744#define HAVE_POSIX_FADVISE 1
15745_ACEOF
15746
15747fi
15748done
15749
15750ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
15751"
15752if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
15753  ac_have_decl=1
15754else
15755  ac_have_decl=0
15756fi
15757
15758cat >>confdefs.h <<_ACEOF
15759#define HAVE_DECL_POSIX_FADVISE $ac_have_decl
15760_ACEOF
15761
15762
15763fi # fi
15764
15765ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
15766"
15767if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
15768  ac_have_decl=1
15769else
15770  ac_have_decl=0
15771fi
15772
15773cat >>confdefs.h <<_ACEOF
15774#define HAVE_DECL_FDATASYNC $ac_have_decl
15775_ACEOF
15776
15777ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
15778if test "x$ac_cv_have_decl_strlcat" = xyes; then :
15779  ac_have_decl=1
15780else
15781  ac_have_decl=0
15782fi
15783
15784cat >>confdefs.h <<_ACEOF
15785#define HAVE_DECL_STRLCAT $ac_have_decl
15786_ACEOF
15787ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
15788if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
15789  ac_have_decl=1
15790else
15791  ac_have_decl=0
15792fi
15793
15794cat >>confdefs.h <<_ACEOF
15795#define HAVE_DECL_STRLCPY $ac_have_decl
15796_ACEOF
15797ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15798if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15799  ac_have_decl=1
15800else
15801  ac_have_decl=0
15802fi
15803
15804cat >>confdefs.h <<_ACEOF
15805#define HAVE_DECL_STRNLEN $ac_have_decl
15806_ACEOF
15807
15808# This is probably only present on macOS, but may as well check always
15809ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
15810"
15811if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
15812  ac_have_decl=1
15813else
15814  ac_have_decl=0
15815fi
15816
15817cat >>confdefs.h <<_ACEOF
15818#define HAVE_DECL_F_FULLFSYNC $ac_have_decl
15819_ACEOF
15820
15821
15822ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
15823"
15824if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
15825  ac_have_decl=1
15826else
15827  ac_have_decl=0
15828fi
15829
15830cat >>confdefs.h <<_ACEOF
15831#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
15832_ACEOF
15833ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
15834"
15835if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
15836  ac_have_decl=1
15837else
15838  ac_have_decl=0
15839fi
15840
15841cat >>confdefs.h <<_ACEOF
15842#define HAVE_DECL_RTLD_NOW $ac_have_decl
15843_ACEOF
15844
15845
15846ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
15847#include <netinet/in.h>
15848"
15849if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
15850
15851$as_echo "#define HAVE_IPV6 1" >>confdefs.h
15852
15853fi
15854
15855
15856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
15857$as_echo_n "checking for PS_STRINGS... " >&6; }
15858if ${pgac_cv_var_PS_STRINGS+:} false; then :
15859  $as_echo_n "(cached) " >&6
15860else
15861  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15862/* end confdefs.h.  */
15863#include <machine/vmparam.h>
15864#include <sys/exec.h>
15865
15866int
15867main ()
15868{
15869PS_STRINGS->ps_nargvstr = 1;
15870PS_STRINGS->ps_argvstr = "foo";
15871  ;
15872  return 0;
15873}
15874_ACEOF
15875if ac_fn_c_try_link "$LINENO"; then :
15876  pgac_cv_var_PS_STRINGS=yes
15877else
15878  pgac_cv_var_PS_STRINGS=no
15879fi
15880rm -f core conftest.err conftest.$ac_objext \
15881    conftest$ac_exeext conftest.$ac_ext
15882fi
15883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
15884$as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
15885if test "$pgac_cv_var_PS_STRINGS" = yes ; then
15886
15887$as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
15888
15889fi
15890
15891
15892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
15893$as_echo_n "checking for isinf... " >&6; }
15894if ${ac_cv_func_isinf+:} false; then :
15895  $as_echo_n "(cached) " >&6
15896else
15897  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15898/* end confdefs.h.  */
15899
15900#include <math.h>
15901double glob_double;
15902
15903int
15904main ()
15905{
15906return isinf(glob_double) ? 0 : 1;
15907  ;
15908  return 0;
15909}
15910_ACEOF
15911if ac_fn_c_try_link "$LINENO"; then :
15912  ac_cv_func_isinf=yes
15913else
15914  ac_cv_func_isinf=no
15915fi
15916rm -f core conftest.err conftest.$ac_objext \
15917    conftest$ac_exeext conftest.$ac_ext
15918fi
15919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
15920$as_echo "$ac_cv_func_isinf" >&6; }
15921
15922if test $ac_cv_func_isinf = yes ; then
15923
15924$as_echo "#define HAVE_ISINF 1" >>confdefs.h
15925
15926else
15927  case " $LIBOBJS " in
15928  *" isinf.$ac_objext "* ) ;;
15929  *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
15930 ;;
15931esac
15932
15933  # Look for a way to implement a substitute for isinf()
15934  for ac_func in fpclass fp_class fp_class_d class
15935do :
15936  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15937ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15938if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15939  cat >>confdefs.h <<_ACEOF
15940#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15941_ACEOF
15942 break
15943fi
15944done
15945
15946fi
15947
15948ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
15949if test "x$ac_cv_func_crypt" = xyes; then :
15950  $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
15951
15952else
15953  case " $LIBOBJS " in
15954  *" crypt.$ac_objext "* ) ;;
15955  *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
15956 ;;
15957esac
15958
15959fi
15960
15961ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
15962if test "x$ac_cv_func_dlopen" = xyes; then :
15963  $as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
15964
15965else
15966  case " $LIBOBJS " in
15967  *" dlopen.$ac_objext "* ) ;;
15968  *) LIBOBJS="$LIBOBJS dlopen.$ac_objext"
15969 ;;
15970esac
15971
15972fi
15973
15974ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
15975if test "x$ac_cv_func_fls" = xyes; then :
15976  $as_echo "#define HAVE_FLS 1" >>confdefs.h
15977
15978else
15979  case " $LIBOBJS " in
15980  *" fls.$ac_objext "* ) ;;
15981  *) LIBOBJS="$LIBOBJS fls.$ac_objext"
15982 ;;
15983esac
15984
15985fi
15986
15987ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
15988if test "x$ac_cv_func_getopt" = xyes; then :
15989  $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
15990
15991else
15992  case " $LIBOBJS " in
15993  *" getopt.$ac_objext "* ) ;;
15994  *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15995 ;;
15996esac
15997
15998fi
15999
16000ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
16001if test "x$ac_cv_func_getrusage" = xyes; then :
16002  $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
16003
16004else
16005  case " $LIBOBJS " in
16006  *" getrusage.$ac_objext "* ) ;;
16007  *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
16008 ;;
16009esac
16010
16011fi
16012
16013ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
16014if test "x$ac_cv_func_inet_aton" = xyes; then :
16015  $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
16016
16017else
16018  case " $LIBOBJS " in
16019  *" inet_aton.$ac_objext "* ) ;;
16020  *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
16021 ;;
16022esac
16023
16024fi
16025
16026ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
16027if test "x$ac_cv_func_mkdtemp" = xyes; then :
16028  $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
16029
16030else
16031  case " $LIBOBJS " in
16032  *" mkdtemp.$ac_objext "* ) ;;
16033  *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
16034 ;;
16035esac
16036
16037fi
16038
16039ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread"
16040if test "x$ac_cv_func_pread" = xyes; then :
16041  $as_echo "#define HAVE_PREAD 1" >>confdefs.h
16042
16043else
16044  case " $LIBOBJS " in
16045  *" pread.$ac_objext "* ) ;;
16046  *) LIBOBJS="$LIBOBJS pread.$ac_objext"
16047 ;;
16048esac
16049
16050fi
16051
16052ac_fn_c_check_func "$LINENO" "pwrite" "ac_cv_func_pwrite"
16053if test "x$ac_cv_func_pwrite" = xyes; then :
16054  $as_echo "#define HAVE_PWRITE 1" >>confdefs.h
16055
16056else
16057  case " $LIBOBJS " in
16058  *" pwrite.$ac_objext "* ) ;;
16059  *) LIBOBJS="$LIBOBJS pwrite.$ac_objext"
16060 ;;
16061esac
16062
16063fi
16064
16065ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
16066if test "x$ac_cv_func_random" = xyes; then :
16067  $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
16068
16069else
16070  case " $LIBOBJS " in
16071  *" random.$ac_objext "* ) ;;
16072  *) LIBOBJS="$LIBOBJS random.$ac_objext"
16073 ;;
16074esac
16075
16076fi
16077
16078ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
16079if test "x$ac_cv_func_rint" = xyes; then :
16080  $as_echo "#define HAVE_RINT 1" >>confdefs.h
16081
16082else
16083  case " $LIBOBJS " in
16084  *" rint.$ac_objext "* ) ;;
16085  *) LIBOBJS="$LIBOBJS rint.$ac_objext"
16086 ;;
16087esac
16088
16089fi
16090
16091ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
16092if test "x$ac_cv_func_srandom" = xyes; then :
16093  $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
16094
16095else
16096  case " $LIBOBJS " in
16097  *" srandom.$ac_objext "* ) ;;
16098  *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
16099 ;;
16100esac
16101
16102fi
16103
16104ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
16105if test "x$ac_cv_func_strlcat" = xyes; then :
16106  $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
16107
16108else
16109  case " $LIBOBJS " in
16110  *" strlcat.$ac_objext "* ) ;;
16111  *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
16112 ;;
16113esac
16114
16115fi
16116
16117ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
16118if test "x$ac_cv_func_strlcpy" = xyes; then :
16119  $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
16120
16121else
16122  case " $LIBOBJS " in
16123  *" strlcpy.$ac_objext "* ) ;;
16124  *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
16125 ;;
16126esac
16127
16128fi
16129
16130ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
16131if test "x$ac_cv_func_strnlen" = xyes; then :
16132  $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
16133
16134else
16135  case " $LIBOBJS " in
16136  *" strnlen.$ac_objext "* ) ;;
16137  *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
16138 ;;
16139esac
16140
16141fi
16142
16143ac_fn_c_check_func "$LINENO" "strtof" "ac_cv_func_strtof"
16144if test "x$ac_cv_func_strtof" = xyes; then :
16145  $as_echo "#define HAVE_STRTOF 1" >>confdefs.h
16146
16147else
16148  case " $LIBOBJS " in
16149  *" strtof.$ac_objext "* ) ;;
16150  *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
16151 ;;
16152esac
16153
16154fi
16155
16156
16157
16158case $host_os in
16159	# Cygwin and (apparently, based on test results) Mingw both
16160	# have a broken strtof(), so substitute the same replacement
16161	# code we use with VS2013. That's not a perfect fix, since
16162	# (unlike with VS2013) it doesn't avoid double-rounding, but
16163	# we have no better options. To get that, though, we have to
16164	# force the file to be compiled despite HAVE_STRTOF.
16165	mingw*|cygwin*)
16166		case " $LIBOBJS " in
16167  *" strtof.$ac_objext "* ) ;;
16168  *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
16169 ;;
16170esac
16171
16172		{ $as_echo "$as_me:${as_lineno-$LINENO}: On $host_os we will use our strtof wrapper." >&5
16173$as_echo "$as_me: On $host_os we will use our strtof wrapper." >&6;}
16174	;;
16175esac
16176
16177case $host_os in
16178
16179        # Windows uses a specialised env handler
16180        # and doesn't need a replacement getpeereid because it doesn't use
16181        # Unix sockets.
16182        mingw*)
16183
16184$as_echo "#define HAVE_SETENV 1" >>confdefs.h
16185
16186
16187$as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
16188
16189
16190$as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
16191
16192                ac_cv_func_setenv=yes
16193                ac_cv_func_unsetenv=yes
16194                ac_cv_func_getpeereid=yes;;
16195        *)
16196                ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv"
16197if test "x$ac_cv_func_setenv" = xyes; then :
16198  $as_echo "#define HAVE_SETENV 1" >>confdefs.h
16199
16200else
16201  case " $LIBOBJS " in
16202  *" setenv.$ac_objext "* ) ;;
16203  *) LIBOBJS="$LIBOBJS setenv.$ac_objext"
16204 ;;
16205esac
16206
16207fi
16208
16209ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
16210if test "x$ac_cv_func_unsetenv" = xyes; then :
16211  $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
16212
16213else
16214  case " $LIBOBJS " in
16215  *" unsetenv.$ac_objext "* ) ;;
16216  *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
16217 ;;
16218esac
16219
16220fi
16221
16222ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
16223if test "x$ac_cv_func_getpeereid" = xyes; then :
16224  $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
16225
16226else
16227  case " $LIBOBJS " in
16228  *" getpeereid.$ac_objext "* ) ;;
16229  *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
16230 ;;
16231esac
16232
16233fi
16234
16235
16236		;;
16237esac
16238
16239# System's version of getaddrinfo(), if any, may be used only if we found
16240# a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
16241# We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
16242if test x"$ac_cv_type_struct_addrinfo" = xyes && \
16243   test "$PORTNAME" != "win32"; then
16244  ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
16245if test "x$ac_cv_func_getaddrinfo" = xyes; then :
16246  $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
16247
16248else
16249  case " $LIBOBJS " in
16250  *" getaddrinfo.$ac_objext "* ) ;;
16251  *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
16252 ;;
16253esac
16254
16255fi
16256
16257
16258else
16259  case " $LIBOBJS " in
16260  *" getaddrinfo.$ac_objext "* ) ;;
16261  *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
16262 ;;
16263esac
16264
16265fi
16266
16267# Similarly, use system's getopt_long() only if system provides struct option.
16268if test x"$ac_cv_type_struct_option" = xyes ; then
16269  ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
16270if test "x$ac_cv_func_getopt_long" = xyes; then :
16271  $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
16272
16273else
16274  case " $LIBOBJS " in
16275  *" getopt_long.$ac_objext "* ) ;;
16276  *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16277 ;;
16278esac
16279
16280fi
16281
16282
16283else
16284  case " $LIBOBJS " in
16285  *" getopt_long.$ac_objext "* ) ;;
16286  *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16287 ;;
16288esac
16289
16290fi
16291
16292# On OpenBSD and Solaris, getopt() doesn't do what we want for long options
16293# (i.e., allow '-' as a flag character), so use our version on those platforms.
16294if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
16295  case " $LIBOBJS " in
16296  *" getopt.$ac_objext "* ) ;;
16297  *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16298 ;;
16299esac
16300
16301fi
16302
16303# mingw has adopted a GNU-centric interpretation of optind/optreset,
16304# so always use our version on Windows.
16305if test "$PORTNAME" = "win32"; then
16306  case " $LIBOBJS " in
16307  *" getopt.$ac_objext "* ) ;;
16308  *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16309 ;;
16310esac
16311
16312  case " $LIBOBJS " in
16313  *" getopt_long.$ac_objext "* ) ;;
16314  *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16315 ;;
16316esac
16317
16318fi
16319
16320# Win32 (really MinGW) support
16321if test "$PORTNAME" = "win32"; then
16322  for ac_func in _configthreadlocale
16323do :
16324  ac_fn_c_check_func "$LINENO" "_configthreadlocale" "ac_cv_func__configthreadlocale"
16325if test "x$ac_cv_func__configthreadlocale" = xyes; then :
16326  cat >>confdefs.h <<_ACEOF
16327#define HAVE__CONFIGTHREADLOCALE 1
16328_ACEOF
16329
16330fi
16331done
16332
16333  ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
16334if test "x$ac_cv_func_gettimeofday" = xyes; then :
16335  $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
16336
16337else
16338  case " $LIBOBJS " in
16339  *" gettimeofday.$ac_objext "* ) ;;
16340  *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
16341 ;;
16342esac
16343
16344fi
16345
16346
16347  case " $LIBOBJS " in
16348  *" dirmod.$ac_objext "* ) ;;
16349  *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16350 ;;
16351esac
16352
16353  case " $LIBOBJS " in
16354  *" kill.$ac_objext "* ) ;;
16355  *) LIBOBJS="$LIBOBJS kill.$ac_objext"
16356 ;;
16357esac
16358
16359  case " $LIBOBJS " in
16360  *" open.$ac_objext "* ) ;;
16361  *) LIBOBJS="$LIBOBJS open.$ac_objext"
16362 ;;
16363esac
16364
16365  case " $LIBOBJS " in
16366  *" system.$ac_objext "* ) ;;
16367  *) LIBOBJS="$LIBOBJS system.$ac_objext"
16368 ;;
16369esac
16370
16371  case " $LIBOBJS " in
16372  *" win32env.$ac_objext "* ) ;;
16373  *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
16374 ;;
16375esac
16376
16377  case " $LIBOBJS " in
16378  *" win32error.$ac_objext "* ) ;;
16379  *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
16380 ;;
16381esac
16382
16383  case " $LIBOBJS " in
16384  *" win32security.$ac_objext "* ) ;;
16385  *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
16386 ;;
16387esac
16388
16389  case " $LIBOBJS " in
16390  *" win32setlocale.$ac_objext "* ) ;;
16391  *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
16392 ;;
16393esac
16394
16395
16396$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
16397
16398  ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
16399#define WIN32_LEAN_AND_MEAN
16400#include <windows.h>
16401#include <string.h>
16402#include <dbghelp.h>
16403"
16404if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
16405
16406cat >>confdefs.h <<_ACEOF
16407#define HAVE_MINIDUMP_TYPE 1
16408_ACEOF
16409
16410pgac_minidump_type=yes
16411else
16412  pgac_minidump_type=no
16413fi
16414
16415fi
16416if test x"$pgac_minidump_type" = x"yes" ; then
16417  have_win32_dbghelp=yes
16418
16419else
16420  have_win32_dbghelp=no
16421
16422fi
16423
16424# Cygwin needs only a bit of that
16425if test "$PORTNAME" = "cygwin"; then
16426  case " $LIBOBJS " in
16427  *" dirmod.$ac_objext "* ) ;;
16428  *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16429 ;;
16430esac
16431
16432fi
16433
16434ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
16435if test "x$ac_cv_func_syslog" = xyes; then :
16436  ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
16437if test "x$ac_cv_header_syslog_h" = xyes; then :
16438
16439$as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
16440
16441fi
16442
16443
16444fi
16445
16446
16447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
16448$as_echo_n "checking for opterr... " >&6; }
16449if ${pgac_cv_var_int_opterr+:} false; then :
16450  $as_echo_n "(cached) " >&6
16451else
16452  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16453/* end confdefs.h.  */
16454#include <unistd.h>
16455int
16456main ()
16457{
16458extern int opterr; opterr = 1;
16459  ;
16460  return 0;
16461}
16462_ACEOF
16463if ac_fn_c_try_link "$LINENO"; then :
16464  pgac_cv_var_int_opterr=yes
16465else
16466  pgac_cv_var_int_opterr=no
16467fi
16468rm -f core conftest.err conftest.$ac_objext \
16469    conftest$ac_exeext conftest.$ac_ext
16470fi
16471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
16472$as_echo "$pgac_cv_var_int_opterr" >&6; }
16473if test x"$pgac_cv_var_int_opterr" = x"yes"; then
16474
16475$as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
16476
16477fi
16478
16479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
16480$as_echo_n "checking for optreset... " >&6; }
16481if ${pgac_cv_var_int_optreset+:} false; then :
16482  $as_echo_n "(cached) " >&6
16483else
16484  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16485/* end confdefs.h.  */
16486#include <unistd.h>
16487int
16488main ()
16489{
16490extern int optreset; optreset = 1;
16491  ;
16492  return 0;
16493}
16494_ACEOF
16495if ac_fn_c_try_link "$LINENO"; then :
16496  pgac_cv_var_int_optreset=yes
16497else
16498  pgac_cv_var_int_optreset=no
16499fi
16500rm -f core conftest.err conftest.$ac_objext \
16501    conftest$ac_exeext conftest.$ac_ext
16502fi
16503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
16504$as_echo "$pgac_cv_var_int_optreset" >&6; }
16505if test x"$pgac_cv_var_int_optreset" = x"yes"; then
16506
16507$as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
16508
16509fi
16510
16511for ac_func in strtoll __strtoll strtoq
16512do :
16513  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16514ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16515if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16516  cat >>confdefs.h <<_ACEOF
16517#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16518_ACEOF
16519 break
16520fi
16521done
16522
16523for ac_func in strtoull __strtoull strtouq
16524do :
16525  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16526ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16527if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16528  cat >>confdefs.h <<_ACEOF
16529#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16530_ACEOF
16531 break
16532fi
16533done
16534
16535# strto[u]ll may exist but not be declared
16536ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
16537if test "x$ac_cv_have_decl_strtoll" = xyes; then :
16538  ac_have_decl=1
16539else
16540  ac_have_decl=0
16541fi
16542
16543cat >>confdefs.h <<_ACEOF
16544#define HAVE_DECL_STRTOLL $ac_have_decl
16545_ACEOF
16546ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
16547if test "x$ac_cv_have_decl_strtoull" = xyes; then :
16548  ac_have_decl=1
16549else
16550  ac_have_decl=0
16551fi
16552
16553cat >>confdefs.h <<_ACEOF
16554#define HAVE_DECL_STRTOULL $ac_have_decl
16555_ACEOF
16556
16557
16558if test "$with_icu" = yes; then
16559  ac_save_CPPFLAGS=$CPPFLAGS
16560  CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16561
16562  # Verify we have ICU's header files
16563  ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16564if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16565
16566else
16567  as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16568fi
16569
16570
16571
16572  CPPFLAGS=$ac_save_CPPFLAGS
16573fi
16574
16575if test "$with_llvm" = yes; then
16576
16577  # Check which functionality is present
16578  SAVE_CPPFLAGS="$CPPFLAGS"
16579  CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
16580  ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
16581"
16582if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
16583  ac_have_decl=1
16584else
16585  ac_have_decl=0
16586fi
16587
16588cat >>confdefs.h <<_ACEOF
16589#define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
16590_ACEOF
16591
16592  ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
16593"
16594if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
16595  ac_have_decl=1
16596else
16597  ac_have_decl=0
16598fi
16599
16600cat >>confdefs.h <<_ACEOF
16601#define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
16602_ACEOF
16603ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUFeatures" "ac_cv_have_decl_LLVMGetHostCPUFeatures" "#include <llvm-c/TargetMachine.h>
16604"
16605if test "x$ac_cv_have_decl_LLVMGetHostCPUFeatures" = xyes; then :
16606  ac_have_decl=1
16607else
16608  ac_have_decl=0
16609fi
16610
16611cat >>confdefs.h <<_ACEOF
16612#define HAVE_DECL_LLVMGETHOSTCPUFEATURES $ac_have_decl
16613_ACEOF
16614
16615  ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
16616"
16617if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
16618  ac_have_decl=1
16619else
16620  ac_have_decl=0
16621fi
16622
16623cat >>confdefs.h <<_ACEOF
16624#define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
16625_ACEOF
16626ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
16627"
16628if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
16629  ac_have_decl=1
16630else
16631  ac_have_decl=0
16632fi
16633
16634cat >>confdefs.h <<_ACEOF
16635#define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
16636_ACEOF
16637
16638  CPPFLAGS="$SAVE_CPPFLAGS"
16639
16640fi
16641
16642# Lastly, restore full LIBS list and check for readline/libedit symbols
16643LIBS="$LIBS_including_readline"
16644
16645if test "$with_readline" = yes; then
16646  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
16647$as_echo_n "checking for rl_completion_append_character... " >&6; }
16648if ${pgac_cv_var_rl_completion_append_character+:} false; then :
16649  $as_echo_n "(cached) " >&6
16650else
16651  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16652/* end confdefs.h.  */
16653#include <stdio.h>
16654#ifdef HAVE_READLINE_READLINE_H
16655# include <readline/readline.h>
16656#elif defined(HAVE_READLINE_H)
16657# include <readline.h>
16658#endif
16659
16660int
16661main ()
16662{
16663rl_completion_append_character = 'x';
16664  ;
16665  return 0;
16666}
16667_ACEOF
16668if ac_fn_c_try_link "$LINENO"; then :
16669  pgac_cv_var_rl_completion_append_character=yes
16670else
16671  pgac_cv_var_rl_completion_append_character=no
16672fi
16673rm -f core conftest.err conftest.$ac_objext \
16674    conftest$ac_exeext conftest.$ac_ext
16675fi
16676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
16677$as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
16678if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
16679
16680$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
16681
16682fi
16683  for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
16684do :
16685  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16686ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16687if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16688  cat >>confdefs.h <<_ACEOF
16689#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16690_ACEOF
16691
16692fi
16693done
16694
16695  for ac_func in append_history history_truncate_file
16696do :
16697  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16698ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16699if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16700  cat >>confdefs.h <<_ACEOF
16701#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16702_ACEOF
16703
16704fi
16705done
16706
16707fi
16708
16709
16710# This test makes sure that run tests work at all.  Sometimes a shared
16711# library is found by the linker, but the runtime linker can't find it.
16712# This check should come after all modifications of compiler or linker
16713# variables, and before any other run tests.
16714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16715$as_echo_n "checking test program... " >&6; }
16716if test "$cross_compiling" = yes; then :
16717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16718$as_echo "cross-compiling" >&6; }
16719else
16720  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16721/* end confdefs.h.  */
16722int main() { return 0; }
16723_ACEOF
16724if ac_fn_c_try_run "$LINENO"; then :
16725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16726$as_echo "ok" >&6; }
16727else
16728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16729$as_echo "failed" >&6; }
16730as_fn_error $? "
16731Could not execute a simple test program.  This may be a problem
16732related to locating shared libraries.  Check the file 'config.log'
16733for the exact reason." "$LINENO" 5
16734fi
16735rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16736  conftest.$ac_objext conftest.beam conftest.$ac_ext
16737fi
16738
16739
16740# --------------------
16741# Run tests below here
16742# --------------------
16743
16744
16745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16746$as_echo_n "checking whether long int is 64 bits... " >&6; }
16747if ${pgac_cv_type_long_int_64+:} false; then :
16748  $as_echo_n "(cached) " >&6
16749else
16750  if test "$cross_compiling" = yes; then :
16751  # If cross-compiling, check the size reported by the compiler and
16752# trust that the arithmetic works.
16753cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16754/* end confdefs.h.  */
16755
16756int
16757main ()
16758{
16759static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16760test_array [0] = 0;
16761return test_array [0];
16762
16763  ;
16764  return 0;
16765}
16766_ACEOF
16767if ac_fn_c_try_compile "$LINENO"; then :
16768  pgac_cv_type_long_int_64=yes
16769else
16770  pgac_cv_type_long_int_64=no
16771fi
16772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16773else
16774  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16775/* end confdefs.h.  */
16776typedef long int ac_int64;
16777
16778/*
16779 * These are globals to discourage the compiler from folding all the
16780 * arithmetic tests down to compile-time constants.
16781 */
16782ac_int64 a = 20000001;
16783ac_int64 b = 40000005;
16784
16785int does_int64_work()
16786{
16787  ac_int64 c,d;
16788
16789  if (sizeof(ac_int64) != 8)
16790    return 0;			/* definitely not the right size */
16791
16792  /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16793  c = a * b;
16794  d = (c + b) / b;
16795  if (d != a+1)
16796    return 0;
16797  return 1;
16798}
16799
16800int
16801main() {
16802  return (! does_int64_work());
16803}
16804_ACEOF
16805if ac_fn_c_try_run "$LINENO"; then :
16806  pgac_cv_type_long_int_64=yes
16807else
16808  pgac_cv_type_long_int_64=no
16809fi
16810rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16811  conftest.$ac_objext conftest.beam conftest.$ac_ext
16812fi
16813
16814fi
16815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
16816$as_echo "$pgac_cv_type_long_int_64" >&6; }
16817
16818HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
16819if test x"$pgac_cv_type_long_int_64" = xyes ; then
16820
16821$as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
16822
16823fi
16824
16825
16826if test x"$HAVE_LONG_INT_64" = x"yes" ; then
16827  pg_int64_type="long int"
16828else
16829  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
16830$as_echo_n "checking whether long long int is 64 bits... " >&6; }
16831if ${pgac_cv_type_long_long_int_64+:} false; then :
16832  $as_echo_n "(cached) " >&6
16833else
16834  if test "$cross_compiling" = yes; then :
16835  # If cross-compiling, check the size reported by the compiler and
16836# trust that the arithmetic works.
16837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16838/* end confdefs.h.  */
16839
16840int
16841main ()
16842{
16843static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
16844test_array [0] = 0;
16845return test_array [0];
16846
16847  ;
16848  return 0;
16849}
16850_ACEOF
16851if ac_fn_c_try_compile "$LINENO"; then :
16852  pgac_cv_type_long_long_int_64=yes
16853else
16854  pgac_cv_type_long_long_int_64=no
16855fi
16856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16857else
16858  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16859/* end confdefs.h.  */
16860typedef long long int ac_int64;
16861
16862/*
16863 * These are globals to discourage the compiler from folding all the
16864 * arithmetic tests down to compile-time constants.
16865 */
16866ac_int64 a = 20000001;
16867ac_int64 b = 40000005;
16868
16869int does_int64_work()
16870{
16871  ac_int64 c,d;
16872
16873  if (sizeof(ac_int64) != 8)
16874    return 0;			/* definitely not the right size */
16875
16876  /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16877  c = a * b;
16878  d = (c + b) / b;
16879  if (d != a+1)
16880    return 0;
16881  return 1;
16882}
16883
16884int
16885main() {
16886  return (! does_int64_work());
16887}
16888_ACEOF
16889if ac_fn_c_try_run "$LINENO"; then :
16890  pgac_cv_type_long_long_int_64=yes
16891else
16892  pgac_cv_type_long_long_int_64=no
16893fi
16894rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16895  conftest.$ac_objext conftest.beam conftest.$ac_ext
16896fi
16897
16898fi
16899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
16900$as_echo "$pgac_cv_type_long_long_int_64" >&6; }
16901
16902HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
16903if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
16904
16905$as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
16906
16907fi
16908
16909  if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16910    pg_int64_type="long long int"
16911  else
16912    as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
16913  fi
16914fi
16915
16916
16917cat >>confdefs.h <<_ACEOF
16918#define PG_INT64_TYPE $pg_int64_type
16919_ACEOF
16920
16921
16922# Select the printf length modifier that goes with that, too.
16923if test x"$pg_int64_type" = x"long long int" ; then
16924  INT64_MODIFIER='"ll"'
16925else
16926  INT64_MODIFIER='"l"'
16927fi
16928
16929
16930cat >>confdefs.h <<_ACEOF
16931#define INT64_MODIFIER $INT64_MODIFIER
16932_ACEOF
16933
16934
16935# has to be down here, rather than with the other builtins, because
16936# the test uses PG_INT64_TYPE.
16937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
16938$as_echo_n "checking for __builtin_mul_overflow... " >&6; }
16939if ${pgac_cv__builtin_op_overflow+:} false; then :
16940  $as_echo_n "(cached) " >&6
16941else
16942  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16943/* end confdefs.h.  */
16944
16945PG_INT64_TYPE a = 1;
16946PG_INT64_TYPE b = 1;
16947PG_INT64_TYPE result;
16948int oflo;
16949
16950int
16951main ()
16952{
16953oflo = __builtin_mul_overflow(a, b, &result);
16954  ;
16955  return 0;
16956}
16957_ACEOF
16958if ac_fn_c_try_link "$LINENO"; then :
16959  pgac_cv__builtin_op_overflow=yes
16960else
16961  pgac_cv__builtin_op_overflow=no
16962fi
16963rm -f core conftest.err conftest.$ac_objext \
16964    conftest$ac_exeext conftest.$ac_ext
16965fi
16966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
16967$as_echo "$pgac_cv__builtin_op_overflow" >&6; }
16968if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
16969
16970$as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
16971
16972fi
16973
16974# Check size of void *, size_t (enables tweaks for > 32bit address space)
16975# The cast to long int works around a bug in the HP C Compiler
16976# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16977# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16978# This bug is HP SR number 8606223364.
16979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
16980$as_echo_n "checking size of void *... " >&6; }
16981if ${ac_cv_sizeof_void_p+:} false; then :
16982  $as_echo_n "(cached) " >&6
16983else
16984  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
16985
16986else
16987  if test "$ac_cv_type_void_p" = yes; then
16988     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16989$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16990as_fn_error 77 "cannot compute sizeof (void *)
16991See \`config.log' for more details" "$LINENO" 5; }
16992   else
16993     ac_cv_sizeof_void_p=0
16994   fi
16995fi
16996
16997fi
16998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
16999$as_echo "$ac_cv_sizeof_void_p" >&6; }
17000
17001
17002
17003cat >>confdefs.h <<_ACEOF
17004#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
17005_ACEOF
17006
17007
17008# The cast to long int works around a bug in the HP C Compiler
17009# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17010# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17011# This bug is HP SR number 8606223364.
17012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
17013$as_echo_n "checking size of size_t... " >&6; }
17014if ${ac_cv_sizeof_size_t+:} false; then :
17015  $as_echo_n "(cached) " >&6
17016else
17017  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t"        "$ac_includes_default"; then :
17018
17019else
17020  if test "$ac_cv_type_size_t" = yes; then
17021     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17022$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17023as_fn_error 77 "cannot compute sizeof (size_t)
17024See \`config.log' for more details" "$LINENO" 5; }
17025   else
17026     ac_cv_sizeof_size_t=0
17027   fi
17028fi
17029
17030fi
17031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
17032$as_echo "$ac_cv_sizeof_size_t" >&6; }
17033
17034
17035
17036cat >>confdefs.h <<_ACEOF
17037#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
17038_ACEOF
17039
17040
17041# The cast to long int works around a bug in the HP C Compiler
17042# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17043# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17044# This bug is HP SR number 8606223364.
17045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
17046$as_echo_n "checking size of long... " >&6; }
17047if ${ac_cv_sizeof_long+:} false; then :
17048  $as_echo_n "(cached) " >&6
17049else
17050  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
17051
17052else
17053  if test "$ac_cv_type_long" = yes; then
17054     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17055$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17056as_fn_error 77 "cannot compute sizeof (long)
17057See \`config.log' for more details" "$LINENO" 5; }
17058   else
17059     ac_cv_sizeof_long=0
17060   fi
17061fi
17062
17063fi
17064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
17065$as_echo "$ac_cv_sizeof_long" >&6; }
17066
17067
17068
17069cat >>confdefs.h <<_ACEOF
17070#define SIZEOF_LONG $ac_cv_sizeof_long
17071_ACEOF
17072
17073
17074
17075# Decide whether float4 is passed by value: user-selectable, enabled by default
17076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
17077$as_echo_n "checking whether to build with float4 passed by value... " >&6; }
17078
17079
17080# Check whether --enable-float4-byval was given.
17081if test "${enable_float4_byval+set}" = set; then :
17082  enableval=$enable_float4_byval;
17083  case $enableval in
17084    yes)
17085
17086$as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
17087
17088               float4passbyval=true
17089      ;;
17090    no)
17091      float4passbyval=false
17092      ;;
17093    *)
17094      as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
17095      ;;
17096  esac
17097
17098else
17099  enable_float4_byval=yes
17100
17101$as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
17102
17103               float4passbyval=true
17104fi
17105
17106
17107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
17108$as_echo "$enable_float4_byval" >&6; }
17109
17110cat >>confdefs.h <<_ACEOF
17111#define FLOAT4PASSBYVAL $float4passbyval
17112_ACEOF
17113
17114
17115# Decide whether float8 is passed by value.
17116# Note: this setting also controls int8 and related types such as timestamp.
17117# If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
17118# If not, trying to select it is an error.
17119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
17120$as_echo_n "checking whether to build with float8 passed by value... " >&6; }
17121if test $ac_cv_sizeof_void_p -ge 8 ; then
17122
17123
17124# Check whether --enable-float8-byval was given.
17125if test "${enable_float8_byval+set}" = set; then :
17126  enableval=$enable_float8_byval;
17127  case $enableval in
17128    yes)
17129      :
17130      ;;
17131    no)
17132      :
17133      ;;
17134    *)
17135      as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
17136      ;;
17137  esac
17138
17139else
17140  enable_float8_byval=yes
17141
17142fi
17143
17144
17145else
17146
17147
17148# Check whether --enable-float8-byval was given.
17149if test "${enable_float8_byval+set}" = set; then :
17150  enableval=$enable_float8_byval;
17151  case $enableval in
17152    yes)
17153      :
17154      ;;
17155    no)
17156      :
17157      ;;
17158    *)
17159      as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
17160      ;;
17161  esac
17162
17163else
17164  enable_float8_byval=no
17165
17166fi
17167
17168
17169  if test "$enable_float8_byval" = yes ; then
17170    as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
17171  fi
17172fi
17173if test "$enable_float8_byval" = yes ; then
17174
17175$as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
17176
17177  float8passbyval=true
17178else
17179  float8passbyval=false
17180fi
17181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
17182$as_echo "$enable_float8_byval" >&6; }
17183
17184cat >>confdefs.h <<_ACEOF
17185#define FLOAT8PASSBYVAL $float8passbyval
17186_ACEOF
17187
17188
17189# Determine memory alignment requirements for the basic C data types.
17190
17191# The cast to long int works around a bug in the HP C Compiler,
17192# see AC_CHECK_SIZEOF for more information.
17193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
17194$as_echo_n "checking alignment of short... " >&6; }
17195if ${ac_cv_alignof_short+:} false; then :
17196  $as_echo_n "(cached) " >&6
17197else
17198  if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short"        "$ac_includes_default
17199#ifndef offsetof
17200# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17201#endif
17202typedef struct { char x; short y; } ac__type_alignof_;"; then :
17203
17204else
17205  if test "$ac_cv_type_short" = yes; then
17206     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17207$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17208as_fn_error 77 "cannot compute alignment of short
17209See \`config.log' for more details" "$LINENO" 5; }
17210   else
17211     ac_cv_alignof_short=0
17212   fi
17213fi
17214
17215fi
17216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
17217$as_echo "$ac_cv_alignof_short" >&6; }
17218
17219
17220
17221cat >>confdefs.h <<_ACEOF
17222#define ALIGNOF_SHORT $ac_cv_alignof_short
17223_ACEOF
17224
17225
17226# The cast to long int works around a bug in the HP C Compiler,
17227# see AC_CHECK_SIZEOF for more information.
17228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
17229$as_echo_n "checking alignment of int... " >&6; }
17230if ${ac_cv_alignof_int+:} false; then :
17231  $as_echo_n "(cached) " >&6
17232else
17233  if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int"        "$ac_includes_default
17234#ifndef offsetof
17235# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17236#endif
17237typedef struct { char x; int y; } ac__type_alignof_;"; then :
17238
17239else
17240  if test "$ac_cv_type_int" = yes; then
17241     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17242$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17243as_fn_error 77 "cannot compute alignment of int
17244See \`config.log' for more details" "$LINENO" 5; }
17245   else
17246     ac_cv_alignof_int=0
17247   fi
17248fi
17249
17250fi
17251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
17252$as_echo "$ac_cv_alignof_int" >&6; }
17253
17254
17255
17256cat >>confdefs.h <<_ACEOF
17257#define ALIGNOF_INT $ac_cv_alignof_int
17258_ACEOF
17259
17260
17261# The cast to long int works around a bug in the HP C Compiler,
17262# see AC_CHECK_SIZEOF for more information.
17263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
17264$as_echo_n "checking alignment of long... " >&6; }
17265if ${ac_cv_alignof_long+:} false; then :
17266  $as_echo_n "(cached) " >&6
17267else
17268  if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long"        "$ac_includes_default
17269#ifndef offsetof
17270# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17271#endif
17272typedef struct { char x; long y; } ac__type_alignof_;"; then :
17273
17274else
17275  if test "$ac_cv_type_long" = yes; then
17276     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17277$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17278as_fn_error 77 "cannot compute alignment of long
17279See \`config.log' for more details" "$LINENO" 5; }
17280   else
17281     ac_cv_alignof_long=0
17282   fi
17283fi
17284
17285fi
17286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
17287$as_echo "$ac_cv_alignof_long" >&6; }
17288
17289
17290
17291cat >>confdefs.h <<_ACEOF
17292#define ALIGNOF_LONG $ac_cv_alignof_long
17293_ACEOF
17294
17295
17296if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
17297  # The cast to long int works around a bug in the HP C Compiler,
17298# see AC_CHECK_SIZEOF for more information.
17299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
17300$as_echo_n "checking alignment of long long int... " >&6; }
17301if ${ac_cv_alignof_long_long_int+:} false; then :
17302  $as_echo_n "(cached) " >&6
17303else
17304  if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int"        "$ac_includes_default
17305#ifndef offsetof
17306# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17307#endif
17308typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
17309
17310else
17311  if test "$ac_cv_type_long_long_int" = yes; then
17312     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17313$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17314as_fn_error 77 "cannot compute alignment of long long int
17315See \`config.log' for more details" "$LINENO" 5; }
17316   else
17317     ac_cv_alignof_long_long_int=0
17318   fi
17319fi
17320
17321fi
17322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
17323$as_echo "$ac_cv_alignof_long_long_int" >&6; }
17324
17325
17326
17327cat >>confdefs.h <<_ACEOF
17328#define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
17329_ACEOF
17330
17331
17332fi
17333# The cast to long int works around a bug in the HP C Compiler,
17334# see AC_CHECK_SIZEOF for more information.
17335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
17336$as_echo_n "checking alignment of double... " >&6; }
17337if ${ac_cv_alignof_double+:} false; then :
17338  $as_echo_n "(cached) " >&6
17339else
17340  if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double"        "$ac_includes_default
17341#ifndef offsetof
17342# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17343#endif
17344typedef struct { char x; double y; } ac__type_alignof_;"; then :
17345
17346else
17347  if test "$ac_cv_type_double" = yes; then
17348     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17349$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17350as_fn_error 77 "cannot compute alignment of double
17351See \`config.log' for more details" "$LINENO" 5; }
17352   else
17353     ac_cv_alignof_double=0
17354   fi
17355fi
17356
17357fi
17358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
17359$as_echo "$ac_cv_alignof_double" >&6; }
17360
17361
17362
17363cat >>confdefs.h <<_ACEOF
17364#define ALIGNOF_DOUBLE $ac_cv_alignof_double
17365_ACEOF
17366
17367
17368
17369# Compute maximum alignment of any basic type.
17370# We assume long's alignment is at least as strong as char, short, or int;
17371# but we must check long long (if it is being used for int64) and double.
17372# Note that we intentionally do not consider any types wider than 64 bits,
17373# as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
17374# for disk and memory space.
17375
17376MAX_ALIGNOF=$ac_cv_alignof_long
17377if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
17378  MAX_ALIGNOF=$ac_cv_alignof_double
17379fi
17380if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
17381  MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
17382fi
17383
17384cat >>confdefs.h <<_ACEOF
17385#define MAXIMUM_ALIGNOF $MAX_ALIGNOF
17386_ACEOF
17387
17388
17389
17390# Some platforms predefine the types int8, int16, etc.  Only check
17391# a (hopefully) representative subset.
17392ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
17393"
17394if test "x$ac_cv_type_int8" = xyes; then :
17395
17396cat >>confdefs.h <<_ACEOF
17397#define HAVE_INT8 1
17398_ACEOF
17399
17400
17401fi
17402ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
17403"
17404if test "x$ac_cv_type_uint8" = xyes; then :
17405
17406cat >>confdefs.h <<_ACEOF
17407#define HAVE_UINT8 1
17408_ACEOF
17409
17410
17411fi
17412ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
17413"
17414if test "x$ac_cv_type_int64" = xyes; then :
17415
17416cat >>confdefs.h <<_ACEOF
17417#define HAVE_INT64 1
17418_ACEOF
17419
17420
17421fi
17422ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
17423"
17424if test "x$ac_cv_type_uint64" = xyes; then :
17425
17426cat >>confdefs.h <<_ACEOF
17427#define HAVE_UINT64 1
17428_ACEOF
17429
17430
17431fi
17432
17433
17434# Some compilers offer a 128-bit integer scalar type.
17435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
17436$as_echo_n "checking for __int128... " >&6; }
17437if ${pgac_cv__128bit_int+:} false; then :
17438  $as_echo_n "(cached) " >&6
17439else
17440  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17441/* end confdefs.h.  */
17442
17443/*
17444 * We don't actually run this test, just link it to verify that any support
17445 * functions needed for __int128 are present.
17446 *
17447 * These are globals to discourage the compiler from folding all the
17448 * arithmetic tests down to compile-time constants.  We do not have
17449 * convenient support for 128bit literals at this point...
17450 */
17451__int128 a = 48828125;
17452__int128 b = 97656250;
17453
17454int
17455main ()
17456{
17457
17458__int128 c,d;
17459a = (a << 12) + 1; /* 200000000001 */
17460b = (b << 12) + 5; /* 400000000005 */
17461/* try the most relevant arithmetic ops */
17462c = a * b;
17463d = (c + b) / b;
17464/* must use the results, else compiler may optimize arithmetic away */
17465if (d != a+1)
17466  return 1;
17467
17468  ;
17469  return 0;
17470}
17471_ACEOF
17472if ac_fn_c_try_link "$LINENO"; then :
17473  pgac_cv__128bit_int=yes
17474else
17475  pgac_cv__128bit_int=no
17476fi
17477rm -f core conftest.err conftest.$ac_objext \
17478    conftest$ac_exeext conftest.$ac_ext
17479fi
17480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
17481$as_echo "$pgac_cv__128bit_int" >&6; }
17482if test x"$pgac_cv__128bit_int" = xyes ; then
17483  # Use of non-default alignment with __int128 tickles bugs in some compilers.
17484  # If not cross-compiling, we can test for bugs and disable use of __int128
17485  # with buggy compilers.  If cross-compiling, hope for the best.
17486  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
17487  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
17488$as_echo_n "checking for __int128 alignment bug... " >&6; }
17489if ${pgac_cv__128bit_int_bug+:} false; then :
17490  $as_echo_n "(cached) " >&6
17491else
17492  if test "$cross_compiling" = yes; then :
17493  pgac_cv__128bit_int_bug="assuming ok"
17494else
17495  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17496/* end confdefs.h.  */
17497
17498/* This must match the corresponding code in c.h: */
17499#if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
17500#define pg_attribute_aligned(a) __attribute__((aligned(a)))
17501#endif
17502typedef __int128 int128a
17503#if defined(pg_attribute_aligned)
17504pg_attribute_aligned(8)
17505#endif
17506;
17507int128a holder;
17508void pass_by_val(void *buffer, int128a par) { holder = par; }
17509
17510int
17511main ()
17512{
17513
17514long int i64 = 97656225L << 12;
17515int128a q;
17516pass_by_val(main, (int128a) i64);
17517q = (int128a) i64;
17518if (q != holder)
17519  return 1;
17520
17521  ;
17522  return 0;
17523}
17524_ACEOF
17525if ac_fn_c_try_run "$LINENO"; then :
17526  pgac_cv__128bit_int_bug=ok
17527else
17528  pgac_cv__128bit_int_bug=broken
17529fi
17530rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17531  conftest.$ac_objext conftest.beam conftest.$ac_ext
17532fi
17533
17534fi
17535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
17536$as_echo "$pgac_cv__128bit_int_bug" >&6; }
17537  if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
17538
17539$as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
17540
17541    # The cast to long int works around a bug in the HP C Compiler,
17542# see AC_CHECK_SIZEOF for more information.
17543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
17544$as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
17545if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
17546  $as_echo_n "(cached) " >&6
17547else
17548  if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE"        "$ac_includes_default
17549#ifndef offsetof
17550# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17551#endif
17552typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
17553
17554else
17555  if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
17556     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17557$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17558as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
17559See \`config.log' for more details" "$LINENO" 5; }
17560   else
17561     ac_cv_alignof_PG_INT128_TYPE=0
17562   fi
17563fi
17564
17565fi
17566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
17567$as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
17568
17569
17570
17571cat >>confdefs.h <<_ACEOF
17572#define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
17573_ACEOF
17574
17575
17576  fi
17577fi
17578
17579# Check for various atomic operations now that we have checked how to declare
17580# 64bit integers.
17581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
17582$as_echo_n "checking for builtin __sync char locking functions... " >&6; }
17583if ${pgac_cv_gcc_sync_char_tas+:} false; then :
17584  $as_echo_n "(cached) " >&6
17585else
17586  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17587/* end confdefs.h.  */
17588
17589int
17590main ()
17591{
17592char lock = 0;
17593   __sync_lock_test_and_set(&lock, 1);
17594   __sync_lock_release(&lock);
17595  ;
17596  return 0;
17597}
17598_ACEOF
17599if ac_fn_c_try_link "$LINENO"; then :
17600  pgac_cv_gcc_sync_char_tas="yes"
17601else
17602  pgac_cv_gcc_sync_char_tas="no"
17603fi
17604rm -f core conftest.err conftest.$ac_objext \
17605    conftest$ac_exeext conftest.$ac_ext
17606fi
17607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
17608$as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
17609if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
17610
17611$as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
17612
17613fi
17614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
17615$as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
17616if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
17617  $as_echo_n "(cached) " >&6
17618else
17619  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17620/* end confdefs.h.  */
17621
17622int
17623main ()
17624{
17625int lock = 0;
17626   __sync_lock_test_and_set(&lock, 1);
17627   __sync_lock_release(&lock);
17628  ;
17629  return 0;
17630}
17631_ACEOF
17632if ac_fn_c_try_link "$LINENO"; then :
17633  pgac_cv_gcc_sync_int32_tas="yes"
17634else
17635  pgac_cv_gcc_sync_int32_tas="no"
17636fi
17637rm -f core conftest.err conftest.$ac_objext \
17638    conftest$ac_exeext conftest.$ac_ext
17639fi
17640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
17641$as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
17642if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
17643
17644$as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
17645
17646fi
17647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17648$as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17649if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17650  $as_echo_n "(cached) " >&6
17651else
17652  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17653/* end confdefs.h.  */
17654
17655int
17656main ()
17657{
17658int val = 0;
17659   __sync_val_compare_and_swap(&val, 0, 37);
17660  ;
17661  return 0;
17662}
17663_ACEOF
17664if ac_fn_c_try_link "$LINENO"; then :
17665  pgac_cv_gcc_sync_int32_cas="yes"
17666else
17667  pgac_cv_gcc_sync_int32_cas="no"
17668fi
17669rm -f core conftest.err conftest.$ac_objext \
17670    conftest$ac_exeext conftest.$ac_ext
17671fi
17672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17673$as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17674if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17675
17676$as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17677
17678fi
17679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17680$as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17681if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17682  $as_echo_n "(cached) " >&6
17683else
17684  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17685/* end confdefs.h.  */
17686
17687int
17688main ()
17689{
17690PG_INT64_TYPE lock = 0;
17691   __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17692  ;
17693  return 0;
17694}
17695_ACEOF
17696if ac_fn_c_try_link "$LINENO"; then :
17697  pgac_cv_gcc_sync_int64_cas="yes"
17698else
17699  pgac_cv_gcc_sync_int64_cas="no"
17700fi
17701rm -f core conftest.err conftest.$ac_objext \
17702    conftest$ac_exeext conftest.$ac_ext
17703fi
17704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17705$as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17706if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17707
17708$as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17709
17710fi
17711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17712$as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17713if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17714  $as_echo_n "(cached) " >&6
17715else
17716  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17717/* end confdefs.h.  */
17718
17719int
17720main ()
17721{
17722int val = 0;
17723   int expect = 0;
17724   __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17725  ;
17726  return 0;
17727}
17728_ACEOF
17729if ac_fn_c_try_link "$LINENO"; then :
17730  pgac_cv_gcc_atomic_int32_cas="yes"
17731else
17732  pgac_cv_gcc_atomic_int32_cas="no"
17733fi
17734rm -f core conftest.err conftest.$ac_objext \
17735    conftest$ac_exeext conftest.$ac_ext
17736fi
17737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17738$as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17739if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17740
17741$as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17742
17743fi
17744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17745$as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17746if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17747  $as_echo_n "(cached) " >&6
17748else
17749  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17750/* end confdefs.h.  */
17751
17752int
17753main ()
17754{
17755PG_INT64_TYPE val = 0;
17756   PG_INT64_TYPE expect = 0;
17757   __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17758  ;
17759  return 0;
17760}
17761_ACEOF
17762if ac_fn_c_try_link "$LINENO"; then :
17763  pgac_cv_gcc_atomic_int64_cas="yes"
17764else
17765  pgac_cv_gcc_atomic_int64_cas="no"
17766fi
17767rm -f core conftest.err conftest.$ac_objext \
17768    conftest$ac_exeext conftest.$ac_ext
17769fi
17770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17771$as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17772if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17773
17774$as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17775
17776fi
17777
17778
17779# Check for x86 cpuid instruction
17780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17781$as_echo_n "checking for __get_cpuid... " >&6; }
17782if ${pgac_cv__get_cpuid+:} false; then :
17783  $as_echo_n "(cached) " >&6
17784else
17785  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17786/* end confdefs.h.  */
17787#include <cpuid.h>
17788int
17789main ()
17790{
17791unsigned int exx[4] = {0, 0, 0, 0};
17792  __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17793
17794  ;
17795  return 0;
17796}
17797_ACEOF
17798if ac_fn_c_try_link "$LINENO"; then :
17799  pgac_cv__get_cpuid="yes"
17800else
17801  pgac_cv__get_cpuid="no"
17802fi
17803rm -f core conftest.err conftest.$ac_objext \
17804    conftest$ac_exeext conftest.$ac_ext
17805fi
17806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17807$as_echo "$pgac_cv__get_cpuid" >&6; }
17808if test x"$pgac_cv__get_cpuid" = x"yes"; then
17809
17810$as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17811
17812fi
17813
17814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17815$as_echo_n "checking for __cpuid... " >&6; }
17816if ${pgac_cv__cpuid+:} false; then :
17817  $as_echo_n "(cached) " >&6
17818else
17819  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17820/* end confdefs.h.  */
17821#include <intrin.h>
17822int
17823main ()
17824{
17825unsigned int exx[4] = {0, 0, 0, 0};
17826  __get_cpuid(exx[0], 1);
17827
17828  ;
17829  return 0;
17830}
17831_ACEOF
17832if ac_fn_c_try_link "$LINENO"; then :
17833  pgac_cv__cpuid="yes"
17834else
17835  pgac_cv__cpuid="no"
17836fi
17837rm -f core conftest.err conftest.$ac_objext \
17838    conftest$ac_exeext conftest.$ac_ext
17839fi
17840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17841$as_echo "$pgac_cv__cpuid" >&6; }
17842if test x"$pgac_cv__cpuid" = x"yes"; then
17843
17844$as_echo "#define HAVE__CPUID 1" >>confdefs.h
17845
17846fi
17847
17848# Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17849#
17850# First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17851# with the default compiler flags. If not, check if adding the -msse4.2
17852# flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
17853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17854$as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17855if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17856  $as_echo_n "(cached) " >&6
17857else
17858  pgac_save_CFLAGS=$CFLAGS
17859CFLAGS="$pgac_save_CFLAGS "
17860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17861/* end confdefs.h.  */
17862#include <nmmintrin.h>
17863int
17864main ()
17865{
17866unsigned int crc = 0;
17867   crc = _mm_crc32_u8(crc, 0);
17868   crc = _mm_crc32_u32(crc, 0);
17869   /* return computed value, to prevent the above being optimized away */
17870   return crc == 0;
17871  ;
17872  return 0;
17873}
17874_ACEOF
17875if ac_fn_c_try_link "$LINENO"; then :
17876  pgac_cv_sse42_crc32_intrinsics_=yes
17877else
17878  pgac_cv_sse42_crc32_intrinsics_=no
17879fi
17880rm -f core conftest.err conftest.$ac_objext \
17881    conftest$ac_exeext conftest.$ac_ext
17882CFLAGS="$pgac_save_CFLAGS"
17883fi
17884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
17885$as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
17886if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
17887  CFLAGS_SSE42=""
17888  pgac_sse42_crc32_intrinsics=yes
17889fi
17890
17891if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
17892  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
17893$as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
17894if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
17895  $as_echo_n "(cached) " >&6
17896else
17897  pgac_save_CFLAGS=$CFLAGS
17898CFLAGS="$pgac_save_CFLAGS -msse4.2"
17899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17900/* end confdefs.h.  */
17901#include <nmmintrin.h>
17902int
17903main ()
17904{
17905unsigned int crc = 0;
17906   crc = _mm_crc32_u8(crc, 0);
17907   crc = _mm_crc32_u32(crc, 0);
17908   /* return computed value, to prevent the above being optimized away */
17909   return crc == 0;
17910  ;
17911  return 0;
17912}
17913_ACEOF
17914if ac_fn_c_try_link "$LINENO"; then :
17915  pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
17916else
17917  pgac_cv_sse42_crc32_intrinsics__msse4_2=no
17918fi
17919rm -f core conftest.err conftest.$ac_objext \
17920    conftest$ac_exeext conftest.$ac_ext
17921CFLAGS="$pgac_save_CFLAGS"
17922fi
17923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
17924$as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
17925if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
17926  CFLAGS_SSE42="-msse4.2"
17927  pgac_sse42_crc32_intrinsics=yes
17928fi
17929
17930fi
17931
17932
17933# Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
17934# define __SSE4_2__ in that case.
17935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17936/* end confdefs.h.  */
17937
17938int
17939main ()
17940{
17941
17942#ifndef __SSE4_2__
17943#error __SSE4_2__ not defined
17944#endif
17945
17946  ;
17947  return 0;
17948}
17949_ACEOF
17950if ac_fn_c_try_compile "$LINENO"; then :
17951  SSE4_2_TARGETED=1
17952fi
17953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17954
17955# Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
17956#
17957# First check if __crc32c* intrinsics can be used with the default compiler
17958# flags. If not, check if adding -march=armv8-a+crc flag helps.
17959# CFLAGS_ARMV8_CRC32C is set if the extra flag is required.
17960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
17961$as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
17962if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
17963  $as_echo_n "(cached) " >&6
17964else
17965  pgac_save_CFLAGS=$CFLAGS
17966CFLAGS="$pgac_save_CFLAGS "
17967cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17968/* end confdefs.h.  */
17969#include <arm_acle.h>
17970int
17971main ()
17972{
17973unsigned int crc = 0;
17974   crc = __crc32cb(crc, 0);
17975   crc = __crc32ch(crc, 0);
17976   crc = __crc32cw(crc, 0);
17977   crc = __crc32cd(crc, 0);
17978   /* return computed value, to prevent the above being optimized away */
17979   return crc == 0;
17980  ;
17981  return 0;
17982}
17983_ACEOF
17984if ac_fn_c_try_link "$LINENO"; then :
17985  pgac_cv_armv8_crc32c_intrinsics_=yes
17986else
17987  pgac_cv_armv8_crc32c_intrinsics_=no
17988fi
17989rm -f core conftest.err conftest.$ac_objext \
17990    conftest$ac_exeext conftest.$ac_ext
17991CFLAGS="$pgac_save_CFLAGS"
17992fi
17993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
17994$as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
17995if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
17996  CFLAGS_ARMV8_CRC32C=""
17997  pgac_armv8_crc32c_intrinsics=yes
17998fi
17999
18000if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
18001  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
18002$as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
18003if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
18004  $as_echo_n "(cached) " >&6
18005else
18006  pgac_save_CFLAGS=$CFLAGS
18007CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
18008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18009/* end confdefs.h.  */
18010#include <arm_acle.h>
18011int
18012main ()
18013{
18014unsigned int crc = 0;
18015   crc = __crc32cb(crc, 0);
18016   crc = __crc32ch(crc, 0);
18017   crc = __crc32cw(crc, 0);
18018   crc = __crc32cd(crc, 0);
18019   /* return computed value, to prevent the above being optimized away */
18020   return crc == 0;
18021  ;
18022  return 0;
18023}
18024_ACEOF
18025if ac_fn_c_try_link "$LINENO"; then :
18026  pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
18027else
18028  pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
18029fi
18030rm -f core conftest.err conftest.$ac_objext \
18031    conftest$ac_exeext conftest.$ac_ext
18032CFLAGS="$pgac_save_CFLAGS"
18033fi
18034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
18035$as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
18036if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
18037  CFLAGS_ARMV8_CRC32C="-march=armv8-a+crc"
18038  pgac_armv8_crc32c_intrinsics=yes
18039fi
18040
18041fi
18042
18043
18044# Select CRC-32C implementation.
18045#
18046# If we are targeting a processor that has Intel SSE 4.2 instructions, we can
18047# use the special CRC instructions for calculating CRC-32C. If we're not
18048# targeting such a processor, but we can nevertheless produce code that uses
18049# the SSE intrinsics, perhaps with some extra CFLAGS, compile both
18050# implementations and select which one to use at runtime, depending on whether
18051# SSE 4.2 is supported by the processor we're running on.
18052#
18053# Similarly, if we are targeting an ARM processor that has the CRC
18054# instructions that are part of the ARMv8 CRC Extension, use them. And if
18055# we're not targeting such a processor, but can nevertheless produce code that
18056# uses the CRC instructions, compile both, and select at runtime.
18057#
18058# You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
18059# in the template or configure command line.
18060if 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
18061  # Use Intel SSE 4.2 if available.
18062  if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
18063    USE_SSE42_CRC32C=1
18064  else
18065    # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
18066    # the runtime check.
18067    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
18068      USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
18069    else
18070      # Use ARM CRC Extension if available.
18071      if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_ARMV8_CRC32C" = x""; then
18072        USE_ARMV8_CRC32C=1
18073      else
18074        # ARM CRC Extension, with runtime check?
18075        if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
18076          USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
18077        else
18078          # fall back to slicing-by-8 algorithm, which doesn't require any
18079          # special CPU support.
18080          USE_SLICING_BY_8_CRC32C=1
18081	fi
18082      fi
18083    fi
18084  fi
18085fi
18086
18087# Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
18088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
18089$as_echo_n "checking which CRC-32C implementation to use... " >&6; }
18090if test x"$USE_SSE42_CRC32C" = x"1"; then
18091
18092$as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
18093
18094  PG_CRC32C_OBJS="pg_crc32c_sse42.o"
18095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
18096$as_echo "SSE 4.2" >&6; }
18097else
18098  if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18099
18100$as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18101
18102    PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
18103    { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
18104$as_echo "SSE 4.2 with runtime check" >&6; }
18105  else
18106    if test x"$USE_ARMV8_CRC32C" = x"1"; then
18107
18108$as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
18109
18110      PG_CRC32C_OBJS="pg_crc32c_armv8.o"
18111      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
18112$as_echo "ARMv8 CRC instructions" >&6; }
18113    else
18114      if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18115
18116$as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18117
18118        PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
18119        { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
18120$as_echo "ARMv8 CRC instructions with runtime check" >&6; }
18121      else
18122
18123$as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
18124
18125        PG_CRC32C_OBJS="pg_crc32c_sb8.o"
18126        { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
18127$as_echo "slicing-by-8" >&6; }
18128      fi
18129    fi
18130  fi
18131fi
18132
18133
18134
18135# Select semaphore implementation type.
18136if test "$PORTNAME" != "win32"; then
18137  if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
18138    # Need sem_open for this
18139    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
18140$as_echo_n "checking for library containing sem_open... " >&6; }
18141if ${ac_cv_search_sem_open+:} false; then :
18142  $as_echo_n "(cached) " >&6
18143else
18144  ac_func_search_save_LIBS=$LIBS
18145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18146/* end confdefs.h.  */
18147
18148/* Override any GCC internal prototype to avoid an error.
18149   Use char because int might match the return type of a GCC
18150   builtin and then its argument prototype would still apply.  */
18151#ifdef __cplusplus
18152extern "C"
18153#endif
18154char sem_open ();
18155int
18156main ()
18157{
18158return sem_open ();
18159  ;
18160  return 0;
18161}
18162_ACEOF
18163for ac_lib in '' rt pthread; do
18164  if test -z "$ac_lib"; then
18165    ac_res="none required"
18166  else
18167    ac_res=-l$ac_lib
18168    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18169  fi
18170  if ac_fn_c_try_link "$LINENO"; then :
18171  ac_cv_search_sem_open=$ac_res
18172fi
18173rm -f core conftest.err conftest.$ac_objext \
18174    conftest$ac_exeext
18175  if ${ac_cv_search_sem_open+:} false; then :
18176  break
18177fi
18178done
18179if ${ac_cv_search_sem_open+:} false; then :
18180
18181else
18182  ac_cv_search_sem_open=no
18183fi
18184rm conftest.$ac_ext
18185LIBS=$ac_func_search_save_LIBS
18186fi
18187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
18188$as_echo "$ac_cv_search_sem_open" >&6; }
18189ac_res=$ac_cv_search_sem_open
18190if test "$ac_res" != no; then :
18191  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18192  USE_NAMED_POSIX_SEMAPHORES=1
18193fi
18194
18195  fi
18196  if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
18197    # Need sem_init for this
18198    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
18199$as_echo_n "checking for library containing sem_init... " >&6; }
18200if ${ac_cv_search_sem_init+:} false; then :
18201  $as_echo_n "(cached) " >&6
18202else
18203  ac_func_search_save_LIBS=$LIBS
18204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18205/* end confdefs.h.  */
18206
18207/* Override any GCC internal prototype to avoid an error.
18208   Use char because int might match the return type of a GCC
18209   builtin and then its argument prototype would still apply.  */
18210#ifdef __cplusplus
18211extern "C"
18212#endif
18213char sem_init ();
18214int
18215main ()
18216{
18217return sem_init ();
18218  ;
18219  return 0;
18220}
18221_ACEOF
18222for ac_lib in '' rt pthread; do
18223  if test -z "$ac_lib"; then
18224    ac_res="none required"
18225  else
18226    ac_res=-l$ac_lib
18227    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18228  fi
18229  if ac_fn_c_try_link "$LINENO"; then :
18230  ac_cv_search_sem_init=$ac_res
18231fi
18232rm -f core conftest.err conftest.$ac_objext \
18233    conftest$ac_exeext
18234  if ${ac_cv_search_sem_init+:} false; then :
18235  break
18236fi
18237done
18238if ${ac_cv_search_sem_init+:} false; then :
18239
18240else
18241  ac_cv_search_sem_init=no
18242fi
18243rm conftest.$ac_ext
18244LIBS=$ac_func_search_save_LIBS
18245fi
18246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
18247$as_echo "$ac_cv_search_sem_init" >&6; }
18248ac_res=$ac_cv_search_sem_init
18249if test "$ac_res" != no; then :
18250  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18251  USE_UNNAMED_POSIX_SEMAPHORES=1
18252fi
18253
18254  fi
18255  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
18256$as_echo_n "checking which semaphore API to use... " >&6; }
18257  if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
18258
18259$as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18260
18261    SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18262    sematype="named POSIX"
18263  else
18264    if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
18265
18266$as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18267
18268      SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18269      sematype="unnamed POSIX"
18270    else
18271
18272$as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
18273
18274      SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
18275      sematype="System V"
18276    fi
18277  fi
18278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
18279$as_echo "$sematype" >&6; }
18280else
18281
18282$as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
18283
18284  SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
18285fi
18286
18287
18288# Select shared-memory implementation type.
18289if test "$PORTNAME" != "win32"; then
18290
18291$as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
18292
18293  SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
18294else
18295
18296$as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
18297
18298  SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
18299fi
18300
18301# Select random number source
18302#
18303# You can override this logic by setting the appropriate USE_*RANDOM flag to 1
18304# in the template or configure command line.
18305
18306# If not selected manually, try to select a source automatically.
18307if test x"$USE_OPENSSL_RANDOM" = x"" && test x"$USE_WIN32_RANDOM" = x"" && test x"$USE_DEV_URANDOM" = x"" ; then
18308  if test x"$with_openssl" = x"yes" ; then
18309    USE_OPENSSL_RANDOM=1
18310  elif test "$PORTNAME" = "win32" ; then
18311    USE_WIN32_RANDOM=1
18312  else
18313    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
18314$as_echo_n "checking for /dev/urandom... " >&6; }
18315if ${ac_cv_file__dev_urandom+:} false; then :
18316  $as_echo_n "(cached) " >&6
18317else
18318  test "$cross_compiling" = yes &&
18319  as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
18320if test -r "/dev/urandom"; then
18321  ac_cv_file__dev_urandom=yes
18322else
18323  ac_cv_file__dev_urandom=no
18324fi
18325fi
18326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
18327$as_echo "$ac_cv_file__dev_urandom" >&6; }
18328if test "x$ac_cv_file__dev_urandom" = xyes; then :
18329
18330fi
18331
18332
18333    if test x"$ac_cv_file__dev_urandom" = x"yes" ; then
18334      USE_DEV_URANDOM=1
18335    fi
18336  fi
18337fi
18338
18339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
18340$as_echo_n "checking which random number source to use... " >&6; }
18341if test x"$USE_OPENSSL_RANDOM" = x"1" ; then
18342
18343$as_echo "#define USE_OPENSSL_RANDOM 1" >>confdefs.h
18344
18345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
18346$as_echo "OpenSSL" >&6; }
18347elif test x"$USE_WIN32_RANDOM" = x"1" ; then
18348
18349$as_echo "#define USE_WIN32_RANDOM 1" >>confdefs.h
18350
18351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
18352$as_echo "Windows native" >&6; }
18353elif test x"$USE_DEV_URANDOM" = x"1" ; then
18354
18355$as_echo "#define USE_DEV_URANDOM 1" >>confdefs.h
18356
18357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
18358$as_echo "/dev/urandom" >&6; }
18359else
18360  as_fn_error $? "
18361no source of strong random numbers was found
18362PostgreSQL can use OpenSSL or /dev/urandom as a source of random numbers." "$LINENO" 5
18363fi
18364
18365# If not set in template file, set bytes to use libc memset()
18366if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
18367  MEMSET_LOOP_LIMIT=1024
18368fi
18369
18370cat >>confdefs.h <<_ACEOF
18371#define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
18372_ACEOF
18373
18374
18375
18376if test "$enable_nls" = yes ; then
18377
18378  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
18379$as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
18380if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18381  $as_echo_n "(cached) " >&6
18382else
18383  ac_func_search_save_LIBS=$LIBS
18384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18385/* end confdefs.h.  */
18386
18387/* Override any GCC internal prototype to avoid an error.
18388   Use char because int might match the return type of a GCC
18389   builtin and then its argument prototype would still apply.  */
18390#ifdef __cplusplus
18391extern "C"
18392#endif
18393char bind_textdomain_codeset ();
18394int
18395main ()
18396{
18397return bind_textdomain_codeset ();
18398  ;
18399  return 0;
18400}
18401_ACEOF
18402for ac_lib in '' intl; do
18403  if test -z "$ac_lib"; then
18404    ac_res="none required"
18405  else
18406    ac_res=-l$ac_lib
18407    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18408  fi
18409  if ac_fn_c_try_link "$LINENO"; then :
18410  ac_cv_search_bind_textdomain_codeset=$ac_res
18411fi
18412rm -f core conftest.err conftest.$ac_objext \
18413    conftest$ac_exeext
18414  if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18415  break
18416fi
18417done
18418if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18419
18420else
18421  ac_cv_search_bind_textdomain_codeset=no
18422fi
18423rm conftest.$ac_ext
18424LIBS=$ac_func_search_save_LIBS
18425fi
18426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
18427$as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
18428ac_res=$ac_cv_search_bind_textdomain_codeset
18429if test "$ac_res" != no; then :
18430  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18431
18432else
18433  as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
18434fi
18435
18436  ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
18437if test "x$ac_cv_header_libintl_h" = xyes; then :
18438
18439else
18440  as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
18441fi
18442
18443
18444  if test -z "$MSGFMT"; then
18445  for ac_prog in msgfmt
18446do
18447  # Extract the first word of "$ac_prog", so it can be a program name with args.
18448set dummy $ac_prog; ac_word=$2
18449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18450$as_echo_n "checking for $ac_word... " >&6; }
18451if ${ac_cv_path_MSGFMT+:} false; then :
18452  $as_echo_n "(cached) " >&6
18453else
18454  case $MSGFMT in
18455  [\\/]* | ?:[\\/]*)
18456  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
18457  ;;
18458  *)
18459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18460for as_dir in $PATH
18461do
18462  IFS=$as_save_IFS
18463  test -z "$as_dir" && as_dir=.
18464    for ac_exec_ext in '' $ac_executable_extensions; do
18465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18466    ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
18467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18468    break 2
18469  fi
18470done
18471  done
18472IFS=$as_save_IFS
18473
18474  ;;
18475esac
18476fi
18477MSGFMT=$ac_cv_path_MSGFMT
18478if test -n "$MSGFMT"; then
18479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18480$as_echo "$MSGFMT" >&6; }
18481else
18482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18483$as_echo "no" >&6; }
18484fi
18485
18486
18487  test -n "$MSGFMT" && break
18488done
18489
18490else
18491  # Report the value of MSGFMT in configure's output in all cases.
18492  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
18493$as_echo_n "checking for MSGFMT... " >&6; }
18494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18495$as_echo "$MSGFMT" >&6; }
18496fi
18497
18498    if test -z "$MSGFMT"; then
18499    as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
18500  fi
18501  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
18502$as_echo_n "checking for msgfmt flags... " >&6; }
18503if ${pgac_cv_msgfmt_flags+:} false; then :
18504  $as_echo_n "(cached) " >&6
18505else
18506  if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
18507    pgac_cv_msgfmt_flags=-c
18508fi
18509fi
18510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
18511$as_echo "$pgac_cv_msgfmt_flags" >&6; }
18512  MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
18513
18514  if test -z "$MSGMERGE"; then
18515  for ac_prog in msgmerge
18516do
18517  # Extract the first word of "$ac_prog", so it can be a program name with args.
18518set dummy $ac_prog; ac_word=$2
18519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18520$as_echo_n "checking for $ac_word... " >&6; }
18521if ${ac_cv_path_MSGMERGE+:} false; then :
18522  $as_echo_n "(cached) " >&6
18523else
18524  case $MSGMERGE in
18525  [\\/]* | ?:[\\/]*)
18526  ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18527  ;;
18528  *)
18529  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18530for as_dir in $PATH
18531do
18532  IFS=$as_save_IFS
18533  test -z "$as_dir" && as_dir=.
18534    for ac_exec_ext in '' $ac_executable_extensions; do
18535  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18536    ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
18537    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18538    break 2
18539  fi
18540done
18541  done
18542IFS=$as_save_IFS
18543
18544  ;;
18545esac
18546fi
18547MSGMERGE=$ac_cv_path_MSGMERGE
18548if test -n "$MSGMERGE"; then
18549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18550$as_echo "$MSGMERGE" >&6; }
18551else
18552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18553$as_echo "no" >&6; }
18554fi
18555
18556
18557  test -n "$MSGMERGE" && break
18558done
18559
18560else
18561  # Report the value of MSGMERGE in configure's output in all cases.
18562  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18563$as_echo_n "checking for MSGMERGE... " >&6; }
18564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18565$as_echo "$MSGMERGE" >&6; }
18566fi
18567
18568  if test -z "$XGETTEXT"; then
18569  for ac_prog in xgettext
18570do
18571  # Extract the first word of "$ac_prog", so it can be a program name with args.
18572set dummy $ac_prog; ac_word=$2
18573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18574$as_echo_n "checking for $ac_word... " >&6; }
18575if ${ac_cv_path_XGETTEXT+:} false; then :
18576  $as_echo_n "(cached) " >&6
18577else
18578  case $XGETTEXT in
18579  [\\/]* | ?:[\\/]*)
18580  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18581  ;;
18582  *)
18583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18584for as_dir in $PATH
18585do
18586  IFS=$as_save_IFS
18587  test -z "$as_dir" && as_dir=.
18588    for ac_exec_ext in '' $ac_executable_extensions; do
18589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18590    ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18592    break 2
18593  fi
18594done
18595  done
18596IFS=$as_save_IFS
18597
18598  ;;
18599esac
18600fi
18601XGETTEXT=$ac_cv_path_XGETTEXT
18602if test -n "$XGETTEXT"; then
18603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18604$as_echo "$XGETTEXT" >&6; }
18605else
18606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18607$as_echo "no" >&6; }
18608fi
18609
18610
18611  test -n "$XGETTEXT" && break
18612done
18613
18614else
18615  # Report the value of XGETTEXT in configure's output in all cases.
18616  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18617$as_echo_n "checking for XGETTEXT... " >&6; }
18618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18619$as_echo "$XGETTEXT" >&6; }
18620fi
18621
18622
18623fi
18624
18625# Check for Tcl configuration script tclConfig.sh
18626if test "$with_tcl" = yes; then
18627    if test -z "$TCLSH"; then
18628  for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18629do
18630  # Extract the first word of "$ac_prog", so it can be a program name with args.
18631set dummy $ac_prog; ac_word=$2
18632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18633$as_echo_n "checking for $ac_word... " >&6; }
18634if ${ac_cv_path_TCLSH+:} false; then :
18635  $as_echo_n "(cached) " >&6
18636else
18637  case $TCLSH in
18638  [\\/]* | ?:[\\/]*)
18639  ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18640  ;;
18641  *)
18642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18643for as_dir in $PATH
18644do
18645  IFS=$as_save_IFS
18646  test -z "$as_dir" && as_dir=.
18647    for ac_exec_ext in '' $ac_executable_extensions; do
18648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18649    ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18651    break 2
18652  fi
18653done
18654  done
18655IFS=$as_save_IFS
18656
18657  ;;
18658esac
18659fi
18660TCLSH=$ac_cv_path_TCLSH
18661if test -n "$TCLSH"; then
18662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18663$as_echo "$TCLSH" >&6; }
18664else
18665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18666$as_echo "no" >&6; }
18667fi
18668
18669
18670  test -n "$TCLSH" && break
18671done
18672
18673else
18674  # Report the value of TCLSH in configure's output in all cases.
18675  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18676$as_echo_n "checking for TCLSH... " >&6; }
18677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18678$as_echo "$TCLSH" >&6; }
18679fi
18680
18681if test x"$TCLSH" = x""; then
18682  as_fn_error $? "Tcl shell not found" "$LINENO" 5
18683fi
18684
18685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18686$as_echo_n "checking for tclConfig.sh... " >&6; }
18687# Let user override test
18688if test -z "$TCL_CONFIG_SH"; then
18689    pgac_test_dirs="$with_tclconfig"
18690
18691    set X $pgac_test_dirs; shift
18692    if test $# -eq 0; then
18693        test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18694        pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18695        # On newer macOS, $auto_path frequently doesn't include the place
18696        # where tclConfig.sh actually lives.  Append that to the end, so as not
18697        # to break cases where a non-default Tcl installation is being used.
18698        if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18699            pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18700        fi
18701        set X $pgac_test_dirs; shift
18702    fi
18703
18704    for pgac_dir do
18705        if test -r "$pgac_dir/tclConfig.sh"; then
18706            TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18707            break
18708        fi
18709    done
18710fi
18711
18712if test -z "$TCL_CONFIG_SH"; then
18713    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18714$as_echo "no" >&6; }
18715    as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18716else
18717    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18718$as_echo "$TCL_CONFIG_SH" >&6; }
18719fi
18720
18721
18722
18723    . "$TCL_CONFIG_SH"
18724eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18725eval TCL_LIBS=\"$TCL_LIBS\"
18726eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18727eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18728
18729        if test "$TCL_SHARED_BUILD" != 1; then
18730      as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18731Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18732    fi
18733    # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18734    ac_save_CPPFLAGS=$CPPFLAGS
18735    CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18736    ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18737if test "x$ac_cv_header_tcl_h" = xyes; then :
18738
18739else
18740  as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18741fi
18742
18743
18744    CPPFLAGS=$ac_save_CPPFLAGS
18745fi
18746
18747# check for <perl.h>
18748if test "$with_perl" = yes; then
18749  ac_save_CPPFLAGS=$CPPFLAGS
18750  CPPFLAGS="$CPPFLAGS $perl_includespec"
18751  ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18752"
18753if test "x$ac_cv_header_perl_h" = xyes; then :
18754
18755else
18756  as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18757fi
18758
18759
18760  # While we're at it, check that we can link to libperl.
18761  # On most platforms, if perl.h is there then libperl.so will be too, but at
18762  # this writing Debian packages them separately.  There is no known reason to
18763  # waste cycles on separate probes for the Tcl or Python libraries, though.
18764  # On some Red Hat platforms, the link attempt can fail if we don't use
18765  # CFLAGS_SL while building the test program.
18766  ac_save_CFLAGS=$CFLAGS
18767  CFLAGS="$CFLAGS $CFLAGS_SL"
18768  pgac_save_LIBS=$LIBS
18769  LIBS="$perl_embed_ldflags"
18770  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18771$as_echo_n "checking for libperl... " >&6; }
18772  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18773/* end confdefs.h.  */
18774
18775#include <EXTERN.h>
18776#include <perl.h>
18777
18778int
18779main ()
18780{
18781perl_alloc();
18782  ;
18783  return 0;
18784}
18785_ACEOF
18786if ac_fn_c_try_link "$LINENO"; then :
18787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18788$as_echo "yes" >&6; }
18789else
18790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18791$as_echo "no" >&6; }
18792     as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18793fi
18794rm -f core conftest.err conftest.$ac_objext \
18795    conftest$ac_exeext conftest.$ac_ext
18796  LIBS=$pgac_save_LIBS
18797  CFLAGS=$ac_save_CFLAGS
18798  CPPFLAGS=$ac_save_CPPFLAGS
18799fi
18800
18801# check for <Python.h>
18802if test "$with_python" = yes; then
18803  ac_save_CPPFLAGS=$CPPFLAGS
18804  CPPFLAGS="$python_includespec $CPPFLAGS"
18805  ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18806if test "x$ac_cv_header_Python_h" = xyes; then :
18807
18808else
18809  as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18810fi
18811
18812
18813  CPPFLAGS=$ac_save_CPPFLAGS
18814fi
18815
18816#
18817# Check for documentation-building tools
18818#
18819if test -z "$XMLLINT"; then
18820  for ac_prog in xmllint
18821do
18822  # Extract the first word of "$ac_prog", so it can be a program name with args.
18823set dummy $ac_prog; ac_word=$2
18824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18825$as_echo_n "checking for $ac_word... " >&6; }
18826if ${ac_cv_path_XMLLINT+:} false; then :
18827  $as_echo_n "(cached) " >&6
18828else
18829  case $XMLLINT in
18830  [\\/]* | ?:[\\/]*)
18831  ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18832  ;;
18833  *)
18834  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18835for as_dir in $PATH
18836do
18837  IFS=$as_save_IFS
18838  test -z "$as_dir" && as_dir=.
18839    for ac_exec_ext in '' $ac_executable_extensions; do
18840  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18841    ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18842    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18843    break 2
18844  fi
18845done
18846  done
18847IFS=$as_save_IFS
18848
18849  ;;
18850esac
18851fi
18852XMLLINT=$ac_cv_path_XMLLINT
18853if test -n "$XMLLINT"; then
18854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18855$as_echo "$XMLLINT" >&6; }
18856else
18857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18858$as_echo "no" >&6; }
18859fi
18860
18861
18862  test -n "$XMLLINT" && break
18863done
18864
18865else
18866  # Report the value of XMLLINT in configure's output in all cases.
18867  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18868$as_echo_n "checking for XMLLINT... " >&6; }
18869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18870$as_echo "$XMLLINT" >&6; }
18871fi
18872
18873if test -z "$XSLTPROC"; then
18874  for ac_prog in xsltproc
18875do
18876  # Extract the first word of "$ac_prog", so it can be a program name with args.
18877set dummy $ac_prog; ac_word=$2
18878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18879$as_echo_n "checking for $ac_word... " >&6; }
18880if ${ac_cv_path_XSLTPROC+:} false; then :
18881  $as_echo_n "(cached) " >&6
18882else
18883  case $XSLTPROC in
18884  [\\/]* | ?:[\\/]*)
18885  ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18886  ;;
18887  *)
18888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18889for as_dir in $PATH
18890do
18891  IFS=$as_save_IFS
18892  test -z "$as_dir" && as_dir=.
18893    for ac_exec_ext in '' $ac_executable_extensions; do
18894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18895    ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18897    break 2
18898  fi
18899done
18900  done
18901IFS=$as_save_IFS
18902
18903  ;;
18904esac
18905fi
18906XSLTPROC=$ac_cv_path_XSLTPROC
18907if test -n "$XSLTPROC"; then
18908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18909$as_echo "$XSLTPROC" >&6; }
18910else
18911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18912$as_echo "no" >&6; }
18913fi
18914
18915
18916  test -n "$XSLTPROC" && break
18917done
18918
18919else
18920  # Report the value of XSLTPROC in configure's output in all cases.
18921  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18922$as_echo_n "checking for XSLTPROC... " >&6; }
18923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18924$as_echo "$XSLTPROC" >&6; }
18925fi
18926
18927if test -z "$FOP"; then
18928  for ac_prog in fop
18929do
18930  # Extract the first word of "$ac_prog", so it can be a program name with args.
18931set dummy $ac_prog; ac_word=$2
18932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18933$as_echo_n "checking for $ac_word... " >&6; }
18934if ${ac_cv_path_FOP+:} false; then :
18935  $as_echo_n "(cached) " >&6
18936else
18937  case $FOP in
18938  [\\/]* | ?:[\\/]*)
18939  ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
18940  ;;
18941  *)
18942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18943for as_dir in $PATH
18944do
18945  IFS=$as_save_IFS
18946  test -z "$as_dir" && as_dir=.
18947    for ac_exec_ext in '' $ac_executable_extensions; do
18948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18949    ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
18950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18951    break 2
18952  fi
18953done
18954  done
18955IFS=$as_save_IFS
18956
18957  ;;
18958esac
18959fi
18960FOP=$ac_cv_path_FOP
18961if test -n "$FOP"; then
18962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18963$as_echo "$FOP" >&6; }
18964else
18965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18966$as_echo "no" >&6; }
18967fi
18968
18969
18970  test -n "$FOP" && break
18971done
18972
18973else
18974  # Report the value of FOP in configure's output in all cases.
18975  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
18976$as_echo_n "checking for FOP... " >&6; }
18977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18978$as_echo "$FOP" >&6; }
18979fi
18980
18981if test -z "$DBTOEPUB"; then
18982  for ac_prog in dbtoepub
18983do
18984  # Extract the first word of "$ac_prog", so it can be a program name with args.
18985set dummy $ac_prog; ac_word=$2
18986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18987$as_echo_n "checking for $ac_word... " >&6; }
18988if ${ac_cv_path_DBTOEPUB+:} false; then :
18989  $as_echo_n "(cached) " >&6
18990else
18991  case $DBTOEPUB in
18992  [\\/]* | ?:[\\/]*)
18993  ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
18994  ;;
18995  *)
18996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18997for as_dir in $PATH
18998do
18999  IFS=$as_save_IFS
19000  test -z "$as_dir" && as_dir=.
19001    for ac_exec_ext in '' $ac_executable_extensions; do
19002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19003    ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
19004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19005    break 2
19006  fi
19007done
19008  done
19009IFS=$as_save_IFS
19010
19011  ;;
19012esac
19013fi
19014DBTOEPUB=$ac_cv_path_DBTOEPUB
19015if test -n "$DBTOEPUB"; then
19016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
19017$as_echo "$DBTOEPUB" >&6; }
19018else
19019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19020$as_echo "no" >&6; }
19021fi
19022
19023
19024  test -n "$DBTOEPUB" && break
19025done
19026
19027else
19028  # Report the value of DBTOEPUB in configure's output in all cases.
19029  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
19030$as_echo_n "checking for DBTOEPUB... " >&6; }
19031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
19032$as_echo "$DBTOEPUB" >&6; }
19033fi
19034
19035
19036#
19037# Check for test tools
19038#
19039if test "$enable_tap_tests" = yes; then
19040  # Check for necessary modules, unless user has specified the "prove" to use;
19041  # in that case it's her responsibility to have a working configuration.
19042  # (prove might be part of a different Perl installation than perl, eg on
19043  # MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)
19044  if test -z "$PROVE"; then
19045    # Test::More and Time::HiRes are supposed to be part of core Perl,
19046    # but some distros omit them in a minimal installation.
19047
19048
19049
19050
19051
19052
19053
19054
19055
19056
19057# Make sure we have perl
19058if test -z "$PERL"; then
19059# Extract the first word of "perl", so it can be a program name with args.
19060set dummy perl; ac_word=$2
19061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19062$as_echo_n "checking for $ac_word... " >&6; }
19063if ${ac_cv_prog_PERL+:} false; then :
19064  $as_echo_n "(cached) " >&6
19065else
19066  if test -n "$PERL"; then
19067  ac_cv_prog_PERL="$PERL" # Let the user override the test.
19068else
19069as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19070for as_dir in $PATH
19071do
19072  IFS=$as_save_IFS
19073  test -z "$as_dir" && as_dir=.
19074    for ac_exec_ext in '' $ac_executable_extensions; do
19075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19076    ac_cv_prog_PERL="perl"
19077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19078    break 2
19079  fi
19080done
19081  done
19082IFS=$as_save_IFS
19083
19084fi
19085fi
19086PERL=$ac_cv_prog_PERL
19087if test -n "$PERL"; then
19088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
19089$as_echo "$PERL" >&6; }
19090else
19091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19092$as_echo "no" >&6; }
19093fi
19094
19095
19096fi
19097
19098if test "x$PERL" != x; then
19099  ax_perl_modules_failed=0
19100  for ax_perl_module in 'IPC::Run' 'Test::More 0.87' 'Time::HiRes' ; do
19101    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl module $ax_perl_module" >&5
19102$as_echo_n "checking for perl module $ax_perl_module... " >&6; }
19103
19104    # Would be nice to log result here, but can't rely on autoconf internals
19105    $PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1
19106    if test $? -ne 0; then
19107      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19108$as_echo "no" >&6; };
19109      ax_perl_modules_failed=1
19110   else
19111      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
19112$as_echo "ok" >&6; };
19113    fi
19114  done
19115
19116  # Run optional shell commands
19117  if test "$ax_perl_modules_failed" = 0; then
19118    :
19119
19120  else
19121    :
19122    as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
19123  fi
19124else
19125  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5
19126$as_echo "$as_me: WARNING: could not find perl" >&2;}
19127fi
19128  fi
19129  # Now make sure we know where prove is
19130  if test -z "$PROVE"; then
19131  for ac_prog in prove
19132do
19133  # Extract the first word of "$ac_prog", so it can be a program name with args.
19134set dummy $ac_prog; ac_word=$2
19135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19136$as_echo_n "checking for $ac_word... " >&6; }
19137if ${ac_cv_path_PROVE+:} false; then :
19138  $as_echo_n "(cached) " >&6
19139else
19140  case $PROVE in
19141  [\\/]* | ?:[\\/]*)
19142  ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
19143  ;;
19144  *)
19145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19146for as_dir in $PATH
19147do
19148  IFS=$as_save_IFS
19149  test -z "$as_dir" && as_dir=.
19150    for ac_exec_ext in '' $ac_executable_extensions; do
19151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19152    ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
19153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19154    break 2
19155  fi
19156done
19157  done
19158IFS=$as_save_IFS
19159
19160  ;;
19161esac
19162fi
19163PROVE=$ac_cv_path_PROVE
19164if test -n "$PROVE"; then
19165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19166$as_echo "$PROVE" >&6; }
19167else
19168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19169$as_echo "no" >&6; }
19170fi
19171
19172
19173  test -n "$PROVE" && break
19174done
19175
19176else
19177  # Report the value of PROVE in configure's output in all cases.
19178  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
19179$as_echo_n "checking for PROVE... " >&6; }
19180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19181$as_echo "$PROVE" >&6; }
19182fi
19183
19184  if test -z "$PROVE"; then
19185    as_fn_error $? "prove not found" "$LINENO" 5
19186  fi
19187fi
19188
19189# Thread testing
19190
19191# We have to run the thread test near the end so we have all our symbols
19192# defined.  Cross compiling throws a warning.
19193#
19194if test "$enable_thread_safety" = yes; then
19195if test "$PORTNAME" != "win32"
19196then
19197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
19198$as_echo_n "checking thread safety of required library functions... " >&6; }
19199
19200_CFLAGS="$CFLAGS"
19201_LIBS="$LIBS"
19202CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
19203LIBS="$LIBS $PTHREAD_LIBS"
19204if test "$cross_compiling" = yes; then :
19205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
19206$as_echo "maybe" >&6; }
19207  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
19208*** Skipping thread test program because of cross-compile build.
19209*** Run the program in src/test/thread on the target machine.
19210" >&5
19211$as_echo "$as_me: WARNING:
19212*** Skipping thread test program because of cross-compile build.
19213*** Run the program in src/test/thread on the target machine.
19214" >&2;}
19215else
19216  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19217/* end confdefs.h.  */
19218#include "$srcdir/src/test/thread/thread_test.c"
19219_ACEOF
19220if ac_fn_c_try_run "$LINENO"; then :
19221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19222$as_echo "yes" >&6; }
19223else
19224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19225$as_echo "no" >&6; }
19226  as_fn_error $? "thread test program failed
19227This platform is not thread-safe.  Check the file 'config.log' or compile
19228and run src/test/thread/thread_test for the exact reason.
19229Use --disable-thread-safety to disable thread safety." "$LINENO" 5
19230fi
19231rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19232  conftest.$ac_objext conftest.beam conftest.$ac_ext
19233fi
19234
19235CFLAGS="$_CFLAGS"
19236LIBS="$_LIBS"
19237else
19238{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
19239$as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
19240fi
19241fi
19242
19243# If compiler will take -Wl,--as-needed (or various platform-specific
19244# spellings thereof) then add that to LDFLAGS.  This is much easier than
19245# trying to filter LIBS to the minimum for each executable.
19246# On (at least) some Red-Hat-derived systems, this switch breaks linking to
19247# libreadline; therefore we postpone testing it until we know what library
19248# dependencies readline has.  The test code will try to link with $LIBS.
19249if test "$with_readline" = yes; then
19250  link_test_func=readline
19251else
19252  link_test_func=exit
19253fi
19254
19255if test "$PORTNAME" = "darwin"; then
19256  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
19257$as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
19258if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
19259  $as_echo_n "(cached) " >&6
19260else
19261  pgac_save_LDFLAGS=$LDFLAGS
19262LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
19263if test "$cross_compiling" = yes; then :
19264  pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
19265else
19266  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19267/* end confdefs.h.  */
19268extern void $link_test_func (); void (*fptr) () = $link_test_func;
19269int
19270main ()
19271{
19272
19273  ;
19274  return 0;
19275}
19276_ACEOF
19277if ac_fn_c_try_run "$LINENO"; then :
19278  pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
19279else
19280  pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
19281fi
19282rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19283  conftest.$ac_objext conftest.beam conftest.$ac_ext
19284fi
19285
19286LDFLAGS="$pgac_save_LDFLAGS"
19287fi
19288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
19289$as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
19290if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
19291  LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
19292fi
19293
19294elif test "$PORTNAME" = "openbsd"; then
19295  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
19296$as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
19297if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
19298  $as_echo_n "(cached) " >&6
19299else
19300  pgac_save_LDFLAGS=$LDFLAGS
19301LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
19302if test "$cross_compiling" = yes; then :
19303  pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
19304else
19305  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19306/* end confdefs.h.  */
19307extern void $link_test_func (); void (*fptr) () = $link_test_func;
19308int
19309main ()
19310{
19311
19312  ;
19313  return 0;
19314}
19315_ACEOF
19316if ac_fn_c_try_run "$LINENO"; then :
19317  pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
19318else
19319  pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
19320fi
19321rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19322  conftest.$ac_objext conftest.beam conftest.$ac_ext
19323fi
19324
19325LDFLAGS="$pgac_save_LDFLAGS"
19326fi
19327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
19328$as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
19329if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
19330  LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
19331fi
19332
19333else
19334  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
19335$as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
19336if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
19337  $as_echo_n "(cached) " >&6
19338else
19339  pgac_save_LDFLAGS=$LDFLAGS
19340LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
19341if test "$cross_compiling" = yes; then :
19342  pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
19343else
19344  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19345/* end confdefs.h.  */
19346extern void $link_test_func (); void (*fptr) () = $link_test_func;
19347int
19348main ()
19349{
19350
19351  ;
19352  return 0;
19353}
19354_ACEOF
19355if ac_fn_c_try_run "$LINENO"; then :
19356  pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
19357else
19358  pgac_cv_prog_cc_ldflags__Wl___as_needed=no
19359fi
19360rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19361  conftest.$ac_objext conftest.beam conftest.$ac_ext
19362fi
19363
19364LDFLAGS="$pgac_save_LDFLAGS"
19365fi
19366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
19367$as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
19368if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
19369  LDFLAGS="$LDFLAGS -Wl,--as-needed"
19370fi
19371
19372fi
19373
19374# Create compiler version string
19375if test x"$GCC" = x"yes" ; then
19376  cc_string=`${CC} --version | sed q`
19377  case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
19378elif test x"$SUN_STUDIO_CC" = x"yes" ; then
19379  cc_string=`${CC} -V 2>&1 | sed q`
19380else
19381  cc_string=$CC
19382fi
19383
19384
19385cat >>confdefs.h <<_ACEOF
19386#define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
19387_ACEOF
19388
19389
19390# Supply a numeric version string for use by 3rd party add-ons
19391# awk -F is a regex on some platforms, and not on others, so make "." a tab
19392PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
19393tr '.' '	' |
19394$AWK '{printf "%d%04d", $1, $2}'`"
19395
19396cat >>confdefs.h <<_ACEOF
19397#define PG_VERSION_NUM $PG_VERSION_NUM
19398_ACEOF
19399
19400
19401
19402# If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
19403# literally, so that it's possible to override it at build time using
19404# a command like "make ... PG_SYSROOT=path".  This has to be done after
19405# we've finished all configure checks that depend on CPPFLAGS.
19406# The same for LDFLAGS, too.
19407if test x"$PG_SYSROOT" != x; then
19408  CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19409  LDFLAGS=`echo "$LDFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19410fi
19411
19412
19413
19414# Begin output steps
19415
19416{ $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
19417$as_echo "$as_me: using compiler=$cc_string" >&6;}
19418{ $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
19419$as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
19420{ $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
19421$as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
19422{ $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
19423$as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
19424# Currently only used when LLVM is used
19425if test "$with_llvm" = yes ; then
19426   { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
19427$as_echo "$as_me: using CXX=$CXX" >&6;}
19428   { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
19429$as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
19430   { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
19431$as_echo "$as_me: using CLANG=$CLANG" >&6;}
19432   { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
19433$as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
19434   { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
19435$as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
19436fi
19437
19438# prepare build tree if outside source tree
19439# Note 1: test -ef might not exist, but it's more reliable than `pwd`.
19440# Note 2: /bin/pwd might be better than shell's built-in at getting
19441#         a symlink-free name.
19442if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
19443  vpath_build=no
19444else
19445  vpath_build=yes
19446  if test "$no_create" != yes; then
19447    $as_echo_n "preparing build tree... " >&6
19448    pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
19449    $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
19450      || as_fn_error $? "failed" "$LINENO" 5
19451    { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
19452$as_echo "done" >&6; }
19453  fi
19454fi
19455
19456
19457
19458ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
19459
19460
19461ac_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}"
19462
19463
19464if test "$PORTNAME" = "win32"; then
19465ac_config_commands="$ac_config_commands check_win32_symlinks"
19466
19467fi
19468
19469ac_config_headers="$ac_config_headers src/include/pg_config.h"
19470
19471
19472ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
19473
19474
19475ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
19476
19477
19478cat >confcache <<\_ACEOF
19479# This file is a shell script that caches the results of configure
19480# tests run on this system so they can be shared between configure
19481# scripts and configure runs, see configure's option --config-cache.
19482# It is not useful on other systems.  If it contains results you don't
19483# want to keep, you may remove or edit it.
19484#
19485# config.status only pays attention to the cache file if you give it
19486# the --recheck option to rerun configure.
19487#
19488# `ac_cv_env_foo' variables (set or unset) will be overridden when
19489# loading this file, other *unset* `ac_cv_foo' will be assigned the
19490# following values.
19491
19492_ACEOF
19493
19494# The following way of writing the cache mishandles newlines in values,
19495# but we know of no workaround that is simple, portable, and efficient.
19496# So, we kill variables containing newlines.
19497# Ultrix sh set writes to stderr and can't be redirected directly,
19498# and sets the high bit in the cache file unless we assign to the vars.
19499(
19500  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19501    eval ac_val=\$$ac_var
19502    case $ac_val in #(
19503    *${as_nl}*)
19504      case $ac_var in #(
19505      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19506$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19507      esac
19508      case $ac_var in #(
19509      _ | IFS | as_nl) ;; #(
19510      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19511      *) { eval $ac_var=; unset $ac_var;} ;;
19512      esac ;;
19513    esac
19514  done
19515
19516  (set) 2>&1 |
19517    case $as_nl`(ac_space=' '; set) 2>&1` in #(
19518    *${as_nl}ac_space=\ *)
19519      # `set' does not quote correctly, so add quotes: double-quote
19520      # substitution turns \\\\ into \\, and sed turns \\ into \.
19521      sed -n \
19522	"s/'/'\\\\''/g;
19523	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19524      ;; #(
19525    *)
19526      # `set' quotes correctly as required by POSIX, so do not add quotes.
19527      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19528      ;;
19529    esac |
19530    sort
19531) |
19532  sed '
19533     /^ac_cv_env_/b end
19534     t clear
19535     :clear
19536     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19537     t end
19538     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19539     :end' >>confcache
19540if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19541  if test -w "$cache_file"; then
19542    if test "x$cache_file" != "x/dev/null"; then
19543      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19544$as_echo "$as_me: updating cache $cache_file" >&6;}
19545      if test ! -f "$cache_file" || test -h "$cache_file"; then
19546	cat confcache >"$cache_file"
19547      else
19548        case $cache_file in #(
19549        */* | ?:*)
19550	  mv -f confcache "$cache_file"$$ &&
19551	  mv -f "$cache_file"$$ "$cache_file" ;; #(
19552        *)
19553	  mv -f confcache "$cache_file" ;;
19554	esac
19555      fi
19556    fi
19557  else
19558    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19559$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19560  fi
19561fi
19562rm -f confcache
19563
19564test "x$prefix" = xNONE && prefix=$ac_default_prefix
19565# Let make expand exec_prefix.
19566test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19567
19568DEFS=-DHAVE_CONFIG_H
19569
19570ac_libobjs=
19571ac_ltlibobjs=
19572U=
19573for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19574  # 1. Remove the extension, and $U if already installed.
19575  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19576  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19577  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
19578  #    will be set to the directory where LIBOBJS objects are built.
19579  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19580  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19581done
19582LIBOBJS=$ac_libobjs
19583
19584LTLIBOBJS=$ac_ltlibobjs
19585
19586
19587
19588
19589: "${CONFIG_STATUS=./config.status}"
19590ac_write_fail=0
19591ac_clean_files_save=$ac_clean_files
19592ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19593{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19594$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19595as_write_fail=0
19596cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19597#! $SHELL
19598# Generated by $as_me.
19599# Run this file to recreate the current configuration.
19600# Compiler output produced by configure, useful for debugging
19601# configure, is in config.log if it exists.
19602
19603debug=false
19604ac_cs_recheck=false
19605ac_cs_silent=false
19606
19607SHELL=\${CONFIG_SHELL-$SHELL}
19608export SHELL
19609_ASEOF
19610cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19611## -------------------- ##
19612## M4sh Initialization. ##
19613## -------------------- ##
19614
19615# Be more Bourne compatible
19616DUALCASE=1; export DUALCASE # for MKS sh
19617if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19618  emulate sh
19619  NULLCMD=:
19620  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19621  # is contrary to our usage.  Disable this feature.
19622  alias -g '${1+"$@"}'='"$@"'
19623  setopt NO_GLOB_SUBST
19624else
19625  case `(set -o) 2>/dev/null` in #(
19626  *posix*) :
19627    set -o posix ;; #(
19628  *) :
19629     ;;
19630esac
19631fi
19632
19633
19634as_nl='
19635'
19636export as_nl
19637# Printing a long string crashes Solaris 7 /usr/bin/printf.
19638as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19639as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19640as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19641# Prefer a ksh shell builtin over an external printf program on Solaris,
19642# but without wasting forks for bash or zsh.
19643if test -z "$BASH_VERSION$ZSH_VERSION" \
19644    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19645  as_echo='print -r --'
19646  as_echo_n='print -rn --'
19647elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19648  as_echo='printf %s\n'
19649  as_echo_n='printf %s'
19650else
19651  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19652    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19653    as_echo_n='/usr/ucb/echo -n'
19654  else
19655    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19656    as_echo_n_body='eval
19657      arg=$1;
19658      case $arg in #(
19659      *"$as_nl"*)
19660	expr "X$arg" : "X\\(.*\\)$as_nl";
19661	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19662      esac;
19663      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19664    '
19665    export as_echo_n_body
19666    as_echo_n='sh -c $as_echo_n_body as_echo'
19667  fi
19668  export as_echo_body
19669  as_echo='sh -c $as_echo_body as_echo'
19670fi
19671
19672# The user is always right.
19673if test "${PATH_SEPARATOR+set}" != set; then
19674  PATH_SEPARATOR=:
19675  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19676    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19677      PATH_SEPARATOR=';'
19678  }
19679fi
19680
19681
19682# IFS
19683# We need space, tab and new line, in precisely that order.  Quoting is
19684# there to prevent editors from complaining about space-tab.
19685# (If _AS_PATH_WALK were called with IFS unset, it would disable word
19686# splitting by setting IFS to empty value.)
19687IFS=" ""	$as_nl"
19688
19689# Find who we are.  Look in the path if we contain no directory separator.
19690as_myself=
19691case $0 in #((
19692  *[\\/]* ) as_myself=$0 ;;
19693  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19694for as_dir in $PATH
19695do
19696  IFS=$as_save_IFS
19697  test -z "$as_dir" && as_dir=.
19698    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19699  done
19700IFS=$as_save_IFS
19701
19702     ;;
19703esac
19704# We did not find ourselves, most probably we were run as `sh COMMAND'
19705# in which case we are not to be found in the path.
19706if test "x$as_myself" = x; then
19707  as_myself=$0
19708fi
19709if test ! -f "$as_myself"; then
19710  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19711  exit 1
19712fi
19713
19714# Unset variables that we do not need and which cause bugs (e.g. in
19715# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
19716# suppresses any "Segmentation fault" message there.  '((' could
19717# trigger a bug in pdksh 5.2.14.
19718for as_var in BASH_ENV ENV MAIL MAILPATH
19719do eval test x\${$as_var+set} = xset \
19720  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19721done
19722PS1='$ '
19723PS2='> '
19724PS4='+ '
19725
19726# NLS nuisances.
19727LC_ALL=C
19728export LC_ALL
19729LANGUAGE=C
19730export LANGUAGE
19731
19732# CDPATH.
19733(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19734
19735
19736# as_fn_error STATUS ERROR [LINENO LOG_FD]
19737# ----------------------------------------
19738# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19739# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19740# script with STATUS, using 1 if that was 0.
19741as_fn_error ()
19742{
19743  as_status=$1; test $as_status -eq 0 && as_status=1
19744  if test "$4"; then
19745    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19746    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19747  fi
19748  $as_echo "$as_me: error: $2" >&2
19749  as_fn_exit $as_status
19750} # as_fn_error
19751
19752
19753# as_fn_set_status STATUS
19754# -----------------------
19755# Set $? to STATUS, without forking.
19756as_fn_set_status ()
19757{
19758  return $1
19759} # as_fn_set_status
19760
19761# as_fn_exit STATUS
19762# -----------------
19763# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19764as_fn_exit ()
19765{
19766  set +e
19767  as_fn_set_status $1
19768  exit $1
19769} # as_fn_exit
19770
19771# as_fn_unset VAR
19772# ---------------
19773# Portably unset VAR.
19774as_fn_unset ()
19775{
19776  { eval $1=; unset $1;}
19777}
19778as_unset=as_fn_unset
19779# as_fn_append VAR VALUE
19780# ----------------------
19781# Append the text in VALUE to the end of the definition contained in VAR. Take
19782# advantage of any shell optimizations that allow amortized linear growth over
19783# repeated appends, instead of the typical quadratic growth present in naive
19784# implementations.
19785if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19786  eval 'as_fn_append ()
19787  {
19788    eval $1+=\$2
19789  }'
19790else
19791  as_fn_append ()
19792  {
19793    eval $1=\$$1\$2
19794  }
19795fi # as_fn_append
19796
19797# as_fn_arith ARG...
19798# ------------------
19799# Perform arithmetic evaluation on the ARGs, and store the result in the
19800# global $as_val. Take advantage of shells that can avoid forks. The arguments
19801# must be portable across $(()) and expr.
19802if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19803  eval 'as_fn_arith ()
19804  {
19805    as_val=$(( $* ))
19806  }'
19807else
19808  as_fn_arith ()
19809  {
19810    as_val=`expr "$@" || test $? -eq 1`
19811  }
19812fi # as_fn_arith
19813
19814
19815if expr a : '\(a\)' >/dev/null 2>&1 &&
19816   test "X`expr 00001 : '.*\(...\)'`" = X001; then
19817  as_expr=expr
19818else
19819  as_expr=false
19820fi
19821
19822if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19823  as_basename=basename
19824else
19825  as_basename=false
19826fi
19827
19828if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19829  as_dirname=dirname
19830else
19831  as_dirname=false
19832fi
19833
19834as_me=`$as_basename -- "$0" ||
19835$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19836	 X"$0" : 'X\(//\)$' \| \
19837	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19838$as_echo X/"$0" |
19839    sed '/^.*\/\([^/][^/]*\)\/*$/{
19840	    s//\1/
19841	    q
19842	  }
19843	  /^X\/\(\/\/\)$/{
19844	    s//\1/
19845	    q
19846	  }
19847	  /^X\/\(\/\).*/{
19848	    s//\1/
19849	    q
19850	  }
19851	  s/.*/./; q'`
19852
19853# Avoid depending upon Character Ranges.
19854as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19855as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19856as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19857as_cr_digits='0123456789'
19858as_cr_alnum=$as_cr_Letters$as_cr_digits
19859
19860ECHO_C= ECHO_N= ECHO_T=
19861case `echo -n x` in #(((((
19862-n*)
19863  case `echo 'xy\c'` in
19864  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
19865  xy)  ECHO_C='\c';;
19866  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
19867       ECHO_T='	';;
19868  esac;;
19869*)
19870  ECHO_N='-n';;
19871esac
19872
19873rm -f conf$$ conf$$.exe conf$$.file
19874if test -d conf$$.dir; then
19875  rm -f conf$$.dir/conf$$.file
19876else
19877  rm -f conf$$.dir
19878  mkdir conf$$.dir 2>/dev/null
19879fi
19880if (echo >conf$$.file) 2>/dev/null; then
19881  if ln -s conf$$.file conf$$ 2>/dev/null; then
19882    as_ln_s='ln -s'
19883    # ... but there are two gotchas:
19884    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19885    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19886    # In both cases, we have to default to `cp -pR'.
19887    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19888      as_ln_s='cp -pR'
19889  elif ln conf$$.file conf$$ 2>/dev/null; then
19890    as_ln_s=ln
19891  else
19892    as_ln_s='cp -pR'
19893  fi
19894else
19895  as_ln_s='cp -pR'
19896fi
19897rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19898rmdir conf$$.dir 2>/dev/null
19899
19900
19901# as_fn_mkdir_p
19902# -------------
19903# Create "$as_dir" as a directory, including parents if necessary.
19904as_fn_mkdir_p ()
19905{
19906
19907  case $as_dir in #(
19908  -*) as_dir=./$as_dir;;
19909  esac
19910  test -d "$as_dir" || eval $as_mkdir_p || {
19911    as_dirs=
19912    while :; do
19913      case $as_dir in #(
19914      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19915      *) as_qdir=$as_dir;;
19916      esac
19917      as_dirs="'$as_qdir' $as_dirs"
19918      as_dir=`$as_dirname -- "$as_dir" ||
19919$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19920	 X"$as_dir" : 'X\(//\)[^/]' \| \
19921	 X"$as_dir" : 'X\(//\)$' \| \
19922	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19923$as_echo X"$as_dir" |
19924    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19925	    s//\1/
19926	    q
19927	  }
19928	  /^X\(\/\/\)[^/].*/{
19929	    s//\1/
19930	    q
19931	  }
19932	  /^X\(\/\/\)$/{
19933	    s//\1/
19934	    q
19935	  }
19936	  /^X\(\/\).*/{
19937	    s//\1/
19938	    q
19939	  }
19940	  s/.*/./; q'`
19941      test -d "$as_dir" && break
19942    done
19943    test -z "$as_dirs" || eval "mkdir $as_dirs"
19944  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19945
19946
19947} # as_fn_mkdir_p
19948if mkdir -p . 2>/dev/null; then
19949  as_mkdir_p='mkdir -p "$as_dir"'
19950else
19951  test -d ./-p && rmdir ./-p
19952  as_mkdir_p=false
19953fi
19954
19955
19956# as_fn_executable_p FILE
19957# -----------------------
19958# Test if FILE is an executable regular file.
19959as_fn_executable_p ()
19960{
19961  test -f "$1" && test -x "$1"
19962} # as_fn_executable_p
19963as_test_x='test -x'
19964as_executable_p=as_fn_executable_p
19965
19966# Sed expression to map a string onto a valid CPP name.
19967as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19968
19969# Sed expression to map a string onto a valid variable name.
19970as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19971
19972
19973exec 6>&1
19974## ----------------------------------- ##
19975## Main body of $CONFIG_STATUS script. ##
19976## ----------------------------------- ##
19977_ASEOF
19978test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19979
19980cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19981# Save the log message, to keep $0 and so on meaningful, and to
19982# report actual input values of CONFIG_FILES etc. instead of their
19983# values after options handling.
19984ac_log="
19985This file was extended by PostgreSQL $as_me 12.9, which was
19986generated by GNU Autoconf 2.69.  Invocation command line was
19987
19988  CONFIG_FILES    = $CONFIG_FILES
19989  CONFIG_HEADERS  = $CONFIG_HEADERS
19990  CONFIG_LINKS    = $CONFIG_LINKS
19991  CONFIG_COMMANDS = $CONFIG_COMMANDS
19992  $ $0 $@
19993
19994on `(hostname || uname -n) 2>/dev/null | sed 1q`
19995"
19996
19997_ACEOF
19998
19999case $ac_config_files in *"
20000"*) set x $ac_config_files; shift; ac_config_files=$*;;
20001esac
20002
20003case $ac_config_headers in *"
20004"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
20005esac
20006
20007
20008cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20009# Files that config.status was made for.
20010config_files="$ac_config_files"
20011config_headers="$ac_config_headers"
20012config_links="$ac_config_links"
20013config_commands="$ac_config_commands"
20014
20015_ACEOF
20016
20017cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20018ac_cs_usage="\
20019\`$as_me' instantiates files and other configuration actions
20020from templates according to the current configuration.  Unless the files
20021and actions are specified as TAGs, all are instantiated by default.
20022
20023Usage: $0 [OPTION]... [TAG]...
20024
20025  -h, --help       print this help, then exit
20026  -V, --version    print version number and configuration settings, then exit
20027      --config     print configuration, then exit
20028  -q, --quiet, --silent
20029                   do not print progress messages
20030  -d, --debug      don't remove temporary files
20031      --recheck    update $as_me by reconfiguring in the same conditions
20032      --file=FILE[:TEMPLATE]
20033                   instantiate the configuration file FILE
20034      --header=FILE[:TEMPLATE]
20035                   instantiate the configuration header FILE
20036
20037Configuration files:
20038$config_files
20039
20040Configuration headers:
20041$config_headers
20042
20043Configuration links:
20044$config_links
20045
20046Configuration commands:
20047$config_commands
20048
20049Report bugs to <pgsql-bugs@lists.postgresql.org>."
20050
20051_ACEOF
20052cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20053ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
20054ac_cs_version="\\
20055PostgreSQL config.status 12.9
20056configured by $0, generated by GNU Autoconf 2.69,
20057  with options \\"\$ac_cs_config\\"
20058
20059Copyright (C) 2012 Free Software Foundation, Inc.
20060This config.status script is free software; the Free Software Foundation
20061gives unlimited permission to copy, distribute and modify it."
20062
20063ac_pwd='$ac_pwd'
20064srcdir='$srcdir'
20065INSTALL='$INSTALL'
20066MKDIR_P='$MKDIR_P'
20067AWK='$AWK'
20068test -n "\$AWK" || AWK=awk
20069_ACEOF
20070
20071cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20072# The default lists apply if the user does not specify any file.
20073ac_need_defaults=:
20074while test $# != 0
20075do
20076  case $1 in
20077  --*=?*)
20078    ac_option=`expr "X$1" : 'X\([^=]*\)='`
20079    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20080    ac_shift=:
20081    ;;
20082  --*=)
20083    ac_option=`expr "X$1" : 'X\([^=]*\)='`
20084    ac_optarg=
20085    ac_shift=:
20086    ;;
20087  *)
20088    ac_option=$1
20089    ac_optarg=$2
20090    ac_shift=shift
20091    ;;
20092  esac
20093
20094  case $ac_option in
20095  # Handling of the options.
20096  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20097    ac_cs_recheck=: ;;
20098  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20099    $as_echo "$ac_cs_version"; exit ;;
20100  --config | --confi | --conf | --con | --co | --c )
20101    $as_echo "$ac_cs_config"; exit ;;
20102  --debug | --debu | --deb | --de | --d | -d )
20103    debug=: ;;
20104  --file | --fil | --fi | --f )
20105    $ac_shift
20106    case $ac_optarg in
20107    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20108    '') as_fn_error $? "missing file argument" ;;
20109    esac
20110    as_fn_append CONFIG_FILES " '$ac_optarg'"
20111    ac_need_defaults=false;;
20112  --header | --heade | --head | --hea )
20113    $ac_shift
20114    case $ac_optarg in
20115    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20116    esac
20117    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
20118    ac_need_defaults=false;;
20119  --he | --h)
20120    # Conflict between --help and --header
20121    as_fn_error $? "ambiguous option: \`$1'
20122Try \`$0 --help' for more information.";;
20123  --help | --hel | -h )
20124    $as_echo "$ac_cs_usage"; exit ;;
20125  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20126  | -silent | --silent | --silen | --sile | --sil | --si | --s)
20127    ac_cs_silent=: ;;
20128
20129  # This is an error.
20130  -*) as_fn_error $? "unrecognized option: \`$1'
20131Try \`$0 --help' for more information." ;;
20132
20133  *) as_fn_append ac_config_targets " $1"
20134     ac_need_defaults=false ;;
20135
20136  esac
20137  shift
20138done
20139
20140ac_configure_extra_args=
20141
20142if $ac_cs_silent; then
20143  exec 6>/dev/null
20144  ac_configure_extra_args="$ac_configure_extra_args --silent"
20145fi
20146
20147_ACEOF
20148cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20149if \$ac_cs_recheck; then
20150  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20151  shift
20152  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20153  CONFIG_SHELL='$SHELL'
20154  export CONFIG_SHELL
20155  exec "\$@"
20156fi
20157
20158_ACEOF
20159cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20160exec 5>>config.log
20161{
20162  echo
20163  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20164## Running $as_me. ##
20165_ASBOX
20166  $as_echo "$ac_log"
20167} >&5
20168
20169_ACEOF
20170cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20171_ACEOF
20172
20173cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20174
20175# Handling of arguments.
20176for ac_config_target in $ac_config_targets
20177do
20178  case $ac_config_target in
20179    "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
20180    "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
20181    "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
20182    "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
20183    "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
20184    "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
20185    "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
20186    "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
20187    "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
20188    "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
20189    "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
20190
20191  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20192  esac
20193done
20194
20195
20196# If the user did not use the arguments to specify the items to instantiate,
20197# then the envvar interface is used.  Set only those that are not.
20198# We use the long form for the default assignment because of an extremely
20199# bizarre bug on SunOS 4.1.3.
20200if $ac_need_defaults; then
20201  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20202  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20203  test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20204  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20205fi
20206
20207# Have a temporary directory for convenience.  Make it in the build tree
20208# simply because there is no reason against having it here, and in addition,
20209# creating and moving files from /tmp can sometimes cause problems.
20210# Hook for its removal unless debugging.
20211# Note that there is a small window in which the directory will not be cleaned:
20212# after its creation but before its name has been assigned to `$tmp'.
20213$debug ||
20214{
20215  tmp= ac_tmp=
20216  trap 'exit_status=$?
20217  : "${ac_tmp:=$tmp}"
20218  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20219' 0
20220  trap 'as_fn_exit 1' 1 2 13 15
20221}
20222# Create a (secure) tmp directory for tmp files.
20223
20224{
20225  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20226  test -d "$tmp"
20227}  ||
20228{
20229  tmp=./conf$$-$RANDOM
20230  (umask 077 && mkdir "$tmp")
20231} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20232ac_tmp=$tmp
20233
20234# Set up the scripts for CONFIG_FILES section.
20235# No need to generate them if there are no CONFIG_FILES.
20236# This happens for instance with `./config.status config.h'.
20237if test -n "$CONFIG_FILES"; then
20238
20239
20240ac_cr=`echo X | tr X '\015'`
20241# On cygwin, bash can eat \r inside `` if the user requested igncr.
20242# But we know of no other shell where ac_cr would be empty at this
20243# point, so we can use a bashism as a fallback.
20244if test "x$ac_cr" = x; then
20245  eval ac_cr=\$\'\\r\'
20246fi
20247ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20248if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20249  ac_cs_awk_cr='\\r'
20250else
20251  ac_cs_awk_cr=$ac_cr
20252fi
20253
20254echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20255_ACEOF
20256
20257
20258{
20259  echo "cat >conf$$subs.awk <<_ACEOF" &&
20260  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20261  echo "_ACEOF"
20262} >conf$$subs.sh ||
20263  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20264ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20265ac_delim='%!_!# '
20266for ac_last_try in false false false false false :; do
20267  . ./conf$$subs.sh ||
20268    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20269
20270  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20271  if test $ac_delim_n = $ac_delim_num; then
20272    break
20273  elif $ac_last_try; then
20274    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20275  else
20276    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20277  fi
20278done
20279rm -f conf$$subs.sh
20280
20281cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20282cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20283_ACEOF
20284sed -n '
20285h
20286s/^/S["/; s/!.*/"]=/
20287p
20288g
20289s/^[^!]*!//
20290:repl
20291t repl
20292s/'"$ac_delim"'$//
20293t delim
20294:nl
20295h
20296s/\(.\{148\}\)..*/\1/
20297t more1
20298s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20299p
20300n
20301b repl
20302:more1
20303s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20304p
20305g
20306s/.\{148\}//
20307t nl
20308:delim
20309h
20310s/\(.\{148\}\)..*/\1/
20311t more2
20312s/["\\]/\\&/g; s/^/"/; s/$/"/
20313p
20314b
20315:more2
20316s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20317p
20318g
20319s/.\{148\}//
20320t delim
20321' <conf$$subs.awk | sed '
20322/^[^""]/{
20323  N
20324  s/\n//
20325}
20326' >>$CONFIG_STATUS || ac_write_fail=1
20327rm -f conf$$subs.awk
20328cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20329_ACAWK
20330cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20331  for (key in S) S_is_set[key] = 1
20332  FS = ""
20333
20334}
20335{
20336  line = $ 0
20337  nfields = split(line, field, "@")
20338  substed = 0
20339  len = length(field[1])
20340  for (i = 2; i < nfields; i++) {
20341    key = field[i]
20342    keylen = length(key)
20343    if (S_is_set[key]) {
20344      value = S[key]
20345      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20346      len += length(value) + length(field[++i])
20347      substed = 1
20348    } else
20349      len += 1 + keylen
20350  }
20351
20352  print line
20353}
20354
20355_ACAWK
20356_ACEOF
20357cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20358if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20359  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20360else
20361  cat
20362fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20363  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20364_ACEOF
20365
20366# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20367# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20368# trailing colons and then remove the whole line if VPATH becomes empty
20369# (actually we leave an empty line to preserve line numbers).
20370if test "x$srcdir" = x.; then
20371  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
20372h
20373s///
20374s/^/:/
20375s/[	 ]*$/:/
20376s/:\$(srcdir):/:/g
20377s/:\${srcdir}:/:/g
20378s/:@srcdir@:/:/g
20379s/^:*//
20380s/:*$//
20381x
20382s/\(=[	 ]*\).*/\1/
20383G
20384s/\n//
20385s/^[^=]*=[	 ]*$//
20386}'
20387fi
20388
20389cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20390fi # test -n "$CONFIG_FILES"
20391
20392# Set up the scripts for CONFIG_HEADERS section.
20393# No need to generate them if there are no CONFIG_HEADERS.
20394# This happens for instance with `./config.status Makefile'.
20395if test -n "$CONFIG_HEADERS"; then
20396cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20397BEGIN {
20398_ACEOF
20399
20400# Transform confdefs.h into an awk script `defines.awk', embedded as
20401# here-document in config.status, that substitutes the proper values into
20402# config.h.in to produce config.h.
20403
20404# Create a delimiter string that does not exist in confdefs.h, to ease
20405# handling of long lines.
20406ac_delim='%!_!# '
20407for ac_last_try in false false :; do
20408  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20409  if test -z "$ac_tt"; then
20410    break
20411  elif $ac_last_try; then
20412    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20413  else
20414    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20415  fi
20416done
20417
20418# For the awk script, D is an array of macro values keyed by name,
20419# likewise P contains macro parameters if any.  Preserve backslash
20420# newline sequences.
20421
20422ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20423sed -n '
20424s/.\{148\}/&'"$ac_delim"'/g
20425t rset
20426:rset
20427s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
20428t def
20429d
20430:def
20431s/\\$//
20432t bsnl
20433s/["\\]/\\&/g
20434s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
20435D["\1"]=" \3"/p
20436s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
20437d
20438:bsnl
20439s/["\\]/\\&/g
20440s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
20441D["\1"]=" \3\\\\\\n"\\/p
20442t cont
20443s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20444t cont
20445d
20446:cont
20447n
20448s/.\{148\}/&'"$ac_delim"'/g
20449t clear
20450:clear
20451s/\\$//
20452t bsnlc
20453s/["\\]/\\&/g; s/^/"/; s/$/"/p
20454d
20455:bsnlc
20456s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20457b cont
20458' <confdefs.h | sed '
20459s/'"$ac_delim"'/"\\\
20460"/g' >>$CONFIG_STATUS || ac_write_fail=1
20461
20462cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20463  for (key in D) D_is_set[key] = 1
20464  FS = ""
20465}
20466/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20467  line = \$ 0
20468  split(line, arg, " ")
20469  if (arg[1] == "#") {
20470    defundef = arg[2]
20471    mac1 = arg[3]
20472  } else {
20473    defundef = substr(arg[1], 2)
20474    mac1 = arg[2]
20475  }
20476  split(mac1, mac2, "(") #)
20477  macro = mac2[1]
20478  prefix = substr(line, 1, index(line, defundef) - 1)
20479  if (D_is_set[macro]) {
20480    # Preserve the white space surrounding the "#".
20481    print prefix "define", macro P[macro] D[macro]
20482    next
20483  } else {
20484    # Replace #undef with comments.  This is necessary, for example,
20485    # in the case of _POSIX_SOURCE, which is predefined and required
20486    # on some systems where configure will not decide to define it.
20487    if (defundef == "undef") {
20488      print "/*", prefix defundef, macro, "*/"
20489      next
20490    }
20491  }
20492}
20493{ print }
20494_ACAWK
20495_ACEOF
20496cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20497  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20498fi # test -n "$CONFIG_HEADERS"
20499
20500
20501eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS  :L $CONFIG_LINKS  :C $CONFIG_COMMANDS"
20502shift
20503for ac_tag
20504do
20505  case $ac_tag in
20506  :[FHLC]) ac_mode=$ac_tag; continue;;
20507  esac
20508  case $ac_mode$ac_tag in
20509  :[FHL]*:*);;
20510  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20511  :[FH]-) ac_tag=-:-;;
20512  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20513  esac
20514  ac_save_IFS=$IFS
20515  IFS=:
20516  set x $ac_tag
20517  IFS=$ac_save_IFS
20518  shift
20519  ac_file=$1
20520  shift
20521
20522  case $ac_mode in
20523  :L) ac_source=$1;;
20524  :[FH])
20525    ac_file_inputs=
20526    for ac_f
20527    do
20528      case $ac_f in
20529      -) ac_f="$ac_tmp/stdin";;
20530      *) # Look for the file first in the build tree, then in the source tree
20531	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
20532	 # because $ac_f cannot contain `:'.
20533	 test -f "$ac_f" ||
20534	   case $ac_f in
20535	   [\\/$]*) false;;
20536	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20537	   esac ||
20538	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20539      esac
20540      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20541      as_fn_append ac_file_inputs " '$ac_f'"
20542    done
20543
20544    # Let's still pretend it is `configure' which instantiates (i.e., don't
20545    # use $as_me), people would be surprised to read:
20546    #    /* config.h.  Generated by config.status.  */
20547    configure_input='Generated from '`
20548	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20549	`' by configure.'
20550    if test x"$ac_file" != x-; then
20551      configure_input="$ac_file.  $configure_input"
20552      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20553$as_echo "$as_me: creating $ac_file" >&6;}
20554    fi
20555    # Neutralize special characters interpreted by sed in replacement strings.
20556    case $configure_input in #(
20557    *\&* | *\|* | *\\* )
20558       ac_sed_conf_input=`$as_echo "$configure_input" |
20559       sed 's/[\\\\&|]/\\\\&/g'`;; #(
20560    *) ac_sed_conf_input=$configure_input;;
20561    esac
20562
20563    case $ac_tag in
20564    *:-:* | *:-) cat >"$ac_tmp/stdin" \
20565      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20566    esac
20567    ;;
20568  esac
20569
20570  ac_dir=`$as_dirname -- "$ac_file" ||
20571$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20572	 X"$ac_file" : 'X\(//\)[^/]' \| \
20573	 X"$ac_file" : 'X\(//\)$' \| \
20574	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20575$as_echo X"$ac_file" |
20576    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20577	    s//\1/
20578	    q
20579	  }
20580	  /^X\(\/\/\)[^/].*/{
20581	    s//\1/
20582	    q
20583	  }
20584	  /^X\(\/\/\)$/{
20585	    s//\1/
20586	    q
20587	  }
20588	  /^X\(\/\).*/{
20589	    s//\1/
20590	    q
20591	  }
20592	  s/.*/./; q'`
20593  as_dir="$ac_dir"; as_fn_mkdir_p
20594  ac_builddir=.
20595
20596case "$ac_dir" in
20597.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20598*)
20599  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20600  # A ".." for each directory in $ac_dir_suffix.
20601  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20602  case $ac_top_builddir_sub in
20603  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20604  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20605  esac ;;
20606esac
20607ac_abs_top_builddir=$ac_pwd
20608ac_abs_builddir=$ac_pwd$ac_dir_suffix
20609# for backward compatibility:
20610ac_top_builddir=$ac_top_build_prefix
20611
20612case $srcdir in
20613  .)  # We are building in place.
20614    ac_srcdir=.
20615    ac_top_srcdir=$ac_top_builddir_sub
20616    ac_abs_top_srcdir=$ac_pwd ;;
20617  [\\/]* | ?:[\\/]* )  # Absolute name.
20618    ac_srcdir=$srcdir$ac_dir_suffix;
20619    ac_top_srcdir=$srcdir
20620    ac_abs_top_srcdir=$srcdir ;;
20621  *) # Relative name.
20622    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20623    ac_top_srcdir=$ac_top_build_prefix$srcdir
20624    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20625esac
20626ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20627
20628
20629  case $ac_mode in
20630  :F)
20631  #
20632  # CONFIG_FILE
20633  #
20634
20635  case $INSTALL in
20636  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20637  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20638  esac
20639  ac_MKDIR_P=$MKDIR_P
20640  case $MKDIR_P in
20641  [\\/$]* | ?:[\\/]* ) ;;
20642  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20643  esac
20644_ACEOF
20645
20646cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20647# If the template does not know about datarootdir, expand it.
20648# FIXME: This hack should be removed a few years after 2.60.
20649ac_datarootdir_hack=; ac_datarootdir_seen=
20650ac_sed_dataroot='
20651/datarootdir/ {
20652  p
20653  q
20654}
20655/@datadir@/p
20656/@docdir@/p
20657/@infodir@/p
20658/@localedir@/p
20659/@mandir@/p'
20660case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20661*datarootdir*) ac_datarootdir_seen=yes;;
20662*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20663  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20664$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20665_ACEOF
20666cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20667  ac_datarootdir_hack='
20668  s&@datadir@&$datadir&g
20669  s&@docdir@&$docdir&g
20670  s&@infodir@&$infodir&g
20671  s&@localedir@&$localedir&g
20672  s&@mandir@&$mandir&g
20673  s&\\\${datarootdir}&$datarootdir&g' ;;
20674esac
20675_ACEOF
20676
20677# Neutralize VPATH when `$srcdir' = `.'.
20678# Shell code in configure.ac might set extrasub.
20679# FIXME: do we really want to maintain this feature?
20680cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20681ac_sed_extra="$ac_vpsub
20682$extrasub
20683_ACEOF
20684cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20685:t
20686/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20687s|@configure_input@|$ac_sed_conf_input|;t t
20688s&@top_builddir@&$ac_top_builddir_sub&;t t
20689s&@top_build_prefix@&$ac_top_build_prefix&;t t
20690s&@srcdir@&$ac_srcdir&;t t
20691s&@abs_srcdir@&$ac_abs_srcdir&;t t
20692s&@top_srcdir@&$ac_top_srcdir&;t t
20693s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20694s&@builddir@&$ac_builddir&;t t
20695s&@abs_builddir@&$ac_abs_builddir&;t t
20696s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20697s&@INSTALL@&$ac_INSTALL&;t t
20698s&@MKDIR_P@&$ac_MKDIR_P&;t t
20699$ac_datarootdir_hack
20700"
20701eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20702  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20703
20704test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20705  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20706  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
20707      "$ac_tmp/out"`; test -z "$ac_out"; } &&
20708  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20709which seems to be undefined.  Please make sure it is defined" >&5
20710$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20711which seems to be undefined.  Please make sure it is defined" >&2;}
20712
20713  rm -f "$ac_tmp/stdin"
20714  case $ac_file in
20715  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20716  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20717  esac \
20718  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20719 ;;
20720  :H)
20721  #
20722  # CONFIG_HEADER
20723  #
20724  if test x"$ac_file" != x-; then
20725    {
20726      $as_echo "/* $configure_input  */" \
20727      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20728    } >"$ac_tmp/config.h" \
20729      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20730    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20731      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20732$as_echo "$as_me: $ac_file is unchanged" >&6;}
20733    else
20734      rm -f "$ac_file"
20735      mv "$ac_tmp/config.h" "$ac_file" \
20736	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
20737    fi
20738  else
20739    $as_echo "/* $configure_input  */" \
20740      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20741      || as_fn_error $? "could not create -" "$LINENO" 5
20742  fi
20743 ;;
20744  :L)
20745  #
20746  # CONFIG_LINK
20747  #
20748
20749  if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20750    :
20751  else
20752    # Prefer the file from the source tree if names are identical.
20753    if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20754      ac_source=$srcdir/$ac_source
20755    fi
20756
20757    { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20758$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20759
20760    if test ! -r "$ac_source"; then
20761      as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20762    fi
20763    rm -f "$ac_file"
20764
20765    # Try a relative symlink, then a hard link, then a copy.
20766    case $ac_source in
20767    [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20768	*) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20769    esac
20770    ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20771      ln "$ac_source" "$ac_file" 2>/dev/null ||
20772      cp -p "$ac_source" "$ac_file" ||
20773      as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20774  fi
20775 ;;
20776  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20777$as_echo "$as_me: executing $ac_file commands" >&6;}
20778 ;;
20779  esac
20780
20781
20782  case $ac_file$ac_mode in
20783    "check_win32_symlinks":C)
20784# Links sometimes fail undetected on Mingw -
20785# so here we detect it and warn the user
20786for FILE in $CONFIG_LINKS
20787 do
20788	# test -e works for symlinks in the MinGW console
20789	test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20790$as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20791 done
20792 ;;
20793    "src/include/pg_config.h":H)
20794# Update timestamp for pg_config.h (see Makefile.global)
20795echo >src/include/stamp-h
20796 ;;
20797    "src/include/pg_config_ext.h":H)
20798# Update timestamp for pg_config_ext.h (see Makefile.global)
20799echo >src/include/stamp-ext-h
20800 ;;
20801    "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20802
20803  esac
20804done # for ac_tag
20805
20806
20807as_fn_exit 0
20808_ACEOF
20809ac_clean_files=$ac_clean_files_save
20810
20811test $ac_write_fail = 0 ||
20812  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20813
20814
20815# configure is writing to config.log, and then calls config.status.
20816# config.status does its own redirection, appending to config.log.
20817# Unfortunately, on DOS this fails, as config.log is still kept open
20818# by configure, so config.status won't be able to write to it; its
20819# output is simply discarded.  So we exec the FD to /dev/null,
20820# effectively closing config.log, so it can be properly (re)opened and
20821# appended to by config.status.  When coming back to configure, we
20822# need to make the FD available again.
20823if test "$no_create" != yes; then
20824  ac_cs_success=:
20825  ac_config_status_args=
20826  test "$silent" = yes &&
20827    ac_config_status_args="$ac_config_status_args --quiet"
20828  exec 5>/dev/null
20829  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20830  exec 5>>config.log
20831  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20832  # would make configure fail if this is the last instruction.
20833  $ac_cs_success || as_fn_exit 1
20834fi
20835if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20836  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20837$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20838fi
20839
20840