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
735 PERMIT_DECLARATION_AFTER_STATEMENT
807 program_transform_name
820 enable_option_checking
826 enable_integer_datetimes
860 with_libedit_preferred
872 ac_precious_vars='build_alias
900 # Initialize some variables set by options.
902 ac_init_version=false
903 ac_unrecognized_opts=
905 # The variables have the same names as the options, with
906 # dashes changed to underlines.
914 program_transform_name=s,x,x,
922 # Installation directory options.
923 # These are left unexpanded so users can "make install exec_prefix=/foo"
924 # and all the variables that are supposed to be based on exec_prefix
925 # by default will actually change.
926 # Use braces instead of parens because sh, perl, etc. also accept them.
927 # (The list follows the same order as the GNU Coding Standards.)
928 bindir='${exec_prefix}/bin'
929 sbindir='${exec_prefix}/sbin'
930 libexecdir='${exec_prefix}/libexec'
931 datarootdir='${prefix}/share'
932 datadir='${datarootdir}'
933 sysconfdir='${prefix}/etc'
934 sharedstatedir='${prefix}/com'
935 localstatedir='${prefix}/var'
936 includedir='${prefix}/include'
937 oldincludedir='/usr/include'
938 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
939 infodir='${datarootdir}/info'
944 libdir='${exec_prefix}/lib'
945 localedir='${datarootdir}/locale'
946 mandir='${datarootdir}/man'
952 # If the previous option needs an argument, assign it.
953 if test -n "$ac_prev"; then
954 eval $ac_prev=\$ac_option
960 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
965 # Accept the important Cygnus configure options, so we can diagnose typos.
967 case $ac_dashdash$ac_option in
971 -bindir | --bindir | --bindi | --bind | --bin | --bi)
973 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
976 -build | --build | --buil | --bui | --bu)
977 ac_prev=build_alias ;;
978 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
979 build_alias=$ac_optarg ;;
981 -cache-file | --cache-file | --cache-fil | --cache-fi \
982 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
983 ac_prev=cache_file ;;
984 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
985 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
986 cache_file=$ac_optarg ;;
989 cache_file=config.cache ;;
991 -datadir | --datadir | --datadi | --datad)
993 -datadir=* | --datadir=* | --datadi=* | --datad=*)
994 datadir=$ac_optarg ;;
996 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
997 | --dataroo | --dataro | --datar)
998 ac_prev=datarootdir ;;
999 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1000 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1001 datarootdir=$ac_optarg ;;
1003 -disable-* | --disable-*)
1004 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1005 # Reject names that are not valid shell variable names.
1006 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1007 as_fn_error $? "invalid feature name: $ac_useropt"
1008 ac_useropt_orig=$ac_useropt
1009 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1010 case $ac_user_opts in
1012 "enable_$ac_useropt"
1014 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1015 ac_unrecognized_sep=', ';;
1017 eval enable_$ac_useropt=no ;;
1019 -docdir | --docdir | --docdi | --doc | --do)
1021 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1022 docdir=$ac_optarg ;;
1024 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1026 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1027 dvidir=$ac_optarg ;;
1029 -enable-* | --enable-*)
1030 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1031 # Reject names that are not valid shell variable names.
1032 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1033 as_fn_error $? "invalid feature name: $ac_useropt"
1034 ac_useropt_orig=$ac_useropt
1035 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1036 case $ac_user_opts in
1038 "enable_$ac_useropt"
1040 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1041 ac_unrecognized_sep=', ';;
1043 eval enable_$ac_useropt=\$ac_optarg ;;
1045 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1046 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1047 | --exec | --exe | --ex)
1048 ac_prev=exec_prefix ;;
1049 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1050 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1051 | --exec=* | --exe=* | --ex=*)
1052 exec_prefix=$ac_optarg ;;
1054 -gas | --gas | --ga | --g)
1055 # Obsolete; use --with-gas.
1058 -help | --help | --hel | --he | -h)
1059 ac_init_help=long ;;
1060 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1061 ac_init_help=recursive ;;
1062 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1063 ac_init_help=short ;;
1065 -host | --host | --hos | --ho)
1066 ac_prev=host_alias ;;
1067 -host=* | --host=* | --hos=* | --ho=*)
1068 host_alias=$ac_optarg ;;
1070 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1072 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1074 htmldir=$ac_optarg ;;
1076 -includedir | --includedir | --includedi | --included | --include \
1077 | --includ | --inclu | --incl | --inc)
1078 ac_prev=includedir ;;
1079 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1080 | --includ=* | --inclu=* | --incl=* | --inc=*)
1081 includedir=$ac_optarg ;;
1083 -infodir | --infodir | --infodi | --infod | --info | --inf)
1085 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1086 infodir=$ac_optarg ;;
1088 -libdir | --libdir | --libdi | --libd)
1090 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1091 libdir=$ac_optarg ;;
1093 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1094 | --libexe | --libex | --libe)
1095 ac_prev=libexecdir ;;
1096 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1097 | --libexe=* | --libex=* | --libe=*)
1098 libexecdir=$ac_optarg ;;
1100 -localedir | --localedir | --localedi | --localed | --locale)
1101 ac_prev=localedir ;;
1102 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1103 localedir=$ac_optarg ;;
1105 -localstatedir | --localstatedir | --localstatedi | --localstated \
1106 | --localstate | --localstat | --localsta | --localst | --locals)
1107 ac_prev=localstatedir ;;
1108 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1109 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1110 localstatedir=$ac_optarg ;;
1112 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1114 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1115 mandir=$ac_optarg ;;
1117 -nfp | --nfp | --nf)
1118 # Obsolete; use --without-fp.
1121 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1122 | --no-cr | --no-c | -n)
1125 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1126 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1129 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1130 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1131 | --oldin | --oldi | --old | --ol | --o)
1132 ac_prev=oldincludedir ;;
1133 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1134 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1135 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1136 oldincludedir=$ac_optarg ;;
1138 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1140 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1141 prefix=$ac_optarg ;;
1143 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1144 | --program-pre | --program-pr | --program-p)
1145 ac_prev=program_prefix ;;
1146 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1147 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1148 program_prefix=$ac_optarg ;;
1150 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1151 | --program-suf | --program-su | --program-s)
1152 ac_prev=program_suffix ;;
1153 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1154 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1155 program_suffix=$ac_optarg ;;
1157 -program-transform-name | --program-transform-name \
1158 | --program-transform-nam | --program-transform-na \
1159 | --program-transform-n | --program-transform- \
1160 | --program-transform | --program-transfor \
1161 | --program-transfo | --program-transf \
1162 | --program-trans | --program-tran \
1163 | --progr-tra | --program-tr | --program-t)
1164 ac_prev=program_transform_name ;;
1165 -program-transform-name=* | --program-transform-name=* \
1166 | --program-transform-nam=* | --program-transform-na=* \
1167 | --program-transform-n=* | --program-transform-=* \
1168 | --program-transform=* | --program-transfor=* \
1169 | --program-transfo=* | --program-transf=* \
1170 | --program-trans=* | --program-tran=* \
1171 | --progr-tra=* | --program-tr=* | --program-t=*)
1172 program_transform_name=$ac_optarg ;;
1174 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1176 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1177 pdfdir=$ac_optarg ;;
1179 -psdir | --psdir | --psdi | --psd | --ps)
1181 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1184 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1185 | -silent | --silent | --silen | --sile | --sil)
1188 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1190 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1192 sbindir=$ac_optarg ;;
1194 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1195 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1196 | --sharedst | --shareds | --shared | --share | --shar \
1198 ac_prev=sharedstatedir ;;
1199 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1200 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1201 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1203 sharedstatedir=$ac_optarg ;;
1205 -site | --site | --sit)
1207 -site=* | --site=* | --sit=*)
1210 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1212 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1213 srcdir=$ac_optarg ;;
1215 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1216 | --syscon | --sysco | --sysc | --sys | --sy)
1217 ac_prev=sysconfdir ;;
1218 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1219 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1220 sysconfdir=$ac_optarg ;;
1222 -target | --target | --targe | --targ | --tar | --ta | --t)
1223 ac_prev=target_alias ;;
1224 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1225 target_alias=$ac_optarg ;;
1227 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1230 -version | --version | --versio | --versi | --vers | -V)
1231 ac_init_version=: ;;
1234 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1235 # Reject names that are not valid shell variable names.
1236 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1237 as_fn_error $? "invalid package name: $ac_useropt"
1238 ac_useropt_orig=$ac_useropt
1239 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1240 case $ac_user_opts in
1244 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1245 ac_unrecognized_sep=', ';;
1247 eval with_$ac_useropt=\$ac_optarg ;;
1249 -without-* | --without-*)
1250 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1251 # Reject names that are not valid shell variable names.
1252 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1253 as_fn_error $? "invalid package name: $ac_useropt"
1254 ac_useropt_orig=$ac_useropt
1255 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1256 case $ac_user_opts in
1260 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1261 ac_unrecognized_sep=', ';;
1263 eval with_$ac_useropt=no ;;
1266 # Obsolete; use --with-x.
1269 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1270 | --x-incl | --x-inc | --x-in | --x-i)
1271 ac_prev=x_includes ;;
1272 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1273 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1274 x_includes=$ac_optarg ;;
1276 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1277 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1278 ac_prev=x_libraries ;;
1279 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1280 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1281 x_libraries=$ac_optarg ;;
1283 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1284 Try \`$0 --help' for more information"
1288 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1289 # Reject names that are not valid shell variable names.
1290 case $ac_envvar in #(
1291 '' | [0-9]* | *[!_$as_cr_alnum]* )
1292 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1294 eval $ac_envvar=\$ac_optarg
1295 export $ac_envvar ;;
1298 # FIXME: should be removed in autoconf 3.0.
1299 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1300 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1301 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1302 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1308 if test -n "$ac_prev"; then
1309 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1310 as_fn_error $? "missing argument to $ac_option"
1313 if test -n "$ac_unrecognized_opts"; then
1314 case $enable_option_checking in
1316 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1317 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1321 # Check all directory arguments for consistency.
1322 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1323 datadir sysconfdir sharedstatedir localstatedir includedir \
1324 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1325 libdir localedir mandir
1327 eval ac_val=\$$ac_var
1328 # Remove trailing slashes.
1331 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1332 eval $ac_var=\$ac_val;;
1334 # Be sure to have absolute directory names.
1336 [\\/$]* | ?:[\\/]* ) continue;;
1337 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1339 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1342 # There might be people who depend on the old broken behavior: `$host'
1343 # used to hold the argument of --host etc.
1344 # FIXME: To remove some day.
1347 target=$target_alias
1349 # FIXME: To remove some day.
1350 if test "x$host_alias" != x; then
1351 if test "x$build_alias" = x; then
1352 cross_compiling=maybe
1353 elif test "x$build_alias" != "x$host_alias"; then
1359 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1361 test "$silent" = yes && exec 6>/dev/null
1364 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1365 ac_ls_di=`ls -di .` &&
1366 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1367 as_fn_error $? "working directory cannot be determined"
1368 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1369 as_fn_error $? "pwd does not report name of working directory"
1372 # Find the source files, if location was not specified.
1373 if test -z "$srcdir"; then
1374 ac_srcdir_defaulted=yes
1375 # Try the directory containing this script, then the parent directory.
1376 ac_confdir=`$as_dirname -- "$as_myself" ||
1377 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1378 X"$as_myself" : 'X\(//\)[^/]' \| \
1379 X"$as_myself" : 'X\(//\)$' \| \
1380 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1381 $as_echo X"$as_myself" |
1382 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1400 if test ! -r "$srcdir/$ac_unique_file"; then
1404 ac_srcdir_defaulted=no
1406 if test ! -r "$srcdir/$ac_unique_file"; then
1407 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1408 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1410 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1412 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1414 # When building in place, set srcdir=.
1415 if test "$ac_abs_confdir" = "$ac_pwd"; then
1418 # Remove unnecessary trailing slashes from srcdir.
1419 # Double slashes in file names in object file debugging info
1420 # mess up M-x gdb in Emacs.
1422 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1424 for ac_var in $ac_precious_vars; do
1425 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1426 eval ac_env_${ac_var}_value=\$${ac_var}
1427 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1428 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1432 # Report the --help message.
1434 if test "$ac_init_help" = "long"; then
1435 # Omit some internal or obsolete options to make the list less imposing.
1436 # This message is too long to be a string in the A/UX 3.1 sh.
1438 \`configure' configures PostgreSQL 12devel to adapt to many kinds of systems.
1440 Usage: $0 [OPTION]... [VAR=VALUE]...
1442 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1443 VAR=VALUE. See below for descriptions of some of the useful variables.
1445 Defaults for the options are specified in brackets.
1448 -h, --help display this help and exit
1449 --help=short display options specific to this package
1450 --help=recursive display the short help of all the included packages
1451 -V, --version display version information and exit
1452 -q, --quiet, --silent do not print \`checking ...' messages
1453 --cache-file=FILE cache test results in FILE [disabled]
1454 -C, --config-cache alias for \`--cache-file=config.cache'
1455 -n, --no-create do not create output files
1456 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1458 Installation directories:
1459 --prefix=PREFIX install architecture-independent files in PREFIX
1460 [$ac_default_prefix]
1461 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1464 By default, \`make install' will install all the files in
1465 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1466 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1467 for instance \`--prefix=\$HOME'.
1469 For better control, use the options below.
1471 Fine tuning of the installation directories:
1472 --bindir=DIR user executables [EPREFIX/bin]
1473 --sbindir=DIR system admin executables [EPREFIX/sbin]
1474 --libexecdir=DIR program executables [EPREFIX/libexec]
1475 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1476 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1477 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1478 --libdir=DIR object code libraries [EPREFIX/lib]
1479 --includedir=DIR C header files [PREFIX/include]
1480 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1481 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1482 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1483 --infodir=DIR info documentation [DATAROOTDIR/info]
1484 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1485 --mandir=DIR man documentation [DATAROOTDIR/man]
1486 --docdir=DIR documentation root [DATAROOTDIR/doc/postgresql]
1487 --htmldir=DIR html documentation [DOCDIR]
1488 --dvidir=DIR dvi documentation [DOCDIR]
1489 --pdfdir=DIR pdf documentation [DOCDIR]
1490 --psdir=DIR ps documentation [DOCDIR]
1496 --build=BUILD configure for building on BUILD [guessed]
1497 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1501 if test -n "$ac_init_help"; then
1502 case $ac_init_help in
1503 short | recursive ) echo "Configuration of PostgreSQL 12devel:";;
1508 --disable-option-checking ignore unrecognized --enable/--with options
1509 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1510 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1511 --disable-integer-datetimes
1512 obsolete option, no longer supported
1513 --enable-nls[=LANGUAGES]
1514 enable Native Language Support
1515 --disable-rpath do not embed shared library search path in
1517 --disable-spinlocks do not use spinlocks
1518 --disable-atomics do not use atomic operations
1519 --enable-debug build with debugging symbols (-g)
1520 --enable-profiling build with profiling enabled
1521 --enable-coverage build with coverage testing instrumentation
1522 --enable-dtrace build with DTrace support
1523 --enable-tap-tests enable TAP tests (requires Perl and IPC::Run)
1524 --enable-depend turn on automatic dependency tracking
1525 --enable-cassert enable assertion checks (for debugging)
1526 --disable-thread-safety disable thread-safety in client libraries
1527 --disable-largefile omit support for large files
1528 --disable-float4-byval disable float4 passed by value
1529 --disable-float8-byval disable float8 passed by value
1532 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1533 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1534 --with-extra-version=STRING
1535 append STRING to version
1536 --with-template=NAME override operating system template
1537 --with-includes=DIRS look for additional header files in DIRS
1538 --with-libraries=DIRS look for additional libraries in DIRS
1539 --with-libs=DIRS alternative spelling of --with-libraries
1540 --with-pgport=PORTNUM set default port number [5432]
1541 --with-blocksize=BLOCKSIZE
1542 set table block size in kB [8]
1543 --with-segsize=SEGSIZE set table segment size in GB [1]
1544 --with-wal-blocksize=BLOCKSIZE
1545 set WAL block size in kB [8]
1546 --with-CC=CMD set compiler (deprecated)
1547 --with-llvm build with LLVM based JIT support
1548 --with-icu build with ICU support
1549 --with-tcl build Tcl modules (PL/Tcl)
1550 --with-tclconfig=DIR tclConfig.sh is in DIR
1551 --with-perl build Perl modules (PL/Perl)
1552 --with-python build Python modules (PL/Python)
1553 --with-gssapi build with GSSAPI support
1554 --with-krb-srvnam=NAME default service principal name in Kerberos (GSSAPI)
1556 --with-pam build with PAM support
1557 --with-bsd-auth build with BSD Authentication support
1558 --with-ldap build with LDAP support
1559 --with-bonjour build with Bonjour support
1560 --with-openssl build with OpenSSL support
1561 --with-selinux build with SELinux support
1562 --with-systemd build with systemd support
1563 --without-readline do not use GNU Readline nor BSD Libedit for editing
1564 --with-libedit-preferred
1565 prefer BSD Libedit over GNU Readline
1566 --with-uuid=LIB build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1567 --with-ossp-uuid obsolete spelling of --with-uuid=ossp
1568 --with-libxml build with XML support
1569 --with-libxslt use XSLT support when building contrib/xml2
1570 --with-system-tzdata=DIR
1571 use system time zone data in DIR
1572 --without-zlib do not use Zlib
1573 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1575 Some influential environment variables:
1576 CC C compiler command
1577 CFLAGS C compiler flags
1578 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1579 nonstandard directory <lib dir>
1580 LIBS libraries to pass to the linker, e.g. -l<library>
1581 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1582 you have headers in a nonstandard directory <include dir>
1583 CXX C++ compiler command
1584 CXXFLAGS C++ compiler flags
1585 LLVM_CONFIG path to llvm-config command
1586 CLANG path to clang compiler to generate bitcode
1588 PKG_CONFIG path to pkg-config utility
1590 directories to add to pkg-config's search path
1592 path overriding pkg-config's built-in search path
1593 ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
1594 ICU_LIBS linker flags for ICU, overriding pkg-config
1595 XML2_CONFIG path to xml2-config utility
1596 LDFLAGS_EX extra linker flags for linking executables only
1597 LDFLAGS_SL extra linker flags for linking shared libraries only
1599 PYTHON Python program
1600 MSGFMT msgfmt program for NLS
1601 TCLSH Tcl interpreter program (tclsh)
1603 Use these variables to override the choices made by `configure' or to help
1604 it to find libraries and programs with nonstandard names/locations.
1606 Report bugs to <pgsql-bugs@lists.postgresql.org>.
1611 if test "$ac_init_help" = "recursive"; then
1612 # If there are subdirs, report their specific --help.
1613 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1614 test -d "$ac_dir" ||
1615 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1620 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1622 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1623 # A ".." for each directory in $ac_dir_suffix.
1624 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1625 case $ac_top_builddir_sub in
1626 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1627 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1630 ac_abs_top_builddir=$ac_pwd
1631 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1632 # for backward compatibility:
1633 ac_top_builddir=$ac_top_build_prefix
1636 .) # We are building in place.
1638 ac_top_srcdir=$ac_top_builddir_sub
1639 ac_abs_top_srcdir=$ac_pwd ;;
1640 [\\/]* | ?:[\\/]* ) # Absolute name.
1641 ac_srcdir=$srcdir$ac_dir_suffix;
1642 ac_top_srcdir=$srcdir
1643 ac_abs_top_srcdir=$srcdir ;;
1645 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1646 ac_top_srcdir=$ac_top_build_prefix$srcdir
1647 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1649 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1651 cd "$ac_dir" || { ac_status=$?; continue; }
1652 # Check for guested configure.
1653 if test -f "$ac_srcdir/configure.gnu"; then
1655 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1656 elif test -f "$ac_srcdir/configure"; then
1658 $SHELL "$ac_srcdir/configure" --help=recursive
1660 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1662 cd "$ac_pwd" || { ac_status=$?; break; }
1666 test -n "$ac_init_help" && exit $ac_status
1667 if $ac_init_version; then
1669 PostgreSQL configure 12devel
1670 generated by GNU Autoconf 2.69
1672 Copyright (C) 2012 Free Software Foundation, Inc.
1673 This configure script is free software; the Free Software Foundation
1674 gives unlimited permission to copy, distribute and modify it.
1676 Copyright (c) 1996-2019, PostgreSQL Global Development Group
1681 ## ------------------------ ##
1682 ## Autoconf initialization. ##
1683 ## ------------------------ ##
1685 # ac_fn_c_try_compile LINENO
1686 # --------------------------
1687 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1688 ac_fn_c_try_compile ()
1690 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1691 rm -f conftest.$ac_objext
1692 if { { ac_try="$ac_compile"
1694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1695 *) ac_try_echo=$ac_try;;
1697 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1698 $as_echo "$ac_try_echo"; } >&5
1699 (eval "$ac_compile") 2>conftest.err
1701 if test -s conftest.err; then
1702 grep -v '^ *+' conftest.err >conftest.er1
1703 cat conftest.er1 >&5
1704 mv -f conftest.er1 conftest.err
1706 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1707 test $ac_status = 0; } && {
1708 test -z "$ac_c_werror_flag" ||
1709 test ! -s conftest.err
1710 } && test -s conftest.$ac_objext; then :
1713 $as_echo "$as_me: failed program was:" >&5
1714 sed 's/^/| /' conftest.$ac_ext >&5
1718 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1719 as_fn_set_status $ac_retval
1721 } # ac_fn_c_try_compile
1723 # ac_fn_cxx_try_compile LINENO
1724 # ----------------------------
1725 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1726 ac_fn_cxx_try_compile ()
1728 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1729 rm -f conftest.$ac_objext
1730 if { { ac_try="$ac_compile"
1732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1733 *) ac_try_echo=$ac_try;;
1735 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1736 $as_echo "$ac_try_echo"; } >&5
1737 (eval "$ac_compile") 2>conftest.err
1739 if test -s conftest.err; then
1740 grep -v '^ *+' conftest.err >conftest.er1
1741 cat conftest.er1 >&5
1742 mv -f conftest.er1 conftest.err
1744 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1745 test $ac_status = 0; } && {
1746 test -z "$ac_cxx_werror_flag" ||
1747 test ! -s conftest.err
1748 } && test -s conftest.$ac_objext; then :
1751 $as_echo "$as_me: failed program was:" >&5
1752 sed 's/^/| /' conftest.$ac_ext >&5
1756 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1757 as_fn_set_status $ac_retval
1759 } # ac_fn_cxx_try_compile
1761 # ac_fn_c_try_link LINENO
1762 # -----------------------
1763 # Try to link conftest.$ac_ext, and return whether this succeeded.
1766 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1767 rm -f conftest.$ac_objext conftest$ac_exeext
1768 if { { ac_try="$ac_link"
1770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1771 *) ac_try_echo=$ac_try;;
1773 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1774 $as_echo "$ac_try_echo"; } >&5
1775 (eval "$ac_link") 2>conftest.err
1777 if test -s conftest.err; then
1778 grep -v '^ *+' conftest.err >conftest.er1
1779 cat conftest.er1 >&5
1780 mv -f conftest.er1 conftest.err
1782 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1783 test $ac_status = 0; } && {
1784 test -z "$ac_c_werror_flag" ||
1785 test ! -s conftest.err
1786 } && test -s conftest$ac_exeext && {
1787 test "$cross_compiling" = yes ||
1788 test -x conftest$ac_exeext
1792 $as_echo "$as_me: failed program was:" >&5
1793 sed 's/^/| /' conftest.$ac_ext >&5
1797 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1798 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1799 # interfere with the next link command; also delete a directory that is
1800 # left behind by Apple's compiler. We do this before executing the actions.
1801 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1802 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1803 as_fn_set_status $ac_retval
1805 } # ac_fn_c_try_link
1807 # ac_fn_c_try_cpp LINENO
1808 # ----------------------
1809 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1812 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1813 if { { ac_try="$ac_cpp conftest.$ac_ext"
1815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1816 *) ac_try_echo=$ac_try;;
1818 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1819 $as_echo "$ac_try_echo"; } >&5
1820 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1822 if test -s conftest.err; then
1823 grep -v '^ *+' conftest.err >conftest.er1
1824 cat conftest.er1 >&5
1825 mv -f conftest.er1 conftest.err
1827 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1828 test $ac_status = 0; } > conftest.i && {
1829 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1830 test ! -s conftest.err
1834 $as_echo "$as_me: failed program was:" >&5
1835 sed 's/^/| /' conftest.$ac_ext >&5
1839 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1840 as_fn_set_status $ac_retval
1844 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1845 # -------------------------------------------------------
1846 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1847 # the include files in INCLUDES and setting the cache variable VAR
1849 ac_fn_c_check_header_mongrel ()
1851 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1852 if eval \${$3+:} false; then :
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1854 $as_echo_n "checking for $2... " >&6; }
1855 if eval \${$3+:} false; then :
1856 $as_echo_n "(cached) " >&6
1859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1860 $as_echo "$ac_res" >&6; }
1862 # Is the header compilable?
1863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1864 $as_echo_n "checking $2 usability... " >&6; }
1865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1866 /* end confdefs.h. */
1870 if ac_fn_c_try_compile "$LINENO"; then :
1871 ac_header_compiler=yes
1873 ac_header_compiler=no
1875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1877 $as_echo "$ac_header_compiler" >&6; }
1879 # Is the header present?
1880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1881 $as_echo_n "checking $2 presence... " >&6; }
1882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1883 /* end confdefs.h. */
1886 if ac_fn_c_try_cpp "$LINENO"; then :
1887 ac_header_preproc=yes
1889 ac_header_preproc=no
1891 rm -f conftest.err conftest.i conftest.$ac_ext
1892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1893 $as_echo "$ac_header_preproc" >&6; }
1895 # So? What about this header?
1896 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1898 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1899 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1900 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1901 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1904 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1905 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1907 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1908 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1909 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1910 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1911 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1912 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1913 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1914 ( $as_echo "## ---------------------------------------------- ##
1915 ## Report this to pgsql-bugs@lists.postgresql.org ##
1916 ## ---------------------------------------------- ##"
1917 ) | sed "s/^/$as_me: WARNING: /" >&2
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1921 $as_echo_n "checking for $2... " >&6; }
1922 if eval \${$3+:} false; then :
1923 $as_echo_n "(cached) " >&6
1925 eval "$3=\$ac_header_compiler"
1928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1929 $as_echo "$ac_res" >&6; }
1931 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1933 } # ac_fn_c_check_header_mongrel
1935 # ac_fn_c_try_run LINENO
1936 # ----------------------
1937 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1938 # that executables *can* be run.
1941 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1942 if { { ac_try="$ac_link"
1944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1945 *) ac_try_echo=$ac_try;;
1947 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1948 $as_echo "$ac_try_echo"; } >&5
1949 (eval "$ac_link") 2>&5
1951 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1952 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1953 { { case "(($ac_try" in
1954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1955 *) ac_try_echo=$ac_try;;
1957 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1958 $as_echo "$ac_try_echo"; } >&5
1959 (eval "$ac_try") 2>&5
1961 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1962 test $ac_status = 0; }; }; then :
1965 $as_echo "$as_me: program exited with status $ac_status" >&5
1966 $as_echo "$as_me: failed program was:" >&5
1967 sed 's/^/| /' conftest.$ac_ext >&5
1969 ac_retval=$ac_status
1971 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1972 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1973 as_fn_set_status $ac_retval
1977 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1978 # -------------------------------------------------------
1979 # Tests whether HEADER exists and can be compiled using the include files in
1980 # INCLUDES, setting the cache variable VAR accordingly.
1981 ac_fn_c_check_header_compile ()
1983 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1985 $as_echo_n "checking for $2... " >&6; }
1986 if eval \${$3+:} false; then :
1987 $as_echo_n "(cached) " >&6
1989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1990 /* end confdefs.h. */
1994 if ac_fn_c_try_compile "$LINENO"; then :
1999 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2003 $as_echo "$ac_res" >&6; }
2004 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2006 } # ac_fn_c_check_header_compile
2008 # ac_fn_c_check_func LINENO FUNC VAR
2009 # ----------------------------------
2010 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2011 ac_fn_c_check_func ()
2013 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2015 $as_echo_n "checking for $2... " >&6; }
2016 if eval \${$3+:} false; then :
2017 $as_echo_n "(cached) " >&6
2019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2020 /* end confdefs.h. */
2021 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2022 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2023 #define $2 innocuous_$2
2025 /* System header to define __stub macros and hopefully few prototypes,
2026 which can conflict with char $2 (); below.
2027 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2028 <limits.h> exists even on freestanding compilers. */
2031 # include <limits.h>
2033 # include <assert.h>
2038 /* Override any GCC internal prototype to avoid an error.
2039 Use char because int might match the return type of a GCC
2040 builtin and then its argument prototype would still apply. */
2045 /* The GNU C library defines this for functions which it implements
2046 to always fail with ENOSYS. Some functions are actually named
2047 something starting with __ and the normal name is an alias. */
2048 #if defined __stub_$2 || defined __stub___$2
2060 if ac_fn_c_try_link "$LINENO"; then :
2065 rm -f core conftest.err conftest.$ac_objext \
2066 conftest$ac_exeext conftest.$ac_ext
2069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2070 $as_echo "$ac_res" >&6; }
2071 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2073 } # ac_fn_c_check_func
2075 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2076 # -------------------------------------------
2077 # Tests whether TYPE exists after having included INCLUDES, setting cache
2078 # variable VAR accordingly.
2079 ac_fn_c_check_type ()
2081 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2083 $as_echo_n "checking for $2... " >&6; }
2084 if eval \${$3+:} false; then :
2085 $as_echo_n "(cached) " >&6
2088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2089 /* end confdefs.h. */
2100 if ac_fn_c_try_compile "$LINENO"; then :
2101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2102 /* end confdefs.h. */
2113 if ac_fn_c_try_compile "$LINENO"; then :
2118 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2120 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2124 $as_echo "$ac_res" >&6; }
2125 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2127 } # ac_fn_c_check_type
2129 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2130 # ----------------------------------------------------
2131 # Tries to find if the field MEMBER exists in type AGGR, after including
2132 # INCLUDES, setting cache variable VAR accordingly.
2133 ac_fn_c_check_member ()
2135 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2137 $as_echo_n "checking for $2.$3... " >&6; }
2138 if eval \${$4+:} false; then :
2139 $as_echo_n "(cached) " >&6
2141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2142 /* end confdefs.h. */
2154 if ac_fn_c_try_compile "$LINENO"; then :
2157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2158 /* end confdefs.h. */
2164 if (sizeof ac_aggr.$3)
2170 if ac_fn_c_try_compile "$LINENO"; then :
2175 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2177 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2181 $as_echo "$ac_res" >&6; }
2182 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2184 } # ac_fn_c_check_member
2186 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2187 # --------------------------------------------
2188 # Tries to find the compile-time value of EXPR in a program that includes
2189 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2191 ac_fn_c_compute_int ()
2193 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2194 if test "$cross_compiling" = yes; then
2195 # Depending upon the size, compute the lo and hi bounds.
2196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2197 /* end confdefs.h. */
2202 static int test_array [1 - 2 * !(($2) >= 0)];
2204 return test_array [0];
2210 if ac_fn_c_try_compile "$LINENO"; then :
2213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2214 /* end confdefs.h. */
2219 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2221 return test_array [0];
2227 if ac_fn_c_try_compile "$LINENO"; then :
2228 ac_hi=$ac_mid; break
2230 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2231 if test $ac_lo -le $ac_mid; then
2235 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2237 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2241 /* end confdefs.h. */
2246 static int test_array [1 - 2 * !(($2) < 0)];
2248 return test_array [0];
2254 if ac_fn_c_try_compile "$LINENO"; then :
2257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2258 /* end confdefs.h. */
2263 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2265 return test_array [0];
2271 if ac_fn_c_try_compile "$LINENO"; then :
2272 ac_lo=$ac_mid; break
2274 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2275 if test $ac_mid -le $ac_hi; then
2279 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2281 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2286 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2288 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2289 # Binary search between lo and hi bounds.
2290 while test "x$ac_lo" != "x$ac_hi"; do
2291 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2293 /* end confdefs.h. */
2298 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2300 return test_array [0];
2306 if ac_fn_c_try_compile "$LINENO"; then :
2309 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2314 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2319 /* end confdefs.h. */
2321 static long int longval () { return $2; }
2322 static unsigned long int ulongval () { return $2; }
2329 FILE *f = fopen ("conftest.val", "w");
2334 long int i = longval ();
2337 fprintf (f, "%ld", i);
2341 unsigned long int i = ulongval ();
2344 fprintf (f, "%lu", i);
2346 /* Do not output a trailing newline, as this causes \r\n confusion
2347 on some platforms. */
2348 return ferror (f) || fclose (f) != 0;
2354 if ac_fn_c_try_run "$LINENO"; then :
2355 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2359 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2360 conftest.$ac_objext conftest.beam conftest.$ac_ext
2364 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2365 as_fn_set_status $ac_retval
2367 } # ac_fn_c_compute_int
2369 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2370 # ---------------------------------------------
2371 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2373 ac_fn_c_check_decl ()
2375 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2376 # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2377 as_decl_name=`echo $2|sed 's/ *(.*//'`
2378 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2380 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2381 if eval \${$3+:} false; then :
2382 $as_echo_n "(cached) " >&6
2384 ac_save_werror_flag=$ac_c_werror_flag
2385 ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2387 /* end confdefs.h. */
2392 #ifndef $as_decl_name
2394 (void) $as_decl_use;
2396 (void) $as_decl_name;
2404 if ac_fn_c_try_compile "$LINENO"; then :
2409 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2410 ac_c_werror_flag=$ac_save_werror_flag
2413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2414 $as_echo "$ac_res" >&6; }
2415 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2417 } # ac_fn_c_check_decl
2418 cat >config.log <<_ACEOF
2419 This file contains any messages produced by compilers while
2420 running configure, to aid debugging if configure makes a mistake.
2422 It was created by PostgreSQL $as_me 12devel, which was
2423 generated by GNU Autoconf 2.69. Invocation command line was
2435 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2436 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2437 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2438 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2439 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2441 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2442 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2444 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2445 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2446 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2447 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2448 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2449 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2450 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2454 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2458 test -z "$as_dir" && as_dir=.
2459 $as_echo "PATH: $as_dir"
2475 # Keep a trace of the command line.
2476 # Strip out --no-create and --no-recursion so they do not pile up.
2477 # Strip out --silent because we don't want to record it for future runs.
2478 # Also quote any args containing shell meta-characters.
2479 # Make two passes to allow for proper duplicate-argument suppression.
2483 ac_must_keep_next=false
2489 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2490 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2491 | -silent | --silent | --silen | --sile | --sil)
2494 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2497 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2499 as_fn_append ac_configure_args1 " '$ac_arg'"
2500 if test $ac_must_keep_next = true; then
2501 ac_must_keep_next=false # Got value, back to normal.
2504 *=* | --config-cache | -C | -disable-* | --disable-* \
2505 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2506 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2507 | -with-* | --with-* | -without-* | --without-* | --x)
2508 case "$ac_configure_args0 " in
2509 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2512 -* ) ac_must_keep_next=true ;;
2515 as_fn_append ac_configure_args " '$ac_arg'"
2520 { ac_configure_args0=; unset ac_configure_args0;}
2521 { ac_configure_args1=; unset ac_configure_args1;}
2523 # When interrupted or exit'd, cleanup temporary files, and complete
2524 # config.log. We remove comments because anyway the quotes in there
2525 # would cause problems or look ugly.
2526 # WARNING: Use '\'' to represent an apostrophe within the trap.
2527 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2528 trap 'exit_status=$?
2529 # Save into config.log some information that might help in debugging.
2533 $as_echo "## ---------------- ##
2534 ## Cache variables. ##
2535 ## ---------------- ##"
2537 # The following way of writing the cache mishandles newlines in values,
2539 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2540 eval ac_val=\$$ac_var
2544 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2545 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2548 _ | IFS | as_nl) ;; #(
2549 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2550 *) { eval $ac_var=; unset $ac_var;} ;;
2555 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2556 *${as_nl}ac_space=\ *)
2558 "s/'\''/'\''\\\\'\'''\''/g;
2559 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2562 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2569 $as_echo "## ----------------- ##
2570 ## Output variables. ##
2571 ## ----------------- ##"
2573 for ac_var in $ac_subst_vars
2575 eval ac_val=\$$ac_var
2577 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2579 $as_echo "$ac_var='\''$ac_val'\''"
2583 if test -n "$ac_subst_files"; then
2584 $as_echo "## ------------------- ##
2585 ## File substitutions. ##
2586 ## ------------------- ##"
2588 for ac_var in $ac_subst_files
2590 eval ac_val=\$$ac_var
2592 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2594 $as_echo "$ac_var='\''$ac_val'\''"
2599 if test -s confdefs.h; then
2600 $as_echo "## ----------- ##
2607 test "$ac_signal" != 0 &&
2608 $as_echo "$as_me: caught signal $ac_signal"
2609 $as_echo "$as_me: exit $exit_status"
2611 rm -f core *.core core.conftest.* &&
2612 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2615 for ac_signal in 1 2 13 15; do
2616 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2620 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2621 rm -f -r conftest* confdefs.h
2623 $as_echo "/* confdefs.h */" > confdefs.h
2625 # Predefined preprocessor variables.
2627 cat >>confdefs.h <<_ACEOF
2628 #define PACKAGE_NAME "$PACKAGE_NAME"
2631 cat >>confdefs.h <<_ACEOF
2632 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2635 cat >>confdefs.h <<_ACEOF
2636 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2639 cat >>confdefs.h <<_ACEOF
2640 #define PACKAGE_STRING "$PACKAGE_STRING"
2643 cat >>confdefs.h <<_ACEOF
2644 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2647 cat >>confdefs.h <<_ACEOF
2648 #define PACKAGE_URL "$PACKAGE_URL"
2652 # Let the site file select an alternate cache file if it wants to.
2653 # Prefer an explicitly selected file to automatically selected ones.
2656 if test -n "$CONFIG_SITE"; then
2657 # We do not want a PATH search for config.site.
2658 case $CONFIG_SITE in #((
2659 -*) ac_site_file1=./$CONFIG_SITE;;
2660 */*) ac_site_file1=$CONFIG_SITE;;
2661 *) ac_site_file1=./$CONFIG_SITE;;
2663 elif test "x$prefix" != xNONE; then
2664 ac_site_file1=$prefix/share/config.site
2665 ac_site_file2=$prefix/etc/config.site
2667 ac_site_file1=$ac_default_prefix/share/config.site
2668 ac_site_file2=$ac_default_prefix/etc/config.site
2670 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2672 test "x$ac_site_file" = xNONE && continue
2673 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2674 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2675 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2676 sed 's/^/| /' "$ac_site_file" >&5
2678 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2679 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2680 as_fn_error $? "failed to load site script $ac_site_file
2681 See \`config.log' for more details" "$LINENO" 5; }
2685 if test -r "$cache_file"; then
2686 # Some versions of bash will fail to source /dev/null (special files
2687 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2688 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2689 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2690 $as_echo "$as_me: loading cache $cache_file" >&6;}
2692 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2693 *) . "./$cache_file";;
2697 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2698 $as_echo "$as_me: creating cache $cache_file" >&6;}
2702 # Check that the precious variables saved in the cache have kept the same
2704 ac_cache_corrupted=false
2705 for ac_var in $ac_precious_vars; do
2706 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2707 eval ac_new_set=\$ac_env_${ac_var}_set
2708 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2709 eval ac_new_val=\$ac_env_${ac_var}_value
2710 case $ac_old_set,$ac_new_set in
2712 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2713 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2714 ac_cache_corrupted=: ;;
2716 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2717 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2718 ac_cache_corrupted=: ;;
2721 if test "x$ac_old_val" != "x$ac_new_val"; then
2722 # differences in whitespace do not lead to failure.
2723 ac_old_val_w=`echo x $ac_old_val`
2724 ac_new_val_w=`echo x $ac_new_val`
2725 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2726 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2727 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2728 ac_cache_corrupted=:
2730 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2731 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2732 eval $ac_var=\$ac_old_val
2734 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2735 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2736 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2737 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2740 # Pass precious variables to config.status.
2741 if test "$ac_new_set" = set; then
2743 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2744 *) ac_arg=$ac_var=$ac_new_val ;;
2746 case " $ac_configure_args " in
2747 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2748 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2752 if $ac_cache_corrupted; then
2753 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2754 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2755 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2756 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2757 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2759 ## -------------------- ##
2760 ## Main body of script. ##
2761 ## -------------------- ##
2764 ac_cpp='$CPP $CPPFLAGS'
2765 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2766 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2767 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2775 for ac_dir in config "$srcdir"/config; do
2776 if test -f "$ac_dir/install-sh"; then
2778 ac_install_sh="$ac_aux_dir/install-sh -c"
2780 elif test -f "$ac_dir/install.sh"; then
2782 ac_install_sh="$ac_aux_dir/install.sh -c"
2784 elif test -f "$ac_dir/shtool"; then
2786 ac_install_sh="$ac_aux_dir/shtool install -c"
2790 if test -z "$ac_aux_dir"; then
2791 as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2794 # These three variables are undocumented and unsupported,
2795 # and are intended to be withdrawn in a future Autoconf release.
2796 # They can cause serious problems if a builder's source tree is in a directory
2797 # whose full name contains unusual characters.
2798 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2799 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2800 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2804 configure_args=$ac_configure_args
2807 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2810 cat >>confdefs.h <<_ACEOF
2811 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2818 # Check whether --with-extra-version was given.
2819 if test "${with_extra_version+set}" = set; then :
2820 withval=$with_extra_version;
2823 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2826 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2829 PG_VERSION="$PACKAGE_VERSION$withval"
2834 PG_VERSION="$PACKAGE_VERSION"
2839 cat >>confdefs.h <<_ACEOF
2840 #define PG_VERSION "$PG_VERSION"
2844 # Make sure we can run config.sub.
2845 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2846 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2849 $as_echo_n "checking build system type... " >&6; }
2850 if ${ac_cv_build+:} false; then :
2851 $as_echo_n "(cached) " >&6
2853 ac_build_alias=$build_alias
2854 test "x$ac_build_alias" = x &&
2855 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2856 test "x$ac_build_alias" = x &&
2857 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2858 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2859 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2863 $as_echo "$ac_cv_build" >&6; }
2864 case $ac_cv_build in
2866 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2869 ac_save_IFS=$IFS; IFS='-'
2875 # Remember, the first character of IFS is used to create $*,
2876 # except with old shells:
2879 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2883 $as_echo_n "checking host system type... " >&6; }
2884 if ${ac_cv_host+:} false; then :
2885 $as_echo_n "(cached) " >&6
2887 if test "x$host_alias" = x; then
2888 ac_cv_host=$ac_cv_build
2890 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2891 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2896 $as_echo "$ac_cv_host" >&6; }
2899 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2902 ac_save_IFS=$IFS; IFS='-'
2908 # Remember, the first character of IFS is used to create $*,
2909 # except with old shells:
2912 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2918 $as_echo_n "checking which template to use... " >&6; }
2923 # Check whether --with-template was given.
2924 if test "${with_template+set}" = set; then :
2925 withval=$with_template;
2928 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2931 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2936 list) echo; ls "$srcdir/src/template"; exit;;
2937 *) if test -f "$srcdir/src/template/$with_template" ; then
2940 as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2949 # --with-template not given
2952 aix*) template=aix ;;
2953 cygwin*) template=cygwin ;;
2954 darwin*) template=darwin ;;
2955 dragonfly*) template=netbsd ;;
2956 freebsd*) template=freebsd ;;
2957 hpux*) template=hpux ;;
2958 linux*|gnu*|k*bsd*-gnu)
2960 mingw*) template=win32 ;;
2961 netbsd*) template=netbsd ;;
2962 openbsd*) template=openbsd ;;
2963 solaris*) template=solaris ;;
2966 if test x"$template" = x"" ; then
2968 *******************************************************************
2969 PostgreSQL has apparently not been ported to your platform yet.
2970 To try a manual configuration, look into the src/template directory
2971 for a similar platform and use the '--with-template=' option.
2973 Please also contact <pgsql-bugs@lists.postgresql.org> to see about
2974 rectifying this. Include the above 'checking host system type...'
2976 *******************************************************************
2985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2986 $as_echo "$template" >&6; }
2991 # Initialize default assumption that we do not need separate assembly code
2992 # for TAS (test-and-set). This can be overridden by the template file
2993 # when it's executed.
3000 ## Command line options
3004 # Add non-standard directories to the include path
3009 # Check whether --with-includes was given.
3010 if test "${with_includes+set}" = set; then :
3011 withval=$with_includes;
3014 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3017 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3030 # Add non-standard directories to the library search path
3035 # Check whether --with-libraries was given.
3036 if test "${with_libraries+set}" = set; then :
3037 withval=$with_libraries;
3040 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3043 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3046 LIBRARY_DIRS=$withval
3057 # Check whether --with-libs was given.
3058 if test "${with_libs+set}" = set; then :
3062 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3065 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3068 LIBRARY_DIRS=$withval
3078 # 64-bit integer date/time storage is now the only option, but to avoid
3079 # unnecessary breakage of build scripts, continue to accept an explicit
3080 # "--enable-integer-datetimes" switch.
3084 # Check whether --enable-integer-datetimes was given.
3085 if test "${enable_integer_datetimes+set}" = set; then :
3086 enableval=$enable_integer_datetimes;
3092 as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3095 as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3100 enable_integer_datetimes=yes
3110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3111 $as_echo_n "checking whether NLS is wanted... " >&6; }
3114 # Check whether --enable-nls was given.
3115 if test "${enable_nls+set}" = set; then :
3116 enableval=$enable_nls;
3126 WANTED_LANGUAGES=$enableval
3136 if test "$enable_nls" = yes; then
3138 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3143 $as_echo "$enable_nls" >&6; }
3148 # Default port number (--with-pgport), default 5432
3150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3151 $as_echo_n "checking for default port number... " >&6; }
3155 # Check whether --with-pgport was given.
3156 if test "${with_pgport+set}" = set; then :
3157 withval=$with_pgport;
3160 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3163 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3166 default_port=$withval
3175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3176 $as_echo "$default_port" >&6; }
3177 # Need both of these because some places want an integer and some a string
3179 cat >>confdefs.h <<_ACEOF
3180 #define DEF_PGPORT ${default_port}
3184 cat >>confdefs.h <<_ACEOF
3185 #define DEF_PGPORT_STR "${default_port}"
3190 # It's worth validating port; you can get very confusing errors otherwise
3191 if test x"$default_port" = x""; then
3192 as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3193 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3194 as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3195 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3196 as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3197 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3198 as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3202 # '-rpath'-like feature can be disabled
3206 # Check whether --enable-rpath was given.
3207 if test "${enable_rpath+set}" = set; then :
3208 enableval=$enable_rpath;
3217 as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3234 # Check whether --enable-spinlocks was given.
3235 if test "${enable_spinlocks+set}" = set; then :
3236 enableval=$enable_spinlocks;
3245 as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3250 enable_spinlocks=yes
3261 # Check whether --enable-atomics was given.
3262 if test "${enable_atomics+set}" = set; then :
3263 enableval=$enable_atomics;
3272 as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3284 # --enable-debug adds -g to compiler flags
3288 # Check whether --enable-debug was given.
3289 if test "${enable_debug+set}" = set; then :
3290 enableval=$enable_debug;
3299 as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3312 # --enable-profiling enables gcc profiling
3316 # Check whether --enable-profiling was given.
3317 if test "${enable_profiling+set}" = set; then :
3318 enableval=$enable_profiling;
3327 as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3339 # --enable-coverage enables generation of code coverage metrics with gcov
3343 # Check whether --enable-coverage was given.
3344 if test "${enable_coverage+set}" = set; then :
3345 enableval=$enable_coverage;
3348 if test -z "$GCOV"; then
3351 # Extract the first word of "$ac_prog", so it can be a program name with args.
3352 set dummy $ac_prog; ac_word=$2
3353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3354 $as_echo_n "checking for $ac_word... " >&6; }
3355 if ${ac_cv_path_GCOV+:} false; then :
3356 $as_echo_n "(cached) " >&6
3360 ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3363 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3367 test -z "$as_dir" && as_dir=.
3368 for ac_exec_ext in '' $ac_executable_extensions; do
3369 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3370 ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3371 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3381 GCOV=$ac_cv_path_GCOV
3382 if test -n "$GCOV"; then
3383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3384 $as_echo "$GCOV" >&6; }
3386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3387 $as_echo "no" >&6; }
3391 test -n "$GCOV" && break
3395 # Report the value of GCOV in configure's output in all cases.
3396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3397 $as_echo_n "checking for GCOV... " >&6; }
3398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3399 $as_echo "$GCOV" >&6; }
3402 if test -z "$GCOV"; then
3403 as_fn_error $? "gcov not found" "$LINENO" 5
3405 if test -z "$LCOV"; then
3408 # Extract the first word of "$ac_prog", so it can be a program name with args.
3409 set dummy $ac_prog; ac_word=$2
3410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3411 $as_echo_n "checking for $ac_word... " >&6; }
3412 if ${ac_cv_path_LCOV+:} false; then :
3413 $as_echo_n "(cached) " >&6
3417 ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3420 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3424 test -z "$as_dir" && as_dir=.
3425 for ac_exec_ext in '' $ac_executable_extensions; do
3426 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3427 ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3428 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3438 LCOV=$ac_cv_path_LCOV
3439 if test -n "$LCOV"; then
3440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3441 $as_echo "$LCOV" >&6; }
3443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3444 $as_echo "no" >&6; }
3448 test -n "$LCOV" && break
3452 # Report the value of LCOV in configure's output in all cases.
3453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3454 $as_echo_n "checking for LCOV... " >&6; }
3455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3456 $as_echo "$LCOV" >&6; }
3459 if test -z "$LCOV"; then
3460 as_fn_error $? "lcov not found" "$LINENO" 5
3462 if test -z "$GENHTML"; then
3463 for ac_prog in genhtml
3465 # Extract the first word of "$ac_prog", so it can be a program name with args.
3466 set dummy $ac_prog; ac_word=$2
3467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3468 $as_echo_n "checking for $ac_word... " >&6; }
3469 if ${ac_cv_path_GENHTML+:} false; then :
3470 $as_echo_n "(cached) " >&6
3474 ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3477 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3481 test -z "$as_dir" && as_dir=.
3482 for ac_exec_ext in '' $ac_executable_extensions; do
3483 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3484 ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3485 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3495 GENHTML=$ac_cv_path_GENHTML
3496 if test -n "$GENHTML"; then
3497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3498 $as_echo "$GENHTML" >&6; }
3500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3501 $as_echo "no" >&6; }
3505 test -n "$GENHTML" && break
3509 # Report the value of GENHTML in configure's output in all cases.
3510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3511 $as_echo_n "checking for GENHTML... " >&6; }
3512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3513 $as_echo "$GENHTML" >&6; }
3516 if test -z "$GENHTML"; then
3517 as_fn_error $? "genhtml not found" "$LINENO" 5
3524 as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3541 # Check whether --enable-dtrace was given.
3542 if test "${enable_dtrace+set}" = set; then :
3543 enableval=$enable_dtrace;
3546 if test -z "$DTRACE"; then
3547 for ac_prog in dtrace
3549 # Extract the first word of "$ac_prog", so it can be a program name with args.
3550 set dummy $ac_prog; ac_word=$2
3551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3552 $as_echo_n "checking for $ac_word... " >&6; }
3553 if ${ac_cv_path_DTRACE+:} false; then :
3554 $as_echo_n "(cached) " >&6
3558 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3561 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3565 test -z "$as_dir" && as_dir=.
3566 for ac_exec_ext in '' $ac_executable_extensions; do
3567 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3568 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3569 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3579 DTRACE=$ac_cv_path_DTRACE
3580 if test -n "$DTRACE"; then
3581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3582 $as_echo "$DTRACE" >&6; }
3584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3585 $as_echo "no" >&6; }
3589 test -n "$DTRACE" && break
3593 # Report the value of DTRACE in configure's output in all cases.
3594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3595 $as_echo_n "checking for DTRACE... " >&6; }
3596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3597 $as_echo "$DTRACE" >&6; }
3600 if test -z "$DTRACE"; then
3601 as_fn_error $? "dtrace not found" "$LINENO" 5
3609 as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3626 # Check whether --enable-tap-tests was given.
3627 if test "${enable_tap_tests+set}" = set; then :
3628 enableval=$enable_tap_tests;
3637 as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3653 $as_echo_n "checking for block size... " >&6; }
3657 # Check whether --with-blocksize was given.
3658 if test "${with_blocksize+set}" = set; then :
3659 withval=$with_blocksize;
3662 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3665 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3677 case ${blocksize} in
3684 *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3687 $as_echo "${blocksize}kB" >&6; }
3690 cat >>confdefs.h <<_ACEOF
3691 #define BLCKSZ ${BLCKSZ}
3696 # Relation segment size
3698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3699 $as_echo_n "checking for segment size... " >&6; }
3703 # Check whether --with-segsize was given.
3704 if test "${with_segsize+set}" = set; then :
3705 withval=$with_segsize;
3708 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3711 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3723 # this expression is set up to avoid unnecessary integer overflow
3724 # blocksize is already guaranteed to be a factor of 1024
3725 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3726 test $? -eq 0 || exit 1
3727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3728 $as_echo "${segsize}GB" >&6; }
3731 cat >>confdefs.h <<_ACEOF
3732 #define RELSEG_SIZE ${RELSEG_SIZE}
3739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3740 $as_echo_n "checking for WAL block size... " >&6; }
3744 # Check whether --with-wal-blocksize was given.
3745 if test "${with_wal_blocksize+set}" = set; then :
3746 withval=$with_wal_blocksize;
3749 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3752 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3755 wal_blocksize=$withval
3764 case ${wal_blocksize} in
3765 1) XLOG_BLCKSZ=1024;;
3766 2) XLOG_BLCKSZ=2048;;
3767 4) XLOG_BLCKSZ=4096;;
3768 8) XLOG_BLCKSZ=8192;;
3769 16) XLOG_BLCKSZ=16384;;
3770 32) XLOG_BLCKSZ=32768;;
3771 64) XLOG_BLCKSZ=65536;;
3772 *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3775 $as_echo "${wal_blocksize}kB" >&6; }
3778 cat >>confdefs.h <<_ACEOF
3779 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3787 # For historical reasons you can also use --with-CC to specify the C compiler
3788 # to use, although the standard way to do this is to set the CC environment
3793 # Check whether --with-CC was given.
3794 if test "${with_CC+set}" = set; then :
3798 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3801 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3813 aix) pgac_cc_list="gcc xlc"; pgac_cxx_list="g++ xlC";;
3814 *) pgac_cc_list="gcc cc"; pgac_cxx_list="g++ c++";;
3818 ac_cpp='$CPP $CPPFLAGS'
3819 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3820 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3821 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3822 if test -n "$ac_tool_prefix"; then
3823 for ac_prog in $pgac_cc_list
3825 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3826 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3828 $as_echo_n "checking for $ac_word... " >&6; }
3829 if ${ac_cv_prog_CC+:} false; then :
3830 $as_echo_n "(cached) " >&6
3832 if test -n "$CC"; then
3833 ac_cv_prog_CC="$CC" # Let the user override the test.
3835 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3839 test -z "$as_dir" && as_dir=.
3840 for ac_exec_ext in '' $ac_executable_extensions; do
3841 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3842 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3843 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3853 if test -n "$CC"; then
3854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3855 $as_echo "$CC" >&6; }
3857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3858 $as_echo "no" >&6; }
3862 test -n "$CC" && break
3865 if test -z "$CC"; then
3867 for ac_prog in $pgac_cc_list
3869 # Extract the first word of "$ac_prog", so it can be a program name with args.
3870 set dummy $ac_prog; ac_word=$2
3871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3872 $as_echo_n "checking for $ac_word... " >&6; }
3873 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3874 $as_echo_n "(cached) " >&6
3876 if test -n "$ac_ct_CC"; then
3877 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3879 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3883 test -z "$as_dir" && as_dir=.
3884 for ac_exec_ext in '' $ac_executable_extensions; do
3885 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3886 ac_cv_prog_ac_ct_CC="$ac_prog"
3887 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3896 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3897 if test -n "$ac_ct_CC"; then
3898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3899 $as_echo "$ac_ct_CC" >&6; }
3901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3902 $as_echo "no" >&6; }
3906 test -n "$ac_ct_CC" && break
3909 if test "x$ac_ct_CC" = x; then
3912 case $cross_compiling:$ac_tool_warned in
3914 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3915 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3916 ac_tool_warned=yes ;;
3923 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3924 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3925 as_fn_error $? "no acceptable C compiler found in \$PATH
3926 See \`config.log' for more details" "$LINENO" 5; }
3928 # Provide some information about the compiler.
3929 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3932 for ac_option in --version -v -V -qversion; do
3933 { { ac_try="$ac_compiler $ac_option >&5"
3935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3936 *) ac_try_echo=$ac_try;;
3938 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3939 $as_echo "$ac_try_echo"; } >&5
3940 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3942 if test -s conftest.err; then
3944 ... rest of stderr output deleted ...
3945 10q' conftest.err >conftest.er1
3946 cat conftest.er1 >&5
3948 rm -f conftest.er1 conftest.err
3949 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3950 test $ac_status = 0; }
3953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3954 /* end confdefs.h. */
3964 ac_clean_files_save=$ac_clean_files
3965 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3966 # Try to create an executable without -o first, disregard a.out.
3967 # It will help us diagnose broken compilers, and finding out an intuition
3969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3970 $as_echo_n "checking whether the C compiler works... " >&6; }
3971 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3973 # The possible output files:
3974 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3977 for ac_file in $ac_files
3980 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3981 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3986 if { { ac_try="$ac_link_default"
3988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3989 *) ac_try_echo=$ac_try;;
3991 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3992 $as_echo "$ac_try_echo"; } >&5
3993 (eval "$ac_link_default") 2>&5
3995 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3996 test $ac_status = 0; }; then :
3997 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3998 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3999 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4000 # so that the user can short-circuit this test for compilers unknown to
4002 for ac_file in $ac_files ''
4004 test -f "$ac_file" || continue
4006 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4009 # We found the default executable, but exeext='' is most
4013 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4015 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4017 # We set ac_cv_exeext here because the later test for it is not
4018 # safe: cross compilers may not add the suffix if given an `-o'
4019 # argument, so we may need to know it at that point already.
4020 # Even if this section looks crufty: it has the advantage of
4027 test "$ac_cv_exeext" = no && ac_cv_exeext=
4032 if test -z "$ac_file"; then :
4033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4034 $as_echo "no" >&6; }
4035 $as_echo "$as_me: failed program was:" >&5
4036 sed 's/^/| /' conftest.$ac_ext >&5
4038 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4039 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4040 as_fn_error 77 "C compiler cannot create executables
4041 See \`config.log' for more details" "$LINENO" 5; }
4043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4044 $as_echo "yes" >&6; }
4046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4047 $as_echo_n "checking for C compiler default output file name... " >&6; }
4048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4049 $as_echo "$ac_file" >&6; }
4050 ac_exeext=$ac_cv_exeext
4052 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4053 ac_clean_files=$ac_clean_files_save
4054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4055 $as_echo_n "checking for suffix of executables... " >&6; }
4056 if { { ac_try="$ac_link"
4058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4059 *) ac_try_echo=$ac_try;;
4061 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4062 $as_echo "$ac_try_echo"; } >&5
4063 (eval "$ac_link") 2>&5
4065 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4066 test $ac_status = 0; }; then :
4067 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4068 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4069 # work properly (i.e., refer to `conftest.exe'), while it won't with
4071 for ac_file in conftest.exe conftest conftest.*; do
4072 test -f "$ac_file" || continue
4074 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4075 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4081 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4082 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4083 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4084 See \`config.log' for more details" "$LINENO" 5; }
4086 rm -f conftest conftest$ac_cv_exeext
4087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4088 $as_echo "$ac_cv_exeext" >&6; }
4090 rm -f conftest.$ac_ext
4091 EXEEXT=$ac_cv_exeext
4093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4094 /* end confdefs.h. */
4099 FILE *f = fopen ("conftest.out", "w");
4100 return ferror (f) || fclose (f) != 0;
4106 ac_clean_files="$ac_clean_files conftest.out"
4107 # Check that the compiler produces executables we can run. If not, either
4108 # the compiler is broken, or we cross compile.
4109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4110 $as_echo_n "checking whether we are cross compiling... " >&6; }
4111 if test "$cross_compiling" != yes; then
4112 { { ac_try="$ac_link"
4114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4115 *) ac_try_echo=$ac_try;;
4117 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4118 $as_echo "$ac_try_echo"; } >&5
4119 (eval "$ac_link") 2>&5
4121 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4122 test $ac_status = 0; }
4123 if { ac_try='./conftest$ac_cv_exeext'
4124 { { case "(($ac_try" in
4125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4126 *) ac_try_echo=$ac_try;;
4128 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4129 $as_echo "$ac_try_echo"; } >&5
4130 (eval "$ac_try") 2>&5
4132 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4133 test $ac_status = 0; }; }; then
4136 if test "$cross_compiling" = maybe; then
4139 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4140 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4141 as_fn_error $? "cannot run C compiled programs.
4142 If you meant to cross compile, use \`--host'.
4143 See \`config.log' for more details" "$LINENO" 5; }
4147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4148 $as_echo "$cross_compiling" >&6; }
4150 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4151 ac_clean_files=$ac_clean_files_save
4152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4153 $as_echo_n "checking for suffix of object files... " >&6; }
4154 if ${ac_cv_objext+:} false; then :
4155 $as_echo_n "(cached) " >&6
4157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4158 /* end confdefs.h. */
4168 rm -f conftest.o conftest.obj
4169 if { { ac_try="$ac_compile"
4171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4172 *) ac_try_echo=$ac_try;;
4174 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4175 $as_echo "$ac_try_echo"; } >&5
4176 (eval "$ac_compile") 2>&5
4178 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4179 test $ac_status = 0; }; then :
4180 for ac_file in conftest.o conftest.obj conftest.*; do
4181 test -f "$ac_file" || continue;
4183 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4184 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4189 $as_echo "$as_me: failed program was:" >&5
4190 sed 's/^/| /' conftest.$ac_ext >&5
4192 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4193 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4194 as_fn_error $? "cannot compute suffix of object files: cannot compile
4195 See \`config.log' for more details" "$LINENO" 5; }
4197 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4200 $as_echo "$ac_cv_objext" >&6; }
4201 OBJEXT=$ac_cv_objext
4203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4204 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4205 if ${ac_cv_c_compiler_gnu+:} false; then :
4206 $as_echo_n "(cached) " >&6
4208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4209 /* end confdefs.h. */
4222 if ac_fn_c_try_compile "$LINENO"; then :
4227 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4228 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4232 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4233 if test $ac_compiler_gnu = yes; then
4238 ac_test_CFLAGS=${CFLAGS+set}
4239 ac_save_CFLAGS=$CFLAGS
4240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4241 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4242 if ${ac_cv_prog_cc_g+:} false; then :
4243 $as_echo_n "(cached) " >&6
4245 ac_save_c_werror_flag=$ac_c_werror_flag
4246 ac_c_werror_flag=yes
4249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4250 /* end confdefs.h. */
4260 if ac_fn_c_try_compile "$LINENO"; then :
4264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4265 /* end confdefs.h. */
4275 if ac_fn_c_try_compile "$LINENO"; then :
4278 ac_c_werror_flag=$ac_save_c_werror_flag
4280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4281 /* end confdefs.h. */
4291 if ac_fn_c_try_compile "$LINENO"; then :
4294 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4296 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4298 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4299 ac_c_werror_flag=$ac_save_c_werror_flag
4301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4302 $as_echo "$ac_cv_prog_cc_g" >&6; }
4303 if test "$ac_test_CFLAGS" = set; then
4304 CFLAGS=$ac_save_CFLAGS
4305 elif test $ac_cv_prog_cc_g = yes; then
4306 if test "$GCC" = yes; then
4312 if test "$GCC" = yes; then
4318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4319 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4320 if ${ac_cv_prog_cc_c89+:} false; then :
4321 $as_echo_n "(cached) " >&6
4323 ac_cv_prog_cc_c89=no
4325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4326 /* end confdefs.h. */
4330 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4331 struct buf { int x; };
4332 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4333 static char *e (p, i)
4339 static char *f (char * (*g) (char **, int), char **p, ...)
4344 s = g (p, va_arg (v,int));
4349 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4350 function prototypes and stuff, but not '\xHH' hex character constants.
4351 These don't provoke an error unfortunately, instead are silently treated
4352 as 'x'. The following induces an error, until -std is added to get
4353 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4354 array size at least. It's necessary to write '\x00'==0 to get something
4355 that's true only with -std. */
4356 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4358 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4359 inside strings and character constants. */
4361 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4363 int test (int i, double x);
4364 struct s1 {int (*f) (int a);};
4365 struct s2 {int (*f) (double a);};
4366 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4372 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4377 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4378 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4380 CC="$ac_save_CC $ac_arg"
4381 if ac_fn_c_try_compile "$LINENO"; then :
4382 ac_cv_prog_cc_c89=$ac_arg
4384 rm -f core conftest.err conftest.$ac_objext
4385 test "x$ac_cv_prog_cc_c89" != "xno" && break
4387 rm -f conftest.$ac_ext
4392 case "x$ac_cv_prog_cc_c89" in
4394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4395 $as_echo "none needed" >&6; } ;;
4397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4398 $as_echo "unsupported" >&6; } ;;
4400 CC="$CC $ac_cv_prog_cc_c89"
4401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4402 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4404 if test "x$ac_cv_prog_cc_c89" != xno; then :
4409 ac_cpp='$CPP $CPPFLAGS'
4410 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4411 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4412 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4415 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4416 if ${ac_cv_prog_cc_c99+:} false; then :
4417 $as_echo_n "(cached) " >&6
4419 ac_cv_prog_cc_c99=no
4421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4422 /* end confdefs.h. */
4424 #include <stdbool.h>
4429 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4430 #define debug(...) fprintf (stderr, __VA_ARGS__)
4431 #define showlist(...) puts (#__VA_ARGS__)
4432 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4434 test_varargs_macros (void)
4439 debug ("X = %d\n", x);
4440 showlist (The first, second, and third items.);
4441 report (x>y, "x is %d but y is %d", x, y);
4444 // Check long long types.
4445 #define BIG64 18446744073709551615ull
4446 #define BIG32 4294967295ul
4447 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4449 your preprocessor is broken;
4453 your preprocessor is broken;
4455 static long long int bignum = -9223372036854775807LL;
4456 static unsigned long long int ubignum = BIG64;
4458 struct incomplete_array
4466 const wchar_t *name;
4470 typedef const char *ccp;
4473 test_restrict (ccp restrict text)
4475 // See if C++-style comments work.
4476 // Iterate through items via the restricted pointer.
4477 // Also check for declarations in for loops.
4478 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4483 // Check varargs and va_copy.
4485 test_varargs (const char *format, ...)
4488 va_start (args, format);
4490 va_copy (args_copy, args);
4501 str = va_arg (args_copy, const char *);
4504 number = va_arg (args_copy, int);
4507 fnumber = va_arg (args_copy, double);
4522 _Bool success = false;
4525 if (test_restrict ("String literal") == 0)
4527 char *restrict newvar = "Another string";
4530 test_varargs ("s, d' f .", "string", 65, 34.234);
4531 test_varargs_macros ();
4533 // Check flexible array members.
4534 struct incomplete_array *ia =
4535 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4537 for (int i = 0; i < ia->datasize; ++i)
4538 ia->data[i] = i * 1.234;
4540 // Check named initializers.
4541 struct named_init ni = {
4543 .name = L"Test wide string",
4544 .average = 543.34343,
4549 int dynamic_array[ni.number];
4550 dynamic_array[ni.number - 1] = 543;
4552 // work around unused variable warnings
4553 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4554 || dynamic_array[ni.number - 1] != 543);
4560 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4562 CC="$ac_save_CC $ac_arg"
4563 if ac_fn_c_try_compile "$LINENO"; then :
4564 ac_cv_prog_cc_c99=$ac_arg
4566 rm -f core conftest.err conftest.$ac_objext
4567 test "x$ac_cv_prog_cc_c99" != "xno" && break
4569 rm -f conftest.$ac_ext
4574 case "x$ac_cv_prog_cc_c99" in
4576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4577 $as_echo "none needed" >&6; } ;;
4579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4580 $as_echo "unsupported" >&6; } ;;
4582 CC="$CC $ac_cv_prog_cc_c99"
4583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4584 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4586 if test "x$ac_cv_prog_cc_c99" != xno; then :
4592 # Error out if the compiler does not support C99, as the codebase
4594 if test "$ac_cv_prog_cc_c99" = no; then
4595 as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4599 ac_cpp='$CXXCPP $CPPFLAGS'
4600 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4601 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4602 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4603 if test -z "$CXX"; then
4604 if test -n "$CCC"; then
4607 if test -n "$ac_tool_prefix"; then
4608 for ac_prog in $pgac_cxx_list
4610 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4611 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4613 $as_echo_n "checking for $ac_word... " >&6; }
4614 if ${ac_cv_prog_CXX+:} false; then :
4615 $as_echo_n "(cached) " >&6
4617 if test -n "$CXX"; then
4618 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4620 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4624 test -z "$as_dir" && as_dir=.
4625 for ac_exec_ext in '' $ac_executable_extensions; do
4626 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4627 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4628 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4638 if test -n "$CXX"; then
4639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4640 $as_echo "$CXX" >&6; }
4642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4643 $as_echo "no" >&6; }
4647 test -n "$CXX" && break
4650 if test -z "$CXX"; then
4652 for ac_prog in $pgac_cxx_list
4654 # Extract the first word of "$ac_prog", so it can be a program name with args.
4655 set dummy $ac_prog; ac_word=$2
4656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4657 $as_echo_n "checking for $ac_word... " >&6; }
4658 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4659 $as_echo_n "(cached) " >&6
4661 if test -n "$ac_ct_CXX"; then
4662 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4664 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4668 test -z "$as_dir" && as_dir=.
4669 for ac_exec_ext in '' $ac_executable_extensions; do
4670 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4671 ac_cv_prog_ac_ct_CXX="$ac_prog"
4672 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4681 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4682 if test -n "$ac_ct_CXX"; then
4683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4684 $as_echo "$ac_ct_CXX" >&6; }
4686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4687 $as_echo "no" >&6; }
4691 test -n "$ac_ct_CXX" && break
4694 if test "x$ac_ct_CXX" = x; then
4697 case $cross_compiling:$ac_tool_warned in
4699 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4700 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4701 ac_tool_warned=yes ;;
4709 # Provide some information about the compiler.
4710 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4713 for ac_option in --version -v -V -qversion; do
4714 { { ac_try="$ac_compiler $ac_option >&5"
4716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4717 *) ac_try_echo=$ac_try;;
4719 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4720 $as_echo "$ac_try_echo"; } >&5
4721 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4723 if test -s conftest.err; then
4725 ... rest of stderr output deleted ...
4726 10q' conftest.err >conftest.er1
4727 cat conftest.er1 >&5
4729 rm -f conftest.er1 conftest.err
4730 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4731 test $ac_status = 0; }
4734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4735 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4736 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4737 $as_echo_n "(cached) " >&6
4739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4740 /* end confdefs.h. */
4753 if ac_fn_cxx_try_compile "$LINENO"; then :
4758 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4759 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4763 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4764 if test $ac_compiler_gnu = yes; then
4769 ac_test_CXXFLAGS=${CXXFLAGS+set}
4770 ac_save_CXXFLAGS=$CXXFLAGS
4771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4772 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4773 if ${ac_cv_prog_cxx_g+:} false; then :
4774 $as_echo_n "(cached) " >&6
4776 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4777 ac_cxx_werror_flag=yes
4780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4781 /* end confdefs.h. */
4791 if ac_fn_cxx_try_compile "$LINENO"; then :
4792 ac_cv_prog_cxx_g=yes
4795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4796 /* end confdefs.h. */
4806 if ac_fn_cxx_try_compile "$LINENO"; then :
4809 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4812 /* end confdefs.h. */
4822 if ac_fn_cxx_try_compile "$LINENO"; then :
4823 ac_cv_prog_cxx_g=yes
4825 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4827 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4829 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4830 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4833 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4834 if test "$ac_test_CXXFLAGS" = set; then
4835 CXXFLAGS=$ac_save_CXXFLAGS
4836 elif test $ac_cv_prog_cxx_g = yes; then
4837 if test "$GXX" = yes; then
4843 if test "$GXX" = yes; then
4850 ac_cpp='$CPP $CPPFLAGS'
4851 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4852 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4853 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4856 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4857 # but has idiosyncrasies of its own. We assume icc will define
4858 # __INTEL_COMPILER regardless of CFLAGS.
4860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4861 /* end confdefs.h. */
4866 #ifndef __INTEL_COMPILER
4873 if ac_fn_c_try_compile "$LINENO"; then :
4878 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4880 # Check if it's Sun Studio compiler. We assume that
4881 # __SUNPRO_C will be defined for Sun Studio compilers
4882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4883 /* end confdefs.h. */
4895 if ac_fn_c_try_compile "$LINENO"; then :
4900 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4908 # Checked early because subsequent tests depend on it.
4912 # Check whether --with-llvm was given.
4913 if test "${with_llvm+set}" = set; then :
4918 $as_echo "#define USE_LLVM 1" >>confdefs.h
4925 as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4936 for ac_prog in gawk mawk nawk awk
4938 # Extract the first word of "$ac_prog", so it can be a program name with args.
4939 set dummy $ac_prog; ac_word=$2
4940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4941 $as_echo_n "checking for $ac_word... " >&6; }
4942 if ${ac_cv_prog_AWK+:} false; then :
4943 $as_echo_n "(cached) " >&6
4945 if test -n "$AWK"; then
4946 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4948 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4952 test -z "$as_dir" && as_dir=.
4953 for ac_exec_ext in '' $ac_executable_extensions; do
4954 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4955 ac_cv_prog_AWK="$ac_prog"
4956 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4966 if test -n "$AWK"; then
4967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4968 $as_echo "$AWK" >&6; }
4970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4971 $as_echo "no" >&6; }
4975 test -n "$AWK" && break
4978 if test "$with_llvm" = yes; then :
4984 if test -z "$LLVM_CONFIG"; then
4985 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
4987 # Extract the first word of "$ac_prog", so it can be a program name with args.
4988 set dummy $ac_prog; ac_word=$2
4989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4990 $as_echo_n "checking for $ac_word... " >&6; }
4991 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
4992 $as_echo_n "(cached) " >&6
4994 case $LLVM_CONFIG in
4996 ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
4999 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5003 test -z "$as_dir" && as_dir=.
5004 for ac_exec_ext in '' $ac_executable_extensions; do
5005 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5006 ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5007 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5017 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5018 if test -n "$LLVM_CONFIG"; then
5019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5020 $as_echo "$LLVM_CONFIG" >&6; }
5022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5023 $as_echo "no" >&6; }
5027 test -n "$LLVM_CONFIG" && break
5031 # Report the value of LLVM_CONFIG in configure's output in all cases.
5032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5033 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5035 $as_echo "$LLVM_CONFIG" >&6; }
5039 # no point continuing if llvm wasn't found
5040 if test -z "$LLVM_CONFIG"; then
5041 as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5043 # check if detected $LLVM_CONFIG is executable
5044 pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5045 if test "x$pgac_llvm_version" = "xno"; then
5046 as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5048 # and whether the version is supported
5049 if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 4 || ($1 == 3 && $2 >= 9)) exit 1; else exit 0;}';then
5050 as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 3.9 is required" "$LINENO" 5
5053 # need clang to create some bitcode files
5055 if test -z "$CLANG"; then
5056 for ac_prog in clang clang-7 clang-6.0 clang-5.0 clang-4.0 clang-3.9
5058 # Extract the first word of "$ac_prog", so it can be a program name with args.
5059 set dummy $ac_prog; ac_word=$2
5060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5061 $as_echo_n "checking for $ac_word... " >&6; }
5062 if ${ac_cv_path_CLANG+:} false; then :
5063 $as_echo_n "(cached) " >&6
5067 ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5070 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5074 test -z "$as_dir" && as_dir=.
5075 for ac_exec_ext in '' $ac_executable_extensions; do
5076 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5077 ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5078 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5088 CLANG=$ac_cv_path_CLANG
5089 if test -n "$CLANG"; then
5090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5091 $as_echo "$CLANG" >&6; }
5093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5094 $as_echo "no" >&6; }
5098 test -n "$CLANG" && break
5102 # Report the value of CLANG in configure's output in all cases.
5103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5104 $as_echo_n "checking for CLANG... " >&6; }
5105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5106 $as_echo "$CLANG" >&6; }
5109 if test -z "$CLANG"; then
5110 as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5112 # make sure clang is executable
5113 if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5114 as_fn_error $? "$CLANG does not work" "$LINENO" 5
5116 # Could check clang version, but it doesn't seem that
5117 # important. Systems with a new enough LLVM version are usually
5118 # going to have a decent clang version too. It's also not entirely
5119 # clear what the minimum version is.
5121 # Collect compiler flags necessary to build the LLVM dependent
5123 for pgac_option in `$LLVM_CONFIG --cppflags`; do
5124 case $pgac_option in
5125 -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5129 for pgac_option in `$LLVM_CONFIG --ldflags`; do
5130 case $pgac_option in
5131 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5135 # ABI influencing options, standard influencing options
5136 for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5137 case $pgac_option in
5138 -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5139 -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5143 # Look for components we're interested in, collect necessary
5144 # libs. As some components are optional, we can't just list all of
5145 # them as it'd raise an error.
5147 for pgac_component in `$LLVM_CONFIG --components`; do
5148 case $pgac_component in
5149 engine) pgac_components="$pgac_components $pgac_component";;
5150 debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5151 orcjit) pgac_components="$pgac_components $pgac_component";;
5152 passes) pgac_components="$pgac_components $pgac_component";;
5153 perfjitevents) pgac_components="$pgac_components $pgac_component";;
5157 # And then get the libraries that need to be linked in for the
5158 # selected components. They're large libraries, we only want to
5159 # link them into the LLVM using shared library.
5160 for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5161 case $pgac_option in
5162 -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5166 LLVM_BINPATH=`$LLVM_CONFIG --bindir`
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
5267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5268 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5269 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5270 $as_echo_n "(cached) " >&6
5272 pgac_save_CFLAGS=$CFLAGS
5275 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5276 ac_save_c_werror_flag=$ac_c_werror_flag
5277 ac_c_werror_flag=yes
5278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5279 /* end confdefs.h. */
5289 if ac_fn_c_try_compile "$LINENO"; then :
5290 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5292 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5294 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5295 ac_c_werror_flag=$ac_save_c_werror_flag
5296 CFLAGS="$pgac_save_CFLAGS"
5299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5300 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5301 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5302 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5306 # -Wdeclaration-after-statement isn't applicable for C++. Specific C files
5307 # disable it, so AC_SUBST the negative form.
5308 PERMIT_DECLARATION_AFTER_STATEMENT=
5309 if test x"$save_CFLAGS" != x"$CFLAGS"; then
5310 PERMIT_DECLARATION_AFTER_STATEMENT=-Wno-declaration-after-statement
5313 # Really don't want VLAs to be used in our dialect of C
5315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5316 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5317 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5318 $as_echo_n "(cached) " >&6
5320 pgac_save_CFLAGS=$CFLAGS
5323 CFLAGS="${CFLAGS} -Werror=vla"
5324 ac_save_c_werror_flag=$ac_c_werror_flag
5325 ac_c_werror_flag=yes
5326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5327 /* end confdefs.h. */
5337 if ac_fn_c_try_compile "$LINENO"; then :
5338 pgac_cv_prog_CC_cflags__Werror_vla=yes
5340 pgac_cv_prog_CC_cflags__Werror_vla=no
5342 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5343 ac_c_werror_flag=$ac_save_c_werror_flag
5344 CFLAGS="$pgac_save_CFLAGS"
5347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5348 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5349 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5350 CFLAGS="${CFLAGS} -Werror=vla"
5354 # -Wvla is not applicable for C++
5356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5357 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5358 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5359 $as_echo_n "(cached) " >&6
5361 pgac_save_CFLAGS=$CFLAGS
5364 CFLAGS="${CFLAGS} -Wendif-labels"
5365 ac_save_c_werror_flag=$ac_c_werror_flag
5366 ac_c_werror_flag=yes
5367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5368 /* end confdefs.h. */
5378 if ac_fn_c_try_compile "$LINENO"; then :
5379 pgac_cv_prog_CC_cflags__Wendif_labels=yes
5381 pgac_cv_prog_CC_cflags__Wendif_labels=no
5383 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5384 ac_c_werror_flag=$ac_save_c_werror_flag
5385 CFLAGS="$pgac_save_CFLAGS"
5388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5389 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5390 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5391 CFLAGS="${CFLAGS} -Wendif-labels"
5395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5396 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5397 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5398 $as_echo_n "(cached) " >&6
5400 pgac_save_CXXFLAGS=$CXXFLAGS
5403 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5404 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5405 ac_cxx_werror_flag=yes
5407 ac_cpp='$CXXCPP $CPPFLAGS'
5408 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5409 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5410 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5413 /* end confdefs.h. */
5423 if ac_fn_cxx_try_compile "$LINENO"; then :
5424 pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5426 pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5428 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5430 ac_cpp='$CPP $CPPFLAGS'
5431 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5432 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5433 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5435 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5436 CXXFLAGS="$pgac_save_CXXFLAGS"
5437 CXX="$pgac_save_CXX"
5439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5440 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5441 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5442 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5448 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5449 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5450 $as_echo_n "(cached) " >&6
5452 pgac_save_CFLAGS=$CFLAGS
5455 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5456 ac_save_c_werror_flag=$ac_c_werror_flag
5457 ac_c_werror_flag=yes
5458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5459 /* end confdefs.h. */
5469 if ac_fn_c_try_compile "$LINENO"; then :
5470 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5472 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5474 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5475 ac_c_werror_flag=$ac_save_c_werror_flag
5476 CFLAGS="$pgac_save_CFLAGS"
5479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5480 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5481 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5482 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5487 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5488 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5489 $as_echo_n "(cached) " >&6
5491 pgac_save_CXXFLAGS=$CXXFLAGS
5494 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5495 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5496 ac_cxx_werror_flag=yes
5498 ac_cpp='$CXXCPP $CPPFLAGS'
5499 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5500 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5501 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5504 /* end confdefs.h. */
5514 if ac_fn_cxx_try_compile "$LINENO"; then :
5515 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5517 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5519 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5521 ac_cpp='$CPP $CPPFLAGS'
5522 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5523 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5524 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5526 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5527 CXXFLAGS="$pgac_save_CXXFLAGS"
5528 CXX="$pgac_save_CXX"
5530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5531 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5532 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5533 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5537 # This was included in -Wall/-Wformat in older GCC versions
5539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5540 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5541 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5542 $as_echo_n "(cached) " >&6
5544 pgac_save_CFLAGS=$CFLAGS
5547 CFLAGS="${CFLAGS} -Wformat-security"
5548 ac_save_c_werror_flag=$ac_c_werror_flag
5549 ac_c_werror_flag=yes
5550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5551 /* end confdefs.h. */
5561 if ac_fn_c_try_compile "$LINENO"; then :
5562 pgac_cv_prog_CC_cflags__Wformat_security=yes
5564 pgac_cv_prog_CC_cflags__Wformat_security=no
5566 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5567 ac_c_werror_flag=$ac_save_c_werror_flag
5568 CFLAGS="$pgac_save_CFLAGS"
5571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5572 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5573 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5574 CFLAGS="${CFLAGS} -Wformat-security"
5578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5579 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5580 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5581 $as_echo_n "(cached) " >&6
5583 pgac_save_CXXFLAGS=$CXXFLAGS
5586 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5587 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5588 ac_cxx_werror_flag=yes
5590 ac_cpp='$CXXCPP $CPPFLAGS'
5591 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5592 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5593 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5596 /* end confdefs.h. */
5606 if ac_fn_cxx_try_compile "$LINENO"; then :
5607 pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
5609 pgac_cv_prog_CXX_cxxflags__Wformat_security=no
5611 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5613 ac_cpp='$CPP $CPPFLAGS'
5614 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5615 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5616 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5618 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5619 CXXFLAGS="$pgac_save_CXXFLAGS"
5620 CXX="$pgac_save_CXX"
5622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
5623 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
5624 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
5625 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5629 # Disable strict-aliasing rules; needed for gcc 3.3+
5631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
5632 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
5633 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
5634 $as_echo_n "(cached) " >&6
5636 pgac_save_CFLAGS=$CFLAGS
5639 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5640 ac_save_c_werror_flag=$ac_c_werror_flag
5641 ac_c_werror_flag=yes
5642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5643 /* end confdefs.h. */
5653 if ac_fn_c_try_compile "$LINENO"; then :
5654 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
5656 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
5658 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5659 ac_c_werror_flag=$ac_save_c_werror_flag
5660 CFLAGS="$pgac_save_CFLAGS"
5663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
5664 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
5665 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
5666 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
5671 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
5672 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
5673 $as_echo_n "(cached) " >&6
5675 pgac_save_CXXFLAGS=$CXXFLAGS
5678 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5679 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5680 ac_cxx_werror_flag=yes
5682 ac_cpp='$CXXCPP $CPPFLAGS'
5683 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5684 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5685 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5688 /* end confdefs.h. */
5698 if ac_fn_cxx_try_compile "$LINENO"; then :
5699 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
5701 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
5703 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5705 ac_cpp='$CPP $CPPFLAGS'
5706 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5707 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5708 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5710 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5711 CXXFLAGS="$pgac_save_CXXFLAGS"
5712 CXX="$pgac_save_CXX"
5714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
5715 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
5716 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
5717 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5721 # Disable optimizations that assume no overflow; needed for gcc 4.3+
5723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
5724 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
5725 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
5726 $as_echo_n "(cached) " >&6
5728 pgac_save_CFLAGS=$CFLAGS
5731 CFLAGS="${CFLAGS} -fwrapv"
5732 ac_save_c_werror_flag=$ac_c_werror_flag
5733 ac_c_werror_flag=yes
5734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5735 /* end confdefs.h. */
5745 if ac_fn_c_try_compile "$LINENO"; then :
5746 pgac_cv_prog_CC_cflags__fwrapv=yes
5748 pgac_cv_prog_CC_cflags__fwrapv=no
5750 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5751 ac_c_werror_flag=$ac_save_c_werror_flag
5752 CFLAGS="$pgac_save_CFLAGS"
5755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
5756 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
5757 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
5758 CFLAGS="${CFLAGS} -fwrapv"
5762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
5763 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
5764 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
5765 $as_echo_n "(cached) " >&6
5767 pgac_save_CXXFLAGS=$CXXFLAGS
5770 CXXFLAGS="${CXXFLAGS} -fwrapv"
5771 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5772 ac_cxx_werror_flag=yes
5774 ac_cpp='$CXXCPP $CPPFLAGS'
5775 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5776 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5777 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5780 /* end confdefs.h. */
5790 if ac_fn_cxx_try_compile "$LINENO"; then :
5791 pgac_cv_prog_CXX_cxxflags__fwrapv=yes
5793 pgac_cv_prog_CXX_cxxflags__fwrapv=no
5795 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5797 ac_cpp='$CPP $CPPFLAGS'
5798 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5799 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5800 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5802 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5803 CXXFLAGS="$pgac_save_CXXFLAGS"
5804 CXX="$pgac_save_CXX"
5806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
5807 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
5808 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
5809 CXXFLAGS="${CXXFLAGS} -fwrapv"
5813 # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
5815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
5816 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
5817 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
5818 $as_echo_n "(cached) " >&6
5820 pgac_save_CFLAGS=$CFLAGS
5823 CFLAGS="${CFLAGS} -fexcess-precision=standard"
5824 ac_save_c_werror_flag=$ac_c_werror_flag
5825 ac_c_werror_flag=yes
5826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5827 /* end confdefs.h. */
5837 if ac_fn_c_try_compile "$LINENO"; then :
5838 pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
5840 pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
5842 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5843 ac_c_werror_flag=$ac_save_c_werror_flag
5844 CFLAGS="$pgac_save_CFLAGS"
5847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
5848 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
5849 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
5850 CFLAGS="${CFLAGS} -fexcess-precision=standard"
5854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
5855 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
5856 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
5857 $as_echo_n "(cached) " >&6
5859 pgac_save_CXXFLAGS=$CXXFLAGS
5862 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5863 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5864 ac_cxx_werror_flag=yes
5866 ac_cpp='$CXXCPP $CPPFLAGS'
5867 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5868 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5869 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5872 /* end confdefs.h. */
5882 if ac_fn_cxx_try_compile "$LINENO"; then :
5883 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
5885 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
5887 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5889 ac_cpp='$CPP $CPPFLAGS'
5890 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5891 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5892 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5894 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5895 CXXFLAGS="$pgac_save_CXXFLAGS"
5896 CXX="$pgac_save_CXX"
5898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
5899 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
5900 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
5901 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5905 # Optimization flags for specific files that benefit from vectorization
5906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR" >&5
5907 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR... " >&6; }
5908 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
5909 $as_echo_n "(cached) " >&6
5911 pgac_save_CFLAGS=$CFLAGS
5914 CFLAGS="${CFLAGS_VECTOR} -funroll-loops"
5915 ac_save_c_werror_flag=$ac_c_werror_flag
5916 ac_c_werror_flag=yes
5917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5918 /* end confdefs.h. */
5928 if ac_fn_c_try_compile "$LINENO"; then :
5929 pgac_cv_prog_CC_cflags__funroll_loops=yes
5931 pgac_cv_prog_CC_cflags__funroll_loops=no
5933 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5934 ac_c_werror_flag=$ac_save_c_werror_flag
5935 CFLAGS="$pgac_save_CFLAGS"
5938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
5939 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
5940 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
5941 CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
5945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR" >&5
5946 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR... " >&6; }
5947 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
5948 $as_echo_n "(cached) " >&6
5950 pgac_save_CFLAGS=$CFLAGS
5953 CFLAGS="${CFLAGS_VECTOR} -ftree-vectorize"
5954 ac_save_c_werror_flag=$ac_c_werror_flag
5955 ac_c_werror_flag=yes
5956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5957 /* end confdefs.h. */
5967 if ac_fn_c_try_compile "$LINENO"; then :
5968 pgac_cv_prog_CC_cflags__ftree_vectorize=yes
5970 pgac_cv_prog_CC_cflags__ftree_vectorize=no
5972 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5973 ac_c_werror_flag=$ac_save_c_werror_flag
5974 CFLAGS="$pgac_save_CFLAGS"
5977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
5978 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
5979 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
5980 CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
5984 # We want to suppress clang's unhelpful unused-command-line-argument warnings
5985 # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
5986 # test for the positive form and if that works, add the negative form
5988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
5989 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
5990 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
5991 $as_echo_n "(cached) " >&6
5993 pgac_save_CFLAGS=$CFLAGS
5996 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
5997 ac_save_c_werror_flag=$ac_c_werror_flag
5998 ac_c_werror_flag=yes
5999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6000 /* end confdefs.h. */
6010 if ac_fn_c_try_compile "$LINENO"; then :
6011 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6013 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6015 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6016 ac_c_werror_flag=$ac_save_c_werror_flag
6017 CFLAGS="$pgac_save_CFLAGS"
6020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6021 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6022 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6023 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6027 if test -n "$NOT_THE_CFLAGS"; then
6028 CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6030 # Similarly disable useless truncation warnings from gcc 8+
6032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6033 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6034 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6035 $as_echo_n "(cached) " >&6
6037 pgac_save_CFLAGS=$CFLAGS
6040 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6041 ac_save_c_werror_flag=$ac_c_werror_flag
6042 ac_c_werror_flag=yes
6043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6044 /* end confdefs.h. */
6054 if ac_fn_c_try_compile "$LINENO"; then :
6055 pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6057 pgac_cv_prog_CC_cflags__Wformat_truncation=no
6059 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6060 ac_c_werror_flag=$ac_save_c_werror_flag
6061 CFLAGS="$pgac_save_CFLAGS"
6064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6065 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6066 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6067 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6071 if test -n "$NOT_THE_CFLAGS"; then
6072 CFLAGS="$CFLAGS -Wno-format-truncation"
6075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6076 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6077 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6078 $as_echo_n "(cached) " >&6
6080 pgac_save_CFLAGS=$CFLAGS
6083 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6084 ac_save_c_werror_flag=$ac_c_werror_flag
6085 ac_c_werror_flag=yes
6086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6087 /* end confdefs.h. */
6097 if ac_fn_c_try_compile "$LINENO"; then :
6098 pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6100 pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6102 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6103 ac_c_werror_flag=$ac_save_c_werror_flag
6104 CFLAGS="$pgac_save_CFLAGS"
6107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6108 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6109 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6110 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6114 if test -n "$NOT_THE_CFLAGS"; then
6115 CFLAGS="$CFLAGS -Wno-stringop-truncation"
6117 elif test "$ICC" = yes; then
6118 # Intel's compiler has a bug/misoptimization in checking for
6119 # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6122 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6123 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6124 $as_echo_n "(cached) " >&6
6126 pgac_save_CFLAGS=$CFLAGS
6129 CFLAGS="${CFLAGS} -mp1"
6130 ac_save_c_werror_flag=$ac_c_werror_flag
6131 ac_c_werror_flag=yes
6132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6133 /* end confdefs.h. */
6143 if ac_fn_c_try_compile "$LINENO"; then :
6144 pgac_cv_prog_CC_cflags__mp1=yes
6146 pgac_cv_prog_CC_cflags__mp1=no
6148 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6149 ac_c_werror_flag=$ac_save_c_werror_flag
6150 CFLAGS="$pgac_save_CFLAGS"
6153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6154 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6155 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6156 CFLAGS="${CFLAGS} -mp1"
6160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6161 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6162 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6163 $as_echo_n "(cached) " >&6
6165 pgac_save_CXXFLAGS=$CXXFLAGS
6168 CXXFLAGS="${CXXFLAGS} -mp1"
6169 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6170 ac_cxx_werror_flag=yes
6172 ac_cpp='$CXXCPP $CPPFLAGS'
6173 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6174 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6175 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6178 /* end confdefs.h. */
6188 if ac_fn_cxx_try_compile "$LINENO"; then :
6189 pgac_cv_prog_CXX_cxxflags__mp1=yes
6191 pgac_cv_prog_CXX_cxxflags__mp1=no
6193 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6195 ac_cpp='$CPP $CPPFLAGS'
6196 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6197 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6198 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6200 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6201 CXXFLAGS="$pgac_save_CXXFLAGS"
6202 CXX="$pgac_save_CXX"
6204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6205 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6206 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6207 CXXFLAGS="${CXXFLAGS} -mp1"
6211 # Make sure strict aliasing is off (though this is said to be the default)
6213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6214 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6215 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6216 $as_echo_n "(cached) " >&6
6218 pgac_save_CFLAGS=$CFLAGS
6221 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6222 ac_save_c_werror_flag=$ac_c_werror_flag
6223 ac_c_werror_flag=yes
6224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6225 /* end confdefs.h. */
6235 if ac_fn_c_try_compile "$LINENO"; then :
6236 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6238 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6240 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6241 ac_c_werror_flag=$ac_save_c_werror_flag
6242 CFLAGS="$pgac_save_CFLAGS"
6245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6246 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6247 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6248 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6253 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6254 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6255 $as_echo_n "(cached) " >&6
6257 pgac_save_CXXFLAGS=$CXXFLAGS
6260 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6261 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6262 ac_cxx_werror_flag=yes
6264 ac_cpp='$CXXCPP $CPPFLAGS'
6265 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6266 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6267 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6270 /* end confdefs.h. */
6280 if ac_fn_cxx_try_compile "$LINENO"; then :
6281 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6283 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6285 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6287 ac_cpp='$CPP $CPPFLAGS'
6288 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6289 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6290 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6292 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6293 CXXFLAGS="$pgac_save_CXXFLAGS"
6294 CXX="$pgac_save_CXX"
6296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6297 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6298 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6299 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6303 elif test "$PORTNAME" = "aix"; then
6304 # AIX's xlc has to have strict aliasing turned off too
6306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6307 $as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6308 if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6309 $as_echo_n "(cached) " >&6
6311 pgac_save_CFLAGS=$CFLAGS
6314 CFLAGS="${CFLAGS} -qnoansialias"
6315 ac_save_c_werror_flag=$ac_c_werror_flag
6316 ac_c_werror_flag=yes
6317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6318 /* end confdefs.h. */
6328 if ac_fn_c_try_compile "$LINENO"; then :
6329 pgac_cv_prog_CC_cflags__qnoansialias=yes
6331 pgac_cv_prog_CC_cflags__qnoansialias=no
6333 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6334 ac_c_werror_flag=$ac_save_c_werror_flag
6335 CFLAGS="$pgac_save_CFLAGS"
6338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6339 $as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6340 if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6341 CFLAGS="${CFLAGS} -qnoansialias"
6345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6346 $as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6347 if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6348 $as_echo_n "(cached) " >&6
6350 pgac_save_CXXFLAGS=$CXXFLAGS
6353 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6354 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6355 ac_cxx_werror_flag=yes
6357 ac_cpp='$CXXCPP $CPPFLAGS'
6358 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6359 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6360 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6363 /* end confdefs.h. */
6373 if ac_fn_cxx_try_compile "$LINENO"; then :
6374 pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6376 pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6378 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6380 ac_cpp='$CPP $CPPFLAGS'
6381 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6382 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6383 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6385 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6386 CXXFLAGS="$pgac_save_CXXFLAGS"
6387 CXX="$pgac_save_CXX"
6389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6390 $as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6391 if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6392 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6398 $as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6399 if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6400 $as_echo_n "(cached) " >&6
6402 pgac_save_CFLAGS=$CFLAGS
6405 CFLAGS="${CFLAGS} -qlonglong"
6406 ac_save_c_werror_flag=$ac_c_werror_flag
6407 ac_c_werror_flag=yes
6408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6409 /* end confdefs.h. */
6419 if ac_fn_c_try_compile "$LINENO"; then :
6420 pgac_cv_prog_CC_cflags__qlonglong=yes
6422 pgac_cv_prog_CC_cflags__qlonglong=no
6424 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6425 ac_c_werror_flag=$ac_save_c_werror_flag
6426 CFLAGS="$pgac_save_CFLAGS"
6429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6430 $as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6431 if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6432 CFLAGS="${CFLAGS} -qlonglong"
6436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6437 $as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6438 if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6439 $as_echo_n "(cached) " >&6
6441 pgac_save_CXXFLAGS=$CXXFLAGS
6444 CXXFLAGS="${CXXFLAGS} -qlonglong"
6445 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6446 ac_cxx_werror_flag=yes
6448 ac_cpp='$CXXCPP $CPPFLAGS'
6449 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6450 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6451 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6454 /* end confdefs.h. */
6464 if ac_fn_cxx_try_compile "$LINENO"; then :
6465 pgac_cv_prog_CXX_cxxflags__qlonglong=yes
6467 pgac_cv_prog_CXX_cxxflags__qlonglong=no
6469 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6471 ac_cpp='$CPP $CPPFLAGS'
6472 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6473 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6474 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6476 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6477 CXXFLAGS="$pgac_save_CXXFLAGS"
6478 CXX="$pgac_save_CXX"
6480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
6481 $as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
6482 if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
6483 CXXFLAGS="${CXXFLAGS} -qlonglong"
6487 elif test "$PORTNAME" = "hpux"; then
6488 # On some versions of HP-UX, libm functions do not set errno by default.
6489 # Fix that by using +Olibmerrno if the compiler recognizes it.
6491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports +Olibmerrno, for CFLAGS" >&5
6492 $as_echo_n "checking whether ${CC} supports +Olibmerrno, for CFLAGS... " >&6; }
6493 if ${pgac_cv_prog_CC_cflags_pOlibmerrno+:} false; then :
6494 $as_echo_n "(cached) " >&6
6496 pgac_save_CFLAGS=$CFLAGS
6499 CFLAGS="${CFLAGS} +Olibmerrno"
6500 ac_save_c_werror_flag=$ac_c_werror_flag
6501 ac_c_werror_flag=yes
6502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6503 /* end confdefs.h. */
6513 if ac_fn_c_try_compile "$LINENO"; then :
6514 pgac_cv_prog_CC_cflags_pOlibmerrno=yes
6516 pgac_cv_prog_CC_cflags_pOlibmerrno=no
6518 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6519 ac_c_werror_flag=$ac_save_c_werror_flag
6520 CFLAGS="$pgac_save_CFLAGS"
6523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags_pOlibmerrno" >&5
6524 $as_echo "$pgac_cv_prog_CC_cflags_pOlibmerrno" >&6; }
6525 if test x"$pgac_cv_prog_CC_cflags_pOlibmerrno" = x"yes"; then
6526 CFLAGS="${CFLAGS} +Olibmerrno"
6530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS" >&5
6531 $as_echo_n "checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS... " >&6; }
6532 if ${pgac_cv_prog_CXX_cxxflags_pOlibmerrno+:} false; then :
6533 $as_echo_n "(cached) " >&6
6535 pgac_save_CXXFLAGS=$CXXFLAGS
6538 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6539 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6540 ac_cxx_werror_flag=yes
6542 ac_cpp='$CXXCPP $CPPFLAGS'
6543 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6544 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6545 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6548 /* end confdefs.h. */
6558 if ac_fn_cxx_try_compile "$LINENO"; then :
6559 pgac_cv_prog_CXX_cxxflags_pOlibmerrno=yes
6561 pgac_cv_prog_CXX_cxxflags_pOlibmerrno=no
6563 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6565 ac_cpp='$CPP $CPPFLAGS'
6566 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6567 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6568 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6570 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6571 CXXFLAGS="$pgac_save_CXXFLAGS"
6572 CXX="$pgac_save_CXX"
6574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&5
6575 $as_echo "$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&6; }
6576 if test x"$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" = x"yes"; then
6577 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6583 CFLAGS_VECTOR=$CFLAGS_VECTOR
6586 # Determine flags used to emit bitcode for JIT inlining. Need to test
6587 # for behaviour changing compiler flags, to keep compatibility with
6588 # compiler used for normal postgres code.
6589 if test "$with_llvm" = yes ; then
6590 CLANGXX="$CLANG -xc++"
6592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
6593 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
6594 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
6595 $as_echo_n "(cached) " >&6
6597 pgac_save_CFLAGS=$CFLAGS
6600 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6601 ac_save_c_werror_flag=$ac_c_werror_flag
6602 ac_c_werror_flag=yes
6603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6604 /* end confdefs.h. */
6614 if ac_fn_c_try_compile "$LINENO"; then :
6615 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
6617 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
6619 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6620 ac_c_werror_flag=$ac_save_c_werror_flag
6621 CFLAGS="$pgac_save_CFLAGS"
6624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
6625 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
6626 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
6627 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
6631 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
6632 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
6633 $as_echo_n "(cached) " >&6
6635 pgac_save_CXXFLAGS=$CXXFLAGS
6638 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6639 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6640 ac_cxx_werror_flag=yes
6642 ac_cpp='$CXXCPP $CPPFLAGS'
6643 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6644 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6645 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6648 /* end confdefs.h. */
6658 if ac_fn_cxx_try_compile "$LINENO"; then :
6659 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
6661 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
6663 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6665 ac_cpp='$CPP $CPPFLAGS'
6666 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6667 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6668 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6670 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6671 CXXFLAGS="$pgac_save_CXXFLAGS"
6672 CXX="$pgac_save_CXX"
6674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
6675 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
6676 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6677 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
6681 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
6682 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
6683 $as_echo_n "(cached) " >&6
6685 pgac_save_CFLAGS=$CFLAGS
6688 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6689 ac_save_c_werror_flag=$ac_c_werror_flag
6690 ac_c_werror_flag=yes
6691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6692 /* end confdefs.h. */
6702 if ac_fn_c_try_compile "$LINENO"; then :
6703 pgac_cv_prog_CLANG_cflags__fwrapv=yes
6705 pgac_cv_prog_CLANG_cflags__fwrapv=no
6707 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6708 ac_c_werror_flag=$ac_save_c_werror_flag
6709 CFLAGS="$pgac_save_CFLAGS"
6712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
6713 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
6714 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
6715 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
6719 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
6720 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
6721 $as_echo_n "(cached) " >&6
6723 pgac_save_CXXFLAGS=$CXXFLAGS
6726 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6727 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6728 ac_cxx_werror_flag=yes
6730 ac_cpp='$CXXCPP $CPPFLAGS'
6731 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6732 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6733 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6736 /* end confdefs.h. */
6746 if ac_fn_cxx_try_compile "$LINENO"; then :
6747 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
6749 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
6751 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6753 ac_cpp='$CPP $CPPFLAGS'
6754 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6755 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6756 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6758 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6759 CXXFLAGS="$pgac_save_CXXFLAGS"
6760 CXX="$pgac_save_CXX"
6762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
6763 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
6764 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
6765 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
6769 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
6770 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
6771 $as_echo_n "(cached) " >&6
6773 pgac_save_CFLAGS=$CFLAGS
6776 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6777 ac_save_c_werror_flag=$ac_c_werror_flag
6778 ac_c_werror_flag=yes
6779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6780 /* end confdefs.h. */
6790 if ac_fn_c_try_compile "$LINENO"; then :
6791 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
6793 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
6795 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6796 ac_c_werror_flag=$ac_save_c_werror_flag
6797 CFLAGS="$pgac_save_CFLAGS"
6800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
6801 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
6802 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
6803 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
6807 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
6808 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
6809 $as_echo_n "(cached) " >&6
6811 pgac_save_CXXFLAGS=$CXXFLAGS
6814 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6815 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6816 ac_cxx_werror_flag=yes
6818 ac_cpp='$CXXCPP $CPPFLAGS'
6819 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6820 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6821 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6824 /* end confdefs.h. */
6834 if ac_fn_cxx_try_compile "$LINENO"; then :
6835 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
6837 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
6839 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6841 ac_cpp='$CPP $CPPFLAGS'
6842 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6843 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6844 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6846 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6847 CXXFLAGS="$pgac_save_CXXFLAGS"
6848 CXX="$pgac_save_CXX"
6850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
6851 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
6852 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6853 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6858 # supply -g if --enable-debug
6859 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
6863 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
6864 CXXFLAGS="$CXXFLAGS -g"
6867 # enable code coverage if --enable-coverage
6868 if test "$enable_coverage" = yes; then
6869 if test "$GCC" = yes; then
6870 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
6871 CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
6873 as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
6877 # enable profiling if --enable-profiling
6878 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
6879 if test "$GCC" = yes; then
6881 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
6883 CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6884 CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6886 as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
6890 # We already have this in Makefile.win32, but configure needs it too
6891 if test "$PORTNAME" = "win32"; then
6892 CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
6895 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
6896 # user-specified flags (if any) at the end. This lets users override
6897 # the automatic additions.
6898 CFLAGS="$CFLAGS $user_CFLAGS"
6899 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
6900 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
6901 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
6903 BITCODE_CFLAGS=$BITCODE_CFLAGS
6905 BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
6908 # Check if the compiler still works with the final flag settings
6909 # (note, we're not checking that for CXX, which is optional)
6910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
6911 $as_echo_n "checking whether the C compiler still works... " >&6; }
6912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6913 /* end confdefs.h. */
6923 if ac_fn_c_try_link "$LINENO"; then :
6924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6925 $as_echo "yes" >&6; }
6927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6928 $as_echo "no" >&6; }
6929 as_fn_error $? "cannot proceed" "$LINENO" 5
6931 rm -f core conftest.err conftest.$ac_objext \
6932 conftest$ac_exeext conftest.$ac_ext
6934 # Defend against gcc -ffast-math
6935 if test "$GCC" = yes; then
6936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6937 /* end confdefs.h. */
6942 #ifdef __FAST_MATH__
6949 if ac_fn_c_try_compile "$LINENO"; then :
6952 as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
6954 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6957 # Defend against clang being used on x86-32 without SSE2 enabled. As current
6958 # versions of clang do not understand -fexcess-precision=standard, the use of
6959 # x87 floating point operations leads to problems like isinf possibly returning
6960 # false for a value that is infinite when converted from the 80bit register to
6961 # the 8byte memory representation.
6963 # Only perform the test if the compiler doesn't understand
6964 # -fexcess-precision=standard, that way a potentially fixed compiler will work
6966 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
6967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6968 /* end confdefs.h. */
6974 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
6982 if ac_fn_c_try_compile "$LINENO"; then :
6985 as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
6987 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6991 ac_cpp='$CPP $CPPFLAGS'
6992 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6993 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6994 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6996 $as_echo_n "checking how to run the C preprocessor... " >&6; }
6997 # On Suns, sometimes $CPP names a directory.
6998 if test -n "$CPP" && test -d "$CPP"; then
7001 if test -z "$CPP"; then
7002 if ${ac_cv_prog_CPP+:} false; then :
7003 $as_echo_n "(cached) " >&6
7005 # Double quotes because CPP needs to be expanded
7006 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7009 for ac_c_preproc_warn_flag in '' yes
7011 # Use a header file that comes with gcc, so configuring glibc
7012 # with a fresh cross-compiler works.
7013 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7014 # <limits.h> exists even on freestanding compilers.
7015 # On the NeXT, cc -E runs the code through the compiler's parser,
7016 # not just through cpp. "Syntax error" is here to catch this case.
7017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7018 /* end confdefs.h. */
7020 # include <limits.h>
7022 # include <assert.h>
7026 if ac_fn_c_try_cpp "$LINENO"; then :
7029 # Broken: fails on valid input.
7032 rm -f conftest.err conftest.i conftest.$ac_ext
7034 # OK, works on sane cases. Now check whether nonexistent headers
7035 # can be detected and how.
7036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7037 /* end confdefs.h. */
7038 #include <ac_nonexistent.h>
7040 if ac_fn_c_try_cpp "$LINENO"; then :
7041 # Broken: success on invalid input.
7044 # Passes both tests.
7048 rm -f conftest.err conftest.i conftest.$ac_ext
7051 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7052 rm -f conftest.i conftest.err conftest.$ac_ext
7053 if $ac_preproc_ok; then :
7065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7066 $as_echo "$CPP" >&6; }
7068 for ac_c_preproc_warn_flag in '' yes
7070 # Use a header file that comes with gcc, so configuring glibc
7071 # with a fresh cross-compiler works.
7072 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7073 # <limits.h> exists even on freestanding compilers.
7074 # On the NeXT, cc -E runs the code through the compiler's parser,
7075 # not just through cpp. "Syntax error" is here to catch this case.
7076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7077 /* end confdefs.h. */
7079 # include <limits.h>
7081 # include <assert.h>
7085 if ac_fn_c_try_cpp "$LINENO"; then :
7088 # Broken: fails on valid input.
7091 rm -f conftest.err conftest.i conftest.$ac_ext
7093 # OK, works on sane cases. Now check whether nonexistent headers
7094 # can be detected and how.
7095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7096 /* end confdefs.h. */
7097 #include <ac_nonexistent.h>
7099 if ac_fn_c_try_cpp "$LINENO"; then :
7100 # Broken: success on invalid input.
7103 # Passes both tests.
7107 rm -f conftest.err conftest.i conftest.$ac_ext
7110 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7111 rm -f conftest.i conftest.err conftest.$ac_ext
7112 if $ac_preproc_ok; then :
7115 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7116 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7117 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7118 See \`config.log' for more details" "$LINENO" 5; }
7122 ac_cpp='$CPP $CPPFLAGS'
7123 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7124 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7125 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7131 # Set up TAS assembly code if needed; the template file has now had its
7132 # chance to request this.
7134 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
7137 if test "$need_tas" = yes ; then
7146 # Automatic dependency tracking
7150 # Check whether --enable-depend was given.
7151 if test "${enable_depend+set}" = set; then :
7152 enableval=$enable_depend;
7161 as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
7175 # Enable assert checks
7179 # Check whether --enable-cassert was given.
7180 if test "${enable_cassert+set}" = set; then :
7181 enableval=$enable_cassert;
7185 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
7192 as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
7205 # Include directories
7208 IFS="${IFS}${PATH_SEPARATOR}"
7209 # SRCH_INC comes from the template file
7210 for dir in $with_includes $SRCH_INC; do
7211 if test -d "$dir"; then
7212 INCLUDES="$INCLUDES -I$dir"
7214 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
7215 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
7223 # Library directories
7226 IFS="${IFS}${PATH_SEPARATOR}"
7227 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
7228 for dir in $LIBRARY_DIRS $SRCH_LIB; do
7229 if test -d "$dir"; then
7230 LIBDIRS="$LIBDIRS -L$dir"
7232 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
7233 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
7239 # Enable thread-safe client libraries
7241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
7242 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
7245 # Check whether --enable-thread-safety was given.
7246 if test "${enable_thread_safety+set}" = set; then :
7247 enableval=$enable_thread_safety;
7256 as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
7261 enable_thread_safety=yes
7266 if test "$enable_thread_safety" = yes; then
7268 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
7271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
7272 $as_echo "$enable_thread_safety" >&6; }
7278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
7279 $as_echo_n "checking whether to build with ICU support... " >&6; }
7283 # Check whether --with-icu was given.
7284 if test "${with_icu+set}" = set; then :
7289 $as_echo "#define USE_ICU 1" >>confdefs.h
7296 as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
7306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
7307 $as_echo "$with_icu" >&6; }
7310 if test "$with_icu" = yes; then
7318 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7319 if test -n "$ac_tool_prefix"; then
7320 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7321 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7323 $as_echo_n "checking for $ac_word... " >&6; }
7324 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7325 $as_echo_n "(cached) " >&6
7329 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7332 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7336 test -z "$as_dir" && as_dir=.
7337 for ac_exec_ext in '' $ac_executable_extensions; do
7338 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7339 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7340 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7350 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7351 if test -n "$PKG_CONFIG"; then
7352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7353 $as_echo "$PKG_CONFIG" >&6; }
7355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7356 $as_echo "no" >&6; }
7361 if test -z "$ac_cv_path_PKG_CONFIG"; then
7362 ac_pt_PKG_CONFIG=$PKG_CONFIG
7363 # Extract the first word of "pkg-config", so it can be a program name with args.
7364 set dummy pkg-config; ac_word=$2
7365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7366 $as_echo_n "checking for $ac_word... " >&6; }
7367 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7368 $as_echo_n "(cached) " >&6
7370 case $ac_pt_PKG_CONFIG in
7372 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7375 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7379 test -z "$as_dir" && as_dir=.
7380 for ac_exec_ext in '' $ac_executable_extensions; do
7381 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7382 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7383 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7393 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7394 if test -n "$ac_pt_PKG_CONFIG"; then
7395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7396 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7399 $as_echo "no" >&6; }
7402 if test "x$ac_pt_PKG_CONFIG" = x; then
7405 case $cross_compiling:$ac_tool_warned in
7407 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7408 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7409 ac_tool_warned=yes ;;
7411 PKG_CONFIG=$ac_pt_PKG_CONFIG
7414 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7418 if test -n "$PKG_CONFIG"; then
7419 _pkg_min_version=0.9.0
7420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7421 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7422 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7424 $as_echo "yes" >&6; }
7426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7427 $as_echo "no" >&6; }
7433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
7434 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
7436 if test -n "$ICU_CFLAGS"; then
7437 pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
7438 elif test -n "$PKG_CONFIG"; then
7439 if test -n "$PKG_CONFIG" && \
7440 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7441 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7443 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7444 test $ac_status = 0; }; then
7445 pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
7446 test "x$?" != "x0" && pkg_failed=yes
7453 if test -n "$ICU_LIBS"; then
7454 pkg_cv_ICU_LIBS="$ICU_LIBS"
7455 elif test -n "$PKG_CONFIG"; then
7456 if test -n "$PKG_CONFIG" && \
7457 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7458 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7460 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7461 test $ac_status = 0; }; then
7462 pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
7463 test "x$?" != "x0" && pkg_failed=yes
7473 if test $pkg_failed = yes; then
7474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7475 $as_echo "no" >&6; }
7477 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7478 _pkg_short_errors_supported=yes
7480 _pkg_short_errors_supported=no
7482 if test $_pkg_short_errors_supported = yes; then
7483 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7485 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7487 # Put the nasty error message in config.log where it belongs
7488 echo "$ICU_PKG_ERRORS" >&5
7490 as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
7494 Consider adjusting the PKG_CONFIG_PATH environment variable if you
7495 installed software in a non-standard prefix.
7497 Alternatively, you may set the environment variables ICU_CFLAGS
7498 and ICU_LIBS to avoid the need to call pkg-config.
7499 See the pkg-config man page for more details." "$LINENO" 5
7500 elif test $pkg_failed = untried; then
7501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7502 $as_echo "no" >&6; }
7503 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7504 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7505 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
7506 is in your PATH or set the PKG_CONFIG environment variable to the full
7509 Alternatively, you may set the environment variables ICU_CFLAGS
7510 and ICU_LIBS to avoid the need to call pkg-config.
7511 See the pkg-config man page for more details.
7513 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
7514 See \`config.log' for more details" "$LINENO" 5; }
7516 ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
7517 ICU_LIBS=$pkg_cv_ICU_LIBS
7518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7519 $as_echo "yes" >&6; }
7525 # Optionally build Tcl modules (PL/Tcl)
7527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
7528 $as_echo_n "checking whether to build with Tcl... " >&6; }
7532 # Check whether --with-tcl was given.
7533 if test "${with_tcl+set}" = set; then :
7543 as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
7553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
7554 $as_echo "$with_tcl" >&6; }
7557 # We see if the path to the Tcl/Tk configuration scripts is specified.
7558 # This will override the use of tclsh to find the paths to search.
7563 # Check whether --with-tclconfig was given.
7564 if test "${with_tclconfig+set}" = set; then :
7565 withval=$with_tclconfig;
7568 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7571 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7583 # Optionally build Perl modules (PL/Perl)
7585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
7586 $as_echo_n "checking whether to build Perl modules... " >&6; }
7590 # Check whether --with-perl was given.
7591 if test "${with_perl+set}" = set; then :
7601 as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
7611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
7612 $as_echo "$with_perl" >&6; }
7616 # Optionally build Python modules (PL/Python)
7618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
7619 $as_echo_n "checking whether to build Python modules... " >&6; }
7623 # Check whether --with-python was given.
7624 if test "${with_python+set}" = set; then :
7625 withval=$with_python;
7634 as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
7644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
7645 $as_echo "$with_python" >&6; }
7651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
7652 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
7656 # Check whether --with-gssapi was given.
7657 if test "${with_gssapi+set}" = set; then :
7658 withval=$with_gssapi;
7663 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
7665 krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
7672 as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
7682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
7683 $as_echo "$with_gssapi" >&6; }
7691 # Kerberos configuration parameters
7696 # Check whether --with-krb-srvnam was given.
7697 if test "${with_krb_srvnam+set}" = set; then :
7698 withval=$with_krb_srvnam;
7701 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7704 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7712 with_krb_srvnam="postgres"
7718 cat >>confdefs.h <<_ACEOF
7719 #define PG_KRB_SRVNAM "$with_krb_srvnam"
7727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
7728 $as_echo_n "checking whether to build with PAM support... " >&6; }
7732 # Check whether --with-pam was given.
7733 if test "${with_pam+set}" = set; then :
7738 $as_echo "#define USE_PAM 1" >>confdefs.h
7745 as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
7755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
7756 $as_echo "$with_pam" >&6; }
7762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
7763 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
7767 # Check whether --with-bsd-auth was given.
7768 if test "${with_bsd_auth+set}" = set; then :
7769 withval=$with_bsd_auth;
7773 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
7780 as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
7790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
7791 $as_echo "$with_bsd_auth" >&6; }
7797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
7798 $as_echo_n "checking whether to build with LDAP support... " >&6; }
7802 # Check whether --with-ldap was given.
7803 if test "${with_ldap+set}" = set; then :
7808 $as_echo "#define USE_LDAP 1" >>confdefs.h
7815 as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
7825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
7826 $as_echo "$with_ldap" >&6; }
7833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
7834 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
7838 # Check whether --with-bonjour was given.
7839 if test "${with_bonjour+set}" = set; then :
7840 withval=$with_bonjour;
7844 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
7851 as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
7861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
7862 $as_echo "$with_bonjour" >&6; }
7868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
7869 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
7873 # Check whether --with-openssl was given.
7874 if test "${with_openssl+set}" = set; then :
7875 withval=$with_openssl;
7879 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
7886 as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
7896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
7897 $as_echo "$with_openssl" >&6; }
7903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
7904 $as_echo_n "checking whether to build with SELinux support... " >&6; }
7908 # Check whether --with-selinux was given.
7909 if test "${with_selinux+set}" = set; then :
7910 withval=$with_selinux;
7919 as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
7930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
7931 $as_echo "$with_selinux" >&6; }
7936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
7937 $as_echo_n "checking whether to build with systemd support... " >&6; }
7941 # Check whether --with-systemd was given.
7942 if test "${with_systemd+set}" = set; then :
7943 withval=$with_systemd;
7947 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
7954 as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
7965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
7966 $as_echo "$with_systemd" >&6; }
7974 # Check whether --with-readline was given.
7975 if test "${with_readline+set}" = set; then :
7976 withval=$with_readline;
7985 as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
7995 # readline on MinGW has problems with backslashes in psql and other bugs.
7996 # This is particularly a problem with non-US code pages.
7997 # Therefore disable its use until we understand the cause. 2004-07-20
7998 if test "$PORTNAME" = "win32"; then
7999 if test "$with_readline" = yes; then
8000 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8001 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8013 # Check whether --with-libedit-preferred was given.
8014 if test "${with_libedit_preferred+set}" = set; then :
8015 withval=$with_libedit_preferred;
8024 as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8029 with_libedit_preferred=no
8039 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8040 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8041 # UUID library. More than one of these might be present on a given platform,
8042 # so we make the user say which one she wants.
8047 # Check whether --with-uuid was given.
8048 if test "${with_uuid+set}" = set; then :
8052 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8055 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8065 if test x"$with_uuid" = x"" ; then
8071 # Check whether --with-ossp-uuid was given.
8072 if test "${with_ossp_uuid+set}" = set; then :
8073 withval=$with_ossp_uuid;
8082 as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8092 if test "$with_ossp_uuid" = yes ; then
8096 if test "$with_uuid" = bsd ; then
8098 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8100 UUID_EXTRA_OBJS="md5.o sha1.o"
8101 elif test "$with_uuid" = e2fs ; then
8103 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
8105 UUID_EXTRA_OBJS="md5.o sha1.o"
8106 elif test "$with_uuid" = ossp ; then
8108 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
8111 elif test "$with_uuid" = no ; then
8114 as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
8126 # Check whether --with-libxml was given.
8127 if test "${with_libxml+set}" = set; then :
8128 withval=$with_libxml;
8132 $as_echo "#define USE_LIBXML 1" >>confdefs.h
8139 as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
8150 if test "$with_libxml" = yes ; then
8151 if test -z "$XML2_CONFIG"; then
8152 for ac_prog in xml2-config
8154 # Extract the first word of "$ac_prog", so it can be a program name with args.
8155 set dummy $ac_prog; ac_word=$2
8156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8157 $as_echo_n "checking for $ac_word... " >&6; }
8158 if ${ac_cv_path_XML2_CONFIG+:} false; then :
8159 $as_echo_n "(cached) " >&6
8161 case $XML2_CONFIG in
8163 ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
8166 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8170 test -z "$as_dir" && as_dir=.
8171 for ac_exec_ext in '' $ac_executable_extensions; do
8172 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8173 ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8174 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8184 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
8185 if test -n "$XML2_CONFIG"; then
8186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8187 $as_echo "$XML2_CONFIG" >&6; }
8189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8190 $as_echo "no" >&6; }
8194 test -n "$XML2_CONFIG" && break
8198 # Report the value of XML2_CONFIG in configure's output in all cases.
8199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
8200 $as_echo_n "checking for XML2_CONFIG... " >&6; }
8201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8202 $as_echo "$XML2_CONFIG" >&6; }
8205 if test -n "$XML2_CONFIG"; then
8206 for pgac_option in `$XML2_CONFIG --cflags`; do
8207 case $pgac_option in
8208 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8211 for pgac_option in `$XML2_CONFIG --libs`; do
8212 case $pgac_option in
8213 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8227 # Check whether --with-libxslt was given.
8228 if test "${with_libxslt+set}" = set; then :
8229 withval=$with_libxslt;
8233 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8240 as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8260 # Check whether --with-system-tzdata was given.
8261 if test "${with_system_tzdata+set}" = set; then :
8262 withval=$with_system_tzdata;
8265 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8268 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8286 # Check whether --with-zlib was given.
8287 if test "${with_zlib+set}" = set; then :
8297 as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
8313 # Assume system is ELF if it predefines __ELF__ as 1,
8314 # otherwise believe host_os based default.
8316 freebsd1*|freebsd2*) elf=no;;
8317 freebsd3*|freebsd4*) elf=yes;;
8321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
8322 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
8323 if ${ac_cv_path_GREP+:} false; then :
8324 $as_echo_n "(cached) " >&6
8326 if test -z "$GREP"; then
8327 ac_path_GREP_found=false
8328 # Loop through the user's path and test for each of PROGNAME-LIST
8329 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8330 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8333 test -z "$as_dir" && as_dir=.
8334 for ac_prog in grep ggrep; do
8335 for ac_exec_ext in '' $ac_executable_extensions; do
8336 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
8337 as_fn_executable_p "$ac_path_GREP" || continue
8338 # Check for GNU ac_path_GREP and select it if it is found.
8339 # Check for GNU $ac_path_GREP
8340 case `"$ac_path_GREP" --version 2>&1` in
8342 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
8345 $as_echo_n 0123456789 >"conftest.in"
8348 cat "conftest.in" "conftest.in" >"conftest.tmp"
8349 mv "conftest.tmp" "conftest.in"
8350 cp "conftest.in" "conftest.nl"
8351 $as_echo 'GREP' >> "conftest.nl"
8352 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8353 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8354 as_fn_arith $ac_count + 1 && ac_count=$as_val
8355 if test $ac_count -gt ${ac_path_GREP_max-0}; then
8356 # Best one so far, save it but keep looking for a better one
8357 ac_cv_path_GREP="$ac_path_GREP"
8358 ac_path_GREP_max=$ac_count
8360 # 10*(2^10) chars as input seems more than enough
8361 test $ac_count -gt 10 && break
8363 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8366 $ac_path_GREP_found && break 3
8371 if test -z "$ac_cv_path_GREP"; then
8372 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8375 ac_cv_path_GREP=$GREP
8379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
8380 $as_echo "$ac_cv_path_GREP" >&6; }
8381 GREP="$ac_cv_path_GREP"
8384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
8385 $as_echo_n "checking for egrep... " >&6; }
8386 if ${ac_cv_path_EGREP+:} false; then :
8387 $as_echo_n "(cached) " >&6
8389 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
8390 then ac_cv_path_EGREP="$GREP -E"
8392 if test -z "$EGREP"; then
8393 ac_path_EGREP_found=false
8394 # Loop through the user's path and test for each of PROGNAME-LIST
8395 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8396 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8399 test -z "$as_dir" && as_dir=.
8400 for ac_prog in egrep; do
8401 for ac_exec_ext in '' $ac_executable_extensions; do
8402 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
8403 as_fn_executable_p "$ac_path_EGREP" || continue
8404 # Check for GNU ac_path_EGREP and select it if it is found.
8405 # Check for GNU $ac_path_EGREP
8406 case `"$ac_path_EGREP" --version 2>&1` in
8408 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
8411 $as_echo_n 0123456789 >"conftest.in"
8414 cat "conftest.in" "conftest.in" >"conftest.tmp"
8415 mv "conftest.tmp" "conftest.in"
8416 cp "conftest.in" "conftest.nl"
8417 $as_echo 'EGREP' >> "conftest.nl"
8418 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8419 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8420 as_fn_arith $ac_count + 1 && ac_count=$as_val
8421 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
8422 # Best one so far, save it but keep looking for a better one
8423 ac_cv_path_EGREP="$ac_path_EGREP"
8424 ac_path_EGREP_max=$ac_count
8426 # 10*(2^10) chars as input seems more than enough
8427 test $ac_count -gt 10 && break
8429 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8432 $ac_path_EGREP_found && break 3
8437 if test -z "$ac_cv_path_EGREP"; then
8438 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8441 ac_cv_path_EGREP=$EGREP
8446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
8447 $as_echo "$ac_cv_path_EGREP" >&6; }
8448 EGREP="$ac_cv_path_EGREP"
8451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8452 /* end confdefs.h. */
8458 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8459 $EGREP "yes" >/dev/null 2>&1; then :
8462 if test "X$elf" = "Xyes" ; then
8476 CPPFLAGS="$CPPFLAGS $INCLUDES"
8477 LDFLAGS="$LDFLAGS $LIBDIRS"
8483 # Check whether --with-gnu-ld was given.
8484 if test "${with_gnu_ld+set}" = set; then :
8485 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8491 if test "$GCC" = yes; then
8492 # Check if gcc -print-prog-name=ld gives a path.
8493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8494 $as_echo_n "checking for ld used by GCC... " >&6; }
8497 # gcc leaves a trailing carriage return which upsets mingw
8498 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8500 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8503 # Accept absolute paths.
8504 [\\/]* | [A-Za-z]:[\\/]*)
8505 re_direlt='/[^/][^/]*/\.\./'
8506 # Canonicalize the path of ld
8507 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8508 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8509 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8511 test -z "$LD" && LD="$ac_prog"
8514 # If it fails, then pretend we aren't using GCC.
8518 # If it is relative, then search for the first ld in PATH.
8522 elif test "$with_gnu_ld" = yes; then
8523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8524 $as_echo_n "checking for GNU ld... " >&6; }
8526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8527 $as_echo_n "checking for non-GNU ld... " >&6; }
8529 if ${ac_cv_path_LD+:} false; then :
8530 $as_echo_n "(cached) " >&6
8532 if test -z "$LD"; then
8533 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8534 for ac_dir in $PATH; do
8535 test -z "$ac_dir" && ac_dir=.
8536 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8537 ac_cv_path_LD="$ac_dir/$ac_prog"
8538 # Check to see if the program is GNU ld. I'd rather use --version,
8539 # but apparently some GNU ld's only accept -v.
8540 # Break only if it was the GNU/non-GNU ld that we prefer.
8541 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8542 test "$with_gnu_ld" != no && break
8544 test "$with_gnu_ld" != yes && break
8550 ac_cv_path_LD="$LD" # Let the user override the test with a path.
8555 if test -n "$LD"; then
8556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8557 $as_echo "$LD" >&6; }
8559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8560 $as_echo "no" >&6; }
8562 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8564 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8565 if ${ac_cv_prog_gnu_ld+:} false; then :
8566 $as_echo_n "(cached) " >&6
8568 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8569 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8570 ac_cv_prog_gnu_ld=yes
8572 ac_cv_prog_gnu_ld=no
8575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
8576 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
8577 with_gnu_ld=$ac_cv_prog_gnu_ld
8582 if test -n "$ac_tool_prefix"; then
8583 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8584 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8586 $as_echo_n "checking for $ac_word... " >&6; }
8587 if ${ac_cv_prog_RANLIB+:} false; then :
8588 $as_echo_n "(cached) " >&6
8590 if test -n "$RANLIB"; then
8591 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8593 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8597 test -z "$as_dir" && as_dir=.
8598 for ac_exec_ext in '' $ac_executable_extensions; do
8599 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8600 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8601 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8610 RANLIB=$ac_cv_prog_RANLIB
8611 if test -n "$RANLIB"; then
8612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8613 $as_echo "$RANLIB" >&6; }
8615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8616 $as_echo "no" >&6; }
8621 if test -z "$ac_cv_prog_RANLIB"; then
8622 ac_ct_RANLIB=$RANLIB
8623 # Extract the first word of "ranlib", so it can be a program name with args.
8624 set dummy ranlib; ac_word=$2
8625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8626 $as_echo_n "checking for $ac_word... " >&6; }
8627 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8628 $as_echo_n "(cached) " >&6
8630 if test -n "$ac_ct_RANLIB"; then
8631 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8633 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8637 test -z "$as_dir" && as_dir=.
8638 for ac_exec_ext in '' $ac_executable_extensions; do
8639 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8640 ac_cv_prog_ac_ct_RANLIB="ranlib"
8641 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8650 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8651 if test -n "$ac_ct_RANLIB"; then
8652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8653 $as_echo "$ac_ct_RANLIB" >&6; }
8655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8656 $as_echo "no" >&6; }
8659 if test "x$ac_ct_RANLIB" = x; then
8662 case $cross_compiling:$ac_tool_warned in
8664 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8665 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8666 ac_tool_warned=yes ;;
8668 RANLIB=$ac_ct_RANLIB
8671 RANLIB="$ac_cv_prog_RANLIB"
8675 if test -n "$ac_tool_prefix"; then
8676 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8677 set dummy ${ac_tool_prefix}strip; ac_word=$2
8678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8679 $as_echo_n "checking for $ac_word... " >&6; }
8680 if ${ac_cv_prog_STRIP+:} false; then :
8681 $as_echo_n "(cached) " >&6
8683 if test -n "$STRIP"; then
8684 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8686 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8690 test -z "$as_dir" && as_dir=.
8691 for ac_exec_ext in '' $ac_executable_extensions; do
8692 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8693 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8694 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8703 STRIP=$ac_cv_prog_STRIP
8704 if test -n "$STRIP"; then
8705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8706 $as_echo "$STRIP" >&6; }
8708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8709 $as_echo "no" >&6; }
8714 if test -z "$ac_cv_prog_STRIP"; then
8716 # Extract the first word of "strip", so it can be a program name with args.
8717 set dummy strip; ac_word=$2
8718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8719 $as_echo_n "checking for $ac_word... " >&6; }
8720 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8721 $as_echo_n "(cached) " >&6
8723 if test -n "$ac_ct_STRIP"; then
8724 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8726 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8730 test -z "$as_dir" && as_dir=.
8731 for ac_exec_ext in '' $ac_executable_extensions; do
8732 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8733 ac_cv_prog_ac_ct_STRIP="strip"
8734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8743 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8744 if test -n "$ac_ct_STRIP"; then
8745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8746 $as_echo "$ac_ct_STRIP" >&6; }
8748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8749 $as_echo "no" >&6; }
8752 if test "x$ac_ct_STRIP" = x; then
8755 case $cross_compiling:$ac_tool_warned in
8757 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8758 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8759 ac_tool_warned=yes ;;
8764 STRIP="$ac_cv_prog_STRIP"
8768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
8769 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
8770 if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
8771 STRIP_STATIC_LIB="$STRIP -x"
8772 STRIP_SHARED_LIB="$STRIP --strip-unneeded"
8773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8774 $as_echo "yes" >&6; }
8779 STRIP_STATIC_LIB=$STRIP
8780 STRIP_SHARED_LIB=$STRIP
8781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8782 $as_echo "yes" >&6; }
8787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8788 $as_echo "no" >&6; }
8795 if test -n "$ac_tool_prefix"; then
8796 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8797 set dummy ${ac_tool_prefix}ar; ac_word=$2
8798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8799 $as_echo_n "checking for $ac_word... " >&6; }
8800 if ${ac_cv_prog_AR+:} false; then :
8801 $as_echo_n "(cached) " >&6
8803 if test -n "$AR"; then
8804 ac_cv_prog_AR="$AR" # Let the user override the test.
8806 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8810 test -z "$as_dir" && as_dir=.
8811 for ac_exec_ext in '' $ac_executable_extensions; do
8812 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8813 ac_cv_prog_AR="${ac_tool_prefix}ar"
8814 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8824 if test -n "$AR"; then
8825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8826 $as_echo "$AR" >&6; }
8828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8829 $as_echo "no" >&6; }
8834 if test -z "$ac_cv_prog_AR"; then
8836 # Extract the first word of "ar", so it can be a program name with args.
8837 set dummy ar; ac_word=$2
8838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8839 $as_echo_n "checking for $ac_word... " >&6; }
8840 if ${ac_cv_prog_ac_ct_AR+:} false; then :
8841 $as_echo_n "(cached) " >&6
8843 if test -n "$ac_ct_AR"; then
8844 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8846 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8850 test -z "$as_dir" && as_dir=.
8851 for ac_exec_ext in '' $ac_executable_extensions; do
8852 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8853 ac_cv_prog_ac_ct_AR="ar"
8854 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8863 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8864 if test -n "$ac_ct_AR"; then
8865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8866 $as_echo "$ac_ct_AR" >&6; }
8868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8869 $as_echo "no" >&6; }
8872 if test "x$ac_ct_AR" = x; then
8875 case $cross_compiling:$ac_tool_warned in
8877 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8878 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8879 ac_tool_warned=yes ;;
8887 if test "$PORTNAME" = "win32"; then
8888 if test -n "$ac_tool_prefix"; then
8889 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8890 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8892 $as_echo_n "checking for $ac_word... " >&6; }
8893 if ${ac_cv_prog_DLLTOOL+:} false; then :
8894 $as_echo_n "(cached) " >&6
8896 if test -n "$DLLTOOL"; then
8897 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8899 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8903 test -z "$as_dir" && as_dir=.
8904 for ac_exec_ext in '' $ac_executable_extensions; do
8905 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8906 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8907 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8916 DLLTOOL=$ac_cv_prog_DLLTOOL
8917 if test -n "$DLLTOOL"; then
8918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8919 $as_echo "$DLLTOOL" >&6; }
8921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8922 $as_echo "no" >&6; }
8927 if test -z "$ac_cv_prog_DLLTOOL"; then
8928 ac_ct_DLLTOOL=$DLLTOOL
8929 # Extract the first word of "dlltool", so it can be a program name with args.
8930 set dummy dlltool; ac_word=$2
8931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8932 $as_echo_n "checking for $ac_word... " >&6; }
8933 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
8934 $as_echo_n "(cached) " >&6
8936 if test -n "$ac_ct_DLLTOOL"; then
8937 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8939 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8943 test -z "$as_dir" && as_dir=.
8944 for ac_exec_ext in '' $ac_executable_extensions; do
8945 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8946 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8947 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8956 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8957 if test -n "$ac_ct_DLLTOOL"; then
8958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8959 $as_echo "$ac_ct_DLLTOOL" >&6; }
8961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8962 $as_echo "no" >&6; }
8965 if test "x$ac_ct_DLLTOOL" = x; then
8968 case $cross_compiling:$ac_tool_warned in
8970 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8971 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8972 ac_tool_warned=yes ;;
8974 DLLTOOL=$ac_ct_DLLTOOL
8977 DLLTOOL="$ac_cv_prog_DLLTOOL"
8980 if test -n "$ac_tool_prefix"; then
8981 # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
8982 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
8983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8984 $as_echo_n "checking for $ac_word... " >&6; }
8985 if ${ac_cv_prog_DLLWRAP+:} false; then :
8986 $as_echo_n "(cached) " >&6
8988 if test -n "$DLLWRAP"; then
8989 ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
8991 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8995 test -z "$as_dir" && as_dir=.
8996 for ac_exec_ext in '' $ac_executable_extensions; do
8997 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8998 ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
8999 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9008 DLLWRAP=$ac_cv_prog_DLLWRAP
9009 if test -n "$DLLWRAP"; then
9010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
9011 $as_echo "$DLLWRAP" >&6; }
9013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9014 $as_echo "no" >&6; }
9019 if test -z "$ac_cv_prog_DLLWRAP"; then
9020 ac_ct_DLLWRAP=$DLLWRAP
9021 # Extract the first word of "dllwrap", so it can be a program name with args.
9022 set dummy dllwrap; ac_word=$2
9023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9024 $as_echo_n "checking for $ac_word... " >&6; }
9025 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
9026 $as_echo_n "(cached) " >&6
9028 if test -n "$ac_ct_DLLWRAP"; then
9029 ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
9031 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9035 test -z "$as_dir" && as_dir=.
9036 for ac_exec_ext in '' $ac_executable_extensions; do
9037 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9038 ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
9039 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9048 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
9049 if test -n "$ac_ct_DLLWRAP"; then
9050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
9051 $as_echo "$ac_ct_DLLWRAP" >&6; }
9053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9054 $as_echo "no" >&6; }
9057 if test "x$ac_ct_DLLWRAP" = x; then
9060 case $cross_compiling:$ac_tool_warned in
9062 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9063 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9064 ac_tool_warned=yes ;;
9066 DLLWRAP=$ac_ct_DLLWRAP
9069 DLLWRAP="$ac_cv_prog_DLLWRAP"
9072 if test -n "$ac_tool_prefix"; then
9073 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9074 set dummy ${ac_tool_prefix}windres; ac_word=$2
9075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9076 $as_echo_n "checking for $ac_word... " >&6; }
9077 if ${ac_cv_prog_WINDRES+:} false; then :
9078 $as_echo_n "(cached) " >&6
9080 if test -n "$WINDRES"; then
9081 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9083 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9087 test -z "$as_dir" && as_dir=.
9088 for ac_exec_ext in '' $ac_executable_extensions; do
9089 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9090 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9091 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9100 WINDRES=$ac_cv_prog_WINDRES
9101 if test -n "$WINDRES"; then
9102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9103 $as_echo "$WINDRES" >&6; }
9105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9106 $as_echo "no" >&6; }
9111 if test -z "$ac_cv_prog_WINDRES"; then
9112 ac_ct_WINDRES=$WINDRES
9113 # Extract the first word of "windres", so it can be a program name with args.
9114 set dummy windres; ac_word=$2
9115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9116 $as_echo_n "checking for $ac_word... " >&6; }
9117 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9118 $as_echo_n "(cached) " >&6
9120 if test -n "$ac_ct_WINDRES"; then
9121 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9123 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9127 test -z "$as_dir" && as_dir=.
9128 for ac_exec_ext in '' $ac_executable_extensions; do
9129 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9130 ac_cv_prog_ac_ct_WINDRES="windres"
9131 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9140 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9141 if test -n "$ac_ct_WINDRES"; then
9142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9143 $as_echo "$ac_ct_WINDRES" >&6; }
9145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9146 $as_echo "no" >&6; }
9149 if test "x$ac_ct_WINDRES" = x; then
9152 case $cross_compiling:$ac_tool_warned in
9154 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9155 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9156 ac_tool_warned=yes ;;
9158 WINDRES=$ac_ct_WINDRES
9161 WINDRES="$ac_cv_prog_WINDRES"
9166 # Find a good install program. We prefer a C program (faster),
9167 # so one script is as good as another. But avoid the broken or
9168 # incompatible versions:
9169 # SysV /etc/install, /usr/sbin/install
9170 # SunOS /usr/etc/install
9171 # IRIX /sbin/install
9173 # AmigaOS /C/install, which installs bootblocks on floppy discs
9174 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9175 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9176 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9177 # OS/2's system install, which has a completely different semantic
9178 # ./install, which can be erroneously created by make from ./install.sh.
9179 # Reject install programs that cannot install multiple files.
9180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9181 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9182 if test -z "$INSTALL"; then
9183 if ${ac_cv_path_install+:} false; then :
9184 $as_echo_n "(cached) " >&6
9186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9190 test -z "$as_dir" && as_dir=.
9191 # Account for people who put trailing slashes in PATH elements.
9192 case $as_dir/ in #((
9193 ./ | .// | /[cC]/* | \
9194 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9195 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9198 # OSF1 and SCO ODT 3.0 have their own names for install.
9199 # Don't use installbsd from OSF since it installs stuff as root
9201 for ac_prog in ginstall scoinst install; do
9202 for ac_exec_ext in '' $ac_executable_extensions; do
9203 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9204 if test $ac_prog = install &&
9205 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9206 # AIX install. It has an incompatible calling convention.
9208 elif test $ac_prog = install &&
9209 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9210 # program-specific install script used by HP pwplus--don't use.
9213 rm -rf conftest.one conftest.two conftest.dir
9214 echo one > conftest.one
9215 echo two > conftest.two
9217 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9218 test -s conftest.one && test -s conftest.two &&
9219 test -s conftest.dir/conftest.one &&
9220 test -s conftest.dir/conftest.two
9222 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9235 rm -rf conftest.one conftest.two conftest.dir
9238 if test "${ac_cv_path_install+set}" = set; then
9239 INSTALL=$ac_cv_path_install
9241 # As a last resort, use the slow shell script. Don't cache a
9242 # value for INSTALL within a source directory, because that will
9243 # break other packages using the cache if that directory is
9244 # removed, or if the value is a relative name.
9245 INSTALL=$ac_install_sh
9248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9249 $as_echo "$INSTALL" >&6; }
9251 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9252 # It thinks the first close brace ends the variable substitution.
9253 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9255 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9257 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9259 # When Autoconf chooses install-sh as install program it tries to generate
9260 # a relative path to it in each makefile where it substitutes it. This clashes
9261 # with our Makefile.global concept. This workaround helps.
9263 *install-sh*) install_bin='';;
9264 *) install_bin=$INSTALL;;
9268 if test -z "$TAR"; then
9271 # Extract the first word of "$ac_prog", so it can be a program name with args.
9272 set dummy $ac_prog; ac_word=$2
9273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9274 $as_echo_n "checking for $ac_word... " >&6; }
9275 if ${ac_cv_path_TAR+:} false; then :
9276 $as_echo_n "(cached) " >&6
9280 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9283 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9287 test -z "$as_dir" && as_dir=.
9288 for ac_exec_ext in '' $ac_executable_extensions; do
9289 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9290 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9291 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9302 if test -n "$TAR"; then
9303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9304 $as_echo "$TAR" >&6; }
9306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9307 $as_echo "no" >&6; }
9311 test -n "$TAR" && break
9315 # Report the value of TAR in configure's output in all cases.
9316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9317 $as_echo_n "checking for TAR... " >&6; }
9318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9319 $as_echo "$TAR" >&6; }
9322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9323 $as_echo_n "checking whether ln -s works... " >&6; }
9325 if test "$LN_S" = "ln -s"; then
9326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9327 $as_echo "yes" >&6; }
9329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9330 $as_echo "no, using $LN_S" >&6; }
9333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
9334 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
9335 if test -z "$MKDIR_P"; then
9336 if ${ac_cv_path_mkdir+:} false; then :
9337 $as_echo_n "(cached) " >&6
9339 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9340 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
9343 test -z "$as_dir" && as_dir=.
9344 for ac_prog in mkdir gmkdir; do
9345 for ac_exec_ext in '' $ac_executable_extensions; do
9346 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
9347 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
9348 'mkdir (GNU coreutils) '* | \
9349 'mkdir (coreutils) '* | \
9350 'mkdir (fileutils) '4.1*)
9351 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
9361 test -d ./--version && rmdir ./--version
9362 if test "${ac_cv_path_mkdir+set}" = set; then
9363 MKDIR_P="$ac_cv_path_mkdir -p"
9365 # As a last resort, use the slow shell script. Don't cache a
9366 # value for MKDIR_P within a source directory, because that will
9367 # break other packages using the cache if that directory is
9368 # removed, or if the value is a relative name.
9369 MKDIR_P="$ac_install_sh -d"
9372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
9373 $as_echo "$MKDIR_P" >&6; }
9375 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
9376 # a relative path to it in each makefile where it substitutes it. This clashes
9377 # with our Makefile.global concept. This workaround helps.
9379 *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
9382 if test -z "$BISON"; then
9383 for ac_prog in bison
9385 # Extract the first word of "$ac_prog", so it can be a program name with args.
9386 set dummy $ac_prog; ac_word=$2
9387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9388 $as_echo_n "checking for $ac_word... " >&6; }
9389 if ${ac_cv_path_BISON+:} false; then :
9390 $as_echo_n "(cached) " >&6
9394 ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
9397 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9401 test -z "$as_dir" && as_dir=.
9402 for ac_exec_ext in '' $ac_executable_extensions; do
9403 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9404 ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
9405 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9415 BISON=$ac_cv_path_BISON
9416 if test -n "$BISON"; then
9417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9418 $as_echo "$BISON" >&6; }
9420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9421 $as_echo "no" >&6; }
9425 test -n "$BISON" && break
9429 # Report the value of BISON in configure's output in all cases.
9430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
9431 $as_echo_n "checking for BISON... " >&6; }
9432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9433 $as_echo "$BISON" >&6; }
9437 if test "$BISON"; then
9438 pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
9439 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
9440 $as_echo "$as_me: using $pgac_bison_version" >&6;}
9441 if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
9443 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9444 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9445 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
9446 $as_echo "$as_me: WARNING:
9447 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9448 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
9451 # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
9452 # of the now preferred %name-prefix "base_yy", but the latter
9453 # doesn't work with Bison 2.3 or less. So for now we silence the
9454 # deprecation warnings.
9455 if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
9457 BISONFLAGS="$BISONFLAGS -Wno-deprecated"
9461 if test -z "$BISON"; then
9462 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9463 *** Without Bison you will not be able to build PostgreSQL from Git nor
9464 *** change any of the parser definition files. You can obtain Bison from
9465 *** a GNU mirror site. (If you are using the official distribution of
9466 *** PostgreSQL then you do not need to worry about this, because the Bison
9467 *** output is pre-generated.)" >&5
9468 $as_echo "$as_me: WARNING:
9469 *** Without Bison you will not be able to build PostgreSQL from Git nor
9470 *** change any of the parser definition files. You can obtain Bison from
9471 *** a GNU mirror site. (If you are using the official distribution of
9472 *** PostgreSQL then you do not need to worry about this, because the Bison
9473 *** output is pre-generated.)" >&2;}
9477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
9478 $as_echo_n "checking for flex... " >&6; }
9479 if ${pgac_cv_path_flex+:} false; then :
9480 $as_echo_n "(cached) " >&6
9482 # Let the user override the test
9483 if test -n "$FLEX"; then
9484 pgac_cv_path_flex=$FLEX
9488 for pgac_dir in $PATH; do
9490 if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
9493 for pgac_prog in flex lex; do
9494 pgac_candidate="$pgac_dir/$pgac_prog"
9495 if test -f "$pgac_candidate" \
9496 && $pgac_candidate --version </dev/null >/dev/null 2>&1
9498 echo '%%' > conftest.l
9499 if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
9500 pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
9501 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;}'
9503 pgac_cv_path_flex=$pgac_candidate
9506 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9507 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9508 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
9509 $as_echo "$as_me: WARNING:
9510 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9511 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
9517 rm -f conftest.l lex.yy.c
9518 : ${pgac_cv_path_flex=no}
9522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
9523 $as_echo "$pgac_cv_path_flex" >&6; }
9524 if test x"$pgac_cv_path_flex" = x"no"; then
9525 { $as_echo "$as_me:${as_lineno-$LINENO}: 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.)" >&5
9531 $as_echo "$as_me: WARNING:
9532 *** Without Flex you will not be able to build PostgreSQL from Git nor
9533 *** change any of the scanner definition files. You can obtain Flex from
9534 *** a GNU mirror site. (If you are using the official distribution of
9535 *** PostgreSQL then you do not need to worry about this because the Flex
9536 *** output is pre-generated.)" >&2;}
9540 FLEX=$pgac_cv_path_flex
9541 pgac_flex_version=`$FLEX --version 2>/dev/null`
9542 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
9543 $as_echo "$as_me: using $pgac_flex_version" >&6;}
9550 if test -z "$PERL"; then
9553 # Extract the first word of "$ac_prog", so it can be a program name with args.
9554 set dummy $ac_prog; ac_word=$2
9555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9556 $as_echo_n "checking for $ac_word... " >&6; }
9557 if ${ac_cv_path_PERL+:} false; then :
9558 $as_echo_n "(cached) " >&6
9562 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
9565 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9569 test -z "$as_dir" && as_dir=.
9570 for ac_exec_ext in '' $ac_executable_extensions; do
9571 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9572 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
9573 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9583 PERL=$ac_cv_path_PERL
9584 if test -n "$PERL"; then
9585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9586 $as_echo "$PERL" >&6; }
9588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9589 $as_echo "no" >&6; }
9593 test -n "$PERL" && break
9597 # Report the value of PERL in configure's output in all cases.
9598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
9599 $as_echo_n "checking for PERL... " >&6; }
9600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9601 $as_echo "$PERL" >&6; }
9605 if test "$PERL"; then
9606 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'`
9607 { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
9608 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
9609 if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
9610 $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
9612 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9613 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9614 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
9615 $as_echo "$as_me: WARNING:
9616 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9617 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
9622 if test -z "$PERL"; then
9623 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9624 *** Without Perl you will not be able to build PostgreSQL from Git.
9625 *** You can obtain Perl from any CPAN mirror site.
9626 *** (If you are using the official distribution of PostgreSQL then you do not
9627 *** need to worry about this, because the Perl output is pre-generated.)" >&5
9628 $as_echo "$as_me: WARNING:
9629 *** Without Perl you will not be able to build PostgreSQL from Git.
9630 *** You can obtain Perl from any CPAN mirror site.
9631 *** (If you are using the official distribution of PostgreSQL then you do not
9632 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
9635 if test "$with_perl" = yes; then
9636 if test -z "$PERL"; then
9637 as_fn_error $? "Perl not found" "$LINENO" 5
9640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
9641 $as_echo_n "checking for Perl archlibexp... " >&6; }
9642 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
9643 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
9644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
9645 $as_echo "$perl_archlibexp" >&6; }
9646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
9647 $as_echo_n "checking for Perl privlibexp... " >&6; }
9648 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
9649 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
9650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
9651 $as_echo "$perl_privlibexp" >&6; }
9652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
9653 $as_echo_n "checking for Perl useshrplib... " >&6; }
9654 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
9655 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
9656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
9657 $as_echo "$perl_useshrplib" >&6; }
9658 if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
9659 as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
9660 You might have to rebuild your Perl installation. Refer to the
9661 documentation for details. Use --without-perl to disable building
9662 PL/Perl." "$LINENO" 5
9664 # On most platforms, archlibexp is also where the Perl include files live ...
9665 perl_includespec="-I$perl_archlibexp/CORE"
9666 # ... but on newer macOS versions, we must use -iwithsysroot to look
9668 if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
9669 if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
9670 perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
9674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
9675 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
9676 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
9677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
9678 $as_echo "$perl_ccflags" >&6; }
9679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
9680 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
9681 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
9682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
9683 $as_echo "$perl_embed_ccflags" >&6; }
9686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
9687 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
9688 if test "$PORTNAME" = "win32" ; then
9689 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
9690 if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
9691 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9693 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
9694 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
9695 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9699 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
9700 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
9701 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
9703 if test -z "$perl_embed_ldflags" ; then
9704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9705 $as_echo "no" >&6; }
9706 as_fn_error $? "could not determine flags for linking embedded Perl.
9707 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
9708 installed." "$LINENO" 5
9710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
9711 $as_echo "$perl_embed_ldflags" >&6; }
9716 if test "$with_python" = yes; then
9717 if test -z "$PYTHON"; then
9718 for ac_prog in python python3 python2
9720 # Extract the first word of "$ac_prog", so it can be a program name with args.
9721 set dummy $ac_prog; ac_word=$2
9722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9723 $as_echo_n "checking for $ac_word... " >&6; }
9724 if ${ac_cv_path_PYTHON+:} false; then :
9725 $as_echo_n "(cached) " >&6
9729 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
9732 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9736 test -z "$as_dir" && as_dir=.
9737 for ac_exec_ext in '' $ac_executable_extensions; do
9738 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9739 ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
9740 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9750 PYTHON=$ac_cv_path_PYTHON
9751 if test -n "$PYTHON"; then
9752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9753 $as_echo "$PYTHON" >&6; }
9755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9756 $as_echo "no" >&6; }
9760 test -n "$PYTHON" && break
9764 # Report the value of PYTHON in configure's output in all cases.
9765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
9766 $as_echo_n "checking for PYTHON... " >&6; }
9767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9768 $as_echo "$PYTHON" >&6; }
9771 if test x"$PYTHON" = x""; then
9772 as_fn_error $? "Python not found" "$LINENO" 5
9776 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
9777 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
9778 $as_echo "$as_me: using python $python_fullversion" >&6;}
9779 # python_fullversion is typically n.n.n plus some trailing junk
9780 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
9781 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
9782 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
9783 # Reject unsupported Python versions as soon as practical.
9784 if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 4; then
9785 as_fn_error $? "Python version $python_version is too old (version 2.4 or later is required)" "$LINENO" 5
9788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
9789 $as_echo_n "checking for Python distutils module... " >&6; }
9790 if "${PYTHON}" -c 'import distutils' 2>&5
9792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9793 $as_echo "yes" >&6; }
9795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9796 $as_echo "no" >&6; }
9797 as_fn_error $? "distutils module not found" "$LINENO" 5
9800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
9801 $as_echo_n "checking Python configuration directory... " >&6; }
9802 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
9803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
9804 $as_echo "$python_configdir" >&6; }
9806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
9807 $as_echo_n "checking Python include directories... " >&6; }
9808 python_includespec=`${PYTHON} -c "
9809 import distutils.sysconfig
9810 a = '-I' + distutils.sysconfig.get_python_inc(False)
9811 b = '-I' + distutils.sysconfig.get_python_inc(True)
9815 print(a + ' ' + b)"`
9816 if test "$PORTNAME" = win32 ; then
9817 python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
9819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
9820 $as_echo "$python_includespec" >&6; }
9824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
9825 $as_echo_n "checking how to link an embedded Python application... " >&6; }
9827 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
9828 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
9830 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
9831 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
9832 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
9834 ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
9837 # Otherwise, guess the base name of the shlib.
9838 # LDVERSION was added in Python 3.2, before that use VERSION,
9839 # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
9840 python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
9841 if test x"${python_ldversion}" != x""; then
9842 ldlibrary="python${python_ldversion}"
9844 python_version_var=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('VERSION'))))"`
9845 if test x"${python_version_var}" != x""; then
9846 ldlibrary="python${python_version_var}"
9848 ldlibrary="python${python_version}"
9851 # Search for a likely-looking file.
9853 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9855 # We don't know the platform DLSUFFIX here, so check 'em all.
9856 for e in .so .dll .dylib .sl; do
9857 if test -e "$d/lib${ldlibrary}$e"; then
9864 # Some platforms (OpenBSD) require us to accept a bare versioned shlib
9865 # (".so.n.n") as well. However, check this only after failing to find
9866 # ".so" anywhere, because yet other platforms (Debian) put the .so
9867 # symlink in a different directory from the underlying versioned shlib.
9868 if test "$found_shlib" != 1; then
9869 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9871 for f in "$d/lib${ldlibrary}.so."* ; do
9872 if test -e "$f"; then
9880 # As usual, Windows has its own ideas. Possible default library
9881 # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
9882 # and the "lib" prefix might not be there.
9883 if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
9884 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
9886 for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
9887 if test -e "$f"; then
9896 if test "$found_shlib" != 1; then
9897 as_fn_error $? "could not find shared library for Python
9898 You might have to rebuild your Python installation. Refer to the
9899 documentation for details. Use --without-python to disable building
9900 PL/Python." "$LINENO" 5
9902 python_libspec="-L${python_libdir} -l${ldlibrary}"
9904 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
9906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
9907 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
9913 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
9914 if test -z "$ZIC"; then
9917 # Extract the first word of "$ac_prog", so it can be a program name with args.
9918 set dummy $ac_prog; ac_word=$2
9919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9920 $as_echo_n "checking for $ac_word... " >&6; }
9921 if ${ac_cv_path_ZIC+:} false; then :
9922 $as_echo_n "(cached) " >&6
9926 ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
9929 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9933 test -z "$as_dir" && as_dir=.
9934 for ac_exec_ext in '' $ac_executable_extensions; do
9935 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9936 ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
9937 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9948 if test -n "$ZIC"; then
9949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
9950 $as_echo "$ZIC" >&6; }
9952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9953 $as_echo "no" >&6; }
9957 test -n "$ZIC" && break
9961 # Report the value of ZIC in configure's output in all cases.
9962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
9963 $as_echo_n "checking for ZIC... " >&6; }
9964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
9965 $as_echo "$ZIC" >&6; }
9968 if test -z "$ZIC"; then
9970 When cross-compiling, either use the option --with-system-tzdata to use
9971 existing time-zone data, or set the environment variable ZIC to a zic
9972 program to use during the build." "$LINENO" 5
9979 # For each platform, we need to know about any special compile and link
9980 # libraries, and whether the normal C function names are thread-safe.
9981 # See the comment at the top of src/port/thread.c for more information.
9982 # WIN32 doesn't need the pthread tests; it always uses threads
9984 # These tests are run before the library-tests, because linking with the
9985 # other libraries can pull in the pthread functions as a side-effect. We
9986 # want to use the -pthread or similar flags directly, and not rely on
9987 # the side-effects of linking with some other library.
9989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
9990 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
9991 if ${ac_cv_path_SED+:} false; then :
9992 $as_echo_n "(cached) " >&6
9994 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
9995 for ac_i in 1 2 3 4 5 6 7; do
9996 ac_script="$ac_script$as_nl$ac_script"
9998 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
9999 { ac_script=; unset ac_script;}
10000 if test -z "$SED"; then
10001 ac_path_SED_found=false
10002 # Loop through the user's path and test for each of PROGNAME-LIST
10003 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10004 for as_dir in $PATH
10007 test -z "$as_dir" && as_dir=.
10008 for ac_prog in sed gsed; do
10009 for ac_exec_ext in '' $ac_executable_extensions; do
10010 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
10011 as_fn_executable_p "$ac_path_SED" || continue
10012 # Check for GNU ac_path_SED and select it if it is found.
10013 # Check for GNU $ac_path_SED
10014 case `"$ac_path_SED" --version 2>&1` in
10016 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10019 $as_echo_n 0123456789 >"conftest.in"
10022 cat "conftest.in" "conftest.in" >"conftest.tmp"
10023 mv "conftest.tmp" "conftest.in"
10024 cp "conftest.in" "conftest.nl"
10025 $as_echo '' >> "conftest.nl"
10026 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10027 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10028 as_fn_arith $ac_count + 1 && ac_count=$as_val
10029 if test $ac_count -gt ${ac_path_SED_max-0}; then
10030 # Best one so far, save it but keep looking for a better one
10031 ac_cv_path_SED="$ac_path_SED"
10032 ac_path_SED_max=$ac_count
10034 # 10*(2^10) chars as input seems more than enough
10035 test $ac_count -gt 10 && break
10037 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10040 $ac_path_SED_found && break 3
10045 if test -z "$ac_cv_path_SED"; then
10046 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10049 ac_cv_path_SED=$SED
10053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10054 $as_echo "$ac_cv_path_SED" >&6; }
10055 SED="$ac_cv_path_SED"
10058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10059 $as_echo_n "checking for ANSI C header files... " >&6; }
10060 if ${ac_cv_header_stdc+:} false; then :
10061 $as_echo_n "(cached) " >&6
10063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10064 /* end confdefs.h. */
10065 #include <stdlib.h>
10066 #include <stdarg.h>
10067 #include <string.h>
10078 if ac_fn_c_try_compile "$LINENO"; then :
10079 ac_cv_header_stdc=yes
10081 ac_cv_header_stdc=no
10083 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10085 if test $ac_cv_header_stdc = yes; then
10086 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10088 /* end confdefs.h. */
10089 #include <string.h>
10092 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10093 $EGREP "memchr" >/dev/null 2>&1; then :
10096 ac_cv_header_stdc=no
10102 if test $ac_cv_header_stdc = yes; then
10103 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10105 /* end confdefs.h. */
10106 #include <stdlib.h>
10109 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10110 $EGREP "free" >/dev/null 2>&1; then :
10113 ac_cv_header_stdc=no
10119 if test $ac_cv_header_stdc = yes; then
10120 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10121 if test "$cross_compiling" = yes; then :
10124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10125 /* end confdefs.h. */
10127 #include <stdlib.h>
10128 #if ((' ' & 0x0FF) == 0x020)
10129 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10130 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10132 # define ISLOWER(c) \
10133 (('a' <= (c) && (c) <= 'i') \
10134 || ('j' <= (c) && (c) <= 'r') \
10135 || ('s' <= (c) && (c) <= 'z'))
10136 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10139 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10144 for (i = 0; i < 256; i++)
10145 if (XOR (islower (i), ISLOWER (i))
10146 || toupper (i) != TOUPPER (i))
10151 if ac_fn_c_try_run "$LINENO"; then :
10154 ac_cv_header_stdc=no
10156 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10157 conftest.$ac_objext conftest.beam conftest.$ac_ext
10162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10163 $as_echo "$ac_cv_header_stdc" >&6; }
10164 if test $ac_cv_header_stdc = yes; then
10166 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
10170 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10171 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10172 inttypes.h stdint.h unistd.h
10174 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10175 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
10177 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10178 cat >>confdefs.h <<_ACEOF
10179 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10187 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
10194 ac_cpp='$CPP $CPPFLAGS'
10195 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10196 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10197 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10201 # We used to check for pthread.h first, but this fails if pthread.h
10202 # requires special compiler flags (e.g. on Tru64 or Sequent).
10203 # It gets checked for in the link test anyway.
10205 # First of all, check if the user has set any of the PTHREAD_LIBS,
10206 # etcetera environment variables, and if threads linking works using
10208 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
10209 ax_pthread_save_CC="$CC"
10210 ax_pthread_save_CFLAGS="$CFLAGS"
10211 ax_pthread_save_LIBS="$LIBS"
10212 if test "x$PTHREAD_CC" != "x"; then :
10215 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10216 LIBS="$PTHREAD_LIBS $LIBS"
10217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
10218 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
10219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10220 /* end confdefs.h. */
10222 /* Override any GCC internal prototype to avoid an error.
10223 Use char because int might match the return type of a GCC
10224 builtin and then its argument prototype would still apply. */
10228 char pthread_join ();
10232 return pthread_join ();
10237 if ac_fn_c_try_link "$LINENO"; then :
10240 rm -f core conftest.err conftest.$ac_objext \
10241 conftest$ac_exeext conftest.$ac_ext
10242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10243 $as_echo "$ax_pthread_ok" >&6; }
10244 if test "x$ax_pthread_ok" = "xno"; then
10248 CC="$ax_pthread_save_CC"
10249 CFLAGS="$ax_pthread_save_CFLAGS"
10250 LIBS="$ax_pthread_save_LIBS"
10253 # We must check for the threads library under a number of different
10254 # names; the ordering is very important because some systems
10255 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
10256 # libraries is broken (non-POSIX).
10258 # Create a list of thread flags to try. Items starting with a "-" are
10259 # C compiler flags, and other items are library names, except for "none"
10260 # which indicates that we try without any flags at all, and "pthread-config"
10261 # which is a program returning the flags for the Pth emulation library.
10263 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
10265 # The ordering *is* (sometimes) important. Some notes on the
10266 # individual items follow:
10268 # pthreads: AIX (must check this before -lpthread)
10269 # none: in case threads are in libc; should be tried before -Kthread and
10270 # other compiler flags to prevent continual compiler warnings
10271 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
10272 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
10273 # (Note: HP C rejects this with "bad form for `-t' option")
10274 # -pthreads: Solaris/gcc (Note: HP C also rejects)
10275 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
10276 # doesn't hurt to check since this sometimes defines pthreads and
10277 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
10278 # is present but should not be used directly; and before -mthreads,
10279 # because the compiler interprets this as "-mt" + "-hreads")
10280 # -mthreads: Mingw32/gcc, Lynx/gcc
10281 # pthread: Linux, etcetera
10282 # --thread-safe: KAI C++
10283 # pthread-config: use pthread-config program (for GNU Pth library)
10289 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
10290 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
10292 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
10297 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
10298 # multi-threading and also sets -lpthread."
10300 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
10305 # IBM z/OS requires a feature-test macro to be defined in order to
10306 # enable POSIX threads at all, so give the user a hint if this is
10307 # not set. (We don't define these ourselves, as they can affect
10308 # other portions of the system API in unpredictable ways.)
10310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10311 /* end confdefs.h. */
10313 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
10314 AX_PTHREAD_ZOS_MISSING
10318 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10319 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
10320 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
10321 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
10329 # On Solaris (at least, for some versions), libc contains stubbed
10330 # (non-functional) versions of the pthreads routines, so link-based
10331 # tests will erroneously succeed. (N.B.: The stubs are missing
10332 # pthread_cleanup_push, or rather a function called by this macro,
10333 # so we could check for that, but who knows whether they'll stub
10334 # that too in a future libc.) So we'll check first for the
10335 # standard Solaris way of linking pthreads (-mt -lpthread).
10337 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
10341 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
10343 if test "x$GCC" = "xyes"; then :
10344 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
10347 # The presence of a feature test macro requesting re-entrant function
10348 # definitions is, on some systems, a strong hint that pthreads support is
10349 # correctly enabled
10352 darwin* | hpux* | linux* | osf* | solaris*)
10353 ax_pthread_check_macro="_REENTRANT"
10357 ax_pthread_check_macro="_THREAD_SAFE"
10361 ax_pthread_check_macro="--"
10364 if test "x$ax_pthread_check_macro" = "x--"; then :
10365 ax_pthread_check_cond=0
10367 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
10370 # Are we compiling with Clang?
10372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
10373 $as_echo_n "checking whether $CC is Clang... " >&6; }
10374 if ${ax_cv_PTHREAD_CLANG+:} false; then :
10375 $as_echo_n "(cached) " >&6
10377 ax_cv_PTHREAD_CLANG=no
10378 # Note that Autoconf sets GCC=yes for Clang as well as GCC
10379 if test "x$GCC" = "xyes"; then
10380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10381 /* end confdefs.h. */
10382 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
10383 # if defined(__clang__) && defined(__llvm__)
10384 AX_PTHREAD_CC_IS_CLANG
10388 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10389 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
10390 ax_cv_PTHREAD_CLANG=yes
10397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
10398 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
10399 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
10401 ax_pthread_clang_warning=no
10403 # Clang needs special handling, because older versions handle the -pthread
10404 # option in a rather... idiosyncratic way
10406 if test "x$ax_pthread_clang" = "xyes"; then
10408 # Clang takes -pthread; it has never supported any other flag
10410 # (Note 1: This will need to be revisited if a system that Clang
10411 # supports has POSIX threads in a separate library. This tends not
10412 # to be the way of modern systems, but it's conceivable.)
10414 # (Note 2: On some systems, notably Darwin, -pthread is not needed
10415 # to get POSIX threads support; the API is always present and
10416 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
10417 # -pthread does define _REENTRANT, and while the Darwin headers
10418 # ignore this macro, third-party headers might not.)
10420 PTHREAD_CFLAGS="-pthread"
10425 # However, older versions of Clang make a point of warning the user
10426 # that, in an invocation where only linking and no compilation is
10427 # taking place, the -pthread option has no effect ("argument unused
10428 # during compilation"). They expect -pthread to be passed in only
10429 # when source code is being compiled.
10431 # Problem is, this is at odds with the way Automake and most other
10432 # C build frameworks function, which is that the same flags used in
10433 # compilation (CFLAGS) are also used in linking. Many systems
10434 # supported by AX_PTHREAD require exactly this for POSIX threads
10435 # support, and in fact it is often not straightforward to specify a
10436 # flag that is used only in the compilation phase and not in
10437 # linking. Such a scenario is extremely rare in practice.
10439 # Even though use of the -pthread flag in linking would only print
10440 # a warning, this can be a nuisance for well-run software projects
10441 # that build with -Werror. So if the active version of Clang has
10442 # this misfeature, we search for an option to squash it.
10444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
10445 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
10446 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
10447 $as_echo_n "(cached) " >&6
10449 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
10450 # Create an alternate version of $ac_link that compiles and
10451 # links in two steps (.c -> .o, .o -> exe) instead of one
10452 # (.c -> exe), because the warning occurs only in the second
10454 ax_pthread_save_ac_link="$ac_link"
10455 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
10456 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
10457 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
10458 ax_pthread_save_CFLAGS="$CFLAGS"
10459 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
10460 if test "x$ax_pthread_try" = "xunknown"; then :
10463 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
10464 ac_link="$ax_pthread_save_ac_link"
10465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10466 /* end confdefs.h. */
10467 int main(void){return 0;}
10469 if ac_fn_c_try_link "$LINENO"; then :
10470 ac_link="$ax_pthread_2step_ac_link"
10471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10472 /* end confdefs.h. */
10473 int main(void){return 0;}
10475 if ac_fn_c_try_link "$LINENO"; then :
10478 rm -f core conftest.err conftest.$ac_objext \
10479 conftest$ac_exeext conftest.$ac_ext
10482 rm -f core conftest.err conftest.$ac_objext \
10483 conftest$ac_exeext conftest.$ac_ext
10485 ac_link="$ax_pthread_save_ac_link"
10486 CFLAGS="$ax_pthread_save_CFLAGS"
10487 if test "x$ax_pthread_try" = "x"; then :
10490 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
10493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
10494 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
10496 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
10498 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
10501 fi # $ax_pthread_clang = yes
10503 if test "x$ax_pthread_ok" = "xno"; then
10504 for ax_pthread_try_flag in $ax_pthread_flags; do
10506 case $ax_pthread_try_flag in
10508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
10509 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
10513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
10514 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
10515 PTHREAD_CFLAGS="-mt"
10516 PTHREAD_LIBS="-lpthread"
10520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
10521 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
10522 PTHREAD_CFLAGS="$ax_pthread_try_flag"
10526 # Extract the first word of "pthread-config", so it can be a program name with args.
10527 set dummy pthread-config; ac_word=$2
10528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10529 $as_echo_n "checking for $ac_word... " >&6; }
10530 if ${ac_cv_prog_ax_pthread_config+:} false; then :
10531 $as_echo_n "(cached) " >&6
10533 if test -n "$ax_pthread_config"; then
10534 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
10536 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10537 for as_dir in $PATH
10540 test -z "$as_dir" && as_dir=.
10541 for ac_exec_ext in '' $ac_executable_extensions; do
10542 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10543 ac_cv_prog_ax_pthread_config="yes"
10544 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10551 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
10554 ax_pthread_config=$ac_cv_prog_ax_pthread_config
10555 if test -n "$ax_pthread_config"; then
10556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
10557 $as_echo "$ax_pthread_config" >&6; }
10559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10560 $as_echo "no" >&6; }
10564 if test "x$ax_pthread_config" = "xno"; then :
10567 PTHREAD_CFLAGS="`pthread-config --cflags`"
10568 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
10572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
10573 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
10574 PTHREAD_LIBS="-l$ax_pthread_try_flag"
10578 ax_pthread_save_CFLAGS="$CFLAGS"
10579 ax_pthread_save_LIBS="$LIBS"
10580 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10581 LIBS="$PTHREAD_LIBS $LIBS"
10583 # Check for various functions. We must include pthread.h,
10584 # since some functions may be macros. (On the Sequent, we
10585 # need a special flag -Kthread to make this header compile.)
10586 # We check for pthread_join because it is in -lpthread on IRIX
10587 # while pthread_create is in libc. We check for pthread_attr_init
10588 # due to DEC craziness with -lpthreads. We check for
10589 # pthread_cleanup_push because it is one of the few pthread
10590 # functions on Solaris that doesn't have a non-functional libc stub.
10591 # We try pthread_create on general principles.
10593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10594 /* end confdefs.h. */
10595 #include <pthread.h>
10596 # if $ax_pthread_check_cond
10597 # error "$ax_pthread_check_macro must be defined"
10599 static void routine(void *a) { a = 0; }
10600 static void *start_routine(void *a) { return a; }
10604 pthread_t th; pthread_attr_t attr;
10605 pthread_create(&th, 0, start_routine, 0);
10606 pthread_join(th, 0);
10607 pthread_attr_init(&attr);
10608 pthread_cleanup_push(routine, 0);
10609 pthread_cleanup_pop(0) /* ; */
10614 if ac_fn_c_try_link "$LINENO"; then :
10617 rm -f core conftest.err conftest.$ac_objext \
10618 conftest$ac_exeext conftest.$ac_ext
10620 CFLAGS="$ax_pthread_save_CFLAGS"
10621 LIBS="$ax_pthread_save_LIBS"
10623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10624 $as_echo "$ax_pthread_ok" >&6; }
10625 if test "x$ax_pthread_ok" = "xyes"; then :
10634 # Various other checks:
10635 if test "x$ax_pthread_ok" = "xyes"; then
10636 ax_pthread_save_CFLAGS="$CFLAGS"
10637 ax_pthread_save_LIBS="$LIBS"
10638 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10639 LIBS="$PTHREAD_LIBS $LIBS"
10641 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
10642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
10643 $as_echo_n "checking for joinable pthread attribute... " >&6; }
10644 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
10645 $as_echo_n "(cached) " >&6
10647 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
10648 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
10649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10650 /* end confdefs.h. */
10651 #include <pthread.h>
10655 int attr = $ax_pthread_attr; return attr /* ; */
10660 if ac_fn_c_try_link "$LINENO"; then :
10661 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
10663 rm -f core conftest.err conftest.$ac_objext \
10664 conftest$ac_exeext conftest.$ac_ext
10668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
10669 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
10670 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
10671 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
10672 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
10674 cat >>confdefs.h <<_ACEOF
10675 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
10678 ax_pthread_joinable_attr_defined=yes
10682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
10683 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
10684 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
10685 $as_echo_n "(cached) " >&6
10687 ax_cv_PTHREAD_SPECIAL_FLAGS=no
10690 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
10695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
10696 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
10697 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
10698 test "x$ax_pthread_special_flags_added" != "xyes"; then :
10699 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
10700 ax_pthread_special_flags_added=yes
10703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
10704 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
10705 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
10706 $as_echo_n "(cached) " >&6
10708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10709 /* end confdefs.h. */
10710 #include <pthread.h>
10714 int i = PTHREAD_PRIO_INHERIT;
10719 if ac_fn_c_try_link "$LINENO"; then :
10720 ax_cv_PTHREAD_PRIO_INHERIT=yes
10722 ax_cv_PTHREAD_PRIO_INHERIT=no
10724 rm -f core conftest.err conftest.$ac_objext \
10725 conftest$ac_exeext conftest.$ac_ext
10728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
10729 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
10730 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
10731 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
10733 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
10735 ax_pthread_prio_inherit_defined=yes
10739 CFLAGS="$ax_pthread_save_CFLAGS"
10740 LIBS="$ax_pthread_save_LIBS"
10742 # More AIX lossage: compile with *_r variant
10743 if test "x$GCC" != "xyes"; then
10747 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
10748 #handle absolute path differently from PATH based program lookup
10751 if as_fn_executable_p ${CC}_r; then :
10752 PTHREAD_CC="${CC}_r"
10755 for ac_prog in ${CC}_r
10757 # Extract the first word of "$ac_prog", so it can be a program name with args.
10758 set dummy $ac_prog; ac_word=$2
10759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10760 $as_echo_n "checking for $ac_word... " >&6; }
10761 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
10762 $as_echo_n "(cached) " >&6
10764 if test -n "$PTHREAD_CC"; then
10765 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
10767 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10768 for as_dir in $PATH
10771 test -z "$as_dir" && as_dir=.
10772 for ac_exec_ext in '' $ac_executable_extensions; do
10773 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10774 ac_cv_prog_PTHREAD_CC="$ac_prog"
10775 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10784 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
10785 if test -n "$PTHREAD_CC"; then
10786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
10787 $as_echo "$PTHREAD_CC" >&6; }
10789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10790 $as_echo "no" >&6; }
10794 test -n "$PTHREAD_CC" && break
10796 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10807 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10813 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
10814 if test "x$ax_pthread_ok" = "xyes"; then
10816 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10824 ac_cpp='$CPP $CPPFLAGS'
10825 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10826 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10827 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10831 # Some platforms use these, so just define them. They can't hurt if they
10832 # are not supported. For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
10833 # enables 5-arg getpwuid_r, among other things.
10834 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
10836 # Check for *_r functions
10839 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10840 LIBS="$LIBS $PTHREAD_LIBS"
10842 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
10843 if test "x$ac_cv_header_pthread_h" = xyes; then :
10847 pthread.h not found; use --disable-thread-safety to disable thread safety" "$LINENO" 5
10852 for ac_func in strerror_r getpwuid_r gethostbyname_r
10854 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10855 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10856 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10857 cat >>confdefs.h <<_ACEOF
10858 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10865 # Do test here with the proper thread flags
10866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
10867 $as_echo_n "checking whether strerror_r returns int... " >&6; }
10868 if ${pgac_cv_func_strerror_r_int+:} false; then :
10869 $as_echo_n "(cached) " >&6
10871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10872 /* end confdefs.h. */
10873 #include <string.h>
10878 switch (strerror_r(1, buf, sizeof(buf)))
10879 { case 0: break; default: break; }
10885 if ac_fn_c_try_compile "$LINENO"; then :
10886 pgac_cv_func_strerror_r_int=yes
10888 pgac_cv_func_strerror_r_int=no
10890 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
10893 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
10894 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
10896 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
10907 # do not use values from template file
10920 ## Most libraries are included only if they demonstrably provide a function
10921 ## we need, but libm is an exception: always include it, because there are
10922 ## too many compilers that play cute optimization games that will break
10923 ## probes for standard functions such as pow().
10926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
10927 $as_echo_n "checking for main in -lm... " >&6; }
10928 if ${ac_cv_lib_m_main+:} false; then :
10929 $as_echo_n "(cached) " >&6
10931 ac_check_lib_save_LIBS=$LIBS
10933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10934 /* end confdefs.h. */
10945 if ac_fn_c_try_link "$LINENO"; then :
10946 ac_cv_lib_m_main=yes
10948 ac_cv_lib_m_main=no
10950 rm -f core conftest.err conftest.$ac_objext \
10951 conftest$ac_exeext conftest.$ac_ext
10952 LIBS=$ac_check_lib_save_LIBS
10954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
10955 $as_echo "$ac_cv_lib_m_main" >&6; }
10956 if test "x$ac_cv_lib_m_main" = xyes; then :
10957 cat >>confdefs.h <<_ACEOF
10958 #define HAVE_LIBM 1
10965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
10966 $as_echo_n "checking for library containing setproctitle... " >&6; }
10967 if ${ac_cv_search_setproctitle+:} false; then :
10968 $as_echo_n "(cached) " >&6
10970 ac_func_search_save_LIBS=$LIBS
10971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10972 /* end confdefs.h. */
10974 /* Override any GCC internal prototype to avoid an error.
10975 Use char because int might match the return type of a GCC
10976 builtin and then its argument prototype would still apply. */
10980 char setproctitle ();
10984 return setproctitle ();
10989 for ac_lib in '' util; do
10990 if test -z "$ac_lib"; then
10991 ac_res="none required"
10994 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10996 if ac_fn_c_try_link "$LINENO"; then :
10997 ac_cv_search_setproctitle=$ac_res
10999 rm -f core conftest.err conftest.$ac_objext \
11001 if ${ac_cv_search_setproctitle+:} false; then :
11005 if ${ac_cv_search_setproctitle+:} false; then :
11008 ac_cv_search_setproctitle=no
11010 rm conftest.$ac_ext
11011 LIBS=$ac_func_search_save_LIBS
11013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
11014 $as_echo "$ac_cv_search_setproctitle" >&6; }
11015 ac_res=$ac_cv_search_setproctitle
11016 if test "$ac_res" != no; then :
11017 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
11022 $as_echo_n "checking for library containing dlopen... " >&6; }
11023 if ${ac_cv_search_dlopen+:} false; then :
11024 $as_echo_n "(cached) " >&6
11026 ac_func_search_save_LIBS=$LIBS
11027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11028 /* end confdefs.h. */
11030 /* Override any GCC internal prototype to avoid an error.
11031 Use char because int might match the return type of a GCC
11032 builtin and then its argument prototype would still apply. */
11045 for ac_lib in '' dl; do
11046 if test -z "$ac_lib"; then
11047 ac_res="none required"
11050 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11052 if ac_fn_c_try_link "$LINENO"; then :
11053 ac_cv_search_dlopen=$ac_res
11055 rm -f core conftest.err conftest.$ac_objext \
11057 if ${ac_cv_search_dlopen+:} false; then :
11061 if ${ac_cv_search_dlopen+:} false; then :
11064 ac_cv_search_dlopen=no
11066 rm conftest.$ac_ext
11067 LIBS=$ac_func_search_save_LIBS
11069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
11070 $as_echo "$ac_cv_search_dlopen" >&6; }
11071 ac_res=$ac_cv_search_dlopen
11072 if test "$ac_res" != no; then :
11073 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11078 $as_echo_n "checking for library containing socket... " >&6; }
11079 if ${ac_cv_search_socket+:} false; then :
11080 $as_echo_n "(cached) " >&6
11082 ac_func_search_save_LIBS=$LIBS
11083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11084 /* end confdefs.h. */
11086 /* Override any GCC internal prototype to avoid an error.
11087 Use char because int might match the return type of a GCC
11088 builtin and then its argument prototype would still apply. */
11101 for ac_lib in '' socket ws2_32; do
11102 if test -z "$ac_lib"; then
11103 ac_res="none required"
11106 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11108 if ac_fn_c_try_link "$LINENO"; then :
11109 ac_cv_search_socket=$ac_res
11111 rm -f core conftest.err conftest.$ac_objext \
11113 if ${ac_cv_search_socket+:} false; then :
11117 if ${ac_cv_search_socket+:} false; then :
11120 ac_cv_search_socket=no
11122 rm conftest.$ac_ext
11123 LIBS=$ac_func_search_save_LIBS
11125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11126 $as_echo "$ac_cv_search_socket" >&6; }
11127 ac_res=$ac_cv_search_socket
11128 if test "$ac_res" != no; then :
11129 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
11134 $as_echo_n "checking for library containing shl_load... " >&6; }
11135 if ${ac_cv_search_shl_load+:} false; then :
11136 $as_echo_n "(cached) " >&6
11138 ac_func_search_save_LIBS=$LIBS
11139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11140 /* end confdefs.h. */
11142 /* Override any GCC internal prototype to avoid an error.
11143 Use char because int might match the return type of a GCC
11144 builtin and then its argument prototype would still apply. */
11152 return shl_load ();
11157 for ac_lib in '' dld; do
11158 if test -z "$ac_lib"; then
11159 ac_res="none required"
11162 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11164 if ac_fn_c_try_link "$LINENO"; then :
11165 ac_cv_search_shl_load=$ac_res
11167 rm -f core conftest.err conftest.$ac_objext \
11169 if ${ac_cv_search_shl_load+:} false; then :
11173 if ${ac_cv_search_shl_load+:} false; then :
11176 ac_cv_search_shl_load=no
11178 rm conftest.$ac_ext
11179 LIBS=$ac_func_search_save_LIBS
11181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
11182 $as_echo "$ac_cv_search_shl_load" >&6; }
11183 ac_res=$ac_cv_search_shl_load
11184 if test "$ac_res" != no; then :
11185 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
11190 $as_echo_n "checking for library containing getopt_long... " >&6; }
11191 if ${ac_cv_search_getopt_long+:} false; then :
11192 $as_echo_n "(cached) " >&6
11194 ac_func_search_save_LIBS=$LIBS
11195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11196 /* end confdefs.h. */
11198 /* Override any GCC internal prototype to avoid an error.
11199 Use char because int might match the return type of a GCC
11200 builtin and then its argument prototype would still apply. */
11204 char getopt_long ();
11208 return getopt_long ();
11213 for ac_lib in '' getopt gnugetopt; do
11214 if test -z "$ac_lib"; then
11215 ac_res="none required"
11218 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11220 if ac_fn_c_try_link "$LINENO"; then :
11221 ac_cv_search_getopt_long=$ac_res
11223 rm -f core conftest.err conftest.$ac_objext \
11225 if ${ac_cv_search_getopt_long+:} false; then :
11229 if ${ac_cv_search_getopt_long+:} false; then :
11232 ac_cv_search_getopt_long=no
11234 rm conftest.$ac_ext
11235 LIBS=$ac_func_search_save_LIBS
11237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
11238 $as_echo "$ac_cv_search_getopt_long" >&6; }
11239 ac_res=$ac_cv_search_getopt_long
11240 if test "$ac_res" != no; then :
11241 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
11246 $as_echo_n "checking for library containing crypt... " >&6; }
11247 if ${ac_cv_search_crypt+:} false; then :
11248 $as_echo_n "(cached) " >&6
11250 ac_func_search_save_LIBS=$LIBS
11251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11252 /* end confdefs.h. */
11254 /* Override any GCC internal prototype to avoid an error.
11255 Use char because int might match the return type of a GCC
11256 builtin and then its argument prototype would still apply. */
11269 for ac_lib in '' crypt; do
11270 if test -z "$ac_lib"; then
11271 ac_res="none required"
11274 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11276 if ac_fn_c_try_link "$LINENO"; then :
11277 ac_cv_search_crypt=$ac_res
11279 rm -f core conftest.err conftest.$ac_objext \
11281 if ${ac_cv_search_crypt+:} false; then :
11285 if ${ac_cv_search_crypt+:} false; then :
11288 ac_cv_search_crypt=no
11290 rm conftest.$ac_ext
11291 LIBS=$ac_func_search_save_LIBS
11293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
11294 $as_echo "$ac_cv_search_crypt" >&6; }
11295 ac_res=$ac_cv_search_crypt
11296 if test "$ac_res" != no; then :
11297 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
11302 $as_echo_n "checking for library containing shm_open... " >&6; }
11303 if ${ac_cv_search_shm_open+:} false; then :
11304 $as_echo_n "(cached) " >&6
11306 ac_func_search_save_LIBS=$LIBS
11307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11308 /* end confdefs.h. */
11310 /* Override any GCC internal prototype to avoid an error.
11311 Use char because int might match the return type of a GCC
11312 builtin and then its argument prototype would still apply. */
11320 return shm_open ();
11325 for ac_lib in '' rt; do
11326 if test -z "$ac_lib"; then
11327 ac_res="none required"
11330 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11332 if ac_fn_c_try_link "$LINENO"; then :
11333 ac_cv_search_shm_open=$ac_res
11335 rm -f core conftest.err conftest.$ac_objext \
11337 if ${ac_cv_search_shm_open+:} false; then :
11341 if ${ac_cv_search_shm_open+:} false; then :
11344 ac_cv_search_shm_open=no
11346 rm conftest.$ac_ext
11347 LIBS=$ac_func_search_save_LIBS
11349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
11350 $as_echo "$ac_cv_search_shm_open" >&6; }
11351 ac_res=$ac_cv_search_shm_open
11352 if test "$ac_res" != no; then :
11353 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
11358 $as_echo_n "checking for library containing shm_unlink... " >&6; }
11359 if ${ac_cv_search_shm_unlink+:} false; then :
11360 $as_echo_n "(cached) " >&6
11362 ac_func_search_save_LIBS=$LIBS
11363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11364 /* end confdefs.h. */
11366 /* Override any GCC internal prototype to avoid an error.
11367 Use char because int might match the return type of a GCC
11368 builtin and then its argument prototype would still apply. */
11372 char shm_unlink ();
11376 return shm_unlink ();
11381 for ac_lib in '' rt; do
11382 if test -z "$ac_lib"; then
11383 ac_res="none required"
11386 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11388 if ac_fn_c_try_link "$LINENO"; then :
11389 ac_cv_search_shm_unlink=$ac_res
11391 rm -f core conftest.err conftest.$ac_objext \
11393 if ${ac_cv_search_shm_unlink+:} false; then :
11397 if ${ac_cv_search_shm_unlink+:} false; then :
11400 ac_cv_search_shm_unlink=no
11402 rm conftest.$ac_ext
11403 LIBS=$ac_func_search_save_LIBS
11405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
11406 $as_echo "$ac_cv_search_shm_unlink" >&6; }
11407 ac_res=$ac_cv_search_shm_unlink
11408 if test "$ac_res" != no; then :
11409 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11414 $as_echo_n "checking for library containing clock_gettime... " >&6; }
11415 if ${ac_cv_search_clock_gettime+:} false; then :
11416 $as_echo_n "(cached) " >&6
11418 ac_func_search_save_LIBS=$LIBS
11419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11420 /* end confdefs.h. */
11422 /* Override any GCC internal prototype to avoid an error.
11423 Use char because int might match the return type of a GCC
11424 builtin and then its argument prototype would still apply. */
11428 char clock_gettime ();
11432 return clock_gettime ();
11437 for ac_lib in '' rt posix4; do
11438 if test -z "$ac_lib"; then
11439 ac_res="none required"
11442 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11444 if ac_fn_c_try_link "$LINENO"; then :
11445 ac_cv_search_clock_gettime=$ac_res
11447 rm -f core conftest.err conftest.$ac_objext \
11449 if ${ac_cv_search_clock_gettime+:} false; then :
11453 if ${ac_cv_search_clock_gettime+:} false; then :
11456 ac_cv_search_clock_gettime=no
11458 rm conftest.$ac_ext
11459 LIBS=$ac_func_search_save_LIBS
11461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11462 $as_echo "$ac_cv_search_clock_gettime" >&6; }
11463 ac_res=$ac_cv_search_clock_gettime
11464 if test "$ac_res" != no; then :
11465 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
11471 $as_echo_n "checking for library containing fdatasync... " >&6; }
11472 if ${ac_cv_search_fdatasync+:} false; then :
11473 $as_echo_n "(cached) " >&6
11475 ac_func_search_save_LIBS=$LIBS
11476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11477 /* end confdefs.h. */
11479 /* Override any GCC internal prototype to avoid an error.
11480 Use char because int might match the return type of a GCC
11481 builtin and then its argument prototype would still apply. */
11489 return fdatasync ();
11494 for ac_lib in '' rt posix4; do
11495 if test -z "$ac_lib"; then
11496 ac_res="none required"
11499 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11501 if ac_fn_c_try_link "$LINENO"; then :
11502 ac_cv_search_fdatasync=$ac_res
11504 rm -f core conftest.err conftest.$ac_objext \
11506 if ${ac_cv_search_fdatasync+:} false; then :
11510 if ${ac_cv_search_fdatasync+:} false; then :
11513 ac_cv_search_fdatasync=no
11515 rm conftest.$ac_ext
11516 LIBS=$ac_func_search_save_LIBS
11518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
11519 $as_echo "$ac_cv_search_fdatasync" >&6; }
11520 ac_res=$ac_cv_search_fdatasync
11521 if test "$ac_res" != no; then :
11522 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11526 # Required for thread_test.c on Solaris
11527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
11528 $as_echo_n "checking for library containing sched_yield... " >&6; }
11529 if ${ac_cv_search_sched_yield+:} false; then :
11530 $as_echo_n "(cached) " >&6
11532 ac_func_search_save_LIBS=$LIBS
11533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11534 /* end confdefs.h. */
11536 /* Override any GCC internal prototype to avoid an error.
11537 Use char because int might match the return type of a GCC
11538 builtin and then its argument prototype would still apply. */
11542 char sched_yield ();
11546 return sched_yield ();
11551 for ac_lib in '' rt; do
11552 if test -z "$ac_lib"; then
11553 ac_res="none required"
11556 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11558 if ac_fn_c_try_link "$LINENO"; then :
11559 ac_cv_search_sched_yield=$ac_res
11561 rm -f core conftest.err conftest.$ac_objext \
11563 if ${ac_cv_search_sched_yield+:} false; then :
11567 if ${ac_cv_search_sched_yield+:} false; then :
11570 ac_cv_search_sched_yield=no
11572 rm conftest.$ac_ext
11573 LIBS=$ac_func_search_save_LIBS
11575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
11576 $as_echo "$ac_cv_search_sched_yield" >&6; }
11577 ac_res=$ac_cv_search_sched_yield
11578 if test "$ac_res" != no; then :
11579 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11583 # Required for thread_test.c on Solaris 2.5:
11584 # Other ports use it too (HP-UX) so test unconditionally
11585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
11586 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
11587 if ${ac_cv_search_gethostbyname_r+:} false; then :
11588 $as_echo_n "(cached) " >&6
11590 ac_func_search_save_LIBS=$LIBS
11591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11592 /* end confdefs.h. */
11594 /* Override any GCC internal prototype to avoid an error.
11595 Use char because int might match the return type of a GCC
11596 builtin and then its argument prototype would still apply. */
11600 char gethostbyname_r ();
11604 return gethostbyname_r ();
11609 for ac_lib in '' nsl; do
11610 if test -z "$ac_lib"; then
11611 ac_res="none required"
11614 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11616 if ac_fn_c_try_link "$LINENO"; then :
11617 ac_cv_search_gethostbyname_r=$ac_res
11619 rm -f core conftest.err conftest.$ac_objext \
11621 if ${ac_cv_search_gethostbyname_r+:} false; then :
11625 if ${ac_cv_search_gethostbyname_r+:} false; then :
11628 ac_cv_search_gethostbyname_r=no
11630 rm conftest.$ac_ext
11631 LIBS=$ac_func_search_save_LIBS
11633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
11634 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
11635 ac_res=$ac_cv_search_gethostbyname_r
11636 if test "$ac_res" != no; then :
11637 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
11643 $as_echo_n "checking for library containing shmget... " >&6; }
11644 if ${ac_cv_search_shmget+:} false; then :
11645 $as_echo_n "(cached) " >&6
11647 ac_func_search_save_LIBS=$LIBS
11648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11649 /* end confdefs.h. */
11651 /* Override any GCC internal prototype to avoid an error.
11652 Use char because int might match the return type of a GCC
11653 builtin and then its argument prototype would still apply. */
11666 for ac_lib in '' cygipc; do
11667 if test -z "$ac_lib"; then
11668 ac_res="none required"
11671 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11673 if ac_fn_c_try_link "$LINENO"; then :
11674 ac_cv_search_shmget=$ac_res
11676 rm -f core conftest.err conftest.$ac_objext \
11678 if ${ac_cv_search_shmget+:} false; then :
11682 if ${ac_cv_search_shmget+:} false; then :
11685 ac_cv_search_shmget=no
11687 rm conftest.$ac_ext
11688 LIBS=$ac_func_search_save_LIBS
11690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
11691 $as_echo "$ac_cv_search_shmget" >&6; }
11692 ac_res=$ac_cv_search_shmget
11693 if test "$ac_res" != no; then :
11694 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11699 if test "$with_readline" = yes; then
11702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
11703 $as_echo_n "checking for library containing readline... " >&6; }
11704 if ${pgac_cv_check_readline+:} false; then :
11705 $as_echo_n "(cached) " >&6
11707 pgac_cv_check_readline=no
11708 pgac_save_LIBS=$LIBS
11709 if test x"$with_libedit_preferred" != x"yes"
11710 then READLINE_ORDER="-lreadline -ledit"
11711 else READLINE_ORDER="-ledit -lreadline"
11713 for pgac_rllib in $READLINE_ORDER ; do
11714 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
11715 LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
11716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11717 /* end confdefs.h. */
11719 /* Override any GCC internal prototype to avoid an error.
11720 Use char because int might match the return type of a GCC
11721 builtin and then its argument prototype would still apply. */
11729 return readline ();
11734 if ac_fn_c_try_link "$LINENO"; then :
11736 # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
11737 # recognize dependent libraries; assume curses is needed if we didn't
11738 # find any dependency.
11740 netbsd* | openbsd* | irix*)
11741 if test x"$pgac_lib" = x"" ; then
11742 pgac_lib=" -lcurses"
11746 pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
11750 rm -f core conftest.err conftest.$ac_objext \
11751 conftest$ac_exeext conftest.$ac_ext
11753 if test "$pgac_cv_check_readline" != no ; then
11757 LIBS=$pgac_save_LIBS
11760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
11761 $as_echo "$pgac_cv_check_readline" >&6; }
11762 if test "$pgac_cv_check_readline" != no ; then
11763 LIBS="$pgac_cv_check_readline $LIBS"
11765 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
11770 if test x"$pgac_cv_check_readline" = x"no"; then
11771 as_fn_error $? "readline library not found
11772 If you have readline already installed, see config.log for details on the
11773 failure. It is possible the compiler isn't looking in the proper directory.
11774 Use --without-readline to disable readline support." "$LINENO" 5
11778 if test "$with_zlib" = yes; then
11779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
11780 $as_echo_n "checking for inflate in -lz... " >&6; }
11781 if ${ac_cv_lib_z_inflate+:} false; then :
11782 $as_echo_n "(cached) " >&6
11784 ac_check_lib_save_LIBS=$LIBS
11786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11787 /* end confdefs.h. */
11789 /* Override any GCC internal prototype to avoid an error.
11790 Use char because int might match the return type of a GCC
11791 builtin and then its argument prototype would still apply. */
11804 if ac_fn_c_try_link "$LINENO"; then :
11805 ac_cv_lib_z_inflate=yes
11807 ac_cv_lib_z_inflate=no
11809 rm -f core conftest.err conftest.$ac_objext \
11810 conftest$ac_exeext conftest.$ac_ext
11811 LIBS=$ac_check_lib_save_LIBS
11813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
11814 $as_echo "$ac_cv_lib_z_inflate" >&6; }
11815 if test "x$ac_cv_lib_z_inflate" = xyes; then :
11816 cat >>confdefs.h <<_ACEOF
11817 #define HAVE_LIBZ 1
11823 as_fn_error $? "zlib library not found
11824 If you have zlib already installed, see config.log for details on the
11825 failure. It is possible the compiler isn't looking in the proper directory.
11826 Use --without-zlib to disable zlib support." "$LINENO" 5
11831 if test "$enable_spinlocks" = yes; then
11833 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
11836 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11837 *** Not using spinlocks will cause poor performance." >&5
11838 $as_echo "$as_me: WARNING:
11839 *** Not using spinlocks will cause poor performance." >&2;}
11842 if test "$enable_atomics" = yes; then
11844 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
11847 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11848 *** Not using atomic operations will cause poor performance." >&5
11849 $as_echo "$as_me: WARNING:
11850 *** Not using atomic operations will cause poor performance." >&2;}
11853 if test "$with_gssapi" = yes ; then
11854 if test "$PORTNAME" != "win32"; then
11855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
11856 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
11857 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11858 $as_echo_n "(cached) " >&6
11860 ac_func_search_save_LIBS=$LIBS
11861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11862 /* end confdefs.h. */
11864 /* Override any GCC internal prototype to avoid an error.
11865 Use char because int might match the return type of a GCC
11866 builtin and then its argument prototype would still apply. */
11870 char gss_init_sec_context ();
11874 return gss_init_sec_context ();
11879 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
11880 if test -z "$ac_lib"; then
11881 ac_res="none required"
11884 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11886 if ac_fn_c_try_link "$LINENO"; then :
11887 ac_cv_search_gss_init_sec_context=$ac_res
11889 rm -f core conftest.err conftest.$ac_objext \
11891 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11895 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11898 ac_cv_search_gss_init_sec_context=no
11900 rm conftest.$ac_ext
11901 LIBS=$ac_func_search_save_LIBS
11903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
11904 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
11905 ac_res=$ac_cv_search_gss_init_sec_context
11906 if test "$ac_res" != no; then :
11907 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11910 as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
11914 LIBS="$LIBS -lgssapi32"
11918 if test "$with_openssl" = yes ; then
11919 if test "$PORTNAME" != "win32"; then
11920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
11921 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
11922 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
11923 $as_echo_n "(cached) " >&6
11925 ac_check_lib_save_LIBS=$LIBS
11926 LIBS="-lcrypto $LIBS"
11927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11928 /* end confdefs.h. */
11930 /* Override any GCC internal prototype to avoid an error.
11931 Use char because int might match the return type of a GCC
11932 builtin and then its argument prototype would still apply. */
11936 char CRYPTO_new_ex_data ();
11940 return CRYPTO_new_ex_data ();
11945 if ac_fn_c_try_link "$LINENO"; then :
11946 ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
11948 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
11950 rm -f core conftest.err conftest.$ac_objext \
11951 conftest$ac_exeext conftest.$ac_ext
11952 LIBS=$ac_check_lib_save_LIBS
11954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
11955 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
11956 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
11957 cat >>confdefs.h <<_ACEOF
11958 #define HAVE_LIBCRYPTO 1
11961 LIBS="-lcrypto $LIBS"
11964 as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
11967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
11968 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
11969 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
11970 $as_echo_n "(cached) " >&6
11972 ac_check_lib_save_LIBS=$LIBS
11974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11975 /* end confdefs.h. */
11977 /* Override any GCC internal prototype to avoid an error.
11978 Use char because int might match the return type of a GCC
11979 builtin and then its argument prototype would still apply. */
11992 if ac_fn_c_try_link "$LINENO"; then :
11993 ac_cv_lib_ssl_SSL_new=yes
11995 ac_cv_lib_ssl_SSL_new=no
11997 rm -f core conftest.err conftest.$ac_objext \
11998 conftest$ac_exeext conftest.$ac_ext
11999 LIBS=$ac_check_lib_save_LIBS
12001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
12002 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
12003 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
12004 cat >>confdefs.h <<_ACEOF
12005 #define HAVE_LIBSSL 1
12011 as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
12015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
12016 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
12017 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12018 $as_echo_n "(cached) " >&6
12020 ac_func_search_save_LIBS=$LIBS
12021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12022 /* end confdefs.h. */
12024 /* Override any GCC internal prototype to avoid an error.
12025 Use char because int might match the return type of a GCC
12026 builtin and then its argument prototype would still apply. */
12030 char CRYPTO_new_ex_data ();
12034 return CRYPTO_new_ex_data ();
12039 for ac_lib in '' eay32 crypto; do
12040 if test -z "$ac_lib"; then
12041 ac_res="none required"
12044 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12046 if ac_fn_c_try_link "$LINENO"; then :
12047 ac_cv_search_CRYPTO_new_ex_data=$ac_res
12049 rm -f core conftest.err conftest.$ac_objext \
12051 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12055 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12058 ac_cv_search_CRYPTO_new_ex_data=no
12060 rm conftest.$ac_ext
12061 LIBS=$ac_func_search_save_LIBS
12063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
12064 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
12065 ac_res=$ac_cv_search_CRYPTO_new_ex_data
12066 if test "$ac_res" != no; then :
12067 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12070 as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
12073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
12074 $as_echo_n "checking for library containing SSL_new... " >&6; }
12075 if ${ac_cv_search_SSL_new+:} false; then :
12076 $as_echo_n "(cached) " >&6
12078 ac_func_search_save_LIBS=$LIBS
12079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12080 /* end confdefs.h. */
12082 /* Override any GCC internal prototype to avoid an error.
12083 Use char because int might match the return type of a GCC
12084 builtin and then its argument prototype would still apply. */
12097 for ac_lib in '' ssleay32 ssl; do
12098 if test -z "$ac_lib"; then
12099 ac_res="none required"
12102 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12104 if ac_fn_c_try_link "$LINENO"; then :
12105 ac_cv_search_SSL_new=$ac_res
12107 rm -f core conftest.err conftest.$ac_objext \
12109 if ${ac_cv_search_SSL_new+:} false; then :
12113 if ${ac_cv_search_SSL_new+:} false; then :
12116 ac_cv_search_SSL_new=no
12118 rm conftest.$ac_ext
12119 LIBS=$ac_func_search_save_LIBS
12121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12122 $as_echo "$ac_cv_search_SSL_new" >&6; }
12123 ac_res=$ac_cv_search_SSL_new
12124 if test "$ac_res" != no; then :
12125 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12128 as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12132 for ac_func in SSL_clear_options SSL_get_current_compression X509_get_signature_nid
12134 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12135 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12136 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12137 cat >>confdefs.h <<_ACEOF
12138 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12144 # Functions introduced in OpenSSL 1.1.0. We used to check for
12145 # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
12146 # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
12147 # doesn't have these OpenSSL 1.1.0 functions. So check for individual
12149 for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL
12151 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12152 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12153 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12154 cat >>confdefs.h <<_ACEOF
12155 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12161 # OpenSSL versions before 1.1.0 required setting callback functions, for
12162 # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
12163 # function was removed.
12164 for ac_func in CRYPTO_lock
12166 ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
12167 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
12168 cat >>confdefs.h <<_ACEOF
12169 #define HAVE_CRYPTO_LOCK 1
12177 if test "$with_pam" = yes ; then
12178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
12179 $as_echo_n "checking for pam_start in -lpam... " >&6; }
12180 if ${ac_cv_lib_pam_pam_start+:} false; then :
12181 $as_echo_n "(cached) " >&6
12183 ac_check_lib_save_LIBS=$LIBS
12185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12186 /* end confdefs.h. */
12188 /* Override any GCC internal prototype to avoid an error.
12189 Use char because int might match the return type of a GCC
12190 builtin and then its argument prototype would still apply. */
12198 return pam_start ();
12203 if ac_fn_c_try_link "$LINENO"; then :
12204 ac_cv_lib_pam_pam_start=yes
12206 ac_cv_lib_pam_pam_start=no
12208 rm -f core conftest.err conftest.$ac_objext \
12209 conftest$ac_exeext conftest.$ac_ext
12210 LIBS=$ac_check_lib_save_LIBS
12212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
12213 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
12214 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
12215 cat >>confdefs.h <<_ACEOF
12216 #define HAVE_LIBPAM 1
12222 as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
12227 if test "$with_libxml" = yes ; then
12228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
12229 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
12230 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
12231 $as_echo_n "(cached) " >&6
12233 ac_check_lib_save_LIBS=$LIBS
12234 LIBS="-lxml2 $LIBS"
12235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12236 /* end confdefs.h. */
12238 /* Override any GCC internal prototype to avoid an error.
12239 Use char because int might match the return type of a GCC
12240 builtin and then its argument prototype would still apply. */
12244 char xmlSaveToBuffer ();
12248 return xmlSaveToBuffer ();
12253 if ac_fn_c_try_link "$LINENO"; then :
12254 ac_cv_lib_xml2_xmlSaveToBuffer=yes
12256 ac_cv_lib_xml2_xmlSaveToBuffer=no
12258 rm -f core conftest.err conftest.$ac_objext \
12259 conftest$ac_exeext conftest.$ac_ext
12260 LIBS=$ac_check_lib_save_LIBS
12262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
12263 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
12264 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
12265 cat >>confdefs.h <<_ACEOF
12266 #define HAVE_LIBXML2 1
12269 LIBS="-lxml2 $LIBS"
12272 as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
12277 if test "$with_libxslt" = yes ; then
12278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
12279 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
12280 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
12281 $as_echo_n "(cached) " >&6
12283 ac_check_lib_save_LIBS=$LIBS
12284 LIBS="-lxslt $LIBS"
12285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12286 /* end confdefs.h. */
12288 /* Override any GCC internal prototype to avoid an error.
12289 Use char because int might match the return type of a GCC
12290 builtin and then its argument prototype would still apply. */
12294 char xsltCleanupGlobals ();
12298 return xsltCleanupGlobals ();
12303 if ac_fn_c_try_link "$LINENO"; then :
12304 ac_cv_lib_xslt_xsltCleanupGlobals=yes
12306 ac_cv_lib_xslt_xsltCleanupGlobals=no
12308 rm -f core conftest.err conftest.$ac_objext \
12309 conftest$ac_exeext conftest.$ac_ext
12310 LIBS=$ac_check_lib_save_LIBS
12312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
12313 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
12314 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
12315 cat >>confdefs.h <<_ACEOF
12316 #define HAVE_LIBXSLT 1
12319 LIBS="-lxslt $LIBS"
12322 as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
12327 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
12328 if test "$with_ldap" = yes ; then
12330 if test "$PORTNAME" != "win32"; then
12331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12332 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12333 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12334 $as_echo_n "(cached) " >&6
12336 ac_check_lib_save_LIBS=$LIBS
12337 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12339 /* end confdefs.h. */
12341 /* Override any GCC internal prototype to avoid an error.
12342 Use char because int might match the return type of a GCC
12343 builtin and then its argument prototype would still apply. */
12351 return ldap_bind ();
12356 if ac_fn_c_try_link "$LINENO"; then :
12357 ac_cv_lib_ldap_ldap_bind=yes
12359 ac_cv_lib_ldap_ldap_bind=no
12361 rm -f core conftest.err conftest.$ac_objext \
12362 conftest$ac_exeext conftest.$ac_ext
12363 LIBS=$ac_check_lib_save_LIBS
12365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12366 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12367 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12368 cat >>confdefs.h <<_ACEOF
12369 #define HAVE_LIBLDAP 1
12372 LIBS="-lldap $LIBS"
12375 as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12378 LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12379 if test "$enable_thread_safety" = yes; then
12380 # on some platforms ldap_r fails to link without PTHREAD_LIBS
12381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
12382 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
12383 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
12384 $as_echo_n "(cached) " >&6
12386 ac_check_lib_save_LIBS=$LIBS
12387 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12389 /* end confdefs.h. */
12391 /* Override any GCC internal prototype to avoid an error.
12392 Use char because int might match the return type of a GCC
12393 builtin and then its argument prototype would still apply. */
12397 char ldap_simple_bind ();
12401 return ldap_simple_bind ();
12406 if ac_fn_c_try_link "$LINENO"; then :
12407 ac_cv_lib_ldap_r_ldap_simple_bind=yes
12409 ac_cv_lib_ldap_r_ldap_simple_bind=no
12411 rm -f core conftest.err conftest.$ac_objext \
12412 conftest$ac_exeext conftest.$ac_ext
12413 LIBS=$ac_check_lib_save_LIBS
12415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
12416 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
12417 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
12418 cat >>confdefs.h <<_ACEOF
12419 #define HAVE_LIBLDAP_R 1
12422 LIBS="-lldap_r $LIBS"
12425 as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
12428 LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12430 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12432 for ac_func in ldap_initialize
12434 ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
12435 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
12436 cat >>confdefs.h <<_ACEOF
12437 #define HAVE_LDAP_INITIALIZE 1
12444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12445 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12446 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12447 $as_echo_n "(cached) " >&6
12449 ac_check_lib_save_LIBS=$LIBS
12450 LIBS="-lwldap32 $LIBS"
12451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12452 /* end confdefs.h. */
12454 /* Override any GCC internal prototype to avoid an error.
12455 Use char because int might match the return type of a GCC
12456 builtin and then its argument prototype would still apply. */
12464 return ldap_bind ();
12469 if ac_fn_c_try_link "$LINENO"; then :
12470 ac_cv_lib_wldap32_ldap_bind=yes
12472 ac_cv_lib_wldap32_ldap_bind=no
12474 rm -f core conftest.err conftest.$ac_objext \
12475 conftest$ac_exeext conftest.$ac_ext
12476 LIBS=$ac_check_lib_save_LIBS
12478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12479 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12480 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12481 cat >>confdefs.h <<_ACEOF
12482 #define HAVE_LIBWLDAP32 1
12485 LIBS="-lwldap32 $LIBS"
12488 as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
12491 LDAP_LIBS_FE="-lwldap32"
12492 LDAP_LIBS_BE="-lwldap32"
12499 # for contrib/sepgsql
12500 if test "$with_selinux" = yes; then
12501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
12502 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
12503 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
12504 $as_echo_n "(cached) " >&6
12506 ac_check_lib_save_LIBS=$LIBS
12507 LIBS="-lselinux $LIBS"
12508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12509 /* end confdefs.h. */
12511 /* Override any GCC internal prototype to avoid an error.
12512 Use char because int might match the return type of a GCC
12513 builtin and then its argument prototype would still apply. */
12517 char security_compute_create_name ();
12521 return security_compute_create_name ();
12526 if ac_fn_c_try_link "$LINENO"; then :
12527 ac_cv_lib_selinux_security_compute_create_name=yes
12529 ac_cv_lib_selinux_security_compute_create_name=no
12531 rm -f core conftest.err conftest.$ac_objext \
12532 conftest$ac_exeext conftest.$ac_ext
12533 LIBS=$ac_check_lib_save_LIBS
12535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
12536 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
12537 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
12538 cat >>confdefs.h <<_ACEOF
12539 #define HAVE_LIBSELINUX 1
12542 LIBS="-lselinux $LIBS"
12545 as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
12550 # for contrib/uuid-ossp
12551 if test "$with_uuid" = bsd ; then
12552 # On BSD, the UUID functions are in libc
12553 ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
12554 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
12557 as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
12560 elif test "$with_uuid" = e2fs ; then
12561 # On macOS, the UUID functions are in libc
12562 ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
12563 if test "x$ac_cv_func_uuid_generate" = xyes; then :
12566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
12567 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
12568 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
12569 $as_echo_n "(cached) " >&6
12571 ac_check_lib_save_LIBS=$LIBS
12572 LIBS="-luuid $LIBS"
12573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12574 /* end confdefs.h. */
12576 /* Override any GCC internal prototype to avoid an error.
12577 Use char because int might match the return type of a GCC
12578 builtin and then its argument prototype would still apply. */
12582 char uuid_generate ();
12586 return uuid_generate ();
12591 if ac_fn_c_try_link "$LINENO"; then :
12592 ac_cv_lib_uuid_uuid_generate=yes
12594 ac_cv_lib_uuid_uuid_generate=no
12596 rm -f core conftest.err conftest.$ac_objext \
12597 conftest$ac_exeext conftest.$ac_ext
12598 LIBS=$ac_check_lib_save_LIBS
12600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
12601 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
12602 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
12605 as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
12610 elif test "$with_uuid" = ossp ; then
12611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
12612 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
12613 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
12614 $as_echo_n "(cached) " >&6
12616 ac_check_lib_save_LIBS=$LIBS
12617 LIBS="-lossp-uuid $LIBS"
12618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12619 /* end confdefs.h. */
12621 /* Override any GCC internal prototype to avoid an error.
12622 Use char because int might match the return type of a GCC
12623 builtin and then its argument prototype would still apply. */
12627 char uuid_export ();
12631 return uuid_export ();
12636 if ac_fn_c_try_link "$LINENO"; then :
12637 ac_cv_lib_ossp_uuid_uuid_export=yes
12639 ac_cv_lib_ossp_uuid_uuid_export=no
12641 rm -f core conftest.err conftest.$ac_objext \
12642 conftest$ac_exeext conftest.$ac_ext
12643 LIBS=$ac_check_lib_save_LIBS
12645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
12646 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
12647 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
12648 UUID_LIBS="-lossp-uuid"
12650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
12651 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
12652 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
12653 $as_echo_n "(cached) " >&6
12655 ac_check_lib_save_LIBS=$LIBS
12656 LIBS="-luuid $LIBS"
12657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12658 /* end confdefs.h. */
12660 /* Override any GCC internal prototype to avoid an error.
12661 Use char because int might match the return type of a GCC
12662 builtin and then its argument prototype would still apply. */
12666 char uuid_export ();
12670 return uuid_export ();
12675 if ac_fn_c_try_link "$LINENO"; then :
12676 ac_cv_lib_uuid_uuid_export=yes
12678 ac_cv_lib_uuid_uuid_export=no
12680 rm -f core conftest.err conftest.$ac_objext \
12681 conftest$ac_exeext conftest.$ac_ext
12682 LIBS=$ac_check_lib_save_LIBS
12684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
12685 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
12686 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
12689 as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
12702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
12703 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
12704 if ${ac_cv_header_stdbool_h+:} false; then :
12705 $as_echo_n "(cached) " >&6
12707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12708 /* end confdefs.h. */
12710 #include <stdbool.h>
12712 "error: bool is not defined"
12715 "error: false is not defined"
12718 "error: false is not 0"
12721 "error: true is not defined"
12724 "error: true is not 1"
12726 #ifndef __bool_true_false_are_defined
12727 "error: __bool_true_false_are_defined is not defined"
12730 struct s { _Bool s: 1; _Bool t; } s;
12732 char a[true == 1 ? 1 : -1];
12733 char b[false == 0 ? 1 : -1];
12734 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
12735 char d[(bool) 0.5 == true ? 1 : -1];
12736 /* See body of main program for 'e'. */
12737 char f[(_Bool) 0.0 == false ? 1 : -1];
12739 char h[sizeof (_Bool)];
12740 char i[sizeof s.t];
12741 enum { j = false, k = true, l = false * true, m = true * 256 };
12742 /* The following fails for
12743 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
12745 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
12746 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
12747 /* Catch a bug in an HP-UX C compiler. See
12748 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
12749 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
12761 /* Refer to every declared value, to avoid compiler optimizations. */
12762 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
12763 + !m + !n + !o + !p + !q + !pq);
12769 if ac_fn_c_try_compile "$LINENO"; then :
12770 ac_cv_header_stdbool_h=yes
12772 ac_cv_header_stdbool_h=no
12774 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
12777 $as_echo "$ac_cv_header_stdbool_h" >&6; }
12778 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
12779 if test "x$ac_cv_type__Bool" = xyes; then :
12781 cat >>confdefs.h <<_ACEOF
12782 #define HAVE__BOOL 1
12789 if test $ac_cv_header_stdbool_h = yes; then
12791 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
12796 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
12798 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12799 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12800 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12801 cat >>confdefs.h <<_ACEOF
12802 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12810 # On BSD, test for net/if.h will fail unless sys/socket.h
12811 # is included first.
12812 for ac_header in net/if.h
12814 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
12815 #include <sys/socket.h>
12818 if test "x$ac_cv_header_net_if_h" = xyes; then :
12819 cat >>confdefs.h <<_ACEOF
12820 #define HAVE_NET_IF_H 1
12828 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
12829 # is included first.
12830 for ac_header in sys/ucred.h
12832 ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
12833 #include <sys/param.h>
12836 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
12837 cat >>confdefs.h <<_ACEOF
12838 #define HAVE_SYS_UCRED_H 1
12846 # At least on IRIX, test for netinet/tcp.h will fail unless
12847 # netinet/in.h is included first.
12848 for ac_header in netinet/tcp.h
12850 ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
12851 #include <netinet/in.h>
12854 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
12855 cat >>confdefs.h <<_ACEOF
12856 #define HAVE_NETINET_TCP_H 1
12864 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
12865 for ac_header in readline/readline.h
12867 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12868 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12869 cat >>confdefs.h <<_ACEOF
12870 #define HAVE_READLINE_READLINE_H 1
12874 for ac_header in readline.h
12876 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12877 if test "x$ac_cv_header_readline_h" = xyes; then :
12878 cat >>confdefs.h <<_ACEOF
12879 #define HAVE_READLINE_H 1
12883 as_fn_error $? "readline header not found
12884 If you have readline already installed, see config.log for details on the
12885 failure. It is possible the compiler isn't looking in the proper directory.
12886 Use --without-readline to disable readline support." "$LINENO" 5
12895 for ac_header in readline/history.h
12897 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
12898 if test "x$ac_cv_header_readline_history_h" = xyes; then :
12899 cat >>confdefs.h <<_ACEOF
12900 #define HAVE_READLINE_HISTORY_H 1
12904 for ac_header in history.h
12906 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12907 if test "x$ac_cv_header_history_h" = xyes; then :
12908 cat >>confdefs.h <<_ACEOF
12909 #define HAVE_HISTORY_H 1
12913 as_fn_error $? "history header not found
12914 If you have readline already installed, see config.log for details on the
12915 failure. It is possible the compiler isn't looking in the proper directory.
12916 Use --without-readline to disable readline support." "$LINENO" 5
12927 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
12928 # Some installations of libedit usurp /usr/include/readline/, which seems
12929 # bad practice, since in combined installations readline will have its headers
12930 # there. We might have to resort to AC_EGREP checks to make sure we found
12931 # the proper header...
12932 for ac_header in editline/readline.h
12934 ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
12935 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
12936 cat >>confdefs.h <<_ACEOF
12937 #define HAVE_EDITLINE_READLINE_H 1
12941 for ac_header in readline.h
12943 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12944 if test "x$ac_cv_header_readline_h" = xyes; then :
12945 cat >>confdefs.h <<_ACEOF
12946 #define HAVE_READLINE_H 1
12950 for ac_header in readline/readline.h
12952 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12953 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12954 cat >>confdefs.h <<_ACEOF
12955 #define HAVE_READLINE_READLINE_H 1
12959 as_fn_error $? "readline header not found
12960 If you have libedit already installed, see config.log for details on the
12961 failure. It is possible the compiler isn't looking in the proper directory.
12962 Use --without-readline to disable libedit support." "$LINENO" 5
12975 # Note: in a libedit installation, history.h is sometimes a dummy, and may
12976 # not be there at all. Hence, don't complain if not found. We must check
12977 # though, since in yet other versions it is an independent header.
12978 for ac_header in editline/history.h
12980 ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
12981 if test "x$ac_cv_header_editline_history_h" = xyes; then :
12982 cat >>confdefs.h <<_ACEOF
12983 #define HAVE_EDITLINE_HISTORY_H 1
12987 for ac_header in history.h
12989 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12990 if test "x$ac_cv_header_history_h" = xyes; then :
12991 cat >>confdefs.h <<_ACEOF
12992 #define HAVE_HISTORY_H 1
12996 for ac_header in readline/history.h
12998 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
12999 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13000 cat >>confdefs.h <<_ACEOF
13001 #define HAVE_READLINE_HISTORY_H 1
13018 if test "$with_zlib" = yes; then
13019 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
13020 if test "x$ac_cv_header_zlib_h" = xyes; then :
13023 as_fn_error $? "zlib header not found
13024 If you have zlib already installed, see config.log for details on the
13025 failure. It is possible the compiler isn't looking in the proper directory.
13026 Use --without-zlib to disable zlib support." "$LINENO" 5
13032 if test "$with_gssapi" = yes ; then
13033 for ac_header in gssapi/gssapi.h
13035 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
13036 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
13037 cat >>confdefs.h <<_ACEOF
13038 #define HAVE_GSSAPI_GSSAPI_H 1
13042 for ac_header in gssapi.h
13044 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
13045 if test "x$ac_cv_header_gssapi_h" = xyes; then :
13046 cat >>confdefs.h <<_ACEOF
13047 #define HAVE_GSSAPI_H 1
13051 as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
13062 if test "$with_openssl" = yes ; then
13063 ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
13064 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
13067 as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
13071 ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
13072 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
13075 as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
13081 if test "$with_pam" = yes ; then
13082 for ac_header in security/pam_appl.h
13084 ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
13085 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
13086 cat >>confdefs.h <<_ACEOF
13087 #define HAVE_SECURITY_PAM_APPL_H 1
13091 for ac_header in pam/pam_appl.h
13093 ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
13094 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
13095 cat >>confdefs.h <<_ACEOF
13096 #define HAVE_PAM_PAM_APPL_H 1
13100 as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
13111 if test "$with_bsd_auth" = yes ; then
13112 ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
13113 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
13116 as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
13122 if test "$with_systemd" = yes ; then
13123 ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
13124 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
13127 as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
13133 if test "$with_libxml" = yes ; then
13134 ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
13135 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
13138 as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
13144 if test "$with_libxslt" = yes ; then
13145 ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
13146 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
13149 as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
13155 if test "$with_ldap" = yes ; then
13156 if test "$PORTNAME" != "win32"; then
13157 for ac_header in ldap.h
13159 ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
13160 if test "x$ac_cv_header_ldap_h" = xyes; then :
13161 cat >>confdefs.h <<_ACEOF
13162 #define HAVE_LDAP_H 1
13166 as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
13171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
13172 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
13173 if ${pgac_cv_ldap_safe+:} false; then :
13174 $as_echo_n "(cached) " >&6
13176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13177 /* end confdefs.h. */
13179 #if !defined(LDAP_VENDOR_VERSION) || \
13180 (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
13181 LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
13192 if ac_fn_c_try_compile "$LINENO"; then :
13193 pgac_cv_ldap_safe=yes
13195 pgac_cv_ldap_safe=no
13197 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
13200 $as_echo "$pgac_cv_ldap_safe" >&6; }
13202 if test "$pgac_cv_ldap_safe" != yes; then
13203 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
13204 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13205 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13206 *** also uses LDAP will crash on exit." >&5
13207 $as_echo "$as_me: WARNING:
13208 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13209 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13210 *** also uses LDAP will crash on exit." >&2;}
13213 for ac_header in winldap.h
13215 ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
13216 #include <windows.h>
13219 if test "x$ac_cv_header_winldap_h" = xyes; then :
13220 cat >>confdefs.h <<_ACEOF
13221 #define HAVE_WINLDAP_H 1
13225 as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
13233 if test "$with_bonjour" = yes ; then
13234 ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
13235 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
13238 as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
13244 # for contrib/uuid-ossp
13245 if test "$with_uuid" = bsd ; then
13246 for ac_header in uuid.h
13248 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13249 if test "x$ac_cv_header_uuid_h" = xyes; then :
13250 cat >>confdefs.h <<_ACEOF
13251 #define HAVE_UUID_H 1
13253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13254 /* end confdefs.h. */
13258 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13259 $EGREP "uuid_to_string" >/dev/null 2>&1; then :
13262 as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
13267 as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
13272 elif test "$with_uuid" = e2fs ; then
13273 for ac_header in uuid/uuid.h
13275 ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
13276 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
13277 cat >>confdefs.h <<_ACEOF
13278 #define HAVE_UUID_UUID_H 1
13280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13281 /* end confdefs.h. */
13282 #include <uuid/uuid.h>
13285 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13286 $EGREP "uuid_generate" >/dev/null 2>&1; then :
13289 as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
13294 for ac_header in uuid.h
13296 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13297 if test "x$ac_cv_header_uuid_h" = xyes; then :
13298 cat >>confdefs.h <<_ACEOF
13299 #define HAVE_UUID_H 1
13301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13302 /* end confdefs.h. */
13306 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13307 $EGREP "uuid_generate" >/dev/null 2>&1; then :
13310 as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
13315 as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
13324 elif test "$with_uuid" = ossp ; then
13325 for ac_header in ossp/uuid.h
13327 ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
13328 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
13329 cat >>confdefs.h <<_ACEOF
13330 #define HAVE_OSSP_UUID_H 1
13332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13333 /* end confdefs.h. */
13334 #include <ossp/uuid.h>
13337 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13338 $EGREP "uuid_export" >/dev/null 2>&1; then :
13341 as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
13346 for ac_header in uuid.h
13348 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13349 if test "x$ac_cv_header_uuid_h" = xyes; then :
13350 cat >>confdefs.h <<_ACEOF
13351 #define HAVE_UUID_H 1
13353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13354 /* end confdefs.h. */
13358 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13359 $EGREP "uuid_export" >/dev/null 2>&1; then :
13362 as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
13367 as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
13378 if test "$PORTNAME" = "win32" ; then
13379 for ac_header in crtdefs.h
13381 ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
13382 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
13383 cat >>confdefs.h <<_ACEOF
13384 #define HAVE_CRTDEFS_H 1
13394 ## Types, structures, compiler characteristics
13397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13398 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13399 if ${ac_cv_c_bigendian+:} false; then :
13400 $as_echo_n "(cached) " >&6
13402 ac_cv_c_bigendian=unknown
13403 # See if we're dealing with a universal compiler.
13404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13405 /* end confdefs.h. */
13406 #ifndef __APPLE_CC__
13407 not a universal capable compiler
13412 if ac_fn_c_try_compile "$LINENO"; then :
13414 # Check for potential -arch flags. It is not universal unless
13415 # there are at least two -arch flags with different values.
13418 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13419 if test -n "$ac_prev"; then
13421 i?86 | x86_64 | ppc | ppc64)
13422 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13425 ac_cv_c_bigendian=universal
13431 elif test "x$ac_word" = "x-arch"; then
13436 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13437 if test $ac_cv_c_bigendian = unknown; then
13438 # See if sys/param.h defines the BYTE_ORDER macro.
13439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13440 /* end confdefs.h. */
13441 #include <sys/types.h>
13442 #include <sys/param.h>
13447 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13448 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13450 bogus endian macros
13457 if ac_fn_c_try_compile "$LINENO"; then :
13458 # It does; now see whether it defined to BIG_ENDIAN or not.
13459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13460 /* end confdefs.h. */
13461 #include <sys/types.h>
13462 #include <sys/param.h>
13467 #if BYTE_ORDER != BIG_ENDIAN
13475 if ac_fn_c_try_compile "$LINENO"; then :
13476 ac_cv_c_bigendian=yes
13478 ac_cv_c_bigendian=no
13480 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13482 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13484 if test $ac_cv_c_bigendian = unknown; then
13485 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13487 /* end confdefs.h. */
13488 #include <limits.h>
13493 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13494 bogus endian macros
13501 if ac_fn_c_try_compile "$LINENO"; then :
13502 # It does; now see whether it defined to _BIG_ENDIAN or not.
13503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13504 /* end confdefs.h. */
13505 #include <limits.h>
13510 #ifndef _BIG_ENDIAN
13518 if ac_fn_c_try_compile "$LINENO"; then :
13519 ac_cv_c_bigendian=yes
13521 ac_cv_c_bigendian=no
13523 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13525 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13527 if test $ac_cv_c_bigendian = unknown; then
13528 # Compile a test program.
13529 if test "$cross_compiling" = yes; then :
13530 # Try to guess by grepping values from an object file.
13531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13532 /* end confdefs.h. */
13533 short int ascii_mm[] =
13534 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13535 short int ascii_ii[] =
13536 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13537 int use_ascii (int i) {
13538 return ascii_mm[i] + ascii_ii[i];
13540 short int ebcdic_ii[] =
13541 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13542 short int ebcdic_mm[] =
13543 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13544 int use_ebcdic (int i) {
13545 return ebcdic_mm[i] + ebcdic_ii[i];
13552 return use_ascii (foo) == use_ebcdic (foo);
13557 if ac_fn_c_try_compile "$LINENO"; then :
13558 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13559 ac_cv_c_bigendian=yes
13561 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13562 if test "$ac_cv_c_bigendian" = unknown; then
13563 ac_cv_c_bigendian=no
13565 # finding both strings is unlikely to happen, but who knows?
13566 ac_cv_c_bigendian=unknown
13570 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13573 /* end confdefs.h. */
13574 $ac_includes_default
13579 /* Are we little or big endian? From Harbison&Steele. */
13583 char c[sizeof (long int)];
13586 return u.c[sizeof (long int) - 1] == 1;
13592 if ac_fn_c_try_run "$LINENO"; then :
13593 ac_cv_c_bigendian=no
13595 ac_cv_c_bigendian=yes
13597 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13598 conftest.$ac_objext conftest.beam conftest.$ac_ext
13603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13604 $as_echo "$ac_cv_c_bigendian" >&6; }
13605 case $ac_cv_c_bigendian in #(
13607 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13613 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13617 as_fn_error $? "unknown endianness
13618 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
13622 $as_echo_n "checking for inline... " >&6; }
13623 if ${ac_cv_c_inline+:} false; then :
13624 $as_echo_n "(cached) " >&6
13627 for ac_kw in inline __inline__ __inline; do
13628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13629 /* end confdefs.h. */
13630 #ifndef __cplusplus
13632 static $ac_kw foo_t static_foo () {return 0; }
13633 $ac_kw foo_t foo () {return 0; }
13637 if ac_fn_c_try_compile "$LINENO"; then :
13638 ac_cv_c_inline=$ac_kw
13640 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13641 test "$ac_cv_c_inline" != no && break
13645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
13646 $as_echo "$ac_cv_c_inline" >&6; }
13648 case $ac_cv_c_inline in
13651 case $ac_cv_c_inline in
13653 *) ac_val=$ac_cv_c_inline;;
13655 cat >>confdefs.h <<_ACEOF
13656 #ifndef __cplusplus
13657 #define inline $ac_val
13663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
13664 $as_echo_n "checking for printf format archetype... " >&6; }
13665 if ${pgac_cv_printf_archetype+:} false; then :
13666 $as_echo_n "(cached) " >&6
13668 pgac_cv_printf_archetype=gnu_printf
13669 ac_save_c_werror_flag=$ac_c_werror_flag
13670 ac_c_werror_flag=yes
13671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13672 /* end confdefs.h. */
13673 extern void pgac_write(int ignore, const char *fmt,...)
13674 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
13678 pgac_write(0, "error %s: %m", "foo");
13683 if ac_fn_c_try_compile "$LINENO"; then :
13684 ac_archetype_ok=yes
13688 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13689 ac_c_werror_flag=$ac_save_c_werror_flag
13691 if [ "$ac_archetype_ok" = no ]; then
13692 pgac_cv_printf_archetype=__syslog__
13693 ac_save_c_werror_flag=$ac_c_werror_flag
13694 ac_c_werror_flag=yes
13695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13696 /* end confdefs.h. */
13697 extern void pgac_write(int ignore, const char *fmt,...)
13698 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
13702 pgac_write(0, "error %s: %m", "foo");
13707 if ac_fn_c_try_compile "$LINENO"; then :
13708 ac_archetype_ok=yes
13712 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13713 ac_c_werror_flag=$ac_save_c_werror_flag
13715 if [ "$ac_archetype_ok" = no ]; then
13716 pgac_cv_printf_archetype=printf
13720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
13721 $as_echo "$pgac_cv_printf_archetype" >&6; }
13723 cat >>confdefs.h <<_ACEOF
13724 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
13729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
13730 $as_echo_n "checking for flexible array members... " >&6; }
13731 if ${ac_cv_c_flexmember+:} false; then :
13732 $as_echo_n "(cached) " >&6
13734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13735 /* end confdefs.h. */
13736 #include <stdlib.h>
13738 #include <stddef.h>
13739 struct s { int n; double d[]; };
13743 int m = getchar ();
13744 struct s *p = malloc (offsetof (struct s, d)
13745 + m * sizeof (double));
13747 return p->d != (double *) NULL;
13752 if ac_fn_c_try_compile "$LINENO"; then :
13753 ac_cv_c_flexmember=yes
13755 ac_cv_c_flexmember=no
13757 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
13760 $as_echo "$ac_cv_c_flexmember" >&6; }
13761 if test $ac_cv_c_flexmember = yes; then
13763 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
13766 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
13770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
13771 $as_echo_n "checking for signed types... " >&6; }
13772 if ${pgac_cv_c_signed+:} false; then :
13773 $as_echo_n "(cached) " >&6
13775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13776 /* end confdefs.h. */
13781 signed char c; signed short s; signed int i;
13786 if ac_fn_c_try_compile "$LINENO"; then :
13787 pgac_cv_c_signed=yes
13789 pgac_cv_c_signed=no
13791 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
13794 $as_echo "$pgac_cv_c_signed" >&6; }
13795 if test x"$pgac_cv_c_signed" = xno ; then
13797 $as_echo "#define signed /**/" >>confdefs.h
13800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
13801 $as_echo_n "checking for __func__... " >&6; }
13802 if ${pgac_cv_funcname_func_support+:} false; then :
13803 $as_echo_n "(cached) " >&6
13805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13806 /* end confdefs.h. */
13811 printf("%s\n", __func__);
13816 if ac_fn_c_try_compile "$LINENO"; then :
13817 pgac_cv_funcname_func_support=yes
13819 pgac_cv_funcname_func_support=no
13821 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
13824 $as_echo "$pgac_cv_funcname_func_support" >&6; }
13825 if test x"$pgac_cv_funcname_func_support" = xyes ; then
13827 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
13830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
13831 $as_echo_n "checking for __FUNCTION__... " >&6; }
13832 if ${pgac_cv_funcname_function_support+:} false; then :
13833 $as_echo_n "(cached) " >&6
13835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13836 /* end confdefs.h. */
13841 printf("%s\n", __FUNCTION__);
13846 if ac_fn_c_try_compile "$LINENO"; then :
13847 pgac_cv_funcname_function_support=yes
13849 pgac_cv_funcname_function_support=no
13851 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
13854 $as_echo "$pgac_cv_funcname_function_support" >&6; }
13855 if test x"$pgac_cv_funcname_function_support" = xyes ; then
13857 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
13861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
13862 $as_echo_n "checking for _Static_assert... " >&6; }
13863 if ${pgac_cv__static_assert+:} false; then :
13864 $as_echo_n "(cached) " >&6
13866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13867 /* end confdefs.h. */
13872 ({ _Static_assert(1, "foo"); })
13877 if ac_fn_c_try_link "$LINENO"; then :
13878 pgac_cv__static_assert=yes
13880 pgac_cv__static_assert=no
13882 rm -f core conftest.err conftest.$ac_objext \
13883 conftest$ac_exeext conftest.$ac_ext
13885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
13886 $as_echo "$pgac_cv__static_assert" >&6; }
13887 if test x"$pgac_cv__static_assert" = xyes ; then
13889 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
13892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
13893 $as_echo_n "checking for typeof... " >&6; }
13894 if ${pgac_cv_c_typeof+:} false; then :
13895 $as_echo_n "(cached) " >&6
13897 pgac_cv_c_typeof=no
13898 for pgac_kw in typeof __typeof__ decltype; do
13899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13900 /* end confdefs.h. */
13913 if ac_fn_c_try_compile "$LINENO"; then :
13914 pgac_cv_c_typeof=$pgac_kw
13916 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13917 test "$pgac_cv_c_typeof" != no && break
13920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
13921 $as_echo "$pgac_cv_c_typeof" >&6; }
13922 if test "$pgac_cv_c_typeof" != no; then
13924 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
13926 if test "$pgac_cv_c_typeof" != typeof; then
13928 cat >>confdefs.h <<_ACEOF
13929 #define typeof $pgac_cv_c_typeof
13934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
13935 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
13936 if ${pgac_cv__types_compatible+:} false; then :
13937 $as_echo_n "(cached) " >&6
13939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13940 /* end confdefs.h. */
13945 int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
13950 if ac_fn_c_try_compile "$LINENO"; then :
13951 pgac_cv__types_compatible=yes
13953 pgac_cv__types_compatible=no
13955 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
13958 $as_echo "$pgac_cv__types_compatible" >&6; }
13959 if test x"$pgac_cv__types_compatible" = xyes ; then
13961 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
13964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
13965 $as_echo_n "checking for __builtin_constant_p... " >&6; }
13966 if ${pgac_cv__builtin_constant_p+:} false; then :
13967 $as_echo_n "(cached) " >&6
13969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13970 /* end confdefs.h. */
13972 static int y[__builtin_constant_p(x) ? x : 1];
13973 static int z[__builtin_constant_p("string literal") ? 1 : x];
13977 if ac_fn_c_try_compile "$LINENO"; then :
13978 pgac_cv__builtin_constant_p=yes
13980 pgac_cv__builtin_constant_p=no
13982 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
13985 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
13986 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
13988 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
13991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
13992 $as_echo_n "checking for __builtin_unreachable... " >&6; }
13993 if ${pgac_cv__builtin_unreachable+:} false; then :
13994 $as_echo_n "(cached) " >&6
13996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13997 /* end confdefs.h. */
14002 __builtin_unreachable();
14007 if ac_fn_c_try_link "$LINENO"; then :
14008 pgac_cv__builtin_unreachable=yes
14010 pgac_cv__builtin_unreachable=no
14012 rm -f core conftest.err conftest.$ac_objext \
14013 conftest$ac_exeext conftest.$ac_ext
14015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
14016 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
14017 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
14019 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
14022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
14023 $as_echo_n "checking for computed goto support... " >&6; }
14024 if ${pgac_cv_computed_goto+:} false; then :
14025 $as_echo_n "(cached) " >&6
14027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14028 /* end confdefs.h. */
14033 void *labeladdrs[] = {&&my_label};
14034 goto *labeladdrs[0];
14042 if ac_fn_c_try_compile "$LINENO"; then :
14043 pgac_cv_computed_goto=yes
14045 pgac_cv_computed_goto=no
14047 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
14050 $as_echo "$pgac_cv_computed_goto" >&6; }
14051 if test x"$pgac_cv_computed_goto" = xyes ; then
14053 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
14056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
14057 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
14058 if ${ac_cv_struct_tm+:} false; then :
14059 $as_echo_n "(cached) " >&6
14061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14062 /* end confdefs.h. */
14063 #include <sys/types.h>
14070 int *p = &tm.tm_sec;
14076 if ac_fn_c_try_compile "$LINENO"; then :
14077 ac_cv_struct_tm=time.h
14079 ac_cv_struct_tm=sys/time.h
14081 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
14084 $as_echo "$ac_cv_struct_tm" >&6; }
14085 if test $ac_cv_struct_tm = sys/time.h; then
14087 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
14091 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14092 #include <$ac_cv_struct_tm>
14095 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
14097 cat >>confdefs.h <<_ACEOF
14098 #define HAVE_STRUCT_TM_TM_ZONE 1
14104 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14106 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
14109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14110 $as_echo_n "checking for tzname... " >&6; }
14111 if ${ac_cv_var_tzname+:} false; then :
14112 $as_echo_n "(cached) " >&6
14114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14115 /* end confdefs.h. */
14116 #include <stdlib.h>
14118 #ifndef tzname /* For SGI. */
14119 extern char *tzname[]; /* RS6000 and others reject char **tzname. */
14130 if ac_fn_c_try_link "$LINENO"; then :
14131 ac_cv_var_tzname=yes
14133 ac_cv_var_tzname=no
14135 rm -f core conftest.err conftest.$ac_objext \
14136 conftest$ac_exeext conftest.$ac_ext
14138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14139 $as_echo "$ac_cv_var_tzname" >&6; }
14140 if test $ac_cv_var_tzname = yes; then
14142 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
14146 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14147 #ifdef HAVE_SYS_IPC_H
14148 #include <sys/ipc.h>
14150 #ifdef HAVE_SYS_SEM_H
14151 #include <sys/sem.h>
14154 if test "x$ac_cv_type_union_semun" = xyes; then :
14156 cat >>confdefs.h <<_ACEOF
14157 #define HAVE_UNION_SEMUN 1
14163 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
14164 #ifdef HAVE_SYS_UN_H
14165 #include <sys/un.h>
14169 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
14171 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
14175 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
14176 #include <sys/socket.h>
14179 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
14181 cat >>confdefs.h <<_ACEOF
14182 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
14188 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
14189 #include <sys/socket.h>
14192 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
14194 cat >>confdefs.h <<_ACEOF
14195 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
14200 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
14201 #include <sys/socket.h>
14204 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
14206 cat >>confdefs.h <<_ACEOF
14207 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
14212 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
14213 #include <sys/socket.h>
14216 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
14218 cat >>confdefs.h <<_ACEOF
14219 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
14224 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
14225 #include <sys/socket.h>
14228 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
14230 cat >>confdefs.h <<_ACEOF
14231 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
14236 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14237 #include <sys/socket.h>
14240 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14242 cat >>confdefs.h <<_ACEOF
14243 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14249 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
14250 #include <sys/socket.h>
14254 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
14256 cat >>confdefs.h <<_ACEOF
14257 #define HAVE_STRUCT_ADDRINFO 1
14264 ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
14265 if test "x$ac_cv_type_intptr_t" = xyes; then :
14267 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
14270 for ac_type in 'int' 'long int' 'long long int'; do
14271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14272 /* end confdefs.h. */
14273 $ac_includes_default
14277 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14278 test_array [0] = 0;
14279 return test_array [0];
14285 if ac_fn_c_try_compile "$LINENO"; then :
14287 cat >>confdefs.h <<_ACEOF
14288 #define intptr_t $ac_type
14293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14294 test -z "$ac_type" && break
14300 ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
14301 if test "x$ac_cv_type_uintptr_t" = xyes; then :
14303 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
14306 for ac_type in 'unsigned int' 'unsigned long int' \
14307 'unsigned long long int'; do
14308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14309 /* end confdefs.h. */
14310 $ac_includes_default
14314 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14315 test_array [0] = 0;
14316 return test_array [0];
14322 if ac_fn_c_try_compile "$LINENO"; then :
14324 cat >>confdefs.h <<_ACEOF
14325 #define uintptr_t $ac_type
14330 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14331 test -z "$ac_type" && break
14337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
14338 $as_echo_n "checking for unsigned long long int... " >&6; }
14339 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
14340 $as_echo_n "(cached) " >&6
14342 ac_cv_type_unsigned_long_long_int=yes
14343 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14345 /* end confdefs.h. */
14347 /* For now, do not test the preprocessor; as of 2007 there are too many
14348 implementations with broken preprocessors. Perhaps this can
14349 be revisited in 2012. In the meantime, code should not expect
14350 #if to work with literals wider than 32 bits. */
14351 /* Test literals. */
14352 long long int ll = 9223372036854775807ll;
14353 long long int nll = -9223372036854775807LL;
14354 unsigned long long int ull = 18446744073709551615ULL;
14355 /* Test constant expressions. */
14356 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
14358 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
14364 /* Test availability of runtime routines for shift and division. */
14365 long long int llmax = 9223372036854775807ll;
14366 unsigned long long int ullmax = 18446744073709551615ull;
14367 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
14368 | (llmax / ll) | (llmax % ll)
14369 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
14370 | (ullmax / ull) | (ullmax % ull));
14376 if ac_fn_c_try_link "$LINENO"; then :
14379 ac_cv_type_unsigned_long_long_int=no
14381 rm -f core conftest.err conftest.$ac_objext \
14382 conftest$ac_exeext conftest.$ac_ext
14385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
14386 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
14387 if test $ac_cv_type_unsigned_long_long_int = yes; then
14389 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
14395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
14396 $as_echo_n "checking for long long int... " >&6; }
14397 if ${ac_cv_type_long_long_int+:} false; then :
14398 $as_echo_n "(cached) " >&6
14400 ac_cv_type_long_long_int=yes
14401 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14402 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
14403 if test $ac_cv_type_long_long_int = yes; then
14404 if test "$cross_compiling" = yes; then :
14407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14408 /* end confdefs.h. */
14409 #include <limits.h>
14412 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
14413 # define LLONG_MAX (HALF - 1 + HALF)
14418 long long int n = 1;
14422 long long int m = n << i;
14425 if (LLONG_MAX / 2 < m)
14433 if ac_fn_c_try_run "$LINENO"; then :
14436 ac_cv_type_long_long_int=no
14438 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14439 conftest.$ac_objext conftest.beam conftest.$ac_ext
14445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
14446 $as_echo "$ac_cv_type_long_long_int" >&6; }
14447 if test $ac_cv_type_long_long_int = yes; then
14449 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
14454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
14455 $as_echo_n "checking for locale_t... " >&6; }
14456 if ${pgac_cv_type_locale_t+:} false; then :
14457 $as_echo_n "(cached) " >&6
14459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14460 /* end confdefs.h. */
14461 #include <locale.h>
14471 if ac_fn_c_try_compile "$LINENO"; then :
14472 pgac_cv_type_locale_t=yes
14474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14475 /* end confdefs.h. */
14476 #include <xlocale.h>
14486 if ac_fn_c_try_compile "$LINENO"; then :
14487 pgac_cv_type_locale_t='yes (in xlocale.h)'
14489 pgac_cv_type_locale_t=no
14491 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14493 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
14496 $as_echo "$pgac_cv_type_locale_t" >&6; }
14497 if test "$pgac_cv_type_locale_t" != no; then
14499 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
14502 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
14504 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
14508 # MSVC doesn't cope well with defining restrict to __restrict, the
14509 # spelling it understands, because it conflicts with
14510 # __declspec(restrict). Therefore we define pg_restrict to the
14511 # appropriate definition, which presumably won't conflict.
14513 # Allow platforms with buggy compilers to force restrict to not be
14514 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
14516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14517 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
14518 if ${ac_cv_c_restrict+:} false; then :
14519 $as_echo_n "(cached) " >&6
14521 ac_cv_c_restrict=no
14522 # The order here caters to the fact that C++ does not require restrict.
14523 for ac_kw in __restrict __restrict__ _Restrict restrict; do
14524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14525 /* end confdefs.h. */
14526 typedef int * int_ptr;
14527 int foo (int_ptr $ac_kw ip) {
14534 int * $ac_kw t = s;
14541 if ac_fn_c_try_compile "$LINENO"; then :
14542 ac_cv_c_restrict=$ac_kw
14544 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14545 test "$ac_cv_c_restrict" != no && break
14549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14550 $as_echo "$ac_cv_c_restrict" >&6; }
14552 case $ac_cv_c_restrict in
14554 no) $as_echo "#define restrict /**/" >>confdefs.h
14556 *) cat >>confdefs.h <<_ACEOF
14557 #define restrict $ac_cv_c_restrict
14562 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
14565 pg_restrict="$ac_cv_c_restrict"
14568 cat >>confdefs.h <<_ACEOF
14569 #define pg_restrict $pg_restrict
14573 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
14574 #include <sys/param.h>
14575 #ifdef HAVE_SYS_UCRED_H
14576 #include <sys/ucred.h>
14579 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
14581 cat >>confdefs.h <<_ACEOF
14582 #define HAVE_STRUCT_CMSGCRED 1
14589 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
14590 #include <getopt.h>
14593 if test "x$ac_cv_type_struct_option" = xyes; then :
14595 cat >>confdefs.h <<_ACEOF
14596 #define HAVE_STRUCT_OPTION 1
14603 if test "$with_zlib" = yes; then
14604 # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
14605 # did not). While we could work around the lack of z_streamp, it
14606 # seems unwise to encourage people to use such old zlib versions...
14607 ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
14609 if test "x$ac_cv_type_z_streamp" = xyes; then :
14612 as_fn_error $? "zlib version is too old
14613 Use --without-zlib to disable zlib support." "$LINENO" 5
14620 # On x86_64, check if we can compile a popcntq instruction
14621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports x86_64 popcntq" >&5
14622 $as_echo_n "checking whether assembler supports x86_64 popcntq... " >&6; }
14623 if ${pgac_cv_have_x86_64_popcntq+:} false; then :
14624 $as_echo_n "(cached) " >&6
14626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14627 /* end confdefs.h. */
14632 long long x = 1; long long r;
14633 __asm__ __volatile__ (" popcntq %1,%0\n" : "=q"(r) : "rm"(x));
14638 if ac_fn_c_try_compile "$LINENO"; then :
14639 pgac_cv_have_x86_64_popcntq=yes
14641 pgac_cv_have_x86_64_popcntq=no
14643 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_x86_64_popcntq" >&5
14646 $as_echo "$pgac_cv_have_x86_64_popcntq" >&6; }
14647 if test x"$pgac_cv_have_x86_64_popcntq" = xyes ; then
14649 $as_echo "#define HAVE_X86_64_POPCNTQ 1" >>confdefs.h
14654 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
14655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
14656 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
14657 if ${pgac_cv_have_ppc_mutex_hint+:} false; then :
14658 $as_echo_n "(cached) " >&6
14660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14661 /* end confdefs.h. */
14666 int a = 0; int *p = &a; int r;
14667 __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
14672 if ac_fn_c_try_compile "$LINENO"; then :
14673 pgac_cv_have_ppc_mutex_hint=yes
14675 pgac_cv_have_ppc_mutex_hint=no
14677 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
14680 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
14681 if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
14683 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
14689 # Check largefile support. You might think this is a system service not a
14690 # compiler characteristic, but you'd be wrong. We must check this before
14691 # probing existence of related functions such as fseeko, since the largefile
14692 # defines can affect what is generated for that.
14693 if test "$PORTNAME" != "win32"; then
14694 # Check whether --enable-largefile was given.
14695 if test "${enable_largefile+set}" = set; then :
14696 enableval=$enable_largefile;
14699 if test "$enable_largefile" != no; then
14701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
14702 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
14703 if ${ac_cv_sys_largefile_CC+:} false; then :
14704 $as_echo_n "(cached) " >&6
14706 ac_cv_sys_largefile_CC=no
14707 if test "$GCC" != yes; then
14710 # IRIX 6.2 and later do not support large files by default,
14711 # so use the C compiler's -n32 option if that helps.
14712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14713 /* end confdefs.h. */
14714 #include <sys/types.h>
14715 /* Check that off_t can represent 2**63 - 1 correctly.
14716 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14717 since some C++ compilers masquerading as C compilers
14718 incorrectly reject 9223372036854775807. */
14719 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14720 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14721 && LARGE_OFF_T % 2147483647 == 1)
14731 if ac_fn_c_try_compile "$LINENO"; then :
14734 rm -f core conftest.err conftest.$ac_objext
14736 if ac_fn_c_try_compile "$LINENO"; then :
14737 ac_cv_sys_largefile_CC=' -n32'; break
14739 rm -f core conftest.err conftest.$ac_objext
14743 rm -f conftest.$ac_ext
14746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
14747 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
14748 if test "$ac_cv_sys_largefile_CC" != no; then
14749 CC=$CC$ac_cv_sys_largefile_CC
14752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14753 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
14754 if ${ac_cv_sys_file_offset_bits+:} false; then :
14755 $as_echo_n "(cached) " >&6
14758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14759 /* end confdefs.h. */
14760 #include <sys/types.h>
14761 /* Check that off_t can represent 2**63 - 1 correctly.
14762 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14763 since some C++ compilers masquerading as C compilers
14764 incorrectly reject 9223372036854775807. */
14765 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14766 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14767 && LARGE_OFF_T % 2147483647 == 1)
14777 if ac_fn_c_try_compile "$LINENO"; then :
14778 ac_cv_sys_file_offset_bits=no; break
14780 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14782 /* end confdefs.h. */
14783 #define _FILE_OFFSET_BITS 64
14784 #include <sys/types.h>
14785 /* Check that off_t can represent 2**63 - 1 correctly.
14786 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14787 since some C++ compilers masquerading as C compilers
14788 incorrectly reject 9223372036854775807. */
14789 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14790 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14791 && LARGE_OFF_T % 2147483647 == 1)
14801 if ac_fn_c_try_compile "$LINENO"; then :
14802 ac_cv_sys_file_offset_bits=64; break
14804 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14805 ac_cv_sys_file_offset_bits=unknown
14809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
14810 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
14811 case $ac_cv_sys_file_offset_bits in #(
14814 cat >>confdefs.h <<_ACEOF
14815 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14820 if test $ac_cv_sys_file_offset_bits = unknown; then
14821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
14822 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
14823 if ${ac_cv_sys_large_files+:} false; then :
14824 $as_echo_n "(cached) " >&6
14827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14828 /* end confdefs.h. */
14829 #include <sys/types.h>
14830 /* Check that off_t can represent 2**63 - 1 correctly.
14831 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14832 since some C++ compilers masquerading as C compilers
14833 incorrectly reject 9223372036854775807. */
14834 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14835 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14836 && LARGE_OFF_T % 2147483647 == 1)
14846 if ac_fn_c_try_compile "$LINENO"; then :
14847 ac_cv_sys_large_files=no; break
14849 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14851 /* end confdefs.h. */
14852 #define _LARGE_FILES 1
14853 #include <sys/types.h>
14854 /* Check that off_t can represent 2**63 - 1 correctly.
14855 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14856 since some C++ compilers masquerading as C compilers
14857 incorrectly reject 9223372036854775807. */
14858 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14859 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14860 && LARGE_OFF_T % 2147483647 == 1)
14870 if ac_fn_c_try_compile "$LINENO"; then :
14871 ac_cv_sys_large_files=1; break
14873 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14874 ac_cv_sys_large_files=unknown
14878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
14879 $as_echo "$ac_cv_sys_large_files" >&6; }
14880 case $ac_cv_sys_large_files in #(
14883 cat >>confdefs.h <<_ACEOF
14884 #define _LARGE_FILES $ac_cv_sys_large_files
14897 # The cast to long int works around a bug in the HP C Compiler
14898 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14899 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14900 # This bug is HP SR number 8606223364.
14901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
14902 $as_echo_n "checking size of off_t... " >&6; }
14903 if ${ac_cv_sizeof_off_t+:} false; then :
14904 $as_echo_n "(cached) " >&6
14906 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
14909 if test "$ac_cv_type_off_t" = yes; then
14910 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14911 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14912 as_fn_error 77 "cannot compute sizeof (off_t)
14913 See \`config.log' for more details" "$LINENO" 5; }
14915 ac_cv_sizeof_off_t=0
14920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
14921 $as_echo "$ac_cv_sizeof_off_t" >&6; }
14925 cat >>confdefs.h <<_ACEOF
14926 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
14931 # If we don't have largefile support, can't handle segsize >= 2GB.
14932 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
14933 as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
14936 # The cast to long int works around a bug in the HP C Compiler
14937 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14938 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14939 # This bug is HP SR number 8606223364.
14940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
14941 $as_echo_n "checking size of bool... " >&6; }
14942 if ${ac_cv_sizeof_bool+:} false; then :
14943 $as_echo_n "(cached) " >&6
14945 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool" "#ifdef HAVE_STDBOOL_H
14946 #include <stdbool.h>
14951 if test "$ac_cv_type_bool" = yes; then
14952 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14953 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14954 as_fn_error 77 "cannot compute sizeof (bool)
14955 See \`config.log' for more details" "$LINENO" 5; }
14957 ac_cv_sizeof_bool=0
14962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
14963 $as_echo "$ac_cv_sizeof_bool" >&6; }
14967 cat >>confdefs.h <<_ACEOF
14968 #define SIZEOF_BOOL $ac_cv_sizeof_bool
14975 ## Functions, global variables
14978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
14979 $as_echo_n "checking for int timezone... " >&6; }
14980 if ${pgac_cv_var_int_timezone+:} false; then :
14981 $as_echo_n "(cached) " >&6
14983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14984 /* end confdefs.h. */
14991 res = timezone / 60;
14993 res = _timezone / 60;
14999 if ac_fn_c_try_link "$LINENO"; then :
15000 pgac_cv_var_int_timezone=yes
15002 pgac_cv_var_int_timezone=no
15004 rm -f core conftest.err conftest.$ac_objext \
15005 conftest$ac_exeext conftest.$ac_ext
15007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
15008 $as_echo "$pgac_cv_var_int_timezone" >&6; }
15009 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15011 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
15014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
15015 $as_echo_n "checking types of arguments for accept()... " >&6; }
15016 if ${ac_cv_func_accept_return+:} false; then :
15017 $as_echo_n "(cached) " >&6
15019 if ${ac_cv_func_accept_arg1+:} false; then :
15020 $as_echo_n "(cached) " >&6
15022 if ${ac_cv_func_accept_arg2+:} false; then :
15023 $as_echo_n "(cached) " >&6
15025 if ${ac_cv_func_accept_arg3+:} false; then :
15026 $as_echo_n "(cached) " >&6
15028 for ac_cv_func_accept_return in 'int' 'SOCKET WSAAPI' 'unsigned int PASCAL'; do
15029 for ac_cv_func_accept_arg1 in 'int' 'SOCKET' 'unsigned int'; do
15030 for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
15031 for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
15032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15033 /* end confdefs.h. */
15034 #include <sys/types.h>
15035 #include <sys/socket.h>
15036 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
15038 if ac_fn_c_try_compile "$LINENO"; then :
15039 ac_not_found=no; break 4
15043 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15048 if test "$ac_not_found" = yes; then
15049 as_fn_error $? "could not determine argument types" "$LINENO" 5
15051 if test "$ac_cv_func_accept_arg3" = "void"; then
15052 ac_cv_func_accept_arg3=int
15062 { $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
15063 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
15065 cat >>confdefs.h <<_ACEOF
15066 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
15070 cat >>confdefs.h <<_ACEOF
15071 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
15075 cat >>confdefs.h <<_ACEOF
15076 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
15080 cat >>confdefs.h <<_ACEOF
15081 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
15085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
15086 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
15087 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
15088 $as_echo_n "(cached) " >&6
15090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15091 /* end confdefs.h. */
15092 #include <sys/time.h>
15096 struct timeval *tp;
15097 struct timezone *tzp;
15098 gettimeofday(tp,tzp);
15103 if ac_fn_c_try_compile "$LINENO"; then :
15104 pgac_cv_func_gettimeofday_1arg=no
15106 pgac_cv_func_gettimeofday_1arg=yes
15108 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
15111 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
15112 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
15114 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
15118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
15119 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
15120 if ${pgac_cv_func_wcstombs_l+:} false; then :
15121 $as_echo_n "(cached) " >&6
15123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15124 /* end confdefs.h. */
15125 #include <stdlib.h>
15126 #include <locale.h>
15137 if ac_fn_c_try_compile "$LINENO"; then :
15138 pgac_cv_func_wcstombs_l='yes'
15140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15141 /* end confdefs.h. */
15142 #include <stdlib.h>
15143 #include <locale.h>
15144 #include <xlocale.h>
15155 if ac_fn_c_try_compile "$LINENO"; then :
15156 pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
15158 pgac_cv_func_wcstombs_l='no'
15160 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15162 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
15165 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
15166 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
15168 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
15172 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15173 # symbols that that library has no business exposing to the world. Pending
15174 # acquisition of a clue by those developers, ignore libedit (including its
15175 # possible alias of libreadline) while checking for everything else.
15176 LIBS_including_readline="$LIBS"
15177 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15179 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 uselocale utime utimes wcstombs_l
15181 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15182 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15183 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15184 cat >>confdefs.h <<_ACEOF
15185 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15192 # These typically are compiler builtins, for which AC_CHECK_FUNCS fails.
15193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
15194 $as_echo_n "checking for __builtin_bswap16... " >&6; }
15195 if ${pgac_cv__builtin_bswap16+:} false; then :
15196 $as_echo_n "(cached) " >&6
15198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15199 /* end confdefs.h. */
15202 call__builtin_bswap16(int x)
15204 return __builtin_bswap16(x);
15214 if ac_fn_c_try_link "$LINENO"; then :
15215 pgac_cv__builtin_bswap16=yes
15217 pgac_cv__builtin_bswap16=no
15219 rm -f core conftest.err conftest.$ac_objext \
15220 conftest$ac_exeext conftest.$ac_ext
15222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
15223 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
15224 if test x"${pgac_cv__builtin_bswap16}" = xyes ; then
15226 cat >>confdefs.h <<_ACEOF
15227 #define HAVE__BUILTIN_BSWAP16 1
15231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
15232 $as_echo_n "checking for __builtin_bswap32... " >&6; }
15233 if ${pgac_cv__builtin_bswap32+:} false; then :
15234 $as_echo_n "(cached) " >&6
15236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15237 /* end confdefs.h. */
15240 call__builtin_bswap32(int x)
15242 return __builtin_bswap32(x);
15252 if ac_fn_c_try_link "$LINENO"; then :
15253 pgac_cv__builtin_bswap32=yes
15255 pgac_cv__builtin_bswap32=no
15257 rm -f core conftest.err conftest.$ac_objext \
15258 conftest$ac_exeext conftest.$ac_ext
15260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
15261 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
15262 if test x"${pgac_cv__builtin_bswap32}" = xyes ; then
15264 cat >>confdefs.h <<_ACEOF
15265 #define HAVE__BUILTIN_BSWAP32 1
15269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
15270 $as_echo_n "checking for __builtin_bswap64... " >&6; }
15271 if ${pgac_cv__builtin_bswap64+:} false; then :
15272 $as_echo_n "(cached) " >&6
15274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15275 /* end confdefs.h. */
15278 call__builtin_bswap64(long int x)
15280 return __builtin_bswap64(x);
15290 if ac_fn_c_try_link "$LINENO"; then :
15291 pgac_cv__builtin_bswap64=yes
15293 pgac_cv__builtin_bswap64=no
15295 rm -f core conftest.err conftest.$ac_objext \
15296 conftest$ac_exeext conftest.$ac_ext
15298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
15299 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
15300 if test x"${pgac_cv__builtin_bswap64}" = xyes ; then
15302 cat >>confdefs.h <<_ACEOF
15303 #define HAVE__BUILTIN_BSWAP64 1
15307 # We assume that we needn't test all widths of these explicitly:
15308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_clz" >&5
15309 $as_echo_n "checking for __builtin_clz... " >&6; }
15310 if ${pgac_cv__builtin_clz+:} false; then :
15311 $as_echo_n "(cached) " >&6
15313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15314 /* end confdefs.h. */
15317 call__builtin_clz(unsigned int x)
15319 return __builtin_clz(x);
15329 if ac_fn_c_try_link "$LINENO"; then :
15330 pgac_cv__builtin_clz=yes
15332 pgac_cv__builtin_clz=no
15334 rm -f core conftest.err conftest.$ac_objext \
15335 conftest$ac_exeext conftest.$ac_ext
15337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_clz" >&5
15338 $as_echo "$pgac_cv__builtin_clz" >&6; }
15339 if test x"${pgac_cv__builtin_clz}" = xyes ; then
15341 cat >>confdefs.h <<_ACEOF
15342 #define HAVE__BUILTIN_CLZ 1
15346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctz" >&5
15347 $as_echo_n "checking for __builtin_ctz... " >&6; }
15348 if ${pgac_cv__builtin_ctz+:} false; then :
15349 $as_echo_n "(cached) " >&6
15351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15352 /* end confdefs.h. */
15355 call__builtin_ctz(unsigned int x)
15357 return __builtin_ctz(x);
15367 if ac_fn_c_try_link "$LINENO"; then :
15368 pgac_cv__builtin_ctz=yes
15370 pgac_cv__builtin_ctz=no
15372 rm -f core conftest.err conftest.$ac_objext \
15373 conftest$ac_exeext conftest.$ac_ext
15375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_ctz" >&5
15376 $as_echo "$pgac_cv__builtin_ctz" >&6; }
15377 if test x"${pgac_cv__builtin_ctz}" = xyes ; then
15379 cat >>confdefs.h <<_ACEOF
15380 #define HAVE__BUILTIN_CTZ 1
15384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
15385 $as_echo_n "checking for __builtin_popcount... " >&6; }
15386 if ${pgac_cv__builtin_popcount+:} false; then :
15387 $as_echo_n "(cached) " >&6
15389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15390 /* end confdefs.h. */
15393 call__builtin_popcount(unsigned int x)
15395 return __builtin_popcount(x);
15405 if ac_fn_c_try_link "$LINENO"; then :
15406 pgac_cv__builtin_popcount=yes
15408 pgac_cv__builtin_popcount=no
15410 rm -f core conftest.err conftest.$ac_objext \
15411 conftest$ac_exeext conftest.$ac_ext
15413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_popcount" >&5
15414 $as_echo "$pgac_cv__builtin_popcount" >&6; }
15415 if test x"${pgac_cv__builtin_popcount}" = xyes ; then
15417 cat >>confdefs.h <<_ACEOF
15418 #define HAVE__BUILTIN_POPCOUNT 1
15423 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
15424 if test "x$ac_cv_func_fseeko" = xyes; then :
15425 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15428 case " $LIBOBJS " in
15429 *" fseeko.$ac_objext "* ) ;;
15430 *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
15438 # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
15439 # Mingw uses macros to access Win32 API calls
15442 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15444 ac_cv_func_fseeko=yes;;
15446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15447 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15448 if ${ac_cv_sys_largefile_source+:} false; then :
15449 $as_echo_n "(cached) " >&6
15452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15453 /* end confdefs.h. */
15454 #include <sys/types.h> /* for off_t */
15459 int (*fp) (FILE *, off_t, int) = fseeko;
15460 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15465 if ac_fn_c_try_link "$LINENO"; then :
15466 ac_cv_sys_largefile_source=no; break
15468 rm -f core conftest.err conftest.$ac_objext \
15469 conftest$ac_exeext conftest.$ac_ext
15470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15471 /* end confdefs.h. */
15472 #define _LARGEFILE_SOURCE 1
15473 #include <sys/types.h> /* for off_t */
15478 int (*fp) (FILE *, off_t, int) = fseeko;
15479 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15484 if ac_fn_c_try_link "$LINENO"; then :
15485 ac_cv_sys_largefile_source=1; break
15487 rm -f core conftest.err conftest.$ac_objext \
15488 conftest$ac_exeext conftest.$ac_ext
15489 ac_cv_sys_largefile_source=unknown
15493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15494 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15495 case $ac_cv_sys_largefile_source in #(
15498 cat >>confdefs.h <<_ACEOF
15499 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15505 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15506 # in glibc 2.1.3, but that breaks too many other things.
15507 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15508 if test $ac_cv_sys_largefile_source != unknown; then
15510 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15516 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
15517 # by calling it, 2009-04-02
15518 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
15519 # The Clang compiler raises a warning for an undeclared identifier that matches
15520 # a compiler builtin function. All extant Clang versions are affected, as of
15521 # Clang 3.6.0. Test a builtin known to every version. This problem affects the
15522 # C and Objective C languages, but Clang does report an error under C++ and
15525 # Passing -fno-builtin to the compiler would suppress this problem. That
15526 # strategy would have the advantage of being insensitive to stray warnings, but
15527 # it would make tests less realistic.
15528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
15529 $as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
15530 if ${ac_cv_c_decl_report+:} false; then :
15531 $as_echo_n "(cached) " >&6
15533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15534 /* end confdefs.h. */
15544 if ac_fn_c_try_compile "$LINENO"; then :
15545 if test -s conftest.err; then :
15546 # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
15547 # valid AC_CHECK_DECL input. No library function is consistently available
15548 # on freestanding implementations, so test against a dummy declaration.
15549 # Include always-available headers on the off chance that they somehow
15551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15552 /* end confdefs.h. */
15554 #include <limits.h>
15555 #include <stdarg.h>
15556 #include <stddef.h>
15557 extern void ac_decl (int, char *);
15562 (void) ac_decl ((int) 0, (char *) 0);
15572 if ac_fn_c_try_compile "$LINENO"; then :
15573 if test -s conftest.err; then :
15574 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15575 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15576 as_fn_error $? "cannot detect from compiler exit status or warnings
15577 See \`config.log' for more details" "$LINENO" 5; }
15579 ac_cv_c_decl_report=warning
15582 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15583 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15584 as_fn_error $? "cannot compile a simple declaration test
15585 See \`config.log' for more details" "$LINENO" 5; }
15587 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15589 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15590 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15591 as_fn_error $? "compiler does not report undeclared identifiers
15592 See \`config.log' for more details" "$LINENO" 5; }
15595 ac_cv_c_decl_report=error
15597 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
15600 $as_echo "$ac_cv_c_decl_report" >&6; }
15602 case $ac_cv_c_decl_report in
15603 warning) ac_c_decl_warn_flag=yes ;;
15604 *) ac_c_decl_warn_flag= ;;
15607 if test "$PORTNAME" != "solaris"; then :
15609 for ac_func in posix_fadvise
15611 ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
15612 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
15613 cat >>confdefs.h <<_ACEOF
15614 #define HAVE_POSIX_FADVISE 1
15620 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
15622 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
15628 cat >>confdefs.h <<_ACEOF
15629 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
15635 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
15637 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
15643 cat >>confdefs.h <<_ACEOF
15644 #define HAVE_DECL_FDATASYNC $ac_have_decl
15647 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
15648 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
15654 cat >>confdefs.h <<_ACEOF
15655 #define HAVE_DECL_STRLCAT $ac_have_decl
15657 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
15658 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
15664 cat >>confdefs.h <<_ACEOF
15665 #define HAVE_DECL_STRLCPY $ac_have_decl
15667 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15668 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15674 cat >>confdefs.h <<_ACEOF
15675 #define HAVE_DECL_STRNLEN $ac_have_decl
15678 # This is probably only present on macOS, but may as well check always
15679 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
15681 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
15687 cat >>confdefs.h <<_ACEOF
15688 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
15692 ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
15694 if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
15700 cat >>confdefs.h <<_ACEOF
15701 #define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
15703 ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
15705 if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
15711 cat >>confdefs.h <<_ACEOF
15712 #define HAVE_DECL_RTLD_NOW $ac_have_decl
15716 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
15717 #include <netinet/in.h>
15719 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
15721 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
15726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
15727 $as_echo_n "checking for PS_STRINGS... " >&6; }
15728 if ${pgac_cv_var_PS_STRINGS+:} false; then :
15729 $as_echo_n "(cached) " >&6
15731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15732 /* end confdefs.h. */
15733 #include <machine/vmparam.h>
15734 #include <sys/exec.h>
15739 PS_STRINGS->ps_nargvstr = 1;
15740 PS_STRINGS->ps_argvstr = "foo";
15745 if ac_fn_c_try_link "$LINENO"; then :
15746 pgac_cv_var_PS_STRINGS=yes
15748 pgac_cv_var_PS_STRINGS=no
15750 rm -f core conftest.err conftest.$ac_objext \
15751 conftest$ac_exeext conftest.$ac_ext
15753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
15754 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
15755 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
15757 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
15762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
15763 $as_echo_n "checking for isinf... " >&6; }
15764 if ${ac_cv_func_isinf+:} false; then :
15765 $as_echo_n "(cached) " >&6
15767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15768 /* end confdefs.h. */
15771 double glob_double;
15776 return isinf(glob_double) ? 0 : 1;
15781 if ac_fn_c_try_link "$LINENO"; then :
15782 ac_cv_func_isinf=yes
15784 ac_cv_func_isinf=no
15786 rm -f core conftest.err conftest.$ac_objext \
15787 conftest$ac_exeext conftest.$ac_ext
15789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
15790 $as_echo "$ac_cv_func_isinf" >&6; }
15792 if test $ac_cv_func_isinf = yes ; then
15794 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
15797 case " $LIBOBJS " in
15798 *" isinf.$ac_objext "* ) ;;
15799 *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
15803 # Look for a way to implement a substitute for isinf()
15804 for ac_func in fpclass fp_class fp_class_d class
15806 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15807 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15808 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15809 cat >>confdefs.h <<_ACEOF
15810 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15818 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
15819 if test "x$ac_cv_func_crypt" = xyes; then :
15820 $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
15823 case " $LIBOBJS " in
15824 *" crypt.$ac_objext "* ) ;;
15825 *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
15831 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
15832 if test "x$ac_cv_func_dlopen" = xyes; then :
15833 $as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
15836 case " $LIBOBJS " in
15837 *" dlopen.$ac_objext "* ) ;;
15838 *) LIBOBJS="$LIBOBJS dlopen.$ac_objext"
15844 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
15845 if test "x$ac_cv_func_fls" = xyes; then :
15846 $as_echo "#define HAVE_FLS 1" >>confdefs.h
15849 case " $LIBOBJS " in
15850 *" fls.$ac_objext "* ) ;;
15851 *) LIBOBJS="$LIBOBJS fls.$ac_objext"
15857 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
15858 if test "x$ac_cv_func_getopt" = xyes; then :
15859 $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
15862 case " $LIBOBJS " in
15863 *" getopt.$ac_objext "* ) ;;
15864 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15870 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
15871 if test "x$ac_cv_func_getrusage" = xyes; then :
15872 $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
15875 case " $LIBOBJS " in
15876 *" getrusage.$ac_objext "* ) ;;
15877 *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
15883 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
15884 if test "x$ac_cv_func_inet_aton" = xyes; then :
15885 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
15888 case " $LIBOBJS " in
15889 *" inet_aton.$ac_objext "* ) ;;
15890 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
15896 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
15897 if test "x$ac_cv_func_mkdtemp" = xyes; then :
15898 $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
15901 case " $LIBOBJS " in
15902 *" mkdtemp.$ac_objext "* ) ;;
15903 *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
15909 ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread"
15910 if test "x$ac_cv_func_pread" = xyes; then :
15911 $as_echo "#define HAVE_PREAD 1" >>confdefs.h
15914 case " $LIBOBJS " in
15915 *" pread.$ac_objext "* ) ;;
15916 *) LIBOBJS="$LIBOBJS pread.$ac_objext"
15922 ac_fn_c_check_func "$LINENO" "pwrite" "ac_cv_func_pwrite"
15923 if test "x$ac_cv_func_pwrite" = xyes; then :
15924 $as_echo "#define HAVE_PWRITE 1" >>confdefs.h
15927 case " $LIBOBJS " in
15928 *" pwrite.$ac_objext "* ) ;;
15929 *) LIBOBJS="$LIBOBJS pwrite.$ac_objext"
15935 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
15936 if test "x$ac_cv_func_random" = xyes; then :
15937 $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
15940 case " $LIBOBJS " in
15941 *" random.$ac_objext "* ) ;;
15942 *) LIBOBJS="$LIBOBJS random.$ac_objext"
15948 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
15949 if test "x$ac_cv_func_rint" = xyes; then :
15950 $as_echo "#define HAVE_RINT 1" >>confdefs.h
15953 case " $LIBOBJS " in
15954 *" rint.$ac_objext "* ) ;;
15955 *) LIBOBJS="$LIBOBJS rint.$ac_objext"
15961 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
15962 if test "x$ac_cv_func_srandom" = xyes; then :
15963 $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
15966 case " $LIBOBJS " in
15967 *" srandom.$ac_objext "* ) ;;
15968 *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
15974 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
15975 if test "x$ac_cv_func_strlcat" = xyes; then :
15976 $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
15979 case " $LIBOBJS " in
15980 *" strlcat.$ac_objext "* ) ;;
15981 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
15987 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
15988 if test "x$ac_cv_func_strlcpy" = xyes; then :
15989 $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
15992 case " $LIBOBJS " in
15993 *" strlcpy.$ac_objext "* ) ;;
15994 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
16000 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
16001 if test "x$ac_cv_func_strnlen" = xyes; then :
16002 $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
16005 case " $LIBOBJS " in
16006 *" strnlen.$ac_objext "* ) ;;
16007 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
16013 ac_fn_c_check_func "$LINENO" "strtof" "ac_cv_func_strtof"
16014 if test "x$ac_cv_func_strtof" = xyes; then :
16015 $as_echo "#define HAVE_STRTOF 1" >>confdefs.h
16018 case " $LIBOBJS " in
16019 *" strtof.$ac_objext "* ) ;;
16020 *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
16029 # Cygwin and (apparently, based on test results) Mingw both
16030 # have a broken strtof(), so substitute the same replacement
16031 # code we use with VS2013. That's not a perfect fix, since
16032 # (unlike with VS2013) it doesn't avoid double-rounding, but
16033 # we have no better options. To get that, though, we have to
16034 # force the file to be compiled despite HAVE_STRTOF.
16036 case " $LIBOBJS " in
16037 *" strtof.$ac_objext "* ) ;;
16038 *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
16042 { $as_echo "$as_me:${as_lineno-$LINENO}: On $host_os we will use our strtof wrapper." >&5
16043 $as_echo "$as_me: On $host_os we will use our strtof wrapper." >&6;}
16049 # Windows uses a specialised env handler
16050 # and doesn't need a replacement getpeereid because it doesn't use
16054 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
16057 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
16059 ac_cv_func_unsetenv=yes
16060 ac_cv_func_getpeereid=yes;;
16062 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
16063 if test "x$ac_cv_func_unsetenv" = xyes; then :
16064 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
16067 case " $LIBOBJS " in
16068 *" unsetenv.$ac_objext "* ) ;;
16069 *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
16075 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
16076 if test "x$ac_cv_func_getpeereid" = xyes; then :
16077 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
16080 case " $LIBOBJS " in
16081 *" getpeereid.$ac_objext "* ) ;;
16082 *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
16092 # System's version of getaddrinfo(), if any, may be used only if we found
16093 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
16094 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
16095 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
16096 test "$PORTNAME" != "win32"; then
16097 ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
16098 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
16099 $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
16102 case " $LIBOBJS " in
16103 *" getaddrinfo.$ac_objext "* ) ;;
16104 *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
16112 case " $LIBOBJS " in
16113 *" getaddrinfo.$ac_objext "* ) ;;
16114 *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
16120 # Similarly, use system's getopt_long() only if system provides struct option.
16121 if test x"$ac_cv_type_struct_option" = xyes ; then
16122 ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
16123 if test "x$ac_cv_func_getopt_long" = xyes; then :
16124 $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
16127 case " $LIBOBJS " in
16128 *" getopt_long.$ac_objext "* ) ;;
16129 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16137 case " $LIBOBJS " in
16138 *" getopt_long.$ac_objext "* ) ;;
16139 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16145 # On OpenBSD and Solaris, getopt() doesn't do what we want for long options
16146 # (i.e., allow '-' as a flag character), so use our version on those platforms.
16147 if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
16148 case " $LIBOBJS " in
16149 *" getopt.$ac_objext "* ) ;;
16150 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16156 # mingw has adopted a GNU-centric interpretation of optind/optreset,
16157 # so always use our version on Windows.
16158 if test "$PORTNAME" = "win32"; then
16159 case " $LIBOBJS " in
16160 *" getopt.$ac_objext "* ) ;;
16161 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16165 case " $LIBOBJS " in
16166 *" getopt_long.$ac_objext "* ) ;;
16167 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16173 # Win32 (really MinGW) support
16174 if test "$PORTNAME" = "win32"; then
16175 for ac_func in _configthreadlocale
16177 ac_fn_c_check_func "$LINENO" "_configthreadlocale" "ac_cv_func__configthreadlocale"
16178 if test "x$ac_cv_func__configthreadlocale" = xyes; then :
16179 cat >>confdefs.h <<_ACEOF
16180 #define HAVE__CONFIGTHREADLOCALE 1
16186 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
16187 if test "x$ac_cv_func_gettimeofday" = xyes; then :
16188 $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
16191 case " $LIBOBJS " in
16192 *" gettimeofday.$ac_objext "* ) ;;
16193 *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
16200 case " $LIBOBJS " in
16201 *" dirmod.$ac_objext "* ) ;;
16202 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16206 case " $LIBOBJS " in
16207 *" kill.$ac_objext "* ) ;;
16208 *) LIBOBJS="$LIBOBJS kill.$ac_objext"
16212 case " $LIBOBJS " in
16213 *" open.$ac_objext "* ) ;;
16214 *) LIBOBJS="$LIBOBJS open.$ac_objext"
16218 case " $LIBOBJS " in
16219 *" system.$ac_objext "* ) ;;
16220 *) LIBOBJS="$LIBOBJS system.$ac_objext"
16224 case " $LIBOBJS " in
16225 *" win32env.$ac_objext "* ) ;;
16226 *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
16230 case " $LIBOBJS " in
16231 *" win32error.$ac_objext "* ) ;;
16232 *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
16236 case " $LIBOBJS " in
16237 *" win32security.$ac_objext "* ) ;;
16238 *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
16242 case " $LIBOBJS " in
16243 *" win32setlocale.$ac_objext "* ) ;;
16244 *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
16249 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
16251 ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
16252 #define WIN32_LEAN_AND_MEAN
16253 #include <windows.h>
16254 #include <string.h>
16255 #include <dbghelp.h>
16257 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
16259 cat >>confdefs.h <<_ACEOF
16260 #define HAVE_MINIDUMP_TYPE 1
16263 pgac_minidump_type=yes
16265 pgac_minidump_type=no
16269 if test x"$pgac_minidump_type" = x"yes" ; then
16270 have_win32_dbghelp=yes
16273 have_win32_dbghelp=no
16277 # Cygwin needs only a bit of that
16278 if test "$PORTNAME" = "cygwin"; then
16279 case " $LIBOBJS " in
16280 *" dirmod.$ac_objext "* ) ;;
16281 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16287 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
16288 if test "x$ac_cv_func_syslog" = xyes; then :
16289 ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
16290 if test "x$ac_cv_header_syslog_h" = xyes; then :
16292 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
16300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
16301 $as_echo_n "checking for opterr... " >&6; }
16302 if ${pgac_cv_var_int_opterr+:} false; then :
16303 $as_echo_n "(cached) " >&6
16305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16306 /* end confdefs.h. */
16307 #include <unistd.h>
16311 extern int opterr; opterr = 1;
16316 if ac_fn_c_try_link "$LINENO"; then :
16317 pgac_cv_var_int_opterr=yes
16319 pgac_cv_var_int_opterr=no
16321 rm -f core conftest.err conftest.$ac_objext \
16322 conftest$ac_exeext conftest.$ac_ext
16324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
16325 $as_echo "$pgac_cv_var_int_opterr" >&6; }
16326 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
16328 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
16332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
16333 $as_echo_n "checking for optreset... " >&6; }
16334 if ${pgac_cv_var_int_optreset+:} false; then :
16335 $as_echo_n "(cached) " >&6
16337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16338 /* end confdefs.h. */
16339 #include <unistd.h>
16343 extern int optreset; optreset = 1;
16348 if ac_fn_c_try_link "$LINENO"; then :
16349 pgac_cv_var_int_optreset=yes
16351 pgac_cv_var_int_optreset=no
16353 rm -f core conftest.err conftest.$ac_objext \
16354 conftest$ac_exeext conftest.$ac_ext
16356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
16357 $as_echo "$pgac_cv_var_int_optreset" >&6; }
16358 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
16360 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
16364 for ac_func in strtoll __strtoll strtoq
16366 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16367 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16368 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16369 cat >>confdefs.h <<_ACEOF
16370 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16376 for ac_func in strtoull __strtoull strtouq
16378 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16379 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16380 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16381 cat >>confdefs.h <<_ACEOF
16382 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16388 # strto[u]ll may exist but not be declared
16389 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
16390 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
16396 cat >>confdefs.h <<_ACEOF
16397 #define HAVE_DECL_STRTOLL $ac_have_decl
16399 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
16400 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
16406 cat >>confdefs.h <<_ACEOF
16407 #define HAVE_DECL_STRTOULL $ac_have_decl
16411 if test "$with_icu" = yes; then
16412 ac_save_CPPFLAGS=$CPPFLAGS
16413 CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16415 # Verify we have ICU's header files
16416 ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16417 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16420 as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16425 CPPFLAGS=$ac_save_CPPFLAGS
16428 if test "$with_llvm" = yes; then
16430 # Check which functionality is present
16431 SAVE_CPPFLAGS="$CPPFLAGS"
16432 CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
16433 ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
16435 if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
16441 cat >>confdefs.h <<_ACEOF
16442 #define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
16445 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
16447 if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
16453 cat >>confdefs.h <<_ACEOF
16454 #define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
16456 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUFeatures" "ac_cv_have_decl_LLVMGetHostCPUFeatures" "#include <llvm-c/TargetMachine.h>
16458 if test "x$ac_cv_have_decl_LLVMGetHostCPUFeatures" = xyes; then :
16464 cat >>confdefs.h <<_ACEOF
16465 #define HAVE_DECL_LLVMGETHOSTCPUFEATURES $ac_have_decl
16468 ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
16470 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
16476 cat >>confdefs.h <<_ACEOF
16477 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
16479 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
16481 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
16487 cat >>confdefs.h <<_ACEOF
16488 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
16491 CPPFLAGS="$SAVE_CPPFLAGS"
16495 # Lastly, restore full LIBS list and check for readline/libedit symbols
16496 LIBS="$LIBS_including_readline"
16498 if test "$with_readline" = yes; then
16499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
16500 $as_echo_n "checking for rl_completion_append_character... " >&6; }
16501 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
16502 $as_echo_n "(cached) " >&6
16504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16505 /* end confdefs.h. */
16507 #ifdef HAVE_READLINE_READLINE_H
16508 # include <readline/readline.h>
16509 #elif defined(HAVE_READLINE_H)
16510 # include <readline.h>
16516 rl_completion_append_character = 'x';
16521 if ac_fn_c_try_link "$LINENO"; then :
16522 pgac_cv_var_rl_completion_append_character=yes
16524 pgac_cv_var_rl_completion_append_character=no
16526 rm -f core conftest.err conftest.$ac_objext \
16527 conftest$ac_exeext conftest.$ac_ext
16529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
16530 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
16531 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
16533 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
16536 for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
16538 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16539 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16540 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16541 cat >>confdefs.h <<_ACEOF
16542 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16548 for ac_func in append_history history_truncate_file
16550 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16551 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16552 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16553 cat >>confdefs.h <<_ACEOF
16554 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16563 # This test makes sure that run tests work at all. Sometimes a shared
16564 # library is found by the linker, but the runtime linker can't find it.
16565 # This check should come after all modifications of compiler or linker
16566 # variables, and before any other run tests.
16567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16568 $as_echo_n "checking test program... " >&6; }
16569 if test "$cross_compiling" = yes; then :
16570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16571 $as_echo "cross-compiling" >&6; }
16573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16574 /* end confdefs.h. */
16575 int main() { return 0; }
16577 if ac_fn_c_try_run "$LINENO"; then :
16578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16579 $as_echo "ok" >&6; }
16581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16582 $as_echo "failed" >&6; }
16584 Could not execute a simple test program. This may be a problem
16585 related to locating shared libraries. Check the file 'config.log'
16586 for the exact reason." "$LINENO" 5
16588 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16589 conftest.$ac_objext conftest.beam conftest.$ac_ext
16593 # --------------------
16594 # Run tests below here
16595 # --------------------
16598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16599 $as_echo_n "checking whether long int is 64 bits... " >&6; }
16600 if ${pgac_cv_type_long_int_64+:} false; then :
16601 $as_echo_n "(cached) " >&6
16603 if test "$cross_compiling" = yes; then :
16604 # If cross-compiling, check the size reported by the compiler and
16605 # trust that the arithmetic works.
16606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16607 /* end confdefs.h. */
16612 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16613 test_array [0] = 0;
16614 return test_array [0];
16620 if ac_fn_c_try_compile "$LINENO"; then :
16621 pgac_cv_type_long_int_64=yes
16623 pgac_cv_type_long_int_64=no
16625 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16628 /* end confdefs.h. */
16629 typedef long int ac_int64;
16632 * These are globals to discourage the compiler from folding all the
16633 * arithmetic tests down to compile-time constants.
16635 ac_int64 a = 20000001;
16636 ac_int64 b = 40000005;
16638 int does_int64_work()
16642 if (sizeof(ac_int64) != 8)
16643 return 0; /* definitely not the right size */
16645 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16655 return (! does_int64_work());
16658 if ac_fn_c_try_run "$LINENO"; then :
16659 pgac_cv_type_long_int_64=yes
16661 pgac_cv_type_long_int_64=no
16663 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16664 conftest.$ac_objext conftest.beam conftest.$ac_ext
16668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
16669 $as_echo "$pgac_cv_type_long_int_64" >&6; }
16671 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
16672 if test x"$pgac_cv_type_long_int_64" = xyes ; then
16674 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
16679 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
16680 pg_int64_type="long int"
16682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
16683 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
16684 if ${pgac_cv_type_long_long_int_64+:} false; then :
16685 $as_echo_n "(cached) " >&6
16687 if test "$cross_compiling" = yes; then :
16688 # If cross-compiling, check the size reported by the compiler and
16689 # trust that the arithmetic works.
16690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16691 /* end confdefs.h. */
16696 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
16697 test_array [0] = 0;
16698 return test_array [0];
16704 if ac_fn_c_try_compile "$LINENO"; then :
16705 pgac_cv_type_long_long_int_64=yes
16707 pgac_cv_type_long_long_int_64=no
16709 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16712 /* end confdefs.h. */
16713 typedef long long int ac_int64;
16716 * These are globals to discourage the compiler from folding all the
16717 * arithmetic tests down to compile-time constants.
16719 ac_int64 a = 20000001;
16720 ac_int64 b = 40000005;
16722 int does_int64_work()
16726 if (sizeof(ac_int64) != 8)
16727 return 0; /* definitely not the right size */
16729 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16739 return (! does_int64_work());
16742 if ac_fn_c_try_run "$LINENO"; then :
16743 pgac_cv_type_long_long_int_64=yes
16745 pgac_cv_type_long_long_int_64=no
16747 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16748 conftest.$ac_objext conftest.beam conftest.$ac_ext
16752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
16753 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
16755 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
16756 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
16758 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
16762 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16763 pg_int64_type="long long int"
16765 as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
16770 cat >>confdefs.h <<_ACEOF
16771 #define PG_INT64_TYPE $pg_int64_type
16775 # Select the printf length modifier that goes with that, too.
16776 if test x"$pg_int64_type" = x"long long int" ; then
16777 INT64_MODIFIER='"ll"'
16779 INT64_MODIFIER='"l"'
16783 cat >>confdefs.h <<_ACEOF
16784 #define INT64_MODIFIER $INT64_MODIFIER
16788 # has to be down here, rather than with the other builtins, because
16789 # the test uses PG_INT64_TYPE.
16790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
16791 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
16792 if ${pgac_cv__builtin_op_overflow+:} false; then :
16793 $as_echo_n "(cached) " >&6
16795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16796 /* end confdefs.h. */
16798 PG_INT64_TYPE a = 1;
16799 PG_INT64_TYPE b = 1;
16800 PG_INT64_TYPE result;
16806 oflo = __builtin_mul_overflow(a, b, &result);
16811 if ac_fn_c_try_link "$LINENO"; then :
16812 pgac_cv__builtin_op_overflow=yes
16814 pgac_cv__builtin_op_overflow=no
16816 rm -f core conftest.err conftest.$ac_objext \
16817 conftest$ac_exeext conftest.$ac_ext
16819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
16820 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
16821 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
16823 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
16827 # Check size of void *, size_t (enables tweaks for > 32bit address space)
16828 # The cast to long int works around a bug in the HP C Compiler
16829 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16830 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16831 # This bug is HP SR number 8606223364.
16832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
16833 $as_echo_n "checking size of void *... " >&6; }
16834 if ${ac_cv_sizeof_void_p+:} false; then :
16835 $as_echo_n "(cached) " >&6
16837 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
16840 if test "$ac_cv_type_void_p" = yes; then
16841 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16842 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16843 as_fn_error 77 "cannot compute sizeof (void *)
16844 See \`config.log' for more details" "$LINENO" 5; }
16846 ac_cv_sizeof_void_p=0
16851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
16852 $as_echo "$ac_cv_sizeof_void_p" >&6; }
16856 cat >>confdefs.h <<_ACEOF
16857 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
16861 # The cast to long int works around a bug in the HP C Compiler
16862 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16863 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16864 # This bug is HP SR number 8606223364.
16865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
16866 $as_echo_n "checking size of size_t... " >&6; }
16867 if ${ac_cv_sizeof_size_t+:} false; then :
16868 $as_echo_n "(cached) " >&6
16870 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
16873 if test "$ac_cv_type_size_t" = yes; then
16874 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16875 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16876 as_fn_error 77 "cannot compute sizeof (size_t)
16877 See \`config.log' for more details" "$LINENO" 5; }
16879 ac_cv_sizeof_size_t=0
16884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
16885 $as_echo "$ac_cv_sizeof_size_t" >&6; }
16889 cat >>confdefs.h <<_ACEOF
16890 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
16894 # The cast to long int works around a bug in the HP C Compiler
16895 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16896 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16897 # This bug is HP SR number 8606223364.
16898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
16899 $as_echo_n "checking size of long... " >&6; }
16900 if ${ac_cv_sizeof_long+:} false; then :
16901 $as_echo_n "(cached) " >&6
16903 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
16906 if test "$ac_cv_type_long" = yes; then
16907 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16908 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16909 as_fn_error 77 "cannot compute sizeof (long)
16910 See \`config.log' for more details" "$LINENO" 5; }
16912 ac_cv_sizeof_long=0
16917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
16918 $as_echo "$ac_cv_sizeof_long" >&6; }
16922 cat >>confdefs.h <<_ACEOF
16923 #define SIZEOF_LONG $ac_cv_sizeof_long
16928 # Decide whether float4 is passed by value: user-selectable, enabled by default
16929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
16930 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
16933 # Check whether --enable-float4-byval was given.
16934 if test "${enable_float4_byval+set}" = set; then :
16935 enableval=$enable_float4_byval;
16939 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16941 float4passbyval=true
16944 float4passbyval=false
16947 as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
16952 enable_float4_byval=yes
16954 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16956 float4passbyval=true
16960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
16961 $as_echo "$enable_float4_byval" >&6; }
16963 cat >>confdefs.h <<_ACEOF
16964 #define FLOAT4PASSBYVAL $float4passbyval
16968 # Decide whether float8 is passed by value.
16969 # Note: this setting also controls int8 and related types such as timestamp.
16970 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
16971 # If not, trying to select it is an error.
16972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
16973 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
16974 if test $ac_cv_sizeof_void_p -ge 8 ; then
16977 # Check whether --enable-float8-byval was given.
16978 if test "${enable_float8_byval+set}" = set; then :
16979 enableval=$enable_float8_byval;
16988 as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16993 enable_float8_byval=yes
17001 # Check whether --enable-float8-byval was given.
17002 if test "${enable_float8_byval+set}" = set; then :
17003 enableval=$enable_float8_byval;
17012 as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
17017 enable_float8_byval=no
17022 if test "$enable_float8_byval" = yes ; then
17023 as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
17026 if test "$enable_float8_byval" = yes ; then
17028 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
17030 float8passbyval=true
17032 float8passbyval=false
17034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
17035 $as_echo "$enable_float8_byval" >&6; }
17037 cat >>confdefs.h <<_ACEOF
17038 #define FLOAT8PASSBYVAL $float8passbyval
17042 # Determine memory alignment requirements for the basic C data types.
17044 # The cast to long int works around a bug in the HP C Compiler,
17045 # see AC_CHECK_SIZEOF for more information.
17046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
17047 $as_echo_n "checking alignment of short... " >&6; }
17048 if ${ac_cv_alignof_short+:} false; then :
17049 $as_echo_n "(cached) " >&6
17051 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short" "$ac_includes_default
17053 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17055 typedef struct { char x; short y; } ac__type_alignof_;"; then :
17058 if test "$ac_cv_type_short" = yes; then
17059 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17060 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17061 as_fn_error 77 "cannot compute alignment of short
17062 See \`config.log' for more details" "$LINENO" 5; }
17064 ac_cv_alignof_short=0
17069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
17070 $as_echo "$ac_cv_alignof_short" >&6; }
17074 cat >>confdefs.h <<_ACEOF
17075 #define ALIGNOF_SHORT $ac_cv_alignof_short
17079 # The cast to long int works around a bug in the HP C Compiler,
17080 # see AC_CHECK_SIZEOF for more information.
17081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
17082 $as_echo_n "checking alignment of int... " >&6; }
17083 if ${ac_cv_alignof_int+:} false; then :
17084 $as_echo_n "(cached) " >&6
17086 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int" "$ac_includes_default
17088 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17090 typedef struct { char x; int y; } ac__type_alignof_;"; then :
17093 if test "$ac_cv_type_int" = yes; then
17094 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17095 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17096 as_fn_error 77 "cannot compute alignment of int
17097 See \`config.log' for more details" "$LINENO" 5; }
17099 ac_cv_alignof_int=0
17104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
17105 $as_echo "$ac_cv_alignof_int" >&6; }
17109 cat >>confdefs.h <<_ACEOF
17110 #define ALIGNOF_INT $ac_cv_alignof_int
17114 # The cast to long int works around a bug in the HP C Compiler,
17115 # see AC_CHECK_SIZEOF for more information.
17116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
17117 $as_echo_n "checking alignment of long... " >&6; }
17118 if ${ac_cv_alignof_long+:} false; then :
17119 $as_echo_n "(cached) " >&6
17121 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
17123 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17125 typedef struct { char x; long y; } ac__type_alignof_;"; then :
17128 if test "$ac_cv_type_long" = yes; then
17129 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17130 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17131 as_fn_error 77 "cannot compute alignment of long
17132 See \`config.log' for more details" "$LINENO" 5; }
17134 ac_cv_alignof_long=0
17139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
17140 $as_echo "$ac_cv_alignof_long" >&6; }
17144 cat >>confdefs.h <<_ACEOF
17145 #define ALIGNOF_LONG $ac_cv_alignof_long
17149 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
17150 # The cast to long int works around a bug in the HP C Compiler,
17151 # see AC_CHECK_SIZEOF for more information.
17152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
17153 $as_echo_n "checking alignment of long long int... " >&6; }
17154 if ${ac_cv_alignof_long_long_int+:} false; then :
17155 $as_echo_n "(cached) " >&6
17157 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int" "$ac_includes_default
17159 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17161 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
17164 if test "$ac_cv_type_long_long_int" = yes; then
17165 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17166 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17167 as_fn_error 77 "cannot compute alignment of long long int
17168 See \`config.log' for more details" "$LINENO" 5; }
17170 ac_cv_alignof_long_long_int=0
17175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
17176 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
17180 cat >>confdefs.h <<_ACEOF
17181 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
17186 # The cast to long int works around a bug in the HP C Compiler,
17187 # see AC_CHECK_SIZEOF for more information.
17188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
17189 $as_echo_n "checking alignment of double... " >&6; }
17190 if ${ac_cv_alignof_double+:} false; then :
17191 $as_echo_n "(cached) " >&6
17193 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double" "$ac_includes_default
17195 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17197 typedef struct { char x; double y; } ac__type_alignof_;"; then :
17200 if test "$ac_cv_type_double" = yes; then
17201 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17202 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17203 as_fn_error 77 "cannot compute alignment of double
17204 See \`config.log' for more details" "$LINENO" 5; }
17206 ac_cv_alignof_double=0
17211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
17212 $as_echo "$ac_cv_alignof_double" >&6; }
17216 cat >>confdefs.h <<_ACEOF
17217 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
17222 # Compute maximum alignment of any basic type.
17223 # We assume long's alignment is at least as strong as char, short, or int;
17224 # but we must check long long (if it is being used for int64) and double.
17225 # Note that we intentionally do not consider any types wider than 64 bits,
17226 # as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
17227 # for disk and memory space.
17229 MAX_ALIGNOF=$ac_cv_alignof_long
17230 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
17231 MAX_ALIGNOF=$ac_cv_alignof_double
17233 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
17234 MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
17237 cat >>confdefs.h <<_ACEOF
17238 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
17243 # Some platforms predefine the types int8, int16, etc. Only check
17244 # a (hopefully) representative subset.
17245 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
17247 if test "x$ac_cv_type_int8" = xyes; then :
17249 cat >>confdefs.h <<_ACEOF
17250 #define HAVE_INT8 1
17255 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
17257 if test "x$ac_cv_type_uint8" = xyes; then :
17259 cat >>confdefs.h <<_ACEOF
17260 #define HAVE_UINT8 1
17265 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
17267 if test "x$ac_cv_type_int64" = xyes; then :
17269 cat >>confdefs.h <<_ACEOF
17270 #define HAVE_INT64 1
17275 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
17277 if test "x$ac_cv_type_uint64" = xyes; then :
17279 cat >>confdefs.h <<_ACEOF
17280 #define HAVE_UINT64 1
17287 # Some compilers offer a 128-bit integer scalar type.
17288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
17289 $as_echo_n "checking for __int128... " >&6; }
17290 if ${pgac_cv__128bit_int+:} false; then :
17291 $as_echo_n "(cached) " >&6
17293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17294 /* end confdefs.h. */
17297 * We don't actually run this test, just link it to verify that any support
17298 * functions needed for __int128 are present.
17300 * These are globals to discourage the compiler from folding all the
17301 * arithmetic tests down to compile-time constants. We do not have
17302 * convenient support for 128bit literals at this point...
17304 __int128 a = 48828125;
17305 __int128 b = 97656250;
17312 a = (a << 12) + 1; /* 200000000001 */
17313 b = (b << 12) + 5; /* 400000000005 */
17314 /* try the most relevant arithmetic ops */
17317 /* must use the results, else compiler may optimize arithmetic away */
17325 if ac_fn_c_try_link "$LINENO"; then :
17326 pgac_cv__128bit_int=yes
17328 pgac_cv__128bit_int=no
17330 rm -f core conftest.err conftest.$ac_objext \
17331 conftest$ac_exeext conftest.$ac_ext
17333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
17334 $as_echo "$pgac_cv__128bit_int" >&6; }
17335 if test x"$pgac_cv__128bit_int" = xyes ; then
17336 # Use of non-default alignment with __int128 tickles bugs in some compilers.
17337 # If not cross-compiling, we can test for bugs and disable use of __int128
17338 # with buggy compilers. If cross-compiling, hope for the best.
17339 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
17340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
17341 $as_echo_n "checking for __int128 alignment bug... " >&6; }
17342 if ${pgac_cv__128bit_int_bug+:} false; then :
17343 $as_echo_n "(cached) " >&6
17345 if test "$cross_compiling" = yes; then :
17346 pgac_cv__128bit_int_bug="assuming ok"
17348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17349 /* end confdefs.h. */
17351 /* This must match the corresponding code in c.h: */
17352 #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
17353 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
17355 typedef __int128 int128a
17356 #if defined(pg_attribute_aligned)
17357 pg_attribute_aligned(8)
17361 void pass_by_val(void *buffer, int128a par) { holder = par; }
17367 long int i64 = 97656225L << 12;
17369 pass_by_val(main, (int128a) i64);
17378 if ac_fn_c_try_run "$LINENO"; then :
17379 pgac_cv__128bit_int_bug=ok
17381 pgac_cv__128bit_int_bug=broken
17383 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17384 conftest.$ac_objext conftest.beam conftest.$ac_ext
17388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
17389 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
17390 if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
17392 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
17394 # The cast to long int works around a bug in the HP C Compiler,
17395 # see AC_CHECK_SIZEOF for more information.
17396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
17397 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
17398 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
17399 $as_echo_n "(cached) " >&6
17401 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE" "$ac_includes_default
17403 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17405 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
17408 if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
17409 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17410 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17411 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
17412 See \`config.log' for more details" "$LINENO" 5; }
17414 ac_cv_alignof_PG_INT128_TYPE=0
17419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
17420 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
17424 cat >>confdefs.h <<_ACEOF
17425 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
17432 # Check for various atomic operations now that we have checked how to declare
17434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
17435 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
17436 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
17437 $as_echo_n "(cached) " >&6
17439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17440 /* end confdefs.h. */
17446 __sync_lock_test_and_set(&lock, 1);
17447 __sync_lock_release(&lock);
17452 if ac_fn_c_try_link "$LINENO"; then :
17453 pgac_cv_gcc_sync_char_tas="yes"
17455 pgac_cv_gcc_sync_char_tas="no"
17457 rm -f core conftest.err conftest.$ac_objext \
17458 conftest$ac_exeext conftest.$ac_ext
17460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
17461 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
17462 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
17464 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
17467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
17468 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
17469 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
17470 $as_echo_n "(cached) " >&6
17472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17473 /* end confdefs.h. */
17479 __sync_lock_test_and_set(&lock, 1);
17480 __sync_lock_release(&lock);
17485 if ac_fn_c_try_link "$LINENO"; then :
17486 pgac_cv_gcc_sync_int32_tas="yes"
17488 pgac_cv_gcc_sync_int32_tas="no"
17490 rm -f core conftest.err conftest.$ac_objext \
17491 conftest$ac_exeext conftest.$ac_ext
17493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
17494 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
17495 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
17497 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
17500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17501 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17502 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17503 $as_echo_n "(cached) " >&6
17505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17506 /* end confdefs.h. */
17512 __sync_val_compare_and_swap(&val, 0, 37);
17517 if ac_fn_c_try_link "$LINENO"; then :
17518 pgac_cv_gcc_sync_int32_cas="yes"
17520 pgac_cv_gcc_sync_int32_cas="no"
17522 rm -f core conftest.err conftest.$ac_objext \
17523 conftest$ac_exeext conftest.$ac_ext
17525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17526 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17527 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17529 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17533 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17534 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17535 $as_echo_n "(cached) " >&6
17537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17538 /* end confdefs.h. */
17543 PG_INT64_TYPE lock = 0;
17544 __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17549 if ac_fn_c_try_link "$LINENO"; then :
17550 pgac_cv_gcc_sync_int64_cas="yes"
17552 pgac_cv_gcc_sync_int64_cas="no"
17554 rm -f core conftest.err conftest.$ac_objext \
17555 conftest$ac_exeext conftest.$ac_ext
17557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17558 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17559 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17561 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17565 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17566 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17567 $as_echo_n "(cached) " >&6
17569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17570 /* end confdefs.h. */
17577 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17582 if ac_fn_c_try_link "$LINENO"; then :
17583 pgac_cv_gcc_atomic_int32_cas="yes"
17585 pgac_cv_gcc_atomic_int32_cas="no"
17587 rm -f core conftest.err conftest.$ac_objext \
17588 conftest$ac_exeext conftest.$ac_ext
17590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17591 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17592 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17594 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17598 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17599 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17600 $as_echo_n "(cached) " >&6
17602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17603 /* end confdefs.h. */
17608 PG_INT64_TYPE val = 0;
17609 PG_INT64_TYPE expect = 0;
17610 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17615 if ac_fn_c_try_link "$LINENO"; then :
17616 pgac_cv_gcc_atomic_int64_cas="yes"
17618 pgac_cv_gcc_atomic_int64_cas="no"
17620 rm -f core conftest.err conftest.$ac_objext \
17621 conftest$ac_exeext conftest.$ac_ext
17623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17624 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17625 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17627 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17632 # Check for x86 cpuid instruction
17633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17634 $as_echo_n "checking for __get_cpuid... " >&6; }
17635 if ${pgac_cv__get_cpuid+:} false; then :
17636 $as_echo_n "(cached) " >&6
17638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17639 /* end confdefs.h. */
17644 unsigned int exx[4] = {0, 0, 0, 0};
17645 __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17651 if ac_fn_c_try_link "$LINENO"; then :
17652 pgac_cv__get_cpuid="yes"
17654 pgac_cv__get_cpuid="no"
17656 rm -f core conftest.err conftest.$ac_objext \
17657 conftest$ac_exeext conftest.$ac_ext
17659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17660 $as_echo "$pgac_cv__get_cpuid" >&6; }
17661 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17663 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17668 $as_echo_n "checking for __cpuid... " >&6; }
17669 if ${pgac_cv__cpuid+:} false; then :
17670 $as_echo_n "(cached) " >&6
17672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17673 /* end confdefs.h. */
17674 #include <intrin.h>
17678 unsigned int exx[4] = {0, 0, 0, 0};
17679 __get_cpuid(exx[0], 1);
17685 if ac_fn_c_try_link "$LINENO"; then :
17686 pgac_cv__cpuid="yes"
17688 pgac_cv__cpuid="no"
17690 rm -f core conftest.err conftest.$ac_objext \
17691 conftest$ac_exeext conftest.$ac_ext
17693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17694 $as_echo "$pgac_cv__cpuid" >&6; }
17695 if test x"$pgac_cv__cpuid" = x"yes"; then
17697 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17701 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17703 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17704 # with the default compiler flags. If not, check if adding the -msse4.2
17705 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
17706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17707 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17708 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17709 $as_echo_n "(cached) " >&6
17711 pgac_save_CFLAGS=$CFLAGS
17712 CFLAGS="$pgac_save_CFLAGS "
17713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17714 /* end confdefs.h. */
17715 #include <nmmintrin.h>
17719 unsigned int crc = 0;
17720 crc = _mm_crc32_u8(crc, 0);
17721 crc = _mm_crc32_u32(crc, 0);
17722 /* return computed value, to prevent the above being optimized away */
17728 if ac_fn_c_try_link "$LINENO"; then :
17729 pgac_cv_sse42_crc32_intrinsics_=yes
17731 pgac_cv_sse42_crc32_intrinsics_=no
17733 rm -f core conftest.err conftest.$ac_objext \
17734 conftest$ac_exeext conftest.$ac_ext
17735 CFLAGS="$pgac_save_CFLAGS"
17737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
17738 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
17739 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
17741 pgac_sse42_crc32_intrinsics=yes
17744 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
17745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
17746 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
17747 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
17748 $as_echo_n "(cached) " >&6
17750 pgac_save_CFLAGS=$CFLAGS
17751 CFLAGS="$pgac_save_CFLAGS -msse4.2"
17752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17753 /* end confdefs.h. */
17754 #include <nmmintrin.h>
17758 unsigned int crc = 0;
17759 crc = _mm_crc32_u8(crc, 0);
17760 crc = _mm_crc32_u32(crc, 0);
17761 /* return computed value, to prevent the above being optimized away */
17767 if ac_fn_c_try_link "$LINENO"; then :
17768 pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
17770 pgac_cv_sse42_crc32_intrinsics__msse4_2=no
17772 rm -f core conftest.err conftest.$ac_objext \
17773 conftest$ac_exeext conftest.$ac_ext
17774 CFLAGS="$pgac_save_CFLAGS"
17776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
17777 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
17778 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
17779 CFLAGS_SSE42="-msse4.2"
17780 pgac_sse42_crc32_intrinsics=yes
17786 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
17787 # define __SSE4_2__ in that case.
17788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17789 /* end confdefs.h. */
17796 #error __SSE4_2__ not defined
17803 if ac_fn_c_try_compile "$LINENO"; then :
17806 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17808 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
17810 # First check if __crc32c* intrinsics can be used with the default compiler
17811 # flags. If not, check if adding -march=armv8-a+crc flag helps.
17812 # CFLAGS_ARMV8_CRC32C is set if the extra flag is required.
17813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
17814 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
17815 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
17816 $as_echo_n "(cached) " >&6
17818 pgac_save_CFLAGS=$CFLAGS
17819 CFLAGS="$pgac_save_CFLAGS "
17820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17821 /* end confdefs.h. */
17822 #include <arm_acle.h>
17826 unsigned int crc = 0;
17827 crc = __crc32cb(crc, 0);
17828 crc = __crc32ch(crc, 0);
17829 crc = __crc32cw(crc, 0);
17830 crc = __crc32cd(crc, 0);
17831 /* return computed value, to prevent the above being optimized away */
17837 if ac_fn_c_try_link "$LINENO"; then :
17838 pgac_cv_armv8_crc32c_intrinsics_=yes
17840 pgac_cv_armv8_crc32c_intrinsics_=no
17842 rm -f core conftest.err conftest.$ac_objext \
17843 conftest$ac_exeext conftest.$ac_ext
17844 CFLAGS="$pgac_save_CFLAGS"
17846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
17847 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
17848 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
17849 CFLAGS_ARMV8_CRC32C=""
17850 pgac_armv8_crc32c_intrinsics=yes
17853 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
17854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
17855 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
17856 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
17857 $as_echo_n "(cached) " >&6
17859 pgac_save_CFLAGS=$CFLAGS
17860 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
17861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17862 /* end confdefs.h. */
17863 #include <arm_acle.h>
17867 unsigned int crc = 0;
17868 crc = __crc32cb(crc, 0);
17869 crc = __crc32ch(crc, 0);
17870 crc = __crc32cw(crc, 0);
17871 crc = __crc32cd(crc, 0);
17872 /* return computed value, to prevent the above being optimized away */
17878 if ac_fn_c_try_link "$LINENO"; then :
17879 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
17881 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
17883 rm -f core conftest.err conftest.$ac_objext \
17884 conftest$ac_exeext conftest.$ac_ext
17885 CFLAGS="$pgac_save_CFLAGS"
17887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
17888 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
17889 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
17890 CFLAGS_ARMV8_CRC32C="-march=armv8-a+crc"
17891 pgac_armv8_crc32c_intrinsics=yes
17897 # Select CRC-32C implementation.
17899 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
17900 # use the special CRC instructions for calculating CRC-32C. If we're not
17901 # targeting such a processor, but we can nevertheless produce code that uses
17902 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
17903 # implementations and select which one to use at runtime, depending on whether
17904 # SSE 4.2 is supported by the processor we're running on.
17906 # Similarly, if we are targeting an ARM processor that has the CRC
17907 # instructions that are part of the ARMv8 CRC Extension, use them. And if
17908 # we're not targeting such a processor, but can nevertheless produce code that
17909 # uses the CRC instructions, compile both, and select at runtime.
17911 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
17912 # in the template or configure command line.
17913 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
17914 # Use Intel SSE 4.2 if available.
17915 if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
17918 # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
17919 # the runtime check.
17920 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
17921 USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
17923 # Use ARM CRC Extension if available.
17924 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_ARMV8_CRC32C" = x""; then
17927 # ARM CRC Extension, with runtime check?
17928 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
17929 USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
17931 # fall back to slicing-by-8 algorithm, which doesn't require any
17932 # special CPU support.
17933 USE_SLICING_BY_8_CRC32C=1
17940 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
17941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
17942 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
17943 if test x"$USE_SSE42_CRC32C" = x"1"; then
17945 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
17947 PG_CRC32C_OBJS="pg_crc32c_sse42.o"
17948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
17949 $as_echo "SSE 4.2" >&6; }
17951 if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17953 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17955 PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
17956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
17957 $as_echo "SSE 4.2 with runtime check" >&6; }
17959 if test x"$USE_ARMV8_CRC32C" = x"1"; then
17961 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
17963 PG_CRC32C_OBJS="pg_crc32c_armv8.o"
17964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
17965 $as_echo "ARMv8 CRC instructions" >&6; }
17967 if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17969 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17971 PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
17972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
17973 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
17976 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
17978 PG_CRC32C_OBJS="pg_crc32c_sb8.o"
17979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
17980 $as_echo "slicing-by-8" >&6; }
17988 # Select semaphore implementation type.
17989 if test "$PORTNAME" != "win32"; then
17990 if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
17991 # Need sem_open for this
17992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
17993 $as_echo_n "checking for library containing sem_open... " >&6; }
17994 if ${ac_cv_search_sem_open+:} false; then :
17995 $as_echo_n "(cached) " >&6
17997 ac_func_search_save_LIBS=$LIBS
17998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17999 /* end confdefs.h. */
18001 /* Override any GCC internal prototype to avoid an error.
18002 Use char because int might match the return type of a GCC
18003 builtin and then its argument prototype would still apply. */
18011 return sem_open ();
18016 for ac_lib in '' rt pthread; do
18017 if test -z "$ac_lib"; then
18018 ac_res="none required"
18021 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18023 if ac_fn_c_try_link "$LINENO"; then :
18024 ac_cv_search_sem_open=$ac_res
18026 rm -f core conftest.err conftest.$ac_objext \
18028 if ${ac_cv_search_sem_open+:} false; then :
18032 if ${ac_cv_search_sem_open+:} false; then :
18035 ac_cv_search_sem_open=no
18037 rm conftest.$ac_ext
18038 LIBS=$ac_func_search_save_LIBS
18040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
18041 $as_echo "$ac_cv_search_sem_open" >&6; }
18042 ac_res=$ac_cv_search_sem_open
18043 if test "$ac_res" != no; then :
18044 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18045 USE_NAMED_POSIX_SEMAPHORES=1
18049 if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
18050 # Need sem_init for this
18051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
18052 $as_echo_n "checking for library containing sem_init... " >&6; }
18053 if ${ac_cv_search_sem_init+:} false; then :
18054 $as_echo_n "(cached) " >&6
18056 ac_func_search_save_LIBS=$LIBS
18057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18058 /* end confdefs.h. */
18060 /* Override any GCC internal prototype to avoid an error.
18061 Use char because int might match the return type of a GCC
18062 builtin and then its argument prototype would still apply. */
18070 return sem_init ();
18075 for ac_lib in '' rt pthread; do
18076 if test -z "$ac_lib"; then
18077 ac_res="none required"
18080 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18082 if ac_fn_c_try_link "$LINENO"; then :
18083 ac_cv_search_sem_init=$ac_res
18085 rm -f core conftest.err conftest.$ac_objext \
18087 if ${ac_cv_search_sem_init+:} false; then :
18091 if ${ac_cv_search_sem_init+:} false; then :
18094 ac_cv_search_sem_init=no
18096 rm conftest.$ac_ext
18097 LIBS=$ac_func_search_save_LIBS
18099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
18100 $as_echo "$ac_cv_search_sem_init" >&6; }
18101 ac_res=$ac_cv_search_sem_init
18102 if test "$ac_res" != no; then :
18103 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18104 USE_UNNAMED_POSIX_SEMAPHORES=1
18108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
18109 $as_echo_n "checking which semaphore API to use... " >&6; }
18110 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
18112 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18114 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18115 sematype="named POSIX"
18117 if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
18119 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18121 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18122 sematype="unnamed POSIX"
18125 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
18127 SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
18128 sematype="System V"
18131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
18132 $as_echo "$sematype" >&6; }
18135 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
18137 SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
18141 # Select shared-memory implementation type.
18142 if test "$PORTNAME" != "win32"; then
18144 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
18146 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
18149 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
18151 SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
18154 # Select random number source
18156 # You can override this logic by setting the appropriate USE_*RANDOM flag to 1
18157 # in the template or configure command line.
18159 # If not selected manually, try to select a source automatically.
18160 if test x"$USE_OPENSSL_RANDOM" = x"" && test x"$USE_WIN32_RANDOM" = x"" && test x"$USE_DEV_URANDOM" = x"" ; then
18161 if test x"$with_openssl" = x"yes" ; then
18162 USE_OPENSSL_RANDOM=1
18163 elif test "$PORTNAME" = "win32" ; then
18166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
18167 $as_echo_n "checking for /dev/urandom... " >&6; }
18168 if ${ac_cv_file__dev_urandom+:} false; then :
18169 $as_echo_n "(cached) " >&6
18171 test "$cross_compiling" = yes &&
18172 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
18173 if test -r "/dev/urandom"; then
18174 ac_cv_file__dev_urandom=yes
18176 ac_cv_file__dev_urandom=no
18179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
18180 $as_echo "$ac_cv_file__dev_urandom" >&6; }
18181 if test "x$ac_cv_file__dev_urandom" = xyes; then :
18186 if test x"$ac_cv_file__dev_urandom" = x"yes" ; then
18192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
18193 $as_echo_n "checking which random number source to use... " >&6; }
18194 if test x"$USE_OPENSSL_RANDOM" = x"1" ; then
18196 $as_echo "#define USE_OPENSSL_RANDOM 1" >>confdefs.h
18198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
18199 $as_echo "OpenSSL" >&6; }
18200 elif test x"$USE_WIN32_RANDOM" = x"1" ; then
18202 $as_echo "#define USE_WIN32_RANDOM 1" >>confdefs.h
18204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
18205 $as_echo "Windows native" >&6; }
18206 elif test x"$USE_DEV_URANDOM" = x"1" ; then
18208 $as_echo "#define USE_DEV_URANDOM 1" >>confdefs.h
18210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
18211 $as_echo "/dev/urandom" >&6; }
18214 no source of strong random numbers was found
18215 PostgreSQL can use OpenSSL or /dev/urandom as a source of random numbers." "$LINENO" 5
18218 # If not set in template file, set bytes to use libc memset()
18219 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
18220 MEMSET_LOOP_LIMIT=1024
18223 cat >>confdefs.h <<_ACEOF
18224 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
18229 if test "$enable_nls" = yes ; then
18231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
18232 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
18233 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18234 $as_echo_n "(cached) " >&6
18236 ac_func_search_save_LIBS=$LIBS
18237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18238 /* end confdefs.h. */
18240 /* Override any GCC internal prototype to avoid an error.
18241 Use char because int might match the return type of a GCC
18242 builtin and then its argument prototype would still apply. */
18246 char bind_textdomain_codeset ();
18250 return bind_textdomain_codeset ();
18255 for ac_lib in '' intl; do
18256 if test -z "$ac_lib"; then
18257 ac_res="none required"
18260 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18262 if ac_fn_c_try_link "$LINENO"; then :
18263 ac_cv_search_bind_textdomain_codeset=$ac_res
18265 rm -f core conftest.err conftest.$ac_objext \
18267 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18271 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18274 ac_cv_search_bind_textdomain_codeset=no
18276 rm conftest.$ac_ext
18277 LIBS=$ac_func_search_save_LIBS
18279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
18280 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
18281 ac_res=$ac_cv_search_bind_textdomain_codeset
18282 if test "$ac_res" != no; then :
18283 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18286 as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
18289 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
18290 if test "x$ac_cv_header_libintl_h" = xyes; then :
18293 as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
18297 if test -z "$MSGFMT"; then
18298 for ac_prog in msgfmt
18300 # Extract the first word of "$ac_prog", so it can be a program name with args.
18301 set dummy $ac_prog; ac_word=$2
18302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18303 $as_echo_n "checking for $ac_word... " >&6; }
18304 if ${ac_cv_path_MSGFMT+:} false; then :
18305 $as_echo_n "(cached) " >&6
18309 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
18312 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18313 for as_dir in $PATH
18316 test -z "$as_dir" && as_dir=.
18317 for ac_exec_ext in '' $ac_executable_extensions; do
18318 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18319 ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
18320 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18330 MSGFMT=$ac_cv_path_MSGFMT
18331 if test -n "$MSGFMT"; then
18332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18333 $as_echo "$MSGFMT" >&6; }
18335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18336 $as_echo "no" >&6; }
18340 test -n "$MSGFMT" && break
18344 # Report the value of MSGFMT in configure's output in all cases.
18345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
18346 $as_echo_n "checking for MSGFMT... " >&6; }
18347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18348 $as_echo "$MSGFMT" >&6; }
18351 if test -z "$MSGFMT"; then
18352 as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
18354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
18355 $as_echo_n "checking for msgfmt flags... " >&6; }
18356 if ${pgac_cv_msgfmt_flags+:} false; then :
18357 $as_echo_n "(cached) " >&6
18359 if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
18360 pgac_cv_msgfmt_flags=-c
18363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
18364 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
18365 MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
18367 if test -z "$MSGMERGE"; then
18368 for ac_prog in msgmerge
18370 # Extract the first word of "$ac_prog", so it can be a program name with args.
18371 set dummy $ac_prog; ac_word=$2
18372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18373 $as_echo_n "checking for $ac_word... " >&6; }
18374 if ${ac_cv_path_MSGMERGE+:} false; then :
18375 $as_echo_n "(cached) " >&6
18379 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18382 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18383 for as_dir in $PATH
18386 test -z "$as_dir" && as_dir=.
18387 for ac_exec_ext in '' $ac_executable_extensions; do
18388 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18389 ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
18390 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18400 MSGMERGE=$ac_cv_path_MSGMERGE
18401 if test -n "$MSGMERGE"; then
18402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18403 $as_echo "$MSGMERGE" >&6; }
18405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18406 $as_echo "no" >&6; }
18410 test -n "$MSGMERGE" && break
18414 # Report the value of MSGMERGE in configure's output in all cases.
18415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18416 $as_echo_n "checking for MSGMERGE... " >&6; }
18417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18418 $as_echo "$MSGMERGE" >&6; }
18421 if test -z "$XGETTEXT"; then
18422 for ac_prog in xgettext
18424 # Extract the first word of "$ac_prog", so it can be a program name with args.
18425 set dummy $ac_prog; ac_word=$2
18426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18427 $as_echo_n "checking for $ac_word... " >&6; }
18428 if ${ac_cv_path_XGETTEXT+:} false; then :
18429 $as_echo_n "(cached) " >&6
18433 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18436 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18437 for as_dir in $PATH
18440 test -z "$as_dir" && as_dir=.
18441 for ac_exec_ext in '' $ac_executable_extensions; do
18442 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18443 ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18444 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18454 XGETTEXT=$ac_cv_path_XGETTEXT
18455 if test -n "$XGETTEXT"; then
18456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18457 $as_echo "$XGETTEXT" >&6; }
18459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18460 $as_echo "no" >&6; }
18464 test -n "$XGETTEXT" && break
18468 # Report the value of XGETTEXT in configure's output in all cases.
18469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18470 $as_echo_n "checking for XGETTEXT... " >&6; }
18471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18472 $as_echo "$XGETTEXT" >&6; }
18478 # Check for Tcl configuration script tclConfig.sh
18479 if test "$with_tcl" = yes; then
18480 if test -z "$TCLSH"; then
18481 for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18483 # Extract the first word of "$ac_prog", so it can be a program name with args.
18484 set dummy $ac_prog; ac_word=$2
18485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18486 $as_echo_n "checking for $ac_word... " >&6; }
18487 if ${ac_cv_path_TCLSH+:} false; then :
18488 $as_echo_n "(cached) " >&6
18492 ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18495 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18496 for as_dir in $PATH
18499 test -z "$as_dir" && as_dir=.
18500 for ac_exec_ext in '' $ac_executable_extensions; do
18501 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18502 ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18503 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18513 TCLSH=$ac_cv_path_TCLSH
18514 if test -n "$TCLSH"; then
18515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18516 $as_echo "$TCLSH" >&6; }
18518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18519 $as_echo "no" >&6; }
18523 test -n "$TCLSH" && break
18527 # Report the value of TCLSH in configure's output in all cases.
18528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18529 $as_echo_n "checking for TCLSH... " >&6; }
18530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18531 $as_echo "$TCLSH" >&6; }
18534 if test x"$TCLSH" = x""; then
18535 as_fn_error $? "Tcl shell not found" "$LINENO" 5
18538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18539 $as_echo_n "checking for tclConfig.sh... " >&6; }
18540 # Let user override test
18541 if test -z "$TCL_CONFIG_SH"; then
18542 pgac_test_dirs="$with_tclconfig"
18544 set X $pgac_test_dirs; shift
18545 if test $# -eq 0; then
18546 test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18547 pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18548 # On newer macOS, $auto_path frequently doesn't include the place
18549 # where tclConfig.sh actually lives. Append that to the end, so as not
18550 # to break cases where a non-default Tcl installation is being used.
18551 if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18552 pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18554 set X $pgac_test_dirs; shift
18558 if test -r "$pgac_dir/tclConfig.sh"; then
18559 TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18565 if test -z "$TCL_CONFIG_SH"; then
18566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18567 $as_echo "no" >&6; }
18568 as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18571 $as_echo "$TCL_CONFIG_SH" >&6; }
18577 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18578 eval TCL_LIBS=\"$TCL_LIBS\"
18579 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18580 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18582 if test "$TCL_SHARED_BUILD" != 1; then
18583 as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18584 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18586 # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18587 ac_save_CPPFLAGS=$CPPFLAGS
18588 CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18589 ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18590 if test "x$ac_cv_header_tcl_h" = xyes; then :
18593 as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18597 CPPFLAGS=$ac_save_CPPFLAGS
18600 # check for <perl.h>
18601 if test "$with_perl" = yes; then
18602 ac_save_CPPFLAGS=$CPPFLAGS
18603 CPPFLAGS="$CPPFLAGS $perl_includespec"
18604 ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18606 if test "x$ac_cv_header_perl_h" = xyes; then :
18609 as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18613 # While we're at it, check that we can link to libperl.
18614 # On most platforms, if perl.h is there then libperl.so will be too, but at
18615 # this writing Debian packages them separately. There is no known reason to
18616 # waste cycles on separate probes for the Tcl or Python libraries, though.
18617 pgac_save_LIBS=$LIBS
18618 LIBS="$perl_embed_ldflags"
18619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18620 $as_echo_n "checking for libperl... " >&6; }
18621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18622 /* end confdefs.h. */
18624 #include <EXTERN.h>
18635 if ac_fn_c_try_link "$LINENO"; then :
18636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18637 $as_echo "yes" >&6; }
18639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18640 $as_echo "no" >&6; }
18641 as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18643 rm -f core conftest.err conftest.$ac_objext \
18644 conftest$ac_exeext conftest.$ac_ext
18645 LIBS=$pgac_save_LIBS
18646 CPPFLAGS=$ac_save_CPPFLAGS
18649 # check for <Python.h>
18650 if test "$with_python" = yes; then
18651 ac_save_CPPFLAGS=$CPPFLAGS
18652 CPPFLAGS="$python_includespec $CPPFLAGS"
18653 ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18654 if test "x$ac_cv_header_Python_h" = xyes; then :
18657 as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18661 CPPFLAGS=$ac_save_CPPFLAGS
18665 # Check for DocBook and tools
18667 if test -z "$XMLLINT"; then
18668 for ac_prog in xmllint
18670 # Extract the first word of "$ac_prog", so it can be a program name with args.
18671 set dummy $ac_prog; ac_word=$2
18672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18673 $as_echo_n "checking for $ac_word... " >&6; }
18674 if ${ac_cv_path_XMLLINT+:} false; then :
18675 $as_echo_n "(cached) " >&6
18679 ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18682 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18683 for as_dir in $PATH
18686 test -z "$as_dir" && as_dir=.
18687 for ac_exec_ext in '' $ac_executable_extensions; do
18688 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18689 ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18690 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18700 XMLLINT=$ac_cv_path_XMLLINT
18701 if test -n "$XMLLINT"; then
18702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18703 $as_echo "$XMLLINT" >&6; }
18705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18706 $as_echo "no" >&6; }
18710 test -n "$XMLLINT" && break
18714 # Report the value of XMLLINT in configure's output in all cases.
18715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18716 $as_echo_n "checking for XMLLINT... " >&6; }
18717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18718 $as_echo "$XMLLINT" >&6; }
18722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook XML V4.2" >&5
18723 $as_echo_n "checking for DocBook XML V4.2... " >&6; }
18724 if ${pgac_cv_check_docbook+:} false; then :
18725 $as_echo_n "(cached) " >&6
18727 cat >conftest.xml <<EOF
18728 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
18730 <title>test</title>
18732 <title>random</title>
18734 <title>testsect</title>
18741 pgac_cv_check_docbook=no
18743 if test -n "$XMLLINT"; then
18744 $XMLLINT --noout --valid conftest.xml 1>&5 2>&1
18745 if test $? -eq 0; then
18746 pgac_cv_check_docbook=yes
18751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
18752 $as_echo "$pgac_cv_check_docbook" >&6; }
18754 have_docbook=$pgac_cv_check_docbook
18757 if test -z "$DBTOEPUB"; then
18758 for ac_prog in dbtoepub
18760 # Extract the first word of "$ac_prog", so it can be a program name with args.
18761 set dummy $ac_prog; ac_word=$2
18762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18763 $as_echo_n "checking for $ac_word... " >&6; }
18764 if ${ac_cv_path_DBTOEPUB+:} false; then :
18765 $as_echo_n "(cached) " >&6
18769 ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
18772 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18773 for as_dir in $PATH
18776 test -z "$as_dir" && as_dir=.
18777 for ac_exec_ext in '' $ac_executable_extensions; do
18778 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18779 ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
18780 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18790 DBTOEPUB=$ac_cv_path_DBTOEPUB
18791 if test -n "$DBTOEPUB"; then
18792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18793 $as_echo "$DBTOEPUB" >&6; }
18795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18796 $as_echo "no" >&6; }
18800 test -n "$DBTOEPUB" && break
18804 # Report the value of DBTOEPUB in configure's output in all cases.
18805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
18806 $as_echo_n "checking for DBTOEPUB... " >&6; }
18807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18808 $as_echo "$DBTOEPUB" >&6; }
18811 if test -z "$XSLTPROC"; then
18812 for ac_prog in xsltproc
18814 # Extract the first word of "$ac_prog", so it can be a program name with args.
18815 set dummy $ac_prog; ac_word=$2
18816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18817 $as_echo_n "checking for $ac_word... " >&6; }
18818 if ${ac_cv_path_XSLTPROC+:} false; then :
18819 $as_echo_n "(cached) " >&6
18823 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18826 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18827 for as_dir in $PATH
18830 test -z "$as_dir" && as_dir=.
18831 for ac_exec_ext in '' $ac_executable_extensions; do
18832 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18833 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18834 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18844 XSLTPROC=$ac_cv_path_XSLTPROC
18845 if test -n "$XSLTPROC"; then
18846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18847 $as_echo "$XSLTPROC" >&6; }
18849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18850 $as_echo "no" >&6; }
18854 test -n "$XSLTPROC" && break
18858 # Report the value of XSLTPROC in configure's output in all cases.
18859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18860 $as_echo_n "checking for XSLTPROC... " >&6; }
18861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18862 $as_echo "$XSLTPROC" >&6; }
18865 if test -z "$FOP"; then
18868 # Extract the first word of "$ac_prog", so it can be a program name with args.
18869 set dummy $ac_prog; ac_word=$2
18870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18871 $as_echo_n "checking for $ac_word... " >&6; }
18872 if ${ac_cv_path_FOP+:} false; then :
18873 $as_echo_n "(cached) " >&6
18877 ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
18880 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18881 for as_dir in $PATH
18884 test -z "$as_dir" && as_dir=.
18885 for ac_exec_ext in '' $ac_executable_extensions; do
18886 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18887 ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
18888 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18898 FOP=$ac_cv_path_FOP
18899 if test -n "$FOP"; then
18900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18901 $as_echo "$FOP" >&6; }
18903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18904 $as_echo "no" >&6; }
18908 test -n "$FOP" && break
18912 # Report the value of FOP in configure's output in all cases.
18913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
18914 $as_echo_n "checking for FOP... " >&6; }
18915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18916 $as_echo "$FOP" >&6; }
18921 # Check for test tools
18923 if test "$enable_tap_tests" = yes; then
18924 # Check for necessary modules, unless user has specified the "prove" to use;
18925 # in that case it's her responsibility to have a working configuration.
18926 # (prove might be part of a different Perl installation than perl, eg on
18927 # MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)
18928 if test -z "$PROVE"; then
18929 # Test::More and Time::HiRes are supposed to be part of core Perl,
18930 # but some distros omit them in a minimal installation.
18941 # Make sure we have perl
18942 if test -z "$PERL"; then
18943 # Extract the first word of "perl", so it can be a program name with args.
18944 set dummy perl; ac_word=$2
18945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18946 $as_echo_n "checking for $ac_word... " >&6; }
18947 if ${ac_cv_prog_PERL+:} false; then :
18948 $as_echo_n "(cached) " >&6
18950 if test -n "$PERL"; then
18951 ac_cv_prog_PERL="$PERL" # Let the user override the test.
18953 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18954 for as_dir in $PATH
18957 test -z "$as_dir" && as_dir=.
18958 for ac_exec_ext in '' $ac_executable_extensions; do
18959 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18960 ac_cv_prog_PERL="perl"
18961 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18970 PERL=$ac_cv_prog_PERL
18971 if test -n "$PERL"; then
18972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
18973 $as_echo "$PERL" >&6; }
18975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18976 $as_echo "no" >&6; }
18982 if test "x$PERL" != x; then
18983 ax_perl_modules_failed=0
18984 for ax_perl_module in 'IPC::Run' 'Test::More 0.87' 'Time::HiRes' ; do
18985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl module $ax_perl_module" >&5
18986 $as_echo_n "checking for perl module $ax_perl_module... " >&6; }
18988 # Would be nice to log result here, but can't rely on autoconf internals
18989 $PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1
18990 if test $? -ne 0; then
18991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18992 $as_echo "no" >&6; };
18993 ax_perl_modules_failed=1
18995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
18996 $as_echo "ok" >&6; };
19000 # Run optional shell commands
19001 if test "$ax_perl_modules_failed" = 0; then
19006 as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
19009 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5
19010 $as_echo "$as_me: WARNING: could not find perl" >&2;}
19013 # Now make sure we know where prove is
19014 if test -z "$PROVE"; then
19015 for ac_prog in prove
19017 # Extract the first word of "$ac_prog", so it can be a program name with args.
19018 set dummy $ac_prog; ac_word=$2
19019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19020 $as_echo_n "checking for $ac_word... " >&6; }
19021 if ${ac_cv_path_PROVE+:} false; then :
19022 $as_echo_n "(cached) " >&6
19026 ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
19029 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19030 for as_dir in $PATH
19033 test -z "$as_dir" && as_dir=.
19034 for ac_exec_ext in '' $ac_executable_extensions; do
19035 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19036 ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
19037 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19047 PROVE=$ac_cv_path_PROVE
19048 if test -n "$PROVE"; then
19049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19050 $as_echo "$PROVE" >&6; }
19052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19053 $as_echo "no" >&6; }
19057 test -n "$PROVE" && break
19061 # Report the value of PROVE in configure's output in all cases.
19062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
19063 $as_echo_n "checking for PROVE... " >&6; }
19064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19065 $as_echo "$PROVE" >&6; }
19068 if test -z "$PROVE"; then
19069 as_fn_error $? "prove not found" "$LINENO" 5
19075 # We have to run the thread test near the end so we have all our symbols
19076 # defined. Cross compiling throws a warning.
19078 if test "$enable_thread_safety" = yes; then
19079 if test "$PORTNAME" != "win32"
19081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
19082 $as_echo_n "checking thread safety of required library functions... " >&6; }
19086 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
19087 LIBS="$LIBS $PTHREAD_LIBS"
19088 if test "$cross_compiling" = yes; then :
19089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
19090 $as_echo "maybe" >&6; }
19091 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
19092 *** Skipping thread test program because of cross-compile build.
19093 *** Run the program in src/test/thread on the target machine.
19095 $as_echo "$as_me: WARNING:
19096 *** Skipping thread test program because of cross-compile build.
19097 *** Run the program in src/test/thread on the target machine.
19100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19101 /* end confdefs.h. */
19102 #include "$srcdir/src/test/thread/thread_test.c"
19104 if ac_fn_c_try_run "$LINENO"; then :
19105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19106 $as_echo "yes" >&6; }
19108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19109 $as_echo "no" >&6; }
19110 as_fn_error $? "thread test program failed
19111 This platform is not thread-safe. Check the file 'config.log' or compile
19112 and run src/test/thread/thread_test for the exact reason.
19113 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
19115 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19116 conftest.$ac_objext conftest.beam conftest.$ac_ext
19122 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
19123 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
19127 # If compiler will take -Wl,--as-needed (or various platform-specific
19128 # spellings thereof) then add that to LDFLAGS. This is much easier than
19129 # trying to filter LIBS to the minimum for each executable.
19130 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
19131 # libreadline; therefore we postpone testing it until we know what library
19132 # dependencies readline has. The test code will try to link with $LIBS.
19133 if test "$with_readline" = yes; then
19134 link_test_func=readline
19136 link_test_func=exit
19139 if test "$PORTNAME" = "darwin"; then
19140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
19141 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
19142 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
19143 $as_echo_n "(cached) " >&6
19145 pgac_save_LDFLAGS=$LDFLAGS
19146 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
19147 if test "$cross_compiling" = yes; then :
19148 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
19150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19151 /* end confdefs.h. */
19152 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19161 if ac_fn_c_try_run "$LINENO"; then :
19162 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
19164 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
19166 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19167 conftest.$ac_objext conftest.beam conftest.$ac_ext
19170 LDFLAGS="$pgac_save_LDFLAGS"
19172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
19173 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
19174 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
19175 LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
19178 elif test "$PORTNAME" = "openbsd"; then
19179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
19180 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
19181 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
19182 $as_echo_n "(cached) " >&6
19184 pgac_save_LDFLAGS=$LDFLAGS
19185 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
19186 if test "$cross_compiling" = yes; then :
19187 pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
19189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19190 /* end confdefs.h. */
19191 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19200 if ac_fn_c_try_run "$LINENO"; then :
19201 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
19203 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
19205 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19206 conftest.$ac_objext conftest.beam conftest.$ac_ext
19209 LDFLAGS="$pgac_save_LDFLAGS"
19211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
19212 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
19213 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
19214 LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
19218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
19219 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
19220 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
19221 $as_echo_n "(cached) " >&6
19223 pgac_save_LDFLAGS=$LDFLAGS
19224 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
19225 if test "$cross_compiling" = yes; then :
19226 pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
19228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19229 /* end confdefs.h. */
19230 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19239 if ac_fn_c_try_run "$LINENO"; then :
19240 pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
19242 pgac_cv_prog_cc_ldflags__Wl___as_needed=no
19244 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19245 conftest.$ac_objext conftest.beam conftest.$ac_ext
19248 LDFLAGS="$pgac_save_LDFLAGS"
19250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
19251 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
19252 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
19253 LDFLAGS="$LDFLAGS -Wl,--as-needed"
19258 # Create compiler version string
19259 if test x"$GCC" = x"yes" ; then
19260 cc_string=`${CC} --version | sed q`
19261 case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
19262 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
19263 cc_string=`${CC} -V 2>&1 | sed q`
19269 cat >>confdefs.h <<_ACEOF
19270 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
19274 # Supply a numeric version string for use by 3rd party add-ons
19275 # awk -F is a regex on some platforms, and not on others, so make "." a tab
19276 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
19278 $AWK '{printf "%d%04d", $1, $2}'`"
19280 cat >>confdefs.h <<_ACEOF
19281 #define PG_VERSION_NUM $PG_VERSION_NUM
19286 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
19287 # literally, so that it's possible to override it at build time using
19288 # a command like "make ... PG_SYSROOT=path". This has to be done after
19289 # we've finished all configure checks that depend on CPPFLAGS.
19290 if test x"$PG_SYSROOT" != x; then
19291 CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19296 # Begin output steps
19298 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
19299 $as_echo "$as_me: using compiler=$cc_string" >&6;}
19300 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
19301 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
19302 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
19303 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
19304 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
19305 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
19306 # Currently only used when LLVM is used
19307 if test "$with_llvm" = yes ; then
19308 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
19309 $as_echo "$as_me: using CXX=$CXX" >&6;}
19310 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
19311 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
19312 { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
19313 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
19314 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
19315 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
19316 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
19317 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
19320 # prepare build tree if outside source tree
19321 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
19322 # Note 2: /bin/pwd might be better than shell's built-in at getting
19323 # a symlink-free name.
19324 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
19328 if test "$no_create" != yes; then
19329 $as_echo_n "preparing build tree... " >&6
19330 pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
19331 $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
19332 || as_fn_error $? "failed" "$LINENO" 5
19333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
19334 $as_echo "done" >&6; }
19340 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
19343 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}"
19346 if test "$PORTNAME" = "win32"; then
19347 ac_config_commands="$ac_config_commands check_win32_symlinks"
19351 ac_config_headers="$ac_config_headers src/include/pg_config.h"
19354 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
19357 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
19360 cat >confcache <<\_ACEOF
19361 # This file is a shell script that caches the results of configure
19362 # tests run on this system so they can be shared between configure
19363 # scripts and configure runs, see configure's option --config-cache.
19364 # It is not useful on other systems. If it contains results you don't
19365 # want to keep, you may remove or edit it.
19367 # config.status only pays attention to the cache file if you give it
19368 # the --recheck option to rerun configure.
19370 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19371 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19372 # following values.
19376 # The following way of writing the cache mishandles newlines in values,
19377 # but we know of no workaround that is simple, portable, and efficient.
19378 # So, we kill variables containing newlines.
19379 # Ultrix sh set writes to stderr and can't be redirected directly,
19380 # and sets the high bit in the cache file unless we assign to the vars.
19382 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19383 eval ac_val=\$$ac_var
19387 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19388 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19391 _ | IFS | as_nl) ;; #(
19392 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19393 *) { eval $ac_var=; unset $ac_var;} ;;
19399 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19400 *${as_nl}ac_space=\ *)
19401 # `set' does not quote correctly, so add quotes: double-quote
19402 # substitution turns \\\\ into \\, and sed turns \\ into \.
19405 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19408 # `set' quotes correctly as required by POSIX, so do not add quotes.
19409 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19418 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19420 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19422 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19423 if test -w "$cache_file"; then
19424 if test "x$cache_file" != "x/dev/null"; then
19425 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19426 $as_echo "$as_me: updating cache $cache_file" >&6;}
19427 if test ! -f "$cache_file" || test -h "$cache_file"; then
19428 cat confcache >"$cache_file"
19430 case $cache_file in #(
19432 mv -f confcache "$cache_file"$$ &&
19433 mv -f "$cache_file"$$ "$cache_file" ;; #(
19435 mv -f confcache "$cache_file" ;;
19440 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19441 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19446 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19447 # Let make expand exec_prefix.
19448 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19450 DEFS=-DHAVE_CONFIG_H
19455 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19456 # 1. Remove the extension, and $U if already installed.
19457 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19458 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19459 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19460 # will be set to the directory where LIBOBJS objects are built.
19461 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19462 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19464 LIBOBJS=$ac_libobjs
19466 LTLIBOBJS=$ac_ltlibobjs
19471 : "${CONFIG_STATUS=./config.status}"
19473 ac_clean_files_save=$ac_clean_files
19474 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19475 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19476 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19478 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19480 # Generated by $as_me.
19481 # Run this file to recreate the current configuration.
19482 # Compiler output produced by configure, useful for debugging
19483 # configure, is in config.log if it exists.
19486 ac_cs_recheck=false
19489 SHELL=\${CONFIG_SHELL-$SHELL}
19492 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19493 ## -------------------- ##
19494 ## M4sh Initialization. ##
19495 ## -------------------- ##
19497 # Be more Bourne compatible
19498 DUALCASE=1; export DUALCASE # for MKS sh
19499 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19502 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19503 # is contrary to our usage. Disable this feature.
19504 alias -g '${1+"$@"}'='"$@"'
19505 setopt NO_GLOB_SUBST
19507 case `(set -o) 2>/dev/null` in #(
19519 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19520 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19521 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19522 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19523 # Prefer a ksh shell builtin over an external printf program on Solaris,
19524 # but without wasting forks for bash or zsh.
19525 if test -z "$BASH_VERSION$ZSH_VERSION" \
19526 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19527 as_echo='print -r --'
19528 as_echo_n='print -rn --'
19529 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19530 as_echo='printf %s\n'
19531 as_echo_n='printf %s'
19533 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19534 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19535 as_echo_n='/usr/ucb/echo -n'
19537 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19538 as_echo_n_body='eval
19542 expr "X$arg" : "X\\(.*\\)$as_nl";
19543 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19545 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19547 export as_echo_n_body
19548 as_echo_n='sh -c $as_echo_n_body as_echo'
19550 export as_echo_body
19551 as_echo='sh -c $as_echo_body as_echo'
19554 # The user is always right.
19555 if test "${PATH_SEPARATOR+set}" != set; then
19557 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19558 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19565 # We need space, tab and new line, in precisely that order. Quoting is
19566 # there to prevent editors from complaining about space-tab.
19567 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19568 # splitting by setting IFS to empty value.)
19571 # Find who we are. Look in the path if we contain no directory separator.
19574 *[\\/]* ) as_myself=$0 ;;
19575 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19576 for as_dir in $PATH
19579 test -z "$as_dir" && as_dir=.
19580 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19586 # We did not find ourselves, most probably we were run as `sh COMMAND'
19587 # in which case we are not to be found in the path.
19588 if test "x$as_myself" = x; then
19591 if test ! -f "$as_myself"; then
19592 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19596 # Unset variables that we do not need and which cause bugs (e.g. in
19597 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19598 # suppresses any "Segmentation fault" message there. '((' could
19599 # trigger a bug in pdksh 5.2.14.
19600 for as_var in BASH_ENV ENV MAIL MAILPATH
19601 do eval test x\${$as_var+set} = xset \
19602 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19615 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19618 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19619 # ----------------------------------------
19620 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19621 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19622 # script with STATUS, using 1 if that was 0.
19625 as_status=$1; test $as_status -eq 0 && as_status=1
19627 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19628 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19630 $as_echo "$as_me: error: $2" >&2
19631 as_fn_exit $as_status
19635 # as_fn_set_status STATUS
19636 # -----------------------
19637 # Set $? to STATUS, without forking.
19638 as_fn_set_status ()
19641 } # as_fn_set_status
19643 # as_fn_exit STATUS
19644 # -----------------
19645 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19649 as_fn_set_status $1
19655 # Portably unset VAR.
19658 { eval $1=; unset $1;}
19660 as_unset=as_fn_unset
19661 # as_fn_append VAR VALUE
19662 # ----------------------
19663 # Append the text in VALUE to the end of the definition contained in VAR. Take
19664 # advantage of any shell optimizations that allow amortized linear growth over
19665 # repeated appends, instead of the typical quadratic growth present in naive
19667 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19668 eval 'as_fn_append ()
19679 # as_fn_arith ARG...
19680 # ------------------
19681 # Perform arithmetic evaluation on the ARGs, and store the result in the
19682 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19683 # must be portable across $(()) and expr.
19684 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19685 eval 'as_fn_arith ()
19692 as_val=`expr "$@" || test $? -eq 1`
19697 if expr a : '\(a\)' >/dev/null 2>&1 &&
19698 test "X`expr 00001 : '.*\(...\)'`" = X001; then
19704 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19705 as_basename=basename
19710 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19716 as_me=`$as_basename -- "$0" ||
19717 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19718 X"$0" : 'X\(//\)$' \| \
19719 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19721 sed '/^.*\/\([^/][^/]*\)\/*$/{
19735 # Avoid depending upon Character Ranges.
19736 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19737 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19738 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19739 as_cr_digits='0123456789'
19740 as_cr_alnum=$as_cr_Letters$as_cr_digits
19742 ECHO_C= ECHO_N= ECHO_T=
19743 case `echo -n x` in #(((((
19745 case `echo 'xy\c'` in
19746 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19748 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19755 rm -f conf$$ conf$$.exe conf$$.file
19756 if test -d conf$$.dir; then
19757 rm -f conf$$.dir/conf$$.file
19760 mkdir conf$$.dir 2>/dev/null
19762 if (echo >conf$$.file) 2>/dev/null; then
19763 if ln -s conf$$.file conf$$ 2>/dev/null; then
19765 # ... but there are two gotchas:
19766 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19767 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19768 # In both cases, we have to default to `cp -pR'.
19769 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19771 elif ln conf$$.file conf$$ 2>/dev/null; then
19779 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19780 rmdir conf$$.dir 2>/dev/null
19785 # Create "$as_dir" as a directory, including parents if necessary.
19790 -*) as_dir=./$as_dir;;
19792 test -d "$as_dir" || eval $as_mkdir_p || {
19796 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19797 *) as_qdir=$as_dir;;
19799 as_dirs="'$as_qdir' $as_dirs"
19800 as_dir=`$as_dirname -- "$as_dir" ||
19801 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19802 X"$as_dir" : 'X\(//\)[^/]' \| \
19803 X"$as_dir" : 'X\(//\)$' \| \
19804 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19805 $as_echo X"$as_dir" |
19806 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19810 /^X\(\/\/\)[^/].*/{
19823 test -d "$as_dir" && break
19825 test -z "$as_dirs" || eval "mkdir $as_dirs"
19826 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19830 if mkdir -p . 2>/dev/null; then
19831 as_mkdir_p='mkdir -p "$as_dir"'
19833 test -d ./-p && rmdir ./-p
19838 # as_fn_executable_p FILE
19839 # -----------------------
19840 # Test if FILE is an executable regular file.
19841 as_fn_executable_p ()
19843 test -f "$1" && test -x "$1"
19844 } # as_fn_executable_p
19845 as_test_x='test -x'
19846 as_executable_p=as_fn_executable_p
19848 # Sed expression to map a string onto a valid CPP name.
19849 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19851 # Sed expression to map a string onto a valid variable name.
19852 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19856 ## ----------------------------------- ##
19857 ## Main body of $CONFIG_STATUS script. ##
19858 ## ----------------------------------- ##
19860 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19862 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19863 # Save the log message, to keep $0 and so on meaningful, and to
19864 # report actual input values of CONFIG_FILES etc. instead of their
19865 # values after options handling.
19867 This file was extended by PostgreSQL $as_me 12devel, which was
19868 generated by GNU Autoconf 2.69. Invocation command line was
19870 CONFIG_FILES = $CONFIG_FILES
19871 CONFIG_HEADERS = $CONFIG_HEADERS
19872 CONFIG_LINKS = $CONFIG_LINKS
19873 CONFIG_COMMANDS = $CONFIG_COMMANDS
19876 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19881 case $ac_config_files in *"
19882 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19885 case $ac_config_headers in *"
19886 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19890 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19891 # Files that config.status was made for.
19892 config_files="$ac_config_files"
19893 config_headers="$ac_config_headers"
19894 config_links="$ac_config_links"
19895 config_commands="$ac_config_commands"
19899 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19901 \`$as_me' instantiates files and other configuration actions
19902 from templates according to the current configuration. Unless the files
19903 and actions are specified as TAGs, all are instantiated by default.
19905 Usage: $0 [OPTION]... [TAG]...
19907 -h, --help print this help, then exit
19908 -V, --version print version number and configuration settings, then exit
19909 --config print configuration, then exit
19910 -q, --quiet, --silent
19911 do not print progress messages
19912 -d, --debug don't remove temporary files
19913 --recheck update $as_me by reconfiguring in the same conditions
19914 --file=FILE[:TEMPLATE]
19915 instantiate the configuration file FILE
19916 --header=FILE[:TEMPLATE]
19917 instantiate the configuration header FILE
19919 Configuration files:
19922 Configuration headers:
19925 Configuration links:
19928 Configuration commands:
19931 Report bugs to <pgsql-bugs@lists.postgresql.org>."
19934 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19935 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19937 PostgreSQL config.status 12devel
19938 configured by $0, generated by GNU Autoconf 2.69,
19939 with options \\"\$ac_cs_config\\"
19941 Copyright (C) 2012 Free Software Foundation, Inc.
19942 This config.status script is free software; the Free Software Foundation
19943 gives unlimited permission to copy, distribute and modify it."
19950 test -n "\$AWK" || AWK=awk
19953 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19954 # The default lists apply if the user does not specify any file.
19960 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19961 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19965 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19977 # Handling of the options.
19978 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19980 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19981 $as_echo "$ac_cs_version"; exit ;;
19982 --config | --confi | --conf | --con | --co | --c )
19983 $as_echo "$ac_cs_config"; exit ;;
19984 --debug | --debu | --deb | --de | --d | -d )
19986 --file | --fil | --fi | --f )
19989 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19990 '') as_fn_error $? "missing file argument" ;;
19992 as_fn_append CONFIG_FILES " '$ac_optarg'"
19993 ac_need_defaults=false;;
19994 --header | --heade | --head | --hea )
19997 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19999 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
20000 ac_need_defaults=false;;
20002 # Conflict between --help and --header
20003 as_fn_error $? "ambiguous option: \`$1'
20004 Try \`$0 --help' for more information.";;
20005 --help | --hel | -h )
20006 $as_echo "$ac_cs_usage"; exit ;;
20007 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20008 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20011 # This is an error.
20012 -*) as_fn_error $? "unrecognized option: \`$1'
20013 Try \`$0 --help' for more information." ;;
20015 *) as_fn_append ac_config_targets " $1"
20016 ac_need_defaults=false ;;
20022 ac_configure_extra_args=
20024 if $ac_cs_silent; then
20026 ac_configure_extra_args="$ac_configure_extra_args --silent"
20030 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20031 if \$ac_cs_recheck; then
20032 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20034 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20035 CONFIG_SHELL='$SHELL'
20036 export CONFIG_SHELL
20041 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20045 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20046 ## Running $as_me. ##
20052 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20055 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20057 # Handling of arguments.
20058 for ac_config_target in $ac_config_targets
20060 case $ac_config_target in
20061 "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
20062 "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
20063 "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
20064 "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
20065 "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
20066 "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
20067 "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
20068 "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
20069 "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
20070 "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
20071 "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
20073 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20078 # If the user did not use the arguments to specify the items to instantiate,
20079 # then the envvar interface is used. Set only those that are not.
20080 # We use the long form for the default assignment because of an extremely
20081 # bizarre bug on SunOS 4.1.3.
20082 if $ac_need_defaults; then
20083 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20084 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20085 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20086 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20089 # Have a temporary directory for convenience. Make it in the build tree
20090 # simply because there is no reason against having it here, and in addition,
20091 # creating and moving files from /tmp can sometimes cause problems.
20092 # Hook for its removal unless debugging.
20093 # Note that there is a small window in which the directory will not be cleaned:
20094 # after its creation but before its name has been assigned to `$tmp'.
20098 trap 'exit_status=$?
20099 : "${ac_tmp:=$tmp}"
20100 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20102 trap 'as_fn_exit 1' 1 2 13 15
20104 # Create a (secure) tmp directory for tmp files.
20107 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20111 tmp=./conf$$-$RANDOM
20112 (umask 077 && mkdir "$tmp")
20113 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20116 # Set up the scripts for CONFIG_FILES section.
20117 # No need to generate them if there are no CONFIG_FILES.
20118 # This happens for instance with `./config.status config.h'.
20119 if test -n "$CONFIG_FILES"; then
20122 ac_cr=`echo X | tr X '\015'`
20123 # On cygwin, bash can eat \r inside `` if the user requested igncr.
20124 # But we know of no other shell where ac_cr would be empty at this
20125 # point, so we can use a bashism as a fallback.
20126 if test "x$ac_cr" = x; then
20127 eval ac_cr=\$\'\\r\'
20129 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20130 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20133 ac_cs_awk_cr=$ac_cr
20136 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20141 echo "cat >conf$$subs.awk <<_ACEOF" &&
20142 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20144 } >conf$$subs.sh ||
20145 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20146 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20148 for ac_last_try in false false false false false :; do
20149 . ./conf$$subs.sh ||
20150 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20152 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20153 if test $ac_delim_n = $ac_delim_num; then
20155 elif $ac_last_try; then
20156 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20158 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20161 rm -f conf$$subs.sh
20163 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20164 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20168 s/^/S["/; s/!.*/"]=/
20178 s/\(.\{148\}\)..*/\1/
20180 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20185 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20192 s/\(.\{148\}\)..*/\1/
20194 s/["\\]/\\&/g; s/^/"/; s/$/"/
20198 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20203 ' <conf$$subs.awk | sed '
20208 ' >>$CONFIG_STATUS || ac_write_fail=1
20209 rm -f conf$$subs.awk
20210 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20212 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20213 for (key in S) S_is_set[key] = 1
20219 nfields = split(line, field, "@")
20221 len = length(field[1])
20222 for (i = 2; i < nfields; i++) {
20224 keylen = length(key)
20225 if (S_is_set[key]) {
20227 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20228 len += length(value) + length(field[++i])
20239 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20240 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20241 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20244 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20245 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20248 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20249 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20250 # trailing colons and then remove the whole line if VPATH becomes empty
20251 # (actually we leave an empty line to preserve line numbers).
20252 if test "x$srcdir" = x.; then
20253 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20271 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20272 fi # test -n "$CONFIG_FILES"
20274 # Set up the scripts for CONFIG_HEADERS section.
20275 # No need to generate them if there are no CONFIG_HEADERS.
20276 # This happens for instance with `./config.status Makefile'.
20277 if test -n "$CONFIG_HEADERS"; then
20278 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20282 # Transform confdefs.h into an awk script `defines.awk', embedded as
20283 # here-document in config.status, that substitutes the proper values into
20284 # config.h.in to produce config.h.
20286 # Create a delimiter string that does not exist in confdefs.h, to ease
20287 # handling of long lines.
20289 for ac_last_try in false false :; do
20290 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20291 if test -z "$ac_tt"; then
20293 elif $ac_last_try; then
20294 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20296 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20300 # For the awk script, D is an array of macro values keyed by name,
20301 # likewise P contains macro parameters if any. Preserve backslash
20302 # newline sequences.
20304 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20306 s/.\{148\}/&'"$ac_delim"'/g
20309 s/^[ ]*#[ ]*define[ ][ ]*/ /
20316 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20318 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20322 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20323 D["\1"]=" \3\\\\\\n"\\/p
20325 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20330 s/.\{148\}/&'"$ac_delim"'/g
20335 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20338 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20340 ' <confdefs.h | sed '
20341 s/'"$ac_delim"'/"\\\
20342 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20344 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20345 for (key in D) D_is_set[key] = 1
20348 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20350 split(line, arg, " ")
20351 if (arg[1] == "#") {
20355 defundef = substr(arg[1], 2)
20358 split(mac1, mac2, "(") #)
20360 prefix = substr(line, 1, index(line, defundef) - 1)
20361 if (D_is_set[macro]) {
20362 # Preserve the white space surrounding the "#".
20363 print prefix "define", macro P[macro] D[macro]
20366 # Replace #undef with comments. This is necessary, for example,
20367 # in the case of _POSIX_SOURCE, which is predefined and required
20368 # on some systems where configure will not decide to define it.
20369 if (defundef == "undef") {
20370 print "/*", prefix defundef, macro, "*/"
20378 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20379 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20380 fi # test -n "$CONFIG_HEADERS"
20383 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20388 :[FHLC]) ac_mode=$ac_tag; continue;;
20390 case $ac_mode$ac_tag in
20392 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20393 :[FH]-) ac_tag=-:-;;
20394 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20411 -) ac_f="$ac_tmp/stdin";;
20412 *) # Look for the file first in the build tree, then in the source tree
20413 # (if the path is not absolute). The absolute path cannot be DOS-style,
20414 # because $ac_f cannot contain `:'.
20418 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20420 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20422 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20423 as_fn_append ac_file_inputs " '$ac_f'"
20426 # Let's still pretend it is `configure' which instantiates (i.e., don't
20427 # use $as_me), people would be surprised to read:
20428 # /* config.h. Generated by config.status. */
20429 configure_input='Generated from '`
20430 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20432 if test x"$ac_file" != x-; then
20433 configure_input="$ac_file. $configure_input"
20434 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20435 $as_echo "$as_me: creating $ac_file" >&6;}
20437 # Neutralize special characters interpreted by sed in replacement strings.
20438 case $configure_input in #(
20439 *\&* | *\|* | *\\* )
20440 ac_sed_conf_input=`$as_echo "$configure_input" |
20441 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20442 *) ac_sed_conf_input=$configure_input;;
20446 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20447 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20452 ac_dir=`$as_dirname -- "$ac_file" ||
20453 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20454 X"$ac_file" : 'X\(//\)[^/]' \| \
20455 X"$ac_file" : 'X\(//\)$' \| \
20456 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20457 $as_echo X"$ac_file" |
20458 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20462 /^X\(\/\/\)[^/].*/{
20475 as_dir="$ac_dir"; as_fn_mkdir_p
20479 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20481 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20482 # A ".." for each directory in $ac_dir_suffix.
20483 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20484 case $ac_top_builddir_sub in
20485 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20486 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20489 ac_abs_top_builddir=$ac_pwd
20490 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20491 # for backward compatibility:
20492 ac_top_builddir=$ac_top_build_prefix
20495 .) # We are building in place.
20497 ac_top_srcdir=$ac_top_builddir_sub
20498 ac_abs_top_srcdir=$ac_pwd ;;
20499 [\\/]* | ?:[\\/]* ) # Absolute name.
20500 ac_srcdir=$srcdir$ac_dir_suffix;
20501 ac_top_srcdir=$srcdir
20502 ac_abs_top_srcdir=$srcdir ;;
20503 *) # Relative name.
20504 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20505 ac_top_srcdir=$ac_top_build_prefix$srcdir
20506 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20508 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20518 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20519 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20521 ac_MKDIR_P=$MKDIR_P
20523 [\\/$]* | ?:[\\/]* ) ;;
20524 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20528 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20529 # If the template does not know about datarootdir, expand it.
20530 # FIXME: This hack should be removed a few years after 2.60.
20531 ac_datarootdir_hack=; ac_datarootdir_seen=
20542 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20543 *datarootdir*) ac_datarootdir_seen=yes;;
20544 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20545 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20546 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20548 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20549 ac_datarootdir_hack='
20550 s&@datadir@&$datadir&g
20551 s&@docdir@&$docdir&g
20552 s&@infodir@&$infodir&g
20553 s&@localedir@&$localedir&g
20554 s&@mandir@&$mandir&g
20555 s&\\\${datarootdir}&$datarootdir&g' ;;
20559 # Neutralize VPATH when `$srcdir' = `.'.
20560 # Shell code in configure.ac might set extrasub.
20561 # FIXME: do we really want to maintain this feature?
20562 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20563 ac_sed_extra="$ac_vpsub
20566 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20568 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20569 s|@configure_input@|$ac_sed_conf_input|;t t
20570 s&@top_builddir@&$ac_top_builddir_sub&;t t
20571 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20572 s&@srcdir@&$ac_srcdir&;t t
20573 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20574 s&@top_srcdir@&$ac_top_srcdir&;t t
20575 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20576 s&@builddir@&$ac_builddir&;t t
20577 s&@abs_builddir@&$ac_abs_builddir&;t t
20578 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20579 s&@INSTALL@&$ac_INSTALL&;t t
20580 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20581 $ac_datarootdir_hack
20583 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20584 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20586 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20587 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20588 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20589 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20590 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20591 which seems to be undefined. Please make sure it is defined" >&5
20592 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20593 which seems to be undefined. Please make sure it is defined" >&2;}
20595 rm -f "$ac_tmp/stdin"
20597 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20598 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20600 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20606 if test x"$ac_file" != x-; then
20608 $as_echo "/* $configure_input */" \
20609 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20610 } >"$ac_tmp/config.h" \
20611 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20612 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20613 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20614 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20617 mv "$ac_tmp/config.h" "$ac_file" \
20618 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20621 $as_echo "/* $configure_input */" \
20622 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20623 || as_fn_error $? "could not create -" "$LINENO" 5
20631 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20634 # Prefer the file from the source tree if names are identical.
20635 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20636 ac_source=$srcdir/$ac_source
20639 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20640 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20642 if test ! -r "$ac_source"; then
20643 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20647 # Try a relative symlink, then a hard link, then a copy.
20649 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20650 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20652 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20653 ln "$ac_source" "$ac_file" 2>/dev/null ||
20654 cp -p "$ac_source" "$ac_file" ||
20655 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20658 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20659 $as_echo "$as_me: executing $ac_file commands" >&6;}
20664 case $ac_file$ac_mode in
20665 "check_win32_symlinks":C)
20666 # Links sometimes fail undetected on Mingw -
20667 # so here we detect it and warn the user
20668 for FILE in $CONFIG_LINKS
20670 # test -e works for symlinks in the MinGW console
20671 test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20672 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20675 "src/include/pg_config.h":H)
20676 # Update timestamp for pg_config.h (see Makefile.global)
20677 echo >src/include/stamp-h
20679 "src/include/pg_config_ext.h":H)
20680 # Update timestamp for pg_config_ext.h (see Makefile.global)
20681 echo >src/include/stamp-ext-h
20683 "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20691 ac_clean_files=$ac_clean_files_save
20693 test $ac_write_fail = 0 ||
20694 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20697 # configure is writing to config.log, and then calls config.status.
20698 # config.status does its own redirection, appending to config.log.
20699 # Unfortunately, on DOS this fails, as config.log is still kept open
20700 # by configure, so config.status won't be able to write to it; its
20701 # output is simply discarded. So we exec the FD to /dev/null,
20702 # effectively closing config.log, so it can be properly (re)opened and
20703 # appended to by config.status. When coming back to configure, we
20704 # need to make the FD available again.
20705 if test "$no_create" != yes; then
20707 ac_config_status_args=
20708 test "$silent" = yes &&
20709 ac_config_status_args="$ac_config_status_args --quiet"
20711 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20713 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20714 # would make configure fail if this is the last instruction.
20715 $ac_cs_success || as_fn_exit 1
20717 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20718 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20719 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}