2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 12devel.
5 # Report bugs to <pgsql-bugs@lists.postgresql.org>.
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
14 # Copyright (c) 1996-2019, PostgreSQL Global Development Group
15 ## -------------------- ##
16 ## M4sh Initialization. ##
17 ## -------------------- ##
19 # Be more Bourne compatible
20 DUALCASE=1; export DUALCASE # for MKS sh
21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
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+"$@"}'='"$@"'
29 case `(set -o) 2>/dev/null` in #(
41 # Printing a long string crashes Solaris 7 /usr/bin/printf.
42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44 as_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.
47 if test -z "$BASH_VERSION$ZSH_VERSION" \
48 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo_n='print -rn --'
51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
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'
59 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64 expr "X$arg" : "X\\(.*\\)$as_nl";
65 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
70 as_echo_n='sh -c $as_echo_n_body as_echo'
73 as_echo='sh -c $as_echo_body as_echo'
76 # The user is always right.
77 if test "${PATH_SEPARATOR+set}" != set; then
79 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
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.)
93 # Find who we are. Look in the path if we contain no directory separator.
96 *[\\/]* ) as_myself=$0 ;;
97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
101 test -z "$as_dir" && as_dir=.
102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
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.
110 if test "x$as_myself" = x; then
113 if test ! -f "$as_myself"; then
114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
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.
122 for as_var in BASH_ENV ENV MAIL MAILPATH
123 do eval test x\${$as_var+set} = xset \
124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
137 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
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.
149 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
151 *v*x* | *x*v* ) as_opts=-vx ;;
156 exec $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
162 # We don't want this to propagate to other subprocesses.
163 { _as_can_reexec=; unset _as_can_reexec;}
164 if test "x$CONFIG_SHELL" = x; then
165 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
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+\"\$@\"}'='\"\$@\"'
173 case \`(set -o) 2>/dev/null\` in #(
181 as_required="as_fn_return () { (exit \$1); }
182 as_fn_success () { as_fn_return 0; }
183 as_fn_failure () { as_fn_return 1; }
184 as_fn_ret_success () { return 0; }
185 as_fn_ret_failure () { return 1; }
188 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
189 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
190 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
191 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
192 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
195 exitcode=1; echo positional parameters were not saved.
197 test x\$exitcode = x0 || 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
203 test \$(( 1 + 1 )) = 2 || exit 1"
204 if (eval "$as_required") 2>/dev/null; then :
209 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
214 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
217 test -z "$as_dir" && as_dir=.
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 :
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
242 if test "x$CONFIG_SHELL" != x; then :
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.
250 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
252 *v*x* | *x*v* ) as_opts=-vx ;;
257 exec $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
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."
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."
281 SHELL=${CONFIG_SHELL-/bin/sh}
283 # Unset more variables known to interfere with behavior of common tools.
284 CLICOLOR_FORCE= GREP_OPTIONS=
285 unset CLICOLOR_FORCE GREP_OPTIONS
287 ## --------------------- ##
288 ## M4sh Shell Functions. ##
289 ## --------------------- ##
292 # Portably unset VAR.
295 { eval $1=; unset $1;}
299 # as_fn_set_status STATUS
300 # -----------------------
301 # Set $? to STATUS, without forking.
309 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
319 # Create "$as_dir" as a directory, including parents if necessary.
324 -*) as_dir=./$as_dir;;
326 test -d "$as_dir" || eval $as_mkdir_p || {
330 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
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\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
357 test -d "$as_dir" && break
359 test -z "$as_dirs" || eval "mkdir $as_dirs"
360 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365 # as_fn_executable_p FILE
366 # -----------------------
367 # Test if FILE is an executable regular file.
368 as_fn_executable_p ()
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
378 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
379 eval 'as_fn_append ()
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.
395 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
403 as_val=`expr "$@" || test $? -eq 1`
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.
415 as_status=$1; test $as_status -eq 0 && as_status=1
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
420 $as_echo "$as_me: error: $2" >&2
421 as_fn_exit $as_status
424 if expr a : '\(a\)' >/dev/null 2>&1 &&
425 test "X`expr 00001 : '.*\(...\)'`" = X001; then
431 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
437 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
443 as_me=`$as_basename -- "$0" ||
444 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
445 X"$0" : 'X\(//\)$' \| \
446 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
448 sed '/^.*\/\([^/][^/]*\)\/*$/{
462 # Avoid depending upon Character Ranges.
463 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
464 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
465 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
466 as_cr_digits='0123456789'
467 as_cr_alnum=$as_cr_Letters$as_cr_digits
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. :-)
486 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
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; }
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).
501 # Exit status is that of the last command.
505 ECHO_C= ECHO_N= ECHO_T=
506 case `echo -n x` in #(((((
508 case `echo 'xy\c'` in
509 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
511 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
518 rm -f conf$$ conf$$.exe conf$$.file
519 if test -d conf$$.dir; then
520 rm -f conf$$.dir/conf$$.file
523 mkdir conf$$.dir 2>/dev/null
525 if (echo >conf$$.file) 2>/dev/null; then
526 if ln -s conf$$.file conf$$ 2>/dev/null; then
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 ||
534 elif ln conf$$.file conf$$ 2>/dev/null; then
542 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
543 rmdir conf$$.dir 2>/dev/null
545 if mkdir -p . 2>/dev/null; then
546 as_mkdir_p='mkdir -p "$as_dir"'
548 test -d ./-p && rmdir ./-p
553 as_executable_p=as_fn_executable_p
555 # Sed expression to map a string onto a valid CPP name.
556 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
558 # Sed expression to map a string onto a valid variable name.
559 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
562 test -n "$DJDIR" || exec 7<&0 </dev/null
566 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
567 # so uname gets run too.
568 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573 ac_default_prefix=/usr/local
575 ac_config_libobj_dir=.
582 # Identity of this package.
583 PACKAGE_NAME='PostgreSQL'
584 PACKAGE_TARNAME='postgresql'
585 PACKAGE_VERSION='12devel'
586 PACKAGE_STRING='PostgreSQL 12devel'
587 PACKAGE_BUGREPORT='pgsql-bugs@lists.postgresql.org'
590 ac_unique_file="src/backend/access/common/heaptuple.c"
591 ac_default_prefix=/usr/local/pgsql
592 # Factoring default headers for most tests.
593 ac_includes_default="\
595 #ifdef HAVE_SYS_TYPES_H
596 # include <sys/types.h>
598 #ifdef HAVE_SYS_STAT_H
599 # include <sys/stat.h>
605 # ifdef HAVE_STDLIB_H
610 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
615 #ifdef HAVE_STRINGS_H
616 # include <strings.h>
618 #ifdef HAVE_INTTYPES_H
619 # include <inttypes.h>
628 ac_subst_vars='LTLIBOBJS
663 python_additional_libs
806 program_transform_name
819 enable_option_checking
825 enable_integer_datetimes
859 with_libedit_preferred
871 ac_precious_vars='build_alias
899 # Initialize some variables set by options.
901 ac_init_version=false
902 ac_unrecognized_opts=
904 # The variables have the same names as the options, with
905 # dashes changed to underlines.
913 program_transform_name=s,x,x,
921 # Installation directory options.
922 # These are left unexpanded so users can "make install exec_prefix=/foo"
923 # and all the variables that are supposed to be based on exec_prefix
924 # by default will actually change.
925 # Use braces instead of parens because sh, perl, etc. also accept them.
926 # (The list follows the same order as the GNU Coding Standards.)
927 bindir='${exec_prefix}/bin'
928 sbindir='${exec_prefix}/sbin'
929 libexecdir='${exec_prefix}/libexec'
930 datarootdir='${prefix}/share'
931 datadir='${datarootdir}'
932 sysconfdir='${prefix}/etc'
933 sharedstatedir='${prefix}/com'
934 localstatedir='${prefix}/var'
935 includedir='${prefix}/include'
936 oldincludedir='/usr/include'
937 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
938 infodir='${datarootdir}/info'
943 libdir='${exec_prefix}/lib'
944 localedir='${datarootdir}/locale'
945 mandir='${datarootdir}/man'
951 # If the previous option needs an argument, assign it.
952 if test -n "$ac_prev"; then
953 eval $ac_prev=\$ac_option
959 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
964 # Accept the important Cygnus configure options, so we can diagnose typos.
966 case $ac_dashdash$ac_option in
970 -bindir | --bindir | --bindi | --bind | --bin | --bi)
972 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
975 -build | --build | --buil | --bui | --bu)
976 ac_prev=build_alias ;;
977 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
978 build_alias=$ac_optarg ;;
980 -cache-file | --cache-file | --cache-fil | --cache-fi \
981 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
982 ac_prev=cache_file ;;
983 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
984 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
985 cache_file=$ac_optarg ;;
988 cache_file=config.cache ;;
990 -datadir | --datadir | --datadi | --datad)
992 -datadir=* | --datadir=* | --datadi=* | --datad=*)
993 datadir=$ac_optarg ;;
995 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
996 | --dataroo | --dataro | --datar)
997 ac_prev=datarootdir ;;
998 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
999 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1000 datarootdir=$ac_optarg ;;
1002 -disable-* | --disable-*)
1003 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1004 # Reject names that are not valid shell variable names.
1005 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1006 as_fn_error $? "invalid feature name: $ac_useropt"
1007 ac_useropt_orig=$ac_useropt
1008 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1009 case $ac_user_opts in
1011 "enable_$ac_useropt"
1013 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1014 ac_unrecognized_sep=', ';;
1016 eval enable_$ac_useropt=no ;;
1018 -docdir | --docdir | --docdi | --doc | --do)
1020 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1021 docdir=$ac_optarg ;;
1023 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1025 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1026 dvidir=$ac_optarg ;;
1028 -enable-* | --enable-*)
1029 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1030 # Reject names that are not valid shell variable names.
1031 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1032 as_fn_error $? "invalid feature name: $ac_useropt"
1033 ac_useropt_orig=$ac_useropt
1034 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1035 case $ac_user_opts in
1037 "enable_$ac_useropt"
1039 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1040 ac_unrecognized_sep=', ';;
1042 eval enable_$ac_useropt=\$ac_optarg ;;
1044 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1045 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1046 | --exec | --exe | --ex)
1047 ac_prev=exec_prefix ;;
1048 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1049 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1050 | --exec=* | --exe=* | --ex=*)
1051 exec_prefix=$ac_optarg ;;
1053 -gas | --gas | --ga | --g)
1054 # Obsolete; use --with-gas.
1057 -help | --help | --hel | --he | -h)
1058 ac_init_help=long ;;
1059 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1060 ac_init_help=recursive ;;
1061 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1062 ac_init_help=short ;;
1064 -host | --host | --hos | --ho)
1065 ac_prev=host_alias ;;
1066 -host=* | --host=* | --hos=* | --ho=*)
1067 host_alias=$ac_optarg ;;
1069 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1071 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1073 htmldir=$ac_optarg ;;
1075 -includedir | --includedir | --includedi | --included | --include \
1076 | --includ | --inclu | --incl | --inc)
1077 ac_prev=includedir ;;
1078 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1079 | --includ=* | --inclu=* | --incl=* | --inc=*)
1080 includedir=$ac_optarg ;;
1082 -infodir | --infodir | --infodi | --infod | --info | --inf)
1084 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1085 infodir=$ac_optarg ;;
1087 -libdir | --libdir | --libdi | --libd)
1089 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1090 libdir=$ac_optarg ;;
1092 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1093 | --libexe | --libex | --libe)
1094 ac_prev=libexecdir ;;
1095 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1096 | --libexe=* | --libex=* | --libe=*)
1097 libexecdir=$ac_optarg ;;
1099 -localedir | --localedir | --localedi | --localed | --locale)
1100 ac_prev=localedir ;;
1101 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1102 localedir=$ac_optarg ;;
1104 -localstatedir | --localstatedir | --localstatedi | --localstated \
1105 | --localstate | --localstat | --localsta | --localst | --locals)
1106 ac_prev=localstatedir ;;
1107 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1108 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1109 localstatedir=$ac_optarg ;;
1111 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1113 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1114 mandir=$ac_optarg ;;
1116 -nfp | --nfp | --nf)
1117 # Obsolete; use --without-fp.
1120 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1121 | --no-cr | --no-c | -n)
1124 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1125 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1128 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1129 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1130 | --oldin | --oldi | --old | --ol | --o)
1131 ac_prev=oldincludedir ;;
1132 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1133 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1134 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1135 oldincludedir=$ac_optarg ;;
1137 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1139 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1140 prefix=$ac_optarg ;;
1142 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1143 | --program-pre | --program-pr | --program-p)
1144 ac_prev=program_prefix ;;
1145 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1146 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1147 program_prefix=$ac_optarg ;;
1149 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1150 | --program-suf | --program-su | --program-s)
1151 ac_prev=program_suffix ;;
1152 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1153 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1154 program_suffix=$ac_optarg ;;
1156 -program-transform-name | --program-transform-name \
1157 | --program-transform-nam | --program-transform-na \
1158 | --program-transform-n | --program-transform- \
1159 | --program-transform | --program-transfor \
1160 | --program-transfo | --program-transf \
1161 | --program-trans | --program-tran \
1162 | --progr-tra | --program-tr | --program-t)
1163 ac_prev=program_transform_name ;;
1164 -program-transform-name=* | --program-transform-name=* \
1165 | --program-transform-nam=* | --program-transform-na=* \
1166 | --program-transform-n=* | --program-transform-=* \
1167 | --program-transform=* | --program-transfor=* \
1168 | --program-transfo=* | --program-transf=* \
1169 | --program-trans=* | --program-tran=* \
1170 | --progr-tra=* | --program-tr=* | --program-t=*)
1171 program_transform_name=$ac_optarg ;;
1173 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1175 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1176 pdfdir=$ac_optarg ;;
1178 -psdir | --psdir | --psdi | --psd | --ps)
1180 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1183 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1184 | -silent | --silent | --silen | --sile | --sil)
1187 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1189 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1191 sbindir=$ac_optarg ;;
1193 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1194 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1195 | --sharedst | --shareds | --shared | --share | --shar \
1197 ac_prev=sharedstatedir ;;
1198 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1199 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1200 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1202 sharedstatedir=$ac_optarg ;;
1204 -site | --site | --sit)
1206 -site=* | --site=* | --sit=*)
1209 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1211 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1212 srcdir=$ac_optarg ;;
1214 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1215 | --syscon | --sysco | --sysc | --sys | --sy)
1216 ac_prev=sysconfdir ;;
1217 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1218 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1219 sysconfdir=$ac_optarg ;;
1221 -target | --target | --targe | --targ | --tar | --ta | --t)
1222 ac_prev=target_alias ;;
1223 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1224 target_alias=$ac_optarg ;;
1226 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1229 -version | --version | --versio | --versi | --vers | -V)
1230 ac_init_version=: ;;
1233 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1234 # Reject names that are not valid shell variable names.
1235 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1236 as_fn_error $? "invalid package name: $ac_useropt"
1237 ac_useropt_orig=$ac_useropt
1238 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1239 case $ac_user_opts in
1243 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1244 ac_unrecognized_sep=', ';;
1246 eval with_$ac_useropt=\$ac_optarg ;;
1248 -without-* | --without-*)
1249 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1250 # Reject names that are not valid shell variable names.
1251 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1252 as_fn_error $? "invalid package name: $ac_useropt"
1253 ac_useropt_orig=$ac_useropt
1254 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1255 case $ac_user_opts in
1259 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1260 ac_unrecognized_sep=', ';;
1262 eval with_$ac_useropt=no ;;
1265 # Obsolete; use --with-x.
1268 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1269 | --x-incl | --x-inc | --x-in | --x-i)
1270 ac_prev=x_includes ;;
1271 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1272 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1273 x_includes=$ac_optarg ;;
1275 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1276 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1277 ac_prev=x_libraries ;;
1278 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1279 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1280 x_libraries=$ac_optarg ;;
1282 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1283 Try \`$0 --help' for more information"
1287 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1288 # Reject names that are not valid shell variable names.
1289 case $ac_envvar in #(
1290 '' | [0-9]* | *[!_$as_cr_alnum]* )
1291 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1293 eval $ac_envvar=\$ac_optarg
1294 export $ac_envvar ;;
1297 # FIXME: should be removed in autoconf 3.0.
1298 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1299 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1300 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1301 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1307 if test -n "$ac_prev"; then
1308 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1309 as_fn_error $? "missing argument to $ac_option"
1312 if test -n "$ac_unrecognized_opts"; then
1313 case $enable_option_checking in
1315 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1316 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1320 # Check all directory arguments for consistency.
1321 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1322 datadir sysconfdir sharedstatedir localstatedir includedir \
1323 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1324 libdir localedir mandir
1326 eval ac_val=\$$ac_var
1327 # Remove trailing slashes.
1330 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1331 eval $ac_var=\$ac_val;;
1333 # Be sure to have absolute directory names.
1335 [\\/$]* | ?:[\\/]* ) continue;;
1336 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1338 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1341 # There might be people who depend on the old broken behavior: `$host'
1342 # used to hold the argument of --host etc.
1343 # FIXME: To remove some day.
1346 target=$target_alias
1348 # FIXME: To remove some day.
1349 if test "x$host_alias" != x; then
1350 if test "x$build_alias" = x; then
1351 cross_compiling=maybe
1352 elif test "x$build_alias" != "x$host_alias"; then
1358 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1360 test "$silent" = yes && exec 6>/dev/null
1363 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1364 ac_ls_di=`ls -di .` &&
1365 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1366 as_fn_error $? "working directory cannot be determined"
1367 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1368 as_fn_error $? "pwd does not report name of working directory"
1371 # Find the source files, if location was not specified.
1372 if test -z "$srcdir"; then
1373 ac_srcdir_defaulted=yes
1374 # Try the directory containing this script, then the parent directory.
1375 ac_confdir=`$as_dirname -- "$as_myself" ||
1376 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1377 X"$as_myself" : 'X\(//\)[^/]' \| \
1378 X"$as_myself" : 'X\(//\)$' \| \
1379 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1380 $as_echo X"$as_myself" |
1381 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1399 if test ! -r "$srcdir/$ac_unique_file"; then
1403 ac_srcdir_defaulted=no
1405 if test ! -r "$srcdir/$ac_unique_file"; then
1406 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1407 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1409 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1411 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1413 # When building in place, set srcdir=.
1414 if test "$ac_abs_confdir" = "$ac_pwd"; then
1417 # Remove unnecessary trailing slashes from srcdir.
1418 # Double slashes in file names in object file debugging info
1419 # mess up M-x gdb in Emacs.
1421 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1423 for ac_var in $ac_precious_vars; do
1424 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1425 eval ac_env_${ac_var}_value=\$${ac_var}
1426 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1427 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1431 # Report the --help message.
1433 if test "$ac_init_help" = "long"; then
1434 # Omit some internal or obsolete options to make the list less imposing.
1435 # This message is too long to be a string in the A/UX 3.1 sh.
1437 \`configure' configures PostgreSQL 12devel to adapt to many kinds of systems.
1439 Usage: $0 [OPTION]... [VAR=VALUE]...
1441 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1442 VAR=VALUE. See below for descriptions of some of the useful variables.
1444 Defaults for the options are specified in brackets.
1447 -h, --help display this help and exit
1448 --help=short display options specific to this package
1449 --help=recursive display the short help of all the included packages
1450 -V, --version display version information and exit
1451 -q, --quiet, --silent do not print \`checking ...' messages
1452 --cache-file=FILE cache test results in FILE [disabled]
1453 -C, --config-cache alias for \`--cache-file=config.cache'
1454 -n, --no-create do not create output files
1455 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1457 Installation directories:
1458 --prefix=PREFIX install architecture-independent files in PREFIX
1459 [$ac_default_prefix]
1460 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1463 By default, \`make install' will install all the files in
1464 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1465 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1466 for instance \`--prefix=\$HOME'.
1468 For better control, use the options below.
1470 Fine tuning of the installation directories:
1471 --bindir=DIR user executables [EPREFIX/bin]
1472 --sbindir=DIR system admin executables [EPREFIX/sbin]
1473 --libexecdir=DIR program executables [EPREFIX/libexec]
1474 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1475 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1476 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1477 --libdir=DIR object code libraries [EPREFIX/lib]
1478 --includedir=DIR C header files [PREFIX/include]
1479 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1480 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1481 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1482 --infodir=DIR info documentation [DATAROOTDIR/info]
1483 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1484 --mandir=DIR man documentation [DATAROOTDIR/man]
1485 --docdir=DIR documentation root [DATAROOTDIR/doc/postgresql]
1486 --htmldir=DIR html documentation [DOCDIR]
1487 --dvidir=DIR dvi documentation [DOCDIR]
1488 --pdfdir=DIR pdf documentation [DOCDIR]
1489 --psdir=DIR ps documentation [DOCDIR]
1495 --build=BUILD configure for building on BUILD [guessed]
1496 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1500 if test -n "$ac_init_help"; then
1501 case $ac_init_help in
1502 short | recursive ) echo "Configuration of PostgreSQL 12devel:";;
1507 --disable-option-checking ignore unrecognized --enable/--with options
1508 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1509 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1510 --disable-integer-datetimes
1511 obsolete option, no longer supported
1512 --enable-nls[=LANGUAGES]
1513 enable Native Language Support
1514 --disable-rpath do not embed shared library search path in
1516 --disable-spinlocks do not use spinlocks
1517 --disable-atomics do not use atomic operations
1518 --enable-debug build with debugging symbols (-g)
1519 --enable-profiling build with profiling enabled
1520 --enable-coverage build with coverage testing instrumentation
1521 --enable-dtrace build with DTrace support
1522 --enable-tap-tests enable TAP tests (requires Perl and IPC::Run)
1523 --enable-depend turn on automatic dependency tracking
1524 --enable-cassert enable assertion checks (for debugging)
1525 --disable-thread-safety disable thread-safety in client libraries
1526 --disable-largefile omit support for large files
1527 --disable-float4-byval disable float4 passed by value
1528 --disable-float8-byval disable float8 passed by value
1531 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1532 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1533 --with-extra-version=STRING
1534 append STRING to version
1535 --with-template=NAME override operating system template
1536 --with-includes=DIRS look for additional header files in DIRS
1537 --with-libraries=DIRS look for additional libraries in DIRS
1538 --with-libs=DIRS alternative spelling of --with-libraries
1539 --with-pgport=PORTNUM set default port number [5432]
1540 --with-blocksize=BLOCKSIZE
1541 set table block size in kB [8]
1542 --with-segsize=SEGSIZE set table segment size in GB [1]
1543 --with-wal-blocksize=BLOCKSIZE
1544 set WAL block size in kB [8]
1545 --with-CC=CMD set compiler (deprecated)
1546 --with-llvm build with LLVM based JIT support
1547 --with-icu build with ICU support
1548 --with-tcl build Tcl modules (PL/Tcl)
1549 --with-tclconfig=DIR tclConfig.sh is in DIR
1550 --with-perl build Perl modules (PL/Perl)
1551 --with-python build Python modules (PL/Python)
1552 --with-gssapi build with GSSAPI support
1553 --with-krb-srvnam=NAME default service principal name in Kerberos (GSSAPI)
1555 --with-pam build with PAM support
1556 --with-bsd-auth build with BSD Authentication support
1557 --with-ldap build with LDAP support
1558 --with-bonjour build with Bonjour support
1559 --with-openssl build with OpenSSL support
1560 --with-selinux build with SELinux support
1561 --with-systemd build with systemd support
1562 --without-readline do not use GNU Readline nor BSD Libedit for editing
1563 --with-libedit-preferred
1564 prefer BSD Libedit over GNU Readline
1565 --with-uuid=LIB build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1566 --with-ossp-uuid obsolete spelling of --with-uuid=ossp
1567 --with-libxml build with XML support
1568 --with-libxslt use XSLT support when building contrib/xml2
1569 --with-system-tzdata=DIR
1570 use system time zone data in DIR
1571 --without-zlib do not use Zlib
1572 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1574 Some influential environment variables:
1575 CC C compiler command
1576 CFLAGS C compiler flags
1577 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1578 nonstandard directory <lib dir>
1579 LIBS libraries to pass to the linker, e.g. -l<library>
1580 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1581 you have headers in a nonstandard directory <include dir>
1582 CXX C++ compiler command
1583 CXXFLAGS C++ compiler flags
1584 LLVM_CONFIG path to llvm-config command
1585 CLANG path to clang compiler to generate bitcode
1587 PKG_CONFIG path to pkg-config utility
1589 directories to add to pkg-config's search path
1591 path overriding pkg-config's built-in search path
1592 ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
1593 ICU_LIBS linker flags for ICU, overriding pkg-config
1594 XML2_CONFIG path to xml2-config utility
1595 LDFLAGS_EX extra linker flags for linking executables only
1596 LDFLAGS_SL extra linker flags for linking shared libraries only
1598 PYTHON Python program
1599 MSGFMT msgfmt program for NLS
1600 TCLSH Tcl interpreter program (tclsh)
1602 Use these variables to override the choices made by `configure' or to help
1603 it to find libraries and programs with nonstandard names/locations.
1605 Report bugs to <pgsql-bugs@lists.postgresql.org>.
1610 if test "$ac_init_help" = "recursive"; then
1611 # If there are subdirs, report their specific --help.
1612 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1613 test -d "$ac_dir" ||
1614 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1619 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1621 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1622 # A ".." for each directory in $ac_dir_suffix.
1623 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1624 case $ac_top_builddir_sub in
1625 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1626 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1629 ac_abs_top_builddir=$ac_pwd
1630 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1631 # for backward compatibility:
1632 ac_top_builddir=$ac_top_build_prefix
1635 .) # We are building in place.
1637 ac_top_srcdir=$ac_top_builddir_sub
1638 ac_abs_top_srcdir=$ac_pwd ;;
1639 [\\/]* | ?:[\\/]* ) # Absolute name.
1640 ac_srcdir=$srcdir$ac_dir_suffix;
1641 ac_top_srcdir=$srcdir
1642 ac_abs_top_srcdir=$srcdir ;;
1644 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1645 ac_top_srcdir=$ac_top_build_prefix$srcdir
1646 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1648 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1650 cd "$ac_dir" || { ac_status=$?; continue; }
1651 # Check for guested configure.
1652 if test -f "$ac_srcdir/configure.gnu"; then
1654 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1655 elif test -f "$ac_srcdir/configure"; then
1657 $SHELL "$ac_srcdir/configure" --help=recursive
1659 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1661 cd "$ac_pwd" || { ac_status=$?; break; }
1665 test -n "$ac_init_help" && exit $ac_status
1666 if $ac_init_version; then
1668 PostgreSQL configure 12devel
1669 generated by GNU Autoconf 2.69
1671 Copyright (C) 2012 Free Software Foundation, Inc.
1672 This configure script is free software; the Free Software Foundation
1673 gives unlimited permission to copy, distribute and modify it.
1675 Copyright (c) 1996-2019, PostgreSQL Global Development Group
1680 ## ------------------------ ##
1681 ## Autoconf initialization. ##
1682 ## ------------------------ ##
1684 # ac_fn_c_try_compile LINENO
1685 # --------------------------
1686 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1687 ac_fn_c_try_compile ()
1689 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1690 rm -f conftest.$ac_objext
1691 if { { ac_try="$ac_compile"
1693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1694 *) ac_try_echo=$ac_try;;
1696 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1697 $as_echo "$ac_try_echo"; } >&5
1698 (eval "$ac_compile") 2>conftest.err
1700 if test -s conftest.err; then
1701 grep -v '^ *+' conftest.err >conftest.er1
1702 cat conftest.er1 >&5
1703 mv -f conftest.er1 conftest.err
1705 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1706 test $ac_status = 0; } && {
1707 test -z "$ac_c_werror_flag" ||
1708 test ! -s conftest.err
1709 } && test -s conftest.$ac_objext; then :
1712 $as_echo "$as_me: failed program was:" >&5
1713 sed 's/^/| /' conftest.$ac_ext >&5
1717 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1718 as_fn_set_status $ac_retval
1720 } # ac_fn_c_try_compile
1722 # ac_fn_cxx_try_compile LINENO
1723 # ----------------------------
1724 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1725 ac_fn_cxx_try_compile ()
1727 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1728 rm -f conftest.$ac_objext
1729 if { { ac_try="$ac_compile"
1731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1732 *) ac_try_echo=$ac_try;;
1734 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1735 $as_echo "$ac_try_echo"; } >&5
1736 (eval "$ac_compile") 2>conftest.err
1738 if test -s conftest.err; then
1739 grep -v '^ *+' conftest.err >conftest.er1
1740 cat conftest.er1 >&5
1741 mv -f conftest.er1 conftest.err
1743 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1744 test $ac_status = 0; } && {
1745 test -z "$ac_cxx_werror_flag" ||
1746 test ! -s conftest.err
1747 } && test -s conftest.$ac_objext; then :
1750 $as_echo "$as_me: failed program was:" >&5
1751 sed 's/^/| /' conftest.$ac_ext >&5
1755 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1756 as_fn_set_status $ac_retval
1758 } # ac_fn_cxx_try_compile
1760 # ac_fn_c_try_link LINENO
1761 # -----------------------
1762 # Try to link conftest.$ac_ext, and return whether this succeeded.
1765 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1766 rm -f conftest.$ac_objext conftest$ac_exeext
1767 if { { ac_try="$ac_link"
1769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1770 *) ac_try_echo=$ac_try;;
1772 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1773 $as_echo "$ac_try_echo"; } >&5
1774 (eval "$ac_link") 2>conftest.err
1776 if test -s conftest.err; then
1777 grep -v '^ *+' conftest.err >conftest.er1
1778 cat conftest.er1 >&5
1779 mv -f conftest.er1 conftest.err
1781 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1782 test $ac_status = 0; } && {
1783 test -z "$ac_c_werror_flag" ||
1784 test ! -s conftest.err
1785 } && test -s conftest$ac_exeext && {
1786 test "$cross_compiling" = yes ||
1787 test -x conftest$ac_exeext
1791 $as_echo "$as_me: failed program was:" >&5
1792 sed 's/^/| /' conftest.$ac_ext >&5
1796 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1797 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1798 # interfere with the next link command; also delete a directory that is
1799 # left behind by Apple's compiler. We do this before executing the actions.
1800 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1801 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1802 as_fn_set_status $ac_retval
1804 } # ac_fn_c_try_link
1806 # ac_fn_c_try_cpp LINENO
1807 # ----------------------
1808 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1811 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1812 if { { ac_try="$ac_cpp conftest.$ac_ext"
1814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1815 *) ac_try_echo=$ac_try;;
1817 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1818 $as_echo "$ac_try_echo"; } >&5
1819 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1821 if test -s conftest.err; then
1822 grep -v '^ *+' conftest.err >conftest.er1
1823 cat conftest.er1 >&5
1824 mv -f conftest.er1 conftest.err
1826 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1827 test $ac_status = 0; } > conftest.i && {
1828 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1829 test ! -s conftest.err
1833 $as_echo "$as_me: failed program was:" >&5
1834 sed 's/^/| /' conftest.$ac_ext >&5
1838 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1839 as_fn_set_status $ac_retval
1843 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1844 # -------------------------------------------------------
1845 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1846 # the include files in INCLUDES and setting the cache variable VAR
1848 ac_fn_c_check_header_mongrel ()
1850 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1851 if eval \${$3+:} false; then :
1852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1853 $as_echo_n "checking for $2... " >&6; }
1854 if eval \${$3+:} false; then :
1855 $as_echo_n "(cached) " >&6
1858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1859 $as_echo "$ac_res" >&6; }
1861 # Is the header compilable?
1862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1863 $as_echo_n "checking $2 usability... " >&6; }
1864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1865 /* end confdefs.h. */
1869 if ac_fn_c_try_compile "$LINENO"; then :
1870 ac_header_compiler=yes
1872 ac_header_compiler=no
1874 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1876 $as_echo "$ac_header_compiler" >&6; }
1878 # Is the header present?
1879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1880 $as_echo_n "checking $2 presence... " >&6; }
1881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1882 /* end confdefs.h. */
1885 if ac_fn_c_try_cpp "$LINENO"; then :
1886 ac_header_preproc=yes
1888 ac_header_preproc=no
1890 rm -f conftest.err conftest.i conftest.$ac_ext
1891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1892 $as_echo "$ac_header_preproc" >&6; }
1894 # So? What about this header?
1895 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1897 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1898 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1899 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1900 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1903 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1904 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1905 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1906 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1907 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1908 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1909 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1910 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1911 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1912 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1913 ( $as_echo "## ---------------------------------------------- ##
1914 ## Report this to pgsql-bugs@lists.postgresql.org ##
1915 ## ---------------------------------------------- ##"
1916 ) | sed "s/^/$as_me: WARNING: /" >&2
1919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1920 $as_echo_n "checking for $2... " >&6; }
1921 if eval \${$3+:} false; then :
1922 $as_echo_n "(cached) " >&6
1924 eval "$3=\$ac_header_compiler"
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1928 $as_echo "$ac_res" >&6; }
1930 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1932 } # ac_fn_c_check_header_mongrel
1934 # ac_fn_c_try_run LINENO
1935 # ----------------------
1936 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1937 # that executables *can* be run.
1940 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1941 if { { ac_try="$ac_link"
1943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1944 *) ac_try_echo=$ac_try;;
1946 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1947 $as_echo "$ac_try_echo"; } >&5
1948 (eval "$ac_link") 2>&5
1950 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1951 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1952 { { case "(($ac_try" in
1953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1954 *) ac_try_echo=$ac_try;;
1956 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1957 $as_echo "$ac_try_echo"; } >&5
1958 (eval "$ac_try") 2>&5
1960 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1961 test $ac_status = 0; }; }; then :
1964 $as_echo "$as_me: program exited with status $ac_status" >&5
1965 $as_echo "$as_me: failed program was:" >&5
1966 sed 's/^/| /' conftest.$ac_ext >&5
1968 ac_retval=$ac_status
1970 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1971 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1972 as_fn_set_status $ac_retval
1976 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1977 # -------------------------------------------------------
1978 # Tests whether HEADER exists and can be compiled using the include files in
1979 # INCLUDES, setting the cache variable VAR accordingly.
1980 ac_fn_c_check_header_compile ()
1982 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1984 $as_echo_n "checking for $2... " >&6; }
1985 if eval \${$3+:} false; then :
1986 $as_echo_n "(cached) " >&6
1988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1989 /* end confdefs.h. */
1993 if ac_fn_c_try_compile "$LINENO"; then :
1998 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2002 $as_echo "$ac_res" >&6; }
2003 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2005 } # ac_fn_c_check_header_compile
2007 # ac_fn_c_check_func LINENO FUNC VAR
2008 # ----------------------------------
2009 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2010 ac_fn_c_check_func ()
2012 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2014 $as_echo_n "checking for $2... " >&6; }
2015 if eval \${$3+:} false; then :
2016 $as_echo_n "(cached) " >&6
2018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2019 /* end confdefs.h. */
2020 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2021 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2022 #define $2 innocuous_$2
2024 /* System header to define __stub macros and hopefully few prototypes,
2025 which can conflict with char $2 (); below.
2026 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2027 <limits.h> exists even on freestanding compilers. */
2030 # include <limits.h>
2032 # include <assert.h>
2037 /* Override any GCC internal prototype to avoid an error.
2038 Use char because int might match the return type of a GCC
2039 builtin and then its argument prototype would still apply. */
2044 /* The GNU C library defines this for functions which it implements
2045 to always fail with ENOSYS. Some functions are actually named
2046 something starting with __ and the normal name is an alias. */
2047 #if defined __stub_$2 || defined __stub___$2
2059 if ac_fn_c_try_link "$LINENO"; then :
2064 rm -f core conftest.err conftest.$ac_objext \
2065 conftest$ac_exeext conftest.$ac_ext
2068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2069 $as_echo "$ac_res" >&6; }
2070 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2072 } # ac_fn_c_check_func
2074 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2075 # -------------------------------------------
2076 # Tests whether TYPE exists after having included INCLUDES, setting cache
2077 # variable VAR accordingly.
2078 ac_fn_c_check_type ()
2080 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2082 $as_echo_n "checking for $2... " >&6; }
2083 if eval \${$3+:} false; then :
2084 $as_echo_n "(cached) " >&6
2087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2088 /* end confdefs.h. */
2099 if ac_fn_c_try_compile "$LINENO"; then :
2100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2101 /* end confdefs.h. */
2112 if ac_fn_c_try_compile "$LINENO"; then :
2117 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2119 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2123 $as_echo "$ac_res" >&6; }
2124 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2126 } # ac_fn_c_check_type
2128 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2129 # ----------------------------------------------------
2130 # Tries to find if the field MEMBER exists in type AGGR, after including
2131 # INCLUDES, setting cache variable VAR accordingly.
2132 ac_fn_c_check_member ()
2134 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2136 $as_echo_n "checking for $2.$3... " >&6; }
2137 if eval \${$4+:} false; then :
2138 $as_echo_n "(cached) " >&6
2140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2141 /* end confdefs.h. */
2153 if ac_fn_c_try_compile "$LINENO"; then :
2156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2157 /* end confdefs.h. */
2163 if (sizeof ac_aggr.$3)
2169 if ac_fn_c_try_compile "$LINENO"; then :
2174 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2176 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2180 $as_echo "$ac_res" >&6; }
2181 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2183 } # ac_fn_c_check_member
2185 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2186 # --------------------------------------------
2187 # Tries to find the compile-time value of EXPR in a program that includes
2188 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2190 ac_fn_c_compute_int ()
2192 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2193 if test "$cross_compiling" = yes; then
2194 # Depending upon the size, compute the lo and hi bounds.
2195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2196 /* end confdefs.h. */
2201 static int test_array [1 - 2 * !(($2) >= 0)];
2203 return test_array [0];
2209 if ac_fn_c_try_compile "$LINENO"; then :
2212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2213 /* end confdefs.h. */
2218 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2220 return test_array [0];
2226 if ac_fn_c_try_compile "$LINENO"; then :
2227 ac_hi=$ac_mid; break
2229 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2230 if test $ac_lo -le $ac_mid; then
2234 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2236 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2240 /* end confdefs.h. */
2245 static int test_array [1 - 2 * !(($2) < 0)];
2247 return test_array [0];
2253 if ac_fn_c_try_compile "$LINENO"; then :
2256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2257 /* end confdefs.h. */
2262 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2264 return test_array [0];
2270 if ac_fn_c_try_compile "$LINENO"; then :
2271 ac_lo=$ac_mid; break
2273 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2274 if test $ac_mid -le $ac_hi; then
2278 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2280 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2285 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2287 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2288 # Binary search between lo and hi bounds.
2289 while test "x$ac_lo" != "x$ac_hi"; do
2290 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2292 /* end confdefs.h. */
2297 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2299 return test_array [0];
2305 if ac_fn_c_try_compile "$LINENO"; then :
2308 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2313 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2318 /* end confdefs.h. */
2320 static long int longval () { return $2; }
2321 static unsigned long int ulongval () { return $2; }
2328 FILE *f = fopen ("conftest.val", "w");
2333 long int i = longval ();
2336 fprintf (f, "%ld", i);
2340 unsigned long int i = ulongval ();
2343 fprintf (f, "%lu", i);
2345 /* Do not output a trailing newline, as this causes \r\n confusion
2346 on some platforms. */
2347 return ferror (f) || fclose (f) != 0;
2353 if ac_fn_c_try_run "$LINENO"; then :
2354 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2358 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2359 conftest.$ac_objext conftest.beam conftest.$ac_ext
2363 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2364 as_fn_set_status $ac_retval
2366 } # ac_fn_c_compute_int
2368 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2369 # ---------------------------------------------
2370 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2372 ac_fn_c_check_decl ()
2374 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2375 # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2376 as_decl_name=`echo $2|sed 's/ *(.*//'`
2377 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2379 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2380 if eval \${$3+:} false; then :
2381 $as_echo_n "(cached) " >&6
2383 ac_save_werror_flag=$ac_c_werror_flag
2384 ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2386 /* end confdefs.h. */
2391 #ifndef $as_decl_name
2393 (void) $as_decl_use;
2395 (void) $as_decl_name;
2403 if ac_fn_c_try_compile "$LINENO"; then :
2408 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2409 ac_c_werror_flag=$ac_save_werror_flag
2412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2413 $as_echo "$ac_res" >&6; }
2414 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2416 } # ac_fn_c_check_decl
2417 cat >config.log <<_ACEOF
2418 This file contains any messages produced by compilers while
2419 running configure, to aid debugging if configure makes a mistake.
2421 It was created by PostgreSQL $as_me 12devel, which was
2422 generated by GNU Autoconf 2.69. Invocation command line was
2434 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2435 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2436 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2437 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2438 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2440 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2441 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2443 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2444 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2445 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2446 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2447 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2448 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2449 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2453 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2457 test -z "$as_dir" && as_dir=.
2458 $as_echo "PATH: $as_dir"
2474 # Keep a trace of the command line.
2475 # Strip out --no-create and --no-recursion so they do not pile up.
2476 # Strip out --silent because we don't want to record it for future runs.
2477 # Also quote any args containing shell meta-characters.
2478 # Make two passes to allow for proper duplicate-argument suppression.
2482 ac_must_keep_next=false
2488 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2489 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2490 | -silent | --silent | --silen | --sile | --sil)
2493 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2496 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2498 as_fn_append ac_configure_args1 " '$ac_arg'"
2499 if test $ac_must_keep_next = true; then
2500 ac_must_keep_next=false # Got value, back to normal.
2503 *=* | --config-cache | -C | -disable-* | --disable-* \
2504 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2505 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2506 | -with-* | --with-* | -without-* | --without-* | --x)
2507 case "$ac_configure_args0 " in
2508 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2511 -* ) ac_must_keep_next=true ;;
2514 as_fn_append ac_configure_args " '$ac_arg'"
2519 { ac_configure_args0=; unset ac_configure_args0;}
2520 { ac_configure_args1=; unset ac_configure_args1;}
2522 # When interrupted or exit'd, cleanup temporary files, and complete
2523 # config.log. We remove comments because anyway the quotes in there
2524 # would cause problems or look ugly.
2525 # WARNING: Use '\'' to represent an apostrophe within the trap.
2526 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2527 trap 'exit_status=$?
2528 # Save into config.log some information that might help in debugging.
2532 $as_echo "## ---------------- ##
2533 ## Cache variables. ##
2534 ## ---------------- ##"
2536 # The following way of writing the cache mishandles newlines in values,
2538 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2539 eval ac_val=\$$ac_var
2543 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2544 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2547 _ | IFS | as_nl) ;; #(
2548 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2549 *) { eval $ac_var=; unset $ac_var;} ;;
2554 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2555 *${as_nl}ac_space=\ *)
2557 "s/'\''/'\''\\\\'\'''\''/g;
2558 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2561 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2568 $as_echo "## ----------------- ##
2569 ## Output variables. ##
2570 ## ----------------- ##"
2572 for ac_var in $ac_subst_vars
2574 eval ac_val=\$$ac_var
2576 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2578 $as_echo "$ac_var='\''$ac_val'\''"
2582 if test -n "$ac_subst_files"; then
2583 $as_echo "## ------------------- ##
2584 ## File substitutions. ##
2585 ## ------------------- ##"
2587 for ac_var in $ac_subst_files
2589 eval ac_val=\$$ac_var
2591 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2593 $as_echo "$ac_var='\''$ac_val'\''"
2598 if test -s confdefs.h; then
2599 $as_echo "## ----------- ##
2606 test "$ac_signal" != 0 &&
2607 $as_echo "$as_me: caught signal $ac_signal"
2608 $as_echo "$as_me: exit $exit_status"
2610 rm -f core *.core core.conftest.* &&
2611 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2614 for ac_signal in 1 2 13 15; do
2615 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2619 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2620 rm -f -r conftest* confdefs.h
2622 $as_echo "/* confdefs.h */" > confdefs.h
2624 # Predefined preprocessor variables.
2626 cat >>confdefs.h <<_ACEOF
2627 #define PACKAGE_NAME "$PACKAGE_NAME"
2630 cat >>confdefs.h <<_ACEOF
2631 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2634 cat >>confdefs.h <<_ACEOF
2635 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2638 cat >>confdefs.h <<_ACEOF
2639 #define PACKAGE_STRING "$PACKAGE_STRING"
2642 cat >>confdefs.h <<_ACEOF
2643 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2646 cat >>confdefs.h <<_ACEOF
2647 #define PACKAGE_URL "$PACKAGE_URL"
2651 # Let the site file select an alternate cache file if it wants to.
2652 # Prefer an explicitly selected file to automatically selected ones.
2655 if test -n "$CONFIG_SITE"; then
2656 # We do not want a PATH search for config.site.
2657 case $CONFIG_SITE in #((
2658 -*) ac_site_file1=./$CONFIG_SITE;;
2659 */*) ac_site_file1=$CONFIG_SITE;;
2660 *) ac_site_file1=./$CONFIG_SITE;;
2662 elif test "x$prefix" != xNONE; then
2663 ac_site_file1=$prefix/share/config.site
2664 ac_site_file2=$prefix/etc/config.site
2666 ac_site_file1=$ac_default_prefix/share/config.site
2667 ac_site_file2=$ac_default_prefix/etc/config.site
2669 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2671 test "x$ac_site_file" = xNONE && continue
2672 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2673 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2674 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2675 sed 's/^/| /' "$ac_site_file" >&5
2677 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2678 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2679 as_fn_error $? "failed to load site script $ac_site_file
2680 See \`config.log' for more details" "$LINENO" 5; }
2684 if test -r "$cache_file"; then
2685 # Some versions of bash will fail to source /dev/null (special files
2686 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2687 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2688 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2689 $as_echo "$as_me: loading cache $cache_file" >&6;}
2691 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2692 *) . "./$cache_file";;
2696 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2697 $as_echo "$as_me: creating cache $cache_file" >&6;}
2701 # Check that the precious variables saved in the cache have kept the same
2703 ac_cache_corrupted=false
2704 for ac_var in $ac_precious_vars; do
2705 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2706 eval ac_new_set=\$ac_env_${ac_var}_set
2707 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2708 eval ac_new_val=\$ac_env_${ac_var}_value
2709 case $ac_old_set,$ac_new_set in
2711 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2712 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2713 ac_cache_corrupted=: ;;
2715 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2716 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2717 ac_cache_corrupted=: ;;
2720 if test "x$ac_old_val" != "x$ac_new_val"; then
2721 # differences in whitespace do not lead to failure.
2722 ac_old_val_w=`echo x $ac_old_val`
2723 ac_new_val_w=`echo x $ac_new_val`
2724 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2725 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2726 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2727 ac_cache_corrupted=:
2729 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2730 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2731 eval $ac_var=\$ac_old_val
2733 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2734 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2735 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2736 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2739 # Pass precious variables to config.status.
2740 if test "$ac_new_set" = set; then
2742 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2743 *) ac_arg=$ac_var=$ac_new_val ;;
2745 case " $ac_configure_args " in
2746 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2747 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2751 if $ac_cache_corrupted; then
2752 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2753 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2754 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2755 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2756 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2758 ## -------------------- ##
2759 ## Main body of script. ##
2760 ## -------------------- ##
2763 ac_cpp='$CPP $CPPFLAGS'
2764 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2765 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2766 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2774 for ac_dir in config "$srcdir"/config; do
2775 if test -f "$ac_dir/install-sh"; then
2777 ac_install_sh="$ac_aux_dir/install-sh -c"
2779 elif test -f "$ac_dir/install.sh"; then
2781 ac_install_sh="$ac_aux_dir/install.sh -c"
2783 elif test -f "$ac_dir/shtool"; then
2785 ac_install_sh="$ac_aux_dir/shtool install -c"
2789 if test -z "$ac_aux_dir"; then
2790 as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2793 # These three variables are undocumented and unsupported,
2794 # and are intended to be withdrawn in a future Autoconf release.
2795 # They can cause serious problems if a builder's source tree is in a directory
2796 # whose full name contains unusual characters.
2797 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2798 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2799 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2803 configure_args=$ac_configure_args
2806 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2809 cat >>confdefs.h <<_ACEOF
2810 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2817 # Check whether --with-extra-version was given.
2818 if test "${with_extra_version+set}" = set; then :
2819 withval=$with_extra_version;
2822 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2825 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2828 PG_VERSION="$PACKAGE_VERSION$withval"
2833 PG_VERSION="$PACKAGE_VERSION"
2838 cat >>confdefs.h <<_ACEOF
2839 #define PG_VERSION "$PG_VERSION"
2843 # Make sure we can run config.sub.
2844 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2845 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2848 $as_echo_n "checking build system type... " >&6; }
2849 if ${ac_cv_build+:} false; then :
2850 $as_echo_n "(cached) " >&6
2852 ac_build_alias=$build_alias
2853 test "x$ac_build_alias" = x &&
2854 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2855 test "x$ac_build_alias" = x &&
2856 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2857 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2858 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2862 $as_echo "$ac_cv_build" >&6; }
2863 case $ac_cv_build in
2865 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2868 ac_save_IFS=$IFS; IFS='-'
2874 # Remember, the first character of IFS is used to create $*,
2875 # except with old shells:
2878 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2882 $as_echo_n "checking host system type... " >&6; }
2883 if ${ac_cv_host+:} false; then :
2884 $as_echo_n "(cached) " >&6
2886 if test "x$host_alias" = x; then
2887 ac_cv_host=$ac_cv_build
2889 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2890 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2895 $as_echo "$ac_cv_host" >&6; }
2898 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2901 ac_save_IFS=$IFS; IFS='-'
2907 # Remember, the first character of IFS is used to create $*,
2908 # except with old shells:
2911 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2917 $as_echo_n "checking which template to use... " >&6; }
2922 # Check whether --with-template was given.
2923 if test "${with_template+set}" = set; then :
2924 withval=$with_template;
2927 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2930 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2935 list) echo; ls "$srcdir/src/template"; exit;;
2936 *) if test -f "$srcdir/src/template/$with_template" ; then
2939 as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2948 # --with-template not given
2951 aix*) template=aix ;;
2952 cygwin*) template=cygwin ;;
2953 darwin*) template=darwin ;;
2954 dragonfly*) template=netbsd ;;
2955 freebsd*) template=freebsd ;;
2956 hpux*) template=hpux ;;
2957 linux*|gnu*|k*bsd*-gnu)
2959 mingw*) template=win32 ;;
2960 netbsd*) template=netbsd ;;
2961 openbsd*) template=openbsd ;;
2962 solaris*) template=solaris ;;
2965 if test x"$template" = x"" ; then
2967 *******************************************************************
2968 PostgreSQL has apparently not been ported to your platform yet.
2969 To try a manual configuration, look into the src/template directory
2970 for a similar platform and use the '--with-template=' option.
2972 Please also contact <pgsql-bugs@lists.postgresql.org> to see about
2973 rectifying this. Include the above 'checking host system type...'
2975 *******************************************************************
2984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2985 $as_echo "$template" >&6; }
2990 # Initialize default assumption that we do not need separate assembly code
2991 # for TAS (test-and-set). This can be overridden by the template file
2992 # when it's executed.
2999 ## Command line options
3003 # Add non-standard directories to the include path
3008 # Check whether --with-includes was given.
3009 if test "${with_includes+set}" = set; then :
3010 withval=$with_includes;
3013 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3016 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3029 # Add non-standard directories to the library search path
3034 # Check whether --with-libraries was given.
3035 if test "${with_libraries+set}" = set; then :
3036 withval=$with_libraries;
3039 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3042 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3045 LIBRARY_DIRS=$withval
3056 # Check whether --with-libs was given.
3057 if test "${with_libs+set}" = set; then :
3061 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3064 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3067 LIBRARY_DIRS=$withval
3077 # 64-bit integer date/time storage is now the only option, but to avoid
3078 # unnecessary breakage of build scripts, continue to accept an explicit
3079 # "--enable-integer-datetimes" switch.
3083 # Check whether --enable-integer-datetimes was given.
3084 if test "${enable_integer_datetimes+set}" = set; then :
3085 enableval=$enable_integer_datetimes;
3091 as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3094 as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3099 enable_integer_datetimes=yes
3109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3110 $as_echo_n "checking whether NLS is wanted... " >&6; }
3113 # Check whether --enable-nls was given.
3114 if test "${enable_nls+set}" = set; then :
3115 enableval=$enable_nls;
3125 WANTED_LANGUAGES=$enableval
3135 if test "$enable_nls" = yes; then
3137 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3142 $as_echo "$enable_nls" >&6; }
3147 # Default port number (--with-pgport), default 5432
3149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3150 $as_echo_n "checking for default port number... " >&6; }
3154 # Check whether --with-pgport was given.
3155 if test "${with_pgport+set}" = set; then :
3156 withval=$with_pgport;
3159 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3162 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3165 default_port=$withval
3174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3175 $as_echo "$default_port" >&6; }
3176 # Need both of these because some places want an integer and some a string
3178 cat >>confdefs.h <<_ACEOF
3179 #define DEF_PGPORT ${default_port}
3183 cat >>confdefs.h <<_ACEOF
3184 #define DEF_PGPORT_STR "${default_port}"
3189 # It's worth validating port; you can get very confusing errors otherwise
3190 if test x"$default_port" = x""; then
3191 as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3192 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3193 as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3194 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3195 as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3196 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3197 as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3201 # '-rpath'-like feature can be disabled
3205 # Check whether --enable-rpath was given.
3206 if test "${enable_rpath+set}" = set; then :
3207 enableval=$enable_rpath;
3216 as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3233 # Check whether --enable-spinlocks was given.
3234 if test "${enable_spinlocks+set}" = set; then :
3235 enableval=$enable_spinlocks;
3244 as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3249 enable_spinlocks=yes
3260 # Check whether --enable-atomics was given.
3261 if test "${enable_atomics+set}" = set; then :
3262 enableval=$enable_atomics;
3271 as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3283 # --enable-debug adds -g to compiler flags
3287 # Check whether --enable-debug was given.
3288 if test "${enable_debug+set}" = set; then :
3289 enableval=$enable_debug;
3298 as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3311 # --enable-profiling enables gcc profiling
3315 # Check whether --enable-profiling was given.
3316 if test "${enable_profiling+set}" = set; then :
3317 enableval=$enable_profiling;
3326 as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3338 # --enable-coverage enables generation of code coverage metrics with gcov
3342 # Check whether --enable-coverage was given.
3343 if test "${enable_coverage+set}" = set; then :
3344 enableval=$enable_coverage;
3347 if test -z "$GCOV"; then
3350 # Extract the first word of "$ac_prog", so it can be a program name with args.
3351 set dummy $ac_prog; ac_word=$2
3352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3353 $as_echo_n "checking for $ac_word... " >&6; }
3354 if ${ac_cv_path_GCOV+:} false; then :
3355 $as_echo_n "(cached) " >&6
3359 ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3362 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3366 test -z "$as_dir" && as_dir=.
3367 for ac_exec_ext in '' $ac_executable_extensions; do
3368 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3369 ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3370 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3380 GCOV=$ac_cv_path_GCOV
3381 if test -n "$GCOV"; then
3382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3383 $as_echo "$GCOV" >&6; }
3385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3386 $as_echo "no" >&6; }
3390 test -n "$GCOV" && break
3394 # Report the value of GCOV in configure's output in all cases.
3395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3396 $as_echo_n "checking for GCOV... " >&6; }
3397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3398 $as_echo "$GCOV" >&6; }
3401 if test -z "$GCOV"; then
3402 as_fn_error $? "gcov not found" "$LINENO" 5
3404 if test -z "$LCOV"; then
3407 # Extract the first word of "$ac_prog", so it can be a program name with args.
3408 set dummy $ac_prog; ac_word=$2
3409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3410 $as_echo_n "checking for $ac_word... " >&6; }
3411 if ${ac_cv_path_LCOV+:} false; then :
3412 $as_echo_n "(cached) " >&6
3416 ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3419 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3423 test -z "$as_dir" && as_dir=.
3424 for ac_exec_ext in '' $ac_executable_extensions; do
3425 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3426 ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3427 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3437 LCOV=$ac_cv_path_LCOV
3438 if test -n "$LCOV"; then
3439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3440 $as_echo "$LCOV" >&6; }
3442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3443 $as_echo "no" >&6; }
3447 test -n "$LCOV" && break
3451 # Report the value of LCOV in configure's output in all cases.
3452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3453 $as_echo_n "checking for LCOV... " >&6; }
3454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3455 $as_echo "$LCOV" >&6; }
3458 if test -z "$LCOV"; then
3459 as_fn_error $? "lcov not found" "$LINENO" 5
3461 if test -z "$GENHTML"; then
3462 for ac_prog in genhtml
3464 # Extract the first word of "$ac_prog", so it can be a program name with args.
3465 set dummy $ac_prog; ac_word=$2
3466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3467 $as_echo_n "checking for $ac_word... " >&6; }
3468 if ${ac_cv_path_GENHTML+:} false; then :
3469 $as_echo_n "(cached) " >&6
3473 ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3476 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3480 test -z "$as_dir" && as_dir=.
3481 for ac_exec_ext in '' $ac_executable_extensions; do
3482 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3483 ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3484 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3494 GENHTML=$ac_cv_path_GENHTML
3495 if test -n "$GENHTML"; then
3496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3497 $as_echo "$GENHTML" >&6; }
3499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3500 $as_echo "no" >&6; }
3504 test -n "$GENHTML" && break
3508 # Report the value of GENHTML in configure's output in all cases.
3509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3510 $as_echo_n "checking for GENHTML... " >&6; }
3511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3512 $as_echo "$GENHTML" >&6; }
3515 if test -z "$GENHTML"; then
3516 as_fn_error $? "genhtml not found" "$LINENO" 5
3523 as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3540 # Check whether --enable-dtrace was given.
3541 if test "${enable_dtrace+set}" = set; then :
3542 enableval=$enable_dtrace;
3545 if test -z "$DTRACE"; then
3546 for ac_prog in dtrace
3548 # Extract the first word of "$ac_prog", so it can be a program name with args.
3549 set dummy $ac_prog; ac_word=$2
3550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3551 $as_echo_n "checking for $ac_word... " >&6; }
3552 if ${ac_cv_path_DTRACE+:} false; then :
3553 $as_echo_n "(cached) " >&6
3557 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3560 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3564 test -z "$as_dir" && as_dir=.
3565 for ac_exec_ext in '' $ac_executable_extensions; do
3566 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3567 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3568 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3578 DTRACE=$ac_cv_path_DTRACE
3579 if test -n "$DTRACE"; then
3580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3581 $as_echo "$DTRACE" >&6; }
3583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3584 $as_echo "no" >&6; }
3588 test -n "$DTRACE" && break
3592 # Report the value of DTRACE in configure's output in all cases.
3593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3594 $as_echo_n "checking for DTRACE... " >&6; }
3595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3596 $as_echo "$DTRACE" >&6; }
3599 if test -z "$DTRACE"; then
3600 as_fn_error $? "dtrace not found" "$LINENO" 5
3608 as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3625 # Check whether --enable-tap-tests was given.
3626 if test "${enable_tap_tests+set}" = set; then :
3627 enableval=$enable_tap_tests;
3636 as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3652 $as_echo_n "checking for block size... " >&6; }
3656 # Check whether --with-blocksize was given.
3657 if test "${with_blocksize+set}" = set; then :
3658 withval=$with_blocksize;
3661 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3664 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3676 case ${blocksize} in
3683 *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3686 $as_echo "${blocksize}kB" >&6; }
3689 cat >>confdefs.h <<_ACEOF
3690 #define BLCKSZ ${BLCKSZ}
3695 # Relation segment size
3697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3698 $as_echo_n "checking for segment size... " >&6; }
3702 # Check whether --with-segsize was given.
3703 if test "${with_segsize+set}" = set; then :
3704 withval=$with_segsize;
3707 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3710 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3722 # this expression is set up to avoid unnecessary integer overflow
3723 # blocksize is already guaranteed to be a factor of 1024
3724 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3725 test $? -eq 0 || exit 1
3726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3727 $as_echo "${segsize}GB" >&6; }
3730 cat >>confdefs.h <<_ACEOF
3731 #define RELSEG_SIZE ${RELSEG_SIZE}
3738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3739 $as_echo_n "checking for WAL block size... " >&6; }
3743 # Check whether --with-wal-blocksize was given.
3744 if test "${with_wal_blocksize+set}" = set; then :
3745 withval=$with_wal_blocksize;
3748 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3751 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3754 wal_blocksize=$withval
3763 case ${wal_blocksize} in
3764 1) XLOG_BLCKSZ=1024;;
3765 2) XLOG_BLCKSZ=2048;;
3766 4) XLOG_BLCKSZ=4096;;
3767 8) XLOG_BLCKSZ=8192;;
3768 16) XLOG_BLCKSZ=16384;;
3769 32) XLOG_BLCKSZ=32768;;
3770 64) XLOG_BLCKSZ=65536;;
3771 *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3774 $as_echo "${wal_blocksize}kB" >&6; }
3777 cat >>confdefs.h <<_ACEOF
3778 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3786 # For historical reasons you can also use --with-CC to specify the C compiler
3787 # to use, although the standard way to do this is to set the CC environment
3792 # Check whether --with-CC was given.
3793 if test "${with_CC+set}" = set; then :
3797 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3800 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3812 aix) pgac_cc_list="gcc xlc"; pgac_cxx_list="g++ xlC";;
3813 *) pgac_cc_list="gcc cc"; pgac_cxx_list="g++ c++";;
3817 ac_cpp='$CPP $CPPFLAGS'
3818 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3819 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3820 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3821 if test -n "$ac_tool_prefix"; then
3822 for ac_prog in $pgac_cc_list
3824 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3825 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3827 $as_echo_n "checking for $ac_word... " >&6; }
3828 if ${ac_cv_prog_CC+:} false; then :
3829 $as_echo_n "(cached) " >&6
3831 if test -n "$CC"; then
3832 ac_cv_prog_CC="$CC" # Let the user override the test.
3834 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3838 test -z "$as_dir" && as_dir=.
3839 for ac_exec_ext in '' $ac_executable_extensions; do
3840 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3841 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3842 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3852 if test -n "$CC"; then
3853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3854 $as_echo "$CC" >&6; }
3856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3857 $as_echo "no" >&6; }
3861 test -n "$CC" && break
3864 if test -z "$CC"; then
3866 for ac_prog in $pgac_cc_list
3868 # Extract the first word of "$ac_prog", so it can be a program name with args.
3869 set dummy $ac_prog; ac_word=$2
3870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3871 $as_echo_n "checking for $ac_word... " >&6; }
3872 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3873 $as_echo_n "(cached) " >&6
3875 if test -n "$ac_ct_CC"; then
3876 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3878 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3882 test -z "$as_dir" && as_dir=.
3883 for ac_exec_ext in '' $ac_executable_extensions; do
3884 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3885 ac_cv_prog_ac_ct_CC="$ac_prog"
3886 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3895 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3896 if test -n "$ac_ct_CC"; then
3897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3898 $as_echo "$ac_ct_CC" >&6; }
3900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3901 $as_echo "no" >&6; }
3905 test -n "$ac_ct_CC" && break
3908 if test "x$ac_ct_CC" = x; then
3911 case $cross_compiling:$ac_tool_warned in
3913 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3914 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3915 ac_tool_warned=yes ;;
3922 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3923 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3924 as_fn_error $? "no acceptable C compiler found in \$PATH
3925 See \`config.log' for more details" "$LINENO" 5; }
3927 # Provide some information about the compiler.
3928 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3931 for ac_option in --version -v -V -qversion; do
3932 { { ac_try="$ac_compiler $ac_option >&5"
3934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3935 *) ac_try_echo=$ac_try;;
3937 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3938 $as_echo "$ac_try_echo"; } >&5
3939 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3941 if test -s conftest.err; then
3943 ... rest of stderr output deleted ...
3944 10q' conftest.err >conftest.er1
3945 cat conftest.er1 >&5
3947 rm -f conftest.er1 conftest.err
3948 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3949 test $ac_status = 0; }
3952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3953 /* end confdefs.h. */
3963 ac_clean_files_save=$ac_clean_files
3964 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3965 # Try to create an executable without -o first, disregard a.out.
3966 # It will help us diagnose broken compilers, and finding out an intuition
3968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3969 $as_echo_n "checking whether the C compiler works... " >&6; }
3970 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3972 # The possible output files:
3973 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3976 for ac_file in $ac_files
3979 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3980 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3985 if { { ac_try="$ac_link_default"
3987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3988 *) ac_try_echo=$ac_try;;
3990 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3991 $as_echo "$ac_try_echo"; } >&5
3992 (eval "$ac_link_default") 2>&5
3994 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3995 test $ac_status = 0; }; then :
3996 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3997 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3998 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3999 # so that the user can short-circuit this test for compilers unknown to
4001 for ac_file in $ac_files ''
4003 test -f "$ac_file" || continue
4005 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4008 # We found the default executable, but exeext='' is most
4012 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4014 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4016 # We set ac_cv_exeext here because the later test for it is not
4017 # safe: cross compilers may not add the suffix if given an `-o'
4018 # argument, so we may need to know it at that point already.
4019 # Even if this section looks crufty: it has the advantage of
4026 test "$ac_cv_exeext" = no && ac_cv_exeext=
4031 if test -z "$ac_file"; then :
4032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4033 $as_echo "no" >&6; }
4034 $as_echo "$as_me: failed program was:" >&5
4035 sed 's/^/| /' conftest.$ac_ext >&5
4037 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4038 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4039 as_fn_error 77 "C compiler cannot create executables
4040 See \`config.log' for more details" "$LINENO" 5; }
4042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4043 $as_echo "yes" >&6; }
4045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4046 $as_echo_n "checking for C compiler default output file name... " >&6; }
4047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4048 $as_echo "$ac_file" >&6; }
4049 ac_exeext=$ac_cv_exeext
4051 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4052 ac_clean_files=$ac_clean_files_save
4053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4054 $as_echo_n "checking for suffix of executables... " >&6; }
4055 if { { ac_try="$ac_link"
4057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4058 *) ac_try_echo=$ac_try;;
4060 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4061 $as_echo "$ac_try_echo"; } >&5
4062 (eval "$ac_link") 2>&5
4064 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4065 test $ac_status = 0; }; then :
4066 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4067 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4068 # work properly (i.e., refer to `conftest.exe'), while it won't with
4070 for ac_file in conftest.exe conftest conftest.*; do
4071 test -f "$ac_file" || continue
4073 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4074 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4080 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4081 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4082 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4083 See \`config.log' for more details" "$LINENO" 5; }
4085 rm -f conftest conftest$ac_cv_exeext
4086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4087 $as_echo "$ac_cv_exeext" >&6; }
4089 rm -f conftest.$ac_ext
4090 EXEEXT=$ac_cv_exeext
4092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4093 /* end confdefs.h. */
4098 FILE *f = fopen ("conftest.out", "w");
4099 return ferror (f) || fclose (f) != 0;
4105 ac_clean_files="$ac_clean_files conftest.out"
4106 # Check that the compiler produces executables we can run. If not, either
4107 # the compiler is broken, or we cross compile.
4108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4109 $as_echo_n "checking whether we are cross compiling... " >&6; }
4110 if test "$cross_compiling" != yes; then
4111 { { ac_try="$ac_link"
4113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4114 *) ac_try_echo=$ac_try;;
4116 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4117 $as_echo "$ac_try_echo"; } >&5
4118 (eval "$ac_link") 2>&5
4120 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4121 test $ac_status = 0; }
4122 if { ac_try='./conftest$ac_cv_exeext'
4123 { { case "(($ac_try" in
4124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4125 *) ac_try_echo=$ac_try;;
4127 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4128 $as_echo "$ac_try_echo"; } >&5
4129 (eval "$ac_try") 2>&5
4131 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4132 test $ac_status = 0; }; }; then
4135 if test "$cross_compiling" = maybe; then
4138 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4139 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4140 as_fn_error $? "cannot run C compiled programs.
4141 If you meant to cross compile, use \`--host'.
4142 See \`config.log' for more details" "$LINENO" 5; }
4146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4147 $as_echo "$cross_compiling" >&6; }
4149 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4150 ac_clean_files=$ac_clean_files_save
4151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4152 $as_echo_n "checking for suffix of object files... " >&6; }
4153 if ${ac_cv_objext+:} false; then :
4154 $as_echo_n "(cached) " >&6
4156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4157 /* end confdefs.h. */
4167 rm -f conftest.o conftest.obj
4168 if { { ac_try="$ac_compile"
4170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4171 *) ac_try_echo=$ac_try;;
4173 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4174 $as_echo "$ac_try_echo"; } >&5
4175 (eval "$ac_compile") 2>&5
4177 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4178 test $ac_status = 0; }; then :
4179 for ac_file in conftest.o conftest.obj conftest.*; do
4180 test -f "$ac_file" || continue;
4182 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4183 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4188 $as_echo "$as_me: failed program was:" >&5
4189 sed 's/^/| /' conftest.$ac_ext >&5
4191 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4192 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4193 as_fn_error $? "cannot compute suffix of object files: cannot compile
4194 See \`config.log' for more details" "$LINENO" 5; }
4196 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4199 $as_echo "$ac_cv_objext" >&6; }
4200 OBJEXT=$ac_cv_objext
4202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4203 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4204 if ${ac_cv_c_compiler_gnu+:} false; then :
4205 $as_echo_n "(cached) " >&6
4207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4208 /* end confdefs.h. */
4221 if ac_fn_c_try_compile "$LINENO"; then :
4226 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4227 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4231 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4232 if test $ac_compiler_gnu = yes; then
4237 ac_test_CFLAGS=${CFLAGS+set}
4238 ac_save_CFLAGS=$CFLAGS
4239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4240 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4241 if ${ac_cv_prog_cc_g+:} false; then :
4242 $as_echo_n "(cached) " >&6
4244 ac_save_c_werror_flag=$ac_c_werror_flag
4245 ac_c_werror_flag=yes
4248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4249 /* end confdefs.h. */
4259 if ac_fn_c_try_compile "$LINENO"; then :
4263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4264 /* end confdefs.h. */
4274 if ac_fn_c_try_compile "$LINENO"; then :
4277 ac_c_werror_flag=$ac_save_c_werror_flag
4279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4280 /* end confdefs.h. */
4290 if ac_fn_c_try_compile "$LINENO"; then :
4293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4295 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4297 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4298 ac_c_werror_flag=$ac_save_c_werror_flag
4300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4301 $as_echo "$ac_cv_prog_cc_g" >&6; }
4302 if test "$ac_test_CFLAGS" = set; then
4303 CFLAGS=$ac_save_CFLAGS
4304 elif test $ac_cv_prog_cc_g = yes; then
4305 if test "$GCC" = yes; then
4311 if test "$GCC" = yes; then
4317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4318 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4319 if ${ac_cv_prog_cc_c89+:} false; then :
4320 $as_echo_n "(cached) " >&6
4322 ac_cv_prog_cc_c89=no
4324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4325 /* end confdefs.h. */
4329 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4330 struct buf { int x; };
4331 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4332 static char *e (p, i)
4338 static char *f (char * (*g) (char **, int), char **p, ...)
4343 s = g (p, va_arg (v,int));
4348 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4349 function prototypes and stuff, but not '\xHH' hex character constants.
4350 These don't provoke an error unfortunately, instead are silently treated
4351 as 'x'. The following induces an error, until -std is added to get
4352 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4353 array size at least. It's necessary to write '\x00'==0 to get something
4354 that's true only with -std. */
4355 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4357 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4358 inside strings and character constants. */
4360 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4362 int test (int i, double x);
4363 struct s1 {int (*f) (int a);};
4364 struct s2 {int (*f) (double a);};
4365 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4371 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4376 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4377 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4379 CC="$ac_save_CC $ac_arg"
4380 if ac_fn_c_try_compile "$LINENO"; then :
4381 ac_cv_prog_cc_c89=$ac_arg
4383 rm -f core conftest.err conftest.$ac_objext
4384 test "x$ac_cv_prog_cc_c89" != "xno" && break
4386 rm -f conftest.$ac_ext
4391 case "x$ac_cv_prog_cc_c89" in
4393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4394 $as_echo "none needed" >&6; } ;;
4396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4397 $as_echo "unsupported" >&6; } ;;
4399 CC="$CC $ac_cv_prog_cc_c89"
4400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4401 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4403 if test "x$ac_cv_prog_cc_c89" != xno; then :
4408 ac_cpp='$CPP $CPPFLAGS'
4409 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4410 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4411 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4414 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4415 if ${ac_cv_prog_cc_c99+:} false; then :
4416 $as_echo_n "(cached) " >&6
4418 ac_cv_prog_cc_c99=no
4420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4421 /* end confdefs.h. */
4423 #include <stdbool.h>
4428 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4429 #define debug(...) fprintf (stderr, __VA_ARGS__)
4430 #define showlist(...) puts (#__VA_ARGS__)
4431 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4433 test_varargs_macros (void)
4438 debug ("X = %d\n", x);
4439 showlist (The first, second, and third items.);
4440 report (x>y, "x is %d but y is %d", x, y);
4443 // Check long long types.
4444 #define BIG64 18446744073709551615ull
4445 #define BIG32 4294967295ul
4446 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4448 your preprocessor is broken;
4452 your preprocessor is broken;
4454 static long long int bignum = -9223372036854775807LL;
4455 static unsigned long long int ubignum = BIG64;
4457 struct incomplete_array
4465 const wchar_t *name;
4469 typedef const char *ccp;
4472 test_restrict (ccp restrict text)
4474 // See if C++-style comments work.
4475 // Iterate through items via the restricted pointer.
4476 // Also check for declarations in for loops.
4477 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4482 // Check varargs and va_copy.
4484 test_varargs (const char *format, ...)
4487 va_start (args, format);
4489 va_copy (args_copy, args);
4500 str = va_arg (args_copy, const char *);
4503 number = va_arg (args_copy, int);
4506 fnumber = va_arg (args_copy, double);
4521 _Bool success = false;
4524 if (test_restrict ("String literal") == 0)
4526 char *restrict newvar = "Another string";
4529 test_varargs ("s, d' f .", "string", 65, 34.234);
4530 test_varargs_macros ();
4532 // Check flexible array members.
4533 struct incomplete_array *ia =
4534 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4536 for (int i = 0; i < ia->datasize; ++i)
4537 ia->data[i] = i * 1.234;
4539 // Check named initializers.
4540 struct named_init ni = {
4542 .name = L"Test wide string",
4543 .average = 543.34343,
4548 int dynamic_array[ni.number];
4549 dynamic_array[ni.number - 1] = 543;
4551 // work around unused variable warnings
4552 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4553 || dynamic_array[ni.number - 1] != 543);
4559 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4561 CC="$ac_save_CC $ac_arg"
4562 if ac_fn_c_try_compile "$LINENO"; then :
4563 ac_cv_prog_cc_c99=$ac_arg
4565 rm -f core conftest.err conftest.$ac_objext
4566 test "x$ac_cv_prog_cc_c99" != "xno" && break
4568 rm -f conftest.$ac_ext
4573 case "x$ac_cv_prog_cc_c99" in
4575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4576 $as_echo "none needed" >&6; } ;;
4578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4579 $as_echo "unsupported" >&6; } ;;
4581 CC="$CC $ac_cv_prog_cc_c99"
4582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4583 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4585 if test "x$ac_cv_prog_cc_c99" != xno; then :
4591 # Error out if the compiler does not support C99, as the codebase
4593 if test "$ac_cv_prog_cc_c99" = no; then
4594 as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4598 ac_cpp='$CXXCPP $CPPFLAGS'
4599 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4600 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4601 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4602 if test -z "$CXX"; then
4603 if test -n "$CCC"; then
4606 if test -n "$ac_tool_prefix"; then
4607 for ac_prog in $pgac_cxx_list
4609 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4610 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4612 $as_echo_n "checking for $ac_word... " >&6; }
4613 if ${ac_cv_prog_CXX+:} false; then :
4614 $as_echo_n "(cached) " >&6
4616 if test -n "$CXX"; then
4617 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4619 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4623 test -z "$as_dir" && as_dir=.
4624 for ac_exec_ext in '' $ac_executable_extensions; do
4625 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4626 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4627 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4637 if test -n "$CXX"; then
4638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4639 $as_echo "$CXX" >&6; }
4641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4642 $as_echo "no" >&6; }
4646 test -n "$CXX" && break
4649 if test -z "$CXX"; then
4651 for ac_prog in $pgac_cxx_list
4653 # Extract the first word of "$ac_prog", so it can be a program name with args.
4654 set dummy $ac_prog; ac_word=$2
4655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4656 $as_echo_n "checking for $ac_word... " >&6; }
4657 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4658 $as_echo_n "(cached) " >&6
4660 if test -n "$ac_ct_CXX"; then
4661 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4663 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4667 test -z "$as_dir" && as_dir=.
4668 for ac_exec_ext in '' $ac_executable_extensions; do
4669 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4670 ac_cv_prog_ac_ct_CXX="$ac_prog"
4671 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4680 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4681 if test -n "$ac_ct_CXX"; then
4682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4683 $as_echo "$ac_ct_CXX" >&6; }
4685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4686 $as_echo "no" >&6; }
4690 test -n "$ac_ct_CXX" && break
4693 if test "x$ac_ct_CXX" = x; then
4696 case $cross_compiling:$ac_tool_warned in
4698 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4699 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4700 ac_tool_warned=yes ;;
4708 # Provide some information about the compiler.
4709 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4712 for ac_option in --version -v -V -qversion; do
4713 { { ac_try="$ac_compiler $ac_option >&5"
4715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4716 *) ac_try_echo=$ac_try;;
4718 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4719 $as_echo "$ac_try_echo"; } >&5
4720 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4722 if test -s conftest.err; then
4724 ... rest of stderr output deleted ...
4725 10q' conftest.err >conftest.er1
4726 cat conftest.er1 >&5
4728 rm -f conftest.er1 conftest.err
4729 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4730 test $ac_status = 0; }
4733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4734 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4735 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4736 $as_echo_n "(cached) " >&6
4738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4739 /* end confdefs.h. */
4752 if ac_fn_cxx_try_compile "$LINENO"; then :
4757 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4758 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4762 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4763 if test $ac_compiler_gnu = yes; then
4768 ac_test_CXXFLAGS=${CXXFLAGS+set}
4769 ac_save_CXXFLAGS=$CXXFLAGS
4770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4771 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4772 if ${ac_cv_prog_cxx_g+:} false; then :
4773 $as_echo_n "(cached) " >&6
4775 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4776 ac_cxx_werror_flag=yes
4779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4780 /* end confdefs.h. */
4790 if ac_fn_cxx_try_compile "$LINENO"; then :
4791 ac_cv_prog_cxx_g=yes
4794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4795 /* end confdefs.h. */
4805 if ac_fn_cxx_try_compile "$LINENO"; then :
4808 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4811 /* end confdefs.h. */
4821 if ac_fn_cxx_try_compile "$LINENO"; then :
4822 ac_cv_prog_cxx_g=yes
4824 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4826 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4828 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4829 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4832 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4833 if test "$ac_test_CXXFLAGS" = set; then
4834 CXXFLAGS=$ac_save_CXXFLAGS
4835 elif test $ac_cv_prog_cxx_g = yes; then
4836 if test "$GXX" = yes; then
4842 if test "$GXX" = yes; then
4849 ac_cpp='$CPP $CPPFLAGS'
4850 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4851 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4852 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4855 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4856 # but has idiosyncrasies of its own. We assume icc will define
4857 # __INTEL_COMPILER regardless of CFLAGS.
4859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4860 /* end confdefs.h. */
4865 #ifndef __INTEL_COMPILER
4872 if ac_fn_c_try_compile "$LINENO"; then :
4877 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4879 # Check if it's Sun Studio compiler. We assume that
4880 # __SUNPRO_C will be defined for Sun Studio compilers
4881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4882 /* end confdefs.h. */
4894 if ac_fn_c_try_compile "$LINENO"; then :
4899 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4907 # Checked early because subsequent tests depend on it.
4911 # Check whether --with-llvm was given.
4912 if test "${with_llvm+set}" = set; then :
4917 $as_echo "#define USE_LLVM 1" >>confdefs.h
4924 as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4935 for ac_prog in gawk mawk nawk awk
4937 # Extract the first word of "$ac_prog", so it can be a program name with args.
4938 set dummy $ac_prog; ac_word=$2
4939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4940 $as_echo_n "checking for $ac_word... " >&6; }
4941 if ${ac_cv_prog_AWK+:} false; then :
4942 $as_echo_n "(cached) " >&6
4944 if test -n "$AWK"; then
4945 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4951 test -z "$as_dir" && as_dir=.
4952 for ac_exec_ext in '' $ac_executable_extensions; do
4953 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4954 ac_cv_prog_AWK="$ac_prog"
4955 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4965 if test -n "$AWK"; then
4966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4967 $as_echo "$AWK" >&6; }
4969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4970 $as_echo "no" >&6; }
4974 test -n "$AWK" && break
4977 if test "$with_llvm" = yes; then :
4983 if test -z "$LLVM_CONFIG"; then
4984 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
4986 # Extract the first word of "$ac_prog", so it can be a program name with args.
4987 set dummy $ac_prog; ac_word=$2
4988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4989 $as_echo_n "checking for $ac_word... " >&6; }
4990 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
4991 $as_echo_n "(cached) " >&6
4993 case $LLVM_CONFIG in
4995 ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
4998 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5002 test -z "$as_dir" && as_dir=.
5003 for ac_exec_ext in '' $ac_executable_extensions; do
5004 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5005 ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5006 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5016 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5017 if test -n "$LLVM_CONFIG"; then
5018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5019 $as_echo "$LLVM_CONFIG" >&6; }
5021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5022 $as_echo "no" >&6; }
5026 test -n "$LLVM_CONFIG" && break
5030 # Report the value of LLVM_CONFIG in configure's output in all cases.
5031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5032 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5034 $as_echo "$LLVM_CONFIG" >&6; }
5038 # no point continuing if llvm wasn't found
5039 if test -z "$LLVM_CONFIG"; then
5040 as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5042 # check if detected $LLVM_CONFIG is executable
5043 pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5044 if test "x$pgac_llvm_version" = "xno"; then
5045 as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5047 # and whether the version is supported
5048 if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 4 || ($1 == 3 && $2 >= 9)) exit 1; else exit 0;}';then
5049 as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 3.9 is required" "$LINENO" 5
5052 # need clang to create some bitcode files
5054 if test -z "$CLANG"; then
5055 for ac_prog in clang clang-7 clang-6.0 clang-5.0 clang-4.0 clang-3.9
5057 # Extract the first word of "$ac_prog", so it can be a program name with args.
5058 set dummy $ac_prog; ac_word=$2
5059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5060 $as_echo_n "checking for $ac_word... " >&6; }
5061 if ${ac_cv_path_CLANG+:} false; then :
5062 $as_echo_n "(cached) " >&6
5066 ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5069 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5073 test -z "$as_dir" && as_dir=.
5074 for ac_exec_ext in '' $ac_executable_extensions; do
5075 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5076 ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5077 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5087 CLANG=$ac_cv_path_CLANG
5088 if test -n "$CLANG"; then
5089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5090 $as_echo "$CLANG" >&6; }
5092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5093 $as_echo "no" >&6; }
5097 test -n "$CLANG" && break
5101 # Report the value of CLANG in configure's output in all cases.
5102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5103 $as_echo_n "checking for CLANG... " >&6; }
5104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5105 $as_echo "$CLANG" >&6; }
5108 if test -z "$CLANG"; then
5109 as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5111 # make sure clang is executable
5112 if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5113 as_fn_error $? "$CLANG does not work" "$LINENO" 5
5115 # Could check clang version, but it doesn't seem that
5116 # important. Systems with a new enough LLVM version are usually
5117 # going to have a decent clang version too. It's also not entirely
5118 # clear what the minimum version is.
5120 # Collect compiler flags necessary to build the LLVM dependent
5122 for pgac_option in `$LLVM_CONFIG --cppflags`; do
5123 case $pgac_option in
5124 -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5128 for pgac_option in `$LLVM_CONFIG --ldflags`; do
5129 case $pgac_option in
5130 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5134 # ABI influencing options, standard influencing options
5135 for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5136 case $pgac_option in
5137 -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5138 -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5142 # Look for components we're interested in, collect necessary
5143 # libs. As some components are optional, we can't just list all of
5144 # them as it'd raise an error.
5146 for pgac_component in `$LLVM_CONFIG --components`; do
5147 case $pgac_component in
5148 engine) pgac_components="$pgac_components $pgac_component";;
5149 debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5150 orcjit) pgac_components="$pgac_components $pgac_component";;
5151 passes) pgac_components="$pgac_components $pgac_component";;
5152 perfjitevents) pgac_components="$pgac_components $pgac_component";;
5156 # And then get the libraries that need to be linked in for the
5157 # selected components. They're large libraries, we only want to
5158 # link them into the LLVM using shared library.
5159 for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5160 case $pgac_option in
5161 -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5165 LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5167 # LLVM_CONFIG, CLANG are already output via AC_ARG_VAR
5185 . "$srcdir/src/template/$template" || exit
5187 # C[XX]FLAGS are selected so:
5188 # If the user specifies something in the environment, that is used.
5189 # else: If the template file set something, that is used.
5190 # else: If coverage was enabled, don't set anything.
5191 # else: If the compiler is GCC, then we use -O2.
5192 # else: If the compiler is something else, then we use -O, unless debugging.
5194 if test "$ac_env_CFLAGS_set" = set; then
5195 CFLAGS=$ac_env_CFLAGS_value
5196 elif test "${CFLAGS+set}" = set; then
5197 : # (keep what template set)
5198 elif test "$enable_coverage" = yes; then
5199 : # no optimization by default
5200 elif test "$GCC" = yes; then
5203 # if the user selected debug mode, don't use -O
5204 if test "$enable_debug" != yes; then
5209 if test "$ac_env_CXXFLAGS_set" = set; then
5210 CXXFLAGS=$ac_env_CXXFLAGS_value
5211 elif test "${CXXFLAGS+set}" = set; then
5212 : # (keep what template set)
5213 elif test "$enable_coverage" = yes; then
5214 : # no optimization by default
5215 elif test "$GCC" = yes; then
5218 # if the user selected debug mode, don't use -O
5219 if test "$enable_debug" != yes; then
5224 # When generating bitcode (for inlining) we always want to use -O2
5225 # even when --enable-debug is specified. The bitcode it's not going to
5226 # be used for line-by-line debugging, and JIT inlining doesn't work
5227 # without at least -O1 (otherwise clang will emit 'noinline'
5228 # attributes everywhere), which is bad for testing. Still allow the
5229 # environment to override if done explicitly.
5230 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5231 BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5233 BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5235 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5236 BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5238 BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5241 # C[XX]FLAGS we determined above will be added back at the end
5244 user_CXXFLAGS=$CXXFLAGS
5246 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5248 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5251 # set CFLAGS_VECTOR from the environment, if available
5252 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
5253 CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
5256 # Some versions of GCC support some additional useful warning flags.
5257 # Check whether they are supported, and add them to CFLAGS if so.
5258 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5259 # but has its own. Also check other compiler-specific flags here.
5261 if test "$GCC" = yes -a "$ICC" = no; then
5262 CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5263 CXXFLAGS="-Wall -Wpointer-arith"
5264 # These work in some but not all gcc versions
5266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5267 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5268 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5269 $as_echo_n "(cached) " >&6
5271 pgac_save_CFLAGS=$CFLAGS
5274 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5275 ac_save_c_werror_flag=$ac_c_werror_flag
5276 ac_c_werror_flag=yes
5277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5278 /* end confdefs.h. */
5288 if ac_fn_c_try_compile "$LINENO"; then :
5289 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5291 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5294 ac_c_werror_flag=$ac_save_c_werror_flag
5295 CFLAGS="$pgac_save_CFLAGS"
5298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5299 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5300 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5301 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5305 # -Wdeclaration-after-statement isn't applicable for C++
5306 # Really don't want VLAs to be used in our dialect of C
5308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5309 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5310 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5311 $as_echo_n "(cached) " >&6
5313 pgac_save_CFLAGS=$CFLAGS
5316 CFLAGS="${CFLAGS} -Werror=vla"
5317 ac_save_c_werror_flag=$ac_c_werror_flag
5318 ac_c_werror_flag=yes
5319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5320 /* end confdefs.h. */
5330 if ac_fn_c_try_compile "$LINENO"; then :
5331 pgac_cv_prog_CC_cflags__Werror_vla=yes
5333 pgac_cv_prog_CC_cflags__Werror_vla=no
5335 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5336 ac_c_werror_flag=$ac_save_c_werror_flag
5337 CFLAGS="$pgac_save_CFLAGS"
5340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5341 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5342 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5343 CFLAGS="${CFLAGS} -Werror=vla"
5347 # -Wvla is not applicable for C++
5349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5350 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5351 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5352 $as_echo_n "(cached) " >&6
5354 pgac_save_CFLAGS=$CFLAGS
5357 CFLAGS="${CFLAGS} -Wendif-labels"
5358 ac_save_c_werror_flag=$ac_c_werror_flag
5359 ac_c_werror_flag=yes
5360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5361 /* end confdefs.h. */
5371 if ac_fn_c_try_compile "$LINENO"; then :
5372 pgac_cv_prog_CC_cflags__Wendif_labels=yes
5374 pgac_cv_prog_CC_cflags__Wendif_labels=no
5376 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5377 ac_c_werror_flag=$ac_save_c_werror_flag
5378 CFLAGS="$pgac_save_CFLAGS"
5381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5382 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5383 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5384 CFLAGS="${CFLAGS} -Wendif-labels"
5388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5389 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5390 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5391 $as_echo_n "(cached) " >&6
5393 pgac_save_CXXFLAGS=$CXXFLAGS
5396 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5397 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5398 ac_cxx_werror_flag=yes
5400 ac_cpp='$CXXCPP $CPPFLAGS'
5401 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5402 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5403 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5406 /* end confdefs.h. */
5416 if ac_fn_cxx_try_compile "$LINENO"; then :
5417 pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5419 pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5421 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5423 ac_cpp='$CPP $CPPFLAGS'
5424 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5425 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5426 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5428 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5429 CXXFLAGS="$pgac_save_CXXFLAGS"
5430 CXX="$pgac_save_CXX"
5432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5433 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5434 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5435 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5441 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5442 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5443 $as_echo_n "(cached) " >&6
5445 pgac_save_CFLAGS=$CFLAGS
5448 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5449 ac_save_c_werror_flag=$ac_c_werror_flag
5450 ac_c_werror_flag=yes
5451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5452 /* end confdefs.h. */
5462 if ac_fn_c_try_compile "$LINENO"; then :
5463 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5465 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5467 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5468 ac_c_werror_flag=$ac_save_c_werror_flag
5469 CFLAGS="$pgac_save_CFLAGS"
5472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5473 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5474 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5475 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5480 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5481 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5482 $as_echo_n "(cached) " >&6
5484 pgac_save_CXXFLAGS=$CXXFLAGS
5487 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5488 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5489 ac_cxx_werror_flag=yes
5491 ac_cpp='$CXXCPP $CPPFLAGS'
5492 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5493 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5494 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5497 /* end confdefs.h. */
5507 if ac_fn_cxx_try_compile "$LINENO"; then :
5508 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5510 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5512 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5514 ac_cpp='$CPP $CPPFLAGS'
5515 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5516 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5517 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5519 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5520 CXXFLAGS="$pgac_save_CXXFLAGS"
5521 CXX="$pgac_save_CXX"
5523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5524 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5525 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5526 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5530 # This was included in -Wall/-Wformat in older GCC versions
5532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5533 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5534 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5535 $as_echo_n "(cached) " >&6
5537 pgac_save_CFLAGS=$CFLAGS
5540 CFLAGS="${CFLAGS} -Wformat-security"
5541 ac_save_c_werror_flag=$ac_c_werror_flag
5542 ac_c_werror_flag=yes
5543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5544 /* end confdefs.h. */
5554 if ac_fn_c_try_compile "$LINENO"; then :
5555 pgac_cv_prog_CC_cflags__Wformat_security=yes
5557 pgac_cv_prog_CC_cflags__Wformat_security=no
5559 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5560 ac_c_werror_flag=$ac_save_c_werror_flag
5561 CFLAGS="$pgac_save_CFLAGS"
5564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5565 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5566 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5567 CFLAGS="${CFLAGS} -Wformat-security"
5571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5572 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5573 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5574 $as_echo_n "(cached) " >&6
5576 pgac_save_CXXFLAGS=$CXXFLAGS
5579 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5580 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5581 ac_cxx_werror_flag=yes
5583 ac_cpp='$CXXCPP $CPPFLAGS'
5584 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5585 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5586 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5589 /* end confdefs.h. */
5599 if ac_fn_cxx_try_compile "$LINENO"; then :
5600 pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
5602 pgac_cv_prog_CXX_cxxflags__Wformat_security=no
5604 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5606 ac_cpp='$CPP $CPPFLAGS'
5607 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5608 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5609 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5611 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5612 CXXFLAGS="$pgac_save_CXXFLAGS"
5613 CXX="$pgac_save_CXX"
5615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
5616 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
5617 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
5618 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5622 # Disable strict-aliasing rules; needed for gcc 3.3+
5624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
5625 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
5626 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
5627 $as_echo_n "(cached) " >&6
5629 pgac_save_CFLAGS=$CFLAGS
5632 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5633 ac_save_c_werror_flag=$ac_c_werror_flag
5634 ac_c_werror_flag=yes
5635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5636 /* end confdefs.h. */
5646 if ac_fn_c_try_compile "$LINENO"; then :
5647 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
5649 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
5651 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5652 ac_c_werror_flag=$ac_save_c_werror_flag
5653 CFLAGS="$pgac_save_CFLAGS"
5656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
5657 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
5658 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
5659 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
5664 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
5665 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
5666 $as_echo_n "(cached) " >&6
5668 pgac_save_CXXFLAGS=$CXXFLAGS
5671 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5672 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5673 ac_cxx_werror_flag=yes
5675 ac_cpp='$CXXCPP $CPPFLAGS'
5676 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5677 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5678 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5681 /* end confdefs.h. */
5691 if ac_fn_cxx_try_compile "$LINENO"; then :
5692 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
5694 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
5696 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5698 ac_cpp='$CPP $CPPFLAGS'
5699 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5700 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5701 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5703 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5704 CXXFLAGS="$pgac_save_CXXFLAGS"
5705 CXX="$pgac_save_CXX"
5707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
5708 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
5709 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
5710 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5714 # Disable optimizations that assume no overflow; needed for gcc 4.3+
5716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
5717 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
5718 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
5719 $as_echo_n "(cached) " >&6
5721 pgac_save_CFLAGS=$CFLAGS
5724 CFLAGS="${CFLAGS} -fwrapv"
5725 ac_save_c_werror_flag=$ac_c_werror_flag
5726 ac_c_werror_flag=yes
5727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5728 /* end confdefs.h. */
5738 if ac_fn_c_try_compile "$LINENO"; then :
5739 pgac_cv_prog_CC_cflags__fwrapv=yes
5741 pgac_cv_prog_CC_cflags__fwrapv=no
5743 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5744 ac_c_werror_flag=$ac_save_c_werror_flag
5745 CFLAGS="$pgac_save_CFLAGS"
5748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
5749 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
5750 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
5751 CFLAGS="${CFLAGS} -fwrapv"
5755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
5756 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
5757 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
5758 $as_echo_n "(cached) " >&6
5760 pgac_save_CXXFLAGS=$CXXFLAGS
5763 CXXFLAGS="${CXXFLAGS} -fwrapv"
5764 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5765 ac_cxx_werror_flag=yes
5767 ac_cpp='$CXXCPP $CPPFLAGS'
5768 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5769 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5770 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5773 /* end confdefs.h. */
5783 if ac_fn_cxx_try_compile "$LINENO"; then :
5784 pgac_cv_prog_CXX_cxxflags__fwrapv=yes
5786 pgac_cv_prog_CXX_cxxflags__fwrapv=no
5788 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5790 ac_cpp='$CPP $CPPFLAGS'
5791 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5792 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5793 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5795 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5796 CXXFLAGS="$pgac_save_CXXFLAGS"
5797 CXX="$pgac_save_CXX"
5799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
5800 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
5801 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
5802 CXXFLAGS="${CXXFLAGS} -fwrapv"
5806 # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
5808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
5809 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
5810 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
5811 $as_echo_n "(cached) " >&6
5813 pgac_save_CFLAGS=$CFLAGS
5816 CFLAGS="${CFLAGS} -fexcess-precision=standard"
5817 ac_save_c_werror_flag=$ac_c_werror_flag
5818 ac_c_werror_flag=yes
5819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5820 /* end confdefs.h. */
5830 if ac_fn_c_try_compile "$LINENO"; then :
5831 pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
5833 pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
5835 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5836 ac_c_werror_flag=$ac_save_c_werror_flag
5837 CFLAGS="$pgac_save_CFLAGS"
5840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
5841 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
5842 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
5843 CFLAGS="${CFLAGS} -fexcess-precision=standard"
5847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
5848 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
5849 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
5850 $as_echo_n "(cached) " >&6
5852 pgac_save_CXXFLAGS=$CXXFLAGS
5855 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5856 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5857 ac_cxx_werror_flag=yes
5859 ac_cpp='$CXXCPP $CPPFLAGS'
5860 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5861 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5862 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5865 /* end confdefs.h. */
5875 if ac_fn_cxx_try_compile "$LINENO"; then :
5876 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
5878 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
5880 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5882 ac_cpp='$CPP $CPPFLAGS'
5883 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5884 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5885 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5887 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5888 CXXFLAGS="$pgac_save_CXXFLAGS"
5889 CXX="$pgac_save_CXX"
5891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
5892 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
5893 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
5894 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5898 # Optimization flags for specific files that benefit from vectorization
5899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR" >&5
5900 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR... " >&6; }
5901 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
5902 $as_echo_n "(cached) " >&6
5904 pgac_save_CFLAGS=$CFLAGS
5907 CFLAGS="${CFLAGS_VECTOR} -funroll-loops"
5908 ac_save_c_werror_flag=$ac_c_werror_flag
5909 ac_c_werror_flag=yes
5910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5911 /* end confdefs.h. */
5921 if ac_fn_c_try_compile "$LINENO"; then :
5922 pgac_cv_prog_CC_cflags__funroll_loops=yes
5924 pgac_cv_prog_CC_cflags__funroll_loops=no
5926 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5927 ac_c_werror_flag=$ac_save_c_werror_flag
5928 CFLAGS="$pgac_save_CFLAGS"
5931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
5932 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
5933 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
5934 CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
5938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR" >&5
5939 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR... " >&6; }
5940 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
5941 $as_echo_n "(cached) " >&6
5943 pgac_save_CFLAGS=$CFLAGS
5946 CFLAGS="${CFLAGS_VECTOR} -ftree-vectorize"
5947 ac_save_c_werror_flag=$ac_c_werror_flag
5948 ac_c_werror_flag=yes
5949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5950 /* end confdefs.h. */
5960 if ac_fn_c_try_compile "$LINENO"; then :
5961 pgac_cv_prog_CC_cflags__ftree_vectorize=yes
5963 pgac_cv_prog_CC_cflags__ftree_vectorize=no
5965 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5966 ac_c_werror_flag=$ac_save_c_werror_flag
5967 CFLAGS="$pgac_save_CFLAGS"
5970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
5971 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
5972 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
5973 CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
5977 # We want to suppress clang's unhelpful unused-command-line-argument warnings
5978 # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
5979 # test for the positive form and if that works, add the negative form
5981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
5982 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
5983 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
5984 $as_echo_n "(cached) " >&6
5986 pgac_save_CFLAGS=$CFLAGS
5989 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
5990 ac_save_c_werror_flag=$ac_c_werror_flag
5991 ac_c_werror_flag=yes
5992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5993 /* end confdefs.h. */
6003 if ac_fn_c_try_compile "$LINENO"; then :
6004 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6006 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6008 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6009 ac_c_werror_flag=$ac_save_c_werror_flag
6010 CFLAGS="$pgac_save_CFLAGS"
6013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6014 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6015 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6016 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6020 if test -n "$NOT_THE_CFLAGS"; then
6021 CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6023 # Similarly disable useless truncation warnings from gcc 8+
6025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6026 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6027 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6028 $as_echo_n "(cached) " >&6
6030 pgac_save_CFLAGS=$CFLAGS
6033 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6034 ac_save_c_werror_flag=$ac_c_werror_flag
6035 ac_c_werror_flag=yes
6036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6037 /* end confdefs.h. */
6047 if ac_fn_c_try_compile "$LINENO"; then :
6048 pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6050 pgac_cv_prog_CC_cflags__Wformat_truncation=no
6052 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6053 ac_c_werror_flag=$ac_save_c_werror_flag
6054 CFLAGS="$pgac_save_CFLAGS"
6057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6058 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6059 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6060 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6064 if test -n "$NOT_THE_CFLAGS"; then
6065 CFLAGS="$CFLAGS -Wno-format-truncation"
6068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6069 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6070 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6071 $as_echo_n "(cached) " >&6
6073 pgac_save_CFLAGS=$CFLAGS
6076 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6077 ac_save_c_werror_flag=$ac_c_werror_flag
6078 ac_c_werror_flag=yes
6079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6080 /* end confdefs.h. */
6090 if ac_fn_c_try_compile "$LINENO"; then :
6091 pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6093 pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6095 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6096 ac_c_werror_flag=$ac_save_c_werror_flag
6097 CFLAGS="$pgac_save_CFLAGS"
6100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6101 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6102 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6103 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6107 if test -n "$NOT_THE_CFLAGS"; then
6108 CFLAGS="$CFLAGS -Wno-stringop-truncation"
6110 elif test "$ICC" = yes; then
6111 # Intel's compiler has a bug/misoptimization in checking for
6112 # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6115 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6116 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6117 $as_echo_n "(cached) " >&6
6119 pgac_save_CFLAGS=$CFLAGS
6122 CFLAGS="${CFLAGS} -mp1"
6123 ac_save_c_werror_flag=$ac_c_werror_flag
6124 ac_c_werror_flag=yes
6125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6126 /* end confdefs.h. */
6136 if ac_fn_c_try_compile "$LINENO"; then :
6137 pgac_cv_prog_CC_cflags__mp1=yes
6139 pgac_cv_prog_CC_cflags__mp1=no
6141 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6142 ac_c_werror_flag=$ac_save_c_werror_flag
6143 CFLAGS="$pgac_save_CFLAGS"
6146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6147 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6148 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6149 CFLAGS="${CFLAGS} -mp1"
6153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6154 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6155 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6156 $as_echo_n "(cached) " >&6
6158 pgac_save_CXXFLAGS=$CXXFLAGS
6161 CXXFLAGS="${CXXFLAGS} -mp1"
6162 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6163 ac_cxx_werror_flag=yes
6165 ac_cpp='$CXXCPP $CPPFLAGS'
6166 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6167 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6168 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6171 /* end confdefs.h. */
6181 if ac_fn_cxx_try_compile "$LINENO"; then :
6182 pgac_cv_prog_CXX_cxxflags__mp1=yes
6184 pgac_cv_prog_CXX_cxxflags__mp1=no
6186 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6188 ac_cpp='$CPP $CPPFLAGS'
6189 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6190 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6191 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6193 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6194 CXXFLAGS="$pgac_save_CXXFLAGS"
6195 CXX="$pgac_save_CXX"
6197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6198 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6199 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6200 CXXFLAGS="${CXXFLAGS} -mp1"
6204 # Make sure strict aliasing is off (though this is said to be the default)
6206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6207 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6208 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6209 $as_echo_n "(cached) " >&6
6211 pgac_save_CFLAGS=$CFLAGS
6214 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6215 ac_save_c_werror_flag=$ac_c_werror_flag
6216 ac_c_werror_flag=yes
6217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6218 /* end confdefs.h. */
6228 if ac_fn_c_try_compile "$LINENO"; then :
6229 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6231 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6233 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6234 ac_c_werror_flag=$ac_save_c_werror_flag
6235 CFLAGS="$pgac_save_CFLAGS"
6238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6239 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6240 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6241 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6246 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6247 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6248 $as_echo_n "(cached) " >&6
6250 pgac_save_CXXFLAGS=$CXXFLAGS
6253 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6254 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6255 ac_cxx_werror_flag=yes
6257 ac_cpp='$CXXCPP $CPPFLAGS'
6258 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6259 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6260 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6263 /* end confdefs.h. */
6273 if ac_fn_cxx_try_compile "$LINENO"; then :
6274 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6276 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6278 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6280 ac_cpp='$CPP $CPPFLAGS'
6281 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6282 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6283 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6285 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6286 CXXFLAGS="$pgac_save_CXXFLAGS"
6287 CXX="$pgac_save_CXX"
6289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6290 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6291 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6292 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6296 elif test "$PORTNAME" = "aix"; then
6297 # AIX's xlc has to have strict aliasing turned off too
6299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6300 $as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6301 if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6302 $as_echo_n "(cached) " >&6
6304 pgac_save_CFLAGS=$CFLAGS
6307 CFLAGS="${CFLAGS} -qnoansialias"
6308 ac_save_c_werror_flag=$ac_c_werror_flag
6309 ac_c_werror_flag=yes
6310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6311 /* end confdefs.h. */
6321 if ac_fn_c_try_compile "$LINENO"; then :
6322 pgac_cv_prog_CC_cflags__qnoansialias=yes
6324 pgac_cv_prog_CC_cflags__qnoansialias=no
6326 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6327 ac_c_werror_flag=$ac_save_c_werror_flag
6328 CFLAGS="$pgac_save_CFLAGS"
6331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6332 $as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6333 if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6334 CFLAGS="${CFLAGS} -qnoansialias"
6338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6339 $as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6340 if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6341 $as_echo_n "(cached) " >&6
6343 pgac_save_CXXFLAGS=$CXXFLAGS
6346 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6347 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6348 ac_cxx_werror_flag=yes
6350 ac_cpp='$CXXCPP $CPPFLAGS'
6351 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6352 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6353 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6356 /* end confdefs.h. */
6366 if ac_fn_cxx_try_compile "$LINENO"; then :
6367 pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6369 pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6371 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6373 ac_cpp='$CPP $CPPFLAGS'
6374 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6375 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6376 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6378 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6379 CXXFLAGS="$pgac_save_CXXFLAGS"
6380 CXX="$pgac_save_CXX"
6382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6383 $as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6384 if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6385 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6391 $as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6392 if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6393 $as_echo_n "(cached) " >&6
6395 pgac_save_CFLAGS=$CFLAGS
6398 CFLAGS="${CFLAGS} -qlonglong"
6399 ac_save_c_werror_flag=$ac_c_werror_flag
6400 ac_c_werror_flag=yes
6401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6402 /* end confdefs.h. */
6412 if ac_fn_c_try_compile "$LINENO"; then :
6413 pgac_cv_prog_CC_cflags__qlonglong=yes
6415 pgac_cv_prog_CC_cflags__qlonglong=no
6417 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6418 ac_c_werror_flag=$ac_save_c_werror_flag
6419 CFLAGS="$pgac_save_CFLAGS"
6422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6423 $as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6424 if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6425 CFLAGS="${CFLAGS} -qlonglong"
6429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6430 $as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6431 if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6432 $as_echo_n "(cached) " >&6
6434 pgac_save_CXXFLAGS=$CXXFLAGS
6437 CXXFLAGS="${CXXFLAGS} -qlonglong"
6438 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6439 ac_cxx_werror_flag=yes
6441 ac_cpp='$CXXCPP $CPPFLAGS'
6442 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6443 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6444 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6447 /* end confdefs.h. */
6457 if ac_fn_cxx_try_compile "$LINENO"; then :
6458 pgac_cv_prog_CXX_cxxflags__qlonglong=yes
6460 pgac_cv_prog_CXX_cxxflags__qlonglong=no
6462 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6464 ac_cpp='$CPP $CPPFLAGS'
6465 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6466 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6467 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6469 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6470 CXXFLAGS="$pgac_save_CXXFLAGS"
6471 CXX="$pgac_save_CXX"
6473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
6474 $as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
6475 if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
6476 CXXFLAGS="${CXXFLAGS} -qlonglong"
6480 elif test "$PORTNAME" = "hpux"; then
6481 # On some versions of HP-UX, libm functions do not set errno by default.
6482 # Fix that by using +Olibmerrno if the compiler recognizes it.
6484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports +Olibmerrno, for CFLAGS" >&5
6485 $as_echo_n "checking whether ${CC} supports +Olibmerrno, for CFLAGS... " >&6; }
6486 if ${pgac_cv_prog_CC_cflags_pOlibmerrno+:} false; then :
6487 $as_echo_n "(cached) " >&6
6489 pgac_save_CFLAGS=$CFLAGS
6492 CFLAGS="${CFLAGS} +Olibmerrno"
6493 ac_save_c_werror_flag=$ac_c_werror_flag
6494 ac_c_werror_flag=yes
6495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6496 /* end confdefs.h. */
6506 if ac_fn_c_try_compile "$LINENO"; then :
6507 pgac_cv_prog_CC_cflags_pOlibmerrno=yes
6509 pgac_cv_prog_CC_cflags_pOlibmerrno=no
6511 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6512 ac_c_werror_flag=$ac_save_c_werror_flag
6513 CFLAGS="$pgac_save_CFLAGS"
6516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags_pOlibmerrno" >&5
6517 $as_echo "$pgac_cv_prog_CC_cflags_pOlibmerrno" >&6; }
6518 if test x"$pgac_cv_prog_CC_cflags_pOlibmerrno" = x"yes"; then
6519 CFLAGS="${CFLAGS} +Olibmerrno"
6523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS" >&5
6524 $as_echo_n "checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS... " >&6; }
6525 if ${pgac_cv_prog_CXX_cxxflags_pOlibmerrno+:} false; then :
6526 $as_echo_n "(cached) " >&6
6528 pgac_save_CXXFLAGS=$CXXFLAGS
6531 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6532 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6533 ac_cxx_werror_flag=yes
6535 ac_cpp='$CXXCPP $CPPFLAGS'
6536 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6537 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6538 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6541 /* end confdefs.h. */
6551 if ac_fn_cxx_try_compile "$LINENO"; then :
6552 pgac_cv_prog_CXX_cxxflags_pOlibmerrno=yes
6554 pgac_cv_prog_CXX_cxxflags_pOlibmerrno=no
6556 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6558 ac_cpp='$CPP $CPPFLAGS'
6559 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6560 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6561 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6563 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6564 CXXFLAGS="$pgac_save_CXXFLAGS"
6565 CXX="$pgac_save_CXX"
6567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&5
6568 $as_echo "$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&6; }
6569 if test x"$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" = x"yes"; then
6570 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6576 CFLAGS_VECTOR=$CFLAGS_VECTOR
6579 # Determine flags used to emit bitcode for JIT inlining. Need to test
6580 # for behaviour changing compiler flags, to keep compatibility with
6581 # compiler used for normal postgres code.
6582 if test "$with_llvm" = yes ; then
6583 CLANGXX="$CLANG -xc++"
6585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
6586 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
6587 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
6588 $as_echo_n "(cached) " >&6
6590 pgac_save_CFLAGS=$CFLAGS
6593 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6594 ac_save_c_werror_flag=$ac_c_werror_flag
6595 ac_c_werror_flag=yes
6596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6597 /* end confdefs.h. */
6607 if ac_fn_c_try_compile "$LINENO"; then :
6608 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
6610 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
6612 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6613 ac_c_werror_flag=$ac_save_c_werror_flag
6614 CFLAGS="$pgac_save_CFLAGS"
6617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
6618 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
6619 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
6620 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
6624 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
6625 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
6626 $as_echo_n "(cached) " >&6
6628 pgac_save_CXXFLAGS=$CXXFLAGS
6631 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6632 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6633 ac_cxx_werror_flag=yes
6635 ac_cpp='$CXXCPP $CPPFLAGS'
6636 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6637 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6638 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6641 /* end confdefs.h. */
6651 if ac_fn_cxx_try_compile "$LINENO"; then :
6652 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
6654 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
6656 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6658 ac_cpp='$CPP $CPPFLAGS'
6659 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6660 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6661 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6663 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6664 CXXFLAGS="$pgac_save_CXXFLAGS"
6665 CXX="$pgac_save_CXX"
6667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
6668 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
6669 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6670 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
6674 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
6675 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
6676 $as_echo_n "(cached) " >&6
6678 pgac_save_CFLAGS=$CFLAGS
6681 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6682 ac_save_c_werror_flag=$ac_c_werror_flag
6683 ac_c_werror_flag=yes
6684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6685 /* end confdefs.h. */
6695 if ac_fn_c_try_compile "$LINENO"; then :
6696 pgac_cv_prog_CLANG_cflags__fwrapv=yes
6698 pgac_cv_prog_CLANG_cflags__fwrapv=no
6700 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6701 ac_c_werror_flag=$ac_save_c_werror_flag
6702 CFLAGS="$pgac_save_CFLAGS"
6705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
6706 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
6707 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
6708 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
6712 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
6713 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
6714 $as_echo_n "(cached) " >&6
6716 pgac_save_CXXFLAGS=$CXXFLAGS
6719 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6720 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6721 ac_cxx_werror_flag=yes
6723 ac_cpp='$CXXCPP $CPPFLAGS'
6724 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6725 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6726 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6729 /* end confdefs.h. */
6739 if ac_fn_cxx_try_compile "$LINENO"; then :
6740 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
6742 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
6744 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6746 ac_cpp='$CPP $CPPFLAGS'
6747 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6748 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6749 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6751 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6752 CXXFLAGS="$pgac_save_CXXFLAGS"
6753 CXX="$pgac_save_CXX"
6755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
6756 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
6757 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
6758 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
6762 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
6763 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
6764 $as_echo_n "(cached) " >&6
6766 pgac_save_CFLAGS=$CFLAGS
6769 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6770 ac_save_c_werror_flag=$ac_c_werror_flag
6771 ac_c_werror_flag=yes
6772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6773 /* end confdefs.h. */
6783 if ac_fn_c_try_compile "$LINENO"; then :
6784 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
6786 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
6788 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6789 ac_c_werror_flag=$ac_save_c_werror_flag
6790 CFLAGS="$pgac_save_CFLAGS"
6793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
6794 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
6795 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
6796 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
6800 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
6801 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
6802 $as_echo_n "(cached) " >&6
6804 pgac_save_CXXFLAGS=$CXXFLAGS
6807 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6808 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6809 ac_cxx_werror_flag=yes
6811 ac_cpp='$CXXCPP $CPPFLAGS'
6812 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6813 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6814 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6817 /* end confdefs.h. */
6827 if ac_fn_cxx_try_compile "$LINENO"; then :
6828 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
6830 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
6832 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6834 ac_cpp='$CPP $CPPFLAGS'
6835 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6836 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6837 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6839 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6840 CXXFLAGS="$pgac_save_CXXFLAGS"
6841 CXX="$pgac_save_CXX"
6843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
6844 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
6845 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6846 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6851 # supply -g if --enable-debug
6852 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
6856 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
6857 CXXFLAGS="$CXXFLAGS -g"
6860 # enable code coverage if --enable-coverage
6861 if test "$enable_coverage" = yes; then
6862 if test "$GCC" = yes; then
6863 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
6864 CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
6866 as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
6870 # enable profiling if --enable-profiling
6871 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
6872 if test "$GCC" = yes; then
6874 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
6876 CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6877 CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6879 as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
6883 # We already have this in Makefile.win32, but configure needs it too
6884 if test "$PORTNAME" = "win32"; then
6885 CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
6888 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
6889 # user-specified flags (if any) at the end. This lets users override
6890 # the automatic additions.
6891 CFLAGS="$CFLAGS $user_CFLAGS"
6892 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
6893 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
6894 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
6896 BITCODE_CFLAGS=$BITCODE_CFLAGS
6898 BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
6901 # Check if the compiler still works with the final flag settings
6902 # (note, we're not checking that for CXX, which is optional)
6903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
6904 $as_echo_n "checking whether the C compiler still works... " >&6; }
6905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6906 /* end confdefs.h. */
6916 if ac_fn_c_try_link "$LINENO"; then :
6917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6918 $as_echo "yes" >&6; }
6920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6921 $as_echo "no" >&6; }
6922 as_fn_error $? "cannot proceed" "$LINENO" 5
6924 rm -f core conftest.err conftest.$ac_objext \
6925 conftest$ac_exeext conftest.$ac_ext
6927 # Defend against gcc -ffast-math
6928 if test "$GCC" = yes; then
6929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6930 /* end confdefs.h. */
6935 #ifdef __FAST_MATH__
6942 if ac_fn_c_try_compile "$LINENO"; then :
6945 as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
6947 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6950 # Defend against clang being used on x86-32 without SSE2 enabled. As current
6951 # versions of clang do not understand -fexcess-precision=standard, the use of
6952 # x87 floating point operations leads to problems like isinf possibly returning
6953 # false for a value that is infinite when converted from the 80bit register to
6954 # the 8byte memory representation.
6956 # Only perform the test if the compiler doesn't understand
6957 # -fexcess-precision=standard, that way a potentially fixed compiler will work
6959 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
6960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6961 /* end confdefs.h. */
6967 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
6975 if ac_fn_c_try_compile "$LINENO"; then :
6978 as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
6980 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6984 ac_cpp='$CPP $CPPFLAGS'
6985 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6986 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6987 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6989 $as_echo_n "checking how to run the C preprocessor... " >&6; }
6990 # On Suns, sometimes $CPP names a directory.
6991 if test -n "$CPP" && test -d "$CPP"; then
6994 if test -z "$CPP"; then
6995 if ${ac_cv_prog_CPP+:} false; then :
6996 $as_echo_n "(cached) " >&6
6998 # Double quotes because CPP needs to be expanded
6999 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7002 for ac_c_preproc_warn_flag in '' yes
7004 # Use a header file that comes with gcc, so configuring glibc
7005 # with a fresh cross-compiler works.
7006 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7007 # <limits.h> exists even on freestanding compilers.
7008 # On the NeXT, cc -E runs the code through the compiler's parser,
7009 # not just through cpp. "Syntax error" is here to catch this case.
7010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7011 /* end confdefs.h. */
7013 # include <limits.h>
7015 # include <assert.h>
7019 if ac_fn_c_try_cpp "$LINENO"; then :
7022 # Broken: fails on valid input.
7025 rm -f conftest.err conftest.i conftest.$ac_ext
7027 # OK, works on sane cases. Now check whether nonexistent headers
7028 # can be detected and how.
7029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7030 /* end confdefs.h. */
7031 #include <ac_nonexistent.h>
7033 if ac_fn_c_try_cpp "$LINENO"; then :
7034 # Broken: success on invalid input.
7037 # Passes both tests.
7041 rm -f conftest.err conftest.i conftest.$ac_ext
7044 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7045 rm -f conftest.i conftest.err conftest.$ac_ext
7046 if $ac_preproc_ok; then :
7058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7059 $as_echo "$CPP" >&6; }
7061 for ac_c_preproc_warn_flag in '' yes
7063 # Use a header file that comes with gcc, so configuring glibc
7064 # with a fresh cross-compiler works.
7065 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7066 # <limits.h> exists even on freestanding compilers.
7067 # On the NeXT, cc -E runs the code through the compiler's parser,
7068 # not just through cpp. "Syntax error" is here to catch this case.
7069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7070 /* end confdefs.h. */
7072 # include <limits.h>
7074 # include <assert.h>
7078 if ac_fn_c_try_cpp "$LINENO"; then :
7081 # Broken: fails on valid input.
7084 rm -f conftest.err conftest.i conftest.$ac_ext
7086 # OK, works on sane cases. Now check whether nonexistent headers
7087 # can be detected and how.
7088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7089 /* end confdefs.h. */
7090 #include <ac_nonexistent.h>
7092 if ac_fn_c_try_cpp "$LINENO"; then :
7093 # Broken: success on invalid input.
7096 # Passes both tests.
7100 rm -f conftest.err conftest.i conftest.$ac_ext
7103 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7104 rm -f conftest.i conftest.err conftest.$ac_ext
7105 if $ac_preproc_ok; then :
7108 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7109 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7110 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7111 See \`config.log' for more details" "$LINENO" 5; }
7115 ac_cpp='$CPP $CPPFLAGS'
7116 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7117 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7118 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7124 # Set up TAS assembly code if needed; the template file has now had its
7125 # chance to request this.
7127 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
7130 if test "$need_tas" = yes ; then
7139 # Automatic dependency tracking
7143 # Check whether --enable-depend was given.
7144 if test "${enable_depend+set}" = set; then :
7145 enableval=$enable_depend;
7154 as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
7168 # Enable assert checks
7172 # Check whether --enable-cassert was given.
7173 if test "${enable_cassert+set}" = set; then :
7174 enableval=$enable_cassert;
7178 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
7185 as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
7198 # Include directories
7201 IFS="${IFS}${PATH_SEPARATOR}"
7202 # SRCH_INC comes from the template file
7203 for dir in $with_includes $SRCH_INC; do
7204 if test -d "$dir"; then
7205 INCLUDES="$INCLUDES -I$dir"
7207 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
7208 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
7216 # Library directories
7219 IFS="${IFS}${PATH_SEPARATOR}"
7220 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
7221 for dir in $LIBRARY_DIRS $SRCH_LIB; do
7222 if test -d "$dir"; then
7223 LIBDIRS="$LIBDIRS -L$dir"
7225 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
7226 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
7232 # Enable thread-safe client libraries
7234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
7235 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
7238 # Check whether --enable-thread-safety was given.
7239 if test "${enable_thread_safety+set}" = set; then :
7240 enableval=$enable_thread_safety;
7249 as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
7254 enable_thread_safety=yes
7259 if test "$enable_thread_safety" = yes; then
7261 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
7264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
7265 $as_echo "$enable_thread_safety" >&6; }
7271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
7272 $as_echo_n "checking whether to build with ICU support... " >&6; }
7276 # Check whether --with-icu was given.
7277 if test "${with_icu+set}" = set; then :
7282 $as_echo "#define USE_ICU 1" >>confdefs.h
7289 as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
7299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
7300 $as_echo "$with_icu" >&6; }
7303 if test "$with_icu" = yes; then
7311 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7312 if test -n "$ac_tool_prefix"; then
7313 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7314 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7316 $as_echo_n "checking for $ac_word... " >&6; }
7317 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7318 $as_echo_n "(cached) " >&6
7322 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7325 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7329 test -z "$as_dir" && as_dir=.
7330 for ac_exec_ext in '' $ac_executable_extensions; do
7331 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7332 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7333 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7343 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7344 if test -n "$PKG_CONFIG"; then
7345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7346 $as_echo "$PKG_CONFIG" >&6; }
7348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7349 $as_echo "no" >&6; }
7354 if test -z "$ac_cv_path_PKG_CONFIG"; then
7355 ac_pt_PKG_CONFIG=$PKG_CONFIG
7356 # Extract the first word of "pkg-config", so it can be a program name with args.
7357 set dummy pkg-config; ac_word=$2
7358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7359 $as_echo_n "checking for $ac_word... " >&6; }
7360 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7361 $as_echo_n "(cached) " >&6
7363 case $ac_pt_PKG_CONFIG in
7365 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7368 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7372 test -z "$as_dir" && as_dir=.
7373 for ac_exec_ext in '' $ac_executable_extensions; do
7374 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7375 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7376 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7386 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7387 if test -n "$ac_pt_PKG_CONFIG"; then
7388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7389 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7392 $as_echo "no" >&6; }
7395 if test "x$ac_pt_PKG_CONFIG" = x; then
7398 case $cross_compiling:$ac_tool_warned in
7400 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7401 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7402 ac_tool_warned=yes ;;
7404 PKG_CONFIG=$ac_pt_PKG_CONFIG
7407 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7411 if test -n "$PKG_CONFIG"; then
7412 _pkg_min_version=0.9.0
7413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7414 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7415 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7417 $as_echo "yes" >&6; }
7419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7420 $as_echo "no" >&6; }
7426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
7427 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
7429 if test -n "$ICU_CFLAGS"; then
7430 pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
7431 elif test -n "$PKG_CONFIG"; then
7432 if test -n "$PKG_CONFIG" && \
7433 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7434 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7436 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7437 test $ac_status = 0; }; then
7438 pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
7439 test "x$?" != "x0" && pkg_failed=yes
7446 if test -n "$ICU_LIBS"; then
7447 pkg_cv_ICU_LIBS="$ICU_LIBS"
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
7453 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7454 test $ac_status = 0; }; then
7455 pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
7456 test "x$?" != "x0" && pkg_failed=yes
7466 if test $pkg_failed = yes; then
7467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7468 $as_echo "no" >&6; }
7470 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7471 _pkg_short_errors_supported=yes
7473 _pkg_short_errors_supported=no
7475 if test $_pkg_short_errors_supported = yes; then
7476 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7478 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7480 # Put the nasty error message in config.log where it belongs
7481 echo "$ICU_PKG_ERRORS" >&5
7483 as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
7487 Consider adjusting the PKG_CONFIG_PATH environment variable if you
7488 installed software in a non-standard prefix.
7490 Alternatively, you may set the environment variables ICU_CFLAGS
7491 and ICU_LIBS to avoid the need to call pkg-config.
7492 See the pkg-config man page for more details." "$LINENO" 5
7493 elif test $pkg_failed = untried; then
7494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7495 $as_echo "no" >&6; }
7496 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7497 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7498 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
7499 is in your PATH or set the PKG_CONFIG environment variable to the full
7502 Alternatively, you may set the environment variables ICU_CFLAGS
7503 and ICU_LIBS to avoid the need to call pkg-config.
7504 See the pkg-config man page for more details.
7506 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
7507 See \`config.log' for more details" "$LINENO" 5; }
7509 ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
7510 ICU_LIBS=$pkg_cv_ICU_LIBS
7511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7512 $as_echo "yes" >&6; }
7518 # Optionally build Tcl modules (PL/Tcl)
7520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
7521 $as_echo_n "checking whether to build with Tcl... " >&6; }
7525 # Check whether --with-tcl was given.
7526 if test "${with_tcl+set}" = set; then :
7536 as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
7546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
7547 $as_echo "$with_tcl" >&6; }
7550 # We see if the path to the Tcl/Tk configuration scripts is specified.
7551 # This will override the use of tclsh to find the paths to search.
7556 # Check whether --with-tclconfig was given.
7557 if test "${with_tclconfig+set}" = set; then :
7558 withval=$with_tclconfig;
7561 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7564 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7576 # Optionally build Perl modules (PL/Perl)
7578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
7579 $as_echo_n "checking whether to build Perl modules... " >&6; }
7583 # Check whether --with-perl was given.
7584 if test "${with_perl+set}" = set; then :
7594 as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
7604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
7605 $as_echo "$with_perl" >&6; }
7609 # Optionally build Python modules (PL/Python)
7611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
7612 $as_echo_n "checking whether to build Python modules... " >&6; }
7616 # Check whether --with-python was given.
7617 if test "${with_python+set}" = set; then :
7618 withval=$with_python;
7627 as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
7637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
7638 $as_echo "$with_python" >&6; }
7644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
7645 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
7649 # Check whether --with-gssapi was given.
7650 if test "${with_gssapi+set}" = set; then :
7651 withval=$with_gssapi;
7656 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
7658 krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
7665 as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
7675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
7676 $as_echo "$with_gssapi" >&6; }
7684 # Kerberos configuration parameters
7689 # Check whether --with-krb-srvnam was given.
7690 if test "${with_krb_srvnam+set}" = set; then :
7691 withval=$with_krb_srvnam;
7694 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7697 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7705 with_krb_srvnam="postgres"
7711 cat >>confdefs.h <<_ACEOF
7712 #define PG_KRB_SRVNAM "$with_krb_srvnam"
7720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
7721 $as_echo_n "checking whether to build with PAM support... " >&6; }
7725 # Check whether --with-pam was given.
7726 if test "${with_pam+set}" = set; then :
7731 $as_echo "#define USE_PAM 1" >>confdefs.h
7738 as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
7748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
7749 $as_echo "$with_pam" >&6; }
7755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
7756 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
7760 # Check whether --with-bsd-auth was given.
7761 if test "${with_bsd_auth+set}" = set; then :
7762 withval=$with_bsd_auth;
7766 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
7773 as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
7783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
7784 $as_echo "$with_bsd_auth" >&6; }
7790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
7791 $as_echo_n "checking whether to build with LDAP support... " >&6; }
7795 # Check whether --with-ldap was given.
7796 if test "${with_ldap+set}" = set; then :
7801 $as_echo "#define USE_LDAP 1" >>confdefs.h
7808 as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
7818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
7819 $as_echo "$with_ldap" >&6; }
7826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
7827 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
7831 # Check whether --with-bonjour was given.
7832 if test "${with_bonjour+set}" = set; then :
7833 withval=$with_bonjour;
7837 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
7844 as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
7854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
7855 $as_echo "$with_bonjour" >&6; }
7861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
7862 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
7866 # Check whether --with-openssl was given.
7867 if test "${with_openssl+set}" = set; then :
7868 withval=$with_openssl;
7872 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
7879 as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
7889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
7890 $as_echo "$with_openssl" >&6; }
7896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
7897 $as_echo_n "checking whether to build with SELinux support... " >&6; }
7901 # Check whether --with-selinux was given.
7902 if test "${with_selinux+set}" = set; then :
7903 withval=$with_selinux;
7912 as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
7923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
7924 $as_echo "$with_selinux" >&6; }
7929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
7930 $as_echo_n "checking whether to build with systemd support... " >&6; }
7934 # Check whether --with-systemd was given.
7935 if test "${with_systemd+set}" = set; then :
7936 withval=$with_systemd;
7940 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
7947 as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
7958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
7959 $as_echo "$with_systemd" >&6; }
7967 # Check whether --with-readline was given.
7968 if test "${with_readline+set}" = set; then :
7969 withval=$with_readline;
7978 as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
7988 # readline on MinGW has problems with backslashes in psql and other bugs.
7989 # This is particularly a problem with non-US code pages.
7990 # Therefore disable its use until we understand the cause. 2004-07-20
7991 if test "$PORTNAME" = "win32"; then
7992 if test "$with_readline" = yes; then
7993 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
7994 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8006 # Check whether --with-libedit-preferred was given.
8007 if test "${with_libedit_preferred+set}" = set; then :
8008 withval=$with_libedit_preferred;
8017 as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8022 with_libedit_preferred=no
8032 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8033 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8034 # UUID library. More than one of these might be present on a given platform,
8035 # so we make the user say which one she wants.
8040 # Check whether --with-uuid was given.
8041 if test "${with_uuid+set}" = set; then :
8045 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8048 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8058 if test x"$with_uuid" = x"" ; then
8064 # Check whether --with-ossp-uuid was given.
8065 if test "${with_ossp_uuid+set}" = set; then :
8066 withval=$with_ossp_uuid;
8075 as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8085 if test "$with_ossp_uuid" = yes ; then
8089 if test "$with_uuid" = bsd ; then
8091 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8093 UUID_EXTRA_OBJS="md5.o sha1.o"
8094 elif test "$with_uuid" = e2fs ; then
8096 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
8098 UUID_EXTRA_OBJS="md5.o sha1.o"
8099 elif test "$with_uuid" = ossp ; then
8101 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
8104 elif test "$with_uuid" = no ; then
8107 as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
8119 # Check whether --with-libxml was given.
8120 if test "${with_libxml+set}" = set; then :
8121 withval=$with_libxml;
8125 $as_echo "#define USE_LIBXML 1" >>confdefs.h
8132 as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
8143 if test "$with_libxml" = yes ; then
8144 if test -z "$XML2_CONFIG"; then
8145 for ac_prog in xml2-config
8147 # Extract the first word of "$ac_prog", so it can be a program name with args.
8148 set dummy $ac_prog; ac_word=$2
8149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8150 $as_echo_n "checking for $ac_word... " >&6; }
8151 if ${ac_cv_path_XML2_CONFIG+:} false; then :
8152 $as_echo_n "(cached) " >&6
8154 case $XML2_CONFIG in
8156 ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
8159 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8163 test -z "$as_dir" && as_dir=.
8164 for ac_exec_ext in '' $ac_executable_extensions; do
8165 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8166 ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8167 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8177 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
8178 if test -n "$XML2_CONFIG"; then
8179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8180 $as_echo "$XML2_CONFIG" >&6; }
8182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8183 $as_echo "no" >&6; }
8187 test -n "$XML2_CONFIG" && break
8191 # Report the value of XML2_CONFIG in configure's output in all cases.
8192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
8193 $as_echo_n "checking for XML2_CONFIG... " >&6; }
8194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8195 $as_echo "$XML2_CONFIG" >&6; }
8198 if test -n "$XML2_CONFIG"; then
8199 for pgac_option in `$XML2_CONFIG --cflags`; do
8200 case $pgac_option in
8201 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8204 for pgac_option in `$XML2_CONFIG --libs`; do
8205 case $pgac_option in
8206 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8220 # Check whether --with-libxslt was given.
8221 if test "${with_libxslt+set}" = set; then :
8222 withval=$with_libxslt;
8226 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8233 as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8253 # Check whether --with-system-tzdata was given.
8254 if test "${with_system_tzdata+set}" = set; then :
8255 withval=$with_system_tzdata;
8258 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8261 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8279 # Check whether --with-zlib was given.
8280 if test "${with_zlib+set}" = set; then :
8290 as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
8306 # Assume system is ELF if it predefines __ELF__ as 1,
8307 # otherwise believe host_os based default.
8309 freebsd1*|freebsd2*) elf=no;;
8310 freebsd3*|freebsd4*) elf=yes;;
8314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
8315 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
8316 if ${ac_cv_path_GREP+:} false; then :
8317 $as_echo_n "(cached) " >&6
8319 if test -z "$GREP"; then
8320 ac_path_GREP_found=false
8321 # Loop through the user's path and test for each of PROGNAME-LIST
8322 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8323 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8326 test -z "$as_dir" && as_dir=.
8327 for ac_prog in grep ggrep; do
8328 for ac_exec_ext in '' $ac_executable_extensions; do
8329 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
8330 as_fn_executable_p "$ac_path_GREP" || continue
8331 # Check for GNU ac_path_GREP and select it if it is found.
8332 # Check for GNU $ac_path_GREP
8333 case `"$ac_path_GREP" --version 2>&1` in
8335 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
8338 $as_echo_n 0123456789 >"conftest.in"
8341 cat "conftest.in" "conftest.in" >"conftest.tmp"
8342 mv "conftest.tmp" "conftest.in"
8343 cp "conftest.in" "conftest.nl"
8344 $as_echo 'GREP' >> "conftest.nl"
8345 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8346 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8347 as_fn_arith $ac_count + 1 && ac_count=$as_val
8348 if test $ac_count -gt ${ac_path_GREP_max-0}; then
8349 # Best one so far, save it but keep looking for a better one
8350 ac_cv_path_GREP="$ac_path_GREP"
8351 ac_path_GREP_max=$ac_count
8353 # 10*(2^10) chars as input seems more than enough
8354 test $ac_count -gt 10 && break
8356 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8359 $ac_path_GREP_found && break 3
8364 if test -z "$ac_cv_path_GREP"; then
8365 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8368 ac_cv_path_GREP=$GREP
8372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
8373 $as_echo "$ac_cv_path_GREP" >&6; }
8374 GREP="$ac_cv_path_GREP"
8377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
8378 $as_echo_n "checking for egrep... " >&6; }
8379 if ${ac_cv_path_EGREP+:} false; then :
8380 $as_echo_n "(cached) " >&6
8382 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
8383 then ac_cv_path_EGREP="$GREP -E"
8385 if test -z "$EGREP"; then
8386 ac_path_EGREP_found=false
8387 # Loop through the user's path and test for each of PROGNAME-LIST
8388 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8389 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8392 test -z "$as_dir" && as_dir=.
8393 for ac_prog in egrep; do
8394 for ac_exec_ext in '' $ac_executable_extensions; do
8395 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
8396 as_fn_executable_p "$ac_path_EGREP" || continue
8397 # Check for GNU ac_path_EGREP and select it if it is found.
8398 # Check for GNU $ac_path_EGREP
8399 case `"$ac_path_EGREP" --version 2>&1` in
8401 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
8404 $as_echo_n 0123456789 >"conftest.in"
8407 cat "conftest.in" "conftest.in" >"conftest.tmp"
8408 mv "conftest.tmp" "conftest.in"
8409 cp "conftest.in" "conftest.nl"
8410 $as_echo 'EGREP' >> "conftest.nl"
8411 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8412 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8413 as_fn_arith $ac_count + 1 && ac_count=$as_val
8414 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
8415 # Best one so far, save it but keep looking for a better one
8416 ac_cv_path_EGREP="$ac_path_EGREP"
8417 ac_path_EGREP_max=$ac_count
8419 # 10*(2^10) chars as input seems more than enough
8420 test $ac_count -gt 10 && break
8422 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8425 $ac_path_EGREP_found && break 3
8430 if test -z "$ac_cv_path_EGREP"; then
8431 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8434 ac_cv_path_EGREP=$EGREP
8439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
8440 $as_echo "$ac_cv_path_EGREP" >&6; }
8441 EGREP="$ac_cv_path_EGREP"
8444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8445 /* end confdefs.h. */
8451 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8452 $EGREP "yes" >/dev/null 2>&1; then :
8455 if test "X$elf" = "Xyes" ; then
8469 CPPFLAGS="$CPPFLAGS $INCLUDES"
8470 LDFLAGS="$LDFLAGS $LIBDIRS"
8476 # Check whether --with-gnu-ld was given.
8477 if test "${with_gnu_ld+set}" = set; then :
8478 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8484 if test "$GCC" = yes; then
8485 # Check if gcc -print-prog-name=ld gives a path.
8486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8487 $as_echo_n "checking for ld used by GCC... " >&6; }
8490 # gcc leaves a trailing carriage return which upsets mingw
8491 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8493 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8496 # Accept absolute paths.
8497 [\\/]* | [A-Za-z]:[\\/]*)
8498 re_direlt='/[^/][^/]*/\.\./'
8499 # Canonicalize the path of ld
8500 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8501 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8502 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8504 test -z "$LD" && LD="$ac_prog"
8507 # If it fails, then pretend we aren't using GCC.
8511 # If it is relative, then search for the first ld in PATH.
8515 elif test "$with_gnu_ld" = yes; then
8516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8517 $as_echo_n "checking for GNU ld... " >&6; }
8519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8520 $as_echo_n "checking for non-GNU ld... " >&6; }
8522 if ${ac_cv_path_LD+:} false; then :
8523 $as_echo_n "(cached) " >&6
8525 if test -z "$LD"; then
8526 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8527 for ac_dir in $PATH; do
8528 test -z "$ac_dir" && ac_dir=.
8529 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8530 ac_cv_path_LD="$ac_dir/$ac_prog"
8531 # Check to see if the program is GNU ld. I'd rather use --version,
8532 # but apparently some GNU ld's only accept -v.
8533 # Break only if it was the GNU/non-GNU ld that we prefer.
8534 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8535 test "$with_gnu_ld" != no && break
8537 test "$with_gnu_ld" != yes && break
8543 ac_cv_path_LD="$LD" # Let the user override the test with a path.
8548 if test -n "$LD"; then
8549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8550 $as_echo "$LD" >&6; }
8552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8553 $as_echo "no" >&6; }
8555 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8557 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8558 if ${ac_cv_prog_gnu_ld+:} false; then :
8559 $as_echo_n "(cached) " >&6
8561 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8562 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8563 ac_cv_prog_gnu_ld=yes
8565 ac_cv_prog_gnu_ld=no
8568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
8569 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
8570 with_gnu_ld=$ac_cv_prog_gnu_ld
8575 if test -n "$ac_tool_prefix"; then
8576 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8577 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8579 $as_echo_n "checking for $ac_word... " >&6; }
8580 if ${ac_cv_prog_RANLIB+:} false; then :
8581 $as_echo_n "(cached) " >&6
8583 if test -n "$RANLIB"; then
8584 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8586 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8590 test -z "$as_dir" && as_dir=.
8591 for ac_exec_ext in '' $ac_executable_extensions; do
8592 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8593 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8594 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8603 RANLIB=$ac_cv_prog_RANLIB
8604 if test -n "$RANLIB"; then
8605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8606 $as_echo "$RANLIB" >&6; }
8608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8609 $as_echo "no" >&6; }
8614 if test -z "$ac_cv_prog_RANLIB"; then
8615 ac_ct_RANLIB=$RANLIB
8616 # Extract the first word of "ranlib", so it can be a program name with args.
8617 set dummy ranlib; ac_word=$2
8618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8619 $as_echo_n "checking for $ac_word... " >&6; }
8620 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8621 $as_echo_n "(cached) " >&6
8623 if test -n "$ac_ct_RANLIB"; then
8624 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8626 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8630 test -z "$as_dir" && as_dir=.
8631 for ac_exec_ext in '' $ac_executable_extensions; do
8632 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8633 ac_cv_prog_ac_ct_RANLIB="ranlib"
8634 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8643 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8644 if test -n "$ac_ct_RANLIB"; then
8645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8646 $as_echo "$ac_ct_RANLIB" >&6; }
8648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8649 $as_echo "no" >&6; }
8652 if test "x$ac_ct_RANLIB" = x; then
8655 case $cross_compiling:$ac_tool_warned in
8657 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8658 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8659 ac_tool_warned=yes ;;
8661 RANLIB=$ac_ct_RANLIB
8664 RANLIB="$ac_cv_prog_RANLIB"
8668 if test -n "$ac_tool_prefix"; then
8669 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8670 set dummy ${ac_tool_prefix}strip; ac_word=$2
8671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8672 $as_echo_n "checking for $ac_word... " >&6; }
8673 if ${ac_cv_prog_STRIP+:} false; then :
8674 $as_echo_n "(cached) " >&6
8676 if test -n "$STRIP"; then
8677 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8679 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8683 test -z "$as_dir" && as_dir=.
8684 for ac_exec_ext in '' $ac_executable_extensions; do
8685 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8686 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8687 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8696 STRIP=$ac_cv_prog_STRIP
8697 if test -n "$STRIP"; then
8698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8699 $as_echo "$STRIP" >&6; }
8701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8702 $as_echo "no" >&6; }
8707 if test -z "$ac_cv_prog_STRIP"; then
8709 # Extract the first word of "strip", so it can be a program name with args.
8710 set dummy strip; ac_word=$2
8711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8712 $as_echo_n "checking for $ac_word... " >&6; }
8713 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8714 $as_echo_n "(cached) " >&6
8716 if test -n "$ac_ct_STRIP"; then
8717 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8719 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8723 test -z "$as_dir" && as_dir=.
8724 for ac_exec_ext in '' $ac_executable_extensions; do
8725 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8726 ac_cv_prog_ac_ct_STRIP="strip"
8727 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8736 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8737 if test -n "$ac_ct_STRIP"; then
8738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8739 $as_echo "$ac_ct_STRIP" >&6; }
8741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8742 $as_echo "no" >&6; }
8745 if test "x$ac_ct_STRIP" = x; then
8748 case $cross_compiling:$ac_tool_warned in
8750 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8751 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8752 ac_tool_warned=yes ;;
8757 STRIP="$ac_cv_prog_STRIP"
8761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
8762 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
8763 if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
8764 STRIP_STATIC_LIB="$STRIP -x"
8765 STRIP_SHARED_LIB="$STRIP --strip-unneeded"
8766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8767 $as_echo "yes" >&6; }
8772 STRIP_STATIC_LIB=$STRIP
8773 STRIP_SHARED_LIB=$STRIP
8774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8775 $as_echo "yes" >&6; }
8780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8781 $as_echo "no" >&6; }
8788 if test -n "$ac_tool_prefix"; then
8789 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8790 set dummy ${ac_tool_prefix}ar; ac_word=$2
8791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8792 $as_echo_n "checking for $ac_word... " >&6; }
8793 if ${ac_cv_prog_AR+:} false; then :
8794 $as_echo_n "(cached) " >&6
8796 if test -n "$AR"; then
8797 ac_cv_prog_AR="$AR" # Let the user override the test.
8799 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8803 test -z "$as_dir" && as_dir=.
8804 for ac_exec_ext in '' $ac_executable_extensions; do
8805 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8806 ac_cv_prog_AR="${ac_tool_prefix}ar"
8807 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8817 if test -n "$AR"; then
8818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8819 $as_echo "$AR" >&6; }
8821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8822 $as_echo "no" >&6; }
8827 if test -z "$ac_cv_prog_AR"; then
8829 # Extract the first word of "ar", so it can be a program name with args.
8830 set dummy ar; ac_word=$2
8831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8832 $as_echo_n "checking for $ac_word... " >&6; }
8833 if ${ac_cv_prog_ac_ct_AR+:} false; then :
8834 $as_echo_n "(cached) " >&6
8836 if test -n "$ac_ct_AR"; then
8837 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8839 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8843 test -z "$as_dir" && as_dir=.
8844 for ac_exec_ext in '' $ac_executable_extensions; do
8845 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8846 ac_cv_prog_ac_ct_AR="ar"
8847 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8856 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8857 if test -n "$ac_ct_AR"; then
8858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8859 $as_echo "$ac_ct_AR" >&6; }
8861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8862 $as_echo "no" >&6; }
8865 if test "x$ac_ct_AR" = x; then
8868 case $cross_compiling:$ac_tool_warned in
8870 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8871 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8872 ac_tool_warned=yes ;;
8880 if test "$PORTNAME" = "win32"; then
8881 if test -n "$ac_tool_prefix"; then
8882 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8883 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8885 $as_echo_n "checking for $ac_word... " >&6; }
8886 if ${ac_cv_prog_DLLTOOL+:} false; then :
8887 $as_echo_n "(cached) " >&6
8889 if test -n "$DLLTOOL"; then
8890 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8892 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8896 test -z "$as_dir" && as_dir=.
8897 for ac_exec_ext in '' $ac_executable_extensions; do
8898 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8899 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8900 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8909 DLLTOOL=$ac_cv_prog_DLLTOOL
8910 if test -n "$DLLTOOL"; then
8911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8912 $as_echo "$DLLTOOL" >&6; }
8914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8915 $as_echo "no" >&6; }
8920 if test -z "$ac_cv_prog_DLLTOOL"; then
8921 ac_ct_DLLTOOL=$DLLTOOL
8922 # Extract the first word of "dlltool", so it can be a program name with args.
8923 set dummy dlltool; ac_word=$2
8924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8925 $as_echo_n "checking for $ac_word... " >&6; }
8926 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
8927 $as_echo_n "(cached) " >&6
8929 if test -n "$ac_ct_DLLTOOL"; then
8930 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8932 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8936 test -z "$as_dir" && as_dir=.
8937 for ac_exec_ext in '' $ac_executable_extensions; do
8938 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8939 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8940 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8949 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8950 if test -n "$ac_ct_DLLTOOL"; then
8951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8952 $as_echo "$ac_ct_DLLTOOL" >&6; }
8954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8955 $as_echo "no" >&6; }
8958 if test "x$ac_ct_DLLTOOL" = x; then
8961 case $cross_compiling:$ac_tool_warned in
8963 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8964 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8965 ac_tool_warned=yes ;;
8967 DLLTOOL=$ac_ct_DLLTOOL
8970 DLLTOOL="$ac_cv_prog_DLLTOOL"
8973 if test -n "$ac_tool_prefix"; then
8974 # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
8975 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
8976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8977 $as_echo_n "checking for $ac_word... " >&6; }
8978 if ${ac_cv_prog_DLLWRAP+:} false; then :
8979 $as_echo_n "(cached) " >&6
8981 if test -n "$DLLWRAP"; then
8982 ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
8984 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8988 test -z "$as_dir" && as_dir=.
8989 for ac_exec_ext in '' $ac_executable_extensions; do
8990 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8991 ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
8992 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9001 DLLWRAP=$ac_cv_prog_DLLWRAP
9002 if test -n "$DLLWRAP"; then
9003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
9004 $as_echo "$DLLWRAP" >&6; }
9006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9007 $as_echo "no" >&6; }
9012 if test -z "$ac_cv_prog_DLLWRAP"; then
9013 ac_ct_DLLWRAP=$DLLWRAP
9014 # Extract the first word of "dllwrap", so it can be a program name with args.
9015 set dummy dllwrap; ac_word=$2
9016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9017 $as_echo_n "checking for $ac_word... " >&6; }
9018 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
9019 $as_echo_n "(cached) " >&6
9021 if test -n "$ac_ct_DLLWRAP"; then
9022 ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
9024 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9028 test -z "$as_dir" && as_dir=.
9029 for ac_exec_ext in '' $ac_executable_extensions; do
9030 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9031 ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
9032 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9041 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
9042 if test -n "$ac_ct_DLLWRAP"; then
9043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
9044 $as_echo "$ac_ct_DLLWRAP" >&6; }
9046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9047 $as_echo "no" >&6; }
9050 if test "x$ac_ct_DLLWRAP" = x; then
9053 case $cross_compiling:$ac_tool_warned in
9055 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9056 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9057 ac_tool_warned=yes ;;
9059 DLLWRAP=$ac_ct_DLLWRAP
9062 DLLWRAP="$ac_cv_prog_DLLWRAP"
9065 if test -n "$ac_tool_prefix"; then
9066 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9067 set dummy ${ac_tool_prefix}windres; ac_word=$2
9068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9069 $as_echo_n "checking for $ac_word... " >&6; }
9070 if ${ac_cv_prog_WINDRES+:} false; then :
9071 $as_echo_n "(cached) " >&6
9073 if test -n "$WINDRES"; then
9074 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9076 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9080 test -z "$as_dir" && as_dir=.
9081 for ac_exec_ext in '' $ac_executable_extensions; do
9082 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9083 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9084 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9093 WINDRES=$ac_cv_prog_WINDRES
9094 if test -n "$WINDRES"; then
9095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9096 $as_echo "$WINDRES" >&6; }
9098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9099 $as_echo "no" >&6; }
9104 if test -z "$ac_cv_prog_WINDRES"; then
9105 ac_ct_WINDRES=$WINDRES
9106 # Extract the first word of "windres", so it can be a program name with args.
9107 set dummy windres; ac_word=$2
9108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9109 $as_echo_n "checking for $ac_word... " >&6; }
9110 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9111 $as_echo_n "(cached) " >&6
9113 if test -n "$ac_ct_WINDRES"; then
9114 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9116 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9120 test -z "$as_dir" && as_dir=.
9121 for ac_exec_ext in '' $ac_executable_extensions; do
9122 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9123 ac_cv_prog_ac_ct_WINDRES="windres"
9124 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9133 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9134 if test -n "$ac_ct_WINDRES"; then
9135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9136 $as_echo "$ac_ct_WINDRES" >&6; }
9138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9139 $as_echo "no" >&6; }
9142 if test "x$ac_ct_WINDRES" = x; then
9145 case $cross_compiling:$ac_tool_warned in
9147 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9148 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9149 ac_tool_warned=yes ;;
9151 WINDRES=$ac_ct_WINDRES
9154 WINDRES="$ac_cv_prog_WINDRES"
9159 # Find a good install program. We prefer a C program (faster),
9160 # so one script is as good as another. But avoid the broken or
9161 # incompatible versions:
9162 # SysV /etc/install, /usr/sbin/install
9163 # SunOS /usr/etc/install
9164 # IRIX /sbin/install
9166 # AmigaOS /C/install, which installs bootblocks on floppy discs
9167 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9168 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9169 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9170 # OS/2's system install, which has a completely different semantic
9171 # ./install, which can be erroneously created by make from ./install.sh.
9172 # Reject install programs that cannot install multiple files.
9173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9174 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9175 if test -z "$INSTALL"; then
9176 if ${ac_cv_path_install+:} false; then :
9177 $as_echo_n "(cached) " >&6
9179 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9183 test -z "$as_dir" && as_dir=.
9184 # Account for people who put trailing slashes in PATH elements.
9185 case $as_dir/ in #((
9186 ./ | .// | /[cC]/* | \
9187 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9188 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9191 # OSF1 and SCO ODT 3.0 have their own names for install.
9192 # Don't use installbsd from OSF since it installs stuff as root
9194 for ac_prog in ginstall scoinst install; do
9195 for ac_exec_ext in '' $ac_executable_extensions; do
9196 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9197 if test $ac_prog = install &&
9198 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9199 # AIX install. It has an incompatible calling convention.
9201 elif test $ac_prog = install &&
9202 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9203 # program-specific install script used by HP pwplus--don't use.
9206 rm -rf conftest.one conftest.two conftest.dir
9207 echo one > conftest.one
9208 echo two > conftest.two
9210 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9211 test -s conftest.one && test -s conftest.two &&
9212 test -s conftest.dir/conftest.one &&
9213 test -s conftest.dir/conftest.two
9215 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9228 rm -rf conftest.one conftest.two conftest.dir
9231 if test "${ac_cv_path_install+set}" = set; then
9232 INSTALL=$ac_cv_path_install
9234 # As a last resort, use the slow shell script. Don't cache a
9235 # value for INSTALL within a source directory, because that will
9236 # break other packages using the cache if that directory is
9237 # removed, or if the value is a relative name.
9238 INSTALL=$ac_install_sh
9241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9242 $as_echo "$INSTALL" >&6; }
9244 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9245 # It thinks the first close brace ends the variable substitution.
9246 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9248 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9250 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9252 # When Autoconf chooses install-sh as install program it tries to generate
9253 # a relative path to it in each makefile where it substitutes it. This clashes
9254 # with our Makefile.global concept. This workaround helps.
9256 *install-sh*) install_bin='';;
9257 *) install_bin=$INSTALL;;
9261 if test -z "$TAR"; then
9264 # Extract the first word of "$ac_prog", so it can be a program name with args.
9265 set dummy $ac_prog; ac_word=$2
9266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9267 $as_echo_n "checking for $ac_word... " >&6; }
9268 if ${ac_cv_path_TAR+:} false; then :
9269 $as_echo_n "(cached) " >&6
9273 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9276 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9280 test -z "$as_dir" && as_dir=.
9281 for ac_exec_ext in '' $ac_executable_extensions; do
9282 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9283 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9284 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9295 if test -n "$TAR"; then
9296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9297 $as_echo "$TAR" >&6; }
9299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9300 $as_echo "no" >&6; }
9304 test -n "$TAR" && break
9308 # Report the value of TAR in configure's output in all cases.
9309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9310 $as_echo_n "checking for TAR... " >&6; }
9311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9312 $as_echo "$TAR" >&6; }
9315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9316 $as_echo_n "checking whether ln -s works... " >&6; }
9318 if test "$LN_S" = "ln -s"; then
9319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9320 $as_echo "yes" >&6; }
9322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9323 $as_echo "no, using $LN_S" >&6; }
9326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
9327 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
9328 if test -z "$MKDIR_P"; then
9329 if ${ac_cv_path_mkdir+:} false; then :
9330 $as_echo_n "(cached) " >&6
9332 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9333 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
9336 test -z "$as_dir" && as_dir=.
9337 for ac_prog in mkdir gmkdir; do
9338 for ac_exec_ext in '' $ac_executable_extensions; do
9339 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
9340 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
9341 'mkdir (GNU coreutils) '* | \
9342 'mkdir (coreutils) '* | \
9343 'mkdir (fileutils) '4.1*)
9344 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
9354 test -d ./--version && rmdir ./--version
9355 if test "${ac_cv_path_mkdir+set}" = set; then
9356 MKDIR_P="$ac_cv_path_mkdir -p"
9358 # As a last resort, use the slow shell script. Don't cache a
9359 # value for MKDIR_P within a source directory, because that will
9360 # break other packages using the cache if that directory is
9361 # removed, or if the value is a relative name.
9362 MKDIR_P="$ac_install_sh -d"
9365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
9366 $as_echo "$MKDIR_P" >&6; }
9368 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
9369 # a relative path to it in each makefile where it substitutes it. This clashes
9370 # with our Makefile.global concept. This workaround helps.
9372 *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
9375 if test -z "$BISON"; then
9376 for ac_prog in bison
9378 # Extract the first word of "$ac_prog", so it can be a program name with args.
9379 set dummy $ac_prog; ac_word=$2
9380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9381 $as_echo_n "checking for $ac_word... " >&6; }
9382 if ${ac_cv_path_BISON+:} false; then :
9383 $as_echo_n "(cached) " >&6
9387 ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
9390 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9394 test -z "$as_dir" && as_dir=.
9395 for ac_exec_ext in '' $ac_executable_extensions; do
9396 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9397 ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
9398 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9408 BISON=$ac_cv_path_BISON
9409 if test -n "$BISON"; then
9410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9411 $as_echo "$BISON" >&6; }
9413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9414 $as_echo "no" >&6; }
9418 test -n "$BISON" && break
9422 # Report the value of BISON in configure's output in all cases.
9423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
9424 $as_echo_n "checking for BISON... " >&6; }
9425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9426 $as_echo "$BISON" >&6; }
9430 if test "$BISON"; then
9431 pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
9432 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
9433 $as_echo "$as_me: using $pgac_bison_version" >&6;}
9434 if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
9436 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9437 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9438 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
9439 $as_echo "$as_me: WARNING:
9440 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9441 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
9444 # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
9445 # of the now preferred %name-prefix "base_yy", but the latter
9446 # doesn't work with Bison 2.3 or less. So for now we silence the
9447 # deprecation warnings.
9448 if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
9450 BISONFLAGS="$BISONFLAGS -Wno-deprecated"
9454 if test -z "$BISON"; then
9455 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9456 *** Without Bison you will not be able to build PostgreSQL from Git nor
9457 *** change any of the parser definition files. You can obtain Bison from
9458 *** a GNU mirror site. (If you are using the official distribution of
9459 *** PostgreSQL then you do not need to worry about this, because the Bison
9460 *** output is pre-generated.)" >&5
9461 $as_echo "$as_me: WARNING:
9462 *** Without Bison you will not be able to build PostgreSQL from Git nor
9463 *** change any of the parser definition files. You can obtain Bison from
9464 *** a GNU mirror site. (If you are using the official distribution of
9465 *** PostgreSQL then you do not need to worry about this, because the Bison
9466 *** output is pre-generated.)" >&2;}
9468 # We don't need AC_SUBST(BISON) because PGAC_PATH_PROGS did it
9471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
9472 $as_echo_n "checking for flex... " >&6; }
9473 if ${pgac_cv_path_flex+:} false; then :
9474 $as_echo_n "(cached) " >&6
9476 # Let the user override the test
9477 if test -n "$FLEX"; then
9478 pgac_cv_path_flex=$FLEX
9482 for pgac_dir in $PATH; do
9484 if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
9487 for pgac_prog in flex lex; do
9488 pgac_candidate="$pgac_dir/$pgac_prog"
9489 if test -f "$pgac_candidate" \
9490 && $pgac_candidate --version </dev/null >/dev/null 2>&1
9492 echo '%%' > conftest.l
9493 if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
9494 pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
9495 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;}'
9497 pgac_cv_path_flex=$pgac_candidate
9500 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9501 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9502 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
9503 $as_echo "$as_me: WARNING:
9504 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9505 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
9511 rm -f conftest.l lex.yy.c
9512 : ${pgac_cv_path_flex=no}
9516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
9517 $as_echo "$pgac_cv_path_flex" >&6; }
9518 if test x"$pgac_cv_path_flex" = x"no"; then
9519 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9520 *** Without Flex you will not be able to build PostgreSQL from Git nor
9521 *** change any of the scanner definition files. You can obtain Flex from
9522 *** a GNU mirror site. (If you are using the official distribution of
9523 *** PostgreSQL then you do not need to worry about this because the Flex
9524 *** output is pre-generated.)" >&5
9525 $as_echo "$as_me: WARNING:
9526 *** Without Flex you will not be able to build PostgreSQL from Git nor
9527 *** change any of the scanner definition files. You can obtain Flex from
9528 *** a GNU mirror site. (If you are using the official distribution of
9529 *** PostgreSQL then you do not need to worry about this because the Flex
9530 *** output is pre-generated.)" >&2;}
9534 FLEX=$pgac_cv_path_flex
9535 pgac_flex_version=`$FLEX --version 2>/dev/null`
9536 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
9537 $as_echo "$as_me: using $pgac_flex_version" >&6;}
9544 if test -z "$PERL"; then
9547 # Extract the first word of "$ac_prog", so it can be a program name with args.
9548 set dummy $ac_prog; ac_word=$2
9549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9550 $as_echo_n "checking for $ac_word... " >&6; }
9551 if ${ac_cv_path_PERL+:} false; then :
9552 $as_echo_n "(cached) " >&6
9556 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
9559 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9563 test -z "$as_dir" && as_dir=.
9564 for ac_exec_ext in '' $ac_executable_extensions; do
9565 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9566 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
9567 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9577 PERL=$ac_cv_path_PERL
9578 if test -n "$PERL"; then
9579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9580 $as_echo "$PERL" >&6; }
9582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9583 $as_echo "no" >&6; }
9587 test -n "$PERL" && break
9591 # Report the value of PERL in configure's output in all cases.
9592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
9593 $as_echo_n "checking for PERL... " >&6; }
9594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9595 $as_echo "$PERL" >&6; }
9599 if test "$PERL"; then
9600 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'`
9601 { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
9602 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
9603 if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
9604 $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
9606 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9607 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9608 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
9609 $as_echo "$as_me: WARNING:
9610 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9611 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
9616 if test -z "$PERL"; then
9617 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9618 *** Without Perl you will not be able to build PostgreSQL from Git.
9619 *** You can obtain Perl from any CPAN mirror site.
9620 *** (If you are using the official distribution of PostgreSQL then you do not
9621 *** need to worry about this, because the Perl output is pre-generated.)" >&5
9622 $as_echo "$as_me: WARNING:
9623 *** Without Perl you will not be able to build PostgreSQL from Git.
9624 *** You can obtain Perl from any CPAN mirror site.
9625 *** (If you are using the official distribution of PostgreSQL then you do not
9626 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
9629 if test "$with_perl" = yes; then
9630 if test -z "$PERL"; then
9631 as_fn_error $? "Perl not found" "$LINENO" 5
9634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
9635 $as_echo_n "checking for Perl archlibexp... " >&6; }
9636 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
9637 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
9638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
9639 $as_echo "$perl_archlibexp" >&6; }
9640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
9641 $as_echo_n "checking for Perl privlibexp... " >&6; }
9642 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
9643 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
9644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
9645 $as_echo "$perl_privlibexp" >&6; }
9646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
9647 $as_echo_n "checking for Perl useshrplib... " >&6; }
9648 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
9649 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
9650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
9651 $as_echo "$perl_useshrplib" >&6; }
9652 if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
9653 as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
9654 You might have to rebuild your Perl installation. Refer to the
9655 documentation for details. Use --without-perl to disable building
9656 PL/Perl." "$LINENO" 5
9658 # On most platforms, archlibexp is also where the Perl include files live ...
9659 perl_includespec="-I$perl_archlibexp/CORE"
9660 # ... but on newer macOS versions, we must use -iwithsysroot to look
9662 if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
9663 if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
9664 perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
9668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
9669 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
9670 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
9671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
9672 $as_echo "$perl_ccflags" >&6; }
9673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
9674 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
9675 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
9676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
9677 $as_echo "$perl_embed_ccflags" >&6; }
9680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
9681 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
9682 if test "$PORTNAME" = "win32" ; then
9683 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
9684 if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
9685 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9687 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
9688 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
9689 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9693 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
9694 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
9695 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
9697 if test -z "$perl_embed_ldflags" ; then
9698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9699 $as_echo "no" >&6; }
9700 as_fn_error $? "could not determine flags for linking embedded Perl.
9701 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
9702 installed." "$LINENO" 5
9704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
9705 $as_echo "$perl_embed_ldflags" >&6; }
9710 if test "$with_python" = yes; then
9711 if test -z "$PYTHON"; then
9712 for ac_prog in python python3 python2
9714 # Extract the first word of "$ac_prog", so it can be a program name with args.
9715 set dummy $ac_prog; ac_word=$2
9716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9717 $as_echo_n "checking for $ac_word... " >&6; }
9718 if ${ac_cv_path_PYTHON+:} false; then :
9719 $as_echo_n "(cached) " >&6
9723 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
9726 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9730 test -z "$as_dir" && as_dir=.
9731 for ac_exec_ext in '' $ac_executable_extensions; do
9732 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9733 ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
9734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9744 PYTHON=$ac_cv_path_PYTHON
9745 if test -n "$PYTHON"; then
9746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9747 $as_echo "$PYTHON" >&6; }
9749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9750 $as_echo "no" >&6; }
9754 test -n "$PYTHON" && break
9758 # Report the value of PYTHON in configure's output in all cases.
9759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
9760 $as_echo_n "checking for PYTHON... " >&6; }
9761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9762 $as_echo "$PYTHON" >&6; }
9765 if test x"$PYTHON" = x""; then
9766 as_fn_error $? "Python not found" "$LINENO" 5
9770 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
9771 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
9772 $as_echo "$as_me: using python $python_fullversion" >&6;}
9773 # python_fullversion is typically n.n.n plus some trailing junk
9774 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
9775 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
9776 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
9777 # Reject unsupported Python versions as soon as practical.
9778 if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 4; then
9779 as_fn_error $? "Python version $python_version is too old (version 2.4 or later is required)" "$LINENO" 5
9782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
9783 $as_echo_n "checking for Python distutils module... " >&6; }
9784 if "${PYTHON}" -c 'import distutils' 2>&5
9786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9787 $as_echo "yes" >&6; }
9789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9790 $as_echo "no" >&6; }
9791 as_fn_error $? "distutils module not found" "$LINENO" 5
9794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
9795 $as_echo_n "checking Python configuration directory... " >&6; }
9796 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
9797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
9798 $as_echo "$python_configdir" >&6; }
9800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
9801 $as_echo_n "checking Python include directories... " >&6; }
9802 python_includespec=`${PYTHON} -c "
9803 import distutils.sysconfig
9804 a = '-I' + distutils.sysconfig.get_python_inc(False)
9805 b = '-I' + distutils.sysconfig.get_python_inc(True)
9809 print(a + ' ' + b)"`
9810 if test "$PORTNAME" = win32 ; then
9811 python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
9813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
9814 $as_echo "$python_includespec" >&6; }
9818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
9819 $as_echo_n "checking how to link an embedded Python application... " >&6; }
9821 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
9822 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
9824 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
9825 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
9826 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
9828 ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
9831 # Otherwise, guess the base name of the shlib.
9832 # LDVERSION was added in Python 3.2, before that use VERSION,
9833 # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
9834 python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
9835 if test x"${python_ldversion}" != x""; then
9836 ldlibrary="python${python_ldversion}"
9838 python_version_var=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('VERSION'))))"`
9839 if test x"${python_version_var}" != x""; then
9840 ldlibrary="python${python_version_var}"
9842 ldlibrary="python${python_version}"
9845 # Search for a likely-looking file.
9847 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9849 # We don't know the platform DLSUFFIX here, so check 'em all.
9850 for e in .so .dll .dylib .sl; do
9851 if test -e "$d/lib${ldlibrary}$e"; then
9858 # Some platforms (OpenBSD) require us to accept a bare versioned shlib
9859 # (".so.n.n") as well. However, check this only after failing to find
9860 # ".so" anywhere, because yet other platforms (Debian) put the .so
9861 # symlink in a different directory from the underlying versioned shlib.
9862 if test "$found_shlib" != 1; then
9863 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9865 for f in "$d/lib${ldlibrary}.so."* ; do
9866 if test -e "$f"; then
9874 # As usual, Windows has its own ideas. Possible default library
9875 # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
9876 # and the "lib" prefix might not be there.
9877 if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
9878 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
9880 for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
9881 if test -e "$f"; then
9890 if test "$found_shlib" != 1; then
9891 as_fn_error $? "could not find shared library for Python
9892 You might have to rebuild your Python installation. Refer to the
9893 documentation for details. Use --without-python to disable building
9894 PL/Python." "$LINENO" 5
9896 python_libspec="-L${python_libdir} -l${ldlibrary}"
9898 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
9900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
9901 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
9907 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
9908 if test -z "$ZIC"; then
9911 # Extract the first word of "$ac_prog", so it can be a program name with args.
9912 set dummy $ac_prog; ac_word=$2
9913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9914 $as_echo_n "checking for $ac_word... " >&6; }
9915 if ${ac_cv_path_ZIC+:} false; then :
9916 $as_echo_n "(cached) " >&6
9920 ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
9923 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9927 test -z "$as_dir" && as_dir=.
9928 for ac_exec_ext in '' $ac_executable_extensions; do
9929 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9930 ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
9931 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9942 if test -n "$ZIC"; then
9943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
9944 $as_echo "$ZIC" >&6; }
9946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9947 $as_echo "no" >&6; }
9951 test -n "$ZIC" && break
9955 # Report the value of ZIC in configure's output in all cases.
9956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
9957 $as_echo_n "checking for ZIC... " >&6; }
9958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
9959 $as_echo "$ZIC" >&6; }
9962 if test -z "$ZIC"; then
9964 When cross-compiling, either use the option --with-system-tzdata to use
9965 existing time-zone data, or set the environment variable ZIC to a zic
9966 program to use during the build." "$LINENO" 5
9973 # For each platform, we need to know about any special compile and link
9974 # libraries, and whether the normal C function names are thread-safe.
9975 # See the comment at the top of src/port/thread.c for more information.
9976 # WIN32 doesn't need the pthread tests; it always uses threads
9978 # These tests are run before the library-tests, because linking with the
9979 # other libraries can pull in the pthread functions as a side-effect. We
9980 # want to use the -pthread or similar flags directly, and not rely on
9981 # the side-effects of linking with some other library.
9983 # note: We have to use AS_IF here rather than plain if. The AC_CHECK_HEADER
9984 # invocation below is the first one in the script, and autoconf generates
9985 # additional code for that, which must not be inside the if-block. AS_IF
9986 # knows how to do that.
9987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
9988 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
9989 if ${ac_cv_path_SED+:} false; then :
9990 $as_echo_n "(cached) " >&6
9992 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
9993 for ac_i in 1 2 3 4 5 6 7; do
9994 ac_script="$ac_script$as_nl$ac_script"
9996 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
9997 { ac_script=; unset ac_script;}
9998 if test -z "$SED"; then
9999 ac_path_SED_found=false
10000 # Loop through the user's path and test for each of PROGNAME-LIST
10001 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10002 for as_dir in $PATH
10005 test -z "$as_dir" && as_dir=.
10006 for ac_prog in sed gsed; do
10007 for ac_exec_ext in '' $ac_executable_extensions; do
10008 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
10009 as_fn_executable_p "$ac_path_SED" || continue
10010 # Check for GNU ac_path_SED and select it if it is found.
10011 # Check for GNU $ac_path_SED
10012 case `"$ac_path_SED" --version 2>&1` in
10014 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10017 $as_echo_n 0123456789 >"conftest.in"
10020 cat "conftest.in" "conftest.in" >"conftest.tmp"
10021 mv "conftest.tmp" "conftest.in"
10022 cp "conftest.in" "conftest.nl"
10023 $as_echo '' >> "conftest.nl"
10024 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10025 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10026 as_fn_arith $ac_count + 1 && ac_count=$as_val
10027 if test $ac_count -gt ${ac_path_SED_max-0}; then
10028 # Best one so far, save it but keep looking for a better one
10029 ac_cv_path_SED="$ac_path_SED"
10030 ac_path_SED_max=$ac_count
10032 # 10*(2^10) chars as input seems more than enough
10033 test $ac_count -gt 10 && break
10035 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10038 $ac_path_SED_found && break 3
10043 if test -z "$ac_cv_path_SED"; then
10044 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10047 ac_cv_path_SED=$SED
10051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10052 $as_echo "$ac_cv_path_SED" >&6; }
10053 SED="$ac_cv_path_SED"
10056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10057 $as_echo_n "checking for ANSI C header files... " >&6; }
10058 if ${ac_cv_header_stdc+:} false; then :
10059 $as_echo_n "(cached) " >&6
10061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10062 /* end confdefs.h. */
10063 #include <stdlib.h>
10064 #include <stdarg.h>
10065 #include <string.h>
10076 if ac_fn_c_try_compile "$LINENO"; then :
10077 ac_cv_header_stdc=yes
10079 ac_cv_header_stdc=no
10081 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10083 if test $ac_cv_header_stdc = yes; then
10084 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10086 /* end confdefs.h. */
10087 #include <string.h>
10090 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10091 $EGREP "memchr" >/dev/null 2>&1; then :
10094 ac_cv_header_stdc=no
10100 if test $ac_cv_header_stdc = yes; then
10101 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10103 /* end confdefs.h. */
10104 #include <stdlib.h>
10107 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10108 $EGREP "free" >/dev/null 2>&1; then :
10111 ac_cv_header_stdc=no
10117 if test $ac_cv_header_stdc = yes; then
10118 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10119 if test "$cross_compiling" = yes; then :
10122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10123 /* end confdefs.h. */
10125 #include <stdlib.h>
10126 #if ((' ' & 0x0FF) == 0x020)
10127 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10128 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10130 # define ISLOWER(c) \
10131 (('a' <= (c) && (c) <= 'i') \
10132 || ('j' <= (c) && (c) <= 'r') \
10133 || ('s' <= (c) && (c) <= 'z'))
10134 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10137 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10142 for (i = 0; i < 256; i++)
10143 if (XOR (islower (i), ISLOWER (i))
10144 || toupper (i) != TOUPPER (i))
10149 if ac_fn_c_try_run "$LINENO"; then :
10152 ac_cv_header_stdc=no
10154 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10155 conftest.$ac_objext conftest.beam conftest.$ac_ext
10160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10161 $as_echo "$ac_cv_header_stdc" >&6; }
10162 if test $ac_cv_header_stdc = yes; then
10164 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
10168 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10169 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10170 inttypes.h stdint.h unistd.h
10172 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10173 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
10175 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10176 cat >>confdefs.h <<_ACEOF
10177 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10185 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
10192 ac_cpp='$CPP $CPPFLAGS'
10193 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10194 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10195 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10199 # We used to check for pthread.h first, but this fails if pthread.h
10200 # requires special compiler flags (e.g. on Tru64 or Sequent).
10201 # It gets checked for in the link test anyway.
10203 # First of all, check if the user has set any of the PTHREAD_LIBS,
10204 # etcetera environment variables, and if threads linking works using
10206 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
10207 ax_pthread_save_CC="$CC"
10208 ax_pthread_save_CFLAGS="$CFLAGS"
10209 ax_pthread_save_LIBS="$LIBS"
10210 if test "x$PTHREAD_CC" != "x"; then :
10213 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10214 LIBS="$PTHREAD_LIBS $LIBS"
10215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
10216 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
10217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10218 /* end confdefs.h. */
10220 /* Override any GCC internal prototype to avoid an error.
10221 Use char because int might match the return type of a GCC
10222 builtin and then its argument prototype would still apply. */
10226 char pthread_join ();
10230 return pthread_join ();
10235 if ac_fn_c_try_link "$LINENO"; then :
10238 rm -f core conftest.err conftest.$ac_objext \
10239 conftest$ac_exeext conftest.$ac_ext
10240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10241 $as_echo "$ax_pthread_ok" >&6; }
10242 if test "x$ax_pthread_ok" = "xno"; then
10246 CC="$ax_pthread_save_CC"
10247 CFLAGS="$ax_pthread_save_CFLAGS"
10248 LIBS="$ax_pthread_save_LIBS"
10251 # We must check for the threads library under a number of different
10252 # names; the ordering is very important because some systems
10253 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
10254 # libraries is broken (non-POSIX).
10256 # Create a list of thread flags to try. Items starting with a "-" are
10257 # C compiler flags, and other items are library names, except for "none"
10258 # which indicates that we try without any flags at all, and "pthread-config"
10259 # which is a program returning the flags for the Pth emulation library.
10261 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
10263 # The ordering *is* (sometimes) important. Some notes on the
10264 # individual items follow:
10266 # pthreads: AIX (must check this before -lpthread)
10267 # none: in case threads are in libc; should be tried before -Kthread and
10268 # other compiler flags to prevent continual compiler warnings
10269 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
10270 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
10271 # (Note: HP C rejects this with "bad form for `-t' option")
10272 # -pthreads: Solaris/gcc (Note: HP C also rejects)
10273 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
10274 # doesn't hurt to check since this sometimes defines pthreads and
10275 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
10276 # is present but should not be used directly; and before -mthreads,
10277 # because the compiler interprets this as "-mt" + "-hreads")
10278 # -mthreads: Mingw32/gcc, Lynx/gcc
10279 # pthread: Linux, etcetera
10280 # --thread-safe: KAI C++
10281 # pthread-config: use pthread-config program (for GNU Pth library)
10287 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
10288 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
10290 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
10295 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
10296 # multi-threading and also sets -lpthread."
10298 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
10303 # IBM z/OS requires a feature-test macro to be defined in order to
10304 # enable POSIX threads at all, so give the user a hint if this is
10305 # not set. (We don't define these ourselves, as they can affect
10306 # other portions of the system API in unpredictable ways.)
10308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10309 /* end confdefs.h. */
10311 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
10312 AX_PTHREAD_ZOS_MISSING
10316 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10317 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
10318 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
10319 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
10327 # On Solaris (at least, for some versions), libc contains stubbed
10328 # (non-functional) versions of the pthreads routines, so link-based
10329 # tests will erroneously succeed. (N.B.: The stubs are missing
10330 # pthread_cleanup_push, or rather a function called by this macro,
10331 # so we could check for that, but who knows whether they'll stub
10332 # that too in a future libc.) So we'll check first for the
10333 # standard Solaris way of linking pthreads (-mt -lpthread).
10335 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
10339 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
10341 if test "x$GCC" = "xyes"; then :
10342 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
10345 # The presence of a feature test macro requesting re-entrant function
10346 # definitions is, on some systems, a strong hint that pthreads support is
10347 # correctly enabled
10350 darwin* | hpux* | linux* | osf* | solaris*)
10351 ax_pthread_check_macro="_REENTRANT"
10355 ax_pthread_check_macro="_THREAD_SAFE"
10359 ax_pthread_check_macro="--"
10362 if test "x$ax_pthread_check_macro" = "x--"; then :
10363 ax_pthread_check_cond=0
10365 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
10368 # Are we compiling with Clang?
10370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
10371 $as_echo_n "checking whether $CC is Clang... " >&6; }
10372 if ${ax_cv_PTHREAD_CLANG+:} false; then :
10373 $as_echo_n "(cached) " >&6
10375 ax_cv_PTHREAD_CLANG=no
10376 # Note that Autoconf sets GCC=yes for Clang as well as GCC
10377 if test "x$GCC" = "xyes"; then
10378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10379 /* end confdefs.h. */
10380 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
10381 # if defined(__clang__) && defined(__llvm__)
10382 AX_PTHREAD_CC_IS_CLANG
10386 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10387 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
10388 ax_cv_PTHREAD_CLANG=yes
10395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
10396 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
10397 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
10399 ax_pthread_clang_warning=no
10401 # Clang needs special handling, because older versions handle the -pthread
10402 # option in a rather... idiosyncratic way
10404 if test "x$ax_pthread_clang" = "xyes"; then
10406 # Clang takes -pthread; it has never supported any other flag
10408 # (Note 1: This will need to be revisited if a system that Clang
10409 # supports has POSIX threads in a separate library. This tends not
10410 # to be the way of modern systems, but it's conceivable.)
10412 # (Note 2: On some systems, notably Darwin, -pthread is not needed
10413 # to get POSIX threads support; the API is always present and
10414 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
10415 # -pthread does define _REENTRANT, and while the Darwin headers
10416 # ignore this macro, third-party headers might not.)
10418 PTHREAD_CFLAGS="-pthread"
10423 # However, older versions of Clang make a point of warning the user
10424 # that, in an invocation where only linking and no compilation is
10425 # taking place, the -pthread option has no effect ("argument unused
10426 # during compilation"). They expect -pthread to be passed in only
10427 # when source code is being compiled.
10429 # Problem is, this is at odds with the way Automake and most other
10430 # C build frameworks function, which is that the same flags used in
10431 # compilation (CFLAGS) are also used in linking. Many systems
10432 # supported by AX_PTHREAD require exactly this for POSIX threads
10433 # support, and in fact it is often not straightforward to specify a
10434 # flag that is used only in the compilation phase and not in
10435 # linking. Such a scenario is extremely rare in practice.
10437 # Even though use of the -pthread flag in linking would only print
10438 # a warning, this can be a nuisance for well-run software projects
10439 # that build with -Werror. So if the active version of Clang has
10440 # this misfeature, we search for an option to squash it.
10442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
10443 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
10444 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
10445 $as_echo_n "(cached) " >&6
10447 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
10448 # Create an alternate version of $ac_link that compiles and
10449 # links in two steps (.c -> .o, .o -> exe) instead of one
10450 # (.c -> exe), because the warning occurs only in the second
10452 ax_pthread_save_ac_link="$ac_link"
10453 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
10454 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
10455 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
10456 ax_pthread_save_CFLAGS="$CFLAGS"
10457 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
10458 if test "x$ax_pthread_try" = "xunknown"; then :
10461 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
10462 ac_link="$ax_pthread_save_ac_link"
10463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10464 /* end confdefs.h. */
10465 int main(void){return 0;}
10467 if ac_fn_c_try_link "$LINENO"; then :
10468 ac_link="$ax_pthread_2step_ac_link"
10469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10470 /* end confdefs.h. */
10471 int main(void){return 0;}
10473 if ac_fn_c_try_link "$LINENO"; then :
10476 rm -f core conftest.err conftest.$ac_objext \
10477 conftest$ac_exeext conftest.$ac_ext
10480 rm -f core conftest.err conftest.$ac_objext \
10481 conftest$ac_exeext conftest.$ac_ext
10483 ac_link="$ax_pthread_save_ac_link"
10484 CFLAGS="$ax_pthread_save_CFLAGS"
10485 if test "x$ax_pthread_try" = "x"; then :
10488 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
10491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
10492 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
10494 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
10496 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
10499 fi # $ax_pthread_clang = yes
10501 if test "x$ax_pthread_ok" = "xno"; then
10502 for ax_pthread_try_flag in $ax_pthread_flags; do
10504 case $ax_pthread_try_flag in
10506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
10507 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
10511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
10512 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
10513 PTHREAD_CFLAGS="-mt"
10514 PTHREAD_LIBS="-lpthread"
10518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
10519 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
10520 PTHREAD_CFLAGS="$ax_pthread_try_flag"
10524 # Extract the first word of "pthread-config", so it can be a program name with args.
10525 set dummy pthread-config; ac_word=$2
10526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10527 $as_echo_n "checking for $ac_word... " >&6; }
10528 if ${ac_cv_prog_ax_pthread_config+:} false; then :
10529 $as_echo_n "(cached) " >&6
10531 if test -n "$ax_pthread_config"; then
10532 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
10534 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10535 for as_dir in $PATH
10538 test -z "$as_dir" && as_dir=.
10539 for ac_exec_ext in '' $ac_executable_extensions; do
10540 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10541 ac_cv_prog_ax_pthread_config="yes"
10542 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10549 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
10552 ax_pthread_config=$ac_cv_prog_ax_pthread_config
10553 if test -n "$ax_pthread_config"; then
10554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
10555 $as_echo "$ax_pthread_config" >&6; }
10557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10558 $as_echo "no" >&6; }
10562 if test "x$ax_pthread_config" = "xno"; then :
10565 PTHREAD_CFLAGS="`pthread-config --cflags`"
10566 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
10570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
10571 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
10572 PTHREAD_LIBS="-l$ax_pthread_try_flag"
10576 ax_pthread_save_CFLAGS="$CFLAGS"
10577 ax_pthread_save_LIBS="$LIBS"
10578 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10579 LIBS="$PTHREAD_LIBS $LIBS"
10581 # Check for various functions. We must include pthread.h,
10582 # since some functions may be macros. (On the Sequent, we
10583 # need a special flag -Kthread to make this header compile.)
10584 # We check for pthread_join because it is in -lpthread on IRIX
10585 # while pthread_create is in libc. We check for pthread_attr_init
10586 # due to DEC craziness with -lpthreads. We check for
10587 # pthread_cleanup_push because it is one of the few pthread
10588 # functions on Solaris that doesn't have a non-functional libc stub.
10589 # We try pthread_create on general principles.
10591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10592 /* end confdefs.h. */
10593 #include <pthread.h>
10594 # if $ax_pthread_check_cond
10595 # error "$ax_pthread_check_macro must be defined"
10597 static void routine(void *a) { a = 0; }
10598 static void *start_routine(void *a) { return a; }
10602 pthread_t th; pthread_attr_t attr;
10603 pthread_create(&th, 0, start_routine, 0);
10604 pthread_join(th, 0);
10605 pthread_attr_init(&attr);
10606 pthread_cleanup_push(routine, 0);
10607 pthread_cleanup_pop(0) /* ; */
10612 if ac_fn_c_try_link "$LINENO"; then :
10615 rm -f core conftest.err conftest.$ac_objext \
10616 conftest$ac_exeext conftest.$ac_ext
10618 CFLAGS="$ax_pthread_save_CFLAGS"
10619 LIBS="$ax_pthread_save_LIBS"
10621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10622 $as_echo "$ax_pthread_ok" >&6; }
10623 if test "x$ax_pthread_ok" = "xyes"; then :
10632 # Various other checks:
10633 if test "x$ax_pthread_ok" = "xyes"; then
10634 ax_pthread_save_CFLAGS="$CFLAGS"
10635 ax_pthread_save_LIBS="$LIBS"
10636 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10637 LIBS="$PTHREAD_LIBS $LIBS"
10639 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
10640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
10641 $as_echo_n "checking for joinable pthread attribute... " >&6; }
10642 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
10643 $as_echo_n "(cached) " >&6
10645 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
10646 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
10647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10648 /* end confdefs.h. */
10649 #include <pthread.h>
10653 int attr = $ax_pthread_attr; return attr /* ; */
10658 if ac_fn_c_try_link "$LINENO"; then :
10659 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
10661 rm -f core conftest.err conftest.$ac_objext \
10662 conftest$ac_exeext conftest.$ac_ext
10666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
10667 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
10668 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
10669 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
10670 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
10672 cat >>confdefs.h <<_ACEOF
10673 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
10676 ax_pthread_joinable_attr_defined=yes
10680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
10681 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
10682 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
10683 $as_echo_n "(cached) " >&6
10685 ax_cv_PTHREAD_SPECIAL_FLAGS=no
10688 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
10693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
10694 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
10695 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
10696 test "x$ax_pthread_special_flags_added" != "xyes"; then :
10697 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
10698 ax_pthread_special_flags_added=yes
10701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
10702 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
10703 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
10704 $as_echo_n "(cached) " >&6
10706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10707 /* end confdefs.h. */
10708 #include <pthread.h>
10712 int i = PTHREAD_PRIO_INHERIT;
10717 if ac_fn_c_try_link "$LINENO"; then :
10718 ax_cv_PTHREAD_PRIO_INHERIT=yes
10720 ax_cv_PTHREAD_PRIO_INHERIT=no
10722 rm -f core conftest.err conftest.$ac_objext \
10723 conftest$ac_exeext conftest.$ac_ext
10726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
10727 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
10728 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
10729 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
10731 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
10733 ax_pthread_prio_inherit_defined=yes
10737 CFLAGS="$ax_pthread_save_CFLAGS"
10738 LIBS="$ax_pthread_save_LIBS"
10740 # More AIX lossage: compile with *_r variant
10741 if test "x$GCC" != "xyes"; then
10745 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
10746 #handle absolute path differently from PATH based program lookup
10749 if as_fn_executable_p ${CC}_r; then :
10750 PTHREAD_CC="${CC}_r"
10753 for ac_prog in ${CC}_r
10755 # Extract the first word of "$ac_prog", so it can be a program name with args.
10756 set dummy $ac_prog; ac_word=$2
10757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10758 $as_echo_n "checking for $ac_word... " >&6; }
10759 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
10760 $as_echo_n "(cached) " >&6
10762 if test -n "$PTHREAD_CC"; then
10763 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
10765 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10766 for as_dir in $PATH
10769 test -z "$as_dir" && as_dir=.
10770 for ac_exec_ext in '' $ac_executable_extensions; do
10771 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10772 ac_cv_prog_PTHREAD_CC="$ac_prog"
10773 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10782 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
10783 if test -n "$PTHREAD_CC"; then
10784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
10785 $as_echo "$PTHREAD_CC" >&6; }
10787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10788 $as_echo "no" >&6; }
10792 test -n "$PTHREAD_CC" && break
10794 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10805 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10811 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
10812 if test "x$ax_pthread_ok" = "xyes"; then
10814 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10822 ac_cpp='$CPP $CPPFLAGS'
10823 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10824 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10825 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10829 # Some platforms use these, so just define them. They can't hurt if they
10830 # are not supported. For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
10831 # enables 5-arg getpwuid_r, among other things.
10832 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
10834 # Check for *_r functions
10837 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10838 LIBS="$LIBS $PTHREAD_LIBS"
10840 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
10841 if test "x$ac_cv_header_pthread_h" = xyes; then :
10845 pthread.h not found; use --disable-thread-safety to disable thread safety" "$LINENO" 5
10850 for ac_func in strerror_r getpwuid_r gethostbyname_r
10852 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10853 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10854 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10855 cat >>confdefs.h <<_ACEOF
10856 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10863 # Do test here with the proper thread flags
10864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
10865 $as_echo_n "checking whether strerror_r returns int... " >&6; }
10866 if ${pgac_cv_func_strerror_r_int+:} false; then :
10867 $as_echo_n "(cached) " >&6
10869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10870 /* end confdefs.h. */
10871 #include <string.h>
10876 switch (strerror_r(1, buf, sizeof(buf)))
10877 { case 0: break; default: break; }
10883 if ac_fn_c_try_compile "$LINENO"; then :
10884 pgac_cv_func_strerror_r_int=yes
10886 pgac_cv_func_strerror_r_int=no
10888 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
10891 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
10892 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
10894 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
10905 # do not use values from template file
10918 ## Most libraries are included only if they demonstrably provide a function
10919 ## we need, but libm is an exception: always include it, because there are
10920 ## too many compilers that play cute optimization games that will break
10921 ## probes for standard functions such as pow().
10924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
10925 $as_echo_n "checking for main in -lm... " >&6; }
10926 if ${ac_cv_lib_m_main+:} false; then :
10927 $as_echo_n "(cached) " >&6
10929 ac_check_lib_save_LIBS=$LIBS
10931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10932 /* end confdefs.h. */
10943 if ac_fn_c_try_link "$LINENO"; then :
10944 ac_cv_lib_m_main=yes
10946 ac_cv_lib_m_main=no
10948 rm -f core conftest.err conftest.$ac_objext \
10949 conftest$ac_exeext conftest.$ac_ext
10950 LIBS=$ac_check_lib_save_LIBS
10952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
10953 $as_echo "$ac_cv_lib_m_main" >&6; }
10954 if test "x$ac_cv_lib_m_main" = xyes; then :
10955 cat >>confdefs.h <<_ACEOF
10956 #define HAVE_LIBM 1
10963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
10964 $as_echo_n "checking for library containing setproctitle... " >&6; }
10965 if ${ac_cv_search_setproctitle+:} false; then :
10966 $as_echo_n "(cached) " >&6
10968 ac_func_search_save_LIBS=$LIBS
10969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10970 /* end confdefs.h. */
10972 /* Override any GCC internal prototype to avoid an error.
10973 Use char because int might match the return type of a GCC
10974 builtin and then its argument prototype would still apply. */
10978 char setproctitle ();
10982 return setproctitle ();
10987 for ac_lib in '' util; do
10988 if test -z "$ac_lib"; then
10989 ac_res="none required"
10992 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10994 if ac_fn_c_try_link "$LINENO"; then :
10995 ac_cv_search_setproctitle=$ac_res
10997 rm -f core conftest.err conftest.$ac_objext \
10999 if ${ac_cv_search_setproctitle+:} false; then :
11003 if ${ac_cv_search_setproctitle+:} false; then :
11006 ac_cv_search_setproctitle=no
11008 rm conftest.$ac_ext
11009 LIBS=$ac_func_search_save_LIBS
11011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
11012 $as_echo "$ac_cv_search_setproctitle" >&6; }
11013 ac_res=$ac_cv_search_setproctitle
11014 if test "$ac_res" != no; then :
11015 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
11020 $as_echo_n "checking for library containing dlopen... " >&6; }
11021 if ${ac_cv_search_dlopen+:} false; then :
11022 $as_echo_n "(cached) " >&6
11024 ac_func_search_save_LIBS=$LIBS
11025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11026 /* end confdefs.h. */
11028 /* Override any GCC internal prototype to avoid an error.
11029 Use char because int might match the return type of a GCC
11030 builtin and then its argument prototype would still apply. */
11043 for ac_lib in '' dl; do
11044 if test -z "$ac_lib"; then
11045 ac_res="none required"
11048 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11050 if ac_fn_c_try_link "$LINENO"; then :
11051 ac_cv_search_dlopen=$ac_res
11053 rm -f core conftest.err conftest.$ac_objext \
11055 if ${ac_cv_search_dlopen+:} false; then :
11059 if ${ac_cv_search_dlopen+:} false; then :
11062 ac_cv_search_dlopen=no
11064 rm conftest.$ac_ext
11065 LIBS=$ac_func_search_save_LIBS
11067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
11068 $as_echo "$ac_cv_search_dlopen" >&6; }
11069 ac_res=$ac_cv_search_dlopen
11070 if test "$ac_res" != no; then :
11071 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11076 $as_echo_n "checking for library containing socket... " >&6; }
11077 if ${ac_cv_search_socket+:} false; then :
11078 $as_echo_n "(cached) " >&6
11080 ac_func_search_save_LIBS=$LIBS
11081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11082 /* end confdefs.h. */
11084 /* Override any GCC internal prototype to avoid an error.
11085 Use char because int might match the return type of a GCC
11086 builtin and then its argument prototype would still apply. */
11099 for ac_lib in '' socket ws2_32; do
11100 if test -z "$ac_lib"; then
11101 ac_res="none required"
11104 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11106 if ac_fn_c_try_link "$LINENO"; then :
11107 ac_cv_search_socket=$ac_res
11109 rm -f core conftest.err conftest.$ac_objext \
11111 if ${ac_cv_search_socket+:} false; then :
11115 if ${ac_cv_search_socket+:} false; then :
11118 ac_cv_search_socket=no
11120 rm conftest.$ac_ext
11121 LIBS=$ac_func_search_save_LIBS
11123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11124 $as_echo "$ac_cv_search_socket" >&6; }
11125 ac_res=$ac_cv_search_socket
11126 if test "$ac_res" != no; then :
11127 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
11132 $as_echo_n "checking for library containing shl_load... " >&6; }
11133 if ${ac_cv_search_shl_load+:} false; then :
11134 $as_echo_n "(cached) " >&6
11136 ac_func_search_save_LIBS=$LIBS
11137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11138 /* end confdefs.h. */
11140 /* Override any GCC internal prototype to avoid an error.
11141 Use char because int might match the return type of a GCC
11142 builtin and then its argument prototype would still apply. */
11150 return shl_load ();
11155 for ac_lib in '' dld; do
11156 if test -z "$ac_lib"; then
11157 ac_res="none required"
11160 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11162 if ac_fn_c_try_link "$LINENO"; then :
11163 ac_cv_search_shl_load=$ac_res
11165 rm -f core conftest.err conftest.$ac_objext \
11167 if ${ac_cv_search_shl_load+:} false; then :
11171 if ${ac_cv_search_shl_load+:} false; then :
11174 ac_cv_search_shl_load=no
11176 rm conftest.$ac_ext
11177 LIBS=$ac_func_search_save_LIBS
11179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
11180 $as_echo "$ac_cv_search_shl_load" >&6; }
11181 ac_res=$ac_cv_search_shl_load
11182 if test "$ac_res" != no; then :
11183 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
11188 $as_echo_n "checking for library containing getopt_long... " >&6; }
11189 if ${ac_cv_search_getopt_long+:} false; then :
11190 $as_echo_n "(cached) " >&6
11192 ac_func_search_save_LIBS=$LIBS
11193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11194 /* end confdefs.h. */
11196 /* Override any GCC internal prototype to avoid an error.
11197 Use char because int might match the return type of a GCC
11198 builtin and then its argument prototype would still apply. */
11202 char getopt_long ();
11206 return getopt_long ();
11211 for ac_lib in '' getopt gnugetopt; do
11212 if test -z "$ac_lib"; then
11213 ac_res="none required"
11216 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11218 if ac_fn_c_try_link "$LINENO"; then :
11219 ac_cv_search_getopt_long=$ac_res
11221 rm -f core conftest.err conftest.$ac_objext \
11223 if ${ac_cv_search_getopt_long+:} false; then :
11227 if ${ac_cv_search_getopt_long+:} false; then :
11230 ac_cv_search_getopt_long=no
11232 rm conftest.$ac_ext
11233 LIBS=$ac_func_search_save_LIBS
11235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
11236 $as_echo "$ac_cv_search_getopt_long" >&6; }
11237 ac_res=$ac_cv_search_getopt_long
11238 if test "$ac_res" != no; then :
11239 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
11244 $as_echo_n "checking for library containing crypt... " >&6; }
11245 if ${ac_cv_search_crypt+:} false; then :
11246 $as_echo_n "(cached) " >&6
11248 ac_func_search_save_LIBS=$LIBS
11249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11250 /* end confdefs.h. */
11252 /* Override any GCC internal prototype to avoid an error.
11253 Use char because int might match the return type of a GCC
11254 builtin and then its argument prototype would still apply. */
11267 for ac_lib in '' crypt; do
11268 if test -z "$ac_lib"; then
11269 ac_res="none required"
11272 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11274 if ac_fn_c_try_link "$LINENO"; then :
11275 ac_cv_search_crypt=$ac_res
11277 rm -f core conftest.err conftest.$ac_objext \
11279 if ${ac_cv_search_crypt+:} false; then :
11283 if ${ac_cv_search_crypt+:} false; then :
11286 ac_cv_search_crypt=no
11288 rm conftest.$ac_ext
11289 LIBS=$ac_func_search_save_LIBS
11291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
11292 $as_echo "$ac_cv_search_crypt" >&6; }
11293 ac_res=$ac_cv_search_crypt
11294 if test "$ac_res" != no; then :
11295 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
11300 $as_echo_n "checking for library containing shm_open... " >&6; }
11301 if ${ac_cv_search_shm_open+:} false; then :
11302 $as_echo_n "(cached) " >&6
11304 ac_func_search_save_LIBS=$LIBS
11305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11306 /* end confdefs.h. */
11308 /* Override any GCC internal prototype to avoid an error.
11309 Use char because int might match the return type of a GCC
11310 builtin and then its argument prototype would still apply. */
11318 return shm_open ();
11323 for ac_lib in '' rt; do
11324 if test -z "$ac_lib"; then
11325 ac_res="none required"
11328 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11330 if ac_fn_c_try_link "$LINENO"; then :
11331 ac_cv_search_shm_open=$ac_res
11333 rm -f core conftest.err conftest.$ac_objext \
11335 if ${ac_cv_search_shm_open+:} false; then :
11339 if ${ac_cv_search_shm_open+:} false; then :
11342 ac_cv_search_shm_open=no
11344 rm conftest.$ac_ext
11345 LIBS=$ac_func_search_save_LIBS
11347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
11348 $as_echo "$ac_cv_search_shm_open" >&6; }
11349 ac_res=$ac_cv_search_shm_open
11350 if test "$ac_res" != no; then :
11351 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
11356 $as_echo_n "checking for library containing shm_unlink... " >&6; }
11357 if ${ac_cv_search_shm_unlink+:} false; then :
11358 $as_echo_n "(cached) " >&6
11360 ac_func_search_save_LIBS=$LIBS
11361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11362 /* end confdefs.h. */
11364 /* Override any GCC internal prototype to avoid an error.
11365 Use char because int might match the return type of a GCC
11366 builtin and then its argument prototype would still apply. */
11370 char shm_unlink ();
11374 return shm_unlink ();
11379 for ac_lib in '' rt; do
11380 if test -z "$ac_lib"; then
11381 ac_res="none required"
11384 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11386 if ac_fn_c_try_link "$LINENO"; then :
11387 ac_cv_search_shm_unlink=$ac_res
11389 rm -f core conftest.err conftest.$ac_objext \
11391 if ${ac_cv_search_shm_unlink+:} false; then :
11395 if ${ac_cv_search_shm_unlink+:} false; then :
11398 ac_cv_search_shm_unlink=no
11400 rm conftest.$ac_ext
11401 LIBS=$ac_func_search_save_LIBS
11403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
11404 $as_echo "$ac_cv_search_shm_unlink" >&6; }
11405 ac_res=$ac_cv_search_shm_unlink
11406 if test "$ac_res" != no; then :
11407 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11412 $as_echo_n "checking for library containing clock_gettime... " >&6; }
11413 if ${ac_cv_search_clock_gettime+:} false; then :
11414 $as_echo_n "(cached) " >&6
11416 ac_func_search_save_LIBS=$LIBS
11417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11418 /* end confdefs.h. */
11420 /* Override any GCC internal prototype to avoid an error.
11421 Use char because int might match the return type of a GCC
11422 builtin and then its argument prototype would still apply. */
11426 char clock_gettime ();
11430 return clock_gettime ();
11435 for ac_lib in '' rt posix4; do
11436 if test -z "$ac_lib"; then
11437 ac_res="none required"
11440 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11442 if ac_fn_c_try_link "$LINENO"; then :
11443 ac_cv_search_clock_gettime=$ac_res
11445 rm -f core conftest.err conftest.$ac_objext \
11447 if ${ac_cv_search_clock_gettime+:} false; then :
11451 if ${ac_cv_search_clock_gettime+:} false; then :
11454 ac_cv_search_clock_gettime=no
11456 rm conftest.$ac_ext
11457 LIBS=$ac_func_search_save_LIBS
11459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11460 $as_echo "$ac_cv_search_clock_gettime" >&6; }
11461 ac_res=$ac_cv_search_clock_gettime
11462 if test "$ac_res" != no; then :
11463 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
11469 $as_echo_n "checking for library containing fdatasync... " >&6; }
11470 if ${ac_cv_search_fdatasync+:} false; then :
11471 $as_echo_n "(cached) " >&6
11473 ac_func_search_save_LIBS=$LIBS
11474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11475 /* end confdefs.h. */
11477 /* Override any GCC internal prototype to avoid an error.
11478 Use char because int might match the return type of a GCC
11479 builtin and then its argument prototype would still apply. */
11487 return fdatasync ();
11492 for ac_lib in '' rt posix4; do
11493 if test -z "$ac_lib"; then
11494 ac_res="none required"
11497 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11499 if ac_fn_c_try_link "$LINENO"; then :
11500 ac_cv_search_fdatasync=$ac_res
11502 rm -f core conftest.err conftest.$ac_objext \
11504 if ${ac_cv_search_fdatasync+:} false; then :
11508 if ${ac_cv_search_fdatasync+:} false; then :
11511 ac_cv_search_fdatasync=no
11513 rm conftest.$ac_ext
11514 LIBS=$ac_func_search_save_LIBS
11516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
11517 $as_echo "$ac_cv_search_fdatasync" >&6; }
11518 ac_res=$ac_cv_search_fdatasync
11519 if test "$ac_res" != no; then :
11520 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11524 # Required for thread_test.c on Solaris
11525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
11526 $as_echo_n "checking for library containing sched_yield... " >&6; }
11527 if ${ac_cv_search_sched_yield+:} false; then :
11528 $as_echo_n "(cached) " >&6
11530 ac_func_search_save_LIBS=$LIBS
11531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11532 /* end confdefs.h. */
11534 /* Override any GCC internal prototype to avoid an error.
11535 Use char because int might match the return type of a GCC
11536 builtin and then its argument prototype would still apply. */
11540 char sched_yield ();
11544 return sched_yield ();
11549 for ac_lib in '' rt; do
11550 if test -z "$ac_lib"; then
11551 ac_res="none required"
11554 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11556 if ac_fn_c_try_link "$LINENO"; then :
11557 ac_cv_search_sched_yield=$ac_res
11559 rm -f core conftest.err conftest.$ac_objext \
11561 if ${ac_cv_search_sched_yield+:} false; then :
11565 if ${ac_cv_search_sched_yield+:} false; then :
11568 ac_cv_search_sched_yield=no
11570 rm conftest.$ac_ext
11571 LIBS=$ac_func_search_save_LIBS
11573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
11574 $as_echo "$ac_cv_search_sched_yield" >&6; }
11575 ac_res=$ac_cv_search_sched_yield
11576 if test "$ac_res" != no; then :
11577 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11581 # Required for thread_test.c on Solaris 2.5:
11582 # Other ports use it too (HP-UX) so test unconditionally
11583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
11584 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
11585 if ${ac_cv_search_gethostbyname_r+:} false; then :
11586 $as_echo_n "(cached) " >&6
11588 ac_func_search_save_LIBS=$LIBS
11589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11590 /* end confdefs.h. */
11592 /* Override any GCC internal prototype to avoid an error.
11593 Use char because int might match the return type of a GCC
11594 builtin and then its argument prototype would still apply. */
11598 char gethostbyname_r ();
11602 return gethostbyname_r ();
11607 for ac_lib in '' nsl; do
11608 if test -z "$ac_lib"; then
11609 ac_res="none required"
11612 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11614 if ac_fn_c_try_link "$LINENO"; then :
11615 ac_cv_search_gethostbyname_r=$ac_res
11617 rm -f core conftest.err conftest.$ac_objext \
11619 if ${ac_cv_search_gethostbyname_r+:} false; then :
11623 if ${ac_cv_search_gethostbyname_r+:} false; then :
11626 ac_cv_search_gethostbyname_r=no
11628 rm conftest.$ac_ext
11629 LIBS=$ac_func_search_save_LIBS
11631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
11632 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
11633 ac_res=$ac_cv_search_gethostbyname_r
11634 if test "$ac_res" != no; then :
11635 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
11641 $as_echo_n "checking for library containing shmget... " >&6; }
11642 if ${ac_cv_search_shmget+:} false; then :
11643 $as_echo_n "(cached) " >&6
11645 ac_func_search_save_LIBS=$LIBS
11646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11647 /* end confdefs.h. */
11649 /* Override any GCC internal prototype to avoid an error.
11650 Use char because int might match the return type of a GCC
11651 builtin and then its argument prototype would still apply. */
11664 for ac_lib in '' cygipc; do
11665 if test -z "$ac_lib"; then
11666 ac_res="none required"
11669 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11671 if ac_fn_c_try_link "$LINENO"; then :
11672 ac_cv_search_shmget=$ac_res
11674 rm -f core conftest.err conftest.$ac_objext \
11676 if ${ac_cv_search_shmget+:} false; then :
11680 if ${ac_cv_search_shmget+:} false; then :
11683 ac_cv_search_shmget=no
11685 rm conftest.$ac_ext
11686 LIBS=$ac_func_search_save_LIBS
11688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
11689 $as_echo "$ac_cv_search_shmget" >&6; }
11690 ac_res=$ac_cv_search_shmget
11691 if test "$ac_res" != no; then :
11692 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11697 if test "$with_readline" = yes; then
11700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
11701 $as_echo_n "checking for library containing readline... " >&6; }
11702 if ${pgac_cv_check_readline+:} false; then :
11703 $as_echo_n "(cached) " >&6
11705 pgac_cv_check_readline=no
11706 pgac_save_LIBS=$LIBS
11707 if test x"$with_libedit_preferred" != x"yes"
11708 then READLINE_ORDER="-lreadline -ledit"
11709 else READLINE_ORDER="-ledit -lreadline"
11711 for pgac_rllib in $READLINE_ORDER ; do
11712 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
11713 LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
11714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11715 /* end confdefs.h. */
11717 /* Override any GCC internal prototype to avoid an error.
11718 Use char because int might match the return type of a GCC
11719 builtin and then its argument prototype would still apply. */
11727 return readline ();
11732 if ac_fn_c_try_link "$LINENO"; then :
11734 # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
11735 # recognize dependent libraries; assume curses is needed if we didn't
11736 # find any dependency.
11738 netbsd* | openbsd* | irix*)
11739 if test x"$pgac_lib" = x"" ; then
11740 pgac_lib=" -lcurses"
11744 pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
11748 rm -f core conftest.err conftest.$ac_objext \
11749 conftest$ac_exeext conftest.$ac_ext
11751 if test "$pgac_cv_check_readline" != no ; then
11755 LIBS=$pgac_save_LIBS
11758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
11759 $as_echo "$pgac_cv_check_readline" >&6; }
11760 if test "$pgac_cv_check_readline" != no ; then
11761 LIBS="$pgac_cv_check_readline $LIBS"
11763 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
11768 if test x"$pgac_cv_check_readline" = x"no"; then
11769 as_fn_error $? "readline library not found
11770 If you have readline already installed, see config.log for details on the
11771 failure. It is possible the compiler isn't looking in the proper directory.
11772 Use --without-readline to disable readline support." "$LINENO" 5
11776 if test "$with_zlib" = yes; then
11777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
11778 $as_echo_n "checking for inflate in -lz... " >&6; }
11779 if ${ac_cv_lib_z_inflate+:} false; then :
11780 $as_echo_n "(cached) " >&6
11782 ac_check_lib_save_LIBS=$LIBS
11784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11785 /* end confdefs.h. */
11787 /* Override any GCC internal prototype to avoid an error.
11788 Use char because int might match the return type of a GCC
11789 builtin and then its argument prototype would still apply. */
11802 if ac_fn_c_try_link "$LINENO"; then :
11803 ac_cv_lib_z_inflate=yes
11805 ac_cv_lib_z_inflate=no
11807 rm -f core conftest.err conftest.$ac_objext \
11808 conftest$ac_exeext conftest.$ac_ext
11809 LIBS=$ac_check_lib_save_LIBS
11811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
11812 $as_echo "$ac_cv_lib_z_inflate" >&6; }
11813 if test "x$ac_cv_lib_z_inflate" = xyes; then :
11814 cat >>confdefs.h <<_ACEOF
11815 #define HAVE_LIBZ 1
11821 as_fn_error $? "zlib library not found
11822 If you have zlib already installed, see config.log for details on the
11823 failure. It is possible the compiler isn't looking in the proper directory.
11824 Use --without-zlib to disable zlib support." "$LINENO" 5
11829 if test "$enable_spinlocks" = yes; then
11831 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
11834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11835 *** Not using spinlocks will cause poor performance." >&5
11836 $as_echo "$as_me: WARNING:
11837 *** Not using spinlocks will cause poor performance." >&2;}
11840 if test "$enable_atomics" = yes; then
11842 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
11845 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11846 *** Not using atomic operations will cause poor performance." >&5
11847 $as_echo "$as_me: WARNING:
11848 *** Not using atomic operations will cause poor performance." >&2;}
11851 if test "$with_gssapi" = yes ; then
11852 if test "$PORTNAME" != "win32"; then
11853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
11854 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
11855 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11856 $as_echo_n "(cached) " >&6
11858 ac_func_search_save_LIBS=$LIBS
11859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11860 /* end confdefs.h. */
11862 /* Override any GCC internal prototype to avoid an error.
11863 Use char because int might match the return type of a GCC
11864 builtin and then its argument prototype would still apply. */
11868 char gss_init_sec_context ();
11872 return gss_init_sec_context ();
11877 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
11878 if test -z "$ac_lib"; then
11879 ac_res="none required"
11882 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11884 if ac_fn_c_try_link "$LINENO"; then :
11885 ac_cv_search_gss_init_sec_context=$ac_res
11887 rm -f core conftest.err conftest.$ac_objext \
11889 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11893 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11896 ac_cv_search_gss_init_sec_context=no
11898 rm conftest.$ac_ext
11899 LIBS=$ac_func_search_save_LIBS
11901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
11902 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
11903 ac_res=$ac_cv_search_gss_init_sec_context
11904 if test "$ac_res" != no; then :
11905 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11908 as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
11912 LIBS="$LIBS -lgssapi32"
11916 if test "$with_openssl" = yes ; then
11917 if test "$PORTNAME" != "win32"; then
11918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
11919 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
11920 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
11921 $as_echo_n "(cached) " >&6
11923 ac_check_lib_save_LIBS=$LIBS
11924 LIBS="-lcrypto $LIBS"
11925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11926 /* end confdefs.h. */
11928 /* Override any GCC internal prototype to avoid an error.
11929 Use char because int might match the return type of a GCC
11930 builtin and then its argument prototype would still apply. */
11934 char CRYPTO_new_ex_data ();
11938 return CRYPTO_new_ex_data ();
11943 if ac_fn_c_try_link "$LINENO"; then :
11944 ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
11946 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
11948 rm -f core conftest.err conftest.$ac_objext \
11949 conftest$ac_exeext conftest.$ac_ext
11950 LIBS=$ac_check_lib_save_LIBS
11952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
11953 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
11954 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
11955 cat >>confdefs.h <<_ACEOF
11956 #define HAVE_LIBCRYPTO 1
11959 LIBS="-lcrypto $LIBS"
11962 as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
11965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
11966 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
11967 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
11968 $as_echo_n "(cached) " >&6
11970 ac_check_lib_save_LIBS=$LIBS
11972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11973 /* end confdefs.h. */
11975 /* Override any GCC internal prototype to avoid an error.
11976 Use char because int might match the return type of a GCC
11977 builtin and then its argument prototype would still apply. */
11990 if ac_fn_c_try_link "$LINENO"; then :
11991 ac_cv_lib_ssl_SSL_new=yes
11993 ac_cv_lib_ssl_SSL_new=no
11995 rm -f core conftest.err conftest.$ac_objext \
11996 conftest$ac_exeext conftest.$ac_ext
11997 LIBS=$ac_check_lib_save_LIBS
11999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
12000 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
12001 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
12002 cat >>confdefs.h <<_ACEOF
12003 #define HAVE_LIBSSL 1
12009 as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
12013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
12014 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
12015 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12016 $as_echo_n "(cached) " >&6
12018 ac_func_search_save_LIBS=$LIBS
12019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12020 /* end confdefs.h. */
12022 /* Override any GCC internal prototype to avoid an error.
12023 Use char because int might match the return type of a GCC
12024 builtin and then its argument prototype would still apply. */
12028 char CRYPTO_new_ex_data ();
12032 return CRYPTO_new_ex_data ();
12037 for ac_lib in '' eay32 crypto; do
12038 if test -z "$ac_lib"; then
12039 ac_res="none required"
12042 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12044 if ac_fn_c_try_link "$LINENO"; then :
12045 ac_cv_search_CRYPTO_new_ex_data=$ac_res
12047 rm -f core conftest.err conftest.$ac_objext \
12049 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12053 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12056 ac_cv_search_CRYPTO_new_ex_data=no
12058 rm conftest.$ac_ext
12059 LIBS=$ac_func_search_save_LIBS
12061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
12062 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
12063 ac_res=$ac_cv_search_CRYPTO_new_ex_data
12064 if test "$ac_res" != no; then :
12065 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12068 as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
12071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
12072 $as_echo_n "checking for library containing SSL_new... " >&6; }
12073 if ${ac_cv_search_SSL_new+:} false; then :
12074 $as_echo_n "(cached) " >&6
12076 ac_func_search_save_LIBS=$LIBS
12077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12078 /* end confdefs.h. */
12080 /* Override any GCC internal prototype to avoid an error.
12081 Use char because int might match the return type of a GCC
12082 builtin and then its argument prototype would still apply. */
12095 for ac_lib in '' ssleay32 ssl; do
12096 if test -z "$ac_lib"; then
12097 ac_res="none required"
12100 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12102 if ac_fn_c_try_link "$LINENO"; then :
12103 ac_cv_search_SSL_new=$ac_res
12105 rm -f core conftest.err conftest.$ac_objext \
12107 if ${ac_cv_search_SSL_new+:} false; then :
12111 if ${ac_cv_search_SSL_new+:} false; then :
12114 ac_cv_search_SSL_new=no
12116 rm conftest.$ac_ext
12117 LIBS=$ac_func_search_save_LIBS
12119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12120 $as_echo "$ac_cv_search_SSL_new" >&6; }
12121 ac_res=$ac_cv_search_SSL_new
12122 if test "$ac_res" != no; then :
12123 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12126 as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12130 for ac_func in SSL_clear_options SSL_get_current_compression X509_get_signature_nid
12132 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12133 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12134 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12135 cat >>confdefs.h <<_ACEOF
12136 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12142 # Functions introduced in OpenSSL 1.1.0. We used to check for
12143 # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
12144 # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
12145 # doesn't have these OpenSSL 1.1.0 functions. So check for individual
12147 for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL
12149 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12150 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12151 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12152 cat >>confdefs.h <<_ACEOF
12153 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12159 # OpenSSL versions before 1.1.0 required setting callback functions, for
12160 # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
12161 # function was removed.
12162 for ac_func in CRYPTO_lock
12164 ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
12165 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
12166 cat >>confdefs.h <<_ACEOF
12167 #define HAVE_CRYPTO_LOCK 1
12175 if test "$with_pam" = yes ; then
12176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
12177 $as_echo_n "checking for pam_start in -lpam... " >&6; }
12178 if ${ac_cv_lib_pam_pam_start+:} false; then :
12179 $as_echo_n "(cached) " >&6
12181 ac_check_lib_save_LIBS=$LIBS
12183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12184 /* end confdefs.h. */
12186 /* Override any GCC internal prototype to avoid an error.
12187 Use char because int might match the return type of a GCC
12188 builtin and then its argument prototype would still apply. */
12196 return pam_start ();
12201 if ac_fn_c_try_link "$LINENO"; then :
12202 ac_cv_lib_pam_pam_start=yes
12204 ac_cv_lib_pam_pam_start=no
12206 rm -f core conftest.err conftest.$ac_objext \
12207 conftest$ac_exeext conftest.$ac_ext
12208 LIBS=$ac_check_lib_save_LIBS
12210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
12211 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
12212 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
12213 cat >>confdefs.h <<_ACEOF
12214 #define HAVE_LIBPAM 1
12220 as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
12225 if test "$with_libxml" = yes ; then
12226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
12227 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
12228 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
12229 $as_echo_n "(cached) " >&6
12231 ac_check_lib_save_LIBS=$LIBS
12232 LIBS="-lxml2 $LIBS"
12233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12234 /* end confdefs.h. */
12236 /* Override any GCC internal prototype to avoid an error.
12237 Use char because int might match the return type of a GCC
12238 builtin and then its argument prototype would still apply. */
12242 char xmlSaveToBuffer ();
12246 return xmlSaveToBuffer ();
12251 if ac_fn_c_try_link "$LINENO"; then :
12252 ac_cv_lib_xml2_xmlSaveToBuffer=yes
12254 ac_cv_lib_xml2_xmlSaveToBuffer=no
12256 rm -f core conftest.err conftest.$ac_objext \
12257 conftest$ac_exeext conftest.$ac_ext
12258 LIBS=$ac_check_lib_save_LIBS
12260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
12261 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
12262 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
12263 cat >>confdefs.h <<_ACEOF
12264 #define HAVE_LIBXML2 1
12267 LIBS="-lxml2 $LIBS"
12270 as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
12275 if test "$with_libxslt" = yes ; then
12276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
12277 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
12278 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
12279 $as_echo_n "(cached) " >&6
12281 ac_check_lib_save_LIBS=$LIBS
12282 LIBS="-lxslt $LIBS"
12283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12284 /* end confdefs.h. */
12286 /* Override any GCC internal prototype to avoid an error.
12287 Use char because int might match the return type of a GCC
12288 builtin and then its argument prototype would still apply. */
12292 char xsltCleanupGlobals ();
12296 return xsltCleanupGlobals ();
12301 if ac_fn_c_try_link "$LINENO"; then :
12302 ac_cv_lib_xslt_xsltCleanupGlobals=yes
12304 ac_cv_lib_xslt_xsltCleanupGlobals=no
12306 rm -f core conftest.err conftest.$ac_objext \
12307 conftest$ac_exeext conftest.$ac_ext
12308 LIBS=$ac_check_lib_save_LIBS
12310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
12311 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
12312 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
12313 cat >>confdefs.h <<_ACEOF
12314 #define HAVE_LIBXSLT 1
12317 LIBS="-lxslt $LIBS"
12320 as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
12325 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
12326 if test "$with_ldap" = yes ; then
12328 if test "$PORTNAME" != "win32"; then
12329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12330 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12331 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12332 $as_echo_n "(cached) " >&6
12334 ac_check_lib_save_LIBS=$LIBS
12335 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12337 /* end confdefs.h. */
12339 /* Override any GCC internal prototype to avoid an error.
12340 Use char because int might match the return type of a GCC
12341 builtin and then its argument prototype would still apply. */
12349 return ldap_bind ();
12354 if ac_fn_c_try_link "$LINENO"; then :
12355 ac_cv_lib_ldap_ldap_bind=yes
12357 ac_cv_lib_ldap_ldap_bind=no
12359 rm -f core conftest.err conftest.$ac_objext \
12360 conftest$ac_exeext conftest.$ac_ext
12361 LIBS=$ac_check_lib_save_LIBS
12363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12364 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12365 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12366 cat >>confdefs.h <<_ACEOF
12367 #define HAVE_LIBLDAP 1
12370 LIBS="-lldap $LIBS"
12373 as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12376 LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12377 if test "$enable_thread_safety" = yes; then
12378 # on some platforms ldap_r fails to link without PTHREAD_LIBS
12379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
12380 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
12381 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
12382 $as_echo_n "(cached) " >&6
12384 ac_check_lib_save_LIBS=$LIBS
12385 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12387 /* end confdefs.h. */
12389 /* Override any GCC internal prototype to avoid an error.
12390 Use char because int might match the return type of a GCC
12391 builtin and then its argument prototype would still apply. */
12395 char ldap_simple_bind ();
12399 return ldap_simple_bind ();
12404 if ac_fn_c_try_link "$LINENO"; then :
12405 ac_cv_lib_ldap_r_ldap_simple_bind=yes
12407 ac_cv_lib_ldap_r_ldap_simple_bind=no
12409 rm -f core conftest.err conftest.$ac_objext \
12410 conftest$ac_exeext conftest.$ac_ext
12411 LIBS=$ac_check_lib_save_LIBS
12413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
12414 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
12415 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
12416 cat >>confdefs.h <<_ACEOF
12417 #define HAVE_LIBLDAP_R 1
12420 LIBS="-lldap_r $LIBS"
12423 as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
12426 LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12428 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12430 for ac_func in ldap_initialize
12432 ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
12433 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
12434 cat >>confdefs.h <<_ACEOF
12435 #define HAVE_LDAP_INITIALIZE 1
12442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12443 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12444 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12445 $as_echo_n "(cached) " >&6
12447 ac_check_lib_save_LIBS=$LIBS
12448 LIBS="-lwldap32 $LIBS"
12449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12450 /* end confdefs.h. */
12452 /* Override any GCC internal prototype to avoid an error.
12453 Use char because int might match the return type of a GCC
12454 builtin and then its argument prototype would still apply. */
12462 return ldap_bind ();
12467 if ac_fn_c_try_link "$LINENO"; then :
12468 ac_cv_lib_wldap32_ldap_bind=yes
12470 ac_cv_lib_wldap32_ldap_bind=no
12472 rm -f core conftest.err conftest.$ac_objext \
12473 conftest$ac_exeext conftest.$ac_ext
12474 LIBS=$ac_check_lib_save_LIBS
12476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12477 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12478 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12479 cat >>confdefs.h <<_ACEOF
12480 #define HAVE_LIBWLDAP32 1
12483 LIBS="-lwldap32 $LIBS"
12486 as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
12489 LDAP_LIBS_FE="-lwldap32"
12490 LDAP_LIBS_BE="-lwldap32"
12497 # for contrib/sepgsql
12498 if test "$with_selinux" = yes; then
12499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
12500 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
12501 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
12502 $as_echo_n "(cached) " >&6
12504 ac_check_lib_save_LIBS=$LIBS
12505 LIBS="-lselinux $LIBS"
12506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12507 /* end confdefs.h. */
12509 /* Override any GCC internal prototype to avoid an error.
12510 Use char because int might match the return type of a GCC
12511 builtin and then its argument prototype would still apply. */
12515 char security_compute_create_name ();
12519 return security_compute_create_name ();
12524 if ac_fn_c_try_link "$LINENO"; then :
12525 ac_cv_lib_selinux_security_compute_create_name=yes
12527 ac_cv_lib_selinux_security_compute_create_name=no
12529 rm -f core conftest.err conftest.$ac_objext \
12530 conftest$ac_exeext conftest.$ac_ext
12531 LIBS=$ac_check_lib_save_LIBS
12533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
12534 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
12535 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
12536 cat >>confdefs.h <<_ACEOF
12537 #define HAVE_LIBSELINUX 1
12540 LIBS="-lselinux $LIBS"
12543 as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
12548 # for contrib/uuid-ossp
12549 if test "$with_uuid" = bsd ; then
12550 # On BSD, the UUID functions are in libc
12551 ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
12552 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
12555 as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
12558 elif test "$with_uuid" = e2fs ; then
12559 # On macOS, the UUID functions are in libc
12560 ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
12561 if test "x$ac_cv_func_uuid_generate" = xyes; then :
12564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
12565 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
12566 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
12567 $as_echo_n "(cached) " >&6
12569 ac_check_lib_save_LIBS=$LIBS
12570 LIBS="-luuid $LIBS"
12571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12572 /* end confdefs.h. */
12574 /* Override any GCC internal prototype to avoid an error.
12575 Use char because int might match the return type of a GCC
12576 builtin and then its argument prototype would still apply. */
12580 char uuid_generate ();
12584 return uuid_generate ();
12589 if ac_fn_c_try_link "$LINENO"; then :
12590 ac_cv_lib_uuid_uuid_generate=yes
12592 ac_cv_lib_uuid_uuid_generate=no
12594 rm -f core conftest.err conftest.$ac_objext \
12595 conftest$ac_exeext conftest.$ac_ext
12596 LIBS=$ac_check_lib_save_LIBS
12598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
12599 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
12600 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
12603 as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
12608 elif test "$with_uuid" = ossp ; then
12609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
12610 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
12611 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
12612 $as_echo_n "(cached) " >&6
12614 ac_check_lib_save_LIBS=$LIBS
12615 LIBS="-lossp-uuid $LIBS"
12616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12617 /* end confdefs.h. */
12619 /* Override any GCC internal prototype to avoid an error.
12620 Use char because int might match the return type of a GCC
12621 builtin and then its argument prototype would still apply. */
12625 char uuid_export ();
12629 return uuid_export ();
12634 if ac_fn_c_try_link "$LINENO"; then :
12635 ac_cv_lib_ossp_uuid_uuid_export=yes
12637 ac_cv_lib_ossp_uuid_uuid_export=no
12639 rm -f core conftest.err conftest.$ac_objext \
12640 conftest$ac_exeext conftest.$ac_ext
12641 LIBS=$ac_check_lib_save_LIBS
12643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
12644 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
12645 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
12646 UUID_LIBS="-lossp-uuid"
12648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
12649 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
12650 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
12651 $as_echo_n "(cached) " >&6
12653 ac_check_lib_save_LIBS=$LIBS
12654 LIBS="-luuid $LIBS"
12655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12656 /* end confdefs.h. */
12658 /* Override any GCC internal prototype to avoid an error.
12659 Use char because int might match the return type of a GCC
12660 builtin and then its argument prototype would still apply. */
12664 char uuid_export ();
12668 return uuid_export ();
12673 if ac_fn_c_try_link "$LINENO"; then :
12674 ac_cv_lib_uuid_uuid_export=yes
12676 ac_cv_lib_uuid_uuid_export=no
12678 rm -f core conftest.err conftest.$ac_objext \
12679 conftest$ac_exeext conftest.$ac_ext
12680 LIBS=$ac_check_lib_save_LIBS
12682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
12683 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
12684 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
12687 as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
12700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
12701 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
12702 if ${ac_cv_header_stdbool_h+:} false; then :
12703 $as_echo_n "(cached) " >&6
12705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12706 /* end confdefs.h. */
12708 #include <stdbool.h>
12710 "error: bool is not defined"
12713 "error: false is not defined"
12716 "error: false is not 0"
12719 "error: true is not defined"
12722 "error: true is not 1"
12724 #ifndef __bool_true_false_are_defined
12725 "error: __bool_true_false_are_defined is not defined"
12728 struct s { _Bool s: 1; _Bool t; } s;
12730 char a[true == 1 ? 1 : -1];
12731 char b[false == 0 ? 1 : -1];
12732 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
12733 char d[(bool) 0.5 == true ? 1 : -1];
12734 /* See body of main program for 'e'. */
12735 char f[(_Bool) 0.0 == false ? 1 : -1];
12737 char h[sizeof (_Bool)];
12738 char i[sizeof s.t];
12739 enum { j = false, k = true, l = false * true, m = true * 256 };
12740 /* The following fails for
12741 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
12743 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
12744 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
12745 /* Catch a bug in an HP-UX C compiler. See
12746 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
12747 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
12759 /* Refer to every declared value, to avoid compiler optimizations. */
12760 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
12761 + !m + !n + !o + !p + !q + !pq);
12767 if ac_fn_c_try_compile "$LINENO"; then :
12768 ac_cv_header_stdbool_h=yes
12770 ac_cv_header_stdbool_h=no
12772 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
12775 $as_echo "$ac_cv_header_stdbool_h" >&6; }
12776 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
12777 if test "x$ac_cv_type__Bool" = xyes; then :
12779 cat >>confdefs.h <<_ACEOF
12780 #define HAVE__BOOL 1
12787 if test $ac_cv_header_stdbool_h = yes; then
12789 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
12794 for 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
12796 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12797 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12798 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12799 cat >>confdefs.h <<_ACEOF
12800 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12808 # On BSD, test for net/if.h will fail unless sys/socket.h
12809 # is included first.
12810 for ac_header in net/if.h
12812 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
12813 #include <sys/socket.h>
12816 if test "x$ac_cv_header_net_if_h" = xyes; then :
12817 cat >>confdefs.h <<_ACEOF
12818 #define HAVE_NET_IF_H 1
12826 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
12827 # is included first.
12828 for ac_header in sys/ucred.h
12830 ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
12831 #include <sys/param.h>
12834 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
12835 cat >>confdefs.h <<_ACEOF
12836 #define HAVE_SYS_UCRED_H 1
12844 # At least on IRIX, test for netinet/tcp.h will fail unless
12845 # netinet/in.h is included first.
12846 for ac_header in netinet/tcp.h
12848 ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
12849 #include <netinet/in.h>
12852 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
12853 cat >>confdefs.h <<_ACEOF
12854 #define HAVE_NETINET_TCP_H 1
12862 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
12863 for ac_header in readline/readline.h
12865 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12866 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12867 cat >>confdefs.h <<_ACEOF
12868 #define HAVE_READLINE_READLINE_H 1
12872 for ac_header in readline.h
12874 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12875 if test "x$ac_cv_header_readline_h" = xyes; then :
12876 cat >>confdefs.h <<_ACEOF
12877 #define HAVE_READLINE_H 1
12881 as_fn_error $? "readline header not found
12882 If you have readline already installed, see config.log for details on the
12883 failure. It is possible the compiler isn't looking in the proper directory.
12884 Use --without-readline to disable readline support." "$LINENO" 5
12893 for ac_header in readline/history.h
12895 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
12896 if test "x$ac_cv_header_readline_history_h" = xyes; then :
12897 cat >>confdefs.h <<_ACEOF
12898 #define HAVE_READLINE_HISTORY_H 1
12902 for ac_header in history.h
12904 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12905 if test "x$ac_cv_header_history_h" = xyes; then :
12906 cat >>confdefs.h <<_ACEOF
12907 #define HAVE_HISTORY_H 1
12911 as_fn_error $? "history header not found
12912 If you have readline already installed, see config.log for details on the
12913 failure. It is possible the compiler isn't looking in the proper directory.
12914 Use --without-readline to disable readline support." "$LINENO" 5
12925 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
12926 # Some installations of libedit usurp /usr/include/readline/, which seems
12927 # bad practice, since in combined installations readline will have its headers
12928 # there. We might have to resort to AC_EGREP checks to make sure we found
12929 # the proper header...
12930 for ac_header in editline/readline.h
12932 ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
12933 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
12934 cat >>confdefs.h <<_ACEOF
12935 #define HAVE_EDITLINE_READLINE_H 1
12939 for ac_header in readline.h
12941 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12942 if test "x$ac_cv_header_readline_h" = xyes; then :
12943 cat >>confdefs.h <<_ACEOF
12944 #define HAVE_READLINE_H 1
12948 for ac_header in readline/readline.h
12950 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12951 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12952 cat >>confdefs.h <<_ACEOF
12953 #define HAVE_READLINE_READLINE_H 1
12957 as_fn_error $? "readline header not found
12958 If you have libedit already installed, see config.log for details on the
12959 failure. It is possible the compiler isn't looking in the proper directory.
12960 Use --without-readline to disable libedit support." "$LINENO" 5
12973 # Note: in a libedit installation, history.h is sometimes a dummy, and may
12974 # not be there at all. Hence, don't complain if not found. We must check
12975 # though, since in yet other versions it is an independent header.
12976 for ac_header in editline/history.h
12978 ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
12979 if test "x$ac_cv_header_editline_history_h" = xyes; then :
12980 cat >>confdefs.h <<_ACEOF
12981 #define HAVE_EDITLINE_HISTORY_H 1
12985 for ac_header in history.h
12987 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12988 if test "x$ac_cv_header_history_h" = xyes; then :
12989 cat >>confdefs.h <<_ACEOF
12990 #define HAVE_HISTORY_H 1
12994 for ac_header in readline/history.h
12996 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
12997 if test "x$ac_cv_header_readline_history_h" = xyes; then :
12998 cat >>confdefs.h <<_ACEOF
12999 #define HAVE_READLINE_HISTORY_H 1
13016 if test "$with_zlib" = yes; then
13017 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
13018 if test "x$ac_cv_header_zlib_h" = xyes; then :
13021 as_fn_error $? "zlib header not found
13022 If you have zlib already installed, see config.log for details on the
13023 failure. It is possible the compiler isn't looking in the proper directory.
13024 Use --without-zlib to disable zlib support." "$LINENO" 5
13030 if test "$with_gssapi" = yes ; then
13031 for ac_header in gssapi/gssapi.h
13033 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
13034 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
13035 cat >>confdefs.h <<_ACEOF
13036 #define HAVE_GSSAPI_GSSAPI_H 1
13040 for ac_header in gssapi.h
13042 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
13043 if test "x$ac_cv_header_gssapi_h" = xyes; then :
13044 cat >>confdefs.h <<_ACEOF
13045 #define HAVE_GSSAPI_H 1
13049 as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
13060 if test "$with_openssl" = yes ; then
13061 ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
13062 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
13065 as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
13069 ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
13070 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
13073 as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
13079 if test "$with_pam" = yes ; then
13080 for ac_header in security/pam_appl.h
13082 ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
13083 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
13084 cat >>confdefs.h <<_ACEOF
13085 #define HAVE_SECURITY_PAM_APPL_H 1
13089 for ac_header in pam/pam_appl.h
13091 ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
13092 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
13093 cat >>confdefs.h <<_ACEOF
13094 #define HAVE_PAM_PAM_APPL_H 1
13098 as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
13109 if test "$with_bsd_auth" = yes ; then
13110 ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
13111 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
13114 as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
13120 if test "$with_systemd" = yes ; then
13121 ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
13122 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
13125 as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
13131 if test "$with_libxml" = yes ; then
13132 ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
13133 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
13136 as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
13142 if test "$with_libxslt" = yes ; then
13143 ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
13144 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
13147 as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
13153 if test "$with_ldap" = yes ; then
13154 if test "$PORTNAME" != "win32"; then
13155 for ac_header in ldap.h
13157 ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
13158 if test "x$ac_cv_header_ldap_h" = xyes; then :
13159 cat >>confdefs.h <<_ACEOF
13160 #define HAVE_LDAP_H 1
13164 as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
13169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
13170 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
13171 if ${pgac_cv_ldap_safe+:} false; then :
13172 $as_echo_n "(cached) " >&6
13174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13175 /* end confdefs.h. */
13177 #if !defined(LDAP_VENDOR_VERSION) || \
13178 (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
13179 LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
13190 if ac_fn_c_try_compile "$LINENO"; then :
13191 pgac_cv_ldap_safe=yes
13193 pgac_cv_ldap_safe=no
13195 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
13198 $as_echo "$pgac_cv_ldap_safe" >&6; }
13200 if test "$pgac_cv_ldap_safe" != yes; then
13201 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
13202 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13203 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13204 *** also uses LDAP will crash on exit." >&5
13205 $as_echo "$as_me: WARNING:
13206 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13207 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13208 *** also uses LDAP will crash on exit." >&2;}
13211 for ac_header in winldap.h
13213 ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
13214 #include <windows.h>
13217 if test "x$ac_cv_header_winldap_h" = xyes; then :
13218 cat >>confdefs.h <<_ACEOF
13219 #define HAVE_WINLDAP_H 1
13223 as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
13231 if test "$with_bonjour" = yes ; then
13232 ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
13233 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
13236 as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
13242 # for contrib/uuid-ossp
13243 if test "$with_uuid" = bsd ; then
13244 for ac_header in uuid.h
13246 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13247 if test "x$ac_cv_header_uuid_h" = xyes; then :
13248 cat >>confdefs.h <<_ACEOF
13249 #define HAVE_UUID_H 1
13251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13252 /* end confdefs.h. */
13256 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13257 $EGREP "uuid_to_string" >/dev/null 2>&1; then :
13260 as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
13265 as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
13270 elif test "$with_uuid" = e2fs ; then
13271 for ac_header in uuid/uuid.h
13273 ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
13274 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
13275 cat >>confdefs.h <<_ACEOF
13276 #define HAVE_UUID_UUID_H 1
13278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13279 /* end confdefs.h. */
13280 #include <uuid/uuid.h>
13283 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13284 $EGREP "uuid_generate" >/dev/null 2>&1; then :
13287 as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
13292 for ac_header in uuid.h
13294 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13295 if test "x$ac_cv_header_uuid_h" = xyes; then :
13296 cat >>confdefs.h <<_ACEOF
13297 #define HAVE_UUID_H 1
13299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13300 /* end confdefs.h. */
13304 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13305 $EGREP "uuid_generate" >/dev/null 2>&1; then :
13308 as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
13313 as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
13322 elif test "$with_uuid" = ossp ; then
13323 for ac_header in ossp/uuid.h
13325 ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
13326 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
13327 cat >>confdefs.h <<_ACEOF
13328 #define HAVE_OSSP_UUID_H 1
13330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13331 /* end confdefs.h. */
13332 #include <ossp/uuid.h>
13335 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13336 $EGREP "uuid_export" >/dev/null 2>&1; then :
13339 as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
13344 for ac_header in uuid.h
13346 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13347 if test "x$ac_cv_header_uuid_h" = xyes; then :
13348 cat >>confdefs.h <<_ACEOF
13349 #define HAVE_UUID_H 1
13351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13352 /* end confdefs.h. */
13356 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13357 $EGREP "uuid_export" >/dev/null 2>&1; then :
13360 as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
13365 as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
13376 if test "$PORTNAME" = "win32" ; then
13377 for ac_header in crtdefs.h
13379 ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
13380 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
13381 cat >>confdefs.h <<_ACEOF
13382 #define HAVE_CRTDEFS_H 1
13392 ## Types, structures, compiler characteristics
13395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13396 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13397 if ${ac_cv_c_bigendian+:} false; then :
13398 $as_echo_n "(cached) " >&6
13400 ac_cv_c_bigendian=unknown
13401 # See if we're dealing with a universal compiler.
13402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13403 /* end confdefs.h. */
13404 #ifndef __APPLE_CC__
13405 not a universal capable compiler
13410 if ac_fn_c_try_compile "$LINENO"; then :
13412 # Check for potential -arch flags. It is not universal unless
13413 # there are at least two -arch flags with different values.
13416 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13417 if test -n "$ac_prev"; then
13419 i?86 | x86_64 | ppc | ppc64)
13420 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13423 ac_cv_c_bigendian=universal
13429 elif test "x$ac_word" = "x-arch"; then
13434 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13435 if test $ac_cv_c_bigendian = unknown; then
13436 # See if sys/param.h defines the BYTE_ORDER macro.
13437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13438 /* end confdefs.h. */
13439 #include <sys/types.h>
13440 #include <sys/param.h>
13445 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13446 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13448 bogus endian macros
13455 if ac_fn_c_try_compile "$LINENO"; then :
13456 # It does; now see whether it defined to BIG_ENDIAN or not.
13457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13458 /* end confdefs.h. */
13459 #include <sys/types.h>
13460 #include <sys/param.h>
13465 #if BYTE_ORDER != BIG_ENDIAN
13473 if ac_fn_c_try_compile "$LINENO"; then :
13474 ac_cv_c_bigendian=yes
13476 ac_cv_c_bigendian=no
13478 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13480 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13482 if test $ac_cv_c_bigendian = unknown; then
13483 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13485 /* end confdefs.h. */
13486 #include <limits.h>
13491 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13492 bogus endian macros
13499 if ac_fn_c_try_compile "$LINENO"; then :
13500 # It does; now see whether it defined to _BIG_ENDIAN or not.
13501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13502 /* end confdefs.h. */
13503 #include <limits.h>
13508 #ifndef _BIG_ENDIAN
13516 if ac_fn_c_try_compile "$LINENO"; then :
13517 ac_cv_c_bigendian=yes
13519 ac_cv_c_bigendian=no
13521 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13523 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13525 if test $ac_cv_c_bigendian = unknown; then
13526 # Compile a test program.
13527 if test "$cross_compiling" = yes; then :
13528 # Try to guess by grepping values from an object file.
13529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13530 /* end confdefs.h. */
13531 short int ascii_mm[] =
13532 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13533 short int ascii_ii[] =
13534 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13535 int use_ascii (int i) {
13536 return ascii_mm[i] + ascii_ii[i];
13538 short int ebcdic_ii[] =
13539 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13540 short int ebcdic_mm[] =
13541 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13542 int use_ebcdic (int i) {
13543 return ebcdic_mm[i] + ebcdic_ii[i];
13550 return use_ascii (foo) == use_ebcdic (foo);
13555 if ac_fn_c_try_compile "$LINENO"; then :
13556 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13557 ac_cv_c_bigendian=yes
13559 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13560 if test "$ac_cv_c_bigendian" = unknown; then
13561 ac_cv_c_bigendian=no
13563 # finding both strings is unlikely to happen, but who knows?
13564 ac_cv_c_bigendian=unknown
13568 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13571 /* end confdefs.h. */
13572 $ac_includes_default
13577 /* Are we little or big endian? From Harbison&Steele. */
13581 char c[sizeof (long int)];
13584 return u.c[sizeof (long int) - 1] == 1;
13590 if ac_fn_c_try_run "$LINENO"; then :
13591 ac_cv_c_bigendian=no
13593 ac_cv_c_bigendian=yes
13595 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13596 conftest.$ac_objext conftest.beam conftest.$ac_ext
13601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13602 $as_echo "$ac_cv_c_bigendian" >&6; }
13603 case $ac_cv_c_bigendian in #(
13605 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13611 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13615 as_fn_error $? "unknown endianness
13616 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
13620 $as_echo_n "checking for inline... " >&6; }
13621 if ${ac_cv_c_inline+:} false; then :
13622 $as_echo_n "(cached) " >&6
13625 for ac_kw in inline __inline__ __inline; do
13626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13627 /* end confdefs.h. */
13628 #ifndef __cplusplus
13630 static $ac_kw foo_t static_foo () {return 0; }
13631 $ac_kw foo_t foo () {return 0; }
13635 if ac_fn_c_try_compile "$LINENO"; then :
13636 ac_cv_c_inline=$ac_kw
13638 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13639 test "$ac_cv_c_inline" != no && break
13643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
13644 $as_echo "$ac_cv_c_inline" >&6; }
13646 case $ac_cv_c_inline in
13649 case $ac_cv_c_inline in
13651 *) ac_val=$ac_cv_c_inline;;
13653 cat >>confdefs.h <<_ACEOF
13654 #ifndef __cplusplus
13655 #define inline $ac_val
13661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
13662 $as_echo_n "checking for printf format archetype... " >&6; }
13663 if ${pgac_cv_printf_archetype+:} false; then :
13664 $as_echo_n "(cached) " >&6
13666 pgac_cv_printf_archetype=gnu_printf
13667 ac_save_c_werror_flag=$ac_c_werror_flag
13668 ac_c_werror_flag=yes
13669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13670 /* end confdefs.h. */
13671 extern void pgac_write(int ignore, const char *fmt,...)
13672 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
13676 pgac_write(0, "error %s: %m", "foo");
13681 if ac_fn_c_try_compile "$LINENO"; then :
13682 ac_archetype_ok=yes
13686 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13687 ac_c_werror_flag=$ac_save_c_werror_flag
13689 if [ "$ac_archetype_ok" = no ]; then
13690 pgac_cv_printf_archetype=__syslog__
13691 ac_save_c_werror_flag=$ac_c_werror_flag
13692 ac_c_werror_flag=yes
13693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13694 /* end confdefs.h. */
13695 extern void pgac_write(int ignore, const char *fmt,...)
13696 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
13700 pgac_write(0, "error %s: %m", "foo");
13705 if ac_fn_c_try_compile "$LINENO"; then :
13706 ac_archetype_ok=yes
13710 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13711 ac_c_werror_flag=$ac_save_c_werror_flag
13713 if [ "$ac_archetype_ok" = no ]; then
13714 pgac_cv_printf_archetype=printf
13718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
13719 $as_echo "$pgac_cv_printf_archetype" >&6; }
13721 cat >>confdefs.h <<_ACEOF
13722 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
13727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
13728 $as_echo_n "checking for flexible array members... " >&6; }
13729 if ${ac_cv_c_flexmember+:} false; then :
13730 $as_echo_n "(cached) " >&6
13732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13733 /* end confdefs.h. */
13734 #include <stdlib.h>
13736 #include <stddef.h>
13737 struct s { int n; double d[]; };
13741 int m = getchar ();
13742 struct s *p = malloc (offsetof (struct s, d)
13743 + m * sizeof (double));
13745 return p->d != (double *) NULL;
13750 if ac_fn_c_try_compile "$LINENO"; then :
13751 ac_cv_c_flexmember=yes
13753 ac_cv_c_flexmember=no
13755 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
13758 $as_echo "$ac_cv_c_flexmember" >&6; }
13759 if test $ac_cv_c_flexmember = yes; then
13761 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
13764 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
13768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
13769 $as_echo_n "checking for signed types... " >&6; }
13770 if ${pgac_cv_c_signed+:} false; then :
13771 $as_echo_n "(cached) " >&6
13773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13774 /* end confdefs.h. */
13779 signed char c; signed short s; signed int i;
13784 if ac_fn_c_try_compile "$LINENO"; then :
13785 pgac_cv_c_signed=yes
13787 pgac_cv_c_signed=no
13789 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
13792 $as_echo "$pgac_cv_c_signed" >&6; }
13793 if test x"$pgac_cv_c_signed" = xno ; then
13795 $as_echo "#define signed /**/" >>confdefs.h
13798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
13799 $as_echo_n "checking for __func__... " >&6; }
13800 if ${pgac_cv_funcname_func_support+:} false; then :
13801 $as_echo_n "(cached) " >&6
13803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13804 /* end confdefs.h. */
13809 printf("%s\n", __func__);
13814 if ac_fn_c_try_compile "$LINENO"; then :
13815 pgac_cv_funcname_func_support=yes
13817 pgac_cv_funcname_func_support=no
13819 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
13822 $as_echo "$pgac_cv_funcname_func_support" >&6; }
13823 if test x"$pgac_cv_funcname_func_support" = xyes ; then
13825 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
13828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
13829 $as_echo_n "checking for __FUNCTION__... " >&6; }
13830 if ${pgac_cv_funcname_function_support+:} false; then :
13831 $as_echo_n "(cached) " >&6
13833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13834 /* end confdefs.h. */
13839 printf("%s\n", __FUNCTION__);
13844 if ac_fn_c_try_compile "$LINENO"; then :
13845 pgac_cv_funcname_function_support=yes
13847 pgac_cv_funcname_function_support=no
13849 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
13852 $as_echo "$pgac_cv_funcname_function_support" >&6; }
13853 if test x"$pgac_cv_funcname_function_support" = xyes ; then
13855 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
13859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
13860 $as_echo_n "checking for _Static_assert... " >&6; }
13861 if ${pgac_cv__static_assert+:} false; then :
13862 $as_echo_n "(cached) " >&6
13864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13865 /* end confdefs.h. */
13870 ({ _Static_assert(1, "foo"); })
13875 if ac_fn_c_try_link "$LINENO"; then :
13876 pgac_cv__static_assert=yes
13878 pgac_cv__static_assert=no
13880 rm -f core conftest.err conftest.$ac_objext \
13881 conftest$ac_exeext conftest.$ac_ext
13883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
13884 $as_echo "$pgac_cv__static_assert" >&6; }
13885 if test x"$pgac_cv__static_assert" = xyes ; then
13887 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
13890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
13891 $as_echo_n "checking for typeof... " >&6; }
13892 if ${pgac_cv_c_typeof+:} false; then :
13893 $as_echo_n "(cached) " >&6
13895 pgac_cv_c_typeof=no
13896 for pgac_kw in typeof __typeof__ decltype; do
13897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13898 /* end confdefs.h. */
13911 if ac_fn_c_try_compile "$LINENO"; then :
13912 pgac_cv_c_typeof=$pgac_kw
13914 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13915 test "$pgac_cv_c_typeof" != no && break
13918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
13919 $as_echo "$pgac_cv_c_typeof" >&6; }
13920 if test "$pgac_cv_c_typeof" != no; then
13922 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
13924 if test "$pgac_cv_c_typeof" != typeof; then
13926 cat >>confdefs.h <<_ACEOF
13927 #define typeof $pgac_cv_c_typeof
13932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
13933 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
13934 if ${pgac_cv__types_compatible+:} false; then :
13935 $as_echo_n "(cached) " >&6
13937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13938 /* end confdefs.h. */
13943 int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
13948 if ac_fn_c_try_compile "$LINENO"; then :
13949 pgac_cv__types_compatible=yes
13951 pgac_cv__types_compatible=no
13953 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
13956 $as_echo "$pgac_cv__types_compatible" >&6; }
13957 if test x"$pgac_cv__types_compatible" = xyes ; then
13959 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
13962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
13963 $as_echo_n "checking for __builtin_bswap16... " >&6; }
13964 if ${pgac_cv__builtin_bswap16+:} false; then :
13965 $as_echo_n "(cached) " >&6
13967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13968 /* end confdefs.h. */
13969 static unsigned long int x = __builtin_bswap16(0xaabb);
13972 if ac_fn_c_try_compile "$LINENO"; then :
13973 pgac_cv__builtin_bswap16=yes
13975 pgac_cv__builtin_bswap16=no
13977 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
13980 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
13981 if test x"$pgac_cv__builtin_bswap16" = xyes ; then
13983 $as_echo "#define HAVE__BUILTIN_BSWAP16 1" >>confdefs.h
13986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
13987 $as_echo_n "checking for __builtin_bswap32... " >&6; }
13988 if ${pgac_cv__builtin_bswap32+:} false; then :
13989 $as_echo_n "(cached) " >&6
13991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13992 /* end confdefs.h. */
13993 static unsigned long int x = __builtin_bswap32(0xaabbccdd);
13996 if ac_fn_c_try_compile "$LINENO"; then :
13997 pgac_cv__builtin_bswap32=yes
13999 pgac_cv__builtin_bswap32=no
14001 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
14004 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
14005 if test x"$pgac_cv__builtin_bswap32" = xyes ; then
14007 $as_echo "#define HAVE__BUILTIN_BSWAP32 1" >>confdefs.h
14010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
14011 $as_echo_n "checking for __builtin_bswap64... " >&6; }
14012 if ${pgac_cv__builtin_bswap64+:} false; then :
14013 $as_echo_n "(cached) " >&6
14015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14016 /* end confdefs.h. */
14017 static unsigned long int x = __builtin_bswap64(0xaabbccddeeff0011);
14020 if ac_fn_c_try_compile "$LINENO"; then :
14021 pgac_cv__builtin_bswap64=yes
14023 pgac_cv__builtin_bswap64=no
14025 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
14028 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
14029 if test x"$pgac_cv__builtin_bswap64" = xyes ; then
14031 $as_echo "#define HAVE__BUILTIN_BSWAP64 1" >>confdefs.h
14034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
14035 $as_echo_n "checking for __builtin_constant_p... " >&6; }
14036 if ${pgac_cv__builtin_constant_p+:} false; then :
14037 $as_echo_n "(cached) " >&6
14039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14040 /* end confdefs.h. */
14042 static int y[__builtin_constant_p(x) ? x : 1];
14043 static int z[__builtin_constant_p("string literal") ? 1 : x];
14047 if ac_fn_c_try_compile "$LINENO"; then :
14048 pgac_cv__builtin_constant_p=yes
14050 pgac_cv__builtin_constant_p=no
14052 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
14055 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
14056 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
14058 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
14061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
14062 $as_echo_n "checking for __builtin_unreachable... " >&6; }
14063 if ${pgac_cv__builtin_unreachable+:} false; then :
14064 $as_echo_n "(cached) " >&6
14066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14067 /* end confdefs.h. */
14072 __builtin_unreachable();
14077 if ac_fn_c_try_link "$LINENO"; then :
14078 pgac_cv__builtin_unreachable=yes
14080 pgac_cv__builtin_unreachable=no
14082 rm -f core conftest.err conftest.$ac_objext \
14083 conftest$ac_exeext conftest.$ac_ext
14085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
14086 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
14087 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
14089 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
14092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
14093 $as_echo_n "checking for computed goto support... " >&6; }
14094 if ${pgac_cv_computed_goto+:} false; then :
14095 $as_echo_n "(cached) " >&6
14097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14098 /* end confdefs.h. */
14103 void *labeladdrs[] = {&&my_label};
14104 goto *labeladdrs[0];
14112 if ac_fn_c_try_compile "$LINENO"; then :
14113 pgac_cv_computed_goto=yes
14115 pgac_cv_computed_goto=no
14117 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
14120 $as_echo "$pgac_cv_computed_goto" >&6; }
14121 if test x"$pgac_cv_computed_goto" = xyes ; then
14123 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
14126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
14127 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
14128 if ${ac_cv_struct_tm+:} false; then :
14129 $as_echo_n "(cached) " >&6
14131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14132 /* end confdefs.h. */
14133 #include <sys/types.h>
14140 int *p = &tm.tm_sec;
14146 if ac_fn_c_try_compile "$LINENO"; then :
14147 ac_cv_struct_tm=time.h
14149 ac_cv_struct_tm=sys/time.h
14151 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
14154 $as_echo "$ac_cv_struct_tm" >&6; }
14155 if test $ac_cv_struct_tm = sys/time.h; then
14157 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
14161 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14162 #include <$ac_cv_struct_tm>
14165 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
14167 cat >>confdefs.h <<_ACEOF
14168 #define HAVE_STRUCT_TM_TM_ZONE 1
14174 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14176 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
14179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14180 $as_echo_n "checking for tzname... " >&6; }
14181 if ${ac_cv_var_tzname+:} false; then :
14182 $as_echo_n "(cached) " >&6
14184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14185 /* end confdefs.h. */
14186 #include <stdlib.h>
14188 #ifndef tzname /* For SGI. */
14189 extern char *tzname[]; /* RS6000 and others reject char **tzname. */
14200 if ac_fn_c_try_link "$LINENO"; then :
14201 ac_cv_var_tzname=yes
14203 ac_cv_var_tzname=no
14205 rm -f core conftest.err conftest.$ac_objext \
14206 conftest$ac_exeext conftest.$ac_ext
14208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14209 $as_echo "$ac_cv_var_tzname" >&6; }
14210 if test $ac_cv_var_tzname = yes; then
14212 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
14216 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14217 #ifdef HAVE_SYS_IPC_H
14218 #include <sys/ipc.h>
14220 #ifdef HAVE_SYS_SEM_H
14221 #include <sys/sem.h>
14224 if test "x$ac_cv_type_union_semun" = xyes; then :
14226 cat >>confdefs.h <<_ACEOF
14227 #define HAVE_UNION_SEMUN 1
14233 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
14234 #ifdef HAVE_SYS_UN_H
14235 #include <sys/un.h>
14239 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
14241 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
14245 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
14246 #include <sys/socket.h>
14249 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
14251 cat >>confdefs.h <<_ACEOF
14252 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
14258 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
14259 #include <sys/socket.h>
14262 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
14264 cat >>confdefs.h <<_ACEOF
14265 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
14270 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
14271 #include <sys/socket.h>
14274 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
14276 cat >>confdefs.h <<_ACEOF
14277 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
14282 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
14283 #include <sys/socket.h>
14286 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
14288 cat >>confdefs.h <<_ACEOF
14289 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
14294 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
14295 #include <sys/socket.h>
14298 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
14300 cat >>confdefs.h <<_ACEOF
14301 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
14306 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14307 #include <sys/socket.h>
14310 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14312 cat >>confdefs.h <<_ACEOF
14313 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14319 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
14320 #include <sys/socket.h>
14324 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
14326 cat >>confdefs.h <<_ACEOF
14327 #define HAVE_STRUCT_ADDRINFO 1
14334 ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
14335 if test "x$ac_cv_type_intptr_t" = xyes; then :
14337 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
14340 for ac_type in 'int' 'long int' 'long long int'; do
14341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14342 /* end confdefs.h. */
14343 $ac_includes_default
14347 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14348 test_array [0] = 0;
14349 return test_array [0];
14355 if ac_fn_c_try_compile "$LINENO"; then :
14357 cat >>confdefs.h <<_ACEOF
14358 #define intptr_t $ac_type
14363 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14364 test -z "$ac_type" && break
14370 ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
14371 if test "x$ac_cv_type_uintptr_t" = xyes; then :
14373 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
14376 for ac_type in 'unsigned int' 'unsigned long int' \
14377 'unsigned long long int'; do
14378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14379 /* end confdefs.h. */
14380 $ac_includes_default
14384 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14385 test_array [0] = 0;
14386 return test_array [0];
14392 if ac_fn_c_try_compile "$LINENO"; then :
14394 cat >>confdefs.h <<_ACEOF
14395 #define uintptr_t $ac_type
14400 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14401 test -z "$ac_type" && break
14407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
14408 $as_echo_n "checking for unsigned long long int... " >&6; }
14409 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
14410 $as_echo_n "(cached) " >&6
14412 ac_cv_type_unsigned_long_long_int=yes
14413 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14415 /* end confdefs.h. */
14417 /* For now, do not test the preprocessor; as of 2007 there are too many
14418 implementations with broken preprocessors. Perhaps this can
14419 be revisited in 2012. In the meantime, code should not expect
14420 #if to work with literals wider than 32 bits. */
14421 /* Test literals. */
14422 long long int ll = 9223372036854775807ll;
14423 long long int nll = -9223372036854775807LL;
14424 unsigned long long int ull = 18446744073709551615ULL;
14425 /* Test constant expressions. */
14426 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
14428 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
14434 /* Test availability of runtime routines for shift and division. */
14435 long long int llmax = 9223372036854775807ll;
14436 unsigned long long int ullmax = 18446744073709551615ull;
14437 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
14438 | (llmax / ll) | (llmax % ll)
14439 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
14440 | (ullmax / ull) | (ullmax % ull));
14446 if ac_fn_c_try_link "$LINENO"; then :
14449 ac_cv_type_unsigned_long_long_int=no
14451 rm -f core conftest.err conftest.$ac_objext \
14452 conftest$ac_exeext conftest.$ac_ext
14455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
14456 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
14457 if test $ac_cv_type_unsigned_long_long_int = yes; then
14459 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
14465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
14466 $as_echo_n "checking for long long int... " >&6; }
14467 if ${ac_cv_type_long_long_int+:} false; then :
14468 $as_echo_n "(cached) " >&6
14470 ac_cv_type_long_long_int=yes
14471 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14472 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
14473 if test $ac_cv_type_long_long_int = yes; then
14474 if test "$cross_compiling" = yes; then :
14477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14478 /* end confdefs.h. */
14479 #include <limits.h>
14482 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
14483 # define LLONG_MAX (HALF - 1 + HALF)
14488 long long int n = 1;
14492 long long int m = n << i;
14495 if (LLONG_MAX / 2 < m)
14503 if ac_fn_c_try_run "$LINENO"; then :
14506 ac_cv_type_long_long_int=no
14508 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14509 conftest.$ac_objext conftest.beam conftest.$ac_ext
14515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
14516 $as_echo "$ac_cv_type_long_long_int" >&6; }
14517 if test $ac_cv_type_long_long_int = yes; then
14519 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
14524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
14525 $as_echo_n "checking for locale_t... " >&6; }
14526 if ${pgac_cv_type_locale_t+:} false; then :
14527 $as_echo_n "(cached) " >&6
14529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14530 /* end confdefs.h. */
14531 #include <locale.h>
14541 if ac_fn_c_try_compile "$LINENO"; then :
14542 pgac_cv_type_locale_t=yes
14544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14545 /* end confdefs.h. */
14546 #include <xlocale.h>
14556 if ac_fn_c_try_compile "$LINENO"; then :
14557 pgac_cv_type_locale_t='yes (in xlocale.h)'
14559 pgac_cv_type_locale_t=no
14561 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14563 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
14566 $as_echo "$pgac_cv_type_locale_t" >&6; }
14567 if test "$pgac_cv_type_locale_t" != no; then
14569 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
14572 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
14574 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
14578 # MSVC doesn't cope well with defining restrict to __restrict, the
14579 # spelling it understands, because it conflicts with
14580 # __declspec(restrict). Therefore we define pg_restrict to the
14581 # appropriate definition, which presumably won't conflict.
14583 # Allow platforms with buggy compilers to force restrict to not be
14584 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
14586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14587 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
14588 if ${ac_cv_c_restrict+:} false; then :
14589 $as_echo_n "(cached) " >&6
14591 ac_cv_c_restrict=no
14592 # The order here caters to the fact that C++ does not require restrict.
14593 for ac_kw in __restrict __restrict__ _Restrict restrict; do
14594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14595 /* end confdefs.h. */
14596 typedef int * int_ptr;
14597 int foo (int_ptr $ac_kw ip) {
14604 int * $ac_kw t = s;
14611 if ac_fn_c_try_compile "$LINENO"; then :
14612 ac_cv_c_restrict=$ac_kw
14614 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14615 test "$ac_cv_c_restrict" != no && break
14619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14620 $as_echo "$ac_cv_c_restrict" >&6; }
14622 case $ac_cv_c_restrict in
14624 no) $as_echo "#define restrict /**/" >>confdefs.h
14626 *) cat >>confdefs.h <<_ACEOF
14627 #define restrict $ac_cv_c_restrict
14632 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
14635 pg_restrict="$ac_cv_c_restrict"
14638 cat >>confdefs.h <<_ACEOF
14639 #define pg_restrict $pg_restrict
14643 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
14644 #include <sys/param.h>
14645 #ifdef HAVE_SYS_UCRED_H
14646 #include <sys/ucred.h>
14649 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
14651 cat >>confdefs.h <<_ACEOF
14652 #define HAVE_STRUCT_CMSGCRED 1
14659 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
14660 #include <getopt.h>
14663 if test "x$ac_cv_type_struct_option" = xyes; then :
14665 cat >>confdefs.h <<_ACEOF
14666 #define HAVE_STRUCT_OPTION 1
14673 if test "$with_zlib" = yes; then
14674 # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
14675 # did not). While we could work around the lack of z_streamp, it
14676 # seems unwise to encourage people to use such old zlib versions...
14677 ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
14679 if test "x$ac_cv_type_z_streamp" = xyes; then :
14682 as_fn_error $? "zlib version is too old
14683 Use --without-zlib to disable zlib support." "$LINENO" 5
14688 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
14691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
14692 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
14693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14694 /* end confdefs.h. */
14699 int a = 0; int *p = &a; int r;
14700 __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
14705 if ac_fn_c_try_compile "$LINENO"; then :
14706 pgac_cv_have_ppc_mutex_hint=yes
14708 pgac_cv_have_ppc_mutex_hint=no
14710 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
14712 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
14713 if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
14715 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
14721 # Check largefile support. You might think this is a system service not a
14722 # compiler characteristic, but you'd be wrong. We must check this before
14723 # probing existence of related functions such as fseeko, since the largefile
14724 # defines can affect what is generated for that.
14725 if test "$PORTNAME" != "win32"; then
14726 # Check whether --enable-largefile was given.
14727 if test "${enable_largefile+set}" = set; then :
14728 enableval=$enable_largefile;
14731 if test "$enable_largefile" != no; then
14733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
14734 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
14735 if ${ac_cv_sys_largefile_CC+:} false; then :
14736 $as_echo_n "(cached) " >&6
14738 ac_cv_sys_largefile_CC=no
14739 if test "$GCC" != yes; then
14742 # IRIX 6.2 and later do not support large files by default,
14743 # so use the C compiler's -n32 option if that helps.
14744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14745 /* end confdefs.h. */
14746 #include <sys/types.h>
14747 /* Check that off_t can represent 2**63 - 1 correctly.
14748 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14749 since some C++ compilers masquerading as C compilers
14750 incorrectly reject 9223372036854775807. */
14751 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14752 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14753 && LARGE_OFF_T % 2147483647 == 1)
14763 if ac_fn_c_try_compile "$LINENO"; then :
14766 rm -f core conftest.err conftest.$ac_objext
14768 if ac_fn_c_try_compile "$LINENO"; then :
14769 ac_cv_sys_largefile_CC=' -n32'; break
14771 rm -f core conftest.err conftest.$ac_objext
14775 rm -f conftest.$ac_ext
14778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
14779 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
14780 if test "$ac_cv_sys_largefile_CC" != no; then
14781 CC=$CC$ac_cv_sys_largefile_CC
14784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14785 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
14786 if ${ac_cv_sys_file_offset_bits+:} false; then :
14787 $as_echo_n "(cached) " >&6
14790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14791 /* end confdefs.h. */
14792 #include <sys/types.h>
14793 /* Check that off_t can represent 2**63 - 1 correctly.
14794 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14795 since some C++ compilers masquerading as C compilers
14796 incorrectly reject 9223372036854775807. */
14797 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14798 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14799 && LARGE_OFF_T % 2147483647 == 1)
14809 if ac_fn_c_try_compile "$LINENO"; then :
14810 ac_cv_sys_file_offset_bits=no; break
14812 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14814 /* end confdefs.h. */
14815 #define _FILE_OFFSET_BITS 64
14816 #include <sys/types.h>
14817 /* Check that off_t can represent 2**63 - 1 correctly.
14818 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14819 since some C++ compilers masquerading as C compilers
14820 incorrectly reject 9223372036854775807. */
14821 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14822 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14823 && LARGE_OFF_T % 2147483647 == 1)
14833 if ac_fn_c_try_compile "$LINENO"; then :
14834 ac_cv_sys_file_offset_bits=64; break
14836 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14837 ac_cv_sys_file_offset_bits=unknown
14841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
14842 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
14843 case $ac_cv_sys_file_offset_bits in #(
14846 cat >>confdefs.h <<_ACEOF
14847 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14852 if test $ac_cv_sys_file_offset_bits = unknown; then
14853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
14854 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
14855 if ${ac_cv_sys_large_files+:} false; then :
14856 $as_echo_n "(cached) " >&6
14859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14860 /* end confdefs.h. */
14861 #include <sys/types.h>
14862 /* Check that off_t can represent 2**63 - 1 correctly.
14863 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14864 since some C++ compilers masquerading as C compilers
14865 incorrectly reject 9223372036854775807. */
14866 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14867 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14868 && LARGE_OFF_T % 2147483647 == 1)
14878 if ac_fn_c_try_compile "$LINENO"; then :
14879 ac_cv_sys_large_files=no; break
14881 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14883 /* end confdefs.h. */
14884 #define _LARGE_FILES 1
14885 #include <sys/types.h>
14886 /* Check that off_t can represent 2**63 - 1 correctly.
14887 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14888 since some C++ compilers masquerading as C compilers
14889 incorrectly reject 9223372036854775807. */
14890 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14891 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14892 && LARGE_OFF_T % 2147483647 == 1)
14902 if ac_fn_c_try_compile "$LINENO"; then :
14903 ac_cv_sys_large_files=1; break
14905 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14906 ac_cv_sys_large_files=unknown
14910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
14911 $as_echo "$ac_cv_sys_large_files" >&6; }
14912 case $ac_cv_sys_large_files in #(
14915 cat >>confdefs.h <<_ACEOF
14916 #define _LARGE_FILES $ac_cv_sys_large_files
14929 # Check for largefile support (must be after AC_SYS_LARGEFILE)
14930 # The cast to long int works around a bug in the HP C Compiler
14931 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14932 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14933 # This bug is HP SR number 8606223364.
14934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
14935 $as_echo_n "checking size of off_t... " >&6; }
14936 if ${ac_cv_sizeof_off_t+:} false; then :
14937 $as_echo_n "(cached) " >&6
14939 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
14942 if test "$ac_cv_type_off_t" = yes; then
14943 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14944 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14945 as_fn_error 77 "cannot compute sizeof (off_t)
14946 See \`config.log' for more details" "$LINENO" 5; }
14948 ac_cv_sizeof_off_t=0
14953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
14954 $as_echo "$ac_cv_sizeof_off_t" >&6; }
14958 cat >>confdefs.h <<_ACEOF
14959 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
14964 # If we don't have largefile support, can't handle segsize >= 2GB.
14965 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
14966 as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
14969 # The cast to long int works around a bug in the HP C Compiler
14970 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14971 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14972 # This bug is HP SR number 8606223364.
14973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
14974 $as_echo_n "checking size of bool... " >&6; }
14975 if ${ac_cv_sizeof_bool+:} false; then :
14976 $as_echo_n "(cached) " >&6
14978 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool" "#ifdef HAVE_STDBOOL_H
14979 #include <stdbool.h>
14984 if test "$ac_cv_type_bool" = yes; then
14985 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14986 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14987 as_fn_error 77 "cannot compute sizeof (bool)
14988 See \`config.log' for more details" "$LINENO" 5; }
14990 ac_cv_sizeof_bool=0
14995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
14996 $as_echo "$ac_cv_sizeof_bool" >&6; }
15000 cat >>confdefs.h <<_ACEOF
15001 #define SIZEOF_BOOL $ac_cv_sizeof_bool
15008 ## Functions, global variables
15011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
15012 $as_echo_n "checking for int timezone... " >&6; }
15013 if ${pgac_cv_var_int_timezone+:} false; then :
15014 $as_echo_n "(cached) " >&6
15016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15017 /* end confdefs.h. */
15024 res = timezone / 60;
15026 res = _timezone / 60;
15032 if ac_fn_c_try_link "$LINENO"; then :
15033 pgac_cv_var_int_timezone=yes
15035 pgac_cv_var_int_timezone=no
15037 rm -f core conftest.err conftest.$ac_objext \
15038 conftest$ac_exeext conftest.$ac_ext
15040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
15041 $as_echo "$pgac_cv_var_int_timezone" >&6; }
15042 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15044 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
15047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
15048 $as_echo_n "checking types of arguments for accept()... " >&6; }
15049 if ${ac_cv_func_accept_return+:} false; then :
15050 $as_echo_n "(cached) " >&6
15052 if ${ac_cv_func_accept_arg1+:} false; then :
15053 $as_echo_n "(cached) " >&6
15055 if ${ac_cv_func_accept_arg2+:} false; then :
15056 $as_echo_n "(cached) " >&6
15058 if ${ac_cv_func_accept_arg3+:} false; then :
15059 $as_echo_n "(cached) " >&6
15061 for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
15062 for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
15063 for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
15064 for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
15065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15066 /* end confdefs.h. */
15067 #include <sys/types.h>
15068 #include <sys/socket.h>
15069 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
15071 if ac_fn_c_try_compile "$LINENO"; then :
15072 ac_not_found=no; break 4
15076 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15081 if test "$ac_not_found" = yes; then
15082 as_fn_error $? "could not determine argument types" "$LINENO" 5
15084 if test "$ac_cv_func_accept_arg3" = "void"; then
15085 ac_cv_func_accept_arg3=int
15095 { $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
15096 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
15098 cat >>confdefs.h <<_ACEOF
15099 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
15103 cat >>confdefs.h <<_ACEOF
15104 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
15108 cat >>confdefs.h <<_ACEOF
15109 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
15113 cat >>confdefs.h <<_ACEOF
15114 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
15118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
15119 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
15120 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
15121 $as_echo_n "(cached) " >&6
15123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15124 /* end confdefs.h. */
15125 #include <sys/time.h>
15129 struct timeval *tp;
15130 struct timezone *tzp;
15131 gettimeofday(tp,tzp);
15136 if ac_fn_c_try_compile "$LINENO"; then :
15137 pgac_cv_func_gettimeofday_1arg=no
15139 pgac_cv_func_gettimeofday_1arg=yes
15141 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
15144 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
15145 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
15147 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
15151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
15152 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
15153 if ${pgac_cv_func_wcstombs_l+:} false; then :
15154 $as_echo_n "(cached) " >&6
15156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15157 /* end confdefs.h. */
15158 #include <stdlib.h>
15159 #include <locale.h>
15170 if ac_fn_c_try_compile "$LINENO"; then :
15171 pgac_cv_func_wcstombs_l='yes'
15173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15174 /* end confdefs.h. */
15175 #include <stdlib.h>
15176 #include <locale.h>
15177 #include <xlocale.h>
15188 if ac_fn_c_try_compile "$LINENO"; then :
15189 pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
15191 pgac_cv_func_wcstombs_l='no'
15193 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15195 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
15198 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
15199 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
15201 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
15205 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15206 # symbols that that library has no business exposing to the world. Pending
15207 # acquisition of a clue by those developers, ignore libedit (including its
15208 # possible alias of libreadline) while checking for everything else.
15209 LIBS_including_readline="$LIBS"
15210 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15212 for 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 utime utimes wcstombs_l
15214 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15215 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15216 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15217 cat >>confdefs.h <<_ACEOF
15218 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15225 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
15226 if test "x$ac_cv_func_fseeko" = xyes; then :
15227 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15230 case " $LIBOBJS " in
15231 *" fseeko.$ac_objext "* ) ;;
15232 *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
15240 # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
15241 # Mingw uses macros to access Win32 API calls
15244 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15246 ac_cv_func_fseeko=yes;;
15248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15249 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15250 if ${ac_cv_sys_largefile_source+:} false; then :
15251 $as_echo_n "(cached) " >&6
15254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15255 /* end confdefs.h. */
15256 #include <sys/types.h> /* for off_t */
15261 int (*fp) (FILE *, off_t, int) = fseeko;
15262 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15267 if ac_fn_c_try_link "$LINENO"; then :
15268 ac_cv_sys_largefile_source=no; break
15270 rm -f core conftest.err conftest.$ac_objext \
15271 conftest$ac_exeext conftest.$ac_ext
15272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15273 /* end confdefs.h. */
15274 #define _LARGEFILE_SOURCE 1
15275 #include <sys/types.h> /* for off_t */
15280 int (*fp) (FILE *, off_t, int) = fseeko;
15281 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15286 if ac_fn_c_try_link "$LINENO"; then :
15287 ac_cv_sys_largefile_source=1; break
15289 rm -f core conftest.err conftest.$ac_objext \
15290 conftest$ac_exeext conftest.$ac_ext
15291 ac_cv_sys_largefile_source=unknown
15295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15296 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15297 case $ac_cv_sys_largefile_source in #(
15300 cat >>confdefs.h <<_ACEOF
15301 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15307 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15308 # in glibc 2.1.3, but that breaks too many other things.
15309 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15310 if test $ac_cv_sys_largefile_source != unknown; then
15312 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15318 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
15319 # by calling it, 2009-04-02
15320 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
15321 # The Clang compiler raises a warning for an undeclared identifier that matches
15322 # a compiler builtin function. All extant Clang versions are affected, as of
15323 # Clang 3.6.0. Test a builtin known to every version. This problem affects the
15324 # C and Objective C languages, but Clang does report an error under C++ and
15327 # Passing -fno-builtin to the compiler would suppress this problem. That
15328 # strategy would have the advantage of being insensitive to stray warnings, but
15329 # it would make tests less realistic.
15330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
15331 $as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
15332 if ${ac_cv_c_decl_report+:} false; then :
15333 $as_echo_n "(cached) " >&6
15335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15336 /* end confdefs.h. */
15346 if ac_fn_c_try_compile "$LINENO"; then :
15347 if test -s conftest.err; then :
15348 # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
15349 # valid AC_CHECK_DECL input. No library function is consistently available
15350 # on freestanding implementations, so test against a dummy declaration.
15351 # Include always-available headers on the off chance that they somehow
15353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15354 /* end confdefs.h. */
15356 #include <limits.h>
15357 #include <stdarg.h>
15358 #include <stddef.h>
15359 extern void ac_decl (int, char *);
15364 (void) ac_decl ((int) 0, (char *) 0);
15374 if ac_fn_c_try_compile "$LINENO"; then :
15375 if test -s conftest.err; then :
15376 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15377 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15378 as_fn_error $? "cannot detect from compiler exit status or warnings
15379 See \`config.log' for more details" "$LINENO" 5; }
15381 ac_cv_c_decl_report=warning
15384 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15385 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15386 as_fn_error $? "cannot compile a simple declaration test
15387 See \`config.log' for more details" "$LINENO" 5; }
15389 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15391 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15392 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15393 as_fn_error $? "compiler does not report undeclared identifiers
15394 See \`config.log' for more details" "$LINENO" 5; }
15397 ac_cv_c_decl_report=error
15399 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
15402 $as_echo "$ac_cv_c_decl_report" >&6; }
15404 case $ac_cv_c_decl_report in
15405 warning) ac_c_decl_warn_flag=yes ;;
15406 *) ac_c_decl_warn_flag= ;;
15409 if test "$PORTNAME" != "solaris"; then :
15411 for ac_func in posix_fadvise
15413 ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
15414 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
15415 cat >>confdefs.h <<_ACEOF
15416 #define HAVE_POSIX_FADVISE 1
15422 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
15424 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
15430 cat >>confdefs.h <<_ACEOF
15431 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
15437 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
15439 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
15445 cat >>confdefs.h <<_ACEOF
15446 #define HAVE_DECL_FDATASYNC $ac_have_decl
15449 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
15450 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
15456 cat >>confdefs.h <<_ACEOF
15457 #define HAVE_DECL_STRLCAT $ac_have_decl
15459 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
15460 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
15466 cat >>confdefs.h <<_ACEOF
15467 #define HAVE_DECL_STRLCPY $ac_have_decl
15469 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15470 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15476 cat >>confdefs.h <<_ACEOF
15477 #define HAVE_DECL_STRNLEN $ac_have_decl
15480 # This is probably only present on macOS, but may as well check always
15481 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
15483 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
15489 cat >>confdefs.h <<_ACEOF
15490 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
15494 ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
15496 if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
15502 cat >>confdefs.h <<_ACEOF
15503 #define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
15505 ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
15507 if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
15513 cat >>confdefs.h <<_ACEOF
15514 #define HAVE_DECL_RTLD_NOW $ac_have_decl
15518 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
15519 #include <netinet/in.h>
15521 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
15523 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
15528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
15529 $as_echo_n "checking for PS_STRINGS... " >&6; }
15530 if ${pgac_cv_var_PS_STRINGS+:} false; then :
15531 $as_echo_n "(cached) " >&6
15533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15534 /* end confdefs.h. */
15535 #include <machine/vmparam.h>
15536 #include <sys/exec.h>
15541 PS_STRINGS->ps_nargvstr = 1;
15542 PS_STRINGS->ps_argvstr = "foo";
15547 if ac_fn_c_try_link "$LINENO"; then :
15548 pgac_cv_var_PS_STRINGS=yes
15550 pgac_cv_var_PS_STRINGS=no
15552 rm -f core conftest.err conftest.$ac_objext \
15553 conftest$ac_exeext conftest.$ac_ext
15555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
15556 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
15557 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
15559 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
15564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
15565 $as_echo_n "checking for isinf... " >&6; }
15566 if ${ac_cv_func_isinf+:} false; then :
15567 $as_echo_n "(cached) " >&6
15569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15570 /* end confdefs.h. */
15573 double glob_double;
15578 return isinf(glob_double) ? 0 : 1;
15583 if ac_fn_c_try_link "$LINENO"; then :
15584 ac_cv_func_isinf=yes
15586 ac_cv_func_isinf=no
15588 rm -f core conftest.err conftest.$ac_objext \
15589 conftest$ac_exeext conftest.$ac_ext
15591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
15592 $as_echo "$ac_cv_func_isinf" >&6; }
15594 if test $ac_cv_func_isinf = yes ; then
15596 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
15599 case " $LIBOBJS " in
15600 *" isinf.$ac_objext "* ) ;;
15601 *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
15605 # Look for a way to implement a substitute for isinf()
15606 for ac_func in fpclass fp_class fp_class_d class
15608 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15609 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15610 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15611 cat >>confdefs.h <<_ACEOF
15612 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15620 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
15621 if test "x$ac_cv_func_crypt" = xyes; then :
15622 $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
15625 case " $LIBOBJS " in
15626 *" crypt.$ac_objext "* ) ;;
15627 *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
15633 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
15634 if test "x$ac_cv_func_dlopen" = xyes; then :
15635 $as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
15638 case " $LIBOBJS " in
15639 *" dlopen.$ac_objext "* ) ;;
15640 *) LIBOBJS="$LIBOBJS dlopen.$ac_objext"
15646 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
15647 if test "x$ac_cv_func_fls" = xyes; then :
15648 $as_echo "#define HAVE_FLS 1" >>confdefs.h
15651 case " $LIBOBJS " in
15652 *" fls.$ac_objext "* ) ;;
15653 *) LIBOBJS="$LIBOBJS fls.$ac_objext"
15659 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
15660 if test "x$ac_cv_func_getopt" = xyes; then :
15661 $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
15664 case " $LIBOBJS " in
15665 *" getopt.$ac_objext "* ) ;;
15666 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15672 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
15673 if test "x$ac_cv_func_getrusage" = xyes; then :
15674 $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
15677 case " $LIBOBJS " in
15678 *" getrusage.$ac_objext "* ) ;;
15679 *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
15685 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
15686 if test "x$ac_cv_func_inet_aton" = xyes; then :
15687 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
15690 case " $LIBOBJS " in
15691 *" inet_aton.$ac_objext "* ) ;;
15692 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
15698 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
15699 if test "x$ac_cv_func_mkdtemp" = xyes; then :
15700 $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
15703 case " $LIBOBJS " in
15704 *" mkdtemp.$ac_objext "* ) ;;
15705 *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
15711 ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread"
15712 if test "x$ac_cv_func_pread" = xyes; then :
15713 $as_echo "#define HAVE_PREAD 1" >>confdefs.h
15716 case " $LIBOBJS " in
15717 *" pread.$ac_objext "* ) ;;
15718 *) LIBOBJS="$LIBOBJS pread.$ac_objext"
15724 ac_fn_c_check_func "$LINENO" "pwrite" "ac_cv_func_pwrite"
15725 if test "x$ac_cv_func_pwrite" = xyes; then :
15726 $as_echo "#define HAVE_PWRITE 1" >>confdefs.h
15729 case " $LIBOBJS " in
15730 *" pwrite.$ac_objext "* ) ;;
15731 *) LIBOBJS="$LIBOBJS pwrite.$ac_objext"
15737 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
15738 if test "x$ac_cv_func_random" = xyes; then :
15739 $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
15742 case " $LIBOBJS " in
15743 *" random.$ac_objext "* ) ;;
15744 *) LIBOBJS="$LIBOBJS random.$ac_objext"
15750 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
15751 if test "x$ac_cv_func_rint" = xyes; then :
15752 $as_echo "#define HAVE_RINT 1" >>confdefs.h
15755 case " $LIBOBJS " in
15756 *" rint.$ac_objext "* ) ;;
15757 *) LIBOBJS="$LIBOBJS rint.$ac_objext"
15763 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
15764 if test "x$ac_cv_func_srandom" = xyes; then :
15765 $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
15768 case " $LIBOBJS " in
15769 *" srandom.$ac_objext "* ) ;;
15770 *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
15776 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
15777 if test "x$ac_cv_func_strlcat" = xyes; then :
15778 $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
15781 case " $LIBOBJS " in
15782 *" strlcat.$ac_objext "* ) ;;
15783 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
15789 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
15790 if test "x$ac_cv_func_strlcpy" = xyes; then :
15791 $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
15794 case " $LIBOBJS " in
15795 *" strlcpy.$ac_objext "* ) ;;
15796 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
15802 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
15803 if test "x$ac_cv_func_strnlen" = xyes; then :
15804 $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
15807 case " $LIBOBJS " in
15808 *" strnlen.$ac_objext "* ) ;;
15809 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
15819 # Windows uses a specialised env handler
15820 # and doesn't need a replacement getpeereid because it doesn't use
15824 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15827 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15829 ac_cv_func_unsetenv=yes
15830 ac_cv_func_getpeereid=yes;;
15832 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
15833 if test "x$ac_cv_func_unsetenv" = xyes; then :
15834 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15837 case " $LIBOBJS " in
15838 *" unsetenv.$ac_objext "* ) ;;
15839 *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
15845 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
15846 if test "x$ac_cv_func_getpeereid" = xyes; then :
15847 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15850 case " $LIBOBJS " in
15851 *" getpeereid.$ac_objext "* ) ;;
15852 *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
15862 # System's version of getaddrinfo(), if any, may be used only if we found
15863 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
15864 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
15865 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
15866 test "$PORTNAME" != "win32"; then
15867 ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
15868 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
15869 $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
15872 case " $LIBOBJS " in
15873 *" getaddrinfo.$ac_objext "* ) ;;
15874 *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
15882 case " $LIBOBJS " in
15883 *" getaddrinfo.$ac_objext "* ) ;;
15884 *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
15890 # Similarly, use system's getopt_long() only if system provides struct option.
15891 if test x"$ac_cv_type_struct_option" = xyes ; then
15892 ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
15893 if test "x$ac_cv_func_getopt_long" = xyes; then :
15894 $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
15897 case " $LIBOBJS " in
15898 *" getopt_long.$ac_objext "* ) ;;
15899 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15907 case " $LIBOBJS " in
15908 *" getopt_long.$ac_objext "* ) ;;
15909 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15915 # On OpenBSD and Solaris, getopt() doesn't do what we want for long options
15916 # (i.e., allow '-' as a flag character), so use our version on those platforms.
15917 if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
15918 case " $LIBOBJS " in
15919 *" getopt.$ac_objext "* ) ;;
15920 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15926 # mingw has adopted a GNU-centric interpretation of optind/optreset,
15927 # so always use our version on Windows.
15928 if test "$PORTNAME" = "win32"; then
15929 case " $LIBOBJS " in
15930 *" getopt.$ac_objext "* ) ;;
15931 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15935 case " $LIBOBJS " in
15936 *" getopt_long.$ac_objext "* ) ;;
15937 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15943 # Win32 (really MinGW) support
15944 if test "$PORTNAME" = "win32"; then
15945 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
15946 if test "x$ac_cv_func_gettimeofday" = xyes; then :
15947 $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
15950 case " $LIBOBJS " in
15951 *" gettimeofday.$ac_objext "* ) ;;
15952 *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
15959 case " $LIBOBJS " in
15960 *" dirmod.$ac_objext "* ) ;;
15961 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
15965 case " $LIBOBJS " in
15966 *" kill.$ac_objext "* ) ;;
15967 *) LIBOBJS="$LIBOBJS kill.$ac_objext"
15971 case " $LIBOBJS " in
15972 *" open.$ac_objext "* ) ;;
15973 *) LIBOBJS="$LIBOBJS open.$ac_objext"
15977 case " $LIBOBJS " in
15978 *" system.$ac_objext "* ) ;;
15979 *) LIBOBJS="$LIBOBJS system.$ac_objext"
15983 case " $LIBOBJS " in
15984 *" win32env.$ac_objext "* ) ;;
15985 *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
15989 case " $LIBOBJS " in
15990 *" win32error.$ac_objext "* ) ;;
15991 *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
15995 case " $LIBOBJS " in
15996 *" win32security.$ac_objext "* ) ;;
15997 *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
16001 case " $LIBOBJS " in
16002 *" win32setlocale.$ac_objext "* ) ;;
16003 *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
16008 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
16010 ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
16011 #define WIN32_LEAN_AND_MEAN
16012 #include <windows.h>
16013 #include <string.h>
16014 #include <dbghelp.h>
16016 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
16018 cat >>confdefs.h <<_ACEOF
16019 #define HAVE_MINIDUMP_TYPE 1
16022 pgac_minidump_type=yes
16024 pgac_minidump_type=no
16028 if test x"$pgac_minidump_type" = x"yes" ; then
16029 have_win32_dbghelp=yes
16032 have_win32_dbghelp=no
16036 # Cygwin needs only a bit of that
16037 if test "$PORTNAME" = "cygwin"; then
16038 case " $LIBOBJS " in
16039 *" dirmod.$ac_objext "* ) ;;
16040 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16046 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
16047 if test "x$ac_cv_func_syslog" = xyes; then :
16048 ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
16049 if test "x$ac_cv_header_syslog_h" = xyes; then :
16051 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
16059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
16060 $as_echo_n "checking for opterr... " >&6; }
16061 if ${pgac_cv_var_int_opterr+:} false; then :
16062 $as_echo_n "(cached) " >&6
16064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16065 /* end confdefs.h. */
16066 #include <unistd.h>
16070 extern int opterr; opterr = 1;
16075 if ac_fn_c_try_link "$LINENO"; then :
16076 pgac_cv_var_int_opterr=yes
16078 pgac_cv_var_int_opterr=no
16080 rm -f core conftest.err conftest.$ac_objext \
16081 conftest$ac_exeext conftest.$ac_ext
16083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
16084 $as_echo "$pgac_cv_var_int_opterr" >&6; }
16085 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
16087 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
16091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
16092 $as_echo_n "checking for optreset... " >&6; }
16093 if ${pgac_cv_var_int_optreset+:} false; then :
16094 $as_echo_n "(cached) " >&6
16096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16097 /* end confdefs.h. */
16098 #include <unistd.h>
16102 extern int optreset; optreset = 1;
16107 if ac_fn_c_try_link "$LINENO"; then :
16108 pgac_cv_var_int_optreset=yes
16110 pgac_cv_var_int_optreset=no
16112 rm -f core conftest.err conftest.$ac_objext \
16113 conftest$ac_exeext conftest.$ac_ext
16115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
16116 $as_echo "$pgac_cv_var_int_optreset" >&6; }
16117 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
16119 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
16123 for ac_func in strtoll __strtoll strtoq
16125 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16126 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16127 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16128 cat >>confdefs.h <<_ACEOF
16129 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16135 for ac_func in strtoull __strtoull strtouq
16137 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16138 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16139 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16140 cat >>confdefs.h <<_ACEOF
16141 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16147 # strto[u]ll may exist but not be declared
16148 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
16149 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
16155 cat >>confdefs.h <<_ACEOF
16156 #define HAVE_DECL_STRTOLL $ac_have_decl
16158 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
16159 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
16165 cat >>confdefs.h <<_ACEOF
16166 #define HAVE_DECL_STRTOULL $ac_have_decl
16170 if test "$with_icu" = yes; then
16171 ac_save_CPPFLAGS=$CPPFLAGS
16172 CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16174 # Verify we have ICU's header files
16175 ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16176 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16179 as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16184 CPPFLAGS=$ac_save_CPPFLAGS
16187 if test "$with_llvm" = yes; then
16189 # Check which functionality is present
16190 SAVE_CPPFLAGS="$CPPFLAGS"
16191 CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
16192 ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
16194 if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
16200 cat >>confdefs.h <<_ACEOF
16201 #define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
16204 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
16206 if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
16212 cat >>confdefs.h <<_ACEOF
16213 #define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
16215 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUFeatures" "ac_cv_have_decl_LLVMGetHostCPUFeatures" "#include <llvm-c/TargetMachine.h>
16217 if test "x$ac_cv_have_decl_LLVMGetHostCPUFeatures" = xyes; then :
16223 cat >>confdefs.h <<_ACEOF
16224 #define HAVE_DECL_LLVMGETHOSTCPUFEATURES $ac_have_decl
16227 ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
16229 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
16235 cat >>confdefs.h <<_ACEOF
16236 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
16238 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
16240 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
16246 cat >>confdefs.h <<_ACEOF
16247 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
16250 CPPFLAGS="$SAVE_CPPFLAGS"
16254 # Lastly, restore full LIBS list and check for readline/libedit symbols
16255 LIBS="$LIBS_including_readline"
16257 if test "$with_readline" = yes; then
16258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
16259 $as_echo_n "checking for rl_completion_append_character... " >&6; }
16260 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
16261 $as_echo_n "(cached) " >&6
16263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16264 /* end confdefs.h. */
16266 #ifdef HAVE_READLINE_READLINE_H
16267 # include <readline/readline.h>
16268 #elif defined(HAVE_READLINE_H)
16269 # include <readline.h>
16275 rl_completion_append_character = 'x';
16280 if ac_fn_c_try_link "$LINENO"; then :
16281 pgac_cv_var_rl_completion_append_character=yes
16283 pgac_cv_var_rl_completion_append_character=no
16285 rm -f core conftest.err conftest.$ac_objext \
16286 conftest$ac_exeext conftest.$ac_ext
16288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
16289 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
16290 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
16292 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
16295 for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
16297 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16298 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16299 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16300 cat >>confdefs.h <<_ACEOF
16301 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16307 for ac_func in append_history history_truncate_file
16309 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16310 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16311 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16312 cat >>confdefs.h <<_ACEOF
16313 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16322 # This test makes sure that run tests work at all. Sometimes a shared
16323 # library is found by the linker, but the runtime linker can't find it.
16324 # This check should come after all modifications of compiler or linker
16325 # variables, and before any other run tests.
16326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16327 $as_echo_n "checking test program... " >&6; }
16328 if test "$cross_compiling" = yes; then :
16329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16330 $as_echo "cross-compiling" >&6; }
16332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16333 /* end confdefs.h. */
16334 int main() { return 0; }
16336 if ac_fn_c_try_run "$LINENO"; then :
16337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16338 $as_echo "ok" >&6; }
16340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16341 $as_echo "failed" >&6; }
16343 Could not execute a simple test program. This may be a problem
16344 related to locating shared libraries. Check the file 'config.log'
16345 for the exact reason." "$LINENO" 5
16347 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16348 conftest.$ac_objext conftest.beam conftest.$ac_ext
16352 # --------------------
16353 # Run tests below here
16354 # --------------------
16357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16358 $as_echo_n "checking whether long int is 64 bits... " >&6; }
16359 if ${pgac_cv_type_long_int_64+:} false; then :
16360 $as_echo_n "(cached) " >&6
16362 if test "$cross_compiling" = yes; then :
16363 # If cross-compiling, check the size reported by the compiler and
16364 # trust that the arithmetic works.
16365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16366 /* end confdefs.h. */
16371 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16372 test_array [0] = 0;
16373 return test_array [0];
16379 if ac_fn_c_try_compile "$LINENO"; then :
16380 pgac_cv_type_long_int_64=yes
16382 pgac_cv_type_long_int_64=no
16384 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16387 /* end confdefs.h. */
16388 typedef long int ac_int64;
16391 * These are globals to discourage the compiler from folding all the
16392 * arithmetic tests down to compile-time constants.
16394 ac_int64 a = 20000001;
16395 ac_int64 b = 40000005;
16397 int does_int64_work()
16401 if (sizeof(ac_int64) != 8)
16402 return 0; /* definitely not the right size */
16404 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16414 return (! does_int64_work());
16417 if ac_fn_c_try_run "$LINENO"; then :
16418 pgac_cv_type_long_int_64=yes
16420 pgac_cv_type_long_int_64=no
16422 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16423 conftest.$ac_objext conftest.beam conftest.$ac_ext
16427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
16428 $as_echo "$pgac_cv_type_long_int_64" >&6; }
16430 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
16431 if test x"$pgac_cv_type_long_int_64" = xyes ; then
16433 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
16438 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
16439 pg_int64_type="long int"
16441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
16442 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
16443 if ${pgac_cv_type_long_long_int_64+:} false; then :
16444 $as_echo_n "(cached) " >&6
16446 if test "$cross_compiling" = yes; then :
16447 # If cross-compiling, check the size reported by the compiler and
16448 # trust that the arithmetic works.
16449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16450 /* end confdefs.h. */
16455 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
16456 test_array [0] = 0;
16457 return test_array [0];
16463 if ac_fn_c_try_compile "$LINENO"; then :
16464 pgac_cv_type_long_long_int_64=yes
16466 pgac_cv_type_long_long_int_64=no
16468 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16471 /* end confdefs.h. */
16472 typedef long long int ac_int64;
16475 * These are globals to discourage the compiler from folding all the
16476 * arithmetic tests down to compile-time constants.
16478 ac_int64 a = 20000001;
16479 ac_int64 b = 40000005;
16481 int does_int64_work()
16485 if (sizeof(ac_int64) != 8)
16486 return 0; /* definitely not the right size */
16488 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16498 return (! does_int64_work());
16501 if ac_fn_c_try_run "$LINENO"; then :
16502 pgac_cv_type_long_long_int_64=yes
16504 pgac_cv_type_long_long_int_64=no
16506 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16507 conftest.$ac_objext conftest.beam conftest.$ac_ext
16511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
16512 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
16514 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
16515 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
16517 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
16521 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16522 pg_int64_type="long long int"
16524 as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
16529 cat >>confdefs.h <<_ACEOF
16530 #define PG_INT64_TYPE $pg_int64_type
16534 # Select the printf length modifier that goes with that, too.
16535 if test x"$pg_int64_type" = x"long long int" ; then
16536 INT64_MODIFIER='"ll"'
16538 INT64_MODIFIER='"l"'
16542 cat >>confdefs.h <<_ACEOF
16543 #define INT64_MODIFIER $INT64_MODIFIER
16547 # has to be down here, rather than with the other builtins, because
16548 # the test uses PG_INT64_TYPE.
16549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
16550 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
16551 if ${pgac_cv__builtin_op_overflow+:} false; then :
16552 $as_echo_n "(cached) " >&6
16554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16555 /* end confdefs.h. */
16557 PG_INT64_TYPE a = 1;
16558 PG_INT64_TYPE b = 1;
16559 PG_INT64_TYPE result;
16565 oflo = __builtin_mul_overflow(a, b, &result);
16570 if ac_fn_c_try_link "$LINENO"; then :
16571 pgac_cv__builtin_op_overflow=yes
16573 pgac_cv__builtin_op_overflow=no
16575 rm -f core conftest.err conftest.$ac_objext \
16576 conftest$ac_exeext conftest.$ac_ext
16578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
16579 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
16580 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
16582 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
16586 # Check size of void *, size_t (enables tweaks for > 32bit address space)
16587 # The cast to long int works around a bug in the HP C Compiler
16588 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16589 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16590 # This bug is HP SR number 8606223364.
16591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
16592 $as_echo_n "checking size of void *... " >&6; }
16593 if ${ac_cv_sizeof_void_p+:} false; then :
16594 $as_echo_n "(cached) " >&6
16596 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
16599 if test "$ac_cv_type_void_p" = yes; then
16600 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16601 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16602 as_fn_error 77 "cannot compute sizeof (void *)
16603 See \`config.log' for more details" "$LINENO" 5; }
16605 ac_cv_sizeof_void_p=0
16610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
16611 $as_echo "$ac_cv_sizeof_void_p" >&6; }
16615 cat >>confdefs.h <<_ACEOF
16616 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
16620 # The cast to long int works around a bug in the HP C Compiler
16621 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16622 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16623 # This bug is HP SR number 8606223364.
16624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
16625 $as_echo_n "checking size of size_t... " >&6; }
16626 if ${ac_cv_sizeof_size_t+:} false; then :
16627 $as_echo_n "(cached) " >&6
16629 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
16632 if test "$ac_cv_type_size_t" = yes; then
16633 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16634 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16635 as_fn_error 77 "cannot compute sizeof (size_t)
16636 See \`config.log' for more details" "$LINENO" 5; }
16638 ac_cv_sizeof_size_t=0
16643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
16644 $as_echo "$ac_cv_sizeof_size_t" >&6; }
16648 cat >>confdefs.h <<_ACEOF
16649 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
16653 # The cast to long int works around a bug in the HP C Compiler
16654 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16655 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16656 # This bug is HP SR number 8606223364.
16657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
16658 $as_echo_n "checking size of long... " >&6; }
16659 if ${ac_cv_sizeof_long+:} false; then :
16660 $as_echo_n "(cached) " >&6
16662 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
16665 if test "$ac_cv_type_long" = yes; then
16666 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16667 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16668 as_fn_error 77 "cannot compute sizeof (long)
16669 See \`config.log' for more details" "$LINENO" 5; }
16671 ac_cv_sizeof_long=0
16676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
16677 $as_echo "$ac_cv_sizeof_long" >&6; }
16681 cat >>confdefs.h <<_ACEOF
16682 #define SIZEOF_LONG $ac_cv_sizeof_long
16687 # Decide whether float4 is passed by value: user-selectable, enabled by default
16688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
16689 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
16692 # Check whether --enable-float4-byval was given.
16693 if test "${enable_float4_byval+set}" = set; then :
16694 enableval=$enable_float4_byval;
16698 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16700 float4passbyval=true
16703 float4passbyval=false
16706 as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
16711 enable_float4_byval=yes
16713 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16715 float4passbyval=true
16719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
16720 $as_echo "$enable_float4_byval" >&6; }
16722 cat >>confdefs.h <<_ACEOF
16723 #define FLOAT4PASSBYVAL $float4passbyval
16727 # Decide whether float8 is passed by value.
16728 # Note: this setting also controls int8 and related types such as timestamp.
16729 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
16730 # If not, trying to select it is an error.
16731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
16732 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
16733 if test $ac_cv_sizeof_void_p -ge 8 ; then
16736 # Check whether --enable-float8-byval was given.
16737 if test "${enable_float8_byval+set}" = set; then :
16738 enableval=$enable_float8_byval;
16747 as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16752 enable_float8_byval=yes
16760 # Check whether --enable-float8-byval was given.
16761 if test "${enable_float8_byval+set}" = set; then :
16762 enableval=$enable_float8_byval;
16771 as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16776 enable_float8_byval=no
16781 if test "$enable_float8_byval" = yes ; then
16782 as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
16785 if test "$enable_float8_byval" = yes ; then
16787 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
16789 float8passbyval=true
16791 float8passbyval=false
16793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
16794 $as_echo "$enable_float8_byval" >&6; }
16796 cat >>confdefs.h <<_ACEOF
16797 #define FLOAT8PASSBYVAL $float8passbyval
16801 # Determine memory alignment requirements for the basic C data types.
16803 # The cast to long int works around a bug in the HP C Compiler,
16804 # see AC_CHECK_SIZEOF for more information.
16805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
16806 $as_echo_n "checking alignment of short... " >&6; }
16807 if ${ac_cv_alignof_short+:} false; then :
16808 $as_echo_n "(cached) " >&6
16810 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short" "$ac_includes_default
16812 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16814 typedef struct { char x; short y; } ac__type_alignof_;"; then :
16817 if test "$ac_cv_type_short" = yes; then
16818 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16819 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16820 as_fn_error 77 "cannot compute alignment of short
16821 See \`config.log' for more details" "$LINENO" 5; }
16823 ac_cv_alignof_short=0
16828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
16829 $as_echo "$ac_cv_alignof_short" >&6; }
16833 cat >>confdefs.h <<_ACEOF
16834 #define ALIGNOF_SHORT $ac_cv_alignof_short
16838 # The cast to long int works around a bug in the HP C Compiler,
16839 # see AC_CHECK_SIZEOF for more information.
16840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
16841 $as_echo_n "checking alignment of int... " >&6; }
16842 if ${ac_cv_alignof_int+:} false; then :
16843 $as_echo_n "(cached) " >&6
16845 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int" "$ac_includes_default
16847 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16849 typedef struct { char x; int y; } ac__type_alignof_;"; then :
16852 if test "$ac_cv_type_int" = yes; then
16853 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16854 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16855 as_fn_error 77 "cannot compute alignment of int
16856 See \`config.log' for more details" "$LINENO" 5; }
16858 ac_cv_alignof_int=0
16863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
16864 $as_echo "$ac_cv_alignof_int" >&6; }
16868 cat >>confdefs.h <<_ACEOF
16869 #define ALIGNOF_INT $ac_cv_alignof_int
16873 # The cast to long int works around a bug in the HP C Compiler,
16874 # see AC_CHECK_SIZEOF for more information.
16875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
16876 $as_echo_n "checking alignment of long... " >&6; }
16877 if ${ac_cv_alignof_long+:} false; then :
16878 $as_echo_n "(cached) " >&6
16880 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
16882 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16884 typedef struct { char x; long y; } ac__type_alignof_;"; then :
16887 if test "$ac_cv_type_long" = yes; then
16888 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16889 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16890 as_fn_error 77 "cannot compute alignment of long
16891 See \`config.log' for more details" "$LINENO" 5; }
16893 ac_cv_alignof_long=0
16898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
16899 $as_echo "$ac_cv_alignof_long" >&6; }
16903 cat >>confdefs.h <<_ACEOF
16904 #define ALIGNOF_LONG $ac_cv_alignof_long
16908 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16909 # The cast to long int works around a bug in the HP C Compiler,
16910 # see AC_CHECK_SIZEOF for more information.
16911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
16912 $as_echo_n "checking alignment of long long int... " >&6; }
16913 if ${ac_cv_alignof_long_long_int+:} false; then :
16914 $as_echo_n "(cached) " >&6
16916 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int" "$ac_includes_default
16918 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16920 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
16923 if test "$ac_cv_type_long_long_int" = yes; then
16924 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16925 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16926 as_fn_error 77 "cannot compute alignment of long long int
16927 See \`config.log' for more details" "$LINENO" 5; }
16929 ac_cv_alignof_long_long_int=0
16934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
16935 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
16939 cat >>confdefs.h <<_ACEOF
16940 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
16945 # The cast to long int works around a bug in the HP C Compiler,
16946 # see AC_CHECK_SIZEOF for more information.
16947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
16948 $as_echo_n "checking alignment of double... " >&6; }
16949 if ${ac_cv_alignof_double+:} false; then :
16950 $as_echo_n "(cached) " >&6
16952 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double" "$ac_includes_default
16954 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16956 typedef struct { char x; double y; } ac__type_alignof_;"; then :
16959 if test "$ac_cv_type_double" = yes; then
16960 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16961 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16962 as_fn_error 77 "cannot compute alignment of double
16963 See \`config.log' for more details" "$LINENO" 5; }
16965 ac_cv_alignof_double=0
16970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
16971 $as_echo "$ac_cv_alignof_double" >&6; }
16975 cat >>confdefs.h <<_ACEOF
16976 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
16981 # Compute maximum alignment of any basic type.
16982 # We assume long's alignment is at least as strong as char, short, or int;
16983 # but we must check long long (if it is being used for int64) and double.
16984 # Note that we intentionally do not consider any types wider than 64 bits,
16985 # as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
16986 # for disk and memory space.
16988 MAX_ALIGNOF=$ac_cv_alignof_long
16989 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
16990 MAX_ALIGNOF=$ac_cv_alignof_double
16992 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
16993 MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
16996 cat >>confdefs.h <<_ACEOF
16997 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
17002 # Some platforms predefine the types int8, int16, etc. Only check
17003 # a (hopefully) representative subset.
17004 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
17006 if test "x$ac_cv_type_int8" = xyes; then :
17008 cat >>confdefs.h <<_ACEOF
17009 #define HAVE_INT8 1
17014 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
17016 if test "x$ac_cv_type_uint8" = xyes; then :
17018 cat >>confdefs.h <<_ACEOF
17019 #define HAVE_UINT8 1
17024 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
17026 if test "x$ac_cv_type_int64" = xyes; then :
17028 cat >>confdefs.h <<_ACEOF
17029 #define HAVE_INT64 1
17034 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
17036 if test "x$ac_cv_type_uint64" = xyes; then :
17038 cat >>confdefs.h <<_ACEOF
17039 #define HAVE_UINT64 1
17046 # Some compilers offer a 128-bit integer scalar type.
17047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
17048 $as_echo_n "checking for __int128... " >&6; }
17049 if ${pgac_cv__128bit_int+:} false; then :
17050 $as_echo_n "(cached) " >&6
17052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17053 /* end confdefs.h. */
17056 * We don't actually run this test, just link it to verify that any support
17057 * functions needed for __int128 are present.
17059 * These are globals to discourage the compiler from folding all the
17060 * arithmetic tests down to compile-time constants. We do not have
17061 * convenient support for 128bit literals at this point...
17063 __int128 a = 48828125;
17064 __int128 b = 97656250;
17071 a = (a << 12) + 1; /* 200000000001 */
17072 b = (b << 12) + 5; /* 400000000005 */
17073 /* try the most relevant arithmetic ops */
17076 /* must use the results, else compiler may optimize arithmetic away */
17084 if ac_fn_c_try_link "$LINENO"; then :
17085 pgac_cv__128bit_int=yes
17087 pgac_cv__128bit_int=no
17089 rm -f core conftest.err conftest.$ac_objext \
17090 conftest$ac_exeext conftest.$ac_ext
17092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
17093 $as_echo "$pgac_cv__128bit_int" >&6; }
17094 if test x"$pgac_cv__128bit_int" = xyes ; then
17095 # Use of non-default alignment with __int128 tickles bugs in some compilers.
17096 # If not cross-compiling, we can test for bugs and disable use of __int128
17097 # with buggy compilers. If cross-compiling, hope for the best.
17098 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
17099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
17100 $as_echo_n "checking for __int128 alignment bug... " >&6; }
17101 if ${pgac_cv__128bit_int_bug+:} false; then :
17102 $as_echo_n "(cached) " >&6
17104 if test "$cross_compiling" = yes; then :
17105 pgac_cv__128bit_int_bug="assuming ok"
17107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17108 /* end confdefs.h. */
17110 /* This must match the corresponding code in c.h: */
17111 #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
17112 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
17114 typedef __int128 int128a
17115 #if defined(pg_attribute_aligned)
17116 pg_attribute_aligned(8)
17120 void pass_by_val(void *buffer, int128a par) { holder = par; }
17126 long int i64 = 97656225L << 12;
17128 pass_by_val(main, (int128a) i64);
17137 if ac_fn_c_try_run "$LINENO"; then :
17138 pgac_cv__128bit_int_bug=ok
17140 pgac_cv__128bit_int_bug=broken
17142 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17143 conftest.$ac_objext conftest.beam conftest.$ac_ext
17147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
17148 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
17149 if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
17151 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
17153 # The cast to long int works around a bug in the HP C Compiler,
17154 # see AC_CHECK_SIZEOF for more information.
17155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
17156 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
17157 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
17158 $as_echo_n "(cached) " >&6
17160 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE" "$ac_includes_default
17162 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17164 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
17167 if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
17168 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17169 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17170 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
17171 See \`config.log' for more details" "$LINENO" 5; }
17173 ac_cv_alignof_PG_INT128_TYPE=0
17178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
17179 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
17183 cat >>confdefs.h <<_ACEOF
17184 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
17191 # Check for various atomic operations now that we have checked how to declare
17193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
17194 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
17195 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
17196 $as_echo_n "(cached) " >&6
17198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17199 /* end confdefs.h. */
17205 __sync_lock_test_and_set(&lock, 1);
17206 __sync_lock_release(&lock);
17211 if ac_fn_c_try_link "$LINENO"; then :
17212 pgac_cv_gcc_sync_char_tas="yes"
17214 pgac_cv_gcc_sync_char_tas="no"
17216 rm -f core conftest.err conftest.$ac_objext \
17217 conftest$ac_exeext conftest.$ac_ext
17219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
17220 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
17221 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
17223 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
17226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
17227 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
17228 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
17229 $as_echo_n "(cached) " >&6
17231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17232 /* end confdefs.h. */
17238 __sync_lock_test_and_set(&lock, 1);
17239 __sync_lock_release(&lock);
17244 if ac_fn_c_try_link "$LINENO"; then :
17245 pgac_cv_gcc_sync_int32_tas="yes"
17247 pgac_cv_gcc_sync_int32_tas="no"
17249 rm -f core conftest.err conftest.$ac_objext \
17250 conftest$ac_exeext conftest.$ac_ext
17252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
17253 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
17254 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
17256 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
17259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17260 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17261 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17262 $as_echo_n "(cached) " >&6
17264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17265 /* end confdefs.h. */
17271 __sync_val_compare_and_swap(&val, 0, 37);
17276 if ac_fn_c_try_link "$LINENO"; then :
17277 pgac_cv_gcc_sync_int32_cas="yes"
17279 pgac_cv_gcc_sync_int32_cas="no"
17281 rm -f core conftest.err conftest.$ac_objext \
17282 conftest$ac_exeext conftest.$ac_ext
17284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17285 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17286 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17288 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17292 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17293 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17294 $as_echo_n "(cached) " >&6
17296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17297 /* end confdefs.h. */
17302 PG_INT64_TYPE lock = 0;
17303 __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17308 if ac_fn_c_try_link "$LINENO"; then :
17309 pgac_cv_gcc_sync_int64_cas="yes"
17311 pgac_cv_gcc_sync_int64_cas="no"
17313 rm -f core conftest.err conftest.$ac_objext \
17314 conftest$ac_exeext conftest.$ac_ext
17316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17317 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17318 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17320 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17324 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17325 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17326 $as_echo_n "(cached) " >&6
17328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17329 /* end confdefs.h. */
17336 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17341 if ac_fn_c_try_link "$LINENO"; then :
17342 pgac_cv_gcc_atomic_int32_cas="yes"
17344 pgac_cv_gcc_atomic_int32_cas="no"
17346 rm -f core conftest.err conftest.$ac_objext \
17347 conftest$ac_exeext conftest.$ac_ext
17349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17350 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17351 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17353 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17357 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17358 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17359 $as_echo_n "(cached) " >&6
17361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17362 /* end confdefs.h. */
17367 PG_INT64_TYPE val = 0;
17368 PG_INT64_TYPE expect = 0;
17369 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17374 if ac_fn_c_try_link "$LINENO"; then :
17375 pgac_cv_gcc_atomic_int64_cas="yes"
17377 pgac_cv_gcc_atomic_int64_cas="no"
17379 rm -f core conftest.err conftest.$ac_objext \
17380 conftest$ac_exeext conftest.$ac_ext
17382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17383 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17384 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17386 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17391 # Check for x86 cpuid instruction
17392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17393 $as_echo_n "checking for __get_cpuid... " >&6; }
17394 if ${pgac_cv__get_cpuid+:} false; then :
17395 $as_echo_n "(cached) " >&6
17397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17398 /* end confdefs.h. */
17403 unsigned int exx[4] = {0, 0, 0, 0};
17404 __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17410 if ac_fn_c_try_link "$LINENO"; then :
17411 pgac_cv__get_cpuid="yes"
17413 pgac_cv__get_cpuid="no"
17415 rm -f core conftest.err conftest.$ac_objext \
17416 conftest$ac_exeext conftest.$ac_ext
17418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17419 $as_echo "$pgac_cv__get_cpuid" >&6; }
17420 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17422 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17427 $as_echo_n "checking for __cpuid... " >&6; }
17428 if ${pgac_cv__cpuid+:} false; then :
17429 $as_echo_n "(cached) " >&6
17431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17432 /* end confdefs.h. */
17433 #include <intrin.h>
17437 unsigned int exx[4] = {0, 0, 0, 0};
17438 __get_cpuid(exx[0], 1);
17444 if ac_fn_c_try_link "$LINENO"; then :
17445 pgac_cv__cpuid="yes"
17447 pgac_cv__cpuid="no"
17449 rm -f core conftest.err conftest.$ac_objext \
17450 conftest$ac_exeext conftest.$ac_ext
17452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17453 $as_echo "$pgac_cv__cpuid" >&6; }
17454 if test x"$pgac_cv__cpuid" = x"yes"; then
17456 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17460 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17462 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17463 # with the default compiler flags. If not, check if adding the -msse4.2
17464 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
17465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17466 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17467 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17468 $as_echo_n "(cached) " >&6
17470 pgac_save_CFLAGS=$CFLAGS
17471 CFLAGS="$pgac_save_CFLAGS "
17472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17473 /* end confdefs.h. */
17474 #include <nmmintrin.h>
17478 unsigned int crc = 0;
17479 crc = _mm_crc32_u8(crc, 0);
17480 crc = _mm_crc32_u32(crc, 0);
17481 /* return computed value, to prevent the above being optimized away */
17487 if ac_fn_c_try_link "$LINENO"; then :
17488 pgac_cv_sse42_crc32_intrinsics_=yes
17490 pgac_cv_sse42_crc32_intrinsics_=no
17492 rm -f core conftest.err conftest.$ac_objext \
17493 conftest$ac_exeext conftest.$ac_ext
17494 CFLAGS="$pgac_save_CFLAGS"
17496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
17497 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
17498 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
17500 pgac_sse42_crc32_intrinsics=yes
17503 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
17504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
17505 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
17506 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
17507 $as_echo_n "(cached) " >&6
17509 pgac_save_CFLAGS=$CFLAGS
17510 CFLAGS="$pgac_save_CFLAGS -msse4.2"
17511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17512 /* end confdefs.h. */
17513 #include <nmmintrin.h>
17517 unsigned int crc = 0;
17518 crc = _mm_crc32_u8(crc, 0);
17519 crc = _mm_crc32_u32(crc, 0);
17520 /* return computed value, to prevent the above being optimized away */
17526 if ac_fn_c_try_link "$LINENO"; then :
17527 pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
17529 pgac_cv_sse42_crc32_intrinsics__msse4_2=no
17531 rm -f core conftest.err conftest.$ac_objext \
17532 conftest$ac_exeext conftest.$ac_ext
17533 CFLAGS="$pgac_save_CFLAGS"
17535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
17536 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
17537 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
17538 CFLAGS_SSE42="-msse4.2"
17539 pgac_sse42_crc32_intrinsics=yes
17545 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
17546 # define __SSE4_2__ in that case.
17547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17548 /* end confdefs.h. */
17555 #error __SSE4_2__ not defined
17562 if ac_fn_c_try_compile "$LINENO"; then :
17565 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17567 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
17569 # First check if __crc32c* intrinsics can be used with the default compiler
17570 # flags. If not, check if adding -march=armv8-a+crc flag helps.
17571 # CFLAGS_ARMV8_CRC32C is set if the extra flag is required.
17572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
17573 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
17574 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
17575 $as_echo_n "(cached) " >&6
17577 pgac_save_CFLAGS=$CFLAGS
17578 CFLAGS="$pgac_save_CFLAGS "
17579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17580 /* end confdefs.h. */
17581 #include <arm_acle.h>
17585 unsigned int crc = 0;
17586 crc = __crc32cb(crc, 0);
17587 crc = __crc32ch(crc, 0);
17588 crc = __crc32cw(crc, 0);
17589 crc = __crc32cd(crc, 0);
17590 /* return computed value, to prevent the above being optimized away */
17596 if ac_fn_c_try_link "$LINENO"; then :
17597 pgac_cv_armv8_crc32c_intrinsics_=yes
17599 pgac_cv_armv8_crc32c_intrinsics_=no
17601 rm -f core conftest.err conftest.$ac_objext \
17602 conftest$ac_exeext conftest.$ac_ext
17603 CFLAGS="$pgac_save_CFLAGS"
17605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
17606 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
17607 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
17608 CFLAGS_ARMV8_CRC32C=""
17609 pgac_armv8_crc32c_intrinsics=yes
17612 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
17613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
17614 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
17615 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
17616 $as_echo_n "(cached) " >&6
17618 pgac_save_CFLAGS=$CFLAGS
17619 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
17620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17621 /* end confdefs.h. */
17622 #include <arm_acle.h>
17626 unsigned int crc = 0;
17627 crc = __crc32cb(crc, 0);
17628 crc = __crc32ch(crc, 0);
17629 crc = __crc32cw(crc, 0);
17630 crc = __crc32cd(crc, 0);
17631 /* return computed value, to prevent the above being optimized away */
17637 if ac_fn_c_try_link "$LINENO"; then :
17638 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
17640 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
17642 rm -f core conftest.err conftest.$ac_objext \
17643 conftest$ac_exeext conftest.$ac_ext
17644 CFLAGS="$pgac_save_CFLAGS"
17646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
17647 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
17648 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
17649 CFLAGS_ARMV8_CRC32C="-march=armv8-a+crc"
17650 pgac_armv8_crc32c_intrinsics=yes
17656 # Select CRC-32C implementation.
17658 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
17659 # use the special CRC instructions for calculating CRC-32C. If we're not
17660 # targeting such a processor, but we can nevertheless produce code that uses
17661 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
17662 # implementations and select which one to use at runtime, depending on whether
17663 # SSE 4.2 is supported by the processor we're running on.
17665 # Similarly, if we are targeting an ARM processor that has the CRC
17666 # instructions that are part of the ARMv8 CRC Extension, use them. And if
17667 # we're not targeting such a processor, but can nevertheless produce code that
17668 # uses the CRC instructions, compile both, and select at runtime.
17670 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
17671 # in the template or configure command line.
17672 if 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
17673 # Use Intel SSE 4.2 if available.
17674 if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
17677 # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
17678 # the runtime check.
17679 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
17680 USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
17682 # Use ARM CRC Extension if available.
17683 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_ARMV8_CRC32C" = x""; then
17686 # ARM CRC Extension, with runtime check?
17687 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
17688 USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
17690 # fall back to slicing-by-8 algorithm, which doesn't require any
17691 # special CPU support.
17692 USE_SLICING_BY_8_CRC32C=1
17699 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
17700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
17701 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
17702 if test x"$USE_SSE42_CRC32C" = x"1"; then
17704 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
17706 PG_CRC32C_OBJS="pg_crc32c_sse42.o"
17707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
17708 $as_echo "SSE 4.2" >&6; }
17710 if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17712 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17714 PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
17715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
17716 $as_echo "SSE 4.2 with runtime check" >&6; }
17718 if test x"$USE_ARMV8_CRC32C" = x"1"; then
17720 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
17722 PG_CRC32C_OBJS="pg_crc32c_armv8.o"
17723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
17724 $as_echo "ARMv8 CRC instructions" >&6; }
17726 if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17728 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17730 PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
17731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
17732 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
17735 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
17737 PG_CRC32C_OBJS="pg_crc32c_sb8.o"
17738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
17739 $as_echo "slicing-by-8" >&6; }
17747 # Select semaphore implementation type.
17748 if test "$PORTNAME" != "win32"; then
17749 if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
17750 # Need sem_open for this
17751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
17752 $as_echo_n "checking for library containing sem_open... " >&6; }
17753 if ${ac_cv_search_sem_open+:} false; then :
17754 $as_echo_n "(cached) " >&6
17756 ac_func_search_save_LIBS=$LIBS
17757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17758 /* end confdefs.h. */
17760 /* Override any GCC internal prototype to avoid an error.
17761 Use char because int might match the return type of a GCC
17762 builtin and then its argument prototype would still apply. */
17770 return sem_open ();
17775 for ac_lib in '' rt pthread; do
17776 if test -z "$ac_lib"; then
17777 ac_res="none required"
17780 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17782 if ac_fn_c_try_link "$LINENO"; then :
17783 ac_cv_search_sem_open=$ac_res
17785 rm -f core conftest.err conftest.$ac_objext \
17787 if ${ac_cv_search_sem_open+:} false; then :
17791 if ${ac_cv_search_sem_open+:} false; then :
17794 ac_cv_search_sem_open=no
17796 rm conftest.$ac_ext
17797 LIBS=$ac_func_search_save_LIBS
17799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
17800 $as_echo "$ac_cv_search_sem_open" >&6; }
17801 ac_res=$ac_cv_search_sem_open
17802 if test "$ac_res" != no; then :
17803 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17804 USE_NAMED_POSIX_SEMAPHORES=1
17808 if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
17809 # Need sem_init for this
17810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
17811 $as_echo_n "checking for library containing sem_init... " >&6; }
17812 if ${ac_cv_search_sem_init+:} false; then :
17813 $as_echo_n "(cached) " >&6
17815 ac_func_search_save_LIBS=$LIBS
17816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17817 /* end confdefs.h. */
17819 /* Override any GCC internal prototype to avoid an error.
17820 Use char because int might match the return type of a GCC
17821 builtin and then its argument prototype would still apply. */
17829 return sem_init ();
17834 for ac_lib in '' rt pthread; do
17835 if test -z "$ac_lib"; then
17836 ac_res="none required"
17839 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17841 if ac_fn_c_try_link "$LINENO"; then :
17842 ac_cv_search_sem_init=$ac_res
17844 rm -f core conftest.err conftest.$ac_objext \
17846 if ${ac_cv_search_sem_init+:} false; then :
17850 if ${ac_cv_search_sem_init+:} false; then :
17853 ac_cv_search_sem_init=no
17855 rm conftest.$ac_ext
17856 LIBS=$ac_func_search_save_LIBS
17858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
17859 $as_echo "$ac_cv_search_sem_init" >&6; }
17860 ac_res=$ac_cv_search_sem_init
17861 if test "$ac_res" != no; then :
17862 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17863 USE_UNNAMED_POSIX_SEMAPHORES=1
17867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
17868 $as_echo_n "checking which semaphore API to use... " >&6; }
17869 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
17871 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17873 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17874 sematype="named POSIX"
17876 if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
17878 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17880 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17881 sematype="unnamed POSIX"
17884 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
17886 SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
17887 sematype="System V"
17890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
17891 $as_echo "$sematype" >&6; }
17894 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
17896 SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
17900 # Select shared-memory implementation type.
17901 if test "$PORTNAME" != "win32"; then
17903 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
17905 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
17908 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
17910 SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
17913 # Select random number source
17915 # You can override this logic by setting the appropriate USE_*RANDOM flag to 1
17916 # in the template or configure command line.
17918 # If not selected manually, try to select a source automatically.
17919 if test x"$USE_OPENSSL_RANDOM" = x"" && test x"$USE_WIN32_RANDOM" = x"" && test x"$USE_DEV_URANDOM" = x"" ; then
17920 if test x"$with_openssl" = x"yes" ; then
17921 USE_OPENSSL_RANDOM=1
17922 elif test "$PORTNAME" = "win32" ; then
17925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
17926 $as_echo_n "checking for /dev/urandom... " >&6; }
17927 if ${ac_cv_file__dev_urandom+:} false; then :
17928 $as_echo_n "(cached) " >&6
17930 test "$cross_compiling" = yes &&
17931 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
17932 if test -r "/dev/urandom"; then
17933 ac_cv_file__dev_urandom=yes
17935 ac_cv_file__dev_urandom=no
17938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
17939 $as_echo "$ac_cv_file__dev_urandom" >&6; }
17940 if test "x$ac_cv_file__dev_urandom" = xyes; then :
17945 if test x"$ac_cv_file__dev_urandom" = x"yes" ; then
17951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
17952 $as_echo_n "checking which random number source to use... " >&6; }
17953 if test x"$USE_OPENSSL_RANDOM" = x"1" ; then
17955 $as_echo "#define USE_OPENSSL_RANDOM 1" >>confdefs.h
17957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
17958 $as_echo "OpenSSL" >&6; }
17959 elif test x"$USE_WIN32_RANDOM" = x"1" ; then
17961 $as_echo "#define USE_WIN32_RANDOM 1" >>confdefs.h
17963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
17964 $as_echo "Windows native" >&6; }
17965 elif test x"$USE_DEV_URANDOM" = x"1" ; then
17967 $as_echo "#define USE_DEV_URANDOM 1" >>confdefs.h
17969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
17970 $as_echo "/dev/urandom" >&6; }
17973 no source of strong random numbers was found
17974 PostgreSQL can use OpenSSL or /dev/urandom as a source of random numbers." "$LINENO" 5
17977 # If not set in template file, set bytes to use libc memset()
17978 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
17979 MEMSET_LOOP_LIMIT=1024
17982 cat >>confdefs.h <<_ACEOF
17983 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
17988 if test "$enable_nls" = yes ; then
17990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
17991 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
17992 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17993 $as_echo_n "(cached) " >&6
17995 ac_func_search_save_LIBS=$LIBS
17996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17997 /* end confdefs.h. */
17999 /* Override any GCC internal prototype to avoid an error.
18000 Use char because int might match the return type of a GCC
18001 builtin and then its argument prototype would still apply. */
18005 char bind_textdomain_codeset ();
18009 return bind_textdomain_codeset ();
18014 for ac_lib in '' intl; do
18015 if test -z "$ac_lib"; then
18016 ac_res="none required"
18019 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18021 if ac_fn_c_try_link "$LINENO"; then :
18022 ac_cv_search_bind_textdomain_codeset=$ac_res
18024 rm -f core conftest.err conftest.$ac_objext \
18026 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18030 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18033 ac_cv_search_bind_textdomain_codeset=no
18035 rm conftest.$ac_ext
18036 LIBS=$ac_func_search_save_LIBS
18038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
18039 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
18040 ac_res=$ac_cv_search_bind_textdomain_codeset
18041 if test "$ac_res" != no; then :
18042 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18045 as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
18048 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
18049 if test "x$ac_cv_header_libintl_h" = xyes; then :
18052 as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
18056 if test -z "$MSGFMT"; then
18057 for ac_prog in msgfmt
18059 # Extract the first word of "$ac_prog", so it can be a program name with args.
18060 set dummy $ac_prog; ac_word=$2
18061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18062 $as_echo_n "checking for $ac_word... " >&6; }
18063 if ${ac_cv_path_MSGFMT+:} false; then :
18064 $as_echo_n "(cached) " >&6
18068 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
18071 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18072 for as_dir in $PATH
18075 test -z "$as_dir" && as_dir=.
18076 for ac_exec_ext in '' $ac_executable_extensions; do
18077 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18078 ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
18079 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18089 MSGFMT=$ac_cv_path_MSGFMT
18090 if test -n "$MSGFMT"; then
18091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18092 $as_echo "$MSGFMT" >&6; }
18094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18095 $as_echo "no" >&6; }
18099 test -n "$MSGFMT" && break
18103 # Report the value of MSGFMT in configure's output in all cases.
18104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
18105 $as_echo_n "checking for MSGFMT... " >&6; }
18106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18107 $as_echo "$MSGFMT" >&6; }
18110 if test -z "$MSGFMT"; then
18111 as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
18113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
18114 $as_echo_n "checking for msgfmt flags... " >&6; }
18115 if ${pgac_cv_msgfmt_flags+:} false; then :
18116 $as_echo_n "(cached) " >&6
18118 if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
18119 pgac_cv_msgfmt_flags=-c
18122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
18123 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
18124 MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
18126 if test -z "$MSGMERGE"; then
18127 for ac_prog in msgmerge
18129 # Extract the first word of "$ac_prog", so it can be a program name with args.
18130 set dummy $ac_prog; ac_word=$2
18131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18132 $as_echo_n "checking for $ac_word... " >&6; }
18133 if ${ac_cv_path_MSGMERGE+:} false; then :
18134 $as_echo_n "(cached) " >&6
18138 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18141 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18142 for as_dir in $PATH
18145 test -z "$as_dir" && as_dir=.
18146 for ac_exec_ext in '' $ac_executable_extensions; do
18147 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18148 ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
18149 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18159 MSGMERGE=$ac_cv_path_MSGMERGE
18160 if test -n "$MSGMERGE"; then
18161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18162 $as_echo "$MSGMERGE" >&6; }
18164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18165 $as_echo "no" >&6; }
18169 test -n "$MSGMERGE" && break
18173 # Report the value of MSGMERGE in configure's output in all cases.
18174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18175 $as_echo_n "checking for MSGMERGE... " >&6; }
18176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18177 $as_echo "$MSGMERGE" >&6; }
18180 if test -z "$XGETTEXT"; then
18181 for ac_prog in xgettext
18183 # Extract the first word of "$ac_prog", so it can be a program name with args.
18184 set dummy $ac_prog; ac_word=$2
18185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18186 $as_echo_n "checking for $ac_word... " >&6; }
18187 if ${ac_cv_path_XGETTEXT+:} false; then :
18188 $as_echo_n "(cached) " >&6
18192 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18195 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18196 for as_dir in $PATH
18199 test -z "$as_dir" && as_dir=.
18200 for ac_exec_ext in '' $ac_executable_extensions; do
18201 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18202 ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18203 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18213 XGETTEXT=$ac_cv_path_XGETTEXT
18214 if test -n "$XGETTEXT"; then
18215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18216 $as_echo "$XGETTEXT" >&6; }
18218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18219 $as_echo "no" >&6; }
18223 test -n "$XGETTEXT" && break
18227 # Report the value of XGETTEXT in configure's output in all cases.
18228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18229 $as_echo_n "checking for XGETTEXT... " >&6; }
18230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18231 $as_echo "$XGETTEXT" >&6; }
18237 # Check for Tcl configuration script tclConfig.sh
18238 if test "$with_tcl" = yes; then
18239 if test -z "$TCLSH"; then
18240 for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18242 # Extract the first word of "$ac_prog", so it can be a program name with args.
18243 set dummy $ac_prog; ac_word=$2
18244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18245 $as_echo_n "checking for $ac_word... " >&6; }
18246 if ${ac_cv_path_TCLSH+:} false; then :
18247 $as_echo_n "(cached) " >&6
18251 ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18254 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18255 for as_dir in $PATH
18258 test -z "$as_dir" && as_dir=.
18259 for ac_exec_ext in '' $ac_executable_extensions; do
18260 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18261 ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18262 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18272 TCLSH=$ac_cv_path_TCLSH
18273 if test -n "$TCLSH"; then
18274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18275 $as_echo "$TCLSH" >&6; }
18277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18278 $as_echo "no" >&6; }
18282 test -n "$TCLSH" && break
18286 # Report the value of TCLSH in configure's output in all cases.
18287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18288 $as_echo_n "checking for TCLSH... " >&6; }
18289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18290 $as_echo "$TCLSH" >&6; }
18293 if test x"$TCLSH" = x""; then
18294 as_fn_error $? "Tcl shell not found" "$LINENO" 5
18297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18298 $as_echo_n "checking for tclConfig.sh... " >&6; }
18299 # Let user override test
18300 if test -z "$TCL_CONFIG_SH"; then
18301 pgac_test_dirs="$with_tclconfig"
18303 set X $pgac_test_dirs; shift
18304 if test $# -eq 0; then
18305 test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18306 pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18307 # On newer macOS, $auto_path frequently doesn't include the place
18308 # where tclConfig.sh actually lives. Append that to the end, so as not
18309 # to break cases where a non-default Tcl installation is being used.
18310 if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18311 pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18313 set X $pgac_test_dirs; shift
18317 if test -r "$pgac_dir/tclConfig.sh"; then
18318 TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18324 if test -z "$TCL_CONFIG_SH"; then
18325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18326 $as_echo "no" >&6; }
18327 as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18330 $as_echo "$TCL_CONFIG_SH" >&6; }
18336 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18337 eval TCL_LIBS=\"$TCL_LIBS\"
18338 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18339 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18341 if test "$TCL_SHARED_BUILD" != 1; then
18342 as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18343 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18345 # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18346 ac_save_CPPFLAGS=$CPPFLAGS
18347 CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18348 ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18349 if test "x$ac_cv_header_tcl_h" = xyes; then :
18352 as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18356 CPPFLAGS=$ac_save_CPPFLAGS
18359 # check for <perl.h>
18360 if test "$with_perl" = yes; then
18361 ac_save_CPPFLAGS=$CPPFLAGS
18362 CPPFLAGS="$CPPFLAGS $perl_includespec"
18363 ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18365 if test "x$ac_cv_header_perl_h" = xyes; then :
18368 as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18372 # While we're at it, check that we can link to libperl.
18373 # On most platforms, if perl.h is there then libperl.so will be too, but at
18374 # this writing Debian packages them separately. There is no known reason to
18375 # waste cycles on separate probes for the Tcl or Python libraries, though.
18376 pgac_save_LIBS=$LIBS
18377 LIBS="$perl_embed_ldflags"
18378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18379 $as_echo_n "checking for libperl... " >&6; }
18380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18381 /* end confdefs.h. */
18383 #include <EXTERN.h>
18394 if ac_fn_c_try_link "$LINENO"; then :
18395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18396 $as_echo "yes" >&6; }
18398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18399 $as_echo "no" >&6; }
18400 as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18402 rm -f core conftest.err conftest.$ac_objext \
18403 conftest$ac_exeext conftest.$ac_ext
18404 LIBS=$pgac_save_LIBS
18405 CPPFLAGS=$ac_save_CPPFLAGS
18408 # check for <Python.h>
18409 if test "$with_python" = yes; then
18410 ac_save_CPPFLAGS=$CPPFLAGS
18411 CPPFLAGS="$python_includespec $CPPFLAGS"
18412 ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18413 if test "x$ac_cv_header_Python_h" = xyes; then :
18416 as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18420 CPPFLAGS=$ac_save_CPPFLAGS
18424 # Check for DocBook and tools
18426 if test -z "$XMLLINT"; then
18427 for ac_prog in xmllint
18429 # Extract the first word of "$ac_prog", so it can be a program name with args.
18430 set dummy $ac_prog; ac_word=$2
18431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18432 $as_echo_n "checking for $ac_word... " >&6; }
18433 if ${ac_cv_path_XMLLINT+:} false; then :
18434 $as_echo_n "(cached) " >&6
18438 ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18441 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18442 for as_dir in $PATH
18445 test -z "$as_dir" && as_dir=.
18446 for ac_exec_ext in '' $ac_executable_extensions; do
18447 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18448 ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18449 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18459 XMLLINT=$ac_cv_path_XMLLINT
18460 if test -n "$XMLLINT"; then
18461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18462 $as_echo "$XMLLINT" >&6; }
18464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18465 $as_echo "no" >&6; }
18469 test -n "$XMLLINT" && break
18473 # Report the value of XMLLINT in configure's output in all cases.
18474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18475 $as_echo_n "checking for XMLLINT... " >&6; }
18476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18477 $as_echo "$XMLLINT" >&6; }
18481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook XML V4.2" >&5
18482 $as_echo_n "checking for DocBook XML V4.2... " >&6; }
18483 if ${pgac_cv_check_docbook+:} false; then :
18484 $as_echo_n "(cached) " >&6
18486 cat >conftest.xml <<EOF
18487 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
18489 <title>test</title>
18491 <title>random</title>
18493 <title>testsect</title>
18500 pgac_cv_check_docbook=no
18502 if test -n "$XMLLINT"; then
18503 $XMLLINT --noout --valid conftest.xml 1>&5 2>&1
18504 if test $? -eq 0; then
18505 pgac_cv_check_docbook=yes
18510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
18511 $as_echo "$pgac_cv_check_docbook" >&6; }
18513 have_docbook=$pgac_cv_check_docbook
18516 if test -z "$DBTOEPUB"; then
18517 for ac_prog in dbtoepub
18519 # Extract the first word of "$ac_prog", so it can be a program name with args.
18520 set dummy $ac_prog; ac_word=$2
18521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18522 $as_echo_n "checking for $ac_word... " >&6; }
18523 if ${ac_cv_path_DBTOEPUB+:} false; then :
18524 $as_echo_n "(cached) " >&6
18528 ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
18531 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18532 for as_dir in $PATH
18535 test -z "$as_dir" && as_dir=.
18536 for ac_exec_ext in '' $ac_executable_extensions; do
18537 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18538 ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
18539 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18549 DBTOEPUB=$ac_cv_path_DBTOEPUB
18550 if test -n "$DBTOEPUB"; then
18551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18552 $as_echo "$DBTOEPUB" >&6; }
18554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18555 $as_echo "no" >&6; }
18559 test -n "$DBTOEPUB" && break
18563 # Report the value of DBTOEPUB in configure's output in all cases.
18564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
18565 $as_echo_n "checking for DBTOEPUB... " >&6; }
18566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18567 $as_echo "$DBTOEPUB" >&6; }
18570 if test -z "$XSLTPROC"; then
18571 for ac_prog in xsltproc
18573 # Extract the first word of "$ac_prog", so it can be a program name with args.
18574 set dummy $ac_prog; ac_word=$2
18575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18576 $as_echo_n "checking for $ac_word... " >&6; }
18577 if ${ac_cv_path_XSLTPROC+:} false; then :
18578 $as_echo_n "(cached) " >&6
18582 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18585 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18586 for as_dir in $PATH
18589 test -z "$as_dir" && as_dir=.
18590 for ac_exec_ext in '' $ac_executable_extensions; do
18591 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18592 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18593 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18603 XSLTPROC=$ac_cv_path_XSLTPROC
18604 if test -n "$XSLTPROC"; then
18605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18606 $as_echo "$XSLTPROC" >&6; }
18608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18609 $as_echo "no" >&6; }
18613 test -n "$XSLTPROC" && break
18617 # Report the value of XSLTPROC in configure's output in all cases.
18618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18619 $as_echo_n "checking for XSLTPROC... " >&6; }
18620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18621 $as_echo "$XSLTPROC" >&6; }
18624 if test -z "$FOP"; then
18627 # Extract the first word of "$ac_prog", so it can be a program name with args.
18628 set dummy $ac_prog; ac_word=$2
18629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18630 $as_echo_n "checking for $ac_word... " >&6; }
18631 if ${ac_cv_path_FOP+:} false; then :
18632 $as_echo_n "(cached) " >&6
18636 ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
18639 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18640 for as_dir in $PATH
18643 test -z "$as_dir" && as_dir=.
18644 for ac_exec_ext in '' $ac_executable_extensions; do
18645 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18646 ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
18647 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18657 FOP=$ac_cv_path_FOP
18658 if test -n "$FOP"; then
18659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18660 $as_echo "$FOP" >&6; }
18662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18663 $as_echo "no" >&6; }
18667 test -n "$FOP" && break
18671 # Report the value of FOP in configure's output in all cases.
18672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
18673 $as_echo_n "checking for FOP... " >&6; }
18674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18675 $as_echo "$FOP" >&6; }
18680 # Check for test tools
18682 if test "$enable_tap_tests" = yes; then
18683 # Check for necessary modules, unless user has specified the "prove" to use;
18684 # in that case it's her responsibility to have a working configuration.
18685 # (prove might be part of a different Perl installation than perl, eg on
18686 # MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)
18687 if test -z "$PROVE"; then
18688 # Test::More and Time::HiRes are supposed to be part of core Perl,
18689 # but some distros omit them in a minimal installation.
18700 # Make sure we have perl
18701 if test -z "$PERL"; then
18702 # Extract the first word of "perl", so it can be a program name with args.
18703 set dummy perl; ac_word=$2
18704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18705 $as_echo_n "checking for $ac_word... " >&6; }
18706 if ${ac_cv_prog_PERL+:} false; then :
18707 $as_echo_n "(cached) " >&6
18709 if test -n "$PERL"; then
18710 ac_cv_prog_PERL="$PERL" # Let the user override the test.
18712 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18713 for as_dir in $PATH
18716 test -z "$as_dir" && as_dir=.
18717 for ac_exec_ext in '' $ac_executable_extensions; do
18718 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18719 ac_cv_prog_PERL="perl"
18720 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18729 PERL=$ac_cv_prog_PERL
18730 if test -n "$PERL"; then
18731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
18732 $as_echo "$PERL" >&6; }
18734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18735 $as_echo "no" >&6; }
18741 if test "x$PERL" != x; then
18742 ax_perl_modules_failed=0
18743 for ax_perl_module in 'IPC::Run' 'Test::More 0.87' 'Time::HiRes' ; do
18744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl module $ax_perl_module" >&5
18745 $as_echo_n "checking for perl module $ax_perl_module... " >&6; }
18747 # Would be nice to log result here, but can't rely on autoconf internals
18748 $PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1
18749 if test $? -ne 0; then
18750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18751 $as_echo "no" >&6; };
18752 ax_perl_modules_failed=1
18754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
18755 $as_echo "ok" >&6; };
18759 # Run optional shell commands
18760 if test "$ax_perl_modules_failed" = 0; then
18765 as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
18768 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5
18769 $as_echo "$as_me: WARNING: could not find perl" >&2;}
18772 # Now make sure we know where prove is
18773 if test -z "$PROVE"; then
18774 for ac_prog in prove
18776 # Extract the first word of "$ac_prog", so it can be a program name with args.
18777 set dummy $ac_prog; ac_word=$2
18778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18779 $as_echo_n "checking for $ac_word... " >&6; }
18780 if ${ac_cv_path_PROVE+:} false; then :
18781 $as_echo_n "(cached) " >&6
18785 ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
18788 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18789 for as_dir in $PATH
18792 test -z "$as_dir" && as_dir=.
18793 for ac_exec_ext in '' $ac_executable_extensions; do
18794 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18795 ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
18796 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18806 PROVE=$ac_cv_path_PROVE
18807 if test -n "$PROVE"; then
18808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18809 $as_echo "$PROVE" >&6; }
18811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18812 $as_echo "no" >&6; }
18816 test -n "$PROVE" && break
18820 # Report the value of PROVE in configure's output in all cases.
18821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
18822 $as_echo_n "checking for PROVE... " >&6; }
18823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18824 $as_echo "$PROVE" >&6; }
18827 if test -z "$PROVE"; then
18828 as_fn_error $? "prove not found" "$LINENO" 5
18834 # We have to run the thread test near the end so we have all our symbols
18835 # defined. Cross compiling throws a warning.
18837 if test "$enable_thread_safety" = yes; then
18838 if test "$PORTNAME" != "win32"
18840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
18841 $as_echo_n "checking thread safety of required library functions... " >&6; }
18845 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
18846 LIBS="$LIBS $PTHREAD_LIBS"
18847 if test "$cross_compiling" = yes; then :
18848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
18849 $as_echo "maybe" >&6; }
18850 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
18851 *** Skipping thread test program because of cross-compile build.
18852 *** Run the program in src/test/thread on the target machine.
18854 $as_echo "$as_me: WARNING:
18855 *** Skipping thread test program because of cross-compile build.
18856 *** Run the program in src/test/thread on the target machine.
18859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18860 /* end confdefs.h. */
18861 #include "$srcdir/src/test/thread/thread_test.c"
18863 if ac_fn_c_try_run "$LINENO"; then :
18864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18865 $as_echo "yes" >&6; }
18867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18868 $as_echo "no" >&6; }
18869 as_fn_error $? "thread test program failed
18870 This platform is not thread-safe. Check the file 'config.log' or compile
18871 and run src/test/thread/thread_test for the exact reason.
18872 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
18874 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18875 conftest.$ac_objext conftest.beam conftest.$ac_ext
18881 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
18882 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
18886 # If compiler will take -Wl,--as-needed (or various platform-specific
18887 # spellings thereof) then add that to LDFLAGS. This is much easier than
18888 # trying to filter LIBS to the minimum for each executable.
18889 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
18890 # libreadline; therefore we postpone testing it until we know what library
18891 # dependencies readline has. The test code will try to link with $LIBS.
18892 if test "$with_readline" = yes; then
18893 link_test_func=readline
18895 link_test_func=exit
18898 if test "$PORTNAME" = "darwin"; then
18899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
18900 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
18901 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
18902 $as_echo_n "(cached) " >&6
18904 pgac_save_LDFLAGS=$LDFLAGS
18905 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
18906 if test "$cross_compiling" = yes; then :
18907 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
18909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18910 /* end confdefs.h. */
18911 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18920 if ac_fn_c_try_run "$LINENO"; then :
18921 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
18923 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
18925 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18926 conftest.$ac_objext conftest.beam conftest.$ac_ext
18929 LDFLAGS="$pgac_save_LDFLAGS"
18931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
18932 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
18933 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
18934 LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
18937 elif test "$PORTNAME" = "openbsd"; then
18938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
18939 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
18940 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
18941 $as_echo_n "(cached) " >&6
18943 pgac_save_LDFLAGS=$LDFLAGS
18944 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
18945 if test "$cross_compiling" = yes; then :
18946 pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
18948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18949 /* end confdefs.h. */
18950 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18959 if ac_fn_c_try_run "$LINENO"; then :
18960 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
18962 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
18964 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18965 conftest.$ac_objext conftest.beam conftest.$ac_ext
18968 LDFLAGS="$pgac_save_LDFLAGS"
18970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
18971 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
18972 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
18973 LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
18977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
18978 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
18979 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
18980 $as_echo_n "(cached) " >&6
18982 pgac_save_LDFLAGS=$LDFLAGS
18983 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
18984 if test "$cross_compiling" = yes; then :
18985 pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
18987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18988 /* end confdefs.h. */
18989 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18998 if ac_fn_c_try_run "$LINENO"; then :
18999 pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
19001 pgac_cv_prog_cc_ldflags__Wl___as_needed=no
19003 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19004 conftest.$ac_objext conftest.beam conftest.$ac_ext
19007 LDFLAGS="$pgac_save_LDFLAGS"
19009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
19010 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
19011 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
19012 LDFLAGS="$LDFLAGS -Wl,--as-needed"
19017 # Create compiler version string
19018 if test x"$GCC" = x"yes" ; then
19019 cc_string=`${CC} --version | sed q`
19020 case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
19021 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
19022 cc_string=`${CC} -V 2>&1 | sed q`
19028 cat >>confdefs.h <<_ACEOF
19029 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
19033 # Supply a numeric version string for use by 3rd party add-ons
19034 # awk -F is a regex on some platforms, and not on others, so make "." a tab
19035 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
19037 $AWK '{printf "%d%04d", $1, $2}'`"
19039 cat >>confdefs.h <<_ACEOF
19040 #define PG_VERSION_NUM $PG_VERSION_NUM
19045 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
19046 # literally, so that it's possible to override it at build time using
19047 # a command like "make ... PG_SYSROOT=path". This has to be done after
19048 # we've finished all configure checks that depend on CPPFLAGS.
19049 if test x"$PG_SYSROOT" != x; then
19050 CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19055 # Begin output steps
19057 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
19058 $as_echo "$as_me: using compiler=$cc_string" >&6;}
19059 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
19060 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
19061 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
19062 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
19063 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
19064 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
19065 # Currently only used when LLVM is used
19066 if test "$with_llvm" = yes ; then
19067 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
19068 $as_echo "$as_me: using CXX=$CXX" >&6;}
19069 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
19070 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
19071 { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
19072 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
19073 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
19074 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
19075 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
19076 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
19079 # prepare build tree if outside source tree
19080 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
19081 # Note 2: /bin/pwd might be better than shell's built-in at getting
19082 # a symlink-free name.
19083 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
19087 if test "$no_create" != yes; then
19088 $as_echo_n "preparing build tree... " >&6
19089 pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
19090 $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
19091 || as_fn_error $? "failed" "$LINENO" 5
19092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
19093 $as_echo "done" >&6; }
19099 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
19102 ac_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}"
19105 if test "$PORTNAME" = "win32"; then
19106 ac_config_commands="$ac_config_commands check_win32_symlinks"
19110 ac_config_headers="$ac_config_headers src/include/pg_config.h"
19113 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
19116 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
19119 cat >confcache <<\_ACEOF
19120 # This file is a shell script that caches the results of configure
19121 # tests run on this system so they can be shared between configure
19122 # scripts and configure runs, see configure's option --config-cache.
19123 # It is not useful on other systems. If it contains results you don't
19124 # want to keep, you may remove or edit it.
19126 # config.status only pays attention to the cache file if you give it
19127 # the --recheck option to rerun configure.
19129 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19130 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19131 # following values.
19135 # The following way of writing the cache mishandles newlines in values,
19136 # but we know of no workaround that is simple, portable, and efficient.
19137 # So, we kill variables containing newlines.
19138 # Ultrix sh set writes to stderr and can't be redirected directly,
19139 # and sets the high bit in the cache file unless we assign to the vars.
19141 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19142 eval ac_val=\$$ac_var
19146 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19147 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19150 _ | IFS | as_nl) ;; #(
19151 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19152 *) { eval $ac_var=; unset $ac_var;} ;;
19158 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19159 *${as_nl}ac_space=\ *)
19160 # `set' does not quote correctly, so add quotes: double-quote
19161 # substitution turns \\\\ into \\, and sed turns \\ into \.
19164 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19167 # `set' quotes correctly as required by POSIX, so do not add quotes.
19168 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19177 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19179 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19181 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19182 if test -w "$cache_file"; then
19183 if test "x$cache_file" != "x/dev/null"; then
19184 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19185 $as_echo "$as_me: updating cache $cache_file" >&6;}
19186 if test ! -f "$cache_file" || test -h "$cache_file"; then
19187 cat confcache >"$cache_file"
19189 case $cache_file in #(
19191 mv -f confcache "$cache_file"$$ &&
19192 mv -f "$cache_file"$$ "$cache_file" ;; #(
19194 mv -f confcache "$cache_file" ;;
19199 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19200 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19205 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19206 # Let make expand exec_prefix.
19207 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19209 DEFS=-DHAVE_CONFIG_H
19214 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19215 # 1. Remove the extension, and $U if already installed.
19216 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19217 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19218 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19219 # will be set to the directory where LIBOBJS objects are built.
19220 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19221 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19223 LIBOBJS=$ac_libobjs
19225 LTLIBOBJS=$ac_ltlibobjs
19230 : "${CONFIG_STATUS=./config.status}"
19232 ac_clean_files_save=$ac_clean_files
19233 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19234 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19235 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19237 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19239 # Generated by $as_me.
19240 # Run this file to recreate the current configuration.
19241 # Compiler output produced by configure, useful for debugging
19242 # configure, is in config.log if it exists.
19245 ac_cs_recheck=false
19248 SHELL=\${CONFIG_SHELL-$SHELL}
19251 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19252 ## -------------------- ##
19253 ## M4sh Initialization. ##
19254 ## -------------------- ##
19256 # Be more Bourne compatible
19257 DUALCASE=1; export DUALCASE # for MKS sh
19258 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19261 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19262 # is contrary to our usage. Disable this feature.
19263 alias -g '${1+"$@"}'='"$@"'
19264 setopt NO_GLOB_SUBST
19266 case `(set -o) 2>/dev/null` in #(
19278 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19279 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19280 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19281 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19282 # Prefer a ksh shell builtin over an external printf program on Solaris,
19283 # but without wasting forks for bash or zsh.
19284 if test -z "$BASH_VERSION$ZSH_VERSION" \
19285 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19286 as_echo='print -r --'
19287 as_echo_n='print -rn --'
19288 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19289 as_echo='printf %s\n'
19290 as_echo_n='printf %s'
19292 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19293 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19294 as_echo_n='/usr/ucb/echo -n'
19296 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19297 as_echo_n_body='eval
19301 expr "X$arg" : "X\\(.*\\)$as_nl";
19302 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19304 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19306 export as_echo_n_body
19307 as_echo_n='sh -c $as_echo_n_body as_echo'
19309 export as_echo_body
19310 as_echo='sh -c $as_echo_body as_echo'
19313 # The user is always right.
19314 if test "${PATH_SEPARATOR+set}" != set; then
19316 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19317 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19324 # We need space, tab and new line, in precisely that order. Quoting is
19325 # there to prevent editors from complaining about space-tab.
19326 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19327 # splitting by setting IFS to empty value.)
19330 # Find who we are. Look in the path if we contain no directory separator.
19333 *[\\/]* ) as_myself=$0 ;;
19334 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19335 for as_dir in $PATH
19338 test -z "$as_dir" && as_dir=.
19339 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19345 # We did not find ourselves, most probably we were run as `sh COMMAND'
19346 # in which case we are not to be found in the path.
19347 if test "x$as_myself" = x; then
19350 if test ! -f "$as_myself"; then
19351 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19355 # Unset variables that we do not need and which cause bugs (e.g. in
19356 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19357 # suppresses any "Segmentation fault" message there. '((' could
19358 # trigger a bug in pdksh 5.2.14.
19359 for as_var in BASH_ENV ENV MAIL MAILPATH
19360 do eval test x\${$as_var+set} = xset \
19361 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19374 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19377 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19378 # ----------------------------------------
19379 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19380 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19381 # script with STATUS, using 1 if that was 0.
19384 as_status=$1; test $as_status -eq 0 && as_status=1
19386 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19387 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19389 $as_echo "$as_me: error: $2" >&2
19390 as_fn_exit $as_status
19394 # as_fn_set_status STATUS
19395 # -----------------------
19396 # Set $? to STATUS, without forking.
19397 as_fn_set_status ()
19400 } # as_fn_set_status
19402 # as_fn_exit STATUS
19403 # -----------------
19404 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19408 as_fn_set_status $1
19414 # Portably unset VAR.
19417 { eval $1=; unset $1;}
19419 as_unset=as_fn_unset
19420 # as_fn_append VAR VALUE
19421 # ----------------------
19422 # Append the text in VALUE to the end of the definition contained in VAR. Take
19423 # advantage of any shell optimizations that allow amortized linear growth over
19424 # repeated appends, instead of the typical quadratic growth present in naive
19426 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19427 eval 'as_fn_append ()
19438 # as_fn_arith ARG...
19439 # ------------------
19440 # Perform arithmetic evaluation on the ARGs, and store the result in the
19441 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19442 # must be portable across $(()) and expr.
19443 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19444 eval 'as_fn_arith ()
19451 as_val=`expr "$@" || test $? -eq 1`
19456 if expr a : '\(a\)' >/dev/null 2>&1 &&
19457 test "X`expr 00001 : '.*\(...\)'`" = X001; then
19463 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19464 as_basename=basename
19469 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19475 as_me=`$as_basename -- "$0" ||
19476 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19477 X"$0" : 'X\(//\)$' \| \
19478 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19480 sed '/^.*\/\([^/][^/]*\)\/*$/{
19494 # Avoid depending upon Character Ranges.
19495 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19496 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19497 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19498 as_cr_digits='0123456789'
19499 as_cr_alnum=$as_cr_Letters$as_cr_digits
19501 ECHO_C= ECHO_N= ECHO_T=
19502 case `echo -n x` in #(((((
19504 case `echo 'xy\c'` in
19505 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19507 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19514 rm -f conf$$ conf$$.exe conf$$.file
19515 if test -d conf$$.dir; then
19516 rm -f conf$$.dir/conf$$.file
19519 mkdir conf$$.dir 2>/dev/null
19521 if (echo >conf$$.file) 2>/dev/null; then
19522 if ln -s conf$$.file conf$$ 2>/dev/null; then
19524 # ... but there are two gotchas:
19525 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19526 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19527 # In both cases, we have to default to `cp -pR'.
19528 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19530 elif ln conf$$.file conf$$ 2>/dev/null; then
19538 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19539 rmdir conf$$.dir 2>/dev/null
19544 # Create "$as_dir" as a directory, including parents if necessary.
19549 -*) as_dir=./$as_dir;;
19551 test -d "$as_dir" || eval $as_mkdir_p || {
19555 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19556 *) as_qdir=$as_dir;;
19558 as_dirs="'$as_qdir' $as_dirs"
19559 as_dir=`$as_dirname -- "$as_dir" ||
19560 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19561 X"$as_dir" : 'X\(//\)[^/]' \| \
19562 X"$as_dir" : 'X\(//\)$' \| \
19563 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19564 $as_echo X"$as_dir" |
19565 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19569 /^X\(\/\/\)[^/].*/{
19582 test -d "$as_dir" && break
19584 test -z "$as_dirs" || eval "mkdir $as_dirs"
19585 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19589 if mkdir -p . 2>/dev/null; then
19590 as_mkdir_p='mkdir -p "$as_dir"'
19592 test -d ./-p && rmdir ./-p
19597 # as_fn_executable_p FILE
19598 # -----------------------
19599 # Test if FILE is an executable regular file.
19600 as_fn_executable_p ()
19602 test -f "$1" && test -x "$1"
19603 } # as_fn_executable_p
19604 as_test_x='test -x'
19605 as_executable_p=as_fn_executable_p
19607 # Sed expression to map a string onto a valid CPP name.
19608 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19610 # Sed expression to map a string onto a valid variable name.
19611 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19615 ## ----------------------------------- ##
19616 ## Main body of $CONFIG_STATUS script. ##
19617 ## ----------------------------------- ##
19619 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19621 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19622 # Save the log message, to keep $0 and so on meaningful, and to
19623 # report actual input values of CONFIG_FILES etc. instead of their
19624 # values after options handling.
19626 This file was extended by PostgreSQL $as_me 12devel, which was
19627 generated by GNU Autoconf 2.69. Invocation command line was
19629 CONFIG_FILES = $CONFIG_FILES
19630 CONFIG_HEADERS = $CONFIG_HEADERS
19631 CONFIG_LINKS = $CONFIG_LINKS
19632 CONFIG_COMMANDS = $CONFIG_COMMANDS
19635 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19640 case $ac_config_files in *"
19641 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19644 case $ac_config_headers in *"
19645 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19649 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19650 # Files that config.status was made for.
19651 config_files="$ac_config_files"
19652 config_headers="$ac_config_headers"
19653 config_links="$ac_config_links"
19654 config_commands="$ac_config_commands"
19658 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19660 \`$as_me' instantiates files and other configuration actions
19661 from templates according to the current configuration. Unless the files
19662 and actions are specified as TAGs, all are instantiated by default.
19664 Usage: $0 [OPTION]... [TAG]...
19666 -h, --help print this help, then exit
19667 -V, --version print version number and configuration settings, then exit
19668 --config print configuration, then exit
19669 -q, --quiet, --silent
19670 do not print progress messages
19671 -d, --debug don't remove temporary files
19672 --recheck update $as_me by reconfiguring in the same conditions
19673 --file=FILE[:TEMPLATE]
19674 instantiate the configuration file FILE
19675 --header=FILE[:TEMPLATE]
19676 instantiate the configuration header FILE
19678 Configuration files:
19681 Configuration headers:
19684 Configuration links:
19687 Configuration commands:
19690 Report bugs to <pgsql-bugs@lists.postgresql.org>."
19693 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19694 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19696 PostgreSQL config.status 12devel
19697 configured by $0, generated by GNU Autoconf 2.69,
19698 with options \\"\$ac_cs_config\\"
19700 Copyright (C) 2012 Free Software Foundation, Inc.
19701 This config.status script is free software; the Free Software Foundation
19702 gives unlimited permission to copy, distribute and modify it."
19709 test -n "\$AWK" || AWK=awk
19712 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19713 # The default lists apply if the user does not specify any file.
19719 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19720 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19724 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19736 # Handling of the options.
19737 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19739 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19740 $as_echo "$ac_cs_version"; exit ;;
19741 --config | --confi | --conf | --con | --co | --c )
19742 $as_echo "$ac_cs_config"; exit ;;
19743 --debug | --debu | --deb | --de | --d | -d )
19745 --file | --fil | --fi | --f )
19748 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19749 '') as_fn_error $? "missing file argument" ;;
19751 as_fn_append CONFIG_FILES " '$ac_optarg'"
19752 ac_need_defaults=false;;
19753 --header | --heade | --head | --hea )
19756 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19758 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19759 ac_need_defaults=false;;
19761 # Conflict between --help and --header
19762 as_fn_error $? "ambiguous option: \`$1'
19763 Try \`$0 --help' for more information.";;
19764 --help | --hel | -h )
19765 $as_echo "$ac_cs_usage"; exit ;;
19766 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19767 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19770 # This is an error.
19771 -*) as_fn_error $? "unrecognized option: \`$1'
19772 Try \`$0 --help' for more information." ;;
19774 *) as_fn_append ac_config_targets " $1"
19775 ac_need_defaults=false ;;
19781 ac_configure_extra_args=
19783 if $ac_cs_silent; then
19785 ac_configure_extra_args="$ac_configure_extra_args --silent"
19789 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19790 if \$ac_cs_recheck; then
19791 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19793 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19794 CONFIG_SHELL='$SHELL'
19795 export CONFIG_SHELL
19800 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19804 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19805 ## Running $as_me. ##
19811 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19814 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19816 # Handling of arguments.
19817 for ac_config_target in $ac_config_targets
19819 case $ac_config_target in
19820 "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
19821 "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
19822 "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
19823 "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
19824 "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
19825 "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
19826 "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
19827 "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
19828 "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
19829 "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
19830 "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
19832 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19837 # If the user did not use the arguments to specify the items to instantiate,
19838 # then the envvar interface is used. Set only those that are not.
19839 # We use the long form for the default assignment because of an extremely
19840 # bizarre bug on SunOS 4.1.3.
19841 if $ac_need_defaults; then
19842 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19843 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19844 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
19845 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19848 # Have a temporary directory for convenience. Make it in the build tree
19849 # simply because there is no reason against having it here, and in addition,
19850 # creating and moving files from /tmp can sometimes cause problems.
19851 # Hook for its removal unless debugging.
19852 # Note that there is a small window in which the directory will not be cleaned:
19853 # after its creation but before its name has been assigned to `$tmp'.
19857 trap 'exit_status=$?
19858 : "${ac_tmp:=$tmp}"
19859 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
19861 trap 'as_fn_exit 1' 1 2 13 15
19863 # Create a (secure) tmp directory for tmp files.
19866 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19870 tmp=./conf$$-$RANDOM
19871 (umask 077 && mkdir "$tmp")
19872 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19875 # Set up the scripts for CONFIG_FILES section.
19876 # No need to generate them if there are no CONFIG_FILES.
19877 # This happens for instance with `./config.status config.h'.
19878 if test -n "$CONFIG_FILES"; then
19881 ac_cr=`echo X | tr X '\015'`
19882 # On cygwin, bash can eat \r inside `` if the user requested igncr.
19883 # But we know of no other shell where ac_cr would be empty at this
19884 # point, so we can use a bashism as a fallback.
19885 if test "x$ac_cr" = x; then
19886 eval ac_cr=\$\'\\r\'
19888 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19889 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
19892 ac_cs_awk_cr=$ac_cr
19895 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
19900 echo "cat >conf$$subs.awk <<_ACEOF" &&
19901 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19903 } >conf$$subs.sh ||
19904 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19905 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
19907 for ac_last_try in false false false false false :; do
19908 . ./conf$$subs.sh ||
19909 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19911 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19912 if test $ac_delim_n = $ac_delim_num; then
19914 elif $ac_last_try; then
19915 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19917 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19920 rm -f conf$$subs.sh
19922 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19923 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
19927 s/^/S["/; s/!.*/"]=/
19937 s/\(.\{148\}\)..*/\1/
19939 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19944 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19951 s/\(.\{148\}\)..*/\1/
19953 s/["\\]/\\&/g; s/^/"/; s/$/"/
19957 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19962 ' <conf$$subs.awk | sed '
19967 ' >>$CONFIG_STATUS || ac_write_fail=1
19968 rm -f conf$$subs.awk
19969 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19971 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
19972 for (key in S) S_is_set[key] = 1
19978 nfields = split(line, field, "@")
19980 len = length(field[1])
19981 for (i = 2; i < nfields; i++) {
19983 keylen = length(key)
19984 if (S_is_set[key]) {
19986 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
19987 len += length(value) + length(field[++i])
19998 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19999 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20000 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20003 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20004 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20007 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20008 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20009 # trailing colons and then remove the whole line if VPATH becomes empty
20010 # (actually we leave an empty line to preserve line numbers).
20011 if test "x$srcdir" = x.; then
20012 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20030 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20031 fi # test -n "$CONFIG_FILES"
20033 # Set up the scripts for CONFIG_HEADERS section.
20034 # No need to generate them if there are no CONFIG_HEADERS.
20035 # This happens for instance with `./config.status Makefile'.
20036 if test -n "$CONFIG_HEADERS"; then
20037 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20041 # Transform confdefs.h into an awk script `defines.awk', embedded as
20042 # here-document in config.status, that substitutes the proper values into
20043 # config.h.in to produce config.h.
20045 # Create a delimiter string that does not exist in confdefs.h, to ease
20046 # handling of long lines.
20048 for ac_last_try in false false :; do
20049 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20050 if test -z "$ac_tt"; then
20052 elif $ac_last_try; then
20053 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20055 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20059 # For the awk script, D is an array of macro values keyed by name,
20060 # likewise P contains macro parameters if any. Preserve backslash
20061 # newline sequences.
20063 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20065 s/.\{148\}/&'"$ac_delim"'/g
20068 s/^[ ]*#[ ]*define[ ][ ]*/ /
20075 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20077 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20081 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20082 D["\1"]=" \3\\\\\\n"\\/p
20084 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20089 s/.\{148\}/&'"$ac_delim"'/g
20094 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20097 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20099 ' <confdefs.h | sed '
20100 s/'"$ac_delim"'/"\\\
20101 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20103 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20104 for (key in D) D_is_set[key] = 1
20107 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20109 split(line, arg, " ")
20110 if (arg[1] == "#") {
20114 defundef = substr(arg[1], 2)
20117 split(mac1, mac2, "(") #)
20119 prefix = substr(line, 1, index(line, defundef) - 1)
20120 if (D_is_set[macro]) {
20121 # Preserve the white space surrounding the "#".
20122 print prefix "define", macro P[macro] D[macro]
20125 # Replace #undef with comments. This is necessary, for example,
20126 # in the case of _POSIX_SOURCE, which is predefined and required
20127 # on some systems where configure will not decide to define it.
20128 if (defundef == "undef") {
20129 print "/*", prefix defundef, macro, "*/"
20137 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20138 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20139 fi # test -n "$CONFIG_HEADERS"
20142 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20147 :[FHLC]) ac_mode=$ac_tag; continue;;
20149 case $ac_mode$ac_tag in
20151 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20152 :[FH]-) ac_tag=-:-;;
20153 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20170 -) ac_f="$ac_tmp/stdin";;
20171 *) # Look for the file first in the build tree, then in the source tree
20172 # (if the path is not absolute). The absolute path cannot be DOS-style,
20173 # because $ac_f cannot contain `:'.
20177 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20179 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20181 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20182 as_fn_append ac_file_inputs " '$ac_f'"
20185 # Let's still pretend it is `configure' which instantiates (i.e., don't
20186 # use $as_me), people would be surprised to read:
20187 # /* config.h. Generated by config.status. */
20188 configure_input='Generated from '`
20189 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20191 if test x"$ac_file" != x-; then
20192 configure_input="$ac_file. $configure_input"
20193 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20194 $as_echo "$as_me: creating $ac_file" >&6;}
20196 # Neutralize special characters interpreted by sed in replacement strings.
20197 case $configure_input in #(
20198 *\&* | *\|* | *\\* )
20199 ac_sed_conf_input=`$as_echo "$configure_input" |
20200 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20201 *) ac_sed_conf_input=$configure_input;;
20205 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20206 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20211 ac_dir=`$as_dirname -- "$ac_file" ||
20212 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20213 X"$ac_file" : 'X\(//\)[^/]' \| \
20214 X"$ac_file" : 'X\(//\)$' \| \
20215 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20216 $as_echo X"$ac_file" |
20217 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20221 /^X\(\/\/\)[^/].*/{
20234 as_dir="$ac_dir"; as_fn_mkdir_p
20238 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20240 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20241 # A ".." for each directory in $ac_dir_suffix.
20242 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20243 case $ac_top_builddir_sub in
20244 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20245 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20248 ac_abs_top_builddir=$ac_pwd
20249 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20250 # for backward compatibility:
20251 ac_top_builddir=$ac_top_build_prefix
20254 .) # We are building in place.
20256 ac_top_srcdir=$ac_top_builddir_sub
20257 ac_abs_top_srcdir=$ac_pwd ;;
20258 [\\/]* | ?:[\\/]* ) # Absolute name.
20259 ac_srcdir=$srcdir$ac_dir_suffix;
20260 ac_top_srcdir=$srcdir
20261 ac_abs_top_srcdir=$srcdir ;;
20262 *) # Relative name.
20263 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20264 ac_top_srcdir=$ac_top_build_prefix$srcdir
20265 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20267 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20277 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20278 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20280 ac_MKDIR_P=$MKDIR_P
20282 [\\/$]* | ?:[\\/]* ) ;;
20283 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20287 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20288 # If the template does not know about datarootdir, expand it.
20289 # FIXME: This hack should be removed a few years after 2.60.
20290 ac_datarootdir_hack=; ac_datarootdir_seen=
20301 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20302 *datarootdir*) ac_datarootdir_seen=yes;;
20303 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20304 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20305 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20307 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20308 ac_datarootdir_hack='
20309 s&@datadir@&$datadir&g
20310 s&@docdir@&$docdir&g
20311 s&@infodir@&$infodir&g
20312 s&@localedir@&$localedir&g
20313 s&@mandir@&$mandir&g
20314 s&\\\${datarootdir}&$datarootdir&g' ;;
20318 # Neutralize VPATH when `$srcdir' = `.'.
20319 # Shell code in configure.ac might set extrasub.
20320 # FIXME: do we really want to maintain this feature?
20321 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20322 ac_sed_extra="$ac_vpsub
20325 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20327 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20328 s|@configure_input@|$ac_sed_conf_input|;t t
20329 s&@top_builddir@&$ac_top_builddir_sub&;t t
20330 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20331 s&@srcdir@&$ac_srcdir&;t t
20332 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20333 s&@top_srcdir@&$ac_top_srcdir&;t t
20334 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20335 s&@builddir@&$ac_builddir&;t t
20336 s&@abs_builddir@&$ac_abs_builddir&;t t
20337 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20338 s&@INSTALL@&$ac_INSTALL&;t t
20339 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20340 $ac_datarootdir_hack
20342 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20343 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20345 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20346 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20347 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20348 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20349 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20350 which seems to be undefined. Please make sure it is defined" >&5
20351 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20352 which seems to be undefined. Please make sure it is defined" >&2;}
20354 rm -f "$ac_tmp/stdin"
20356 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20357 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20359 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20365 if test x"$ac_file" != x-; then
20367 $as_echo "/* $configure_input */" \
20368 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20369 } >"$ac_tmp/config.h" \
20370 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20371 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20372 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20373 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20376 mv "$ac_tmp/config.h" "$ac_file" \
20377 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20380 $as_echo "/* $configure_input */" \
20381 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20382 || as_fn_error $? "could not create -" "$LINENO" 5
20390 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20393 # Prefer the file from the source tree if names are identical.
20394 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20395 ac_source=$srcdir/$ac_source
20398 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20399 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20401 if test ! -r "$ac_source"; then
20402 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20406 # Try a relative symlink, then a hard link, then a copy.
20408 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20409 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20411 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20412 ln "$ac_source" "$ac_file" 2>/dev/null ||
20413 cp -p "$ac_source" "$ac_file" ||
20414 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20417 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20418 $as_echo "$as_me: executing $ac_file commands" >&6;}
20423 case $ac_file$ac_mode in
20424 "check_win32_symlinks":C)
20425 # Links sometimes fail undetected on Mingw -
20426 # so here we detect it and warn the user
20427 for FILE in $CONFIG_LINKS
20429 # test -e works for symlinks in the MinGW console
20430 test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20431 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20434 "src/include/pg_config.h":H)
20435 # Update timestamp for pg_config.h (see Makefile.global)
20436 echo >src/include/stamp-h
20438 "src/include/pg_config_ext.h":H)
20439 # Update timestamp for pg_config_ext.h (see Makefile.global)
20440 echo >src/include/stamp-ext-h
20442 "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20450 ac_clean_files=$ac_clean_files_save
20452 test $ac_write_fail = 0 ||
20453 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20456 # configure is writing to config.log, and then calls config.status.
20457 # config.status does its own redirection, appending to config.log.
20458 # Unfortunately, on DOS this fails, as config.log is still kept open
20459 # by configure, so config.status won't be able to write to it; its
20460 # output is simply discarded. So we exec the FD to /dev/null,
20461 # effectively closing config.log, so it can be properly (re)opened and
20462 # appended to by config.status. When coming back to configure, we
20463 # need to make the FD available again.
20464 if test "$no_create" != yes; then
20466 ac_config_status_args=
20467 test "$silent" = yes &&
20468 ac_config_status_args="$ac_config_status_args --quiet"
20470 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20472 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20473 # would make configure fail if this is the last instruction.
20474 $ac_cs_success || as_fn_exit 1
20476 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20477 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20478 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}