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@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-2018, 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@postgresql.org about your system, including
273 $0: any error possibly output before this message. Then
274 $0: install a modern shell, or manually run the script
275 $0: under such a shell if you do have one."
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@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
807 program_transform_name
820 enable_option_checking
826 enable_integer_datetimes
861 with_libedit_preferred
873 ac_precious_vars='build_alias
896 # Initialize some variables set by options.
898 ac_init_version=false
899 ac_unrecognized_opts=
901 # The variables have the same names as the options, with
902 # dashes changed to underlines.
910 program_transform_name=s,x,x,
918 # Installation directory options.
919 # These are left unexpanded so users can "make install exec_prefix=/foo"
920 # and all the variables that are supposed to be based on exec_prefix
921 # by default will actually change.
922 # Use braces instead of parens because sh, perl, etc. also accept them.
923 # (The list follows the same order as the GNU Coding Standards.)
924 bindir='${exec_prefix}/bin'
925 sbindir='${exec_prefix}/sbin'
926 libexecdir='${exec_prefix}/libexec'
927 datarootdir='${prefix}/share'
928 datadir='${datarootdir}'
929 sysconfdir='${prefix}/etc'
930 sharedstatedir='${prefix}/com'
931 localstatedir='${prefix}/var'
932 includedir='${prefix}/include'
933 oldincludedir='/usr/include'
934 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
935 infodir='${datarootdir}/info'
940 libdir='${exec_prefix}/lib'
941 localedir='${datarootdir}/locale'
942 mandir='${datarootdir}/man'
948 # If the previous option needs an argument, assign it.
949 if test -n "$ac_prev"; then
950 eval $ac_prev=\$ac_option
956 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
961 # Accept the important Cygnus configure options, so we can diagnose typos.
963 case $ac_dashdash$ac_option in
967 -bindir | --bindir | --bindi | --bind | --bin | --bi)
969 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
972 -build | --build | --buil | --bui | --bu)
973 ac_prev=build_alias ;;
974 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
975 build_alias=$ac_optarg ;;
977 -cache-file | --cache-file | --cache-fil | --cache-fi \
978 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
979 ac_prev=cache_file ;;
980 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
981 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
982 cache_file=$ac_optarg ;;
985 cache_file=config.cache ;;
987 -datadir | --datadir | --datadi | --datad)
989 -datadir=* | --datadir=* | --datadi=* | --datad=*)
990 datadir=$ac_optarg ;;
992 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
993 | --dataroo | --dataro | --datar)
994 ac_prev=datarootdir ;;
995 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
996 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
997 datarootdir=$ac_optarg ;;
999 -disable-* | --disable-*)
1000 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1001 # Reject names that are not valid shell variable names.
1002 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1003 as_fn_error $? "invalid feature name: $ac_useropt"
1004 ac_useropt_orig=$ac_useropt
1005 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1006 case $ac_user_opts in
1008 "enable_$ac_useropt"
1010 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1011 ac_unrecognized_sep=', ';;
1013 eval enable_$ac_useropt=no ;;
1015 -docdir | --docdir | --docdi | --doc | --do)
1017 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1018 docdir=$ac_optarg ;;
1020 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1022 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1023 dvidir=$ac_optarg ;;
1025 -enable-* | --enable-*)
1026 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1027 # Reject names that are not valid shell variable names.
1028 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1029 as_fn_error $? "invalid feature name: $ac_useropt"
1030 ac_useropt_orig=$ac_useropt
1031 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1032 case $ac_user_opts in
1034 "enable_$ac_useropt"
1036 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1037 ac_unrecognized_sep=', ';;
1039 eval enable_$ac_useropt=\$ac_optarg ;;
1041 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1042 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1043 | --exec | --exe | --ex)
1044 ac_prev=exec_prefix ;;
1045 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1046 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1047 | --exec=* | --exe=* | --ex=*)
1048 exec_prefix=$ac_optarg ;;
1050 -gas | --gas | --ga | --g)
1051 # Obsolete; use --with-gas.
1054 -help | --help | --hel | --he | -h)
1055 ac_init_help=long ;;
1056 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1057 ac_init_help=recursive ;;
1058 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1059 ac_init_help=short ;;
1061 -host | --host | --hos | --ho)
1062 ac_prev=host_alias ;;
1063 -host=* | --host=* | --hos=* | --ho=*)
1064 host_alias=$ac_optarg ;;
1066 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1068 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1070 htmldir=$ac_optarg ;;
1072 -includedir | --includedir | --includedi | --included | --include \
1073 | --includ | --inclu | --incl | --inc)
1074 ac_prev=includedir ;;
1075 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1076 | --includ=* | --inclu=* | --incl=* | --inc=*)
1077 includedir=$ac_optarg ;;
1079 -infodir | --infodir | --infodi | --infod | --info | --inf)
1081 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1082 infodir=$ac_optarg ;;
1084 -libdir | --libdir | --libdi | --libd)
1086 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1087 libdir=$ac_optarg ;;
1089 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1090 | --libexe | --libex | --libe)
1091 ac_prev=libexecdir ;;
1092 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1093 | --libexe=* | --libex=* | --libe=*)
1094 libexecdir=$ac_optarg ;;
1096 -localedir | --localedir | --localedi | --localed | --locale)
1097 ac_prev=localedir ;;
1098 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1099 localedir=$ac_optarg ;;
1101 -localstatedir | --localstatedir | --localstatedi | --localstated \
1102 | --localstate | --localstat | --localsta | --localst | --locals)
1103 ac_prev=localstatedir ;;
1104 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1105 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1106 localstatedir=$ac_optarg ;;
1108 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1110 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1111 mandir=$ac_optarg ;;
1113 -nfp | --nfp | --nf)
1114 # Obsolete; use --without-fp.
1117 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1118 | --no-cr | --no-c | -n)
1121 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1122 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1125 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1126 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1127 | --oldin | --oldi | --old | --ol | --o)
1128 ac_prev=oldincludedir ;;
1129 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1130 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1131 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1132 oldincludedir=$ac_optarg ;;
1134 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1136 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1137 prefix=$ac_optarg ;;
1139 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1140 | --program-pre | --program-pr | --program-p)
1141 ac_prev=program_prefix ;;
1142 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1143 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1144 program_prefix=$ac_optarg ;;
1146 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1147 | --program-suf | --program-su | --program-s)
1148 ac_prev=program_suffix ;;
1149 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1150 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1151 program_suffix=$ac_optarg ;;
1153 -program-transform-name | --program-transform-name \
1154 | --program-transform-nam | --program-transform-na \
1155 | --program-transform-n | --program-transform- \
1156 | --program-transform | --program-transfor \
1157 | --program-transfo | --program-transf \
1158 | --program-trans | --program-tran \
1159 | --progr-tra | --program-tr | --program-t)
1160 ac_prev=program_transform_name ;;
1161 -program-transform-name=* | --program-transform-name=* \
1162 | --program-transform-nam=* | --program-transform-na=* \
1163 | --program-transform-n=* | --program-transform-=* \
1164 | --program-transform=* | --program-transfor=* \
1165 | --program-transfo=* | --program-transf=* \
1166 | --program-trans=* | --program-tran=* \
1167 | --progr-tra=* | --program-tr=* | --program-t=*)
1168 program_transform_name=$ac_optarg ;;
1170 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1172 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1173 pdfdir=$ac_optarg ;;
1175 -psdir | --psdir | --psdi | --psd | --ps)
1177 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1180 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1181 | -silent | --silent | --silen | --sile | --sil)
1184 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1186 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1188 sbindir=$ac_optarg ;;
1190 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1191 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1192 | --sharedst | --shareds | --shared | --share | --shar \
1194 ac_prev=sharedstatedir ;;
1195 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1196 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1197 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1199 sharedstatedir=$ac_optarg ;;
1201 -site | --site | --sit)
1203 -site=* | --site=* | --sit=*)
1206 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1208 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1209 srcdir=$ac_optarg ;;
1211 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1212 | --syscon | --sysco | --sysc | --sys | --sy)
1213 ac_prev=sysconfdir ;;
1214 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1215 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1216 sysconfdir=$ac_optarg ;;
1218 -target | --target | --targe | --targ | --tar | --ta | --t)
1219 ac_prev=target_alias ;;
1220 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1221 target_alias=$ac_optarg ;;
1223 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1226 -version | --version | --versio | --versi | --vers | -V)
1227 ac_init_version=: ;;
1230 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1231 # Reject names that are not valid shell variable names.
1232 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1233 as_fn_error $? "invalid package name: $ac_useropt"
1234 ac_useropt_orig=$ac_useropt
1235 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1236 case $ac_user_opts in
1240 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1241 ac_unrecognized_sep=', ';;
1243 eval with_$ac_useropt=\$ac_optarg ;;
1245 -without-* | --without-*)
1246 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1247 # Reject names that are not valid shell variable names.
1248 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1249 as_fn_error $? "invalid package name: $ac_useropt"
1250 ac_useropt_orig=$ac_useropt
1251 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1252 case $ac_user_opts in
1256 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1257 ac_unrecognized_sep=', ';;
1259 eval with_$ac_useropt=no ;;
1262 # Obsolete; use --with-x.
1265 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1266 | --x-incl | --x-inc | --x-in | --x-i)
1267 ac_prev=x_includes ;;
1268 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1269 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1270 x_includes=$ac_optarg ;;
1272 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1273 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1274 ac_prev=x_libraries ;;
1275 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1276 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1277 x_libraries=$ac_optarg ;;
1279 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1280 Try \`$0 --help' for more information"
1284 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1285 # Reject names that are not valid shell variable names.
1286 case $ac_envvar in #(
1287 '' | [0-9]* | *[!_$as_cr_alnum]* )
1288 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1290 eval $ac_envvar=\$ac_optarg
1291 export $ac_envvar ;;
1294 # FIXME: should be removed in autoconf 3.0.
1295 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1296 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1297 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1298 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1304 if test -n "$ac_prev"; then
1305 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1306 as_fn_error $? "missing argument to $ac_option"
1309 if test -n "$ac_unrecognized_opts"; then
1310 case $enable_option_checking in
1312 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1313 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1317 # Check all directory arguments for consistency.
1318 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1319 datadir sysconfdir sharedstatedir localstatedir includedir \
1320 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1321 libdir localedir mandir
1323 eval ac_val=\$$ac_var
1324 # Remove trailing slashes.
1327 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1328 eval $ac_var=\$ac_val;;
1330 # Be sure to have absolute directory names.
1332 [\\/$]* | ?:[\\/]* ) continue;;
1333 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1335 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1338 # There might be people who depend on the old broken behavior: `$host'
1339 # used to hold the argument of --host etc.
1340 # FIXME: To remove some day.
1343 target=$target_alias
1345 # FIXME: To remove some day.
1346 if test "x$host_alias" != x; then
1347 if test "x$build_alias" = x; then
1348 cross_compiling=maybe
1349 elif test "x$build_alias" != "x$host_alias"; then
1355 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1357 test "$silent" = yes && exec 6>/dev/null
1360 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1361 ac_ls_di=`ls -di .` &&
1362 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1363 as_fn_error $? "working directory cannot be determined"
1364 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1365 as_fn_error $? "pwd does not report name of working directory"
1368 # Find the source files, if location was not specified.
1369 if test -z "$srcdir"; then
1370 ac_srcdir_defaulted=yes
1371 # Try the directory containing this script, then the parent directory.
1372 ac_confdir=`$as_dirname -- "$as_myself" ||
1373 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1374 X"$as_myself" : 'X\(//\)[^/]' \| \
1375 X"$as_myself" : 'X\(//\)$' \| \
1376 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1377 $as_echo X"$as_myself" |
1378 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1396 if test ! -r "$srcdir/$ac_unique_file"; then
1400 ac_srcdir_defaulted=no
1402 if test ! -r "$srcdir/$ac_unique_file"; then
1403 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1404 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1406 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1408 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1410 # When building in place, set srcdir=.
1411 if test "$ac_abs_confdir" = "$ac_pwd"; then
1414 # Remove unnecessary trailing slashes from srcdir.
1415 # Double slashes in file names in object file debugging info
1416 # mess up M-x gdb in Emacs.
1418 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1420 for ac_var in $ac_precious_vars; do
1421 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1422 eval ac_env_${ac_var}_value=\$${ac_var}
1423 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1424 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1428 # Report the --help message.
1430 if test "$ac_init_help" = "long"; then
1431 # Omit some internal or obsolete options to make the list less imposing.
1432 # This message is too long to be a string in the A/UX 3.1 sh.
1434 \`configure' configures PostgreSQL 12devel to adapt to many kinds of systems.
1436 Usage: $0 [OPTION]... [VAR=VALUE]...
1438 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1439 VAR=VALUE. See below for descriptions of some of the useful variables.
1441 Defaults for the options are specified in brackets.
1444 -h, --help display this help and exit
1445 --help=short display options specific to this package
1446 --help=recursive display the short help of all the included packages
1447 -V, --version display version information and exit
1448 -q, --quiet, --silent do not print \`checking ...' messages
1449 --cache-file=FILE cache test results in FILE [disabled]
1450 -C, --config-cache alias for \`--cache-file=config.cache'
1451 -n, --no-create do not create output files
1452 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1454 Installation directories:
1455 --prefix=PREFIX install architecture-independent files in PREFIX
1456 [$ac_default_prefix]
1457 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1460 By default, \`make install' will install all the files in
1461 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1462 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1463 for instance \`--prefix=\$HOME'.
1465 For better control, use the options below.
1467 Fine tuning of the installation directories:
1468 --bindir=DIR user executables [EPREFIX/bin]
1469 --sbindir=DIR system admin executables [EPREFIX/sbin]
1470 --libexecdir=DIR program executables [EPREFIX/libexec]
1471 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1472 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1473 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1474 --libdir=DIR object code libraries [EPREFIX/lib]
1475 --includedir=DIR C header files [PREFIX/include]
1476 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1477 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1478 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1479 --infodir=DIR info documentation [DATAROOTDIR/info]
1480 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1481 --mandir=DIR man documentation [DATAROOTDIR/man]
1482 --docdir=DIR documentation root [DATAROOTDIR/doc/postgresql]
1483 --htmldir=DIR html documentation [DOCDIR]
1484 --dvidir=DIR dvi documentation [DOCDIR]
1485 --pdfdir=DIR pdf documentation [DOCDIR]
1486 --psdir=DIR ps documentation [DOCDIR]
1492 --build=BUILD configure for building on BUILD [guessed]
1493 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1497 if test -n "$ac_init_help"; then
1498 case $ac_init_help in
1499 short | recursive ) echo "Configuration of PostgreSQL 12devel:";;
1504 --disable-option-checking ignore unrecognized --enable/--with options
1505 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1506 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1507 --disable-integer-datetimes
1508 obsolete option, no longer supported
1509 --enable-nls[=LANGUAGES]
1510 enable Native Language Support
1511 --disable-rpath do not embed shared library search path in
1513 --disable-spinlocks do not use spinlocks
1514 --disable-atomics do not use atomic operations
1515 --disable-strong-random do not use a strong random number source
1516 --enable-debug build with debugging symbols (-g)
1517 --enable-profiling build with profiling enabled
1518 --enable-coverage build with coverage testing instrumentation
1519 --enable-dtrace build with DTrace support
1520 --enable-tap-tests enable TAP tests (requires Perl and IPC::Run)
1521 --enable-depend turn on automatic dependency tracking
1522 --enable-cassert enable assertion checks (for debugging)
1523 --disable-thread-safety disable thread-safety in client libraries
1524 --disable-largefile omit support for large files
1525 --disable-float4-byval disable float4 passed by value
1526 --disable-float8-byval disable float8 passed by value
1529 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1530 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1531 --with-extra-version=STRING
1532 append STRING to version
1533 --with-template=NAME override operating system template
1534 --with-includes=DIRS look for additional header files in DIRS
1535 --with-libraries=DIRS look for additional libraries in DIRS
1536 --with-libs=DIRS alternative spelling of --with-libraries
1537 --with-pgport=PORTNUM set default port number [5432]
1538 --with-blocksize=BLOCKSIZE
1539 set table block size in kB [8]
1540 --with-segsize=SEGSIZE set table segment size in GB [1]
1541 --with-wal-blocksize=BLOCKSIZE
1542 set WAL block size in kB [8]
1543 --with-CC=CMD set compiler (deprecated)
1544 --with-llvm build with LLVM based JIT support
1545 --with-icu build with ICU support
1546 --with-tcl build Tcl modules (PL/Tcl)
1547 --with-tclconfig=DIR tclConfig.sh is in DIR
1548 --with-perl build Perl modules (PL/Perl)
1549 --with-python build Python modules (PL/Python)
1550 --with-gssapi build with GSSAPI support
1551 --with-krb-srvnam=NAME default service principal name in Kerberos (GSSAPI)
1553 --with-pam build with PAM support
1554 --with-bsd-auth build with BSD Authentication support
1555 --with-ldap build with LDAP support
1556 --with-bonjour build with Bonjour support
1557 --with-openssl build with OpenSSL support
1558 --with-selinux build with SELinux support
1559 --with-systemd build with systemd support
1560 --without-readline do not use GNU Readline nor BSD Libedit for editing
1561 --with-libedit-preferred
1562 prefer BSD Libedit over GNU Readline
1563 --with-uuid=LIB build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1564 --with-ossp-uuid obsolete spelling of --with-uuid=ossp
1565 --with-libxml build with XML support
1566 --with-libxslt use XSLT support when building contrib/xml2
1567 --with-system-tzdata=DIR
1568 use system time zone data in DIR
1569 --without-zlib do not use Zlib
1570 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1572 Some influential environment variables:
1573 CC C compiler command
1574 CFLAGS C compiler flags
1575 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1576 nonstandard directory <lib dir>
1577 LIBS libraries to pass to the linker, e.g. -l<library>
1578 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1579 you have headers in a nonstandard directory <include dir>
1580 CXX C++ compiler command
1581 CXXFLAGS C++ compiler flags
1582 LLVM_CONFIG path to llvm-config command
1583 CLANG path to clang compiler to generate bitcode
1585 PKG_CONFIG path to pkg-config utility
1587 directories to add to pkg-config's search path
1589 path overriding pkg-config's built-in search path
1590 ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
1591 ICU_LIBS linker flags for ICU, overriding pkg-config
1592 LDFLAGS_EX extra linker flags for linking executables only
1593 LDFLAGS_SL extra linker flags for linking shared libraries only
1595 Use these variables to override the choices made by `configure' or to help
1596 it to find libraries and programs with nonstandard names/locations.
1598 Report bugs to <pgsql-bugs@postgresql.org>.
1603 if test "$ac_init_help" = "recursive"; then
1604 # If there are subdirs, report their specific --help.
1605 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1606 test -d "$ac_dir" ||
1607 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1612 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1614 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1615 # A ".." for each directory in $ac_dir_suffix.
1616 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1617 case $ac_top_builddir_sub in
1618 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1619 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1622 ac_abs_top_builddir=$ac_pwd
1623 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1624 # for backward compatibility:
1625 ac_top_builddir=$ac_top_build_prefix
1628 .) # We are building in place.
1630 ac_top_srcdir=$ac_top_builddir_sub
1631 ac_abs_top_srcdir=$ac_pwd ;;
1632 [\\/]* | ?:[\\/]* ) # Absolute name.
1633 ac_srcdir=$srcdir$ac_dir_suffix;
1634 ac_top_srcdir=$srcdir
1635 ac_abs_top_srcdir=$srcdir ;;
1637 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1638 ac_top_srcdir=$ac_top_build_prefix$srcdir
1639 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1641 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1643 cd "$ac_dir" || { ac_status=$?; continue; }
1644 # Check for guested configure.
1645 if test -f "$ac_srcdir/configure.gnu"; then
1647 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1648 elif test -f "$ac_srcdir/configure"; then
1650 $SHELL "$ac_srcdir/configure" --help=recursive
1652 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1654 cd "$ac_pwd" || { ac_status=$?; break; }
1658 test -n "$ac_init_help" && exit $ac_status
1659 if $ac_init_version; then
1661 PostgreSQL configure 12devel
1662 generated by GNU Autoconf 2.69
1664 Copyright (C) 2012 Free Software Foundation, Inc.
1665 This configure script is free software; the Free Software Foundation
1666 gives unlimited permission to copy, distribute and modify it.
1668 Copyright (c) 1996-2018, PostgreSQL Global Development Group
1673 ## ------------------------ ##
1674 ## Autoconf initialization. ##
1675 ## ------------------------ ##
1677 # ac_fn_c_try_compile LINENO
1678 # --------------------------
1679 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1680 ac_fn_c_try_compile ()
1682 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1683 rm -f conftest.$ac_objext
1684 if { { ac_try="$ac_compile"
1686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1687 *) ac_try_echo=$ac_try;;
1689 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1690 $as_echo "$ac_try_echo"; } >&5
1691 (eval "$ac_compile") 2>conftest.err
1693 if test -s conftest.err; then
1694 grep -v '^ *+' conftest.err >conftest.er1
1695 cat conftest.er1 >&5
1696 mv -f conftest.er1 conftest.err
1698 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1699 test $ac_status = 0; } && {
1700 test -z "$ac_c_werror_flag" ||
1701 test ! -s conftest.err
1702 } && test -s conftest.$ac_objext; then :
1705 $as_echo "$as_me: failed program was:" >&5
1706 sed 's/^/| /' conftest.$ac_ext >&5
1710 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1711 as_fn_set_status $ac_retval
1713 } # ac_fn_c_try_compile
1715 # ac_fn_cxx_try_compile LINENO
1716 # ----------------------------
1717 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1718 ac_fn_cxx_try_compile ()
1720 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1721 rm -f conftest.$ac_objext
1722 if { { ac_try="$ac_compile"
1724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1725 *) ac_try_echo=$ac_try;;
1727 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1728 $as_echo "$ac_try_echo"; } >&5
1729 (eval "$ac_compile") 2>conftest.err
1731 if test -s conftest.err; then
1732 grep -v '^ *+' conftest.err >conftest.er1
1733 cat conftest.er1 >&5
1734 mv -f conftest.er1 conftest.err
1736 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1737 test $ac_status = 0; } && {
1738 test -z "$ac_cxx_werror_flag" ||
1739 test ! -s conftest.err
1740 } && test -s conftest.$ac_objext; then :
1743 $as_echo "$as_me: failed program was:" >&5
1744 sed 's/^/| /' conftest.$ac_ext >&5
1748 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1749 as_fn_set_status $ac_retval
1751 } # ac_fn_cxx_try_compile
1753 # ac_fn_c_try_link LINENO
1754 # -----------------------
1755 # Try to link conftest.$ac_ext, and return whether this succeeded.
1758 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1759 rm -f conftest.$ac_objext conftest$ac_exeext
1760 if { { ac_try="$ac_link"
1762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1763 *) ac_try_echo=$ac_try;;
1765 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1766 $as_echo "$ac_try_echo"; } >&5
1767 (eval "$ac_link") 2>conftest.err
1769 if test -s conftest.err; then
1770 grep -v '^ *+' conftest.err >conftest.er1
1771 cat conftest.er1 >&5
1772 mv -f conftest.er1 conftest.err
1774 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1775 test $ac_status = 0; } && {
1776 test -z "$ac_c_werror_flag" ||
1777 test ! -s conftest.err
1778 } && test -s conftest$ac_exeext && {
1779 test "$cross_compiling" = yes ||
1780 test -x conftest$ac_exeext
1784 $as_echo "$as_me: failed program was:" >&5
1785 sed 's/^/| /' conftest.$ac_ext >&5
1789 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1790 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1791 # interfere with the next link command; also delete a directory that is
1792 # left behind by Apple's compiler. We do this before executing the actions.
1793 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1794 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1795 as_fn_set_status $ac_retval
1797 } # ac_fn_c_try_link
1799 # ac_fn_c_try_cpp LINENO
1800 # ----------------------
1801 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1804 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1805 if { { ac_try="$ac_cpp conftest.$ac_ext"
1807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1808 *) ac_try_echo=$ac_try;;
1810 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1811 $as_echo "$ac_try_echo"; } >&5
1812 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1814 if test -s conftest.err; then
1815 grep -v '^ *+' conftest.err >conftest.er1
1816 cat conftest.er1 >&5
1817 mv -f conftest.er1 conftest.err
1819 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1820 test $ac_status = 0; } > conftest.i && {
1821 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1822 test ! -s conftest.err
1826 $as_echo "$as_me: failed program was:" >&5
1827 sed 's/^/| /' conftest.$ac_ext >&5
1831 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1832 as_fn_set_status $ac_retval
1836 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1837 # -------------------------------------------------------
1838 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1839 # the include files in INCLUDES and setting the cache variable VAR
1841 ac_fn_c_check_header_mongrel ()
1843 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1844 if eval \${$3+:} false; then :
1845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1846 $as_echo_n "checking for $2... " >&6; }
1847 if eval \${$3+:} false; then :
1848 $as_echo_n "(cached) " >&6
1851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1852 $as_echo "$ac_res" >&6; }
1854 # Is the header compilable?
1855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1856 $as_echo_n "checking $2 usability... " >&6; }
1857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1858 /* end confdefs.h. */
1862 if ac_fn_c_try_compile "$LINENO"; then :
1863 ac_header_compiler=yes
1865 ac_header_compiler=no
1867 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1869 $as_echo "$ac_header_compiler" >&6; }
1871 # Is the header present?
1872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1873 $as_echo_n "checking $2 presence... " >&6; }
1874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1875 /* end confdefs.h. */
1878 if ac_fn_c_try_cpp "$LINENO"; then :
1879 ac_header_preproc=yes
1881 ac_header_preproc=no
1883 rm -f conftest.err conftest.i conftest.$ac_ext
1884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1885 $as_echo "$ac_header_preproc" >&6; }
1887 # So? What about this header?
1888 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1890 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1891 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1892 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1893 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1896 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1897 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1898 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1899 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1900 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1901 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1902 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1903 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1904 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1905 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1906 ( $as_echo "## ---------------------------------------- ##
1907 ## Report this to pgsql-bugs@postgresql.org ##
1908 ## ---------------------------------------- ##"
1909 ) | sed "s/^/$as_me: WARNING: /" >&2
1912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1913 $as_echo_n "checking for $2... " >&6; }
1914 if eval \${$3+:} false; then :
1915 $as_echo_n "(cached) " >&6
1917 eval "$3=\$ac_header_compiler"
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1921 $as_echo "$ac_res" >&6; }
1923 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1925 } # ac_fn_c_check_header_mongrel
1927 # ac_fn_c_try_run LINENO
1928 # ----------------------
1929 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1930 # that executables *can* be run.
1933 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1934 if { { ac_try="$ac_link"
1936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1937 *) ac_try_echo=$ac_try;;
1939 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1940 $as_echo "$ac_try_echo"; } >&5
1941 (eval "$ac_link") 2>&5
1943 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1944 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1945 { { case "(($ac_try" in
1946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1947 *) ac_try_echo=$ac_try;;
1949 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1950 $as_echo "$ac_try_echo"; } >&5
1951 (eval "$ac_try") 2>&5
1953 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1954 test $ac_status = 0; }; }; then :
1957 $as_echo "$as_me: program exited with status $ac_status" >&5
1958 $as_echo "$as_me: failed program was:" >&5
1959 sed 's/^/| /' conftest.$ac_ext >&5
1961 ac_retval=$ac_status
1963 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1964 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1965 as_fn_set_status $ac_retval
1969 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1970 # -------------------------------------------------------
1971 # Tests whether HEADER exists and can be compiled using the include files in
1972 # INCLUDES, setting the cache variable VAR accordingly.
1973 ac_fn_c_check_header_compile ()
1975 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1977 $as_echo_n "checking for $2... " >&6; }
1978 if eval \${$3+:} false; then :
1979 $as_echo_n "(cached) " >&6
1981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1982 /* end confdefs.h. */
1986 if ac_fn_c_try_compile "$LINENO"; then :
1991 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1995 $as_echo "$ac_res" >&6; }
1996 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1998 } # ac_fn_c_check_header_compile
2000 # ac_fn_c_check_func LINENO FUNC VAR
2001 # ----------------------------------
2002 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2003 ac_fn_c_check_func ()
2005 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2007 $as_echo_n "checking for $2... " >&6; }
2008 if eval \${$3+:} false; then :
2009 $as_echo_n "(cached) " >&6
2011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2012 /* end confdefs.h. */
2013 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2014 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2015 #define $2 innocuous_$2
2017 /* System header to define __stub macros and hopefully few prototypes,
2018 which can conflict with char $2 (); below.
2019 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2020 <limits.h> exists even on freestanding compilers. */
2023 # include <limits.h>
2025 # include <assert.h>
2030 /* Override any GCC internal prototype to avoid an error.
2031 Use char because int might match the return type of a GCC
2032 builtin and then its argument prototype would still apply. */
2037 /* The GNU C library defines this for functions which it implements
2038 to always fail with ENOSYS. Some functions are actually named
2039 something starting with __ and the normal name is an alias. */
2040 #if defined __stub_$2 || defined __stub___$2
2052 if ac_fn_c_try_link "$LINENO"; then :
2057 rm -f core conftest.err conftest.$ac_objext \
2058 conftest$ac_exeext conftest.$ac_ext
2061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2062 $as_echo "$ac_res" >&6; }
2063 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2065 } # ac_fn_c_check_func
2067 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2068 # -------------------------------------------
2069 # Tests whether TYPE exists after having included INCLUDES, setting cache
2070 # variable VAR accordingly.
2071 ac_fn_c_check_type ()
2073 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2075 $as_echo_n "checking for $2... " >&6; }
2076 if eval \${$3+:} false; then :
2077 $as_echo_n "(cached) " >&6
2080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2081 /* end confdefs.h. */
2092 if ac_fn_c_try_compile "$LINENO"; then :
2093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2094 /* end confdefs.h. */
2105 if ac_fn_c_try_compile "$LINENO"; then :
2110 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2112 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2116 $as_echo "$ac_res" >&6; }
2117 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2119 } # ac_fn_c_check_type
2121 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2122 # ----------------------------------------------------
2123 # Tries to find if the field MEMBER exists in type AGGR, after including
2124 # INCLUDES, setting cache variable VAR accordingly.
2125 ac_fn_c_check_member ()
2127 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2129 $as_echo_n "checking for $2.$3... " >&6; }
2130 if eval \${$4+:} false; then :
2131 $as_echo_n "(cached) " >&6
2133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2134 /* end confdefs.h. */
2146 if ac_fn_c_try_compile "$LINENO"; then :
2149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2150 /* end confdefs.h. */
2156 if (sizeof ac_aggr.$3)
2162 if ac_fn_c_try_compile "$LINENO"; then :
2167 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2169 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2173 $as_echo "$ac_res" >&6; }
2174 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2176 } # ac_fn_c_check_member
2178 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2179 # --------------------------------------------
2180 # Tries to find the compile-time value of EXPR in a program that includes
2181 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2183 ac_fn_c_compute_int ()
2185 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2186 if test "$cross_compiling" = yes; then
2187 # Depending upon the size, compute the lo and hi bounds.
2188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2189 /* end confdefs.h. */
2194 static int test_array [1 - 2 * !(($2) >= 0)];
2196 return test_array [0];
2202 if ac_fn_c_try_compile "$LINENO"; then :
2205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2206 /* end confdefs.h. */
2211 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2213 return test_array [0];
2219 if ac_fn_c_try_compile "$LINENO"; then :
2220 ac_hi=$ac_mid; break
2222 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2223 if test $ac_lo -le $ac_mid; then
2227 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2229 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2233 /* end confdefs.h. */
2238 static int test_array [1 - 2 * !(($2) < 0)];
2240 return test_array [0];
2246 if ac_fn_c_try_compile "$LINENO"; then :
2249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2250 /* end confdefs.h. */
2255 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2257 return test_array [0];
2263 if ac_fn_c_try_compile "$LINENO"; then :
2264 ac_lo=$ac_mid; break
2266 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2267 if test $ac_mid -le $ac_hi; then
2271 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2273 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2278 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2280 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2281 # Binary search between lo and hi bounds.
2282 while test "x$ac_lo" != "x$ac_hi"; do
2283 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2285 /* end confdefs.h. */
2290 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2292 return test_array [0];
2298 if ac_fn_c_try_compile "$LINENO"; then :
2301 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2306 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2311 /* end confdefs.h. */
2313 static long int longval () { return $2; }
2314 static unsigned long int ulongval () { return $2; }
2321 FILE *f = fopen ("conftest.val", "w");
2326 long int i = longval ();
2329 fprintf (f, "%ld", i);
2333 unsigned long int i = ulongval ();
2336 fprintf (f, "%lu", i);
2338 /* Do not output a trailing newline, as this causes \r\n confusion
2339 on some platforms. */
2340 return ferror (f) || fclose (f) != 0;
2346 if ac_fn_c_try_run "$LINENO"; then :
2347 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2351 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2352 conftest.$ac_objext conftest.beam conftest.$ac_ext
2356 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2357 as_fn_set_status $ac_retval
2359 } # ac_fn_c_compute_int
2361 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2362 # ---------------------------------------------
2363 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2365 ac_fn_c_check_decl ()
2367 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2368 # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2369 as_decl_name=`echo $2|sed 's/ *(.*//'`
2370 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2372 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2373 if eval \${$3+:} false; then :
2374 $as_echo_n "(cached) " >&6
2376 ac_save_werror_flag=$ac_c_werror_flag
2377 ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2379 /* end confdefs.h. */
2384 #ifndef $as_decl_name
2386 (void) $as_decl_use;
2388 (void) $as_decl_name;
2396 if ac_fn_c_try_compile "$LINENO"; then :
2401 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2402 ac_c_werror_flag=$ac_save_werror_flag
2405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2406 $as_echo "$ac_res" >&6; }
2407 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2409 } # ac_fn_c_check_decl
2410 cat >config.log <<_ACEOF
2411 This file contains any messages produced by compilers while
2412 running configure, to aid debugging if configure makes a mistake.
2414 It was created by PostgreSQL $as_me 12devel, which was
2415 generated by GNU Autoconf 2.69. Invocation command line was
2427 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2428 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2429 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2430 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2431 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2433 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2434 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2436 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2437 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2438 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2439 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2440 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2441 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2442 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2446 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2450 test -z "$as_dir" && as_dir=.
2451 $as_echo "PATH: $as_dir"
2467 # Keep a trace of the command line.
2468 # Strip out --no-create and --no-recursion so they do not pile up.
2469 # Strip out --silent because we don't want to record it for future runs.
2470 # Also quote any args containing shell meta-characters.
2471 # Make two passes to allow for proper duplicate-argument suppression.
2475 ac_must_keep_next=false
2481 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2482 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2483 | -silent | --silent | --silen | --sile | --sil)
2486 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2489 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2491 as_fn_append ac_configure_args1 " '$ac_arg'"
2492 if test $ac_must_keep_next = true; then
2493 ac_must_keep_next=false # Got value, back to normal.
2496 *=* | --config-cache | -C | -disable-* | --disable-* \
2497 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2498 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2499 | -with-* | --with-* | -without-* | --without-* | --x)
2500 case "$ac_configure_args0 " in
2501 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2504 -* ) ac_must_keep_next=true ;;
2507 as_fn_append ac_configure_args " '$ac_arg'"
2512 { ac_configure_args0=; unset ac_configure_args0;}
2513 { ac_configure_args1=; unset ac_configure_args1;}
2515 # When interrupted or exit'd, cleanup temporary files, and complete
2516 # config.log. We remove comments because anyway the quotes in there
2517 # would cause problems or look ugly.
2518 # WARNING: Use '\'' to represent an apostrophe within the trap.
2519 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2520 trap 'exit_status=$?
2521 # Save into config.log some information that might help in debugging.
2525 $as_echo "## ---------------- ##
2526 ## Cache variables. ##
2527 ## ---------------- ##"
2529 # The following way of writing the cache mishandles newlines in values,
2531 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2532 eval ac_val=\$$ac_var
2536 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2537 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2540 _ | IFS | as_nl) ;; #(
2541 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2542 *) { eval $ac_var=; unset $ac_var;} ;;
2547 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2548 *${as_nl}ac_space=\ *)
2550 "s/'\''/'\''\\\\'\'''\''/g;
2551 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2554 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2561 $as_echo "## ----------------- ##
2562 ## Output variables. ##
2563 ## ----------------- ##"
2565 for ac_var in $ac_subst_vars
2567 eval ac_val=\$$ac_var
2569 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2571 $as_echo "$ac_var='\''$ac_val'\''"
2575 if test -n "$ac_subst_files"; then
2576 $as_echo "## ------------------- ##
2577 ## File substitutions. ##
2578 ## ------------------- ##"
2580 for ac_var in $ac_subst_files
2582 eval ac_val=\$$ac_var
2584 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2586 $as_echo "$ac_var='\''$ac_val'\''"
2591 if test -s confdefs.h; then
2592 $as_echo "## ----------- ##
2599 test "$ac_signal" != 0 &&
2600 $as_echo "$as_me: caught signal $ac_signal"
2601 $as_echo "$as_me: exit $exit_status"
2603 rm -f core *.core core.conftest.* &&
2604 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2607 for ac_signal in 1 2 13 15; do
2608 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2612 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2613 rm -f -r conftest* confdefs.h
2615 $as_echo "/* confdefs.h */" > confdefs.h
2617 # Predefined preprocessor variables.
2619 cat >>confdefs.h <<_ACEOF
2620 #define PACKAGE_NAME "$PACKAGE_NAME"
2623 cat >>confdefs.h <<_ACEOF
2624 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2627 cat >>confdefs.h <<_ACEOF
2628 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2631 cat >>confdefs.h <<_ACEOF
2632 #define PACKAGE_STRING "$PACKAGE_STRING"
2635 cat >>confdefs.h <<_ACEOF
2636 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2639 cat >>confdefs.h <<_ACEOF
2640 #define PACKAGE_URL "$PACKAGE_URL"
2644 # Let the site file select an alternate cache file if it wants to.
2645 # Prefer an explicitly selected file to automatically selected ones.
2648 if test -n "$CONFIG_SITE"; then
2649 # We do not want a PATH search for config.site.
2650 case $CONFIG_SITE in #((
2651 -*) ac_site_file1=./$CONFIG_SITE;;
2652 */*) ac_site_file1=$CONFIG_SITE;;
2653 *) ac_site_file1=./$CONFIG_SITE;;
2655 elif test "x$prefix" != xNONE; then
2656 ac_site_file1=$prefix/share/config.site
2657 ac_site_file2=$prefix/etc/config.site
2659 ac_site_file1=$ac_default_prefix/share/config.site
2660 ac_site_file2=$ac_default_prefix/etc/config.site
2662 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2664 test "x$ac_site_file" = xNONE && continue
2665 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2667 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2668 sed 's/^/| /' "$ac_site_file" >&5
2670 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2671 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2672 as_fn_error $? "failed to load site script $ac_site_file
2673 See \`config.log' for more details" "$LINENO" 5; }
2677 if test -r "$cache_file"; then
2678 # Some versions of bash will fail to source /dev/null (special files
2679 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2680 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2681 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2682 $as_echo "$as_me: loading cache $cache_file" >&6;}
2684 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2685 *) . "./$cache_file";;
2689 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2690 $as_echo "$as_me: creating cache $cache_file" >&6;}
2694 # Check that the precious variables saved in the cache have kept the same
2696 ac_cache_corrupted=false
2697 for ac_var in $ac_precious_vars; do
2698 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2699 eval ac_new_set=\$ac_env_${ac_var}_set
2700 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2701 eval ac_new_val=\$ac_env_${ac_var}_value
2702 case $ac_old_set,$ac_new_set in
2704 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2705 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2706 ac_cache_corrupted=: ;;
2708 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2709 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2710 ac_cache_corrupted=: ;;
2713 if test "x$ac_old_val" != "x$ac_new_val"; then
2714 # differences in whitespace do not lead to failure.
2715 ac_old_val_w=`echo x $ac_old_val`
2716 ac_new_val_w=`echo x $ac_new_val`
2717 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2718 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2719 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2720 ac_cache_corrupted=:
2722 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2723 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2724 eval $ac_var=\$ac_old_val
2726 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2727 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2728 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2729 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2732 # Pass precious variables to config.status.
2733 if test "$ac_new_set" = set; then
2735 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2736 *) ac_arg=$ac_var=$ac_new_val ;;
2738 case " $ac_configure_args " in
2739 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2740 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2744 if $ac_cache_corrupted; then
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2746 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2748 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2749 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2751 ## -------------------- ##
2752 ## Main body of script. ##
2753 ## -------------------- ##
2756 ac_cpp='$CPP $CPPFLAGS'
2757 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2758 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2759 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2767 for ac_dir in config "$srcdir"/config; do
2768 if test -f "$ac_dir/install-sh"; then
2770 ac_install_sh="$ac_aux_dir/install-sh -c"
2772 elif test -f "$ac_dir/install.sh"; then
2774 ac_install_sh="$ac_aux_dir/install.sh -c"
2776 elif test -f "$ac_dir/shtool"; then
2778 ac_install_sh="$ac_aux_dir/shtool install -c"
2782 if test -z "$ac_aux_dir"; then
2783 as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2786 # These three variables are undocumented and unsupported,
2787 # and are intended to be withdrawn in a future Autoconf release.
2788 # They can cause serious problems if a builder's source tree is in a directory
2789 # whose full name contains unusual characters.
2790 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2791 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2792 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2796 configure_args=$ac_configure_args
2799 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2802 cat >>confdefs.h <<_ACEOF
2803 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2810 # Check whether --with-extra-version was given.
2811 if test "${with_extra_version+set}" = set; then :
2812 withval=$with_extra_version;
2815 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2818 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2821 PG_VERSION="$PACKAGE_VERSION$withval"
2826 PG_VERSION="$PACKAGE_VERSION"
2831 cat >>confdefs.h <<_ACEOF
2832 #define PG_VERSION "$PG_VERSION"
2836 # Make sure we can run config.sub.
2837 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2838 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2841 $as_echo_n "checking build system type... " >&6; }
2842 if ${ac_cv_build+:} false; then :
2843 $as_echo_n "(cached) " >&6
2845 ac_build_alias=$build_alias
2846 test "x$ac_build_alias" = x &&
2847 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2848 test "x$ac_build_alias" = x &&
2849 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2850 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2851 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2855 $as_echo "$ac_cv_build" >&6; }
2856 case $ac_cv_build in
2858 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2861 ac_save_IFS=$IFS; IFS='-'
2867 # Remember, the first character of IFS is used to create $*,
2868 # except with old shells:
2871 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2875 $as_echo_n "checking host system type... " >&6; }
2876 if ${ac_cv_host+:} false; then :
2877 $as_echo_n "(cached) " >&6
2879 if test "x$host_alias" = x; then
2880 ac_cv_host=$ac_cv_build
2882 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2883 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2888 $as_echo "$ac_cv_host" >&6; }
2891 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2894 ac_save_IFS=$IFS; IFS='-'
2900 # Remember, the first character of IFS is used to create $*,
2901 # except with old shells:
2904 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2910 $as_echo_n "checking which template to use... " >&6; }
2915 # Check whether --with-template was given.
2916 if test "${with_template+set}" = set; then :
2917 withval=$with_template;
2920 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2923 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2928 list) echo; ls "$srcdir/src/template"; exit;;
2929 *) if test -f "$srcdir/src/template/$with_template" ; then
2932 as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2941 # --with-template not given
2944 aix*) template=aix ;;
2945 cygwin*) template=cygwin ;;
2946 darwin*) template=darwin ;;
2947 dragonfly*) template=netbsd ;;
2948 freebsd*) template=freebsd ;;
2949 hpux*) template=hpux ;;
2950 linux*|gnu*|k*bsd*-gnu)
2952 mingw*) template=win32 ;;
2953 netbsd*) template=netbsd ;;
2954 openbsd*) template=openbsd ;;
2955 solaris*) template=solaris ;;
2958 if test x"$template" = x"" ; then
2960 *******************************************************************
2961 PostgreSQL has apparently not been ported to your platform yet.
2962 To try a manual configuration, look into the src/template directory
2963 for a similar platform and use the '--with-template=' option.
2965 Please also contact <pgsql-bugs@postgresql.org> to see about
2966 rectifying this. Include the above 'checking host system type...'
2968 *******************************************************************
2977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2978 $as_echo "$template" >&6; }
2983 # Initialize default assumption that we do not need separate assembly code
2984 # for TAS (test-and-set). This can be overridden by the template file
2985 # when it's executed.
2992 ## Command line options
2996 # Add non-standard directories to the include path
3001 # Check whether --with-includes was given.
3002 if test "${with_includes+set}" = set; then :
3003 withval=$with_includes;
3006 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3009 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3022 # Add non-standard directories to the library search path
3027 # Check whether --with-libraries was given.
3028 if test "${with_libraries+set}" = set; then :
3029 withval=$with_libraries;
3032 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3035 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3038 LIBRARY_DIRS=$withval
3049 # Check whether --with-libs was given.
3050 if test "${with_libs+set}" = set; then :
3054 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3057 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3060 LIBRARY_DIRS=$withval
3070 # 64-bit integer date/time storage is now the only option, but to avoid
3071 # unnecessary breakage of build scripts, continue to accept an explicit
3072 # "--enable-integer-datetimes" switch.
3076 # Check whether --enable-integer-datetimes was given.
3077 if test "${enable_integer_datetimes+set}" = set; then :
3078 enableval=$enable_integer_datetimes;
3084 as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3087 as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3092 enable_integer_datetimes=yes
3102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3103 $as_echo_n "checking whether NLS is wanted... " >&6; }
3106 # Check whether --enable-nls was given.
3107 if test "${enable_nls+set}" = set; then :
3108 enableval=$enable_nls;
3118 WANTED_LANGUAGES=$enableval
3128 if test "$enable_nls" = yes; then
3130 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3135 $as_echo "$enable_nls" >&6; }
3140 # Default port number (--with-pgport), default 5432
3142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3143 $as_echo_n "checking for default port number... " >&6; }
3147 # Check whether --with-pgport was given.
3148 if test "${with_pgport+set}" = set; then :
3149 withval=$with_pgport;
3152 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3155 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3158 default_port=$withval
3167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3168 $as_echo "$default_port" >&6; }
3169 # Need both of these because some places want an integer and some a string
3171 cat >>confdefs.h <<_ACEOF
3172 #define DEF_PGPORT ${default_port}
3176 cat >>confdefs.h <<_ACEOF
3177 #define DEF_PGPORT_STR "${default_port}"
3182 # It's worth validating port; you can get very confusing errors otherwise
3183 if test x"$default_port" = x""; then
3184 as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3185 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3186 as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3187 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3188 as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3189 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3190 as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3194 # '-rpath'-like feature can be disabled
3198 # Check whether --enable-rpath was given.
3199 if test "${enable_rpath+set}" = set; then :
3200 enableval=$enable_rpath;
3209 as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3226 # Check whether --enable-spinlocks was given.
3227 if test "${enable_spinlocks+set}" = set; then :
3228 enableval=$enable_spinlocks;
3237 as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3242 enable_spinlocks=yes
3253 # Check whether --enable-atomics was given.
3254 if test "${enable_atomics+set}" = set; then :
3255 enableval=$enable_atomics;
3264 as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3276 # Random number generation
3280 # Check whether --enable-strong-random was given.
3281 if test "${enable_strong_random+set}" = set; then :
3282 enableval=$enable_strong_random;
3291 as_fn_error $? "no argument expected for --enable-strong-random option" "$LINENO" 5
3296 enable_strong_random=yes
3304 # --enable-debug adds -g to compiler flags
3308 # Check whether --enable-debug was given.
3309 if test "${enable_debug+set}" = set; then :
3310 enableval=$enable_debug;
3319 as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3332 # --enable-profiling enables gcc profiling
3336 # Check whether --enable-profiling was given.
3337 if test "${enable_profiling+set}" = set; then :
3338 enableval=$enable_profiling;
3347 as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3359 # --enable-coverage enables generation of code coverage metrics with gcov
3363 # Check whether --enable-coverage was given.
3364 if test "${enable_coverage+set}" = set; then :
3365 enableval=$enable_coverage;
3368 if test -z "$GCOV"; then
3371 # Extract the first word of "$ac_prog", so it can be a program name with args.
3372 set dummy $ac_prog; ac_word=$2
3373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3374 $as_echo_n "checking for $ac_word... " >&6; }
3375 if ${ac_cv_path_GCOV+:} false; then :
3376 $as_echo_n "(cached) " >&6
3380 ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3383 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3387 test -z "$as_dir" && as_dir=.
3388 for ac_exec_ext in '' $ac_executable_extensions; do
3389 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3390 ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3391 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3401 GCOV=$ac_cv_path_GCOV
3402 if test -n "$GCOV"; then
3403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3404 $as_echo "$GCOV" >&6; }
3406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3407 $as_echo "no" >&6; }
3411 test -n "$GCOV" && break
3415 # Report the value of GCOV in configure's output in all cases.
3416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3417 $as_echo_n "checking for GCOV... " >&6; }
3418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3419 $as_echo "$GCOV" >&6; }
3422 if test -z "$GCOV"; then
3423 as_fn_error $? "gcov not found" "$LINENO" 5
3425 if test -z "$LCOV"; then
3428 # Extract the first word of "$ac_prog", so it can be a program name with args.
3429 set dummy $ac_prog; ac_word=$2
3430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3431 $as_echo_n "checking for $ac_word... " >&6; }
3432 if ${ac_cv_path_LCOV+:} false; then :
3433 $as_echo_n "(cached) " >&6
3437 ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3440 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3444 test -z "$as_dir" && as_dir=.
3445 for ac_exec_ext in '' $ac_executable_extensions; do
3446 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3447 ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3448 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3458 LCOV=$ac_cv_path_LCOV
3459 if test -n "$LCOV"; then
3460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3461 $as_echo "$LCOV" >&6; }
3463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3464 $as_echo "no" >&6; }
3468 test -n "$LCOV" && break
3472 # Report the value of LCOV in configure's output in all cases.
3473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3474 $as_echo_n "checking for LCOV... " >&6; }
3475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3476 $as_echo "$LCOV" >&6; }
3479 if test -z "$LCOV"; then
3480 as_fn_error $? "lcov not found" "$LINENO" 5
3482 if test -z "$GENHTML"; then
3483 for ac_prog in genhtml
3485 # Extract the first word of "$ac_prog", so it can be a program name with args.
3486 set dummy $ac_prog; ac_word=$2
3487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3488 $as_echo_n "checking for $ac_word... " >&6; }
3489 if ${ac_cv_path_GENHTML+:} false; then :
3490 $as_echo_n "(cached) " >&6
3494 ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3497 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3501 test -z "$as_dir" && as_dir=.
3502 for ac_exec_ext in '' $ac_executable_extensions; do
3503 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3504 ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3505 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3515 GENHTML=$ac_cv_path_GENHTML
3516 if test -n "$GENHTML"; then
3517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3518 $as_echo "$GENHTML" >&6; }
3520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3521 $as_echo "no" >&6; }
3525 test -n "$GENHTML" && break
3529 # Report the value of GENHTML in configure's output in all cases.
3530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3531 $as_echo_n "checking for GENHTML... " >&6; }
3532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3533 $as_echo "$GENHTML" >&6; }
3536 if test -z "$GENHTML"; then
3537 as_fn_error $? "genhtml not found" "$LINENO" 5
3544 as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3561 # Check whether --enable-dtrace was given.
3562 if test "${enable_dtrace+set}" = set; then :
3563 enableval=$enable_dtrace;
3566 if test -z "$DTRACE"; then
3567 for ac_prog in dtrace
3569 # Extract the first word of "$ac_prog", so it can be a program name with args.
3570 set dummy $ac_prog; ac_word=$2
3571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3572 $as_echo_n "checking for $ac_word... " >&6; }
3573 if ${ac_cv_path_DTRACE+:} false; then :
3574 $as_echo_n "(cached) " >&6
3578 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3581 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3585 test -z "$as_dir" && as_dir=.
3586 for ac_exec_ext in '' $ac_executable_extensions; do
3587 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3588 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3589 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3599 DTRACE=$ac_cv_path_DTRACE
3600 if test -n "$DTRACE"; then
3601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3602 $as_echo "$DTRACE" >&6; }
3604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3605 $as_echo "no" >&6; }
3609 test -n "$DTRACE" && break
3613 # Report the value of DTRACE in configure's output in all cases.
3614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3615 $as_echo_n "checking for DTRACE... " >&6; }
3616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3617 $as_echo "$DTRACE" >&6; }
3620 if test -z "$DTRACE"; then
3621 as_fn_error $? "dtrace not found" "$LINENO" 5
3629 as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3646 # Check whether --enable-tap-tests was given.
3647 if test "${enable_tap_tests+set}" = set; then :
3648 enableval=$enable_tap_tests;
3657 as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3673 $as_echo_n "checking for block size... " >&6; }
3677 # Check whether --with-blocksize was given.
3678 if test "${with_blocksize+set}" = set; then :
3679 withval=$with_blocksize;
3682 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3685 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3697 case ${blocksize} in
3704 *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3707 $as_echo "${blocksize}kB" >&6; }
3710 cat >>confdefs.h <<_ACEOF
3711 #define BLCKSZ ${BLCKSZ}
3716 # Relation segment size
3718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3719 $as_echo_n "checking for segment size... " >&6; }
3723 # Check whether --with-segsize was given.
3724 if test "${with_segsize+set}" = set; then :
3725 withval=$with_segsize;
3728 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3731 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3743 # this expression is set up to avoid unnecessary integer overflow
3744 # blocksize is already guaranteed to be a factor of 1024
3745 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3746 test $? -eq 0 || exit 1
3747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3748 $as_echo "${segsize}GB" >&6; }
3751 cat >>confdefs.h <<_ACEOF
3752 #define RELSEG_SIZE ${RELSEG_SIZE}
3759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3760 $as_echo_n "checking for WAL block size... " >&6; }
3764 # Check whether --with-wal-blocksize was given.
3765 if test "${with_wal_blocksize+set}" = set; then :
3766 withval=$with_wal_blocksize;
3769 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3772 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3775 wal_blocksize=$withval
3784 case ${wal_blocksize} in
3785 1) XLOG_BLCKSZ=1024;;
3786 2) XLOG_BLCKSZ=2048;;
3787 4) XLOG_BLCKSZ=4096;;
3788 8) XLOG_BLCKSZ=8192;;
3789 16) XLOG_BLCKSZ=16384;;
3790 32) XLOG_BLCKSZ=32768;;
3791 64) XLOG_BLCKSZ=65536;;
3792 *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3795 $as_echo "${wal_blocksize}kB" >&6; }
3798 cat >>confdefs.h <<_ACEOF
3799 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3807 # For historical reasons you can also use --with-CC to specify the C compiler
3808 # to use, although the standard way to do this is to set the CC environment
3813 # Check whether --with-CC was given.
3814 if test "${with_CC+set}" = set; then :
3818 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3821 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3833 aix) pgac_cc_list="gcc xlc"; pgac_cxx_list="g++ xlC";;
3834 *) pgac_cc_list="gcc cc"; pgac_cxx_list="g++ c++";;
3838 ac_cpp='$CPP $CPPFLAGS'
3839 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3840 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3841 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3842 if test -n "$ac_tool_prefix"; then
3843 for ac_prog in $pgac_cc_list
3845 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3846 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3848 $as_echo_n "checking for $ac_word... " >&6; }
3849 if ${ac_cv_prog_CC+:} false; then :
3850 $as_echo_n "(cached) " >&6
3852 if test -n "$CC"; then
3853 ac_cv_prog_CC="$CC" # Let the user override the test.
3855 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3859 test -z "$as_dir" && as_dir=.
3860 for ac_exec_ext in '' $ac_executable_extensions; do
3861 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3862 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3863 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3873 if test -n "$CC"; then
3874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3875 $as_echo "$CC" >&6; }
3877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3878 $as_echo "no" >&6; }
3882 test -n "$CC" && break
3885 if test -z "$CC"; then
3887 for ac_prog in $pgac_cc_list
3889 # Extract the first word of "$ac_prog", so it can be a program name with args.
3890 set dummy $ac_prog; ac_word=$2
3891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3892 $as_echo_n "checking for $ac_word... " >&6; }
3893 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3894 $as_echo_n "(cached) " >&6
3896 if test -n "$ac_ct_CC"; then
3897 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3899 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3903 test -z "$as_dir" && as_dir=.
3904 for ac_exec_ext in '' $ac_executable_extensions; do
3905 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3906 ac_cv_prog_ac_ct_CC="$ac_prog"
3907 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3916 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3917 if test -n "$ac_ct_CC"; then
3918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3919 $as_echo "$ac_ct_CC" >&6; }
3921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3922 $as_echo "no" >&6; }
3926 test -n "$ac_ct_CC" && break
3929 if test "x$ac_ct_CC" = x; then
3932 case $cross_compiling:$ac_tool_warned in
3934 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3935 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3936 ac_tool_warned=yes ;;
3943 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3944 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3945 as_fn_error $? "no acceptable C compiler found in \$PATH
3946 See \`config.log' for more details" "$LINENO" 5; }
3948 # Provide some information about the compiler.
3949 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3952 for ac_option in --version -v -V -qversion; do
3953 { { ac_try="$ac_compiler $ac_option >&5"
3955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3956 *) ac_try_echo=$ac_try;;
3958 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3959 $as_echo "$ac_try_echo"; } >&5
3960 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3962 if test -s conftest.err; then
3964 ... rest of stderr output deleted ...
3965 10q' conftest.err >conftest.er1
3966 cat conftest.er1 >&5
3968 rm -f conftest.er1 conftest.err
3969 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3970 test $ac_status = 0; }
3973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3974 /* end confdefs.h. */
3984 ac_clean_files_save=$ac_clean_files
3985 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3986 # Try to create an executable without -o first, disregard a.out.
3987 # It will help us diagnose broken compilers, and finding out an intuition
3989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3990 $as_echo_n "checking whether the C compiler works... " >&6; }
3991 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3993 # The possible output files:
3994 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3997 for ac_file in $ac_files
4000 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4001 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4006 if { { ac_try="$ac_link_default"
4008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4009 *) ac_try_echo=$ac_try;;
4011 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4012 $as_echo "$ac_try_echo"; } >&5
4013 (eval "$ac_link_default") 2>&5
4015 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4016 test $ac_status = 0; }; then :
4017 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4018 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4019 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4020 # so that the user can short-circuit this test for compilers unknown to
4022 for ac_file in $ac_files ''
4024 test -f "$ac_file" || continue
4026 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4029 # We found the default executable, but exeext='' is most
4033 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4035 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4037 # We set ac_cv_exeext here because the later test for it is not
4038 # safe: cross compilers may not add the suffix if given an `-o'
4039 # argument, so we may need to know it at that point already.
4040 # Even if this section looks crufty: it has the advantage of
4047 test "$ac_cv_exeext" = no && ac_cv_exeext=
4052 if test -z "$ac_file"; then :
4053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4054 $as_echo "no" >&6; }
4055 $as_echo "$as_me: failed program was:" >&5
4056 sed 's/^/| /' conftest.$ac_ext >&5
4058 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4059 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4060 as_fn_error 77 "C compiler cannot create executables
4061 See \`config.log' for more details" "$LINENO" 5; }
4063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4064 $as_echo "yes" >&6; }
4066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4067 $as_echo_n "checking for C compiler default output file name... " >&6; }
4068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4069 $as_echo "$ac_file" >&6; }
4070 ac_exeext=$ac_cv_exeext
4072 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4073 ac_clean_files=$ac_clean_files_save
4074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4075 $as_echo_n "checking for suffix of executables... " >&6; }
4076 if { { ac_try="$ac_link"
4078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4079 *) ac_try_echo=$ac_try;;
4081 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4082 $as_echo "$ac_try_echo"; } >&5
4083 (eval "$ac_link") 2>&5
4085 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4086 test $ac_status = 0; }; then :
4087 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4088 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4089 # work properly (i.e., refer to `conftest.exe'), while it won't with
4091 for ac_file in conftest.exe conftest conftest.*; do
4092 test -f "$ac_file" || continue
4094 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4095 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4101 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4102 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4103 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4104 See \`config.log' for more details" "$LINENO" 5; }
4106 rm -f conftest conftest$ac_cv_exeext
4107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4108 $as_echo "$ac_cv_exeext" >&6; }
4110 rm -f conftest.$ac_ext
4111 EXEEXT=$ac_cv_exeext
4113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4114 /* end confdefs.h. */
4119 FILE *f = fopen ("conftest.out", "w");
4120 return ferror (f) || fclose (f) != 0;
4126 ac_clean_files="$ac_clean_files conftest.out"
4127 # Check that the compiler produces executables we can run. If not, either
4128 # the compiler is broken, or we cross compile.
4129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4130 $as_echo_n "checking whether we are cross compiling... " >&6; }
4131 if test "$cross_compiling" != yes; then
4132 { { ac_try="$ac_link"
4134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4135 *) ac_try_echo=$ac_try;;
4137 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4138 $as_echo "$ac_try_echo"; } >&5
4139 (eval "$ac_link") 2>&5
4141 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4142 test $ac_status = 0; }
4143 if { ac_try='./conftest$ac_cv_exeext'
4144 { { case "(($ac_try" in
4145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4146 *) ac_try_echo=$ac_try;;
4148 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4149 $as_echo "$ac_try_echo"; } >&5
4150 (eval "$ac_try") 2>&5
4152 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4153 test $ac_status = 0; }; }; then
4156 if test "$cross_compiling" = maybe; then
4159 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4160 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4161 as_fn_error $? "cannot run C compiled programs.
4162 If you meant to cross compile, use \`--host'.
4163 See \`config.log' for more details" "$LINENO" 5; }
4167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4168 $as_echo "$cross_compiling" >&6; }
4170 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4171 ac_clean_files=$ac_clean_files_save
4172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4173 $as_echo_n "checking for suffix of object files... " >&6; }
4174 if ${ac_cv_objext+:} false; then :
4175 $as_echo_n "(cached) " >&6
4177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4178 /* end confdefs.h. */
4188 rm -f conftest.o conftest.obj
4189 if { { ac_try="$ac_compile"
4191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4192 *) ac_try_echo=$ac_try;;
4194 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4195 $as_echo "$ac_try_echo"; } >&5
4196 (eval "$ac_compile") 2>&5
4198 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4199 test $ac_status = 0; }; then :
4200 for ac_file in conftest.o conftest.obj conftest.*; do
4201 test -f "$ac_file" || continue;
4203 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4204 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4209 $as_echo "$as_me: failed program was:" >&5
4210 sed 's/^/| /' conftest.$ac_ext >&5
4212 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4213 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4214 as_fn_error $? "cannot compute suffix of object files: cannot compile
4215 See \`config.log' for more details" "$LINENO" 5; }
4217 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4220 $as_echo "$ac_cv_objext" >&6; }
4221 OBJEXT=$ac_cv_objext
4223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4224 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4225 if ${ac_cv_c_compiler_gnu+:} false; then :
4226 $as_echo_n "(cached) " >&6
4228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4229 /* end confdefs.h. */
4242 if ac_fn_c_try_compile "$LINENO"; then :
4247 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4248 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4252 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4253 if test $ac_compiler_gnu = yes; then
4258 ac_test_CFLAGS=${CFLAGS+set}
4259 ac_save_CFLAGS=$CFLAGS
4260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4261 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4262 if ${ac_cv_prog_cc_g+:} false; then :
4263 $as_echo_n "(cached) " >&6
4265 ac_save_c_werror_flag=$ac_c_werror_flag
4266 ac_c_werror_flag=yes
4269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4270 /* end confdefs.h. */
4280 if ac_fn_c_try_compile "$LINENO"; then :
4284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4285 /* end confdefs.h. */
4295 if ac_fn_c_try_compile "$LINENO"; then :
4298 ac_c_werror_flag=$ac_save_c_werror_flag
4300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4301 /* end confdefs.h. */
4311 if ac_fn_c_try_compile "$LINENO"; then :
4314 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4316 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4318 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4319 ac_c_werror_flag=$ac_save_c_werror_flag
4321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4322 $as_echo "$ac_cv_prog_cc_g" >&6; }
4323 if test "$ac_test_CFLAGS" = set; then
4324 CFLAGS=$ac_save_CFLAGS
4325 elif test $ac_cv_prog_cc_g = yes; then
4326 if test "$GCC" = yes; then
4332 if test "$GCC" = yes; then
4338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4339 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4340 if ${ac_cv_prog_cc_c89+:} false; then :
4341 $as_echo_n "(cached) " >&6
4343 ac_cv_prog_cc_c89=no
4345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4346 /* end confdefs.h. */
4350 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4351 struct buf { int x; };
4352 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4353 static char *e (p, i)
4359 static char *f (char * (*g) (char **, int), char **p, ...)
4364 s = g (p, va_arg (v,int));
4369 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4370 function prototypes and stuff, but not '\xHH' hex character constants.
4371 These don't provoke an error unfortunately, instead are silently treated
4372 as 'x'. The following induces an error, until -std is added to get
4373 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4374 array size at least. It's necessary to write '\x00'==0 to get something
4375 that's true only with -std. */
4376 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4378 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4379 inside strings and character constants. */
4381 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4383 int test (int i, double x);
4384 struct s1 {int (*f) (int a);};
4385 struct s2 {int (*f) (double a);};
4386 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4392 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4397 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4398 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4400 CC="$ac_save_CC $ac_arg"
4401 if ac_fn_c_try_compile "$LINENO"; then :
4402 ac_cv_prog_cc_c89=$ac_arg
4404 rm -f core conftest.err conftest.$ac_objext
4405 test "x$ac_cv_prog_cc_c89" != "xno" && break
4407 rm -f conftest.$ac_ext
4412 case "x$ac_cv_prog_cc_c89" in
4414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4415 $as_echo "none needed" >&6; } ;;
4417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4418 $as_echo "unsupported" >&6; } ;;
4420 CC="$CC $ac_cv_prog_cc_c89"
4421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4422 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4424 if test "x$ac_cv_prog_cc_c89" != xno; then :
4429 ac_cpp='$CPP $CPPFLAGS'
4430 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4431 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4432 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4435 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4436 if ${ac_cv_prog_cc_c99+:} false; then :
4437 $as_echo_n "(cached) " >&6
4439 ac_cv_prog_cc_c99=no
4441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4442 /* end confdefs.h. */
4444 #include <stdbool.h>
4449 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4450 #define debug(...) fprintf (stderr, __VA_ARGS__)
4451 #define showlist(...) puts (#__VA_ARGS__)
4452 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4454 test_varargs_macros (void)
4459 debug ("X = %d\n", x);
4460 showlist (The first, second, and third items.);
4461 report (x>y, "x is %d but y is %d", x, y);
4464 // Check long long types.
4465 #define BIG64 18446744073709551615ull
4466 #define BIG32 4294967295ul
4467 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4469 your preprocessor is broken;
4473 your preprocessor is broken;
4475 static long long int bignum = -9223372036854775807LL;
4476 static unsigned long long int ubignum = BIG64;
4478 struct incomplete_array
4486 const wchar_t *name;
4490 typedef const char *ccp;
4493 test_restrict (ccp restrict text)
4495 // See if C++-style comments work.
4496 // Iterate through items via the restricted pointer.
4497 // Also check for declarations in for loops.
4498 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4503 // Check varargs and va_copy.
4505 test_varargs (const char *format, ...)
4508 va_start (args, format);
4510 va_copy (args_copy, args);
4521 str = va_arg (args_copy, const char *);
4524 number = va_arg (args_copy, int);
4527 fnumber = va_arg (args_copy, double);
4542 _Bool success = false;
4545 if (test_restrict ("String literal") == 0)
4547 char *restrict newvar = "Another string";
4550 test_varargs ("s, d' f .", "string", 65, 34.234);
4551 test_varargs_macros ();
4553 // Check flexible array members.
4554 struct incomplete_array *ia =
4555 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4557 for (int i = 0; i < ia->datasize; ++i)
4558 ia->data[i] = i * 1.234;
4560 // Check named initializers.
4561 struct named_init ni = {
4563 .name = L"Test wide string",
4564 .average = 543.34343,
4569 int dynamic_array[ni.number];
4570 dynamic_array[ni.number - 1] = 543;
4572 // work around unused variable warnings
4573 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4574 || dynamic_array[ni.number - 1] != 543);
4580 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4582 CC="$ac_save_CC $ac_arg"
4583 if ac_fn_c_try_compile "$LINENO"; then :
4584 ac_cv_prog_cc_c99=$ac_arg
4586 rm -f core conftest.err conftest.$ac_objext
4587 test "x$ac_cv_prog_cc_c99" != "xno" && break
4589 rm -f conftest.$ac_ext
4594 case "x$ac_cv_prog_cc_c99" in
4596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4597 $as_echo "none needed" >&6; } ;;
4599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4600 $as_echo "unsupported" >&6; } ;;
4602 CC="$CC $ac_cv_prog_cc_c99"
4603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4604 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4606 if test "x$ac_cv_prog_cc_c99" != xno; then :
4612 # Error out if the compiler does not support C99, as the codebase
4614 if test "$ac_cv_prog_cc_c99" = no; then
4615 as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4619 ac_cpp='$CXXCPP $CPPFLAGS'
4620 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4621 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4622 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4623 if test -z "$CXX"; then
4624 if test -n "$CCC"; then
4627 if test -n "$ac_tool_prefix"; then
4628 for ac_prog in $pgac_cxx_list
4630 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4631 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4633 $as_echo_n "checking for $ac_word... " >&6; }
4634 if ${ac_cv_prog_CXX+:} false; then :
4635 $as_echo_n "(cached) " >&6
4637 if test -n "$CXX"; then
4638 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4640 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4644 test -z "$as_dir" && as_dir=.
4645 for ac_exec_ext in '' $ac_executable_extensions; do
4646 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4647 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4648 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4658 if test -n "$CXX"; then
4659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4660 $as_echo "$CXX" >&6; }
4662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4663 $as_echo "no" >&6; }
4667 test -n "$CXX" && break
4670 if test -z "$CXX"; then
4672 for ac_prog in $pgac_cxx_list
4674 # Extract the first word of "$ac_prog", so it can be a program name with args.
4675 set dummy $ac_prog; ac_word=$2
4676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4677 $as_echo_n "checking for $ac_word... " >&6; }
4678 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4679 $as_echo_n "(cached) " >&6
4681 if test -n "$ac_ct_CXX"; then
4682 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4684 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4688 test -z "$as_dir" && as_dir=.
4689 for ac_exec_ext in '' $ac_executable_extensions; do
4690 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4691 ac_cv_prog_ac_ct_CXX="$ac_prog"
4692 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4701 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4702 if test -n "$ac_ct_CXX"; then
4703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4704 $as_echo "$ac_ct_CXX" >&6; }
4706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4707 $as_echo "no" >&6; }
4711 test -n "$ac_ct_CXX" && break
4714 if test "x$ac_ct_CXX" = x; then
4717 case $cross_compiling:$ac_tool_warned in
4719 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4720 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4721 ac_tool_warned=yes ;;
4729 # Provide some information about the compiler.
4730 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4733 for ac_option in --version -v -V -qversion; do
4734 { { ac_try="$ac_compiler $ac_option >&5"
4736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4737 *) ac_try_echo=$ac_try;;
4739 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4740 $as_echo "$ac_try_echo"; } >&5
4741 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4743 if test -s conftest.err; then
4745 ... rest of stderr output deleted ...
4746 10q' conftest.err >conftest.er1
4747 cat conftest.er1 >&5
4749 rm -f conftest.er1 conftest.err
4750 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4751 test $ac_status = 0; }
4754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4755 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4756 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4757 $as_echo_n "(cached) " >&6
4759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4760 /* end confdefs.h. */
4773 if ac_fn_cxx_try_compile "$LINENO"; then :
4778 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4779 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4783 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4784 if test $ac_compiler_gnu = yes; then
4789 ac_test_CXXFLAGS=${CXXFLAGS+set}
4790 ac_save_CXXFLAGS=$CXXFLAGS
4791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4792 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4793 if ${ac_cv_prog_cxx_g+:} false; then :
4794 $as_echo_n "(cached) " >&6
4796 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4797 ac_cxx_werror_flag=yes
4800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4801 /* end confdefs.h. */
4811 if ac_fn_cxx_try_compile "$LINENO"; then :
4812 ac_cv_prog_cxx_g=yes
4815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4816 /* end confdefs.h. */
4826 if ac_fn_cxx_try_compile "$LINENO"; then :
4829 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4832 /* end confdefs.h. */
4842 if ac_fn_cxx_try_compile "$LINENO"; then :
4843 ac_cv_prog_cxx_g=yes
4845 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4847 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4849 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4850 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4853 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4854 if test "$ac_test_CXXFLAGS" = set; then
4855 CXXFLAGS=$ac_save_CXXFLAGS
4856 elif test $ac_cv_prog_cxx_g = yes; then
4857 if test "$GXX" = yes; then
4863 if test "$GXX" = yes; then
4870 ac_cpp='$CPP $CPPFLAGS'
4871 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4872 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4873 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4876 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4877 # but has idiosyncrasies of its own. We assume icc will define
4878 # __INTEL_COMPILER regardless of CFLAGS.
4880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4881 /* end confdefs.h. */
4886 #ifndef __INTEL_COMPILER
4893 if ac_fn_c_try_compile "$LINENO"; then :
4898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4900 # Check if it's Sun Studio compiler. We assume that
4901 # __SUNPRO_C will be defined for Sun Studio compilers
4902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4903 /* end confdefs.h. */
4915 if ac_fn_c_try_compile "$LINENO"; then :
4920 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4928 # Checked early because subsequent tests depend on it.
4932 # Check whether --with-llvm was given.
4933 if test "${with_llvm+set}" = set; then :
4938 $as_echo "#define USE_LLVM 1" >>confdefs.h
4945 as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4956 for ac_prog in gawk mawk nawk awk
4958 # Extract the first word of "$ac_prog", so it can be a program name with args.
4959 set dummy $ac_prog; ac_word=$2
4960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4961 $as_echo_n "checking for $ac_word... " >&6; }
4962 if ${ac_cv_prog_AWK+:} false; then :
4963 $as_echo_n "(cached) " >&6
4965 if test -n "$AWK"; then
4966 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4968 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4972 test -z "$as_dir" && as_dir=.
4973 for ac_exec_ext in '' $ac_executable_extensions; do
4974 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4975 ac_cv_prog_AWK="$ac_prog"
4976 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4986 if test -n "$AWK"; then
4987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4988 $as_echo "$AWK" >&6; }
4990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4991 $as_echo "no" >&6; }
4995 test -n "$AWK" && break
4998 if test "$with_llvm" = yes; then :
5004 if test -z "$LLVM_CONFIG"; then
5005 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
5007 # Extract the first word of "$ac_prog", so it can be a program name with args.
5008 set dummy $ac_prog; ac_word=$2
5009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5010 $as_echo_n "checking for $ac_word... " >&6; }
5011 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
5012 $as_echo_n "(cached) " >&6
5014 case $LLVM_CONFIG in
5016 ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
5019 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5023 test -z "$as_dir" && as_dir=.
5024 for ac_exec_ext in '' $ac_executable_extensions; do
5025 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5026 ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5027 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5037 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5038 if test -n "$LLVM_CONFIG"; then
5039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5040 $as_echo "$LLVM_CONFIG" >&6; }
5042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5043 $as_echo "no" >&6; }
5047 test -n "$LLVM_CONFIG" && break
5051 # Report the value of LLVM_CONFIG in configure's output in all cases.
5052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5053 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5055 $as_echo "$LLVM_CONFIG" >&6; }
5059 # no point continuing if llvm wasn't found
5060 if test -z "$LLVM_CONFIG"; then
5061 as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5063 # check if detected $LLVM_CONFIG is executable
5064 pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5065 if test "x$pgac_llvm_version" = "xno"; then
5066 as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5068 # and whether the version is supported
5069 if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 4 || ($1 == 3 && $2 >= 9)) exit 1; else exit 0;}';then
5070 as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 3.9 is required" "$LINENO" 5
5073 # need clang to create some bitcode files
5075 if test -z "$CLANG"; then
5076 for ac_prog in clang clang-7 clang-6.0 clang-5.0 clang-4.0 clang-3.9
5078 # Extract the first word of "$ac_prog", so it can be a program name with args.
5079 set dummy $ac_prog; ac_word=$2
5080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5081 $as_echo_n "checking for $ac_word... " >&6; }
5082 if ${ac_cv_path_CLANG+:} false; then :
5083 $as_echo_n "(cached) " >&6
5087 ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5090 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5094 test -z "$as_dir" && as_dir=.
5095 for ac_exec_ext in '' $ac_executable_extensions; do
5096 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5097 ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5098 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5108 CLANG=$ac_cv_path_CLANG
5109 if test -n "$CLANG"; then
5110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5111 $as_echo "$CLANG" >&6; }
5113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5114 $as_echo "no" >&6; }
5118 test -n "$CLANG" && break
5122 # Report the value of CLANG in configure's output in all cases.
5123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5124 $as_echo_n "checking for CLANG... " >&6; }
5125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5126 $as_echo "$CLANG" >&6; }
5129 if test -z "$CLANG"; then
5130 as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5132 # make sure clang is executable
5133 if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5134 as_fn_error $? "$CLANG does not work" "$LINENO" 5
5136 # Could check clang version, but it doesn't seem that
5137 # important. Systems with a new enough LLVM version are usually
5138 # going to have a decent clang version too. It's also not entirely
5139 # clear what the minimum version is.
5141 # Collect compiler flags necessary to build the LLVM dependent
5143 for pgac_option in `$LLVM_CONFIG --cppflags`; do
5144 case $pgac_option in
5145 -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5149 for pgac_option in `$LLVM_CONFIG --ldflags`; do
5150 case $pgac_option in
5151 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5155 # ABI influencing options, standard influencing options
5156 for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5157 case $pgac_option in
5158 -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5159 -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5163 # Look for components we're interested in, collect necessary
5164 # libs. As some components are optional, we can't just list all of
5165 # them as it'd raise an error.
5167 for pgac_component in `$LLVM_CONFIG --components`; do
5168 case $pgac_component in
5169 engine) pgac_components="$pgac_components $pgac_component";;
5170 debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5171 orcjit) pgac_components="$pgac_components $pgac_component";;
5172 passes) pgac_components="$pgac_components $pgac_component";;
5173 perfjitevents) pgac_components="$pgac_components $pgac_component";;
5177 # And then get the libraries that need to be linked in for the
5178 # selected components. They're large libraries, we only want to
5179 # link them into the LLVM using shared library.
5180 for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5181 case $pgac_option in
5182 -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5186 LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5188 # LLVM_CONFIG, CLANG are already output via AC_ARG_VAR
5206 . "$srcdir/src/template/$template" || exit
5208 # C[XX]FLAGS are selected so:
5209 # If the user specifies something in the environment, that is used.
5210 # else: If the template file set something, that is used.
5211 # else: If coverage was enabled, don't set anything.
5212 # else: If the compiler is GCC, then we use -O2.
5213 # else: If the compiler is something else, then we use -O, unless debugging.
5215 if test "$ac_env_CFLAGS_set" = set; then
5216 CFLAGS=$ac_env_CFLAGS_value
5217 elif test "${CFLAGS+set}" = set; then
5218 : # (keep what template set)
5219 elif test "$enable_coverage" = yes; then
5220 : # no optimization by default
5221 elif test "$GCC" = yes; then
5224 # if the user selected debug mode, don't use -O
5225 if test "$enable_debug" != yes; then
5230 if test "$ac_env_CXXFLAGS_set" = set; then
5231 CXXFLAGS=$ac_env_CXXFLAGS_value
5232 elif test "${CXXFLAGS+set}" = set; then
5233 : # (keep what template set)
5234 elif test "$enable_coverage" = yes; then
5235 : # no optimization by default
5236 elif test "$GCC" = yes; then
5239 # if the user selected debug mode, don't use -O
5240 if test "$enable_debug" != yes; then
5245 # When generating bitcode (for inlining) we always want to use -O2
5246 # even when --enable-debug is specified. The bitcode it's not going to
5247 # be used for line-by-line debugging, and JIT inlining doesn't work
5248 # without at least -O1 (otherwise clang will emit 'noinline'
5249 # attributes everywhere), which is bad for testing. Still allow the
5250 # environment to override if done explicitly.
5251 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5252 BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5254 BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5256 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5257 BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5259 BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5262 # C[XX]FLAGS we determined above will be added back at the end
5265 user_CXXFLAGS=$CXXFLAGS
5267 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5269 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5272 # set CFLAGS_VECTOR from the environment, if available
5273 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
5274 CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
5277 # Some versions of GCC support some additional useful warning flags.
5278 # Check whether they are supported, and add them to CFLAGS if so.
5279 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5280 # but has its own. Also check other compiler-specific flags here.
5282 if test "$GCC" = yes -a "$ICC" = no; then
5283 CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5284 CXXFLAGS="-Wall -Wpointer-arith"
5285 # These work in some but not all gcc versions
5287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5288 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5289 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5290 $as_echo_n "(cached) " >&6
5292 pgac_save_CFLAGS=$CFLAGS
5295 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5296 ac_save_c_werror_flag=$ac_c_werror_flag
5297 ac_c_werror_flag=yes
5298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5299 /* end confdefs.h. */
5309 if ac_fn_c_try_compile "$LINENO"; then :
5310 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5312 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5314 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5315 ac_c_werror_flag=$ac_save_c_werror_flag
5316 CFLAGS="$pgac_save_CFLAGS"
5319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5320 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5321 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5322 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5326 # -Wdeclaration-after-statement isn't applicable for C++
5327 # Really don't want VLAs to be used in our dialect of C
5329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5330 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5331 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5332 $as_echo_n "(cached) " >&6
5334 pgac_save_CFLAGS=$CFLAGS
5337 CFLAGS="${CFLAGS} -Werror=vla"
5338 ac_save_c_werror_flag=$ac_c_werror_flag
5339 ac_c_werror_flag=yes
5340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5341 /* end confdefs.h. */
5351 if ac_fn_c_try_compile "$LINENO"; then :
5352 pgac_cv_prog_CC_cflags__Werror_vla=yes
5354 pgac_cv_prog_CC_cflags__Werror_vla=no
5356 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5357 ac_c_werror_flag=$ac_save_c_werror_flag
5358 CFLAGS="$pgac_save_CFLAGS"
5361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5362 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5363 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5364 CFLAGS="${CFLAGS} -Werror=vla"
5368 # -Wvla is not applicable for C++
5370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5371 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5372 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5373 $as_echo_n "(cached) " >&6
5375 pgac_save_CFLAGS=$CFLAGS
5378 CFLAGS="${CFLAGS} -Wendif-labels"
5379 ac_save_c_werror_flag=$ac_c_werror_flag
5380 ac_c_werror_flag=yes
5381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5382 /* end confdefs.h. */
5392 if ac_fn_c_try_compile "$LINENO"; then :
5393 pgac_cv_prog_CC_cflags__Wendif_labels=yes
5395 pgac_cv_prog_CC_cflags__Wendif_labels=no
5397 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5398 ac_c_werror_flag=$ac_save_c_werror_flag
5399 CFLAGS="$pgac_save_CFLAGS"
5402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5403 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5404 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5405 CFLAGS="${CFLAGS} -Wendif-labels"
5409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5410 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5411 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5412 $as_echo_n "(cached) " >&6
5414 pgac_save_CXXFLAGS=$CXXFLAGS
5417 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5418 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5419 ac_cxx_werror_flag=yes
5421 ac_cpp='$CXXCPP $CPPFLAGS'
5422 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5423 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5424 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5427 /* end confdefs.h. */
5437 if ac_fn_cxx_try_compile "$LINENO"; then :
5438 pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5440 pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5442 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5444 ac_cpp='$CPP $CPPFLAGS'
5445 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5446 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5447 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5449 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5450 CXXFLAGS="$pgac_save_CXXFLAGS"
5451 CXX="$pgac_save_CXX"
5453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5454 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5455 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5456 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5462 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5463 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5464 $as_echo_n "(cached) " >&6
5466 pgac_save_CFLAGS=$CFLAGS
5469 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5470 ac_save_c_werror_flag=$ac_c_werror_flag
5471 ac_c_werror_flag=yes
5472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5473 /* end confdefs.h. */
5483 if ac_fn_c_try_compile "$LINENO"; then :
5484 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5486 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5488 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5489 ac_c_werror_flag=$ac_save_c_werror_flag
5490 CFLAGS="$pgac_save_CFLAGS"
5493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5494 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5495 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5496 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5501 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5502 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5503 $as_echo_n "(cached) " >&6
5505 pgac_save_CXXFLAGS=$CXXFLAGS
5508 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5509 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5510 ac_cxx_werror_flag=yes
5512 ac_cpp='$CXXCPP $CPPFLAGS'
5513 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5514 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5515 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5518 /* end confdefs.h. */
5528 if ac_fn_cxx_try_compile "$LINENO"; then :
5529 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5531 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5533 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5535 ac_cpp='$CPP $CPPFLAGS'
5536 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5537 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5538 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5540 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5541 CXXFLAGS="$pgac_save_CXXFLAGS"
5542 CXX="$pgac_save_CXX"
5544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5545 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5546 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5547 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5551 # This was included in -Wall/-Wformat in older GCC versions
5553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5554 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5555 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5556 $as_echo_n "(cached) " >&6
5558 pgac_save_CFLAGS=$CFLAGS
5561 CFLAGS="${CFLAGS} -Wformat-security"
5562 ac_save_c_werror_flag=$ac_c_werror_flag
5563 ac_c_werror_flag=yes
5564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5565 /* end confdefs.h. */
5575 if ac_fn_c_try_compile "$LINENO"; then :
5576 pgac_cv_prog_CC_cflags__Wformat_security=yes
5578 pgac_cv_prog_CC_cflags__Wformat_security=no
5580 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5581 ac_c_werror_flag=$ac_save_c_werror_flag
5582 CFLAGS="$pgac_save_CFLAGS"
5585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5586 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5587 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5588 CFLAGS="${CFLAGS} -Wformat-security"
5592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5593 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5594 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5595 $as_echo_n "(cached) " >&6
5597 pgac_save_CXXFLAGS=$CXXFLAGS
5600 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5601 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5602 ac_cxx_werror_flag=yes
5604 ac_cpp='$CXXCPP $CPPFLAGS'
5605 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5606 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5607 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5610 /* end confdefs.h. */
5620 if ac_fn_cxx_try_compile "$LINENO"; then :
5621 pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
5623 pgac_cv_prog_CXX_cxxflags__Wformat_security=no
5625 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5627 ac_cpp='$CPP $CPPFLAGS'
5628 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5629 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5630 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5632 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5633 CXXFLAGS="$pgac_save_CXXFLAGS"
5634 CXX="$pgac_save_CXX"
5636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
5637 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
5638 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
5639 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5643 # Disable strict-aliasing rules; needed for gcc 3.3+
5645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
5646 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
5647 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
5648 $as_echo_n "(cached) " >&6
5650 pgac_save_CFLAGS=$CFLAGS
5653 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5654 ac_save_c_werror_flag=$ac_c_werror_flag
5655 ac_c_werror_flag=yes
5656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5657 /* end confdefs.h. */
5667 if ac_fn_c_try_compile "$LINENO"; then :
5668 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
5670 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
5672 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5673 ac_c_werror_flag=$ac_save_c_werror_flag
5674 CFLAGS="$pgac_save_CFLAGS"
5677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
5678 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
5679 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
5680 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
5685 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
5686 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
5687 $as_echo_n "(cached) " >&6
5689 pgac_save_CXXFLAGS=$CXXFLAGS
5692 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5693 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5694 ac_cxx_werror_flag=yes
5696 ac_cpp='$CXXCPP $CPPFLAGS'
5697 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5698 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5699 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5702 /* end confdefs.h. */
5712 if ac_fn_cxx_try_compile "$LINENO"; then :
5713 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
5715 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
5717 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5719 ac_cpp='$CPP $CPPFLAGS'
5720 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5721 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5722 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5724 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5725 CXXFLAGS="$pgac_save_CXXFLAGS"
5726 CXX="$pgac_save_CXX"
5728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
5729 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
5730 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
5731 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5735 # Disable optimizations that assume no overflow; needed for gcc 4.3+
5737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
5738 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
5739 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
5740 $as_echo_n "(cached) " >&6
5742 pgac_save_CFLAGS=$CFLAGS
5745 CFLAGS="${CFLAGS} -fwrapv"
5746 ac_save_c_werror_flag=$ac_c_werror_flag
5747 ac_c_werror_flag=yes
5748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5749 /* end confdefs.h. */
5759 if ac_fn_c_try_compile "$LINENO"; then :
5760 pgac_cv_prog_CC_cflags__fwrapv=yes
5762 pgac_cv_prog_CC_cflags__fwrapv=no
5764 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5765 ac_c_werror_flag=$ac_save_c_werror_flag
5766 CFLAGS="$pgac_save_CFLAGS"
5769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
5770 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
5771 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
5772 CFLAGS="${CFLAGS} -fwrapv"
5776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
5777 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
5778 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
5779 $as_echo_n "(cached) " >&6
5781 pgac_save_CXXFLAGS=$CXXFLAGS
5784 CXXFLAGS="${CXXFLAGS} -fwrapv"
5785 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5786 ac_cxx_werror_flag=yes
5788 ac_cpp='$CXXCPP $CPPFLAGS'
5789 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5790 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5791 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5794 /* end confdefs.h. */
5804 if ac_fn_cxx_try_compile "$LINENO"; then :
5805 pgac_cv_prog_CXX_cxxflags__fwrapv=yes
5807 pgac_cv_prog_CXX_cxxflags__fwrapv=no
5809 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5811 ac_cpp='$CPP $CPPFLAGS'
5812 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5813 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5814 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5816 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5817 CXXFLAGS="$pgac_save_CXXFLAGS"
5818 CXX="$pgac_save_CXX"
5820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
5821 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
5822 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
5823 CXXFLAGS="${CXXFLAGS} -fwrapv"
5827 # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
5829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
5830 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
5831 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
5832 $as_echo_n "(cached) " >&6
5834 pgac_save_CFLAGS=$CFLAGS
5837 CFLAGS="${CFLAGS} -fexcess-precision=standard"
5838 ac_save_c_werror_flag=$ac_c_werror_flag
5839 ac_c_werror_flag=yes
5840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5841 /* end confdefs.h. */
5851 if ac_fn_c_try_compile "$LINENO"; then :
5852 pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
5854 pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
5856 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5857 ac_c_werror_flag=$ac_save_c_werror_flag
5858 CFLAGS="$pgac_save_CFLAGS"
5861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
5862 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
5863 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
5864 CFLAGS="${CFLAGS} -fexcess-precision=standard"
5868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
5869 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
5870 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
5871 $as_echo_n "(cached) " >&6
5873 pgac_save_CXXFLAGS=$CXXFLAGS
5876 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5877 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5878 ac_cxx_werror_flag=yes
5880 ac_cpp='$CXXCPP $CPPFLAGS'
5881 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5882 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5883 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5886 /* end confdefs.h. */
5896 if ac_fn_cxx_try_compile "$LINENO"; then :
5897 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
5899 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
5901 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5903 ac_cpp='$CPP $CPPFLAGS'
5904 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5905 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5906 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5908 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5909 CXXFLAGS="$pgac_save_CXXFLAGS"
5910 CXX="$pgac_save_CXX"
5912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
5913 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
5914 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
5915 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5919 # Optimization flags for specific files that benefit from vectorization
5920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR" >&5
5921 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR... " >&6; }
5922 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
5923 $as_echo_n "(cached) " >&6
5925 pgac_save_CFLAGS=$CFLAGS
5928 CFLAGS="${CFLAGS_VECTOR} -funroll-loops"
5929 ac_save_c_werror_flag=$ac_c_werror_flag
5930 ac_c_werror_flag=yes
5931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5932 /* end confdefs.h. */
5942 if ac_fn_c_try_compile "$LINENO"; then :
5943 pgac_cv_prog_CC_cflags__funroll_loops=yes
5945 pgac_cv_prog_CC_cflags__funroll_loops=no
5947 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5948 ac_c_werror_flag=$ac_save_c_werror_flag
5949 CFLAGS="$pgac_save_CFLAGS"
5952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
5953 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
5954 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
5955 CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
5959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR" >&5
5960 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR... " >&6; }
5961 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
5962 $as_echo_n "(cached) " >&6
5964 pgac_save_CFLAGS=$CFLAGS
5967 CFLAGS="${CFLAGS_VECTOR} -ftree-vectorize"
5968 ac_save_c_werror_flag=$ac_c_werror_flag
5969 ac_c_werror_flag=yes
5970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5971 /* end confdefs.h. */
5981 if ac_fn_c_try_compile "$LINENO"; then :
5982 pgac_cv_prog_CC_cflags__ftree_vectorize=yes
5984 pgac_cv_prog_CC_cflags__ftree_vectorize=no
5986 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5987 ac_c_werror_flag=$ac_save_c_werror_flag
5988 CFLAGS="$pgac_save_CFLAGS"
5991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
5992 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
5993 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
5994 CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
5998 # We want to suppress clang's unhelpful unused-command-line-argument warnings
5999 # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
6000 # test for the positive form and if that works, add the negative form
6002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
6003 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
6004 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
6005 $as_echo_n "(cached) " >&6
6007 pgac_save_CFLAGS=$CFLAGS
6010 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6011 ac_save_c_werror_flag=$ac_c_werror_flag
6012 ac_c_werror_flag=yes
6013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6014 /* end confdefs.h. */
6024 if ac_fn_c_try_compile "$LINENO"; then :
6025 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6027 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6029 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6030 ac_c_werror_flag=$ac_save_c_werror_flag
6031 CFLAGS="$pgac_save_CFLAGS"
6034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6035 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6036 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6037 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6041 if test -n "$NOT_THE_CFLAGS"; then
6042 CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6044 # Similarly disable useless truncation warnings from gcc 8+
6046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6047 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6048 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6049 $as_echo_n "(cached) " >&6
6051 pgac_save_CFLAGS=$CFLAGS
6054 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6055 ac_save_c_werror_flag=$ac_c_werror_flag
6056 ac_c_werror_flag=yes
6057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6058 /* end confdefs.h. */
6068 if ac_fn_c_try_compile "$LINENO"; then :
6069 pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6071 pgac_cv_prog_CC_cflags__Wformat_truncation=no
6073 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6074 ac_c_werror_flag=$ac_save_c_werror_flag
6075 CFLAGS="$pgac_save_CFLAGS"
6078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6079 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6080 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6081 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6085 if test -n "$NOT_THE_CFLAGS"; then
6086 CFLAGS="$CFLAGS -Wno-format-truncation"
6089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6090 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6091 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6092 $as_echo_n "(cached) " >&6
6094 pgac_save_CFLAGS=$CFLAGS
6097 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6098 ac_save_c_werror_flag=$ac_c_werror_flag
6099 ac_c_werror_flag=yes
6100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6101 /* end confdefs.h. */
6111 if ac_fn_c_try_compile "$LINENO"; then :
6112 pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6114 pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6116 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6117 ac_c_werror_flag=$ac_save_c_werror_flag
6118 CFLAGS="$pgac_save_CFLAGS"
6121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6122 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6123 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6124 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6128 if test -n "$NOT_THE_CFLAGS"; then
6129 CFLAGS="$CFLAGS -Wno-stringop-truncation"
6131 elif test "$ICC" = yes; then
6132 # Intel's compiler has a bug/misoptimization in checking for
6133 # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6136 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6137 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6138 $as_echo_n "(cached) " >&6
6140 pgac_save_CFLAGS=$CFLAGS
6143 CFLAGS="${CFLAGS} -mp1"
6144 ac_save_c_werror_flag=$ac_c_werror_flag
6145 ac_c_werror_flag=yes
6146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6147 /* end confdefs.h. */
6157 if ac_fn_c_try_compile "$LINENO"; then :
6158 pgac_cv_prog_CC_cflags__mp1=yes
6160 pgac_cv_prog_CC_cflags__mp1=no
6162 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6163 ac_c_werror_flag=$ac_save_c_werror_flag
6164 CFLAGS="$pgac_save_CFLAGS"
6167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6168 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6169 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6170 CFLAGS="${CFLAGS} -mp1"
6174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6175 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6176 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6177 $as_echo_n "(cached) " >&6
6179 pgac_save_CXXFLAGS=$CXXFLAGS
6182 CXXFLAGS="${CXXFLAGS} -mp1"
6183 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6184 ac_cxx_werror_flag=yes
6186 ac_cpp='$CXXCPP $CPPFLAGS'
6187 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6188 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6189 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6192 /* end confdefs.h. */
6202 if ac_fn_cxx_try_compile "$LINENO"; then :
6203 pgac_cv_prog_CXX_cxxflags__mp1=yes
6205 pgac_cv_prog_CXX_cxxflags__mp1=no
6207 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6209 ac_cpp='$CPP $CPPFLAGS'
6210 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6211 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6212 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6214 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6215 CXXFLAGS="$pgac_save_CXXFLAGS"
6216 CXX="$pgac_save_CXX"
6218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6219 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6220 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6221 CXXFLAGS="${CXXFLAGS} -mp1"
6225 # Make sure strict aliasing is off (though this is said to be the default)
6227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6228 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6229 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6230 $as_echo_n "(cached) " >&6
6232 pgac_save_CFLAGS=$CFLAGS
6235 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6236 ac_save_c_werror_flag=$ac_c_werror_flag
6237 ac_c_werror_flag=yes
6238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6239 /* end confdefs.h. */
6249 if ac_fn_c_try_compile "$LINENO"; then :
6250 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6252 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6255 ac_c_werror_flag=$ac_save_c_werror_flag
6256 CFLAGS="$pgac_save_CFLAGS"
6259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6260 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6261 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6262 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6267 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6268 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6269 $as_echo_n "(cached) " >&6
6271 pgac_save_CXXFLAGS=$CXXFLAGS
6274 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6275 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6276 ac_cxx_werror_flag=yes
6278 ac_cpp='$CXXCPP $CPPFLAGS'
6279 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6280 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6281 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6284 /* end confdefs.h. */
6294 if ac_fn_cxx_try_compile "$LINENO"; then :
6295 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6297 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6299 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6301 ac_cpp='$CPP $CPPFLAGS'
6302 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6303 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6304 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6306 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6307 CXXFLAGS="$pgac_save_CXXFLAGS"
6308 CXX="$pgac_save_CXX"
6310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6311 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6312 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6313 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6317 elif test "$PORTNAME" = "aix"; then
6318 # AIX's xlc has to have strict aliasing turned off too
6320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6321 $as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6322 if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6323 $as_echo_n "(cached) " >&6
6325 pgac_save_CFLAGS=$CFLAGS
6328 CFLAGS="${CFLAGS} -qnoansialias"
6329 ac_save_c_werror_flag=$ac_c_werror_flag
6330 ac_c_werror_flag=yes
6331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6332 /* end confdefs.h. */
6342 if ac_fn_c_try_compile "$LINENO"; then :
6343 pgac_cv_prog_CC_cflags__qnoansialias=yes
6345 pgac_cv_prog_CC_cflags__qnoansialias=no
6347 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6348 ac_c_werror_flag=$ac_save_c_werror_flag
6349 CFLAGS="$pgac_save_CFLAGS"
6352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6353 $as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6354 if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6355 CFLAGS="${CFLAGS} -qnoansialias"
6359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6360 $as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6361 if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6362 $as_echo_n "(cached) " >&6
6364 pgac_save_CXXFLAGS=$CXXFLAGS
6367 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6368 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6369 ac_cxx_werror_flag=yes
6371 ac_cpp='$CXXCPP $CPPFLAGS'
6372 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6373 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6374 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6377 /* end confdefs.h. */
6387 if ac_fn_cxx_try_compile "$LINENO"; then :
6388 pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6390 pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6392 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6394 ac_cpp='$CPP $CPPFLAGS'
6395 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6396 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6397 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6399 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6400 CXXFLAGS="$pgac_save_CXXFLAGS"
6401 CXX="$pgac_save_CXX"
6403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6404 $as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6405 if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6406 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6412 $as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6413 if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6414 $as_echo_n "(cached) " >&6
6416 pgac_save_CFLAGS=$CFLAGS
6419 CFLAGS="${CFLAGS} -qlonglong"
6420 ac_save_c_werror_flag=$ac_c_werror_flag
6421 ac_c_werror_flag=yes
6422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6423 /* end confdefs.h. */
6433 if ac_fn_c_try_compile "$LINENO"; then :
6434 pgac_cv_prog_CC_cflags__qlonglong=yes
6436 pgac_cv_prog_CC_cflags__qlonglong=no
6438 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6439 ac_c_werror_flag=$ac_save_c_werror_flag
6440 CFLAGS="$pgac_save_CFLAGS"
6443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6444 $as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6445 if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6446 CFLAGS="${CFLAGS} -qlonglong"
6450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6451 $as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6452 if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6453 $as_echo_n "(cached) " >&6
6455 pgac_save_CXXFLAGS=$CXXFLAGS
6458 CXXFLAGS="${CXXFLAGS} -qlonglong"
6459 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6460 ac_cxx_werror_flag=yes
6462 ac_cpp='$CXXCPP $CPPFLAGS'
6463 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6464 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6465 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6468 /* end confdefs.h. */
6478 if ac_fn_cxx_try_compile "$LINENO"; then :
6479 pgac_cv_prog_CXX_cxxflags__qlonglong=yes
6481 pgac_cv_prog_CXX_cxxflags__qlonglong=no
6483 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6485 ac_cpp='$CPP $CPPFLAGS'
6486 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6487 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6488 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6490 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6491 CXXFLAGS="$pgac_save_CXXFLAGS"
6492 CXX="$pgac_save_CXX"
6494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
6495 $as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
6496 if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
6497 CXXFLAGS="${CXXFLAGS} -qlonglong"
6501 elif test "$PORTNAME" = "hpux"; then
6502 # On some versions of HP-UX, libm functions do not set errno by default.
6503 # Fix that by using +Olibmerrno if the compiler recognizes it.
6505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports +Olibmerrno, for CFLAGS" >&5
6506 $as_echo_n "checking whether ${CC} supports +Olibmerrno, for CFLAGS... " >&6; }
6507 if ${pgac_cv_prog_CC_cflags_pOlibmerrno+:} false; then :
6508 $as_echo_n "(cached) " >&6
6510 pgac_save_CFLAGS=$CFLAGS
6513 CFLAGS="${CFLAGS} +Olibmerrno"
6514 ac_save_c_werror_flag=$ac_c_werror_flag
6515 ac_c_werror_flag=yes
6516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6517 /* end confdefs.h. */
6527 if ac_fn_c_try_compile "$LINENO"; then :
6528 pgac_cv_prog_CC_cflags_pOlibmerrno=yes
6530 pgac_cv_prog_CC_cflags_pOlibmerrno=no
6532 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6533 ac_c_werror_flag=$ac_save_c_werror_flag
6534 CFLAGS="$pgac_save_CFLAGS"
6537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags_pOlibmerrno" >&5
6538 $as_echo "$pgac_cv_prog_CC_cflags_pOlibmerrno" >&6; }
6539 if test x"$pgac_cv_prog_CC_cflags_pOlibmerrno" = x"yes"; then
6540 CFLAGS="${CFLAGS} +Olibmerrno"
6544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS" >&5
6545 $as_echo_n "checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS... " >&6; }
6546 if ${pgac_cv_prog_CXX_cxxflags_pOlibmerrno+:} false; then :
6547 $as_echo_n "(cached) " >&6
6549 pgac_save_CXXFLAGS=$CXXFLAGS
6552 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6553 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6554 ac_cxx_werror_flag=yes
6556 ac_cpp='$CXXCPP $CPPFLAGS'
6557 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6558 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6559 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6562 /* end confdefs.h. */
6572 if ac_fn_cxx_try_compile "$LINENO"; then :
6573 pgac_cv_prog_CXX_cxxflags_pOlibmerrno=yes
6575 pgac_cv_prog_CXX_cxxflags_pOlibmerrno=no
6577 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6579 ac_cpp='$CPP $CPPFLAGS'
6580 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6581 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6582 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6584 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6585 CXXFLAGS="$pgac_save_CXXFLAGS"
6586 CXX="$pgac_save_CXX"
6588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&5
6589 $as_echo "$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&6; }
6590 if test x"$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" = x"yes"; then
6591 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6597 CFLAGS_VECTOR=$CFLAGS_VECTOR
6600 # Determine flags used to emit bitcode for JIT inlining. Need to test
6601 # for behaviour changing compiler flags, to keep compatibility with
6602 # compiler used for normal postgres code.
6603 if test "$with_llvm" = yes ; then
6604 CLANGXX="$CLANG -xc++"
6606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
6607 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
6608 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
6609 $as_echo_n "(cached) " >&6
6611 pgac_save_CFLAGS=$CFLAGS
6614 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6615 ac_save_c_werror_flag=$ac_c_werror_flag
6616 ac_c_werror_flag=yes
6617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6618 /* end confdefs.h. */
6628 if ac_fn_c_try_compile "$LINENO"; then :
6629 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
6631 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
6633 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6634 ac_c_werror_flag=$ac_save_c_werror_flag
6635 CFLAGS="$pgac_save_CFLAGS"
6638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
6639 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
6640 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
6641 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
6645 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
6646 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
6647 $as_echo_n "(cached) " >&6
6649 pgac_save_CXXFLAGS=$CXXFLAGS
6652 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6653 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6654 ac_cxx_werror_flag=yes
6656 ac_cpp='$CXXCPP $CPPFLAGS'
6657 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6658 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6659 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6662 /* end confdefs.h. */
6672 if ac_fn_cxx_try_compile "$LINENO"; then :
6673 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
6675 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
6677 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6679 ac_cpp='$CPP $CPPFLAGS'
6680 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6681 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6682 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6684 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6685 CXXFLAGS="$pgac_save_CXXFLAGS"
6686 CXX="$pgac_save_CXX"
6688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
6689 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
6690 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6691 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
6695 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
6696 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
6697 $as_echo_n "(cached) " >&6
6699 pgac_save_CFLAGS=$CFLAGS
6702 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6703 ac_save_c_werror_flag=$ac_c_werror_flag
6704 ac_c_werror_flag=yes
6705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6706 /* end confdefs.h. */
6716 if ac_fn_c_try_compile "$LINENO"; then :
6717 pgac_cv_prog_CLANG_cflags__fwrapv=yes
6719 pgac_cv_prog_CLANG_cflags__fwrapv=no
6721 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6722 ac_c_werror_flag=$ac_save_c_werror_flag
6723 CFLAGS="$pgac_save_CFLAGS"
6726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
6727 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
6728 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
6729 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
6733 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
6734 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
6735 $as_echo_n "(cached) " >&6
6737 pgac_save_CXXFLAGS=$CXXFLAGS
6740 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6741 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6742 ac_cxx_werror_flag=yes
6744 ac_cpp='$CXXCPP $CPPFLAGS'
6745 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6746 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6747 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6750 /* end confdefs.h. */
6760 if ac_fn_cxx_try_compile "$LINENO"; then :
6761 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
6763 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
6765 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6767 ac_cpp='$CPP $CPPFLAGS'
6768 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6769 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6770 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6772 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6773 CXXFLAGS="$pgac_save_CXXFLAGS"
6774 CXX="$pgac_save_CXX"
6776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
6777 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
6778 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
6779 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
6783 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
6784 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
6785 $as_echo_n "(cached) " >&6
6787 pgac_save_CFLAGS=$CFLAGS
6790 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6791 ac_save_c_werror_flag=$ac_c_werror_flag
6792 ac_c_werror_flag=yes
6793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6794 /* end confdefs.h. */
6804 if ac_fn_c_try_compile "$LINENO"; then :
6805 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
6807 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
6809 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6810 ac_c_werror_flag=$ac_save_c_werror_flag
6811 CFLAGS="$pgac_save_CFLAGS"
6814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
6815 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
6816 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
6817 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
6821 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
6822 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
6823 $as_echo_n "(cached) " >&6
6825 pgac_save_CXXFLAGS=$CXXFLAGS
6828 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6829 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6830 ac_cxx_werror_flag=yes
6832 ac_cpp='$CXXCPP $CPPFLAGS'
6833 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6834 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6835 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6838 /* end confdefs.h. */
6848 if ac_fn_cxx_try_compile "$LINENO"; then :
6849 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
6851 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
6853 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6855 ac_cpp='$CPP $CPPFLAGS'
6856 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6857 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6858 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6860 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6861 CXXFLAGS="$pgac_save_CXXFLAGS"
6862 CXX="$pgac_save_CXX"
6864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
6865 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
6866 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6867 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6872 # supply -g if --enable-debug
6873 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
6877 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
6878 CXXFLAGS="$CXXFLAGS -g"
6881 # enable code coverage if --enable-coverage
6882 if test "$enable_coverage" = yes; then
6883 if test "$GCC" = yes; then
6884 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
6885 CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
6887 as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
6891 # enable profiling if --enable-profiling
6892 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
6893 if test "$GCC" = yes; then
6895 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
6897 CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6898 CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6900 as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
6904 # We already have this in Makefile.win32, but configure needs it too
6905 if test "$PORTNAME" = "win32"; then
6906 CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
6909 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
6910 # user-specified flags (if any) at the end. This lets users override
6911 # the automatic additions.
6912 CFLAGS="$CFLAGS $user_CFLAGS"
6913 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
6914 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
6915 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
6917 BITCODE_CFLAGS=$BITCODE_CFLAGS
6919 BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
6922 # Check if the compiler still works with the final flag settings
6923 # (note, we're not checking that for CXX, which is optional)
6924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
6925 $as_echo_n "checking whether the C compiler still works... " >&6; }
6926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6927 /* end confdefs.h. */
6937 if ac_fn_c_try_link "$LINENO"; then :
6938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6939 $as_echo "yes" >&6; }
6941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6942 $as_echo "no" >&6; }
6943 as_fn_error $? "cannot proceed" "$LINENO" 5
6945 rm -f core conftest.err conftest.$ac_objext \
6946 conftest$ac_exeext conftest.$ac_ext
6948 # Defend against gcc -ffast-math
6949 if test "$GCC" = yes; then
6950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6951 /* end confdefs.h. */
6956 #ifdef __FAST_MATH__
6963 if ac_fn_c_try_compile "$LINENO"; then :
6966 as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
6968 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6971 # Defend against clang being used on x86-32 without SSE2 enabled. As current
6972 # versions of clang do not understand -fexcess-precision=standard, the use of
6973 # x87 floating point operations leads to problems like isinf possibly returning
6974 # false for a value that is infinite when converted from the 80bit register to
6975 # the 8byte memory representation.
6977 # Only perform the test if the compiler doesn't understand
6978 # -fexcess-precision=standard, that way a potentially fixed compiler will work
6980 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
6981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6982 /* end confdefs.h. */
6988 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
6996 if ac_fn_c_try_compile "$LINENO"; then :
6999 as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
7001 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7005 ac_cpp='$CPP $CPPFLAGS'
7006 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7007 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7008 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7010 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7011 # On Suns, sometimes $CPP names a directory.
7012 if test -n "$CPP" && test -d "$CPP"; then
7015 if test -z "$CPP"; then
7016 if ${ac_cv_prog_CPP+:} false; then :
7017 $as_echo_n "(cached) " >&6
7019 # Double quotes because CPP needs to be expanded
7020 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7023 for ac_c_preproc_warn_flag in '' yes
7025 # Use a header file that comes with gcc, so configuring glibc
7026 # with a fresh cross-compiler works.
7027 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7028 # <limits.h> exists even on freestanding compilers.
7029 # On the NeXT, cc -E runs the code through the compiler's parser,
7030 # not just through cpp. "Syntax error" is here to catch this case.
7031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7032 /* end confdefs.h. */
7034 # include <limits.h>
7036 # include <assert.h>
7040 if ac_fn_c_try_cpp "$LINENO"; then :
7043 # Broken: fails on valid input.
7046 rm -f conftest.err conftest.i conftest.$ac_ext
7048 # OK, works on sane cases. Now check whether nonexistent headers
7049 # can be detected and how.
7050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7051 /* end confdefs.h. */
7052 #include <ac_nonexistent.h>
7054 if ac_fn_c_try_cpp "$LINENO"; then :
7055 # Broken: success on invalid input.
7058 # Passes both tests.
7062 rm -f conftest.err conftest.i conftest.$ac_ext
7065 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7066 rm -f conftest.i conftest.err conftest.$ac_ext
7067 if $ac_preproc_ok; then :
7079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7080 $as_echo "$CPP" >&6; }
7082 for ac_c_preproc_warn_flag in '' yes
7084 # Use a header file that comes with gcc, so configuring glibc
7085 # with a fresh cross-compiler works.
7086 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7087 # <limits.h> exists even on freestanding compilers.
7088 # On the NeXT, cc -E runs the code through the compiler's parser,
7089 # not just through cpp. "Syntax error" is here to catch this case.
7090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7091 /* end confdefs.h. */
7093 # include <limits.h>
7095 # include <assert.h>
7099 if ac_fn_c_try_cpp "$LINENO"; then :
7102 # Broken: fails on valid input.
7105 rm -f conftest.err conftest.i conftest.$ac_ext
7107 # OK, works on sane cases. Now check whether nonexistent headers
7108 # can be detected and how.
7109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7110 /* end confdefs.h. */
7111 #include <ac_nonexistent.h>
7113 if ac_fn_c_try_cpp "$LINENO"; then :
7114 # Broken: success on invalid input.
7117 # Passes both tests.
7121 rm -f conftest.err conftest.i conftest.$ac_ext
7124 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7125 rm -f conftest.i conftest.err conftest.$ac_ext
7126 if $ac_preproc_ok; then :
7129 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7130 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7131 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7132 See \`config.log' for more details" "$LINENO" 5; }
7136 ac_cpp='$CPP $CPPFLAGS'
7137 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7138 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7139 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7145 # Set up TAS assembly code if needed; the template file has now had its
7146 # chance to request this.
7148 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
7151 if test "$need_tas" = yes ; then
7160 # Automatic dependency tracking
7164 # Check whether --enable-depend was given.
7165 if test "${enable_depend+set}" = set; then :
7166 enableval=$enable_depend;
7175 as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
7189 # Enable assert checks
7193 # Check whether --enable-cassert was given.
7194 if test "${enable_cassert+set}" = set; then :
7195 enableval=$enable_cassert;
7199 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
7206 as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
7219 # Include directories
7222 IFS="${IFS}${PATH_SEPARATOR}"
7223 # SRCH_INC comes from the template file
7224 for dir in $with_includes $SRCH_INC; do
7225 if test -d "$dir"; then
7226 INCLUDES="$INCLUDES -I$dir"
7228 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
7229 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
7237 # Library directories
7240 IFS="${IFS}${PATH_SEPARATOR}"
7241 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
7242 for dir in $LIBRARY_DIRS $SRCH_LIB; do
7243 if test -d "$dir"; then
7244 LIBDIRS="$LIBDIRS -L$dir"
7246 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
7247 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
7253 # Enable thread-safe client libraries
7255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
7256 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
7259 # Check whether --enable-thread-safety was given.
7260 if test "${enable_thread_safety+set}" = set; then :
7261 enableval=$enable_thread_safety;
7270 as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
7275 enable_thread_safety=yes
7280 if test "$enable_thread_safety" = yes; then
7282 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
7285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
7286 $as_echo "$enable_thread_safety" >&6; }
7292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
7293 $as_echo_n "checking whether to build with ICU support... " >&6; }
7297 # Check whether --with-icu was given.
7298 if test "${with_icu+set}" = set; then :
7303 $as_echo "#define USE_ICU 1" >>confdefs.h
7310 as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
7320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
7321 $as_echo "$with_icu" >&6; }
7324 if test "$with_icu" = yes; then
7332 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7333 if test -n "$ac_tool_prefix"; then
7334 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7335 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7337 $as_echo_n "checking for $ac_word... " >&6; }
7338 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7339 $as_echo_n "(cached) " >&6
7343 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7346 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7350 test -z "$as_dir" && as_dir=.
7351 for ac_exec_ext in '' $ac_executable_extensions; do
7352 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7353 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7354 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7364 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7365 if test -n "$PKG_CONFIG"; then
7366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7367 $as_echo "$PKG_CONFIG" >&6; }
7369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7370 $as_echo "no" >&6; }
7375 if test -z "$ac_cv_path_PKG_CONFIG"; then
7376 ac_pt_PKG_CONFIG=$PKG_CONFIG
7377 # Extract the first word of "pkg-config", so it can be a program name with args.
7378 set dummy pkg-config; ac_word=$2
7379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7380 $as_echo_n "checking for $ac_word... " >&6; }
7381 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7382 $as_echo_n "(cached) " >&6
7384 case $ac_pt_PKG_CONFIG in
7386 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7389 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7393 test -z "$as_dir" && as_dir=.
7394 for ac_exec_ext in '' $ac_executable_extensions; do
7395 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7396 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7397 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7407 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7408 if test -n "$ac_pt_PKG_CONFIG"; then
7409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7410 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7413 $as_echo "no" >&6; }
7416 if test "x$ac_pt_PKG_CONFIG" = x; then
7419 case $cross_compiling:$ac_tool_warned in
7421 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7422 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7423 ac_tool_warned=yes ;;
7425 PKG_CONFIG=$ac_pt_PKG_CONFIG
7428 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7432 if test -n "$PKG_CONFIG"; then
7433 _pkg_min_version=0.9.0
7434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7435 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7436 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7438 $as_echo "yes" >&6; }
7440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7441 $as_echo "no" >&6; }
7447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
7448 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
7450 if test -n "$ICU_CFLAGS"; then
7451 pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
7452 elif test -n "$PKG_CONFIG"; then
7453 if test -n "$PKG_CONFIG" && \
7454 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7455 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7457 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7458 test $ac_status = 0; }; then
7459 pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
7460 test "x$?" != "x0" && pkg_failed=yes
7467 if test -n "$ICU_LIBS"; then
7468 pkg_cv_ICU_LIBS="$ICU_LIBS"
7469 elif test -n "$PKG_CONFIG"; then
7470 if test -n "$PKG_CONFIG" && \
7471 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7472 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7474 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7475 test $ac_status = 0; }; then
7476 pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
7477 test "x$?" != "x0" && pkg_failed=yes
7487 if test $pkg_failed = yes; then
7488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7489 $as_echo "no" >&6; }
7491 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7492 _pkg_short_errors_supported=yes
7494 _pkg_short_errors_supported=no
7496 if test $_pkg_short_errors_supported = yes; then
7497 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7499 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7501 # Put the nasty error message in config.log where it belongs
7502 echo "$ICU_PKG_ERRORS" >&5
7504 as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
7508 Consider adjusting the PKG_CONFIG_PATH environment variable if you
7509 installed software in a non-standard prefix.
7511 Alternatively, you may set the environment variables ICU_CFLAGS
7512 and ICU_LIBS to avoid the need to call pkg-config.
7513 See the pkg-config man page for more details." "$LINENO" 5
7514 elif test $pkg_failed = untried; then
7515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7516 $as_echo "no" >&6; }
7517 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7518 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7519 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
7520 is in your PATH or set the PKG_CONFIG environment variable to the full
7523 Alternatively, you may set the environment variables ICU_CFLAGS
7524 and ICU_LIBS to avoid the need to call pkg-config.
7525 See the pkg-config man page for more details.
7527 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
7528 See \`config.log' for more details" "$LINENO" 5; }
7530 ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
7531 ICU_LIBS=$pkg_cv_ICU_LIBS
7532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7533 $as_echo "yes" >&6; }
7539 # Optionally build Tcl modules (PL/Tcl)
7541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
7542 $as_echo_n "checking whether to build with Tcl... " >&6; }
7546 # Check whether --with-tcl was given.
7547 if test "${with_tcl+set}" = set; then :
7557 as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
7567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
7568 $as_echo "$with_tcl" >&6; }
7571 # We see if the path to the Tcl/Tk configuration scripts is specified.
7572 # This will override the use of tclsh to find the paths to search.
7577 # Check whether --with-tclconfig was given.
7578 if test "${with_tclconfig+set}" = set; then :
7579 withval=$with_tclconfig;
7582 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7585 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7597 # Optionally build Perl modules (PL/Perl)
7599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
7600 $as_echo_n "checking whether to build Perl modules... " >&6; }
7604 # Check whether --with-perl was given.
7605 if test "${with_perl+set}" = set; then :
7615 as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
7625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
7626 $as_echo "$with_perl" >&6; }
7630 # Optionally build Python modules (PL/Python)
7632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
7633 $as_echo_n "checking whether to build Python modules... " >&6; }
7637 # Check whether --with-python was given.
7638 if test "${with_python+set}" = set; then :
7639 withval=$with_python;
7648 as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
7658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
7659 $as_echo "$with_python" >&6; }
7665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
7666 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
7670 # Check whether --with-gssapi was given.
7671 if test "${with_gssapi+set}" = set; then :
7672 withval=$with_gssapi;
7677 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
7679 krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
7686 as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
7696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
7697 $as_echo "$with_gssapi" >&6; }
7705 # Kerberos configuration parameters
7710 # Check whether --with-krb-srvnam was given.
7711 if test "${with_krb_srvnam+set}" = set; then :
7712 withval=$with_krb_srvnam;
7715 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7718 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7726 with_krb_srvnam="postgres"
7732 cat >>confdefs.h <<_ACEOF
7733 #define PG_KRB_SRVNAM "$with_krb_srvnam"
7741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
7742 $as_echo_n "checking whether to build with PAM support... " >&6; }
7746 # Check whether --with-pam was given.
7747 if test "${with_pam+set}" = set; then :
7752 $as_echo "#define USE_PAM 1" >>confdefs.h
7759 as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
7769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
7770 $as_echo "$with_pam" >&6; }
7776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
7777 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
7781 # Check whether --with-bsd-auth was given.
7782 if test "${with_bsd_auth+set}" = set; then :
7783 withval=$with_bsd_auth;
7787 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
7794 as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
7804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
7805 $as_echo "$with_bsd_auth" >&6; }
7811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
7812 $as_echo_n "checking whether to build with LDAP support... " >&6; }
7816 # Check whether --with-ldap was given.
7817 if test "${with_ldap+set}" = set; then :
7822 $as_echo "#define USE_LDAP 1" >>confdefs.h
7829 as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
7839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
7840 $as_echo "$with_ldap" >&6; }
7847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
7848 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
7852 # Check whether --with-bonjour was given.
7853 if test "${with_bonjour+set}" = set; then :
7854 withval=$with_bonjour;
7858 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
7865 as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
7875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
7876 $as_echo "$with_bonjour" >&6; }
7882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
7883 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
7887 # Check whether --with-openssl was given.
7888 if test "${with_openssl+set}" = set; then :
7889 withval=$with_openssl;
7893 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
7900 as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
7910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
7911 $as_echo "$with_openssl" >&6; }
7917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
7918 $as_echo_n "checking whether to build with SELinux support... " >&6; }
7922 # Check whether --with-selinux was given.
7923 if test "${with_selinux+set}" = set; then :
7924 withval=$with_selinux;
7933 as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
7944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
7945 $as_echo "$with_selinux" >&6; }
7950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
7951 $as_echo_n "checking whether to build with systemd support... " >&6; }
7955 # Check whether --with-systemd was given.
7956 if test "${with_systemd+set}" = set; then :
7957 withval=$with_systemd;
7961 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
7968 as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
7979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
7980 $as_echo "$with_systemd" >&6; }
7988 # Check whether --with-readline was given.
7989 if test "${with_readline+set}" = set; then :
7990 withval=$with_readline;
7999 as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
8009 # readline on MinGW has problems with backslashes in psql and other bugs.
8010 # This is particularly a problem with non-US code pages.
8011 # Therefore disable its use until we understand the cause. 2004-07-20
8012 if test "$PORTNAME" = "win32"; then
8013 if test "$with_readline" = yes; then
8014 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8015 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8027 # Check whether --with-libedit-preferred was given.
8028 if test "${with_libedit_preferred+set}" = set; then :
8029 withval=$with_libedit_preferred;
8038 as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8043 with_libedit_preferred=no
8053 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8054 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8055 # UUID library. More than one of these might be present on a given platform,
8056 # so we make the user say which one she wants.
8061 # Check whether --with-uuid was given.
8062 if test "${with_uuid+set}" = set; then :
8066 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8069 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8079 if test x"$with_uuid" = x"" ; then
8085 # Check whether --with-ossp-uuid was given.
8086 if test "${with_ossp_uuid+set}" = set; then :
8087 withval=$with_ossp_uuid;
8096 as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8106 if test "$with_ossp_uuid" = yes ; then
8110 if test "$with_uuid" = bsd ; then
8112 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8114 UUID_EXTRA_OBJS="md5.o sha1.o"
8115 elif test "$with_uuid" = e2fs ; then
8117 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
8119 UUID_EXTRA_OBJS="md5.o sha1.o"
8120 elif test "$with_uuid" = ossp ; then
8122 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
8125 elif test "$with_uuid" = no ; then
8128 as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
8140 # Check whether --with-libxml was given.
8141 if test "${with_libxml+set}" = set; then :
8142 withval=$with_libxml;
8146 $as_echo "#define USE_LIBXML 1" >>confdefs.h
8153 as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
8164 if test "$with_libxml" = yes ; then
8165 if test -z "$XML2_CONFIG"; then
8166 for ac_prog in xml2-config
8168 # Extract the first word of "$ac_prog", so it can be a program name with args.
8169 set dummy $ac_prog; ac_word=$2
8170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8171 $as_echo_n "checking for $ac_word... " >&6; }
8172 if ${ac_cv_path_XML2_CONFIG+:} false; then :
8173 $as_echo_n "(cached) " >&6
8175 case $XML2_CONFIG in
8177 ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
8180 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8184 test -z "$as_dir" && as_dir=.
8185 for ac_exec_ext in '' $ac_executable_extensions; do
8186 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8187 ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8188 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8198 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
8199 if test -n "$XML2_CONFIG"; then
8200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8201 $as_echo "$XML2_CONFIG" >&6; }
8203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8204 $as_echo "no" >&6; }
8208 test -n "$XML2_CONFIG" && break
8212 # Report the value of XML2_CONFIG in configure's output in all cases.
8213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
8214 $as_echo_n "checking for XML2_CONFIG... " >&6; }
8215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8216 $as_echo "$XML2_CONFIG" >&6; }
8219 if test -n "$XML2_CONFIG"; then
8220 for pgac_option in `$XML2_CONFIG --cflags`; do
8221 case $pgac_option in
8222 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8225 for pgac_option in `$XML2_CONFIG --libs`; do
8226 case $pgac_option in
8227 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8241 # Check whether --with-libxslt was given.
8242 if test "${with_libxslt+set}" = set; then :
8243 withval=$with_libxslt;
8247 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8254 as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8274 # Check whether --with-system-tzdata was given.
8275 if test "${with_system_tzdata+set}" = set; then :
8276 withval=$with_system_tzdata;
8279 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8282 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8300 # Check whether --with-zlib was given.
8301 if test "${with_zlib+set}" = set; then :
8311 as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
8327 # Assume system is ELF if it predefines __ELF__ as 1,
8328 # otherwise believe host_os based default.
8330 freebsd1*|freebsd2*) elf=no;;
8331 freebsd3*|freebsd4*) elf=yes;;
8335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
8336 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
8337 if ${ac_cv_path_GREP+:} false; then :
8338 $as_echo_n "(cached) " >&6
8340 if test -z "$GREP"; then
8341 ac_path_GREP_found=false
8342 # Loop through the user's path and test for each of PROGNAME-LIST
8343 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8344 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8347 test -z "$as_dir" && as_dir=.
8348 for ac_prog in grep ggrep; do
8349 for ac_exec_ext in '' $ac_executable_extensions; do
8350 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
8351 as_fn_executable_p "$ac_path_GREP" || continue
8352 # Check for GNU ac_path_GREP and select it if it is found.
8353 # Check for GNU $ac_path_GREP
8354 case `"$ac_path_GREP" --version 2>&1` in
8356 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
8359 $as_echo_n 0123456789 >"conftest.in"
8362 cat "conftest.in" "conftest.in" >"conftest.tmp"
8363 mv "conftest.tmp" "conftest.in"
8364 cp "conftest.in" "conftest.nl"
8365 $as_echo 'GREP' >> "conftest.nl"
8366 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8367 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8368 as_fn_arith $ac_count + 1 && ac_count=$as_val
8369 if test $ac_count -gt ${ac_path_GREP_max-0}; then
8370 # Best one so far, save it but keep looking for a better one
8371 ac_cv_path_GREP="$ac_path_GREP"
8372 ac_path_GREP_max=$ac_count
8374 # 10*(2^10) chars as input seems more than enough
8375 test $ac_count -gt 10 && break
8377 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8380 $ac_path_GREP_found && break 3
8385 if test -z "$ac_cv_path_GREP"; then
8386 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8389 ac_cv_path_GREP=$GREP
8393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
8394 $as_echo "$ac_cv_path_GREP" >&6; }
8395 GREP="$ac_cv_path_GREP"
8398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
8399 $as_echo_n "checking for egrep... " >&6; }
8400 if ${ac_cv_path_EGREP+:} false; then :
8401 $as_echo_n "(cached) " >&6
8403 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
8404 then ac_cv_path_EGREP="$GREP -E"
8406 if test -z "$EGREP"; then
8407 ac_path_EGREP_found=false
8408 # Loop through the user's path and test for each of PROGNAME-LIST
8409 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8410 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8413 test -z "$as_dir" && as_dir=.
8414 for ac_prog in egrep; do
8415 for ac_exec_ext in '' $ac_executable_extensions; do
8416 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
8417 as_fn_executable_p "$ac_path_EGREP" || continue
8418 # Check for GNU ac_path_EGREP and select it if it is found.
8419 # Check for GNU $ac_path_EGREP
8420 case `"$ac_path_EGREP" --version 2>&1` in
8422 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
8425 $as_echo_n 0123456789 >"conftest.in"
8428 cat "conftest.in" "conftest.in" >"conftest.tmp"
8429 mv "conftest.tmp" "conftest.in"
8430 cp "conftest.in" "conftest.nl"
8431 $as_echo 'EGREP' >> "conftest.nl"
8432 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8433 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8434 as_fn_arith $ac_count + 1 && ac_count=$as_val
8435 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
8436 # Best one so far, save it but keep looking for a better one
8437 ac_cv_path_EGREP="$ac_path_EGREP"
8438 ac_path_EGREP_max=$ac_count
8440 # 10*(2^10) chars as input seems more than enough
8441 test $ac_count -gt 10 && break
8443 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8446 $ac_path_EGREP_found && break 3
8451 if test -z "$ac_cv_path_EGREP"; then
8452 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8455 ac_cv_path_EGREP=$EGREP
8460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
8461 $as_echo "$ac_cv_path_EGREP" >&6; }
8462 EGREP="$ac_cv_path_EGREP"
8465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8466 /* end confdefs.h. */
8472 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8473 $EGREP "yes" >/dev/null 2>&1; then :
8476 if test "X$elf" = "Xyes" ; then
8490 CPPFLAGS="$CPPFLAGS $INCLUDES"
8491 LDFLAGS="$LDFLAGS $LIBDIRS"
8497 # Check whether --with-gnu-ld was given.
8498 if test "${with_gnu_ld+set}" = set; then :
8499 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8505 if test "$GCC" = yes; then
8506 # Check if gcc -print-prog-name=ld gives a path.
8507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8508 $as_echo_n "checking for ld used by GCC... " >&6; }
8511 # gcc leaves a trailing carriage return which upsets mingw
8512 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8514 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8517 # Accept absolute paths.
8518 [\\/]* | [A-Za-z]:[\\/]*)
8519 re_direlt='/[^/][^/]*/\.\./'
8520 # Canonicalize the path of ld
8521 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8522 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8523 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8525 test -z "$LD" && LD="$ac_prog"
8528 # If it fails, then pretend we aren't using GCC.
8532 # If it is relative, then search for the first ld in PATH.
8536 elif test "$with_gnu_ld" = yes; then
8537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8538 $as_echo_n "checking for GNU ld... " >&6; }
8540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8541 $as_echo_n "checking for non-GNU ld... " >&6; }
8543 if ${ac_cv_path_LD+:} false; then :
8544 $as_echo_n "(cached) " >&6
8546 if test -z "$LD"; then
8547 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8548 for ac_dir in $PATH; do
8549 test -z "$ac_dir" && ac_dir=.
8550 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8551 ac_cv_path_LD="$ac_dir/$ac_prog"
8552 # Check to see if the program is GNU ld. I'd rather use --version,
8553 # but apparently some GNU ld's only accept -v.
8554 # Break only if it was the GNU/non-GNU ld that we prefer.
8555 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8556 test "$with_gnu_ld" != no && break
8558 test "$with_gnu_ld" != yes && break
8564 ac_cv_path_LD="$LD" # Let the user override the test with a path.
8569 if test -n "$LD"; then
8570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8571 $as_echo "$LD" >&6; }
8573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8574 $as_echo "no" >&6; }
8576 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8578 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8579 if ${ac_cv_prog_gnu_ld+:} false; then :
8580 $as_echo_n "(cached) " >&6
8582 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8583 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8584 ac_cv_prog_gnu_ld=yes
8586 ac_cv_prog_gnu_ld=no
8589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
8590 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
8591 with_gnu_ld=$ac_cv_prog_gnu_ld
8596 if test -n "$ac_tool_prefix"; then
8597 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8598 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8600 $as_echo_n "checking for $ac_word... " >&6; }
8601 if ${ac_cv_prog_RANLIB+:} false; then :
8602 $as_echo_n "(cached) " >&6
8604 if test -n "$RANLIB"; then
8605 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8607 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8611 test -z "$as_dir" && as_dir=.
8612 for ac_exec_ext in '' $ac_executable_extensions; do
8613 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8614 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8615 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8624 RANLIB=$ac_cv_prog_RANLIB
8625 if test -n "$RANLIB"; then
8626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8627 $as_echo "$RANLIB" >&6; }
8629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8630 $as_echo "no" >&6; }
8635 if test -z "$ac_cv_prog_RANLIB"; then
8636 ac_ct_RANLIB=$RANLIB
8637 # Extract the first word of "ranlib", so it can be a program name with args.
8638 set dummy ranlib; ac_word=$2
8639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8640 $as_echo_n "checking for $ac_word... " >&6; }
8641 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8642 $as_echo_n "(cached) " >&6
8644 if test -n "$ac_ct_RANLIB"; then
8645 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8647 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8651 test -z "$as_dir" && as_dir=.
8652 for ac_exec_ext in '' $ac_executable_extensions; do
8653 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8654 ac_cv_prog_ac_ct_RANLIB="ranlib"
8655 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8664 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8665 if test -n "$ac_ct_RANLIB"; then
8666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8667 $as_echo "$ac_ct_RANLIB" >&6; }
8669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8670 $as_echo "no" >&6; }
8673 if test "x$ac_ct_RANLIB" = x; then
8676 case $cross_compiling:$ac_tool_warned in
8678 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8679 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8680 ac_tool_warned=yes ;;
8682 RANLIB=$ac_ct_RANLIB
8685 RANLIB="$ac_cv_prog_RANLIB"
8689 if test -n "$ac_tool_prefix"; then
8690 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8691 set dummy ${ac_tool_prefix}strip; ac_word=$2
8692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8693 $as_echo_n "checking for $ac_word... " >&6; }
8694 if ${ac_cv_prog_STRIP+:} false; then :
8695 $as_echo_n "(cached) " >&6
8697 if test -n "$STRIP"; then
8698 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8700 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8704 test -z "$as_dir" && as_dir=.
8705 for ac_exec_ext in '' $ac_executable_extensions; do
8706 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8707 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8708 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8717 STRIP=$ac_cv_prog_STRIP
8718 if test -n "$STRIP"; then
8719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8720 $as_echo "$STRIP" >&6; }
8722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8723 $as_echo "no" >&6; }
8728 if test -z "$ac_cv_prog_STRIP"; then
8730 # Extract the first word of "strip", so it can be a program name with args.
8731 set dummy strip; ac_word=$2
8732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8733 $as_echo_n "checking for $ac_word... " >&6; }
8734 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8735 $as_echo_n "(cached) " >&6
8737 if test -n "$ac_ct_STRIP"; then
8738 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8740 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8744 test -z "$as_dir" && as_dir=.
8745 for ac_exec_ext in '' $ac_executable_extensions; do
8746 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8747 ac_cv_prog_ac_ct_STRIP="strip"
8748 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8757 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8758 if test -n "$ac_ct_STRIP"; then
8759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8760 $as_echo "$ac_ct_STRIP" >&6; }
8762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8763 $as_echo "no" >&6; }
8766 if test "x$ac_ct_STRIP" = x; then
8769 case $cross_compiling:$ac_tool_warned in
8771 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8772 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8773 ac_tool_warned=yes ;;
8778 STRIP="$ac_cv_prog_STRIP"
8782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
8783 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
8784 if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
8785 STRIP_STATIC_LIB="$STRIP -x"
8786 STRIP_SHARED_LIB="$STRIP --strip-unneeded"
8787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8788 $as_echo "yes" >&6; }
8793 STRIP_STATIC_LIB=$STRIP
8794 STRIP_SHARED_LIB=$STRIP
8795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8796 $as_echo "yes" >&6; }
8801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8802 $as_echo "no" >&6; }
8809 if test -n "$ac_tool_prefix"; then
8810 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8811 set dummy ${ac_tool_prefix}ar; ac_word=$2
8812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8813 $as_echo_n "checking for $ac_word... " >&6; }
8814 if ${ac_cv_prog_AR+:} false; then :
8815 $as_echo_n "(cached) " >&6
8817 if test -n "$AR"; then
8818 ac_cv_prog_AR="$AR" # Let the user override the test.
8820 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8824 test -z "$as_dir" && as_dir=.
8825 for ac_exec_ext in '' $ac_executable_extensions; do
8826 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8827 ac_cv_prog_AR="${ac_tool_prefix}ar"
8828 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8838 if test -n "$AR"; then
8839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8840 $as_echo "$AR" >&6; }
8842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8843 $as_echo "no" >&6; }
8848 if test -z "$ac_cv_prog_AR"; then
8850 # Extract the first word of "ar", so it can be a program name with args.
8851 set dummy ar; ac_word=$2
8852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8853 $as_echo_n "checking for $ac_word... " >&6; }
8854 if ${ac_cv_prog_ac_ct_AR+:} false; then :
8855 $as_echo_n "(cached) " >&6
8857 if test -n "$ac_ct_AR"; then
8858 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8860 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8864 test -z "$as_dir" && as_dir=.
8865 for ac_exec_ext in '' $ac_executable_extensions; do
8866 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8867 ac_cv_prog_ac_ct_AR="ar"
8868 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8877 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8878 if test -n "$ac_ct_AR"; then
8879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8880 $as_echo "$ac_ct_AR" >&6; }
8882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8883 $as_echo "no" >&6; }
8886 if test "x$ac_ct_AR" = x; then
8889 case $cross_compiling:$ac_tool_warned in
8891 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8892 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8893 ac_tool_warned=yes ;;
8901 if test "$PORTNAME" = "win32"; then
8902 if test -n "$ac_tool_prefix"; then
8903 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8904 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8906 $as_echo_n "checking for $ac_word... " >&6; }
8907 if ${ac_cv_prog_DLLTOOL+:} false; then :
8908 $as_echo_n "(cached) " >&6
8910 if test -n "$DLLTOOL"; then
8911 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8913 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8917 test -z "$as_dir" && as_dir=.
8918 for ac_exec_ext in '' $ac_executable_extensions; do
8919 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8920 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8921 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8930 DLLTOOL=$ac_cv_prog_DLLTOOL
8931 if test -n "$DLLTOOL"; then
8932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8933 $as_echo "$DLLTOOL" >&6; }
8935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8936 $as_echo "no" >&6; }
8941 if test -z "$ac_cv_prog_DLLTOOL"; then
8942 ac_ct_DLLTOOL=$DLLTOOL
8943 # Extract the first word of "dlltool", so it can be a program name with args.
8944 set dummy dlltool; ac_word=$2
8945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8946 $as_echo_n "checking for $ac_word... " >&6; }
8947 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
8948 $as_echo_n "(cached) " >&6
8950 if test -n "$ac_ct_DLLTOOL"; then
8951 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8953 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8957 test -z "$as_dir" && as_dir=.
8958 for ac_exec_ext in '' $ac_executable_extensions; do
8959 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8960 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8961 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8970 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8971 if test -n "$ac_ct_DLLTOOL"; then
8972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8973 $as_echo "$ac_ct_DLLTOOL" >&6; }
8975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8976 $as_echo "no" >&6; }
8979 if test "x$ac_ct_DLLTOOL" = x; then
8982 case $cross_compiling:$ac_tool_warned in
8984 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8985 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8986 ac_tool_warned=yes ;;
8988 DLLTOOL=$ac_ct_DLLTOOL
8991 DLLTOOL="$ac_cv_prog_DLLTOOL"
8994 if test -n "$ac_tool_prefix"; then
8995 # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
8996 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
8997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8998 $as_echo_n "checking for $ac_word... " >&6; }
8999 if ${ac_cv_prog_DLLWRAP+:} false; then :
9000 $as_echo_n "(cached) " >&6
9002 if test -n "$DLLWRAP"; then
9003 ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
9005 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9009 test -z "$as_dir" && as_dir=.
9010 for ac_exec_ext in '' $ac_executable_extensions; do
9011 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9012 ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
9013 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9022 DLLWRAP=$ac_cv_prog_DLLWRAP
9023 if test -n "$DLLWRAP"; then
9024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
9025 $as_echo "$DLLWRAP" >&6; }
9027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9028 $as_echo "no" >&6; }
9033 if test -z "$ac_cv_prog_DLLWRAP"; then
9034 ac_ct_DLLWRAP=$DLLWRAP
9035 # Extract the first word of "dllwrap", so it can be a program name with args.
9036 set dummy dllwrap; ac_word=$2
9037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9038 $as_echo_n "checking for $ac_word... " >&6; }
9039 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
9040 $as_echo_n "(cached) " >&6
9042 if test -n "$ac_ct_DLLWRAP"; then
9043 ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
9045 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9049 test -z "$as_dir" && as_dir=.
9050 for ac_exec_ext in '' $ac_executable_extensions; do
9051 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9052 ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
9053 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9062 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
9063 if test -n "$ac_ct_DLLWRAP"; then
9064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
9065 $as_echo "$ac_ct_DLLWRAP" >&6; }
9067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9068 $as_echo "no" >&6; }
9071 if test "x$ac_ct_DLLWRAP" = x; then
9074 case $cross_compiling:$ac_tool_warned in
9076 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9077 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9078 ac_tool_warned=yes ;;
9080 DLLWRAP=$ac_ct_DLLWRAP
9083 DLLWRAP="$ac_cv_prog_DLLWRAP"
9086 if test -n "$ac_tool_prefix"; then
9087 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9088 set dummy ${ac_tool_prefix}windres; ac_word=$2
9089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9090 $as_echo_n "checking for $ac_word... " >&6; }
9091 if ${ac_cv_prog_WINDRES+:} false; then :
9092 $as_echo_n "(cached) " >&6
9094 if test -n "$WINDRES"; then
9095 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9097 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9101 test -z "$as_dir" && as_dir=.
9102 for ac_exec_ext in '' $ac_executable_extensions; do
9103 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9104 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9105 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9114 WINDRES=$ac_cv_prog_WINDRES
9115 if test -n "$WINDRES"; then
9116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9117 $as_echo "$WINDRES" >&6; }
9119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9120 $as_echo "no" >&6; }
9125 if test -z "$ac_cv_prog_WINDRES"; then
9126 ac_ct_WINDRES=$WINDRES
9127 # Extract the first word of "windres", so it can be a program name with args.
9128 set dummy windres; ac_word=$2
9129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9130 $as_echo_n "checking for $ac_word... " >&6; }
9131 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9132 $as_echo_n "(cached) " >&6
9134 if test -n "$ac_ct_WINDRES"; then
9135 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9137 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9141 test -z "$as_dir" && as_dir=.
9142 for ac_exec_ext in '' $ac_executable_extensions; do
9143 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9144 ac_cv_prog_ac_ct_WINDRES="windres"
9145 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9154 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9155 if test -n "$ac_ct_WINDRES"; then
9156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9157 $as_echo "$ac_ct_WINDRES" >&6; }
9159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9160 $as_echo "no" >&6; }
9163 if test "x$ac_ct_WINDRES" = x; then
9166 case $cross_compiling:$ac_tool_warned in
9168 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9169 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9170 ac_tool_warned=yes ;;
9172 WINDRES=$ac_ct_WINDRES
9175 WINDRES="$ac_cv_prog_WINDRES"
9180 # Find a good install program. We prefer a C program (faster),
9181 # so one script is as good as another. But avoid the broken or
9182 # incompatible versions:
9183 # SysV /etc/install, /usr/sbin/install
9184 # SunOS /usr/etc/install
9185 # IRIX /sbin/install
9187 # AmigaOS /C/install, which installs bootblocks on floppy discs
9188 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9189 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9190 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9191 # OS/2's system install, which has a completely different semantic
9192 # ./install, which can be erroneously created by make from ./install.sh.
9193 # Reject install programs that cannot install multiple files.
9194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9195 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9196 if test -z "$INSTALL"; then
9197 if ${ac_cv_path_install+:} false; then :
9198 $as_echo_n "(cached) " >&6
9200 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9204 test -z "$as_dir" && as_dir=.
9205 # Account for people who put trailing slashes in PATH elements.
9206 case $as_dir/ in #((
9207 ./ | .// | /[cC]/* | \
9208 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9209 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9212 # OSF1 and SCO ODT 3.0 have their own names for install.
9213 # Don't use installbsd from OSF since it installs stuff as root
9215 for ac_prog in ginstall scoinst install; do
9216 for ac_exec_ext in '' $ac_executable_extensions; do
9217 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9218 if test $ac_prog = install &&
9219 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9220 # AIX install. It has an incompatible calling convention.
9222 elif test $ac_prog = install &&
9223 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9224 # program-specific install script used by HP pwplus--don't use.
9227 rm -rf conftest.one conftest.two conftest.dir
9228 echo one > conftest.one
9229 echo two > conftest.two
9231 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9232 test -s conftest.one && test -s conftest.two &&
9233 test -s conftest.dir/conftest.one &&
9234 test -s conftest.dir/conftest.two
9236 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9249 rm -rf conftest.one conftest.two conftest.dir
9252 if test "${ac_cv_path_install+set}" = set; then
9253 INSTALL=$ac_cv_path_install
9255 # As a last resort, use the slow shell script. Don't cache a
9256 # value for INSTALL within a source directory, because that will
9257 # break other packages using the cache if that directory is
9258 # removed, or if the value is a relative name.
9259 INSTALL=$ac_install_sh
9262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9263 $as_echo "$INSTALL" >&6; }
9265 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9266 # It thinks the first close brace ends the variable substitution.
9267 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9269 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9271 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9273 # When Autoconf chooses install-sh as install program it tries to generate
9274 # a relative path to it in each makefile where it substitutes it. This clashes
9275 # with our Makefile.global concept. This workaround helps.
9277 *install-sh*) install_bin='';;
9278 *) install_bin=$INSTALL;;
9282 if test -z "$TAR"; then
9285 # Extract the first word of "$ac_prog", so it can be a program name with args.
9286 set dummy $ac_prog; ac_word=$2
9287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9288 $as_echo_n "checking for $ac_word... " >&6; }
9289 if ${ac_cv_path_TAR+:} false; then :
9290 $as_echo_n "(cached) " >&6
9294 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9297 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9301 test -z "$as_dir" && as_dir=.
9302 for ac_exec_ext in '' $ac_executable_extensions; do
9303 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9304 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9305 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9316 if test -n "$TAR"; then
9317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9318 $as_echo "$TAR" >&6; }
9320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9321 $as_echo "no" >&6; }
9325 test -n "$TAR" && break
9329 # Report the value of TAR in configure's output in all cases.
9330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9331 $as_echo_n "checking for TAR... " >&6; }
9332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9333 $as_echo "$TAR" >&6; }
9336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9337 $as_echo_n "checking whether ln -s works... " >&6; }
9339 if test "$LN_S" = "ln -s"; then
9340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9341 $as_echo "yes" >&6; }
9343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9344 $as_echo "no, using $LN_S" >&6; }
9347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
9348 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
9349 if test -z "$MKDIR_P"; then
9350 if ${ac_cv_path_mkdir+:} false; then :
9351 $as_echo_n "(cached) " >&6
9353 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9354 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
9357 test -z "$as_dir" && as_dir=.
9358 for ac_prog in mkdir gmkdir; do
9359 for ac_exec_ext in '' $ac_executable_extensions; do
9360 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
9361 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
9362 'mkdir (GNU coreutils) '* | \
9363 'mkdir (coreutils) '* | \
9364 'mkdir (fileutils) '4.1*)
9365 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
9375 test -d ./--version && rmdir ./--version
9376 if test "${ac_cv_path_mkdir+set}" = set; then
9377 MKDIR_P="$ac_cv_path_mkdir -p"
9379 # As a last resort, use the slow shell script. Don't cache a
9380 # value for MKDIR_P within a source directory, because that will
9381 # break other packages using the cache if that directory is
9382 # removed, or if the value is a relative name.
9383 MKDIR_P="$ac_install_sh -d"
9386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
9387 $as_echo "$MKDIR_P" >&6; }
9389 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
9390 # a relative path to it in each makefile where it substitutes it. This clashes
9391 # with our Makefile.global concept. This workaround helps.
9393 *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
9396 if test -z "$BISON"; then
9397 for ac_prog in bison
9399 # Extract the first word of "$ac_prog", so it can be a program name with args.
9400 set dummy $ac_prog; ac_word=$2
9401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9402 $as_echo_n "checking for $ac_word... " >&6; }
9403 if ${ac_cv_path_BISON+:} false; then :
9404 $as_echo_n "(cached) " >&6
9408 ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
9411 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9415 test -z "$as_dir" && as_dir=.
9416 for ac_exec_ext in '' $ac_executable_extensions; do
9417 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9418 ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
9419 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9429 BISON=$ac_cv_path_BISON
9430 if test -n "$BISON"; then
9431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9432 $as_echo "$BISON" >&6; }
9434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9435 $as_echo "no" >&6; }
9439 test -n "$BISON" && break
9443 # Report the value of BISON in configure's output in all cases.
9444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
9445 $as_echo_n "checking for BISON... " >&6; }
9446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9447 $as_echo "$BISON" >&6; }
9451 if test "$BISON"; then
9452 pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
9453 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
9454 $as_echo "$as_me: using $pgac_bison_version" >&6;}
9455 if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
9457 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9458 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9459 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
9460 $as_echo "$as_me: WARNING:
9461 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9462 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
9465 # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
9466 # of the now preferred %name-prefix "base_yy", but the latter
9467 # doesn't work with Bison 2.3 or less. So for now we silence the
9468 # deprecation warnings.
9469 if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
9471 BISONFLAGS="$BISONFLAGS -Wno-deprecated"
9475 if test -z "$BISON"; then
9476 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9477 *** Without Bison you will not be able to build PostgreSQL from Git nor
9478 *** change any of the parser definition files. You can obtain Bison from
9479 *** a GNU mirror site. (If you are using the official distribution of
9480 *** PostgreSQL then you do not need to worry about this, because the Bison
9481 *** output is pre-generated.)" >&5
9482 $as_echo "$as_me: WARNING:
9483 *** Without Bison you will not be able to build PostgreSQL from Git nor
9484 *** change any of the parser definition files. You can obtain Bison from
9485 *** a GNU mirror site. (If you are using the official distribution of
9486 *** PostgreSQL then you do not need to worry about this, because the Bison
9487 *** output is pre-generated.)" >&2;}
9489 # We don't need AC_SUBST(BISON) because PGAC_PATH_PROGS did it
9492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
9493 $as_echo_n "checking for flex... " >&6; }
9494 if ${pgac_cv_path_flex+:} false; then :
9495 $as_echo_n "(cached) " >&6
9497 # Let the user override the test
9498 if test -n "$FLEX"; then
9499 pgac_cv_path_flex=$FLEX
9503 for pgac_dir in $PATH; do
9505 if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
9508 for pgac_prog in flex lex; do
9509 pgac_candidate="$pgac_dir/$pgac_prog"
9510 if test -f "$pgac_candidate" \
9511 && $pgac_candidate --version </dev/null >/dev/null 2>&1
9513 echo '%%' > conftest.l
9514 if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
9515 pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
9516 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;}'
9518 pgac_cv_path_flex=$pgac_candidate
9521 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9522 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9523 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
9524 $as_echo "$as_me: WARNING:
9525 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9526 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
9532 rm -f conftest.l lex.yy.c
9533 : ${pgac_cv_path_flex=no}
9537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
9538 $as_echo "$pgac_cv_path_flex" >&6; }
9539 if test x"$pgac_cv_path_flex" = x"no"; then
9540 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9541 *** Without Flex you will not be able to build PostgreSQL from Git nor
9542 *** change any of the scanner definition files. You can obtain Flex from
9543 *** a GNU mirror site. (If you are using the official distribution of
9544 *** PostgreSQL then you do not need to worry about this because the Flex
9545 *** output is pre-generated.)" >&5
9546 $as_echo "$as_me: WARNING:
9547 *** Without Flex you will not be able to build PostgreSQL from Git nor
9548 *** change any of the scanner definition files. You can obtain Flex from
9549 *** a GNU mirror site. (If you are using the official distribution of
9550 *** PostgreSQL then you do not need to worry about this because the Flex
9551 *** output is pre-generated.)" >&2;}
9555 FLEX=$pgac_cv_path_flex
9556 pgac_flex_version=`$FLEX --version 2>/dev/null`
9557 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
9558 $as_echo "$as_me: using $pgac_flex_version" >&6;}
9565 if test -z "$PERL"; then
9568 # Extract the first word of "$ac_prog", so it can be a program name with args.
9569 set dummy $ac_prog; ac_word=$2
9570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9571 $as_echo_n "checking for $ac_word... " >&6; }
9572 if ${ac_cv_path_PERL+:} false; then :
9573 $as_echo_n "(cached) " >&6
9577 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
9580 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9584 test -z "$as_dir" && as_dir=.
9585 for ac_exec_ext in '' $ac_executable_extensions; do
9586 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9587 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
9588 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9598 PERL=$ac_cv_path_PERL
9599 if test -n "$PERL"; then
9600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9601 $as_echo "$PERL" >&6; }
9603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9604 $as_echo "no" >&6; }
9608 test -n "$PERL" && break
9612 # Report the value of PERL in configure's output in all cases.
9613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
9614 $as_echo_n "checking for PERL... " >&6; }
9615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9616 $as_echo "$PERL" >&6; }
9620 if test "$PERL"; then
9621 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'`
9622 { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
9623 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
9624 if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
9625 $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
9627 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9628 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9629 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
9630 $as_echo "$as_me: WARNING:
9631 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9632 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
9637 if test -z "$PERL"; then
9638 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9639 *** Without Perl you will not be able to build PostgreSQL from Git.
9640 *** You can obtain Perl from any CPAN mirror site.
9641 *** (If you are using the official distribution of PostgreSQL then you do not
9642 *** need to worry about this, because the Perl output is pre-generated.)" >&5
9643 $as_echo "$as_me: WARNING:
9644 *** Without Perl you will not be able to build PostgreSQL from Git.
9645 *** You can obtain Perl from any CPAN mirror site.
9646 *** (If you are using the official distribution of PostgreSQL then you do not
9647 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
9650 if test "$with_perl" = yes; then
9651 if test -z "$PERL"; then
9652 as_fn_error $? "Perl not found" "$LINENO" 5
9655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
9656 $as_echo_n "checking for Perl archlibexp... " >&6; }
9657 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
9658 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
9659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
9660 $as_echo "$perl_archlibexp" >&6; }
9661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
9662 $as_echo_n "checking for Perl privlibexp... " >&6; }
9663 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
9664 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
9665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
9666 $as_echo "$perl_privlibexp" >&6; }
9667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
9668 $as_echo_n "checking for Perl useshrplib... " >&6; }
9669 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
9670 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
9671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
9672 $as_echo "$perl_useshrplib" >&6; }
9673 if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
9674 as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
9675 You might have to rebuild your Perl installation. Refer to the
9676 documentation for details. Use --without-perl to disable building
9677 PL/Perl." "$LINENO" 5
9679 # On most platforms, archlibexp is also where the Perl include files live ...
9680 perl_includespec="-I$perl_archlibexp/CORE"
9681 # ... but on newer macOS versions, we must use -iwithsysroot to look
9683 if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
9684 if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
9685 perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
9689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
9690 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
9691 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
9692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
9693 $as_echo "$perl_ccflags" >&6; }
9694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
9695 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
9696 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
9697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
9698 $as_echo "$perl_embed_ccflags" >&6; }
9701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
9702 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
9703 if test "$PORTNAME" = "win32" ; then
9704 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
9705 if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
9706 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9708 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
9709 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
9710 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9714 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
9715 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
9716 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
9718 if test -z "$perl_embed_ldflags" ; then
9719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9720 $as_echo "no" >&6; }
9721 as_fn_error $? "could not determine flags for linking embedded Perl.
9722 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
9723 installed." "$LINENO" 5
9725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
9726 $as_echo "$perl_embed_ldflags" >&6; }
9731 if test "$with_python" = yes; then
9732 if test -z "$PYTHON"; then
9733 for ac_prog in python
9735 # Extract the first word of "$ac_prog", so it can be a program name with args.
9736 set dummy $ac_prog; ac_word=$2
9737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9738 $as_echo_n "checking for $ac_word... " >&6; }
9739 if ${ac_cv_path_PYTHON+:} false; then :
9740 $as_echo_n "(cached) " >&6
9744 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
9747 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9751 test -z "$as_dir" && as_dir=.
9752 for ac_exec_ext in '' $ac_executable_extensions; do
9753 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9754 ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
9755 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9765 PYTHON=$ac_cv_path_PYTHON
9766 if test -n "$PYTHON"; then
9767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9768 $as_echo "$PYTHON" >&6; }
9770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9771 $as_echo "no" >&6; }
9775 test -n "$PYTHON" && break
9779 # Report the value of PYTHON in configure's output in all cases.
9780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
9781 $as_echo_n "checking for PYTHON... " >&6; }
9782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9783 $as_echo "$PYTHON" >&6; }
9786 if test x"$PYTHON" = x""; then
9787 as_fn_error $? "Python not found" "$LINENO" 5
9791 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
9792 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
9793 $as_echo "$as_me: using python $python_fullversion" >&6;}
9794 # python_fullversion is typically n.n.n plus some trailing junk
9795 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
9796 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
9797 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
9798 # Reject unsupported Python versions as soon as practical.
9799 if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 4; then
9800 as_fn_error $? "Python version $python_version is too old (version 2.4 or later is required)" "$LINENO" 5
9803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
9804 $as_echo_n "checking for Python distutils module... " >&6; }
9805 if "${PYTHON}" -c 'import distutils' 2>&5
9807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9808 $as_echo "yes" >&6; }
9810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9811 $as_echo "no" >&6; }
9812 as_fn_error $? "distutils module not found" "$LINENO" 5
9815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
9816 $as_echo_n "checking Python configuration directory... " >&6; }
9817 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
9818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
9819 $as_echo "$python_configdir" >&6; }
9821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
9822 $as_echo_n "checking Python include directories... " >&6; }
9823 python_includespec=`${PYTHON} -c "
9824 import distutils.sysconfig
9825 a = '-I' + distutils.sysconfig.get_python_inc(False)
9826 b = '-I' + distutils.sysconfig.get_python_inc(True)
9830 print(a + ' ' + b)"`
9831 if test "$PORTNAME" = win32 ; then
9832 python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
9834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
9835 $as_echo "$python_includespec" >&6; }
9839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
9840 $as_echo_n "checking how to link an embedded Python application... " >&6; }
9842 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
9843 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
9845 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
9846 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
9847 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
9849 ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
9852 # Otherwise, guess the base name of the shlib.
9853 # LDVERSION was added in Python 3.2, before that use VERSION,
9854 # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
9855 python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
9856 if test x"${python_ldversion}" != x""; then
9857 ldlibrary="python${python_ldversion}"
9859 python_version_var=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('VERSION'))))"`
9860 if test x"${python_version_var}" != x""; then
9861 ldlibrary="python${python_version_var}"
9863 ldlibrary="python${python_version}"
9866 # Search for a likely-looking file.
9868 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9870 # We don't know the platform DLSUFFIX here, so check 'em all.
9871 for e in .so .dll .dylib .sl; do
9872 if test -e "$d/lib${ldlibrary}$e"; then
9879 # Some platforms (OpenBSD) require us to accept a bare versioned shlib
9880 # (".so.n.n") as well. However, check this only after failing to find
9881 # ".so" anywhere, because yet other platforms (Debian) put the .so
9882 # symlink in a different directory from the underlying versioned shlib.
9883 if test "$found_shlib" != 1; then
9884 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9886 for f in "$d/lib${ldlibrary}.so."* ; do
9887 if test -e "$f"; then
9895 # As usual, Windows has its own ideas. Possible default library
9896 # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
9897 # and the "lib" prefix might not be there.
9898 if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
9899 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
9901 for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
9902 if test -e "$f"; then
9911 if test "$found_shlib" != 1; then
9912 as_fn_error $? "could not find shared library for Python
9913 You might have to rebuild your Python installation. Refer to the
9914 documentation for details. Use --without-python to disable building
9915 PL/Python." "$LINENO" 5
9917 python_libspec="-L${python_libdir} -l${ldlibrary}"
9919 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
9921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
9922 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
9928 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
9929 if test -z "$ZIC"; then
9932 # Extract the first word of "$ac_prog", so it can be a program name with args.
9933 set dummy $ac_prog; ac_word=$2
9934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9935 $as_echo_n "checking for $ac_word... " >&6; }
9936 if ${ac_cv_path_ZIC+:} false; then :
9937 $as_echo_n "(cached) " >&6
9941 ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
9944 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9948 test -z "$as_dir" && as_dir=.
9949 for ac_exec_ext in '' $ac_executable_extensions; do
9950 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9951 ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
9952 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9963 if test -n "$ZIC"; then
9964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
9965 $as_echo "$ZIC" >&6; }
9967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9968 $as_echo "no" >&6; }
9972 test -n "$ZIC" && break
9976 # Report the value of ZIC in configure's output in all cases.
9977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
9978 $as_echo_n "checking for ZIC... " >&6; }
9979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
9980 $as_echo "$ZIC" >&6; }
9983 if test -z "$ZIC"; then
9985 When cross-compiling, either use the option --with-system-tzdata to use
9986 existing time-zone data, or set the environment variable ZIC to a zic
9987 program to use during the build." "$LINENO" 5
9994 # For each platform, we need to know about any special compile and link
9995 # libraries, and whether the normal C function names are thread-safe.
9996 # See the comment at the top of src/port/thread.c for more information.
9997 # WIN32 doesn't need the pthread tests; it always uses threads
9999 # These tests are run before the library-tests, because linking with the
10000 # other libraries can pull in the pthread functions as a side-effect. We
10001 # want to use the -pthread or similar flags directly, and not rely on
10002 # the side-effects of linking with some other library.
10004 # note: We have to use AS_IF here rather than plain if. The AC_CHECK_HEADER
10005 # invocation below is the first one in the script, and autoconf generates
10006 # additional code for that, which must not be inside the if-block. AS_IF
10007 # knows how to do that.
10008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
10009 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
10010 if ${ac_cv_path_SED+:} false; then :
10011 $as_echo_n "(cached) " >&6
10013 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
10014 for ac_i in 1 2 3 4 5 6 7; do
10015 ac_script="$ac_script$as_nl$ac_script"
10017 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
10018 { ac_script=; unset ac_script;}
10019 if test -z "$SED"; then
10020 ac_path_SED_found=false
10021 # Loop through the user's path and test for each of PROGNAME-LIST
10022 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10023 for as_dir in $PATH
10026 test -z "$as_dir" && as_dir=.
10027 for ac_prog in sed gsed; do
10028 for ac_exec_ext in '' $ac_executable_extensions; do
10029 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
10030 as_fn_executable_p "$ac_path_SED" || continue
10031 # Check for GNU ac_path_SED and select it if it is found.
10032 # Check for GNU $ac_path_SED
10033 case `"$ac_path_SED" --version 2>&1` in
10035 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10038 $as_echo_n 0123456789 >"conftest.in"
10041 cat "conftest.in" "conftest.in" >"conftest.tmp"
10042 mv "conftest.tmp" "conftest.in"
10043 cp "conftest.in" "conftest.nl"
10044 $as_echo '' >> "conftest.nl"
10045 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10046 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10047 as_fn_arith $ac_count + 1 && ac_count=$as_val
10048 if test $ac_count -gt ${ac_path_SED_max-0}; then
10049 # Best one so far, save it but keep looking for a better one
10050 ac_cv_path_SED="$ac_path_SED"
10051 ac_path_SED_max=$ac_count
10053 # 10*(2^10) chars as input seems more than enough
10054 test $ac_count -gt 10 && break
10056 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10059 $ac_path_SED_found && break 3
10064 if test -z "$ac_cv_path_SED"; then
10065 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10068 ac_cv_path_SED=$SED
10072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10073 $as_echo "$ac_cv_path_SED" >&6; }
10074 SED="$ac_cv_path_SED"
10077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10078 $as_echo_n "checking for ANSI C header files... " >&6; }
10079 if ${ac_cv_header_stdc+:} false; then :
10080 $as_echo_n "(cached) " >&6
10082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10083 /* end confdefs.h. */
10084 #include <stdlib.h>
10085 #include <stdarg.h>
10086 #include <string.h>
10097 if ac_fn_c_try_compile "$LINENO"; then :
10098 ac_cv_header_stdc=yes
10100 ac_cv_header_stdc=no
10102 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10104 if test $ac_cv_header_stdc = yes; then
10105 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10107 /* end confdefs.h. */
10108 #include <string.h>
10111 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10112 $EGREP "memchr" >/dev/null 2>&1; then :
10115 ac_cv_header_stdc=no
10121 if test $ac_cv_header_stdc = yes; then
10122 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10124 /* end confdefs.h. */
10125 #include <stdlib.h>
10128 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10129 $EGREP "free" >/dev/null 2>&1; then :
10132 ac_cv_header_stdc=no
10138 if test $ac_cv_header_stdc = yes; then
10139 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10140 if test "$cross_compiling" = yes; then :
10143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10144 /* end confdefs.h. */
10146 #include <stdlib.h>
10147 #if ((' ' & 0x0FF) == 0x020)
10148 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10149 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10151 # define ISLOWER(c) \
10152 (('a' <= (c) && (c) <= 'i') \
10153 || ('j' <= (c) && (c) <= 'r') \
10154 || ('s' <= (c) && (c) <= 'z'))
10155 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10158 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10163 for (i = 0; i < 256; i++)
10164 if (XOR (islower (i), ISLOWER (i))
10165 || toupper (i) != TOUPPER (i))
10170 if ac_fn_c_try_run "$LINENO"; then :
10173 ac_cv_header_stdc=no
10175 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10176 conftest.$ac_objext conftest.beam conftest.$ac_ext
10181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10182 $as_echo "$ac_cv_header_stdc" >&6; }
10183 if test $ac_cv_header_stdc = yes; then
10185 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
10189 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10190 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10191 inttypes.h stdint.h unistd.h
10193 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10194 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
10196 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10197 cat >>confdefs.h <<_ACEOF
10198 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10206 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
10213 ac_cpp='$CPP $CPPFLAGS'
10214 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10215 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10216 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10220 # We used to check for pthread.h first, but this fails if pthread.h
10221 # requires special compiler flags (e.g. on Tru64 or Sequent).
10222 # It gets checked for in the link test anyway.
10224 # First of all, check if the user has set any of the PTHREAD_LIBS,
10225 # etcetera environment variables, and if threads linking works using
10227 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
10228 ax_pthread_save_CC="$CC"
10229 ax_pthread_save_CFLAGS="$CFLAGS"
10230 ax_pthread_save_LIBS="$LIBS"
10231 if test "x$PTHREAD_CC" != "x"; then :
10234 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10235 LIBS="$PTHREAD_LIBS $LIBS"
10236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
10237 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
10238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10239 /* end confdefs.h. */
10241 /* Override any GCC internal prototype to avoid an error.
10242 Use char because int might match the return type of a GCC
10243 builtin and then its argument prototype would still apply. */
10247 char pthread_join ();
10251 return pthread_join ();
10256 if ac_fn_c_try_link "$LINENO"; then :
10259 rm -f core conftest.err conftest.$ac_objext \
10260 conftest$ac_exeext conftest.$ac_ext
10261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10262 $as_echo "$ax_pthread_ok" >&6; }
10263 if test "x$ax_pthread_ok" = "xno"; then
10267 CC="$ax_pthread_save_CC"
10268 CFLAGS="$ax_pthread_save_CFLAGS"
10269 LIBS="$ax_pthread_save_LIBS"
10272 # We must check for the threads library under a number of different
10273 # names; the ordering is very important because some systems
10274 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
10275 # libraries is broken (non-POSIX).
10277 # Create a list of thread flags to try. Items starting with a "-" are
10278 # C compiler flags, and other items are library names, except for "none"
10279 # which indicates that we try without any flags at all, and "pthread-config"
10280 # which is a program returning the flags for the Pth emulation library.
10282 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
10284 # The ordering *is* (sometimes) important. Some notes on the
10285 # individual items follow:
10287 # pthreads: AIX (must check this before -lpthread)
10288 # none: in case threads are in libc; should be tried before -Kthread and
10289 # other compiler flags to prevent continual compiler warnings
10290 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
10291 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
10292 # (Note: HP C rejects this with "bad form for `-t' option")
10293 # -pthreads: Solaris/gcc (Note: HP C also rejects)
10294 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
10295 # doesn't hurt to check since this sometimes defines pthreads and
10296 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
10297 # is present but should not be used directly; and before -mthreads,
10298 # because the compiler interprets this as "-mt" + "-hreads")
10299 # -mthreads: Mingw32/gcc, Lynx/gcc
10300 # pthread: Linux, etcetera
10301 # --thread-safe: KAI C++
10302 # pthread-config: use pthread-config program (for GNU Pth library)
10308 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
10309 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
10311 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
10316 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
10317 # multi-threading and also sets -lpthread."
10319 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
10324 # IBM z/OS requires a feature-test macro to be defined in order to
10325 # enable POSIX threads at all, so give the user a hint if this is
10326 # not set. (We don't define these ourselves, as they can affect
10327 # other portions of the system API in unpredictable ways.)
10329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10330 /* end confdefs.h. */
10332 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
10333 AX_PTHREAD_ZOS_MISSING
10337 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10338 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
10339 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
10340 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
10348 # On Solaris (at least, for some versions), libc contains stubbed
10349 # (non-functional) versions of the pthreads routines, so link-based
10350 # tests will erroneously succeed. (N.B.: The stubs are missing
10351 # pthread_cleanup_push, or rather a function called by this macro,
10352 # so we could check for that, but who knows whether they'll stub
10353 # that too in a future libc.) So we'll check first for the
10354 # standard Solaris way of linking pthreads (-mt -lpthread).
10356 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
10360 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
10362 if test "x$GCC" = "xyes"; then :
10363 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
10366 # The presence of a feature test macro requesting re-entrant function
10367 # definitions is, on some systems, a strong hint that pthreads support is
10368 # correctly enabled
10371 darwin* | hpux* | linux* | osf* | solaris*)
10372 ax_pthread_check_macro="_REENTRANT"
10376 ax_pthread_check_macro="_THREAD_SAFE"
10380 ax_pthread_check_macro="--"
10383 if test "x$ax_pthread_check_macro" = "x--"; then :
10384 ax_pthread_check_cond=0
10386 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
10389 # Are we compiling with Clang?
10391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
10392 $as_echo_n "checking whether $CC is Clang... " >&6; }
10393 if ${ax_cv_PTHREAD_CLANG+:} false; then :
10394 $as_echo_n "(cached) " >&6
10396 ax_cv_PTHREAD_CLANG=no
10397 # Note that Autoconf sets GCC=yes for Clang as well as GCC
10398 if test "x$GCC" = "xyes"; then
10399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10400 /* end confdefs.h. */
10401 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
10402 # if defined(__clang__) && defined(__llvm__)
10403 AX_PTHREAD_CC_IS_CLANG
10407 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10408 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
10409 ax_cv_PTHREAD_CLANG=yes
10416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
10417 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
10418 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
10420 ax_pthread_clang_warning=no
10422 # Clang needs special handling, because older versions handle the -pthread
10423 # option in a rather... idiosyncratic way
10425 if test "x$ax_pthread_clang" = "xyes"; then
10427 # Clang takes -pthread; it has never supported any other flag
10429 # (Note 1: This will need to be revisited if a system that Clang
10430 # supports has POSIX threads in a separate library. This tends not
10431 # to be the way of modern systems, but it's conceivable.)
10433 # (Note 2: On some systems, notably Darwin, -pthread is not needed
10434 # to get POSIX threads support; the API is always present and
10435 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
10436 # -pthread does define _REENTRANT, and while the Darwin headers
10437 # ignore this macro, third-party headers might not.)
10439 PTHREAD_CFLAGS="-pthread"
10444 # However, older versions of Clang make a point of warning the user
10445 # that, in an invocation where only linking and no compilation is
10446 # taking place, the -pthread option has no effect ("argument unused
10447 # during compilation"). They expect -pthread to be passed in only
10448 # when source code is being compiled.
10450 # Problem is, this is at odds with the way Automake and most other
10451 # C build frameworks function, which is that the same flags used in
10452 # compilation (CFLAGS) are also used in linking. Many systems
10453 # supported by AX_PTHREAD require exactly this for POSIX threads
10454 # support, and in fact it is often not straightforward to specify a
10455 # flag that is used only in the compilation phase and not in
10456 # linking. Such a scenario is extremely rare in practice.
10458 # Even though use of the -pthread flag in linking would only print
10459 # a warning, this can be a nuisance for well-run software projects
10460 # that build with -Werror. So if the active version of Clang has
10461 # this misfeature, we search for an option to squash it.
10463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
10464 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
10465 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
10466 $as_echo_n "(cached) " >&6
10468 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
10469 # Create an alternate version of $ac_link that compiles and
10470 # links in two steps (.c -> .o, .o -> exe) instead of one
10471 # (.c -> exe), because the warning occurs only in the second
10473 ax_pthread_save_ac_link="$ac_link"
10474 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
10475 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
10476 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
10477 ax_pthread_save_CFLAGS="$CFLAGS"
10478 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
10479 if test "x$ax_pthread_try" = "xunknown"; then :
10482 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
10483 ac_link="$ax_pthread_save_ac_link"
10484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10485 /* end confdefs.h. */
10486 int main(void){return 0;}
10488 if ac_fn_c_try_link "$LINENO"; then :
10489 ac_link="$ax_pthread_2step_ac_link"
10490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10491 /* end confdefs.h. */
10492 int main(void){return 0;}
10494 if ac_fn_c_try_link "$LINENO"; then :
10497 rm -f core conftest.err conftest.$ac_objext \
10498 conftest$ac_exeext conftest.$ac_ext
10501 rm -f core conftest.err conftest.$ac_objext \
10502 conftest$ac_exeext conftest.$ac_ext
10504 ac_link="$ax_pthread_save_ac_link"
10505 CFLAGS="$ax_pthread_save_CFLAGS"
10506 if test "x$ax_pthread_try" = "x"; then :
10509 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
10512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
10513 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
10515 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
10517 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
10520 fi # $ax_pthread_clang = yes
10522 if test "x$ax_pthread_ok" = "xno"; then
10523 for ax_pthread_try_flag in $ax_pthread_flags; do
10525 case $ax_pthread_try_flag in
10527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
10528 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
10532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
10533 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
10534 PTHREAD_CFLAGS="-mt"
10535 PTHREAD_LIBS="-lpthread"
10539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
10540 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
10541 PTHREAD_CFLAGS="$ax_pthread_try_flag"
10545 # Extract the first word of "pthread-config", so it can be a program name with args.
10546 set dummy pthread-config; ac_word=$2
10547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10548 $as_echo_n "checking for $ac_word... " >&6; }
10549 if ${ac_cv_prog_ax_pthread_config+:} false; then :
10550 $as_echo_n "(cached) " >&6
10552 if test -n "$ax_pthread_config"; then
10553 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
10555 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10556 for as_dir in $PATH
10559 test -z "$as_dir" && as_dir=.
10560 for ac_exec_ext in '' $ac_executable_extensions; do
10561 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10562 ac_cv_prog_ax_pthread_config="yes"
10563 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10570 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
10573 ax_pthread_config=$ac_cv_prog_ax_pthread_config
10574 if test -n "$ax_pthread_config"; then
10575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
10576 $as_echo "$ax_pthread_config" >&6; }
10578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10579 $as_echo "no" >&6; }
10583 if test "x$ax_pthread_config" = "xno"; then :
10586 PTHREAD_CFLAGS="`pthread-config --cflags`"
10587 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
10591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
10592 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
10593 PTHREAD_LIBS="-l$ax_pthread_try_flag"
10597 ax_pthread_save_CFLAGS="$CFLAGS"
10598 ax_pthread_save_LIBS="$LIBS"
10599 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10600 LIBS="$PTHREAD_LIBS $LIBS"
10602 # Check for various functions. We must include pthread.h,
10603 # since some functions may be macros. (On the Sequent, we
10604 # need a special flag -Kthread to make this header compile.)
10605 # We check for pthread_join because it is in -lpthread on IRIX
10606 # while pthread_create is in libc. We check for pthread_attr_init
10607 # due to DEC craziness with -lpthreads. We check for
10608 # pthread_cleanup_push because it is one of the few pthread
10609 # functions on Solaris that doesn't have a non-functional libc stub.
10610 # We try pthread_create on general principles.
10612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10613 /* end confdefs.h. */
10614 #include <pthread.h>
10615 # if $ax_pthread_check_cond
10616 # error "$ax_pthread_check_macro must be defined"
10618 static void routine(void *a) { a = 0; }
10619 static void *start_routine(void *a) { return a; }
10623 pthread_t th; pthread_attr_t attr;
10624 pthread_create(&th, 0, start_routine, 0);
10625 pthread_join(th, 0);
10626 pthread_attr_init(&attr);
10627 pthread_cleanup_push(routine, 0);
10628 pthread_cleanup_pop(0) /* ; */
10633 if ac_fn_c_try_link "$LINENO"; then :
10636 rm -f core conftest.err conftest.$ac_objext \
10637 conftest$ac_exeext conftest.$ac_ext
10639 CFLAGS="$ax_pthread_save_CFLAGS"
10640 LIBS="$ax_pthread_save_LIBS"
10642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10643 $as_echo "$ax_pthread_ok" >&6; }
10644 if test "x$ax_pthread_ok" = "xyes"; then :
10653 # Various other checks:
10654 if test "x$ax_pthread_ok" = "xyes"; then
10655 ax_pthread_save_CFLAGS="$CFLAGS"
10656 ax_pthread_save_LIBS="$LIBS"
10657 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10658 LIBS="$PTHREAD_LIBS $LIBS"
10660 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
10661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
10662 $as_echo_n "checking for joinable pthread attribute... " >&6; }
10663 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
10664 $as_echo_n "(cached) " >&6
10666 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
10667 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
10668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10669 /* end confdefs.h. */
10670 #include <pthread.h>
10674 int attr = $ax_pthread_attr; return attr /* ; */
10679 if ac_fn_c_try_link "$LINENO"; then :
10680 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
10682 rm -f core conftest.err conftest.$ac_objext \
10683 conftest$ac_exeext conftest.$ac_ext
10687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
10688 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
10689 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
10690 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
10691 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
10693 cat >>confdefs.h <<_ACEOF
10694 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
10697 ax_pthread_joinable_attr_defined=yes
10701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
10702 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
10703 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
10704 $as_echo_n "(cached) " >&6
10706 ax_cv_PTHREAD_SPECIAL_FLAGS=no
10709 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
10714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
10715 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
10716 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
10717 test "x$ax_pthread_special_flags_added" != "xyes"; then :
10718 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
10719 ax_pthread_special_flags_added=yes
10722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
10723 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
10724 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
10725 $as_echo_n "(cached) " >&6
10727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10728 /* end confdefs.h. */
10729 #include <pthread.h>
10733 int i = PTHREAD_PRIO_INHERIT;
10738 if ac_fn_c_try_link "$LINENO"; then :
10739 ax_cv_PTHREAD_PRIO_INHERIT=yes
10741 ax_cv_PTHREAD_PRIO_INHERIT=no
10743 rm -f core conftest.err conftest.$ac_objext \
10744 conftest$ac_exeext conftest.$ac_ext
10747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
10748 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
10749 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
10750 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
10752 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
10754 ax_pthread_prio_inherit_defined=yes
10758 CFLAGS="$ax_pthread_save_CFLAGS"
10759 LIBS="$ax_pthread_save_LIBS"
10761 # More AIX lossage: compile with *_r variant
10762 if test "x$GCC" != "xyes"; then
10766 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
10767 #handle absolute path differently from PATH based program lookup
10770 if as_fn_executable_p ${CC}_r; then :
10771 PTHREAD_CC="${CC}_r"
10774 for ac_prog in ${CC}_r
10776 # Extract the first word of "$ac_prog", so it can be a program name with args.
10777 set dummy $ac_prog; ac_word=$2
10778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10779 $as_echo_n "checking for $ac_word... " >&6; }
10780 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
10781 $as_echo_n "(cached) " >&6
10783 if test -n "$PTHREAD_CC"; then
10784 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
10786 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10787 for as_dir in $PATH
10790 test -z "$as_dir" && as_dir=.
10791 for ac_exec_ext in '' $ac_executable_extensions; do
10792 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10793 ac_cv_prog_PTHREAD_CC="$ac_prog"
10794 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10803 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
10804 if test -n "$PTHREAD_CC"; then
10805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
10806 $as_echo "$PTHREAD_CC" >&6; }
10808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10809 $as_echo "no" >&6; }
10813 test -n "$PTHREAD_CC" && break
10815 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10826 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10832 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
10833 if test "x$ax_pthread_ok" = "xyes"; then
10835 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10843 ac_cpp='$CPP $CPPFLAGS'
10844 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10845 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10846 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10850 # Some platforms use these, so just define them. They can't hurt if they
10851 # are not supported. For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
10852 # enables 5-arg getpwuid_r, among other things.
10853 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
10855 # Check for *_r functions
10858 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10859 LIBS="$LIBS $PTHREAD_LIBS"
10861 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
10862 if test "x$ac_cv_header_pthread_h" = xyes; then :
10866 pthread.h not found; use --disable-thread-safety to disable thread safety" "$LINENO" 5
10871 for ac_func in strerror_r getpwuid_r gethostbyname_r
10873 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10874 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10875 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10876 cat >>confdefs.h <<_ACEOF
10877 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10884 # Do test here with the proper thread flags
10885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
10886 $as_echo_n "checking whether strerror_r returns int... " >&6; }
10887 if ${pgac_cv_func_strerror_r_int+:} false; then :
10888 $as_echo_n "(cached) " >&6
10890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10891 /* end confdefs.h. */
10892 #include <string.h>
10897 switch (strerror_r(1, buf, sizeof(buf)))
10898 { case 0: break; default: break; }
10904 if ac_fn_c_try_compile "$LINENO"; then :
10905 pgac_cv_func_strerror_r_int=yes
10907 pgac_cv_func_strerror_r_int=no
10909 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
10912 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
10913 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
10915 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
10926 # do not use values from template file
10939 ## Most libraries are included only if they demonstrably provide a function
10940 ## we need, but libm is an exception: always include it, because there are
10941 ## too many compilers that play cute optimization games that will break
10942 ## probes for standard functions such as pow().
10945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
10946 $as_echo_n "checking for main in -lm... " >&6; }
10947 if ${ac_cv_lib_m_main+:} false; then :
10948 $as_echo_n "(cached) " >&6
10950 ac_check_lib_save_LIBS=$LIBS
10952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10953 /* end confdefs.h. */
10964 if ac_fn_c_try_link "$LINENO"; then :
10965 ac_cv_lib_m_main=yes
10967 ac_cv_lib_m_main=no
10969 rm -f core conftest.err conftest.$ac_objext \
10970 conftest$ac_exeext conftest.$ac_ext
10971 LIBS=$ac_check_lib_save_LIBS
10973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
10974 $as_echo "$ac_cv_lib_m_main" >&6; }
10975 if test "x$ac_cv_lib_m_main" = xyes; then :
10976 cat >>confdefs.h <<_ACEOF
10977 #define HAVE_LIBM 1
10984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
10985 $as_echo_n "checking for library containing setproctitle... " >&6; }
10986 if ${ac_cv_search_setproctitle+:} false; then :
10987 $as_echo_n "(cached) " >&6
10989 ac_func_search_save_LIBS=$LIBS
10990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10991 /* end confdefs.h. */
10993 /* Override any GCC internal prototype to avoid an error.
10994 Use char because int might match the return type of a GCC
10995 builtin and then its argument prototype would still apply. */
10999 char setproctitle ();
11003 return setproctitle ();
11008 for ac_lib in '' util; do
11009 if test -z "$ac_lib"; then
11010 ac_res="none required"
11013 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11015 if ac_fn_c_try_link "$LINENO"; then :
11016 ac_cv_search_setproctitle=$ac_res
11018 rm -f core conftest.err conftest.$ac_objext \
11020 if ${ac_cv_search_setproctitle+:} false; then :
11024 if ${ac_cv_search_setproctitle+:} false; then :
11027 ac_cv_search_setproctitle=no
11029 rm conftest.$ac_ext
11030 LIBS=$ac_func_search_save_LIBS
11032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
11033 $as_echo "$ac_cv_search_setproctitle" >&6; }
11034 ac_res=$ac_cv_search_setproctitle
11035 if test "$ac_res" != no; then :
11036 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
11041 $as_echo_n "checking for library containing dlopen... " >&6; }
11042 if ${ac_cv_search_dlopen+:} false; then :
11043 $as_echo_n "(cached) " >&6
11045 ac_func_search_save_LIBS=$LIBS
11046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11047 /* end confdefs.h. */
11049 /* Override any GCC internal prototype to avoid an error.
11050 Use char because int might match the return type of a GCC
11051 builtin and then its argument prototype would still apply. */
11064 for ac_lib in '' dl; do
11065 if test -z "$ac_lib"; then
11066 ac_res="none required"
11069 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11071 if ac_fn_c_try_link "$LINENO"; then :
11072 ac_cv_search_dlopen=$ac_res
11074 rm -f core conftest.err conftest.$ac_objext \
11076 if ${ac_cv_search_dlopen+:} false; then :
11080 if ${ac_cv_search_dlopen+:} false; then :
11083 ac_cv_search_dlopen=no
11085 rm conftest.$ac_ext
11086 LIBS=$ac_func_search_save_LIBS
11088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
11089 $as_echo "$ac_cv_search_dlopen" >&6; }
11090 ac_res=$ac_cv_search_dlopen
11091 if test "$ac_res" != no; then :
11092 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11097 $as_echo_n "checking for library containing socket... " >&6; }
11098 if ${ac_cv_search_socket+:} false; then :
11099 $as_echo_n "(cached) " >&6
11101 ac_func_search_save_LIBS=$LIBS
11102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11103 /* end confdefs.h. */
11105 /* Override any GCC internal prototype to avoid an error.
11106 Use char because int might match the return type of a GCC
11107 builtin and then its argument prototype would still apply. */
11120 for ac_lib in '' socket ws2_32; do
11121 if test -z "$ac_lib"; then
11122 ac_res="none required"
11125 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11127 if ac_fn_c_try_link "$LINENO"; then :
11128 ac_cv_search_socket=$ac_res
11130 rm -f core conftest.err conftest.$ac_objext \
11132 if ${ac_cv_search_socket+:} false; then :
11136 if ${ac_cv_search_socket+:} false; then :
11139 ac_cv_search_socket=no
11141 rm conftest.$ac_ext
11142 LIBS=$ac_func_search_save_LIBS
11144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11145 $as_echo "$ac_cv_search_socket" >&6; }
11146 ac_res=$ac_cv_search_socket
11147 if test "$ac_res" != no; then :
11148 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
11153 $as_echo_n "checking for library containing shl_load... " >&6; }
11154 if ${ac_cv_search_shl_load+:} false; then :
11155 $as_echo_n "(cached) " >&6
11157 ac_func_search_save_LIBS=$LIBS
11158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11159 /* end confdefs.h. */
11161 /* Override any GCC internal prototype to avoid an error.
11162 Use char because int might match the return type of a GCC
11163 builtin and then its argument prototype would still apply. */
11171 return shl_load ();
11176 for ac_lib in '' dld; do
11177 if test -z "$ac_lib"; then
11178 ac_res="none required"
11181 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11183 if ac_fn_c_try_link "$LINENO"; then :
11184 ac_cv_search_shl_load=$ac_res
11186 rm -f core conftest.err conftest.$ac_objext \
11188 if ${ac_cv_search_shl_load+:} false; then :
11192 if ${ac_cv_search_shl_load+:} false; then :
11195 ac_cv_search_shl_load=no
11197 rm conftest.$ac_ext
11198 LIBS=$ac_func_search_save_LIBS
11200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
11201 $as_echo "$ac_cv_search_shl_load" >&6; }
11202 ac_res=$ac_cv_search_shl_load
11203 if test "$ac_res" != no; then :
11204 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
11209 $as_echo_n "checking for library containing getopt_long... " >&6; }
11210 if ${ac_cv_search_getopt_long+:} false; then :
11211 $as_echo_n "(cached) " >&6
11213 ac_func_search_save_LIBS=$LIBS
11214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11215 /* end confdefs.h. */
11217 /* Override any GCC internal prototype to avoid an error.
11218 Use char because int might match the return type of a GCC
11219 builtin and then its argument prototype would still apply. */
11223 char getopt_long ();
11227 return getopt_long ();
11232 for ac_lib in '' getopt gnugetopt; do
11233 if test -z "$ac_lib"; then
11234 ac_res="none required"
11237 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11239 if ac_fn_c_try_link "$LINENO"; then :
11240 ac_cv_search_getopt_long=$ac_res
11242 rm -f core conftest.err conftest.$ac_objext \
11244 if ${ac_cv_search_getopt_long+:} false; then :
11248 if ${ac_cv_search_getopt_long+:} false; then :
11251 ac_cv_search_getopt_long=no
11253 rm conftest.$ac_ext
11254 LIBS=$ac_func_search_save_LIBS
11256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
11257 $as_echo "$ac_cv_search_getopt_long" >&6; }
11258 ac_res=$ac_cv_search_getopt_long
11259 if test "$ac_res" != no; then :
11260 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
11265 $as_echo_n "checking for library containing crypt... " >&6; }
11266 if ${ac_cv_search_crypt+:} false; then :
11267 $as_echo_n "(cached) " >&6
11269 ac_func_search_save_LIBS=$LIBS
11270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11271 /* end confdefs.h. */
11273 /* Override any GCC internal prototype to avoid an error.
11274 Use char because int might match the return type of a GCC
11275 builtin and then its argument prototype would still apply. */
11288 for ac_lib in '' crypt; do
11289 if test -z "$ac_lib"; then
11290 ac_res="none required"
11293 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11295 if ac_fn_c_try_link "$LINENO"; then :
11296 ac_cv_search_crypt=$ac_res
11298 rm -f core conftest.err conftest.$ac_objext \
11300 if ${ac_cv_search_crypt+:} false; then :
11304 if ${ac_cv_search_crypt+:} false; then :
11307 ac_cv_search_crypt=no
11309 rm conftest.$ac_ext
11310 LIBS=$ac_func_search_save_LIBS
11312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
11313 $as_echo "$ac_cv_search_crypt" >&6; }
11314 ac_res=$ac_cv_search_crypt
11315 if test "$ac_res" != no; then :
11316 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
11321 $as_echo_n "checking for library containing shm_open... " >&6; }
11322 if ${ac_cv_search_shm_open+:} false; then :
11323 $as_echo_n "(cached) " >&6
11325 ac_func_search_save_LIBS=$LIBS
11326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11327 /* end confdefs.h. */
11329 /* Override any GCC internal prototype to avoid an error.
11330 Use char because int might match the return type of a GCC
11331 builtin and then its argument prototype would still apply. */
11339 return shm_open ();
11344 for ac_lib in '' rt; do
11345 if test -z "$ac_lib"; then
11346 ac_res="none required"
11349 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11351 if ac_fn_c_try_link "$LINENO"; then :
11352 ac_cv_search_shm_open=$ac_res
11354 rm -f core conftest.err conftest.$ac_objext \
11356 if ${ac_cv_search_shm_open+:} false; then :
11360 if ${ac_cv_search_shm_open+:} false; then :
11363 ac_cv_search_shm_open=no
11365 rm conftest.$ac_ext
11366 LIBS=$ac_func_search_save_LIBS
11368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
11369 $as_echo "$ac_cv_search_shm_open" >&6; }
11370 ac_res=$ac_cv_search_shm_open
11371 if test "$ac_res" != no; then :
11372 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
11377 $as_echo_n "checking for library containing shm_unlink... " >&6; }
11378 if ${ac_cv_search_shm_unlink+:} false; then :
11379 $as_echo_n "(cached) " >&6
11381 ac_func_search_save_LIBS=$LIBS
11382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11383 /* end confdefs.h. */
11385 /* Override any GCC internal prototype to avoid an error.
11386 Use char because int might match the return type of a GCC
11387 builtin and then its argument prototype would still apply. */
11391 char shm_unlink ();
11395 return shm_unlink ();
11400 for ac_lib in '' rt; do
11401 if test -z "$ac_lib"; then
11402 ac_res="none required"
11405 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11407 if ac_fn_c_try_link "$LINENO"; then :
11408 ac_cv_search_shm_unlink=$ac_res
11410 rm -f core conftest.err conftest.$ac_objext \
11412 if ${ac_cv_search_shm_unlink+:} false; then :
11416 if ${ac_cv_search_shm_unlink+:} false; then :
11419 ac_cv_search_shm_unlink=no
11421 rm conftest.$ac_ext
11422 LIBS=$ac_func_search_save_LIBS
11424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
11425 $as_echo "$ac_cv_search_shm_unlink" >&6; }
11426 ac_res=$ac_cv_search_shm_unlink
11427 if test "$ac_res" != no; then :
11428 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11433 $as_echo_n "checking for library containing clock_gettime... " >&6; }
11434 if ${ac_cv_search_clock_gettime+:} false; then :
11435 $as_echo_n "(cached) " >&6
11437 ac_func_search_save_LIBS=$LIBS
11438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11439 /* end confdefs.h. */
11441 /* Override any GCC internal prototype to avoid an error.
11442 Use char because int might match the return type of a GCC
11443 builtin and then its argument prototype would still apply. */
11447 char clock_gettime ();
11451 return clock_gettime ();
11456 for ac_lib in '' rt posix4; do
11457 if test -z "$ac_lib"; then
11458 ac_res="none required"
11461 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11463 if ac_fn_c_try_link "$LINENO"; then :
11464 ac_cv_search_clock_gettime=$ac_res
11466 rm -f core conftest.err conftest.$ac_objext \
11468 if ${ac_cv_search_clock_gettime+:} false; then :
11472 if ${ac_cv_search_clock_gettime+:} false; then :
11475 ac_cv_search_clock_gettime=no
11477 rm conftest.$ac_ext
11478 LIBS=$ac_func_search_save_LIBS
11480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11481 $as_echo "$ac_cv_search_clock_gettime" >&6; }
11482 ac_res=$ac_cv_search_clock_gettime
11483 if test "$ac_res" != no; then :
11484 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
11490 $as_echo_n "checking for library containing fdatasync... " >&6; }
11491 if ${ac_cv_search_fdatasync+:} false; then :
11492 $as_echo_n "(cached) " >&6
11494 ac_func_search_save_LIBS=$LIBS
11495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11496 /* end confdefs.h. */
11498 /* Override any GCC internal prototype to avoid an error.
11499 Use char because int might match the return type of a GCC
11500 builtin and then its argument prototype would still apply. */
11508 return fdatasync ();
11513 for ac_lib in '' rt posix4; do
11514 if test -z "$ac_lib"; then
11515 ac_res="none required"
11518 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11520 if ac_fn_c_try_link "$LINENO"; then :
11521 ac_cv_search_fdatasync=$ac_res
11523 rm -f core conftest.err conftest.$ac_objext \
11525 if ${ac_cv_search_fdatasync+:} false; then :
11529 if ${ac_cv_search_fdatasync+:} false; then :
11532 ac_cv_search_fdatasync=no
11534 rm conftest.$ac_ext
11535 LIBS=$ac_func_search_save_LIBS
11537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
11538 $as_echo "$ac_cv_search_fdatasync" >&6; }
11539 ac_res=$ac_cv_search_fdatasync
11540 if test "$ac_res" != no; then :
11541 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11545 # Required for thread_test.c on Solaris
11546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
11547 $as_echo_n "checking for library containing sched_yield... " >&6; }
11548 if ${ac_cv_search_sched_yield+:} false; then :
11549 $as_echo_n "(cached) " >&6
11551 ac_func_search_save_LIBS=$LIBS
11552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11553 /* end confdefs.h. */
11555 /* Override any GCC internal prototype to avoid an error.
11556 Use char because int might match the return type of a GCC
11557 builtin and then its argument prototype would still apply. */
11561 char sched_yield ();
11565 return sched_yield ();
11570 for ac_lib in '' rt; do
11571 if test -z "$ac_lib"; then
11572 ac_res="none required"
11575 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11577 if ac_fn_c_try_link "$LINENO"; then :
11578 ac_cv_search_sched_yield=$ac_res
11580 rm -f core conftest.err conftest.$ac_objext \
11582 if ${ac_cv_search_sched_yield+:} false; then :
11586 if ${ac_cv_search_sched_yield+:} false; then :
11589 ac_cv_search_sched_yield=no
11591 rm conftest.$ac_ext
11592 LIBS=$ac_func_search_save_LIBS
11594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
11595 $as_echo "$ac_cv_search_sched_yield" >&6; }
11596 ac_res=$ac_cv_search_sched_yield
11597 if test "$ac_res" != no; then :
11598 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11602 # Required for thread_test.c on Solaris 2.5:
11603 # Other ports use it too (HP-UX) so test unconditionally
11604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
11605 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
11606 if ${ac_cv_search_gethostbyname_r+:} false; then :
11607 $as_echo_n "(cached) " >&6
11609 ac_func_search_save_LIBS=$LIBS
11610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11611 /* end confdefs.h. */
11613 /* Override any GCC internal prototype to avoid an error.
11614 Use char because int might match the return type of a GCC
11615 builtin and then its argument prototype would still apply. */
11619 char gethostbyname_r ();
11623 return gethostbyname_r ();
11628 for ac_lib in '' nsl; do
11629 if test -z "$ac_lib"; then
11630 ac_res="none required"
11633 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11635 if ac_fn_c_try_link "$LINENO"; then :
11636 ac_cv_search_gethostbyname_r=$ac_res
11638 rm -f core conftest.err conftest.$ac_objext \
11640 if ${ac_cv_search_gethostbyname_r+:} false; then :
11644 if ${ac_cv_search_gethostbyname_r+:} false; then :
11647 ac_cv_search_gethostbyname_r=no
11649 rm conftest.$ac_ext
11650 LIBS=$ac_func_search_save_LIBS
11652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
11653 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
11654 ac_res=$ac_cv_search_gethostbyname_r
11655 if test "$ac_res" != no; then :
11656 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
11662 $as_echo_n "checking for library containing shmget... " >&6; }
11663 if ${ac_cv_search_shmget+:} false; then :
11664 $as_echo_n "(cached) " >&6
11666 ac_func_search_save_LIBS=$LIBS
11667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11668 /* end confdefs.h. */
11670 /* Override any GCC internal prototype to avoid an error.
11671 Use char because int might match the return type of a GCC
11672 builtin and then its argument prototype would still apply. */
11685 for ac_lib in '' cygipc; do
11686 if test -z "$ac_lib"; then
11687 ac_res="none required"
11690 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11692 if ac_fn_c_try_link "$LINENO"; then :
11693 ac_cv_search_shmget=$ac_res
11695 rm -f core conftest.err conftest.$ac_objext \
11697 if ${ac_cv_search_shmget+:} false; then :
11701 if ${ac_cv_search_shmget+:} false; then :
11704 ac_cv_search_shmget=no
11706 rm conftest.$ac_ext
11707 LIBS=$ac_func_search_save_LIBS
11709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
11710 $as_echo "$ac_cv_search_shmget" >&6; }
11711 ac_res=$ac_cv_search_shmget
11712 if test "$ac_res" != no; then :
11713 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11718 if test "$with_readline" = yes; then
11721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
11722 $as_echo_n "checking for library containing readline... " >&6; }
11723 if ${pgac_cv_check_readline+:} false; then :
11724 $as_echo_n "(cached) " >&6
11726 pgac_cv_check_readline=no
11727 pgac_save_LIBS=$LIBS
11728 if test x"$with_libedit_preferred" != x"yes"
11729 then READLINE_ORDER="-lreadline -ledit"
11730 else READLINE_ORDER="-ledit -lreadline"
11732 for pgac_rllib in $READLINE_ORDER ; do
11733 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
11734 LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
11735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11736 /* end confdefs.h. */
11738 /* Override any GCC internal prototype to avoid an error.
11739 Use char because int might match the return type of a GCC
11740 builtin and then its argument prototype would still apply. */
11748 return readline ();
11753 if ac_fn_c_try_link "$LINENO"; then :
11755 # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
11756 # recognize dependent libraries; assume curses is needed if we didn't
11757 # find any dependency.
11759 netbsd* | openbsd* | irix*)
11760 if test x"$pgac_lib" = x"" ; then
11761 pgac_lib=" -lcurses"
11765 pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
11769 rm -f core conftest.err conftest.$ac_objext \
11770 conftest$ac_exeext conftest.$ac_ext
11772 if test "$pgac_cv_check_readline" != no ; then
11776 LIBS=$pgac_save_LIBS
11779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
11780 $as_echo "$pgac_cv_check_readline" >&6; }
11781 if test "$pgac_cv_check_readline" != no ; then
11782 LIBS="$pgac_cv_check_readline $LIBS"
11784 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
11789 if test x"$pgac_cv_check_readline" = x"no"; then
11790 as_fn_error $? "readline library not found
11791 If you have readline already installed, see config.log for details on the
11792 failure. It is possible the compiler isn't looking in the proper directory.
11793 Use --without-readline to disable readline support." "$LINENO" 5
11797 if test "$with_zlib" = yes; then
11798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
11799 $as_echo_n "checking for inflate in -lz... " >&6; }
11800 if ${ac_cv_lib_z_inflate+:} false; then :
11801 $as_echo_n "(cached) " >&6
11803 ac_check_lib_save_LIBS=$LIBS
11805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11806 /* end confdefs.h. */
11808 /* Override any GCC internal prototype to avoid an error.
11809 Use char because int might match the return type of a GCC
11810 builtin and then its argument prototype would still apply. */
11823 if ac_fn_c_try_link "$LINENO"; then :
11824 ac_cv_lib_z_inflate=yes
11826 ac_cv_lib_z_inflate=no
11828 rm -f core conftest.err conftest.$ac_objext \
11829 conftest$ac_exeext conftest.$ac_ext
11830 LIBS=$ac_check_lib_save_LIBS
11832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
11833 $as_echo "$ac_cv_lib_z_inflate" >&6; }
11834 if test "x$ac_cv_lib_z_inflate" = xyes; then :
11835 cat >>confdefs.h <<_ACEOF
11836 #define HAVE_LIBZ 1
11842 as_fn_error $? "zlib library not found
11843 If you have zlib already installed, see config.log for details on the
11844 failure. It is possible the compiler isn't looking in the proper directory.
11845 Use --without-zlib to disable zlib support." "$LINENO" 5
11850 if test "$enable_spinlocks" = yes; then
11852 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
11855 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11856 *** Not using spinlocks will cause poor performance." >&5
11857 $as_echo "$as_me: WARNING:
11858 *** Not using spinlocks will cause poor performance." >&2;}
11861 if test "$enable_atomics" = yes; then
11863 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
11866 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11867 *** Not using atomic operations will cause poor performance." >&5
11868 $as_echo "$as_me: WARNING:
11869 *** Not using atomic operations will cause poor performance." >&2;}
11872 if test "$with_gssapi" = yes ; then
11873 if test "$PORTNAME" != "win32"; then
11874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
11875 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
11876 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11877 $as_echo_n "(cached) " >&6
11879 ac_func_search_save_LIBS=$LIBS
11880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11881 /* end confdefs.h. */
11883 /* Override any GCC internal prototype to avoid an error.
11884 Use char because int might match the return type of a GCC
11885 builtin and then its argument prototype would still apply. */
11889 char gss_init_sec_context ();
11893 return gss_init_sec_context ();
11898 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
11899 if test -z "$ac_lib"; then
11900 ac_res="none required"
11903 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11905 if ac_fn_c_try_link "$LINENO"; then :
11906 ac_cv_search_gss_init_sec_context=$ac_res
11908 rm -f core conftest.err conftest.$ac_objext \
11910 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11914 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11917 ac_cv_search_gss_init_sec_context=no
11919 rm conftest.$ac_ext
11920 LIBS=$ac_func_search_save_LIBS
11922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
11923 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
11924 ac_res=$ac_cv_search_gss_init_sec_context
11925 if test "$ac_res" != no; then :
11926 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11929 as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
11933 LIBS="$LIBS -lgssapi32"
11937 if test "$with_openssl" = yes ; then
11938 if test "$PORTNAME" != "win32"; then
11939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
11940 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
11941 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
11942 $as_echo_n "(cached) " >&6
11944 ac_check_lib_save_LIBS=$LIBS
11945 LIBS="-lcrypto $LIBS"
11946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11947 /* end confdefs.h. */
11949 /* Override any GCC internal prototype to avoid an error.
11950 Use char because int might match the return type of a GCC
11951 builtin and then its argument prototype would still apply. */
11955 char CRYPTO_new_ex_data ();
11959 return CRYPTO_new_ex_data ();
11964 if ac_fn_c_try_link "$LINENO"; then :
11965 ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
11967 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
11969 rm -f core conftest.err conftest.$ac_objext \
11970 conftest$ac_exeext conftest.$ac_ext
11971 LIBS=$ac_check_lib_save_LIBS
11973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
11974 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
11975 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
11976 cat >>confdefs.h <<_ACEOF
11977 #define HAVE_LIBCRYPTO 1
11980 LIBS="-lcrypto $LIBS"
11983 as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
11986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
11987 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
11988 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
11989 $as_echo_n "(cached) " >&6
11991 ac_check_lib_save_LIBS=$LIBS
11993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11994 /* end confdefs.h. */
11996 /* Override any GCC internal prototype to avoid an error.
11997 Use char because int might match the return type of a GCC
11998 builtin and then its argument prototype would still apply. */
12011 if ac_fn_c_try_link "$LINENO"; then :
12012 ac_cv_lib_ssl_SSL_new=yes
12014 ac_cv_lib_ssl_SSL_new=no
12016 rm -f core conftest.err conftest.$ac_objext \
12017 conftest$ac_exeext conftest.$ac_ext
12018 LIBS=$ac_check_lib_save_LIBS
12020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
12021 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
12022 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
12023 cat >>confdefs.h <<_ACEOF
12024 #define HAVE_LIBSSL 1
12030 as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
12034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
12035 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
12036 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12037 $as_echo_n "(cached) " >&6
12039 ac_func_search_save_LIBS=$LIBS
12040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12041 /* end confdefs.h. */
12043 /* Override any GCC internal prototype to avoid an error.
12044 Use char because int might match the return type of a GCC
12045 builtin and then its argument prototype would still apply. */
12049 char CRYPTO_new_ex_data ();
12053 return CRYPTO_new_ex_data ();
12058 for ac_lib in '' eay32 crypto; do
12059 if test -z "$ac_lib"; then
12060 ac_res="none required"
12063 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12065 if ac_fn_c_try_link "$LINENO"; then :
12066 ac_cv_search_CRYPTO_new_ex_data=$ac_res
12068 rm -f core conftest.err conftest.$ac_objext \
12070 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12074 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12077 ac_cv_search_CRYPTO_new_ex_data=no
12079 rm conftest.$ac_ext
12080 LIBS=$ac_func_search_save_LIBS
12082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
12083 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
12084 ac_res=$ac_cv_search_CRYPTO_new_ex_data
12085 if test "$ac_res" != no; then :
12086 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12089 as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
12092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
12093 $as_echo_n "checking for library containing SSL_new... " >&6; }
12094 if ${ac_cv_search_SSL_new+:} false; then :
12095 $as_echo_n "(cached) " >&6
12097 ac_func_search_save_LIBS=$LIBS
12098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12099 /* end confdefs.h. */
12101 /* Override any GCC internal prototype to avoid an error.
12102 Use char because int might match the return type of a GCC
12103 builtin and then its argument prototype would still apply. */
12116 for ac_lib in '' ssleay32 ssl; do
12117 if test -z "$ac_lib"; then
12118 ac_res="none required"
12121 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12123 if ac_fn_c_try_link "$LINENO"; then :
12124 ac_cv_search_SSL_new=$ac_res
12126 rm -f core conftest.err conftest.$ac_objext \
12128 if ${ac_cv_search_SSL_new+:} false; then :
12132 if ${ac_cv_search_SSL_new+:} false; then :
12135 ac_cv_search_SSL_new=no
12137 rm conftest.$ac_ext
12138 LIBS=$ac_func_search_save_LIBS
12140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12141 $as_echo "$ac_cv_search_SSL_new" >&6; }
12142 ac_res=$ac_cv_search_SSL_new
12143 if test "$ac_res" != no; then :
12144 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12147 as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12151 for ac_func in SSL_clear_options SSL_get_current_compression X509_get_signature_nid
12153 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12154 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12155 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12156 cat >>confdefs.h <<_ACEOF
12157 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12163 # Functions introduced in OpenSSL 1.1.0. We used to check for
12164 # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
12165 # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
12166 # doesn't have these OpenSSL 1.1.0 functions. So check for individual
12168 for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL
12170 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12171 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12172 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12173 cat >>confdefs.h <<_ACEOF
12174 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12180 # OpenSSL versions before 1.1.0 required setting callback functions, for
12181 # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
12182 # function was removed.
12183 for ac_func in CRYPTO_lock
12185 ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
12186 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
12187 cat >>confdefs.h <<_ACEOF
12188 #define HAVE_CRYPTO_LOCK 1
12196 if test "$with_pam" = yes ; then
12197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
12198 $as_echo_n "checking for pam_start in -lpam... " >&6; }
12199 if ${ac_cv_lib_pam_pam_start+:} false; then :
12200 $as_echo_n "(cached) " >&6
12202 ac_check_lib_save_LIBS=$LIBS
12204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12205 /* end confdefs.h. */
12207 /* Override any GCC internal prototype to avoid an error.
12208 Use char because int might match the return type of a GCC
12209 builtin and then its argument prototype would still apply. */
12217 return pam_start ();
12222 if ac_fn_c_try_link "$LINENO"; then :
12223 ac_cv_lib_pam_pam_start=yes
12225 ac_cv_lib_pam_pam_start=no
12227 rm -f core conftest.err conftest.$ac_objext \
12228 conftest$ac_exeext conftest.$ac_ext
12229 LIBS=$ac_check_lib_save_LIBS
12231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
12232 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
12233 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
12234 cat >>confdefs.h <<_ACEOF
12235 #define HAVE_LIBPAM 1
12241 as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
12246 if test "$with_libxml" = yes ; then
12247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
12248 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
12249 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
12250 $as_echo_n "(cached) " >&6
12252 ac_check_lib_save_LIBS=$LIBS
12253 LIBS="-lxml2 $LIBS"
12254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12255 /* end confdefs.h. */
12257 /* Override any GCC internal prototype to avoid an error.
12258 Use char because int might match the return type of a GCC
12259 builtin and then its argument prototype would still apply. */
12263 char xmlSaveToBuffer ();
12267 return xmlSaveToBuffer ();
12272 if ac_fn_c_try_link "$LINENO"; then :
12273 ac_cv_lib_xml2_xmlSaveToBuffer=yes
12275 ac_cv_lib_xml2_xmlSaveToBuffer=no
12277 rm -f core conftest.err conftest.$ac_objext \
12278 conftest$ac_exeext conftest.$ac_ext
12279 LIBS=$ac_check_lib_save_LIBS
12281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
12282 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
12283 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
12284 cat >>confdefs.h <<_ACEOF
12285 #define HAVE_LIBXML2 1
12288 LIBS="-lxml2 $LIBS"
12291 as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
12296 if test "$with_libxslt" = yes ; then
12297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
12298 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
12299 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
12300 $as_echo_n "(cached) " >&6
12302 ac_check_lib_save_LIBS=$LIBS
12303 LIBS="-lxslt $LIBS"
12304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12305 /* end confdefs.h. */
12307 /* Override any GCC internal prototype to avoid an error.
12308 Use char because int might match the return type of a GCC
12309 builtin and then its argument prototype would still apply. */
12313 char xsltCleanupGlobals ();
12317 return xsltCleanupGlobals ();
12322 if ac_fn_c_try_link "$LINENO"; then :
12323 ac_cv_lib_xslt_xsltCleanupGlobals=yes
12325 ac_cv_lib_xslt_xsltCleanupGlobals=no
12327 rm -f core conftest.err conftest.$ac_objext \
12328 conftest$ac_exeext conftest.$ac_ext
12329 LIBS=$ac_check_lib_save_LIBS
12331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
12332 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
12333 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
12334 cat >>confdefs.h <<_ACEOF
12335 #define HAVE_LIBXSLT 1
12338 LIBS="-lxslt $LIBS"
12341 as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
12346 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
12347 if test "$with_ldap" = yes ; then
12349 if test "$PORTNAME" != "win32"; then
12350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12351 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12352 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12353 $as_echo_n "(cached) " >&6
12355 ac_check_lib_save_LIBS=$LIBS
12356 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12358 /* end confdefs.h. */
12360 /* Override any GCC internal prototype to avoid an error.
12361 Use char because int might match the return type of a GCC
12362 builtin and then its argument prototype would still apply. */
12370 return ldap_bind ();
12375 if ac_fn_c_try_link "$LINENO"; then :
12376 ac_cv_lib_ldap_ldap_bind=yes
12378 ac_cv_lib_ldap_ldap_bind=no
12380 rm -f core conftest.err conftest.$ac_objext \
12381 conftest$ac_exeext conftest.$ac_ext
12382 LIBS=$ac_check_lib_save_LIBS
12384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12385 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12386 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12387 cat >>confdefs.h <<_ACEOF
12388 #define HAVE_LIBLDAP 1
12391 LIBS="-lldap $LIBS"
12394 as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12397 LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12398 if test "$enable_thread_safety" = yes; then
12399 # on some platforms ldap_r fails to link without PTHREAD_LIBS
12400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
12401 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
12402 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
12403 $as_echo_n "(cached) " >&6
12405 ac_check_lib_save_LIBS=$LIBS
12406 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12408 /* end confdefs.h. */
12410 /* Override any GCC internal prototype to avoid an error.
12411 Use char because int might match the return type of a GCC
12412 builtin and then its argument prototype would still apply. */
12416 char ldap_simple_bind ();
12420 return ldap_simple_bind ();
12425 if ac_fn_c_try_link "$LINENO"; then :
12426 ac_cv_lib_ldap_r_ldap_simple_bind=yes
12428 ac_cv_lib_ldap_r_ldap_simple_bind=no
12430 rm -f core conftest.err conftest.$ac_objext \
12431 conftest$ac_exeext conftest.$ac_ext
12432 LIBS=$ac_check_lib_save_LIBS
12434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
12435 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
12436 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
12437 cat >>confdefs.h <<_ACEOF
12438 #define HAVE_LIBLDAP_R 1
12441 LIBS="-lldap_r $LIBS"
12444 as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
12447 LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12449 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12451 for ac_func in ldap_initialize
12453 ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
12454 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
12455 cat >>confdefs.h <<_ACEOF
12456 #define HAVE_LDAP_INITIALIZE 1
12463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12464 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12465 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12466 $as_echo_n "(cached) " >&6
12468 ac_check_lib_save_LIBS=$LIBS
12469 LIBS="-lwldap32 $LIBS"
12470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12471 /* end confdefs.h. */
12473 /* Override any GCC internal prototype to avoid an error.
12474 Use char because int might match the return type of a GCC
12475 builtin and then its argument prototype would still apply. */
12483 return ldap_bind ();
12488 if ac_fn_c_try_link "$LINENO"; then :
12489 ac_cv_lib_wldap32_ldap_bind=yes
12491 ac_cv_lib_wldap32_ldap_bind=no
12493 rm -f core conftest.err conftest.$ac_objext \
12494 conftest$ac_exeext conftest.$ac_ext
12495 LIBS=$ac_check_lib_save_LIBS
12497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12498 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12499 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12500 cat >>confdefs.h <<_ACEOF
12501 #define HAVE_LIBWLDAP32 1
12504 LIBS="-lwldap32 $LIBS"
12507 as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
12510 LDAP_LIBS_FE="-lwldap32"
12511 LDAP_LIBS_BE="-lwldap32"
12518 # for contrib/sepgsql
12519 if test "$with_selinux" = yes; then
12520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
12521 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
12522 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
12523 $as_echo_n "(cached) " >&6
12525 ac_check_lib_save_LIBS=$LIBS
12526 LIBS="-lselinux $LIBS"
12527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12528 /* end confdefs.h. */
12530 /* Override any GCC internal prototype to avoid an error.
12531 Use char because int might match the return type of a GCC
12532 builtin and then its argument prototype would still apply. */
12536 char security_compute_create_name ();
12540 return security_compute_create_name ();
12545 if ac_fn_c_try_link "$LINENO"; then :
12546 ac_cv_lib_selinux_security_compute_create_name=yes
12548 ac_cv_lib_selinux_security_compute_create_name=no
12550 rm -f core conftest.err conftest.$ac_objext \
12551 conftest$ac_exeext conftest.$ac_ext
12552 LIBS=$ac_check_lib_save_LIBS
12554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
12555 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
12556 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
12557 cat >>confdefs.h <<_ACEOF
12558 #define HAVE_LIBSELINUX 1
12561 LIBS="-lselinux $LIBS"
12564 as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
12569 # for contrib/uuid-ossp
12570 if test "$with_uuid" = bsd ; then
12571 # On BSD, the UUID functions are in libc
12572 ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
12573 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
12576 as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
12579 elif test "$with_uuid" = e2fs ; then
12580 # On macOS, the UUID functions are in libc
12581 ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
12582 if test "x$ac_cv_func_uuid_generate" = xyes; then :
12585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
12586 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
12587 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
12588 $as_echo_n "(cached) " >&6
12590 ac_check_lib_save_LIBS=$LIBS
12591 LIBS="-luuid $LIBS"
12592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12593 /* end confdefs.h. */
12595 /* Override any GCC internal prototype to avoid an error.
12596 Use char because int might match the return type of a GCC
12597 builtin and then its argument prototype would still apply. */
12601 char uuid_generate ();
12605 return uuid_generate ();
12610 if ac_fn_c_try_link "$LINENO"; then :
12611 ac_cv_lib_uuid_uuid_generate=yes
12613 ac_cv_lib_uuid_uuid_generate=no
12615 rm -f core conftest.err conftest.$ac_objext \
12616 conftest$ac_exeext conftest.$ac_ext
12617 LIBS=$ac_check_lib_save_LIBS
12619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
12620 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
12621 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
12624 as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
12629 elif test "$with_uuid" = ossp ; then
12630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
12631 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
12632 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
12633 $as_echo_n "(cached) " >&6
12635 ac_check_lib_save_LIBS=$LIBS
12636 LIBS="-lossp-uuid $LIBS"
12637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12638 /* end confdefs.h. */
12640 /* Override any GCC internal prototype to avoid an error.
12641 Use char because int might match the return type of a GCC
12642 builtin and then its argument prototype would still apply. */
12646 char uuid_export ();
12650 return uuid_export ();
12655 if ac_fn_c_try_link "$LINENO"; then :
12656 ac_cv_lib_ossp_uuid_uuid_export=yes
12658 ac_cv_lib_ossp_uuid_uuid_export=no
12660 rm -f core conftest.err conftest.$ac_objext \
12661 conftest$ac_exeext conftest.$ac_ext
12662 LIBS=$ac_check_lib_save_LIBS
12664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
12665 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
12666 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
12667 UUID_LIBS="-lossp-uuid"
12669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
12670 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
12671 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
12672 $as_echo_n "(cached) " >&6
12674 ac_check_lib_save_LIBS=$LIBS
12675 LIBS="-luuid $LIBS"
12676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12677 /* end confdefs.h. */
12679 /* Override any GCC internal prototype to avoid an error.
12680 Use char because int might match the return type of a GCC
12681 builtin and then its argument prototype would still apply. */
12685 char uuid_export ();
12689 return uuid_export ();
12694 if ac_fn_c_try_link "$LINENO"; then :
12695 ac_cv_lib_uuid_uuid_export=yes
12697 ac_cv_lib_uuid_uuid_export=no
12699 rm -f core conftest.err conftest.$ac_objext \
12700 conftest$ac_exeext conftest.$ac_ext
12701 LIBS=$ac_check_lib_save_LIBS
12703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
12704 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
12705 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
12708 as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
12721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
12722 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
12723 if ${ac_cv_header_stdbool_h+:} false; then :
12724 $as_echo_n "(cached) " >&6
12726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12727 /* end confdefs.h. */
12729 #include <stdbool.h>
12731 "error: bool is not defined"
12734 "error: false is not defined"
12737 "error: false is not 0"
12740 "error: true is not defined"
12743 "error: true is not 1"
12745 #ifndef __bool_true_false_are_defined
12746 "error: __bool_true_false_are_defined is not defined"
12749 struct s { _Bool s: 1; _Bool t; } s;
12751 char a[true == 1 ? 1 : -1];
12752 char b[false == 0 ? 1 : -1];
12753 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
12754 char d[(bool) 0.5 == true ? 1 : -1];
12755 /* See body of main program for 'e'. */
12756 char f[(_Bool) 0.0 == false ? 1 : -1];
12758 char h[sizeof (_Bool)];
12759 char i[sizeof s.t];
12760 enum { j = false, k = true, l = false * true, m = true * 256 };
12761 /* The following fails for
12762 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
12764 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
12765 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
12766 /* Catch a bug in an HP-UX C compiler. See
12767 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
12768 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
12780 /* Refer to every declared value, to avoid compiler optimizations. */
12781 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
12782 + !m + !n + !o + !p + !q + !pq);
12788 if ac_fn_c_try_compile "$LINENO"; then :
12789 ac_cv_header_stdbool_h=yes
12791 ac_cv_header_stdbool_h=no
12793 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
12796 $as_echo "$ac_cv_header_stdbool_h" >&6; }
12797 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
12798 if test "x$ac_cv_type__Bool" = xyes; then :
12800 cat >>confdefs.h <<_ACEOF
12801 #define HAVE__BOOL 1
12808 if test $ac_cv_header_stdbool_h = yes; then
12810 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
12815 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
12817 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12818 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12819 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12820 cat >>confdefs.h <<_ACEOF
12821 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12829 # On BSD, test for net/if.h will fail unless sys/socket.h
12830 # is included first.
12831 for ac_header in net/if.h
12833 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
12834 #include <sys/socket.h>
12837 if test "x$ac_cv_header_net_if_h" = xyes; then :
12838 cat >>confdefs.h <<_ACEOF
12839 #define HAVE_NET_IF_H 1
12847 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
12848 # is included first.
12849 for ac_header in sys/ucred.h
12851 ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
12852 #include <sys/param.h>
12855 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
12856 cat >>confdefs.h <<_ACEOF
12857 #define HAVE_SYS_UCRED_H 1
12865 # At least on IRIX, test for netinet/tcp.h will fail unless
12866 # netinet/in.h is included first.
12867 for ac_header in netinet/tcp.h
12869 ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
12870 #include <netinet/in.h>
12873 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
12874 cat >>confdefs.h <<_ACEOF
12875 #define HAVE_NETINET_TCP_H 1
12883 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
12884 for ac_header in readline/readline.h
12886 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12887 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12888 cat >>confdefs.h <<_ACEOF
12889 #define HAVE_READLINE_READLINE_H 1
12893 for ac_header in readline.h
12895 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12896 if test "x$ac_cv_header_readline_h" = xyes; then :
12897 cat >>confdefs.h <<_ACEOF
12898 #define HAVE_READLINE_H 1
12902 as_fn_error $? "readline header not found
12903 If you have readline already installed, see config.log for details on the
12904 failure. It is possible the compiler isn't looking in the proper directory.
12905 Use --without-readline to disable readline support." "$LINENO" 5
12914 for ac_header in readline/history.h
12916 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
12917 if test "x$ac_cv_header_readline_history_h" = xyes; then :
12918 cat >>confdefs.h <<_ACEOF
12919 #define HAVE_READLINE_HISTORY_H 1
12923 for ac_header in history.h
12925 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12926 if test "x$ac_cv_header_history_h" = xyes; then :
12927 cat >>confdefs.h <<_ACEOF
12928 #define HAVE_HISTORY_H 1
12932 as_fn_error $? "history header not found
12933 If you have readline already installed, see config.log for details on the
12934 failure. It is possible the compiler isn't looking in the proper directory.
12935 Use --without-readline to disable readline support." "$LINENO" 5
12946 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
12947 # Some installations of libedit usurp /usr/include/readline/, which seems
12948 # bad practice, since in combined installations readline will have its headers
12949 # there. We might have to resort to AC_EGREP checks to make sure we found
12950 # the proper header...
12951 for ac_header in editline/readline.h
12953 ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
12954 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
12955 cat >>confdefs.h <<_ACEOF
12956 #define HAVE_EDITLINE_READLINE_H 1
12960 for ac_header in readline.h
12962 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12963 if test "x$ac_cv_header_readline_h" = xyes; then :
12964 cat >>confdefs.h <<_ACEOF
12965 #define HAVE_READLINE_H 1
12969 for ac_header in readline/readline.h
12971 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12972 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12973 cat >>confdefs.h <<_ACEOF
12974 #define HAVE_READLINE_READLINE_H 1
12978 as_fn_error $? "readline header not found
12979 If you have libedit already installed, see config.log for details on the
12980 failure. It is possible the compiler isn't looking in the proper directory.
12981 Use --without-readline to disable libedit support." "$LINENO" 5
12994 # Note: in a libedit installation, history.h is sometimes a dummy, and may
12995 # not be there at all. Hence, don't complain if not found. We must check
12996 # though, since in yet other versions it is an independent header.
12997 for ac_header in editline/history.h
12999 ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
13000 if test "x$ac_cv_header_editline_history_h" = xyes; then :
13001 cat >>confdefs.h <<_ACEOF
13002 #define HAVE_EDITLINE_HISTORY_H 1
13006 for ac_header in history.h
13008 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13009 if test "x$ac_cv_header_history_h" = xyes; then :
13010 cat >>confdefs.h <<_ACEOF
13011 #define HAVE_HISTORY_H 1
13015 for ac_header in readline/history.h
13017 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13018 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13019 cat >>confdefs.h <<_ACEOF
13020 #define HAVE_READLINE_HISTORY_H 1
13037 if test "$with_zlib" = yes; then
13038 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
13039 if test "x$ac_cv_header_zlib_h" = xyes; then :
13042 as_fn_error $? "zlib header not found
13043 If you have zlib already installed, see config.log for details on the
13044 failure. It is possible the compiler isn't looking in the proper directory.
13045 Use --without-zlib to disable zlib support." "$LINENO" 5
13051 if test "$with_gssapi" = yes ; then
13052 for ac_header in gssapi/gssapi.h
13054 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
13055 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
13056 cat >>confdefs.h <<_ACEOF
13057 #define HAVE_GSSAPI_GSSAPI_H 1
13061 for ac_header in gssapi.h
13063 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
13064 if test "x$ac_cv_header_gssapi_h" = xyes; then :
13065 cat >>confdefs.h <<_ACEOF
13066 #define HAVE_GSSAPI_H 1
13070 as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
13081 if test "$with_openssl" = yes ; then
13082 ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
13083 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
13086 as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
13090 ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
13091 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
13094 as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
13100 if test "$with_pam" = yes ; then
13101 for ac_header in security/pam_appl.h
13103 ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
13104 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
13105 cat >>confdefs.h <<_ACEOF
13106 #define HAVE_SECURITY_PAM_APPL_H 1
13110 for ac_header in pam/pam_appl.h
13112 ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
13113 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
13114 cat >>confdefs.h <<_ACEOF
13115 #define HAVE_PAM_PAM_APPL_H 1
13119 as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
13130 if test "$with_bsd_auth" = yes ; then
13131 ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
13132 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
13135 as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
13141 if test "$with_systemd" = yes ; then
13142 ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
13143 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
13146 as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
13152 if test "$with_libxml" = yes ; then
13153 ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
13154 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
13157 as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
13163 if test "$with_libxslt" = yes ; then
13164 ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
13165 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
13168 as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
13174 if test "$with_ldap" = yes ; then
13175 if test "$PORTNAME" != "win32"; then
13176 for ac_header in ldap.h
13178 ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
13179 if test "x$ac_cv_header_ldap_h" = xyes; then :
13180 cat >>confdefs.h <<_ACEOF
13181 #define HAVE_LDAP_H 1
13185 as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
13190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
13191 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
13192 if ${pgac_cv_ldap_safe+:} false; then :
13193 $as_echo_n "(cached) " >&6
13195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13196 /* end confdefs.h. */
13198 #if !defined(LDAP_VENDOR_VERSION) || \
13199 (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
13200 LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
13211 if ac_fn_c_try_compile "$LINENO"; then :
13212 pgac_cv_ldap_safe=yes
13214 pgac_cv_ldap_safe=no
13216 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
13219 $as_echo "$pgac_cv_ldap_safe" >&6; }
13221 if test "$pgac_cv_ldap_safe" != yes; then
13222 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
13223 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13224 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13225 *** also uses LDAP will crash on exit." >&5
13226 $as_echo "$as_me: WARNING:
13227 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13228 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13229 *** also uses LDAP will crash on exit." >&2;}
13232 for ac_header in winldap.h
13234 ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
13235 #include <windows.h>
13238 if test "x$ac_cv_header_winldap_h" = xyes; then :
13239 cat >>confdefs.h <<_ACEOF
13240 #define HAVE_WINLDAP_H 1
13244 as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
13252 if test "$with_bonjour" = yes ; then
13253 ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
13254 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
13257 as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
13263 # for contrib/uuid-ossp
13264 if test "$with_uuid" = bsd ; then
13265 for ac_header in uuid.h
13267 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13268 if test "x$ac_cv_header_uuid_h" = xyes; then :
13269 cat >>confdefs.h <<_ACEOF
13270 #define HAVE_UUID_H 1
13272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13273 /* end confdefs.h. */
13277 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13278 $EGREP "uuid_to_string" >/dev/null 2>&1; then :
13281 as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
13286 as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
13291 elif test "$with_uuid" = e2fs ; then
13292 for ac_header in uuid/uuid.h
13294 ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
13295 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
13296 cat >>confdefs.h <<_ACEOF
13297 #define HAVE_UUID_UUID_H 1
13299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13300 /* end confdefs.h. */
13301 #include <uuid/uuid.h>
13304 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13305 $EGREP "uuid_generate" >/dev/null 2>&1; then :
13308 as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
13313 for ac_header in uuid.h
13315 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13316 if test "x$ac_cv_header_uuid_h" = xyes; then :
13317 cat >>confdefs.h <<_ACEOF
13318 #define HAVE_UUID_H 1
13320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13321 /* end confdefs.h. */
13325 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13326 $EGREP "uuid_generate" >/dev/null 2>&1; then :
13329 as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
13334 as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
13343 elif test "$with_uuid" = ossp ; then
13344 for ac_header in ossp/uuid.h
13346 ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
13347 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
13348 cat >>confdefs.h <<_ACEOF
13349 #define HAVE_OSSP_UUID_H 1
13351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13352 /* end confdefs.h. */
13353 #include <ossp/uuid.h>
13356 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13357 $EGREP "uuid_export" >/dev/null 2>&1; then :
13360 as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
13365 for ac_header in uuid.h
13367 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13368 if test "x$ac_cv_header_uuid_h" = xyes; then :
13369 cat >>confdefs.h <<_ACEOF
13370 #define HAVE_UUID_H 1
13372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13373 /* end confdefs.h. */
13377 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13378 $EGREP "uuid_export" >/dev/null 2>&1; then :
13381 as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
13386 as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
13397 if test "$PORTNAME" = "win32" ; then
13398 for ac_header in crtdefs.h
13400 ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
13401 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
13402 cat >>confdefs.h <<_ACEOF
13403 #define HAVE_CRTDEFS_H 1
13413 ## Types, structures, compiler characteristics
13416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13417 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13418 if ${ac_cv_c_bigendian+:} false; then :
13419 $as_echo_n "(cached) " >&6
13421 ac_cv_c_bigendian=unknown
13422 # See if we're dealing with a universal compiler.
13423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13424 /* end confdefs.h. */
13425 #ifndef __APPLE_CC__
13426 not a universal capable compiler
13431 if ac_fn_c_try_compile "$LINENO"; then :
13433 # Check for potential -arch flags. It is not universal unless
13434 # there are at least two -arch flags with different values.
13437 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13438 if test -n "$ac_prev"; then
13440 i?86 | x86_64 | ppc | ppc64)
13441 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13444 ac_cv_c_bigendian=universal
13450 elif test "x$ac_word" = "x-arch"; then
13455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13456 if test $ac_cv_c_bigendian = unknown; then
13457 # See if sys/param.h defines the BYTE_ORDER macro.
13458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13459 /* end confdefs.h. */
13460 #include <sys/types.h>
13461 #include <sys/param.h>
13466 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13467 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13469 bogus endian macros
13476 if ac_fn_c_try_compile "$LINENO"; then :
13477 # It does; now see whether it defined to BIG_ENDIAN or not.
13478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13479 /* end confdefs.h. */
13480 #include <sys/types.h>
13481 #include <sys/param.h>
13486 #if BYTE_ORDER != BIG_ENDIAN
13494 if ac_fn_c_try_compile "$LINENO"; then :
13495 ac_cv_c_bigendian=yes
13497 ac_cv_c_bigendian=no
13499 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13501 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13503 if test $ac_cv_c_bigendian = unknown; then
13504 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13506 /* end confdefs.h. */
13507 #include <limits.h>
13512 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13513 bogus endian macros
13520 if ac_fn_c_try_compile "$LINENO"; then :
13521 # It does; now see whether it defined to _BIG_ENDIAN or not.
13522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13523 /* end confdefs.h. */
13524 #include <limits.h>
13529 #ifndef _BIG_ENDIAN
13537 if ac_fn_c_try_compile "$LINENO"; then :
13538 ac_cv_c_bigendian=yes
13540 ac_cv_c_bigendian=no
13542 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13544 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13546 if test $ac_cv_c_bigendian = unknown; then
13547 # Compile a test program.
13548 if test "$cross_compiling" = yes; then :
13549 # Try to guess by grepping values from an object file.
13550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13551 /* end confdefs.h. */
13552 short int ascii_mm[] =
13553 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13554 short int ascii_ii[] =
13555 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13556 int use_ascii (int i) {
13557 return ascii_mm[i] + ascii_ii[i];
13559 short int ebcdic_ii[] =
13560 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13561 short int ebcdic_mm[] =
13562 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13563 int use_ebcdic (int i) {
13564 return ebcdic_mm[i] + ebcdic_ii[i];
13571 return use_ascii (foo) == use_ebcdic (foo);
13576 if ac_fn_c_try_compile "$LINENO"; then :
13577 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13578 ac_cv_c_bigendian=yes
13580 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13581 if test "$ac_cv_c_bigendian" = unknown; then
13582 ac_cv_c_bigendian=no
13584 # finding both strings is unlikely to happen, but who knows?
13585 ac_cv_c_bigendian=unknown
13589 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13592 /* end confdefs.h. */
13593 $ac_includes_default
13598 /* Are we little or big endian? From Harbison&Steele. */
13602 char c[sizeof (long int)];
13605 return u.c[sizeof (long int) - 1] == 1;
13611 if ac_fn_c_try_run "$LINENO"; then :
13612 ac_cv_c_bigendian=no
13614 ac_cv_c_bigendian=yes
13616 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13617 conftest.$ac_objext conftest.beam conftest.$ac_ext
13622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13623 $as_echo "$ac_cv_c_bigendian" >&6; }
13624 case $ac_cv_c_bigendian in #(
13626 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13632 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13636 as_fn_error $? "unknown endianness
13637 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
13641 $as_echo_n "checking for inline... " >&6; }
13642 if ${ac_cv_c_inline+:} false; then :
13643 $as_echo_n "(cached) " >&6
13646 for ac_kw in inline __inline__ __inline; do
13647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13648 /* end confdefs.h. */
13649 #ifndef __cplusplus
13651 static $ac_kw foo_t static_foo () {return 0; }
13652 $ac_kw foo_t foo () {return 0; }
13656 if ac_fn_c_try_compile "$LINENO"; then :
13657 ac_cv_c_inline=$ac_kw
13659 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13660 test "$ac_cv_c_inline" != no && break
13664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
13665 $as_echo "$ac_cv_c_inline" >&6; }
13667 case $ac_cv_c_inline in
13670 case $ac_cv_c_inline in
13672 *) ac_val=$ac_cv_c_inline;;
13674 cat >>confdefs.h <<_ACEOF
13675 #ifndef __cplusplus
13676 #define inline $ac_val
13682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
13683 $as_echo_n "checking for printf format archetype... " >&6; }
13684 if ${pgac_cv_printf_archetype+:} false; then :
13685 $as_echo_n "(cached) " >&6
13687 pgac_cv_printf_archetype=gnu_printf
13688 ac_save_c_werror_flag=$ac_c_werror_flag
13689 ac_c_werror_flag=yes
13690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13691 /* end confdefs.h. */
13692 extern void pgac_write(int ignore, const char *fmt,...)
13693 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
13697 pgac_write(0, "error %s: %m", "foo");
13702 if ac_fn_c_try_compile "$LINENO"; then :
13703 ac_archetype_ok=yes
13707 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13708 ac_c_werror_flag=$ac_save_c_werror_flag
13710 if [ "$ac_archetype_ok" = no ]; then
13711 pgac_cv_printf_archetype=__syslog__
13712 ac_save_c_werror_flag=$ac_c_werror_flag
13713 ac_c_werror_flag=yes
13714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13715 /* end confdefs.h. */
13716 extern void pgac_write(int ignore, const char *fmt,...)
13717 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
13721 pgac_write(0, "error %s: %m", "foo");
13726 if ac_fn_c_try_compile "$LINENO"; then :
13727 ac_archetype_ok=yes
13731 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13732 ac_c_werror_flag=$ac_save_c_werror_flag
13734 if [ "$ac_archetype_ok" = no ]; then
13735 pgac_cv_printf_archetype=printf
13739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
13740 $as_echo "$pgac_cv_printf_archetype" >&6; }
13742 cat >>confdefs.h <<_ACEOF
13743 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
13748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
13749 $as_echo_n "checking for flexible array members... " >&6; }
13750 if ${ac_cv_c_flexmember+:} false; then :
13751 $as_echo_n "(cached) " >&6
13753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13754 /* end confdefs.h. */
13755 #include <stdlib.h>
13757 #include <stddef.h>
13758 struct s { int n; double d[]; };
13762 int m = getchar ();
13763 struct s *p = malloc (offsetof (struct s, d)
13764 + m * sizeof (double));
13766 return p->d != (double *) NULL;
13771 if ac_fn_c_try_compile "$LINENO"; then :
13772 ac_cv_c_flexmember=yes
13774 ac_cv_c_flexmember=no
13776 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
13779 $as_echo "$ac_cv_c_flexmember" >&6; }
13780 if test $ac_cv_c_flexmember = yes; then
13782 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
13785 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
13789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
13790 $as_echo_n "checking for signed types... " >&6; }
13791 if ${pgac_cv_c_signed+:} false; then :
13792 $as_echo_n "(cached) " >&6
13794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13795 /* end confdefs.h. */
13800 signed char c; signed short s; signed int i;
13805 if ac_fn_c_try_compile "$LINENO"; then :
13806 pgac_cv_c_signed=yes
13808 pgac_cv_c_signed=no
13810 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
13813 $as_echo "$pgac_cv_c_signed" >&6; }
13814 if test x"$pgac_cv_c_signed" = xno ; then
13816 $as_echo "#define signed /**/" >>confdefs.h
13819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
13820 $as_echo_n "checking for __func__... " >&6; }
13821 if ${pgac_cv_funcname_func_support+:} false; then :
13822 $as_echo_n "(cached) " >&6
13824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13825 /* end confdefs.h. */
13830 printf("%s\n", __func__);
13835 if ac_fn_c_try_compile "$LINENO"; then :
13836 pgac_cv_funcname_func_support=yes
13838 pgac_cv_funcname_func_support=no
13840 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
13843 $as_echo "$pgac_cv_funcname_func_support" >&6; }
13844 if test x"$pgac_cv_funcname_func_support" = xyes ; then
13846 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
13849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
13850 $as_echo_n "checking for __FUNCTION__... " >&6; }
13851 if ${pgac_cv_funcname_function_support+:} false; then :
13852 $as_echo_n "(cached) " >&6
13854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13855 /* end confdefs.h. */
13860 printf("%s\n", __FUNCTION__);
13865 if ac_fn_c_try_compile "$LINENO"; then :
13866 pgac_cv_funcname_function_support=yes
13868 pgac_cv_funcname_function_support=no
13870 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
13873 $as_echo "$pgac_cv_funcname_function_support" >&6; }
13874 if test x"$pgac_cv_funcname_function_support" = xyes ; then
13876 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
13880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
13881 $as_echo_n "checking for _Static_assert... " >&6; }
13882 if ${pgac_cv__static_assert+:} false; then :
13883 $as_echo_n "(cached) " >&6
13885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13886 /* end confdefs.h. */
13891 ({ _Static_assert(1, "foo"); })
13896 if ac_fn_c_try_link "$LINENO"; then :
13897 pgac_cv__static_assert=yes
13899 pgac_cv__static_assert=no
13901 rm -f core conftest.err conftest.$ac_objext \
13902 conftest$ac_exeext conftest.$ac_ext
13904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
13905 $as_echo "$pgac_cv__static_assert" >&6; }
13906 if test x"$pgac_cv__static_assert" = xyes ; then
13908 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
13911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
13912 $as_echo_n "checking for typeof... " >&6; }
13913 if ${pgac_cv_c_typeof+:} false; then :
13914 $as_echo_n "(cached) " >&6
13916 pgac_cv_c_typeof=no
13917 for pgac_kw in typeof __typeof__ decltype; do
13918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13919 /* end confdefs.h. */
13932 if ac_fn_c_try_compile "$LINENO"; then :
13933 pgac_cv_c_typeof=$pgac_kw
13935 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13936 test "$pgac_cv_c_typeof" != no && break
13939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
13940 $as_echo "$pgac_cv_c_typeof" >&6; }
13941 if test "$pgac_cv_c_typeof" != no; then
13943 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
13945 if test "$pgac_cv_c_typeof" != typeof; then
13947 cat >>confdefs.h <<_ACEOF
13948 #define typeof $pgac_cv_c_typeof
13953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
13954 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
13955 if ${pgac_cv__types_compatible+:} false; then :
13956 $as_echo_n "(cached) " >&6
13958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13959 /* end confdefs.h. */
13964 int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
13969 if ac_fn_c_try_compile "$LINENO"; then :
13970 pgac_cv__types_compatible=yes
13972 pgac_cv__types_compatible=no
13974 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
13977 $as_echo "$pgac_cv__types_compatible" >&6; }
13978 if test x"$pgac_cv__types_compatible" = xyes ; then
13980 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
13983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
13984 $as_echo_n "checking for __builtin_bswap16... " >&6; }
13985 if ${pgac_cv__builtin_bswap16+:} false; then :
13986 $as_echo_n "(cached) " >&6
13988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13989 /* end confdefs.h. */
13990 static unsigned long int x = __builtin_bswap16(0xaabb);
13993 if ac_fn_c_try_compile "$LINENO"; then :
13994 pgac_cv__builtin_bswap16=yes
13996 pgac_cv__builtin_bswap16=no
13998 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
14001 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
14002 if test x"$pgac_cv__builtin_bswap16" = xyes ; then
14004 $as_echo "#define HAVE__BUILTIN_BSWAP16 1" >>confdefs.h
14007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
14008 $as_echo_n "checking for __builtin_bswap32... " >&6; }
14009 if ${pgac_cv__builtin_bswap32+:} false; then :
14010 $as_echo_n "(cached) " >&6
14012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14013 /* end confdefs.h. */
14014 static unsigned long int x = __builtin_bswap32(0xaabbccdd);
14017 if ac_fn_c_try_compile "$LINENO"; then :
14018 pgac_cv__builtin_bswap32=yes
14020 pgac_cv__builtin_bswap32=no
14022 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
14025 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
14026 if test x"$pgac_cv__builtin_bswap32" = xyes ; then
14028 $as_echo "#define HAVE__BUILTIN_BSWAP32 1" >>confdefs.h
14031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
14032 $as_echo_n "checking for __builtin_bswap64... " >&6; }
14033 if ${pgac_cv__builtin_bswap64+:} false; then :
14034 $as_echo_n "(cached) " >&6
14036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14037 /* end confdefs.h. */
14038 static unsigned long int x = __builtin_bswap64(0xaabbccddeeff0011);
14041 if ac_fn_c_try_compile "$LINENO"; then :
14042 pgac_cv__builtin_bswap64=yes
14044 pgac_cv__builtin_bswap64=no
14046 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
14049 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
14050 if test x"$pgac_cv__builtin_bswap64" = xyes ; then
14052 $as_echo "#define HAVE__BUILTIN_BSWAP64 1" >>confdefs.h
14055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
14056 $as_echo_n "checking for __builtin_constant_p... " >&6; }
14057 if ${pgac_cv__builtin_constant_p+:} false; then :
14058 $as_echo_n "(cached) " >&6
14060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14061 /* end confdefs.h. */
14063 static int y[__builtin_constant_p(x) ? x : 1];
14064 static int z[__builtin_constant_p("string literal") ? 1 : x];
14068 if ac_fn_c_try_compile "$LINENO"; then :
14069 pgac_cv__builtin_constant_p=yes
14071 pgac_cv__builtin_constant_p=no
14073 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
14076 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
14077 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
14079 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
14082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
14083 $as_echo_n "checking for __builtin_unreachable... " >&6; }
14084 if ${pgac_cv__builtin_unreachable+:} false; then :
14085 $as_echo_n "(cached) " >&6
14087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14088 /* end confdefs.h. */
14093 __builtin_unreachable();
14098 if ac_fn_c_try_link "$LINENO"; then :
14099 pgac_cv__builtin_unreachable=yes
14101 pgac_cv__builtin_unreachable=no
14103 rm -f core conftest.err conftest.$ac_objext \
14104 conftest$ac_exeext conftest.$ac_ext
14106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
14107 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
14108 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
14110 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
14113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
14114 $as_echo_n "checking for computed goto support... " >&6; }
14115 if ${pgac_cv_computed_goto+:} false; then :
14116 $as_echo_n "(cached) " >&6
14118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14119 /* end confdefs.h. */
14124 void *labeladdrs[] = {&&my_label};
14125 goto *labeladdrs[0];
14133 if ac_fn_c_try_compile "$LINENO"; then :
14134 pgac_cv_computed_goto=yes
14136 pgac_cv_computed_goto=no
14138 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
14141 $as_echo "$pgac_cv_computed_goto" >&6; }
14142 if test x"$pgac_cv_computed_goto" = xyes ; then
14144 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
14147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
14148 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
14149 if ${ac_cv_struct_tm+:} false; then :
14150 $as_echo_n "(cached) " >&6
14152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14153 /* end confdefs.h. */
14154 #include <sys/types.h>
14161 int *p = &tm.tm_sec;
14167 if ac_fn_c_try_compile "$LINENO"; then :
14168 ac_cv_struct_tm=time.h
14170 ac_cv_struct_tm=sys/time.h
14172 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
14175 $as_echo "$ac_cv_struct_tm" >&6; }
14176 if test $ac_cv_struct_tm = sys/time.h; then
14178 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
14182 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14183 #include <$ac_cv_struct_tm>
14186 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
14188 cat >>confdefs.h <<_ACEOF
14189 #define HAVE_STRUCT_TM_TM_ZONE 1
14195 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14197 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
14200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14201 $as_echo_n "checking for tzname... " >&6; }
14202 if ${ac_cv_var_tzname+:} false; then :
14203 $as_echo_n "(cached) " >&6
14205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14206 /* end confdefs.h. */
14207 #include <stdlib.h>
14209 #ifndef tzname /* For SGI. */
14210 extern char *tzname[]; /* RS6000 and others reject char **tzname. */
14221 if ac_fn_c_try_link "$LINENO"; then :
14222 ac_cv_var_tzname=yes
14224 ac_cv_var_tzname=no
14226 rm -f core conftest.err conftest.$ac_objext \
14227 conftest$ac_exeext conftest.$ac_ext
14229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14230 $as_echo "$ac_cv_var_tzname" >&6; }
14231 if test $ac_cv_var_tzname = yes; then
14233 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
14237 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14238 #ifdef HAVE_SYS_IPC_H
14239 #include <sys/ipc.h>
14241 #ifdef HAVE_SYS_SEM_H
14242 #include <sys/sem.h>
14245 if test "x$ac_cv_type_union_semun" = xyes; then :
14247 cat >>confdefs.h <<_ACEOF
14248 #define HAVE_UNION_SEMUN 1
14254 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
14255 #ifdef HAVE_SYS_UN_H
14256 #include <sys/un.h>
14260 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
14262 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
14266 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
14267 #include <sys/socket.h>
14270 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
14272 cat >>confdefs.h <<_ACEOF
14273 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
14279 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
14280 #include <sys/socket.h>
14283 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
14285 cat >>confdefs.h <<_ACEOF
14286 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
14291 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
14292 #include <sys/socket.h>
14295 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
14297 cat >>confdefs.h <<_ACEOF
14298 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
14303 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
14304 #include <sys/socket.h>
14307 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
14309 cat >>confdefs.h <<_ACEOF
14310 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
14315 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
14316 #include <sys/socket.h>
14319 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
14321 cat >>confdefs.h <<_ACEOF
14322 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
14327 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14328 #include <sys/socket.h>
14331 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14333 cat >>confdefs.h <<_ACEOF
14334 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14340 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
14341 #include <sys/socket.h>
14345 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
14347 cat >>confdefs.h <<_ACEOF
14348 #define HAVE_STRUCT_ADDRINFO 1
14355 ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
14356 if test "x$ac_cv_type_intptr_t" = xyes; then :
14358 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
14361 for ac_type in 'int' 'long int' 'long long int'; do
14362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14363 /* end confdefs.h. */
14364 $ac_includes_default
14368 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14369 test_array [0] = 0;
14370 return test_array [0];
14376 if ac_fn_c_try_compile "$LINENO"; then :
14378 cat >>confdefs.h <<_ACEOF
14379 #define intptr_t $ac_type
14384 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14385 test -z "$ac_type" && break
14391 ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
14392 if test "x$ac_cv_type_uintptr_t" = xyes; then :
14394 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
14397 for ac_type in 'unsigned int' 'unsigned long int' \
14398 'unsigned long long int'; do
14399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14400 /* end confdefs.h. */
14401 $ac_includes_default
14405 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14406 test_array [0] = 0;
14407 return test_array [0];
14413 if ac_fn_c_try_compile "$LINENO"; then :
14415 cat >>confdefs.h <<_ACEOF
14416 #define uintptr_t $ac_type
14421 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14422 test -z "$ac_type" && break
14428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
14429 $as_echo_n "checking for unsigned long long int... " >&6; }
14430 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
14431 $as_echo_n "(cached) " >&6
14433 ac_cv_type_unsigned_long_long_int=yes
14434 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14436 /* end confdefs.h. */
14438 /* For now, do not test the preprocessor; as of 2007 there are too many
14439 implementations with broken preprocessors. Perhaps this can
14440 be revisited in 2012. In the meantime, code should not expect
14441 #if to work with literals wider than 32 bits. */
14442 /* Test literals. */
14443 long long int ll = 9223372036854775807ll;
14444 long long int nll = -9223372036854775807LL;
14445 unsigned long long int ull = 18446744073709551615ULL;
14446 /* Test constant expressions. */
14447 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
14449 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
14455 /* Test availability of runtime routines for shift and division. */
14456 long long int llmax = 9223372036854775807ll;
14457 unsigned long long int ullmax = 18446744073709551615ull;
14458 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
14459 | (llmax / ll) | (llmax % ll)
14460 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
14461 | (ullmax / ull) | (ullmax % ull));
14467 if ac_fn_c_try_link "$LINENO"; then :
14470 ac_cv_type_unsigned_long_long_int=no
14472 rm -f core conftest.err conftest.$ac_objext \
14473 conftest$ac_exeext conftest.$ac_ext
14476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
14477 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
14478 if test $ac_cv_type_unsigned_long_long_int = yes; then
14480 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
14486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
14487 $as_echo_n "checking for long long int... " >&6; }
14488 if ${ac_cv_type_long_long_int+:} false; then :
14489 $as_echo_n "(cached) " >&6
14491 ac_cv_type_long_long_int=yes
14492 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14493 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
14494 if test $ac_cv_type_long_long_int = yes; then
14495 if test "$cross_compiling" = yes; then :
14498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14499 /* end confdefs.h. */
14500 #include <limits.h>
14503 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
14504 # define LLONG_MAX (HALF - 1 + HALF)
14509 long long int n = 1;
14513 long long int m = n << i;
14516 if (LLONG_MAX / 2 < m)
14524 if ac_fn_c_try_run "$LINENO"; then :
14527 ac_cv_type_long_long_int=no
14529 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14530 conftest.$ac_objext conftest.beam conftest.$ac_ext
14536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
14537 $as_echo "$ac_cv_type_long_long_int" >&6; }
14538 if test $ac_cv_type_long_long_int = yes; then
14540 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
14545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
14546 $as_echo_n "checking for locale_t... " >&6; }
14547 if ${pgac_cv_type_locale_t+:} false; then :
14548 $as_echo_n "(cached) " >&6
14550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14551 /* end confdefs.h. */
14552 #include <locale.h>
14562 if ac_fn_c_try_compile "$LINENO"; then :
14563 pgac_cv_type_locale_t=yes
14565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14566 /* end confdefs.h. */
14567 #include <xlocale.h>
14577 if ac_fn_c_try_compile "$LINENO"; then :
14578 pgac_cv_type_locale_t='yes (in xlocale.h)'
14580 pgac_cv_type_locale_t=no
14582 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14584 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
14587 $as_echo "$pgac_cv_type_locale_t" >&6; }
14588 if test "$pgac_cv_type_locale_t" != no; then
14590 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
14593 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
14595 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
14599 # MSVC doesn't cope well with defining restrict to __restrict, the
14600 # spelling it understands, because it conflicts with
14601 # __declspec(restrict). Therefore we define pg_restrict to the
14602 # appropriate definition, which presumably won't conflict.
14604 # Allow platforms with buggy compilers to force restrict to not be
14605 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
14607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14608 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
14609 if ${ac_cv_c_restrict+:} false; then :
14610 $as_echo_n "(cached) " >&6
14612 ac_cv_c_restrict=no
14613 # The order here caters to the fact that C++ does not require restrict.
14614 for ac_kw in __restrict __restrict__ _Restrict restrict; do
14615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14616 /* end confdefs.h. */
14617 typedef int * int_ptr;
14618 int foo (int_ptr $ac_kw ip) {
14625 int * $ac_kw t = s;
14632 if ac_fn_c_try_compile "$LINENO"; then :
14633 ac_cv_c_restrict=$ac_kw
14635 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14636 test "$ac_cv_c_restrict" != no && break
14640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14641 $as_echo "$ac_cv_c_restrict" >&6; }
14643 case $ac_cv_c_restrict in
14645 no) $as_echo "#define restrict /**/" >>confdefs.h
14647 *) cat >>confdefs.h <<_ACEOF
14648 #define restrict $ac_cv_c_restrict
14653 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
14656 pg_restrict="$ac_cv_c_restrict"
14659 cat >>confdefs.h <<_ACEOF
14660 #define pg_restrict $pg_restrict
14664 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
14665 #include <sys/param.h>
14666 #ifdef HAVE_SYS_UCRED_H
14667 #include <sys/ucred.h>
14670 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
14672 cat >>confdefs.h <<_ACEOF
14673 #define HAVE_STRUCT_CMSGCRED 1
14680 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
14681 #include <getopt.h>
14684 if test "x$ac_cv_type_struct_option" = xyes; then :
14686 cat >>confdefs.h <<_ACEOF
14687 #define HAVE_STRUCT_OPTION 1
14694 if test "$with_zlib" = yes; then
14695 # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
14696 # did not). While we could work around the lack of z_streamp, it
14697 # seems unwise to encourage people to use such old zlib versions...
14698 ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
14700 if test "x$ac_cv_type_z_streamp" = xyes; then :
14703 as_fn_error $? "zlib version is too old
14704 Use --without-zlib to disable zlib support." "$LINENO" 5
14709 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
14712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
14713 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
14714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14715 /* end confdefs.h. */
14720 int a = 0; int *p = &a; int r;
14721 __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
14726 if ac_fn_c_try_compile "$LINENO"; then :
14727 pgac_cv_have_ppc_mutex_hint=yes
14729 pgac_cv_have_ppc_mutex_hint=no
14731 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
14733 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
14734 if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
14736 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
14742 # Check largefile support. You might think this is a system service not a
14743 # compiler characteristic, but you'd be wrong. We must check this before
14744 # probing existence of related functions such as fseeko, since the largefile
14745 # defines can affect what is generated for that.
14746 if test "$PORTNAME" != "win32"; then
14747 # Check whether --enable-largefile was given.
14748 if test "${enable_largefile+set}" = set; then :
14749 enableval=$enable_largefile;
14752 if test "$enable_largefile" != no; then
14754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
14755 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
14756 if ${ac_cv_sys_largefile_CC+:} false; then :
14757 $as_echo_n "(cached) " >&6
14759 ac_cv_sys_largefile_CC=no
14760 if test "$GCC" != yes; then
14763 # IRIX 6.2 and later do not support large files by default,
14764 # so use the C compiler's -n32 option if that helps.
14765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14766 /* end confdefs.h. */
14767 #include <sys/types.h>
14768 /* Check that off_t can represent 2**63 - 1 correctly.
14769 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14770 since some C++ compilers masquerading as C compilers
14771 incorrectly reject 9223372036854775807. */
14772 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14773 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14774 && LARGE_OFF_T % 2147483647 == 1)
14784 if ac_fn_c_try_compile "$LINENO"; then :
14787 rm -f core conftest.err conftest.$ac_objext
14789 if ac_fn_c_try_compile "$LINENO"; then :
14790 ac_cv_sys_largefile_CC=' -n32'; break
14792 rm -f core conftest.err conftest.$ac_objext
14796 rm -f conftest.$ac_ext
14799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
14800 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
14801 if test "$ac_cv_sys_largefile_CC" != no; then
14802 CC=$CC$ac_cv_sys_largefile_CC
14805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14806 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
14807 if ${ac_cv_sys_file_offset_bits+:} false; then :
14808 $as_echo_n "(cached) " >&6
14811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14812 /* end confdefs.h. */
14813 #include <sys/types.h>
14814 /* Check that off_t can represent 2**63 - 1 correctly.
14815 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14816 since some C++ compilers masquerading as C compilers
14817 incorrectly reject 9223372036854775807. */
14818 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14819 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14820 && LARGE_OFF_T % 2147483647 == 1)
14830 if ac_fn_c_try_compile "$LINENO"; then :
14831 ac_cv_sys_file_offset_bits=no; break
14833 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14835 /* end confdefs.h. */
14836 #define _FILE_OFFSET_BITS 64
14837 #include <sys/types.h>
14838 /* Check that off_t can represent 2**63 - 1 correctly.
14839 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14840 since some C++ compilers masquerading as C compilers
14841 incorrectly reject 9223372036854775807. */
14842 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14843 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14844 && LARGE_OFF_T % 2147483647 == 1)
14854 if ac_fn_c_try_compile "$LINENO"; then :
14855 ac_cv_sys_file_offset_bits=64; break
14857 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14858 ac_cv_sys_file_offset_bits=unknown
14862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
14863 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
14864 case $ac_cv_sys_file_offset_bits in #(
14867 cat >>confdefs.h <<_ACEOF
14868 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14873 if test $ac_cv_sys_file_offset_bits = unknown; then
14874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
14875 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
14876 if ${ac_cv_sys_large_files+:} false; then :
14877 $as_echo_n "(cached) " >&6
14880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14881 /* end confdefs.h. */
14882 #include <sys/types.h>
14883 /* Check that off_t can represent 2**63 - 1 correctly.
14884 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14885 since some C++ compilers masquerading as C compilers
14886 incorrectly reject 9223372036854775807. */
14887 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14888 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14889 && LARGE_OFF_T % 2147483647 == 1)
14899 if ac_fn_c_try_compile "$LINENO"; then :
14900 ac_cv_sys_large_files=no; break
14902 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14904 /* end confdefs.h. */
14905 #define _LARGE_FILES 1
14906 #include <sys/types.h>
14907 /* Check that off_t can represent 2**63 - 1 correctly.
14908 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14909 since some C++ compilers masquerading as C compilers
14910 incorrectly reject 9223372036854775807. */
14911 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14912 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14913 && LARGE_OFF_T % 2147483647 == 1)
14923 if ac_fn_c_try_compile "$LINENO"; then :
14924 ac_cv_sys_large_files=1; break
14926 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14927 ac_cv_sys_large_files=unknown
14931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
14932 $as_echo "$ac_cv_sys_large_files" >&6; }
14933 case $ac_cv_sys_large_files in #(
14936 cat >>confdefs.h <<_ACEOF
14937 #define _LARGE_FILES $ac_cv_sys_large_files
14950 # Check for largefile support (must be after AC_SYS_LARGEFILE)
14951 # The cast to long int works around a bug in the HP C Compiler
14952 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14953 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14954 # This bug is HP SR number 8606223364.
14955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
14956 $as_echo_n "checking size of off_t... " >&6; }
14957 if ${ac_cv_sizeof_off_t+:} false; then :
14958 $as_echo_n "(cached) " >&6
14960 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
14963 if test "$ac_cv_type_off_t" = yes; then
14964 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14965 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14966 as_fn_error 77 "cannot compute sizeof (off_t)
14967 See \`config.log' for more details" "$LINENO" 5; }
14969 ac_cv_sizeof_off_t=0
14974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
14975 $as_echo "$ac_cv_sizeof_off_t" >&6; }
14979 cat >>confdefs.h <<_ACEOF
14980 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
14985 # If we don't have largefile support, can't handle segsize >= 2GB.
14986 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
14987 as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
14990 # The cast to long int works around a bug in the HP C Compiler
14991 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14992 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14993 # This bug is HP SR number 8606223364.
14994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
14995 $as_echo_n "checking size of bool... " >&6; }
14996 if ${ac_cv_sizeof_bool+:} false; then :
14997 $as_echo_n "(cached) " >&6
14999 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool" "#ifdef HAVE_STDBOOL_H
15000 #include <stdbool.h>
15005 if test "$ac_cv_type_bool" = yes; then
15006 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15007 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15008 as_fn_error 77 "cannot compute sizeof (bool)
15009 See \`config.log' for more details" "$LINENO" 5; }
15011 ac_cv_sizeof_bool=0
15016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
15017 $as_echo "$ac_cv_sizeof_bool" >&6; }
15021 cat >>confdefs.h <<_ACEOF
15022 #define SIZEOF_BOOL $ac_cv_sizeof_bool
15029 ## Functions, global variables
15032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
15033 $as_echo_n "checking for int timezone... " >&6; }
15034 if ${pgac_cv_var_int_timezone+:} false; then :
15035 $as_echo_n "(cached) " >&6
15037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15038 /* end confdefs.h. */
15045 res = timezone / 60;
15047 res = _timezone / 60;
15053 if ac_fn_c_try_link "$LINENO"; then :
15054 pgac_cv_var_int_timezone=yes
15056 pgac_cv_var_int_timezone=no
15058 rm -f core conftest.err conftest.$ac_objext \
15059 conftest$ac_exeext conftest.$ac_ext
15061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
15062 $as_echo "$pgac_cv_var_int_timezone" >&6; }
15063 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15065 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
15068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
15069 $as_echo_n "checking types of arguments for accept()... " >&6; }
15070 if ${ac_cv_func_accept_return+:} false; then :
15071 $as_echo_n "(cached) " >&6
15073 if ${ac_cv_func_accept_arg1+:} false; then :
15074 $as_echo_n "(cached) " >&6
15076 if ${ac_cv_func_accept_arg2+:} false; then :
15077 $as_echo_n "(cached) " >&6
15079 if ${ac_cv_func_accept_arg3+:} false; then :
15080 $as_echo_n "(cached) " >&6
15082 for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
15083 for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
15084 for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
15085 for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
15086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15087 /* end confdefs.h. */
15088 #include <sys/types.h>
15089 #include <sys/socket.h>
15090 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
15092 if ac_fn_c_try_compile "$LINENO"; then :
15093 ac_not_found=no; break 4
15097 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15102 if test "$ac_not_found" = yes; then
15103 as_fn_error $? "could not determine argument types" "$LINENO" 5
15105 if test "$ac_cv_func_accept_arg3" = "void"; then
15106 ac_cv_func_accept_arg3=int
15116 { $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
15117 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
15119 cat >>confdefs.h <<_ACEOF
15120 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
15124 cat >>confdefs.h <<_ACEOF
15125 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
15129 cat >>confdefs.h <<_ACEOF
15130 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
15134 cat >>confdefs.h <<_ACEOF
15135 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
15139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
15140 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
15141 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
15142 $as_echo_n "(cached) " >&6
15144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15145 /* end confdefs.h. */
15146 #include <sys/time.h>
15150 struct timeval *tp;
15151 struct timezone *tzp;
15152 gettimeofday(tp,tzp);
15157 if ac_fn_c_try_compile "$LINENO"; then :
15158 pgac_cv_func_gettimeofday_1arg=no
15160 pgac_cv_func_gettimeofday_1arg=yes
15162 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
15165 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
15166 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
15168 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
15172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
15173 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
15174 if ${pgac_cv_func_wcstombs_l+:} false; then :
15175 $as_echo_n "(cached) " >&6
15177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15178 /* end confdefs.h. */
15179 #include <stdlib.h>
15180 #include <locale.h>
15191 if ac_fn_c_try_compile "$LINENO"; then :
15192 pgac_cv_func_wcstombs_l='yes'
15194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15195 /* end confdefs.h. */
15196 #include <stdlib.h>
15197 #include <locale.h>
15198 #include <xlocale.h>
15209 if ac_fn_c_try_compile "$LINENO"; then :
15210 pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
15212 pgac_cv_func_wcstombs_l='no'
15214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15216 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
15219 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
15220 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
15222 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
15226 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15227 # symbols that that library has no business exposing to the world. Pending
15228 # acquisition of a clue by those developers, ignore libedit (including its
15229 # possible alias of libreadline) while checking for everything else.
15230 LIBS_including_readline="$LIBS"
15231 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15233 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 symlink sync_file_range utime utimes wcstombs_l
15235 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15236 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15237 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15238 cat >>confdefs.h <<_ACEOF
15239 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15246 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
15247 if test "x$ac_cv_func_fseeko" = xyes; then :
15248 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15251 case " $LIBOBJS " in
15252 *" fseeko.$ac_objext "* ) ;;
15253 *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
15261 # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
15262 # Mingw uses macros to access Win32 API calls
15265 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15267 ac_cv_func_fseeko=yes;;
15269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15270 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15271 if ${ac_cv_sys_largefile_source+:} false; then :
15272 $as_echo_n "(cached) " >&6
15275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15276 /* end confdefs.h. */
15277 #include <sys/types.h> /* for off_t */
15282 int (*fp) (FILE *, off_t, int) = fseeko;
15283 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15288 if ac_fn_c_try_link "$LINENO"; then :
15289 ac_cv_sys_largefile_source=no; break
15291 rm -f core conftest.err conftest.$ac_objext \
15292 conftest$ac_exeext conftest.$ac_ext
15293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15294 /* end confdefs.h. */
15295 #define _LARGEFILE_SOURCE 1
15296 #include <sys/types.h> /* for off_t */
15301 int (*fp) (FILE *, off_t, int) = fseeko;
15302 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15307 if ac_fn_c_try_link "$LINENO"; then :
15308 ac_cv_sys_largefile_source=1; break
15310 rm -f core conftest.err conftest.$ac_objext \
15311 conftest$ac_exeext conftest.$ac_ext
15312 ac_cv_sys_largefile_source=unknown
15316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15317 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15318 case $ac_cv_sys_largefile_source in #(
15321 cat >>confdefs.h <<_ACEOF
15322 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15328 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15329 # in glibc 2.1.3, but that breaks too many other things.
15330 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15331 if test $ac_cv_sys_largefile_source != unknown; then
15333 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15339 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
15340 # by calling it, 2009-04-02
15341 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
15342 # The Clang compiler raises a warning for an undeclared identifier that matches
15343 # a compiler builtin function. All extant Clang versions are affected, as of
15344 # Clang 3.6.0. Test a builtin known to every version. This problem affects the
15345 # C and Objective C languages, but Clang does report an error under C++ and
15348 # Passing -fno-builtin to the compiler would suppress this problem. That
15349 # strategy would have the advantage of being insensitive to stray warnings, but
15350 # it would make tests less realistic.
15351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
15352 $as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
15353 if ${ac_cv_c_decl_report+:} false; then :
15354 $as_echo_n "(cached) " >&6
15356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15357 /* end confdefs.h. */
15367 if ac_fn_c_try_compile "$LINENO"; then :
15368 if test -s conftest.err; then :
15369 # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
15370 # valid AC_CHECK_DECL input. No library function is consistently available
15371 # on freestanding implementations, so test against a dummy declaration.
15372 # Include always-available headers on the off chance that they somehow
15374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15375 /* end confdefs.h. */
15377 #include <limits.h>
15378 #include <stdarg.h>
15379 #include <stddef.h>
15380 extern void ac_decl (int, char *);
15385 (void) ac_decl ((int) 0, (char *) 0);
15395 if ac_fn_c_try_compile "$LINENO"; then :
15396 if test -s conftest.err; then :
15397 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15398 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15399 as_fn_error $? "cannot detect from compiler exit status or warnings
15400 See \`config.log' for more details" "$LINENO" 5; }
15402 ac_cv_c_decl_report=warning
15405 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15406 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15407 as_fn_error $? "cannot compile a simple declaration test
15408 See \`config.log' for more details" "$LINENO" 5; }
15410 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15412 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15413 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15414 as_fn_error $? "compiler does not report undeclared identifiers
15415 See \`config.log' for more details" "$LINENO" 5; }
15418 ac_cv_c_decl_report=error
15420 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
15423 $as_echo "$ac_cv_c_decl_report" >&6; }
15425 case $ac_cv_c_decl_report in
15426 warning) ac_c_decl_warn_flag=yes ;;
15427 *) ac_c_decl_warn_flag= ;;
15430 if test "$PORTNAME" != "solaris"; then :
15432 for ac_func in posix_fadvise
15434 ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
15435 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
15436 cat >>confdefs.h <<_ACEOF
15437 #define HAVE_POSIX_FADVISE 1
15443 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
15445 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
15451 cat >>confdefs.h <<_ACEOF
15452 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
15458 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
15460 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
15466 cat >>confdefs.h <<_ACEOF
15467 #define HAVE_DECL_FDATASYNC $ac_have_decl
15470 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
15471 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
15477 cat >>confdefs.h <<_ACEOF
15478 #define HAVE_DECL_STRLCAT $ac_have_decl
15480 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
15481 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
15487 cat >>confdefs.h <<_ACEOF
15488 #define HAVE_DECL_STRLCPY $ac_have_decl
15490 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15491 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15497 cat >>confdefs.h <<_ACEOF
15498 #define HAVE_DECL_STRNLEN $ac_have_decl
15501 # This is probably only present on macOS, but may as well check always
15502 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
15504 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
15510 cat >>confdefs.h <<_ACEOF
15511 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
15515 ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
15517 if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
15523 cat >>confdefs.h <<_ACEOF
15524 #define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
15526 ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
15528 if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
15534 cat >>confdefs.h <<_ACEOF
15535 #define HAVE_DECL_RTLD_NOW $ac_have_decl
15539 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
15540 #include <netinet/in.h>
15542 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
15544 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
15549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
15550 $as_echo_n "checking for PS_STRINGS... " >&6; }
15551 if ${pgac_cv_var_PS_STRINGS+:} false; then :
15552 $as_echo_n "(cached) " >&6
15554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15555 /* end confdefs.h. */
15556 #include <machine/vmparam.h>
15557 #include <sys/exec.h>
15562 PS_STRINGS->ps_nargvstr = 1;
15563 PS_STRINGS->ps_argvstr = "foo";
15568 if ac_fn_c_try_link "$LINENO"; then :
15569 pgac_cv_var_PS_STRINGS=yes
15571 pgac_cv_var_PS_STRINGS=no
15573 rm -f core conftest.err conftest.$ac_objext \
15574 conftest$ac_exeext conftest.$ac_ext
15576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
15577 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
15578 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
15580 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
15585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
15586 $as_echo_n "checking for isinf... " >&6; }
15587 if ${ac_cv_func_isinf+:} false; then :
15588 $as_echo_n "(cached) " >&6
15590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15591 /* end confdefs.h. */
15594 double glob_double;
15599 return isinf(glob_double) ? 0 : 1;
15604 if ac_fn_c_try_link "$LINENO"; then :
15605 ac_cv_func_isinf=yes
15607 ac_cv_func_isinf=no
15609 rm -f core conftest.err conftest.$ac_objext \
15610 conftest$ac_exeext conftest.$ac_ext
15612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
15613 $as_echo "$ac_cv_func_isinf" >&6; }
15615 if test $ac_cv_func_isinf = yes ; then
15617 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
15620 case " $LIBOBJS " in
15621 *" isinf.$ac_objext "* ) ;;
15622 *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
15626 # Look for a way to implement a substitute for isinf()
15627 for ac_func in fpclass fp_class fp_class_d class
15629 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15630 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15631 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15632 cat >>confdefs.h <<_ACEOF
15633 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15641 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
15642 if test "x$ac_cv_func_crypt" = xyes; then :
15643 $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
15646 case " $LIBOBJS " in
15647 *" crypt.$ac_objext "* ) ;;
15648 *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
15654 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
15655 if test "x$ac_cv_func_dlopen" = xyes; then :
15656 $as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
15659 case " $LIBOBJS " in
15660 *" dlopen.$ac_objext "* ) ;;
15661 *) LIBOBJS="$LIBOBJS dlopen.$ac_objext"
15667 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
15668 if test "x$ac_cv_func_fls" = xyes; then :
15669 $as_echo "#define HAVE_FLS 1" >>confdefs.h
15672 case " $LIBOBJS " in
15673 *" fls.$ac_objext "* ) ;;
15674 *) LIBOBJS="$LIBOBJS fls.$ac_objext"
15680 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
15681 if test "x$ac_cv_func_getopt" = xyes; then :
15682 $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
15685 case " $LIBOBJS " in
15686 *" getopt.$ac_objext "* ) ;;
15687 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15693 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
15694 if test "x$ac_cv_func_getrusage" = xyes; then :
15695 $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
15698 case " $LIBOBJS " in
15699 *" getrusage.$ac_objext "* ) ;;
15700 *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
15706 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
15707 if test "x$ac_cv_func_inet_aton" = xyes; then :
15708 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
15711 case " $LIBOBJS " in
15712 *" inet_aton.$ac_objext "* ) ;;
15713 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
15719 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
15720 if test "x$ac_cv_func_mkdtemp" = xyes; then :
15721 $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
15724 case " $LIBOBJS " in
15725 *" mkdtemp.$ac_objext "* ) ;;
15726 *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
15732 ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread"
15733 if test "x$ac_cv_func_pread" = xyes; then :
15734 $as_echo "#define HAVE_PREAD 1" >>confdefs.h
15737 case " $LIBOBJS " in
15738 *" pread.$ac_objext "* ) ;;
15739 *) LIBOBJS="$LIBOBJS pread.$ac_objext"
15745 ac_fn_c_check_func "$LINENO" "pwrite" "ac_cv_func_pwrite"
15746 if test "x$ac_cv_func_pwrite" = xyes; then :
15747 $as_echo "#define HAVE_PWRITE 1" >>confdefs.h
15750 case " $LIBOBJS " in
15751 *" pwrite.$ac_objext "* ) ;;
15752 *) LIBOBJS="$LIBOBJS pwrite.$ac_objext"
15758 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
15759 if test "x$ac_cv_func_random" = xyes; then :
15760 $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
15763 case " $LIBOBJS " in
15764 *" random.$ac_objext "* ) ;;
15765 *) LIBOBJS="$LIBOBJS random.$ac_objext"
15771 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
15772 if test "x$ac_cv_func_rint" = xyes; then :
15773 $as_echo "#define HAVE_RINT 1" >>confdefs.h
15776 case " $LIBOBJS " in
15777 *" rint.$ac_objext "* ) ;;
15778 *) LIBOBJS="$LIBOBJS rint.$ac_objext"
15784 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
15785 if test "x$ac_cv_func_srandom" = xyes; then :
15786 $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
15789 case " $LIBOBJS " in
15790 *" srandom.$ac_objext "* ) ;;
15791 *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
15797 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
15798 if test "x$ac_cv_func_strlcat" = xyes; then :
15799 $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
15802 case " $LIBOBJS " in
15803 *" strlcat.$ac_objext "* ) ;;
15804 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
15810 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
15811 if test "x$ac_cv_func_strlcpy" = xyes; then :
15812 $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
15815 case " $LIBOBJS " in
15816 *" strlcpy.$ac_objext "* ) ;;
15817 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
15823 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
15824 if test "x$ac_cv_func_strnlen" = xyes; then :
15825 $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
15828 case " $LIBOBJS " in
15829 *" strnlen.$ac_objext "* ) ;;
15830 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
15840 # Windows uses a specialised env handler
15841 # and doesn't need a replacement getpeereid because it doesn't use
15845 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15848 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15850 ac_cv_func_unsetenv=yes
15851 ac_cv_func_getpeereid=yes;;
15853 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
15854 if test "x$ac_cv_func_unsetenv" = xyes; then :
15855 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15858 case " $LIBOBJS " in
15859 *" unsetenv.$ac_objext "* ) ;;
15860 *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
15866 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
15867 if test "x$ac_cv_func_getpeereid" = xyes; then :
15868 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15871 case " $LIBOBJS " in
15872 *" getpeereid.$ac_objext "* ) ;;
15873 *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
15883 # System's version of getaddrinfo(), if any, may be used only if we found
15884 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
15885 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
15886 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
15887 test "$PORTNAME" != "win32"; then
15888 ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
15889 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
15890 $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
15893 case " $LIBOBJS " in
15894 *" getaddrinfo.$ac_objext "* ) ;;
15895 *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
15903 case " $LIBOBJS " in
15904 *" getaddrinfo.$ac_objext "* ) ;;
15905 *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
15911 # Similarly, use system's getopt_long() only if system provides struct option.
15912 if test x"$ac_cv_type_struct_option" = xyes ; then
15913 ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
15914 if test "x$ac_cv_func_getopt_long" = xyes; then :
15915 $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
15918 case " $LIBOBJS " in
15919 *" getopt_long.$ac_objext "* ) ;;
15920 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15928 case " $LIBOBJS " in
15929 *" getopt_long.$ac_objext "* ) ;;
15930 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15936 # Solaris' getopt() doesn't do what we want for long options, so always use
15937 # our version on that platform.
15938 if test "$PORTNAME" = "solaris"; then
15939 case " $LIBOBJS " in
15940 *" getopt.$ac_objext "* ) ;;
15941 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15947 # mingw has adopted a GNU-centric interpretation of optind/optreset,
15948 # so always use our version on Windows.
15949 if test "$PORTNAME" = "win32"; then
15950 case " $LIBOBJS " in
15951 *" getopt.$ac_objext "* ) ;;
15952 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15956 case " $LIBOBJS " in
15957 *" getopt_long.$ac_objext "* ) ;;
15958 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15964 # Win32 (really MinGW) support
15965 if test "$PORTNAME" = "win32"; then
15966 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
15967 if test "x$ac_cv_func_gettimeofday" = xyes; then :
15968 $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
15971 case " $LIBOBJS " in
15972 *" gettimeofday.$ac_objext "* ) ;;
15973 *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
15980 case " $LIBOBJS " in
15981 *" dirmod.$ac_objext "* ) ;;
15982 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
15986 case " $LIBOBJS " in
15987 *" kill.$ac_objext "* ) ;;
15988 *) LIBOBJS="$LIBOBJS kill.$ac_objext"
15992 case " $LIBOBJS " in
15993 *" open.$ac_objext "* ) ;;
15994 *) LIBOBJS="$LIBOBJS open.$ac_objext"
15998 case " $LIBOBJS " in
15999 *" system.$ac_objext "* ) ;;
16000 *) LIBOBJS="$LIBOBJS system.$ac_objext"
16004 case " $LIBOBJS " in
16005 *" win32env.$ac_objext "* ) ;;
16006 *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
16010 case " $LIBOBJS " in
16011 *" win32error.$ac_objext "* ) ;;
16012 *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
16016 case " $LIBOBJS " in
16017 *" win32security.$ac_objext "* ) ;;
16018 *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
16022 case " $LIBOBJS " in
16023 *" win32setlocale.$ac_objext "* ) ;;
16024 *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
16029 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
16031 ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
16032 #define WIN32_LEAN_AND_MEAN
16033 #include <windows.h>
16034 #include <string.h>
16035 #include <dbghelp.h>
16037 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
16039 cat >>confdefs.h <<_ACEOF
16040 #define HAVE_MINIDUMP_TYPE 1
16043 pgac_minidump_type=yes
16045 pgac_minidump_type=no
16049 if test x"$pgac_minidump_type" = x"yes" ; then
16050 have_win32_dbghelp=yes
16053 have_win32_dbghelp=no
16057 # Cygwin needs only a bit of that
16058 if test "$PORTNAME" = "cygwin"; then
16059 case " $LIBOBJS " in
16060 *" dirmod.$ac_objext "* ) ;;
16061 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16067 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
16068 /* NetBSD declares sys_siglist in unistd.h. */
16069 #ifdef HAVE_UNISTD_H
16070 # include <unistd.h>
16074 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
16080 cat >>confdefs.h <<_ACEOF
16081 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
16085 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
16086 if test "x$ac_cv_func_syslog" = xyes; then :
16087 ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
16088 if test "x$ac_cv_header_syslog_h" = xyes; then :
16090 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
16098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
16099 $as_echo_n "checking for opterr... " >&6; }
16100 if ${pgac_cv_var_int_opterr+:} false; then :
16101 $as_echo_n "(cached) " >&6
16103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16104 /* end confdefs.h. */
16105 #include <unistd.h>
16109 extern int opterr; opterr = 1;
16114 if ac_fn_c_try_link "$LINENO"; then :
16115 pgac_cv_var_int_opterr=yes
16117 pgac_cv_var_int_opterr=no
16119 rm -f core conftest.err conftest.$ac_objext \
16120 conftest$ac_exeext conftest.$ac_ext
16122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
16123 $as_echo "$pgac_cv_var_int_opterr" >&6; }
16124 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
16126 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
16130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
16131 $as_echo_n "checking for optreset... " >&6; }
16132 if ${pgac_cv_var_int_optreset+:} false; then :
16133 $as_echo_n "(cached) " >&6
16135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16136 /* end confdefs.h. */
16137 #include <unistd.h>
16141 extern int optreset; optreset = 1;
16146 if ac_fn_c_try_link "$LINENO"; then :
16147 pgac_cv_var_int_optreset=yes
16149 pgac_cv_var_int_optreset=no
16151 rm -f core conftest.err conftest.$ac_objext \
16152 conftest$ac_exeext conftest.$ac_ext
16154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
16155 $as_echo "$pgac_cv_var_int_optreset" >&6; }
16156 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
16158 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
16162 for ac_func in strtoll __strtoll strtoq
16164 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16165 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16166 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16167 cat >>confdefs.h <<_ACEOF
16168 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16174 for ac_func in strtoull __strtoull strtouq
16176 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16177 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16178 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16179 cat >>confdefs.h <<_ACEOF
16180 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16186 # strto[u]ll may exist but not be declared
16187 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
16188 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
16194 cat >>confdefs.h <<_ACEOF
16195 #define HAVE_DECL_STRTOLL $ac_have_decl
16197 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
16198 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
16204 cat >>confdefs.h <<_ACEOF
16205 #define HAVE_DECL_STRTOULL $ac_have_decl
16209 if test "$with_icu" = yes; then
16210 ac_save_CPPFLAGS=$CPPFLAGS
16211 CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16213 # Verify we have ICU's header files
16214 ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16215 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16218 as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16223 CPPFLAGS=$ac_save_CPPFLAGS
16226 if test "$with_llvm" = yes; then
16228 # Check which functionality is present
16229 SAVE_CPPFLAGS="$CPPFLAGS"
16230 CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
16231 ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
16233 if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
16239 cat >>confdefs.h <<_ACEOF
16240 #define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
16243 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
16245 if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
16251 cat >>confdefs.h <<_ACEOF
16252 #define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
16254 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUFeatures" "ac_cv_have_decl_LLVMGetHostCPUFeatures" "#include <llvm-c/TargetMachine.h>
16256 if test "x$ac_cv_have_decl_LLVMGetHostCPUFeatures" = xyes; then :
16262 cat >>confdefs.h <<_ACEOF
16263 #define HAVE_DECL_LLVMGETHOSTCPUFEATURES $ac_have_decl
16266 ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
16268 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
16274 cat >>confdefs.h <<_ACEOF
16275 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
16277 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
16279 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
16285 cat >>confdefs.h <<_ACEOF
16286 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
16289 CPPFLAGS="$SAVE_CPPFLAGS"
16293 # Lastly, restore full LIBS list and check for readline/libedit symbols
16294 LIBS="$LIBS_including_readline"
16296 if test "$with_readline" = yes; then
16297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
16298 $as_echo_n "checking for rl_completion_append_character... " >&6; }
16299 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
16300 $as_echo_n "(cached) " >&6
16302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16303 /* end confdefs.h. */
16305 #ifdef HAVE_READLINE_READLINE_H
16306 # include <readline/readline.h>
16307 #elif defined(HAVE_READLINE_H)
16308 # include <readline.h>
16314 rl_completion_append_character = 'x';
16319 if ac_fn_c_try_link "$LINENO"; then :
16320 pgac_cv_var_rl_completion_append_character=yes
16322 pgac_cv_var_rl_completion_append_character=no
16324 rm -f core conftest.err conftest.$ac_objext \
16325 conftest$ac_exeext conftest.$ac_ext
16327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
16328 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
16329 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
16331 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
16334 for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
16336 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16337 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16338 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16339 cat >>confdefs.h <<_ACEOF
16340 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16346 for ac_func in append_history history_truncate_file
16348 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16349 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16350 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16351 cat >>confdefs.h <<_ACEOF
16352 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16361 # This test makes sure that run tests work at all. Sometimes a shared
16362 # library is found by the linker, but the runtime linker can't find it.
16363 # This check should come after all modifications of compiler or linker
16364 # variables, and before any other run tests.
16365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16366 $as_echo_n "checking test program... " >&6; }
16367 if test "$cross_compiling" = yes; then :
16368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16369 $as_echo "cross-compiling" >&6; }
16371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16372 /* end confdefs.h. */
16373 int main() { return 0; }
16375 if ac_fn_c_try_run "$LINENO"; then :
16376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16377 $as_echo "ok" >&6; }
16379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16380 $as_echo "failed" >&6; }
16382 Could not execute a simple test program. This may be a problem
16383 related to locating shared libraries. Check the file 'config.log'
16384 for the exact reason." "$LINENO" 5
16386 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16387 conftest.$ac_objext conftest.beam conftest.$ac_ext
16391 # --------------------
16392 # Run tests below here
16393 # --------------------
16396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16397 $as_echo_n "checking whether long int is 64 bits... " >&6; }
16398 if ${pgac_cv_type_long_int_64+:} false; then :
16399 $as_echo_n "(cached) " >&6
16401 if test "$cross_compiling" = yes; then :
16402 # If cross-compiling, check the size reported by the compiler and
16403 # trust that the arithmetic works.
16404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16405 /* end confdefs.h. */
16410 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16411 test_array [0] = 0;
16412 return test_array [0];
16418 if ac_fn_c_try_compile "$LINENO"; then :
16419 pgac_cv_type_long_int_64=yes
16421 pgac_cv_type_long_int_64=no
16423 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16426 /* end confdefs.h. */
16427 typedef long int ac_int64;
16430 * These are globals to discourage the compiler from folding all the
16431 * arithmetic tests down to compile-time constants.
16433 ac_int64 a = 20000001;
16434 ac_int64 b = 40000005;
16436 int does_int64_work()
16440 if (sizeof(ac_int64) != 8)
16441 return 0; /* definitely not the right size */
16443 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16453 return (! does_int64_work());
16456 if ac_fn_c_try_run "$LINENO"; then :
16457 pgac_cv_type_long_int_64=yes
16459 pgac_cv_type_long_int_64=no
16461 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16462 conftest.$ac_objext conftest.beam conftest.$ac_ext
16466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
16467 $as_echo "$pgac_cv_type_long_int_64" >&6; }
16469 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
16470 if test x"$pgac_cv_type_long_int_64" = xyes ; then
16472 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
16477 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
16478 pg_int64_type="long int"
16480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
16481 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
16482 if ${pgac_cv_type_long_long_int_64+:} false; then :
16483 $as_echo_n "(cached) " >&6
16485 if test "$cross_compiling" = yes; then :
16486 # If cross-compiling, check the size reported by the compiler and
16487 # trust that the arithmetic works.
16488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16489 /* end confdefs.h. */
16494 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
16495 test_array [0] = 0;
16496 return test_array [0];
16502 if ac_fn_c_try_compile "$LINENO"; then :
16503 pgac_cv_type_long_long_int_64=yes
16505 pgac_cv_type_long_long_int_64=no
16507 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16510 /* end confdefs.h. */
16511 typedef long long int ac_int64;
16514 * These are globals to discourage the compiler from folding all the
16515 * arithmetic tests down to compile-time constants.
16517 ac_int64 a = 20000001;
16518 ac_int64 b = 40000005;
16520 int does_int64_work()
16524 if (sizeof(ac_int64) != 8)
16525 return 0; /* definitely not the right size */
16527 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16537 return (! does_int64_work());
16540 if ac_fn_c_try_run "$LINENO"; then :
16541 pgac_cv_type_long_long_int_64=yes
16543 pgac_cv_type_long_long_int_64=no
16545 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16546 conftest.$ac_objext conftest.beam conftest.$ac_ext
16550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
16551 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
16553 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
16554 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
16556 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
16560 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16561 pg_int64_type="long long int"
16563 as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
16568 cat >>confdefs.h <<_ACEOF
16569 #define PG_INT64_TYPE $pg_int64_type
16573 # Select the printf length modifier that goes with that, too.
16574 if test x"$pg_int64_type" = x"long long int" ; then
16575 INT64_MODIFIER='"ll"'
16577 INT64_MODIFIER='"l"'
16581 cat >>confdefs.h <<_ACEOF
16582 #define INT64_MODIFIER $INT64_MODIFIER
16586 # has to be down here, rather than with the other builtins, because
16587 # the test uses PG_INT64_TYPE.
16588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
16589 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
16590 if ${pgac_cv__builtin_op_overflow+:} false; then :
16591 $as_echo_n "(cached) " >&6
16593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16594 /* end confdefs.h. */
16596 PG_INT64_TYPE a = 1;
16597 PG_INT64_TYPE b = 1;
16598 PG_INT64_TYPE result;
16604 oflo = __builtin_mul_overflow(a, b, &result);
16609 if ac_fn_c_try_link "$LINENO"; then :
16610 pgac_cv__builtin_op_overflow=yes
16612 pgac_cv__builtin_op_overflow=no
16614 rm -f core conftest.err conftest.$ac_objext \
16615 conftest$ac_exeext conftest.$ac_ext
16617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
16618 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
16619 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
16621 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
16625 # Check size of void *, size_t (enables tweaks for > 32bit address space)
16626 # The cast to long int works around a bug in the HP C Compiler
16627 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16628 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16629 # This bug is HP SR number 8606223364.
16630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
16631 $as_echo_n "checking size of void *... " >&6; }
16632 if ${ac_cv_sizeof_void_p+:} false; then :
16633 $as_echo_n "(cached) " >&6
16635 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
16638 if test "$ac_cv_type_void_p" = yes; then
16639 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16640 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16641 as_fn_error 77 "cannot compute sizeof (void *)
16642 See \`config.log' for more details" "$LINENO" 5; }
16644 ac_cv_sizeof_void_p=0
16649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
16650 $as_echo "$ac_cv_sizeof_void_p" >&6; }
16654 cat >>confdefs.h <<_ACEOF
16655 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
16659 # The cast to long int works around a bug in the HP C Compiler
16660 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16661 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16662 # This bug is HP SR number 8606223364.
16663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
16664 $as_echo_n "checking size of size_t... " >&6; }
16665 if ${ac_cv_sizeof_size_t+:} false; then :
16666 $as_echo_n "(cached) " >&6
16668 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
16671 if test "$ac_cv_type_size_t" = yes; then
16672 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16673 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16674 as_fn_error 77 "cannot compute sizeof (size_t)
16675 See \`config.log' for more details" "$LINENO" 5; }
16677 ac_cv_sizeof_size_t=0
16682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
16683 $as_echo "$ac_cv_sizeof_size_t" >&6; }
16687 cat >>confdefs.h <<_ACEOF
16688 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
16692 # The cast to long int works around a bug in the HP C Compiler
16693 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16694 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16695 # This bug is HP SR number 8606223364.
16696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
16697 $as_echo_n "checking size of long... " >&6; }
16698 if ${ac_cv_sizeof_long+:} false; then :
16699 $as_echo_n "(cached) " >&6
16701 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
16704 if test "$ac_cv_type_long" = yes; then
16705 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16706 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16707 as_fn_error 77 "cannot compute sizeof (long)
16708 See \`config.log' for more details" "$LINENO" 5; }
16710 ac_cv_sizeof_long=0
16715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
16716 $as_echo "$ac_cv_sizeof_long" >&6; }
16720 cat >>confdefs.h <<_ACEOF
16721 #define SIZEOF_LONG $ac_cv_sizeof_long
16726 # Decide whether float4 is passed by value: user-selectable, enabled by default
16727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
16728 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
16731 # Check whether --enable-float4-byval was given.
16732 if test "${enable_float4_byval+set}" = set; then :
16733 enableval=$enable_float4_byval;
16737 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16739 float4passbyval=true
16742 float4passbyval=false
16745 as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
16750 enable_float4_byval=yes
16752 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16754 float4passbyval=true
16758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
16759 $as_echo "$enable_float4_byval" >&6; }
16761 cat >>confdefs.h <<_ACEOF
16762 #define FLOAT4PASSBYVAL $float4passbyval
16766 # Decide whether float8 is passed by value.
16767 # Note: this setting also controls int8 and related types such as timestamp.
16768 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
16769 # If not, trying to select it is an error.
16770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
16771 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
16772 if test $ac_cv_sizeof_void_p -ge 8 ; then
16775 # Check whether --enable-float8-byval was given.
16776 if test "${enable_float8_byval+set}" = set; then :
16777 enableval=$enable_float8_byval;
16786 as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16791 enable_float8_byval=yes
16799 # Check whether --enable-float8-byval was given.
16800 if test "${enable_float8_byval+set}" = set; then :
16801 enableval=$enable_float8_byval;
16810 as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16815 enable_float8_byval=no
16820 if test "$enable_float8_byval" = yes ; then
16821 as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
16824 if test "$enable_float8_byval" = yes ; then
16826 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
16828 float8passbyval=true
16830 float8passbyval=false
16832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
16833 $as_echo "$enable_float8_byval" >&6; }
16835 cat >>confdefs.h <<_ACEOF
16836 #define FLOAT8PASSBYVAL $float8passbyval
16840 # Determine memory alignment requirements for the basic C data types.
16842 # The cast to long int works around a bug in the HP C Compiler,
16843 # see AC_CHECK_SIZEOF for more information.
16844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
16845 $as_echo_n "checking alignment of short... " >&6; }
16846 if ${ac_cv_alignof_short+:} false; then :
16847 $as_echo_n "(cached) " >&6
16849 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short" "$ac_includes_default
16851 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16853 typedef struct { char x; short y; } ac__type_alignof_;"; then :
16856 if test "$ac_cv_type_short" = yes; then
16857 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16858 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16859 as_fn_error 77 "cannot compute alignment of short
16860 See \`config.log' for more details" "$LINENO" 5; }
16862 ac_cv_alignof_short=0
16867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
16868 $as_echo "$ac_cv_alignof_short" >&6; }
16872 cat >>confdefs.h <<_ACEOF
16873 #define ALIGNOF_SHORT $ac_cv_alignof_short
16877 # The cast to long int works around a bug in the HP C Compiler,
16878 # see AC_CHECK_SIZEOF for more information.
16879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
16880 $as_echo_n "checking alignment of int... " >&6; }
16881 if ${ac_cv_alignof_int+:} false; then :
16882 $as_echo_n "(cached) " >&6
16884 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int" "$ac_includes_default
16886 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16888 typedef struct { char x; int y; } ac__type_alignof_;"; then :
16891 if test "$ac_cv_type_int" = yes; then
16892 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16893 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16894 as_fn_error 77 "cannot compute alignment of int
16895 See \`config.log' for more details" "$LINENO" 5; }
16897 ac_cv_alignof_int=0
16902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
16903 $as_echo "$ac_cv_alignof_int" >&6; }
16907 cat >>confdefs.h <<_ACEOF
16908 #define ALIGNOF_INT $ac_cv_alignof_int
16912 # The cast to long int works around a bug in the HP C Compiler,
16913 # see AC_CHECK_SIZEOF for more information.
16914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
16915 $as_echo_n "checking alignment of long... " >&6; }
16916 if ${ac_cv_alignof_long+:} false; then :
16917 $as_echo_n "(cached) " >&6
16919 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
16921 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16923 typedef struct { char x; long y; } ac__type_alignof_;"; then :
16926 if test "$ac_cv_type_long" = yes; then
16927 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16928 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16929 as_fn_error 77 "cannot compute alignment of long
16930 See \`config.log' for more details" "$LINENO" 5; }
16932 ac_cv_alignof_long=0
16937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
16938 $as_echo "$ac_cv_alignof_long" >&6; }
16942 cat >>confdefs.h <<_ACEOF
16943 #define ALIGNOF_LONG $ac_cv_alignof_long
16947 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16948 # The cast to long int works around a bug in the HP C Compiler,
16949 # see AC_CHECK_SIZEOF for more information.
16950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
16951 $as_echo_n "checking alignment of long long int... " >&6; }
16952 if ${ac_cv_alignof_long_long_int+:} false; then :
16953 $as_echo_n "(cached) " >&6
16955 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int" "$ac_includes_default
16957 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16959 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
16962 if test "$ac_cv_type_long_long_int" = yes; then
16963 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16964 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16965 as_fn_error 77 "cannot compute alignment of long long int
16966 See \`config.log' for more details" "$LINENO" 5; }
16968 ac_cv_alignof_long_long_int=0
16973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
16974 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
16978 cat >>confdefs.h <<_ACEOF
16979 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
16984 # The cast to long int works around a bug in the HP C Compiler,
16985 # see AC_CHECK_SIZEOF for more information.
16986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
16987 $as_echo_n "checking alignment of double... " >&6; }
16988 if ${ac_cv_alignof_double+:} false; then :
16989 $as_echo_n "(cached) " >&6
16991 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double" "$ac_includes_default
16993 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16995 typedef struct { char x; double y; } ac__type_alignof_;"; then :
16998 if test "$ac_cv_type_double" = yes; then
16999 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17000 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17001 as_fn_error 77 "cannot compute alignment of double
17002 See \`config.log' for more details" "$LINENO" 5; }
17004 ac_cv_alignof_double=0
17009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
17010 $as_echo "$ac_cv_alignof_double" >&6; }
17014 cat >>confdefs.h <<_ACEOF
17015 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
17020 # Compute maximum alignment of any basic type.
17021 # We assume long's alignment is at least as strong as char, short, or int;
17022 # but we must check long long (if it is being used for int64) and double.
17023 # Note that we intentionally do not consider any types wider than 64 bits,
17024 # as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
17025 # for disk and memory space.
17027 MAX_ALIGNOF=$ac_cv_alignof_long
17028 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
17029 MAX_ALIGNOF=$ac_cv_alignof_double
17031 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
17032 MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
17035 cat >>confdefs.h <<_ACEOF
17036 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
17041 # Some platforms predefine the types int8, int16, etc. Only check
17042 # a (hopefully) representative subset.
17043 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
17045 if test "x$ac_cv_type_int8" = xyes; then :
17047 cat >>confdefs.h <<_ACEOF
17048 #define HAVE_INT8 1
17053 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
17055 if test "x$ac_cv_type_uint8" = xyes; then :
17057 cat >>confdefs.h <<_ACEOF
17058 #define HAVE_UINT8 1
17063 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
17065 if test "x$ac_cv_type_int64" = xyes; then :
17067 cat >>confdefs.h <<_ACEOF
17068 #define HAVE_INT64 1
17073 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
17075 if test "x$ac_cv_type_uint64" = xyes; then :
17077 cat >>confdefs.h <<_ACEOF
17078 #define HAVE_UINT64 1
17085 # Some compilers offer a 128-bit integer scalar type.
17086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
17087 $as_echo_n "checking for __int128... " >&6; }
17088 if ${pgac_cv__128bit_int+:} false; then :
17089 $as_echo_n "(cached) " >&6
17091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17092 /* end confdefs.h. */
17095 * We don't actually run this test, just link it to verify that any support
17096 * functions needed for __int128 are present.
17098 * These are globals to discourage the compiler from folding all the
17099 * arithmetic tests down to compile-time constants. We do not have
17100 * convenient support for 128bit literals at this point...
17102 __int128 a = 48828125;
17103 __int128 b = 97656250;
17110 a = (a << 12) + 1; /* 200000000001 */
17111 b = (b << 12) + 5; /* 400000000005 */
17112 /* try the most relevant arithmetic ops */
17115 /* must use the results, else compiler may optimize arithmetic away */
17123 if ac_fn_c_try_link "$LINENO"; then :
17124 pgac_cv__128bit_int=yes
17126 pgac_cv__128bit_int=no
17128 rm -f core conftest.err conftest.$ac_objext \
17129 conftest$ac_exeext conftest.$ac_ext
17131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
17132 $as_echo "$pgac_cv__128bit_int" >&6; }
17133 if test x"$pgac_cv__128bit_int" = xyes ; then
17134 # Use of non-default alignment with __int128 tickles bugs in some compilers.
17135 # If not cross-compiling, we can test for bugs and disable use of __int128
17136 # with buggy compilers. If cross-compiling, hope for the best.
17137 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
17138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
17139 $as_echo_n "checking for __int128 alignment bug... " >&6; }
17140 if ${pgac_cv__128bit_int_bug+:} false; then :
17141 $as_echo_n "(cached) " >&6
17143 if test "$cross_compiling" = yes; then :
17144 pgac_cv__128bit_int_bug="assuming ok"
17146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17147 /* end confdefs.h. */
17149 /* This must match the corresponding code in c.h: */
17150 #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
17151 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
17153 typedef __int128 int128a
17154 #if defined(pg_attribute_aligned)
17155 pg_attribute_aligned(8)
17159 void pass_by_val(void *buffer, int128a par) { holder = par; }
17165 long int i64 = 97656225L << 12;
17167 pass_by_val(main, (int128a) i64);
17176 if ac_fn_c_try_run "$LINENO"; then :
17177 pgac_cv__128bit_int_bug=ok
17179 pgac_cv__128bit_int_bug=broken
17181 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17182 conftest.$ac_objext conftest.beam conftest.$ac_ext
17186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
17187 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
17188 if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
17190 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
17192 # The cast to long int works around a bug in the HP C Compiler,
17193 # see AC_CHECK_SIZEOF for more information.
17194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
17195 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
17196 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
17197 $as_echo_n "(cached) " >&6
17199 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE" "$ac_includes_default
17201 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17203 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
17206 if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
17207 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17208 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17209 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
17210 See \`config.log' for more details" "$LINENO" 5; }
17212 ac_cv_alignof_PG_INT128_TYPE=0
17217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
17218 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
17222 cat >>confdefs.h <<_ACEOF
17223 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
17230 # Check for various atomic operations now that we have checked how to declare
17232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
17233 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
17234 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
17235 $as_echo_n "(cached) " >&6
17237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17238 /* end confdefs.h. */
17244 __sync_lock_test_and_set(&lock, 1);
17245 __sync_lock_release(&lock);
17250 if ac_fn_c_try_link "$LINENO"; then :
17251 pgac_cv_gcc_sync_char_tas="yes"
17253 pgac_cv_gcc_sync_char_tas="no"
17255 rm -f core conftest.err conftest.$ac_objext \
17256 conftest$ac_exeext conftest.$ac_ext
17258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
17259 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
17260 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
17262 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
17265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
17266 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
17267 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
17268 $as_echo_n "(cached) " >&6
17270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17271 /* end confdefs.h. */
17277 __sync_lock_test_and_set(&lock, 1);
17278 __sync_lock_release(&lock);
17283 if ac_fn_c_try_link "$LINENO"; then :
17284 pgac_cv_gcc_sync_int32_tas="yes"
17286 pgac_cv_gcc_sync_int32_tas="no"
17288 rm -f core conftest.err conftest.$ac_objext \
17289 conftest$ac_exeext conftest.$ac_ext
17291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
17292 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
17293 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
17295 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
17298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17299 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17300 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17301 $as_echo_n "(cached) " >&6
17303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17304 /* end confdefs.h. */
17310 __sync_val_compare_and_swap(&val, 0, 37);
17315 if ac_fn_c_try_link "$LINENO"; then :
17316 pgac_cv_gcc_sync_int32_cas="yes"
17318 pgac_cv_gcc_sync_int32_cas="no"
17320 rm -f core conftest.err conftest.$ac_objext \
17321 conftest$ac_exeext conftest.$ac_ext
17323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17324 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17325 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17327 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17331 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17332 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17333 $as_echo_n "(cached) " >&6
17335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17336 /* end confdefs.h. */
17341 PG_INT64_TYPE lock = 0;
17342 __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17347 if ac_fn_c_try_link "$LINENO"; then :
17348 pgac_cv_gcc_sync_int64_cas="yes"
17350 pgac_cv_gcc_sync_int64_cas="no"
17352 rm -f core conftest.err conftest.$ac_objext \
17353 conftest$ac_exeext conftest.$ac_ext
17355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17356 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17357 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17359 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17363 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17364 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17365 $as_echo_n "(cached) " >&6
17367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17368 /* end confdefs.h. */
17375 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17380 if ac_fn_c_try_link "$LINENO"; then :
17381 pgac_cv_gcc_atomic_int32_cas="yes"
17383 pgac_cv_gcc_atomic_int32_cas="no"
17385 rm -f core conftest.err conftest.$ac_objext \
17386 conftest$ac_exeext conftest.$ac_ext
17388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17389 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17390 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17392 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17396 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17397 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17398 $as_echo_n "(cached) " >&6
17400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17401 /* end confdefs.h. */
17406 PG_INT64_TYPE val = 0;
17407 PG_INT64_TYPE expect = 0;
17408 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17413 if ac_fn_c_try_link "$LINENO"; then :
17414 pgac_cv_gcc_atomic_int64_cas="yes"
17416 pgac_cv_gcc_atomic_int64_cas="no"
17418 rm -f core conftest.err conftest.$ac_objext \
17419 conftest$ac_exeext conftest.$ac_ext
17421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17422 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17423 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17425 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17430 # Check for x86 cpuid instruction
17431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17432 $as_echo_n "checking for __get_cpuid... " >&6; }
17433 if ${pgac_cv__get_cpuid+:} false; then :
17434 $as_echo_n "(cached) " >&6
17436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17437 /* end confdefs.h. */
17442 unsigned int exx[4] = {0, 0, 0, 0};
17443 __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17449 if ac_fn_c_try_link "$LINENO"; then :
17450 pgac_cv__get_cpuid="yes"
17452 pgac_cv__get_cpuid="no"
17454 rm -f core conftest.err conftest.$ac_objext \
17455 conftest$ac_exeext conftest.$ac_ext
17457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17458 $as_echo "$pgac_cv__get_cpuid" >&6; }
17459 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17461 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17466 $as_echo_n "checking for __cpuid... " >&6; }
17467 if ${pgac_cv__cpuid+:} false; then :
17468 $as_echo_n "(cached) " >&6
17470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17471 /* end confdefs.h. */
17472 #include <intrin.h>
17476 unsigned int exx[4] = {0, 0, 0, 0};
17477 __get_cpuid(exx[0], 1);
17483 if ac_fn_c_try_link "$LINENO"; then :
17484 pgac_cv__cpuid="yes"
17486 pgac_cv__cpuid="no"
17488 rm -f core conftest.err conftest.$ac_objext \
17489 conftest$ac_exeext conftest.$ac_ext
17491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17492 $as_echo "$pgac_cv__cpuid" >&6; }
17493 if test x"$pgac_cv__cpuid" = x"yes"; then
17495 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17499 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17501 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17502 # with the default compiler flags. If not, check if adding the -msse4.2
17503 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
17504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17505 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17506 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17507 $as_echo_n "(cached) " >&6
17509 pgac_save_CFLAGS=$CFLAGS
17510 CFLAGS="$pgac_save_CFLAGS "
17511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17512 /* end confdefs.h. */
17513 #include <nmmintrin.h>
17517 unsigned int crc = 0;
17518 crc = _mm_crc32_u8(crc, 0);
17519 crc = _mm_crc32_u32(crc, 0);
17520 /* return computed value, to prevent the above being optimized away */
17526 if ac_fn_c_try_link "$LINENO"; then :
17527 pgac_cv_sse42_crc32_intrinsics_=yes
17529 pgac_cv_sse42_crc32_intrinsics_=no
17531 rm -f core conftest.err conftest.$ac_objext \
17532 conftest$ac_exeext conftest.$ac_ext
17533 CFLAGS="$pgac_save_CFLAGS"
17535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
17536 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
17537 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
17539 pgac_sse42_crc32_intrinsics=yes
17542 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
17543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
17544 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
17545 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
17546 $as_echo_n "(cached) " >&6
17548 pgac_save_CFLAGS=$CFLAGS
17549 CFLAGS="$pgac_save_CFLAGS -msse4.2"
17550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17551 /* end confdefs.h. */
17552 #include <nmmintrin.h>
17556 unsigned int crc = 0;
17557 crc = _mm_crc32_u8(crc, 0);
17558 crc = _mm_crc32_u32(crc, 0);
17559 /* return computed value, to prevent the above being optimized away */
17565 if ac_fn_c_try_link "$LINENO"; then :
17566 pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
17568 pgac_cv_sse42_crc32_intrinsics__msse4_2=no
17570 rm -f core conftest.err conftest.$ac_objext \
17571 conftest$ac_exeext conftest.$ac_ext
17572 CFLAGS="$pgac_save_CFLAGS"
17574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
17575 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
17576 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
17577 CFLAGS_SSE42="-msse4.2"
17578 pgac_sse42_crc32_intrinsics=yes
17584 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
17585 # define __SSE4_2__ in that case.
17586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17587 /* end confdefs.h. */
17594 #error __SSE4_2__ not defined
17601 if ac_fn_c_try_compile "$LINENO"; then :
17604 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17606 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
17608 # First check if __crc32c* intrinsics can be used with the default compiler
17609 # flags. If not, check if adding -march=armv8-a+crc flag helps.
17610 # CFLAGS_ARMV8_CRC32C is set if the extra flag is required.
17611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
17612 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
17613 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
17614 $as_echo_n "(cached) " >&6
17616 pgac_save_CFLAGS=$CFLAGS
17617 CFLAGS="$pgac_save_CFLAGS "
17618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17619 /* end confdefs.h. */
17620 #include <arm_acle.h>
17624 unsigned int crc = 0;
17625 crc = __crc32cb(crc, 0);
17626 crc = __crc32ch(crc, 0);
17627 crc = __crc32cw(crc, 0);
17628 crc = __crc32cd(crc, 0);
17629 /* return computed value, to prevent the above being optimized away */
17635 if ac_fn_c_try_link "$LINENO"; then :
17636 pgac_cv_armv8_crc32c_intrinsics_=yes
17638 pgac_cv_armv8_crc32c_intrinsics_=no
17640 rm -f core conftest.err conftest.$ac_objext \
17641 conftest$ac_exeext conftest.$ac_ext
17642 CFLAGS="$pgac_save_CFLAGS"
17644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
17645 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
17646 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
17647 CFLAGS_ARMV8_CRC32C=""
17648 pgac_armv8_crc32c_intrinsics=yes
17651 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
17652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
17653 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
17654 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
17655 $as_echo_n "(cached) " >&6
17657 pgac_save_CFLAGS=$CFLAGS
17658 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
17659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17660 /* end confdefs.h. */
17661 #include <arm_acle.h>
17665 unsigned int crc = 0;
17666 crc = __crc32cb(crc, 0);
17667 crc = __crc32ch(crc, 0);
17668 crc = __crc32cw(crc, 0);
17669 crc = __crc32cd(crc, 0);
17670 /* return computed value, to prevent the above being optimized away */
17676 if ac_fn_c_try_link "$LINENO"; then :
17677 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
17679 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
17681 rm -f core conftest.err conftest.$ac_objext \
17682 conftest$ac_exeext conftest.$ac_ext
17683 CFLAGS="$pgac_save_CFLAGS"
17685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
17686 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
17687 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
17688 CFLAGS_ARMV8_CRC32C="-march=armv8-a+crc"
17689 pgac_armv8_crc32c_intrinsics=yes
17695 # Select CRC-32C implementation.
17697 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
17698 # use the special CRC instructions for calculating CRC-32C. If we're not
17699 # targeting such a processor, but we can nevertheless produce code that uses
17700 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
17701 # implementations and select which one to use at runtime, depending on whether
17702 # SSE 4.2 is supported by the processor we're running on.
17704 # Similarly, if we are targeting an ARM processor that has the CRC
17705 # instructions that are part of the ARMv8 CRC Extension, use them. And if
17706 # we're not targeting such a processor, but can nevertheless produce code that
17707 # uses the CRC instructions, compile both, and select at runtime.
17709 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
17710 # in the template or configure command line.
17711 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
17712 # Use Intel SSE 4.2 if available.
17713 if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
17716 # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
17717 # the runtime check.
17718 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
17719 USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
17721 # Use ARM CRC Extension if available.
17722 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_ARMV8_CRC32C" = x""; then
17725 # ARM CRC Extension, with runtime check?
17726 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
17727 USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
17729 # fall back to slicing-by-8 algorithm, which doesn't require any
17730 # special CPU support.
17731 USE_SLICING_BY_8_CRC32C=1
17738 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
17739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
17740 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
17741 if test x"$USE_SSE42_CRC32C" = x"1"; then
17743 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
17745 PG_CRC32C_OBJS="pg_crc32c_sse42.o"
17746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
17747 $as_echo "SSE 4.2" >&6; }
17749 if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17751 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17753 PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
17754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
17755 $as_echo "SSE 4.2 with runtime check" >&6; }
17757 if test x"$USE_ARMV8_CRC32C" = x"1"; then
17759 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
17761 PG_CRC32C_OBJS="pg_crc32c_armv8.o"
17762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
17763 $as_echo "ARMv8 CRC instructions" >&6; }
17765 if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17767 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17769 PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
17770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
17771 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
17774 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
17776 PG_CRC32C_OBJS="pg_crc32c_sb8.o"
17777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
17778 $as_echo "slicing-by-8" >&6; }
17786 # Select semaphore implementation type.
17787 if test "$PORTNAME" != "win32"; then
17788 if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
17789 # Need sem_open for this
17790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
17791 $as_echo_n "checking for library containing sem_open... " >&6; }
17792 if ${ac_cv_search_sem_open+:} false; then :
17793 $as_echo_n "(cached) " >&6
17795 ac_func_search_save_LIBS=$LIBS
17796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17797 /* end confdefs.h. */
17799 /* Override any GCC internal prototype to avoid an error.
17800 Use char because int might match the return type of a GCC
17801 builtin and then its argument prototype would still apply. */
17809 return sem_open ();
17814 for ac_lib in '' rt pthread; do
17815 if test -z "$ac_lib"; then
17816 ac_res="none required"
17819 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17821 if ac_fn_c_try_link "$LINENO"; then :
17822 ac_cv_search_sem_open=$ac_res
17824 rm -f core conftest.err conftest.$ac_objext \
17826 if ${ac_cv_search_sem_open+:} false; then :
17830 if ${ac_cv_search_sem_open+:} false; then :
17833 ac_cv_search_sem_open=no
17835 rm conftest.$ac_ext
17836 LIBS=$ac_func_search_save_LIBS
17838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
17839 $as_echo "$ac_cv_search_sem_open" >&6; }
17840 ac_res=$ac_cv_search_sem_open
17841 if test "$ac_res" != no; then :
17842 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17843 USE_NAMED_POSIX_SEMAPHORES=1
17847 if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
17848 # Need sem_init for this
17849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
17850 $as_echo_n "checking for library containing sem_init... " >&6; }
17851 if ${ac_cv_search_sem_init+:} false; then :
17852 $as_echo_n "(cached) " >&6
17854 ac_func_search_save_LIBS=$LIBS
17855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17856 /* end confdefs.h. */
17858 /* Override any GCC internal prototype to avoid an error.
17859 Use char because int might match the return type of a GCC
17860 builtin and then its argument prototype would still apply. */
17868 return sem_init ();
17873 for ac_lib in '' rt pthread; do
17874 if test -z "$ac_lib"; then
17875 ac_res="none required"
17878 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17880 if ac_fn_c_try_link "$LINENO"; then :
17881 ac_cv_search_sem_init=$ac_res
17883 rm -f core conftest.err conftest.$ac_objext \
17885 if ${ac_cv_search_sem_init+:} false; then :
17889 if ${ac_cv_search_sem_init+:} false; then :
17892 ac_cv_search_sem_init=no
17894 rm conftest.$ac_ext
17895 LIBS=$ac_func_search_save_LIBS
17897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
17898 $as_echo "$ac_cv_search_sem_init" >&6; }
17899 ac_res=$ac_cv_search_sem_init
17900 if test "$ac_res" != no; then :
17901 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17902 USE_UNNAMED_POSIX_SEMAPHORES=1
17906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
17907 $as_echo_n "checking which semaphore API to use... " >&6; }
17908 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
17910 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17912 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17913 sematype="named POSIX"
17915 if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
17917 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17919 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17920 sematype="unnamed POSIX"
17923 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
17925 SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
17926 sematype="System V"
17929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
17930 $as_echo "$sematype" >&6; }
17933 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
17935 SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
17939 # Select shared-memory implementation type.
17940 if test "$PORTNAME" != "win32"; then
17942 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
17944 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
17947 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
17949 SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
17952 # Select random number source
17954 # You can override this logic by setting the appropriate USE_*RANDOM flag to 1
17955 # in the template or configure command line.
17957 # If not selected manually, try to select a source automatically.
17958 if test "$enable_strong_random" = "yes" && test x"$USE_OPENSSL_RANDOM" = x"" && test x"$USE_WIN32_RANDOM" = x"" && test x"$USE_DEV_URANDOM" = x"" ; then
17959 if test x"$with_openssl" = x"yes" ; then
17960 USE_OPENSSL_RANDOM=1
17961 elif test "$PORTNAME" = "win32" ; then
17964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
17965 $as_echo_n "checking for /dev/urandom... " >&6; }
17966 if ${ac_cv_file__dev_urandom+:} false; then :
17967 $as_echo_n "(cached) " >&6
17969 test "$cross_compiling" = yes &&
17970 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
17971 if test -r "/dev/urandom"; then
17972 ac_cv_file__dev_urandom=yes
17974 ac_cv_file__dev_urandom=no
17977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
17978 $as_echo "$ac_cv_file__dev_urandom" >&6; }
17979 if test "x$ac_cv_file__dev_urandom" = xyes; then :
17984 if test x"$ac_cv_file__dev_urandom" = x"yes" ; then
17990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
17991 $as_echo_n "checking which random number source to use... " >&6; }
17992 if test "$enable_strong_random" = yes ; then
17993 if test x"$USE_OPENSSL_RANDOM" = x"1" ; then
17995 $as_echo "#define USE_OPENSSL_RANDOM 1" >>confdefs.h
17997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
17998 $as_echo "OpenSSL" >&6; }
17999 elif test x"$USE_WIN32_RANDOM" = x"1" ; then
18001 $as_echo "#define USE_WIN32_RANDOM 1" >>confdefs.h
18003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
18004 $as_echo "Windows native" >&6; }
18005 elif test x"$USE_DEV_URANDOM" = x"1" ; then
18007 $as_echo "#define USE_DEV_URANDOM 1" >>confdefs.h
18009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
18010 $as_echo "/dev/urandom" >&6; }
18013 no source of strong random numbers was found
18014 PostgreSQL can use OpenSSL or /dev/urandom as a source of random numbers,
18015 for authentication protocols. You can use --disable-strong-random to use a
18016 built-in pseudo random number generator, but that may be insecure." "$LINENO" 5
18019 $as_echo "#define HAVE_STRONG_RANDOM 1" >>confdefs.h
18022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: weak builtin PRNG" >&5
18023 $as_echo "weak builtin PRNG" >&6; }
18024 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
18025 *** Not using a strong random number source may be insecure." >&5
18026 $as_echo "$as_me: WARNING:
18027 *** Not using a strong random number source may be insecure." >&2;}
18030 # If not set in template file, set bytes to use libc memset()
18031 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
18032 MEMSET_LOOP_LIMIT=1024
18035 cat >>confdefs.h <<_ACEOF
18036 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
18041 if test "$enable_nls" = yes ; then
18043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
18044 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
18045 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18046 $as_echo_n "(cached) " >&6
18048 ac_func_search_save_LIBS=$LIBS
18049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18050 /* end confdefs.h. */
18052 /* Override any GCC internal prototype to avoid an error.
18053 Use char because int might match the return type of a GCC
18054 builtin and then its argument prototype would still apply. */
18058 char bind_textdomain_codeset ();
18062 return bind_textdomain_codeset ();
18067 for ac_lib in '' intl; do
18068 if test -z "$ac_lib"; then
18069 ac_res="none required"
18072 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18074 if ac_fn_c_try_link "$LINENO"; then :
18075 ac_cv_search_bind_textdomain_codeset=$ac_res
18077 rm -f core conftest.err conftest.$ac_objext \
18079 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18083 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18086 ac_cv_search_bind_textdomain_codeset=no
18088 rm conftest.$ac_ext
18089 LIBS=$ac_func_search_save_LIBS
18091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
18092 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
18093 ac_res=$ac_cv_search_bind_textdomain_codeset
18094 if test "$ac_res" != no; then :
18095 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18098 as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
18101 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
18102 if test "x$ac_cv_header_libintl_h" = xyes; then :
18105 as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
18109 if test -z "$MSGFMT"; then
18110 for ac_prog in msgfmt
18112 # Extract the first word of "$ac_prog", so it can be a program name with args.
18113 set dummy $ac_prog; ac_word=$2
18114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18115 $as_echo_n "checking for $ac_word... " >&6; }
18116 if ${ac_cv_path_MSGFMT+:} false; then :
18117 $as_echo_n "(cached) " >&6
18121 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
18124 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18125 for as_dir in $PATH
18128 test -z "$as_dir" && as_dir=.
18129 for ac_exec_ext in '' $ac_executable_extensions; do
18130 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18131 ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
18132 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18142 MSGFMT=$ac_cv_path_MSGFMT
18143 if test -n "$MSGFMT"; then
18144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18145 $as_echo "$MSGFMT" >&6; }
18147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18148 $as_echo "no" >&6; }
18152 test -n "$MSGFMT" && break
18156 # Report the value of MSGFMT in configure's output in all cases.
18157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
18158 $as_echo_n "checking for MSGFMT... " >&6; }
18159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18160 $as_echo "$MSGFMT" >&6; }
18163 if test -z "$MSGFMT"; then
18164 as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
18166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
18167 $as_echo_n "checking for msgfmt flags... " >&6; }
18168 if ${pgac_cv_msgfmt_flags+:} false; then :
18169 $as_echo_n "(cached) " >&6
18171 if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
18172 pgac_cv_msgfmt_flags=-c
18175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
18176 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
18177 MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
18179 if test -z "$MSGMERGE"; then
18180 for ac_prog in msgmerge
18182 # Extract the first word of "$ac_prog", so it can be a program name with args.
18183 set dummy $ac_prog; ac_word=$2
18184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18185 $as_echo_n "checking for $ac_word... " >&6; }
18186 if ${ac_cv_path_MSGMERGE+:} false; then :
18187 $as_echo_n "(cached) " >&6
18191 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18194 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18195 for as_dir in $PATH
18198 test -z "$as_dir" && as_dir=.
18199 for ac_exec_ext in '' $ac_executable_extensions; do
18200 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18201 ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
18202 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18212 MSGMERGE=$ac_cv_path_MSGMERGE
18213 if test -n "$MSGMERGE"; then
18214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18215 $as_echo "$MSGMERGE" >&6; }
18217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18218 $as_echo "no" >&6; }
18222 test -n "$MSGMERGE" && break
18226 # Report the value of MSGMERGE in configure's output in all cases.
18227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18228 $as_echo_n "checking for MSGMERGE... " >&6; }
18229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18230 $as_echo "$MSGMERGE" >&6; }
18233 if test -z "$XGETTEXT"; then
18234 for ac_prog in xgettext
18236 # Extract the first word of "$ac_prog", so it can be a program name with args.
18237 set dummy $ac_prog; ac_word=$2
18238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18239 $as_echo_n "checking for $ac_word... " >&6; }
18240 if ${ac_cv_path_XGETTEXT+:} false; then :
18241 $as_echo_n "(cached) " >&6
18245 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18248 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18249 for as_dir in $PATH
18252 test -z "$as_dir" && as_dir=.
18253 for ac_exec_ext in '' $ac_executable_extensions; do
18254 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18255 ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18256 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18266 XGETTEXT=$ac_cv_path_XGETTEXT
18267 if test -n "$XGETTEXT"; then
18268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18269 $as_echo "$XGETTEXT" >&6; }
18271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18272 $as_echo "no" >&6; }
18276 test -n "$XGETTEXT" && break
18280 # Report the value of XGETTEXT in configure's output in all cases.
18281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18282 $as_echo_n "checking for XGETTEXT... " >&6; }
18283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18284 $as_echo "$XGETTEXT" >&6; }
18290 # Check for Tcl configuration script tclConfig.sh
18291 if test "$with_tcl" = yes; then
18292 if test -z "$TCLSH"; then
18293 for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18295 # Extract the first word of "$ac_prog", so it can be a program name with args.
18296 set dummy $ac_prog; ac_word=$2
18297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18298 $as_echo_n "checking for $ac_word... " >&6; }
18299 if ${ac_cv_path_TCLSH+:} false; then :
18300 $as_echo_n "(cached) " >&6
18304 ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18307 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18308 for as_dir in $PATH
18311 test -z "$as_dir" && as_dir=.
18312 for ac_exec_ext in '' $ac_executable_extensions; do
18313 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18314 ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18315 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18325 TCLSH=$ac_cv_path_TCLSH
18326 if test -n "$TCLSH"; then
18327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18328 $as_echo "$TCLSH" >&6; }
18330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18331 $as_echo "no" >&6; }
18335 test -n "$TCLSH" && break
18339 # Report the value of TCLSH in configure's output in all cases.
18340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18341 $as_echo_n "checking for TCLSH... " >&6; }
18342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18343 $as_echo "$TCLSH" >&6; }
18346 if test x"$TCLSH" = x""; then
18347 as_fn_error $? "Tcl shell not found" "$LINENO" 5
18350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18351 $as_echo_n "checking for tclConfig.sh... " >&6; }
18352 # Let user override test
18353 if test -z "$TCL_CONFIG_SH"; then
18354 pgac_test_dirs="$with_tclconfig"
18356 set X $pgac_test_dirs; shift
18357 if test $# -eq 0; then
18358 test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18359 pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18360 # On newer macOS, $auto_path frequently doesn't include the place
18361 # where tclConfig.sh actually lives. Append that to the end, so as not
18362 # to break cases where a non-default Tcl installation is being used.
18363 if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18364 pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18366 set X $pgac_test_dirs; shift
18370 if test -r "$pgac_dir/tclConfig.sh"; then
18371 TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18377 if test -z "$TCL_CONFIG_SH"; then
18378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18379 $as_echo "no" >&6; }
18380 as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18383 $as_echo "$TCL_CONFIG_SH" >&6; }
18389 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18390 eval TCL_LIBS=\"$TCL_LIBS\"
18391 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18392 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18394 if test "$TCL_SHARED_BUILD" != 1; then
18395 as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18396 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18398 # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18399 ac_save_CPPFLAGS=$CPPFLAGS
18400 CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18401 ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18402 if test "x$ac_cv_header_tcl_h" = xyes; then :
18405 as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18409 CPPFLAGS=$ac_save_CPPFLAGS
18412 # check for <perl.h>
18413 if test "$with_perl" = yes; then
18414 ac_save_CPPFLAGS=$CPPFLAGS
18415 CPPFLAGS="$CPPFLAGS $perl_includespec"
18416 ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18418 if test "x$ac_cv_header_perl_h" = xyes; then :
18421 as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18425 # While we're at it, check that we can link to libperl.
18426 # On most platforms, if perl.h is there then libperl.so will be too, but at
18427 # this writing Debian packages them separately. There is no known reason to
18428 # waste cycles on separate probes for the Tcl or Python libraries, though.
18429 pgac_save_LIBS=$LIBS
18430 LIBS="$perl_embed_ldflags"
18431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18432 $as_echo_n "checking for libperl... " >&6; }
18433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18434 /* end confdefs.h. */
18436 #include <EXTERN.h>
18447 if ac_fn_c_try_link "$LINENO"; then :
18448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18449 $as_echo "yes" >&6; }
18451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18452 $as_echo "no" >&6; }
18453 as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18455 rm -f core conftest.err conftest.$ac_objext \
18456 conftest$ac_exeext conftest.$ac_ext
18457 LIBS=$pgac_save_LIBS
18458 CPPFLAGS=$ac_save_CPPFLAGS
18461 # check for <Python.h>
18462 if test "$with_python" = yes; then
18463 ac_save_CPPFLAGS=$CPPFLAGS
18464 CPPFLAGS="$python_includespec $CPPFLAGS"
18465 ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18466 if test "x$ac_cv_header_Python_h" = xyes; then :
18469 as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18473 CPPFLAGS=$ac_save_CPPFLAGS
18477 # Check for DocBook and tools
18479 if test -z "$XMLLINT"; then
18480 for ac_prog in xmllint
18482 # Extract the first word of "$ac_prog", so it can be a program name with args.
18483 set dummy $ac_prog; ac_word=$2
18484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18485 $as_echo_n "checking for $ac_word... " >&6; }
18486 if ${ac_cv_path_XMLLINT+:} false; then :
18487 $as_echo_n "(cached) " >&6
18491 ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18494 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18495 for as_dir in $PATH
18498 test -z "$as_dir" && as_dir=.
18499 for ac_exec_ext in '' $ac_executable_extensions; do
18500 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18501 ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18502 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18512 XMLLINT=$ac_cv_path_XMLLINT
18513 if test -n "$XMLLINT"; then
18514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18515 $as_echo "$XMLLINT" >&6; }
18517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18518 $as_echo "no" >&6; }
18522 test -n "$XMLLINT" && break
18526 # Report the value of XMLLINT in configure's output in all cases.
18527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18528 $as_echo_n "checking for XMLLINT... " >&6; }
18529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18530 $as_echo "$XMLLINT" >&6; }
18534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook XML V4.2" >&5
18535 $as_echo_n "checking for DocBook XML V4.2... " >&6; }
18536 if ${pgac_cv_check_docbook+:} false; then :
18537 $as_echo_n "(cached) " >&6
18539 cat >conftest.xml <<EOF
18540 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
18542 <title>test</title>
18544 <title>random</title>
18546 <title>testsect</title>
18553 pgac_cv_check_docbook=no
18555 if test -n "$XMLLINT"; then
18556 $XMLLINT --noout --valid conftest.xml 1>&5 2>&1
18557 if test $? -eq 0; then
18558 pgac_cv_check_docbook=yes
18563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
18564 $as_echo "$pgac_cv_check_docbook" >&6; }
18566 have_docbook=$pgac_cv_check_docbook
18569 if test -z "$DBTOEPUB"; then
18570 for ac_prog in dbtoepub
18572 # Extract the first word of "$ac_prog", so it can be a program name with args.
18573 set dummy $ac_prog; ac_word=$2
18574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18575 $as_echo_n "checking for $ac_word... " >&6; }
18576 if ${ac_cv_path_DBTOEPUB+:} false; then :
18577 $as_echo_n "(cached) " >&6
18581 ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
18584 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18585 for as_dir in $PATH
18588 test -z "$as_dir" && as_dir=.
18589 for ac_exec_ext in '' $ac_executable_extensions; do
18590 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18591 ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
18592 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18602 DBTOEPUB=$ac_cv_path_DBTOEPUB
18603 if test -n "$DBTOEPUB"; then
18604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18605 $as_echo "$DBTOEPUB" >&6; }
18607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18608 $as_echo "no" >&6; }
18612 test -n "$DBTOEPUB" && break
18616 # Report the value of DBTOEPUB in configure's output in all cases.
18617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
18618 $as_echo_n "checking for DBTOEPUB... " >&6; }
18619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18620 $as_echo "$DBTOEPUB" >&6; }
18623 if test -z "$XSLTPROC"; then
18624 for ac_prog in xsltproc
18626 # Extract the first word of "$ac_prog", so it can be a program name with args.
18627 set dummy $ac_prog; ac_word=$2
18628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18629 $as_echo_n "checking for $ac_word... " >&6; }
18630 if ${ac_cv_path_XSLTPROC+:} false; then :
18631 $as_echo_n "(cached) " >&6
18635 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18638 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18639 for as_dir in $PATH
18642 test -z "$as_dir" && as_dir=.
18643 for ac_exec_ext in '' $ac_executable_extensions; do
18644 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18645 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18646 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18656 XSLTPROC=$ac_cv_path_XSLTPROC
18657 if test -n "$XSLTPROC"; then
18658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18659 $as_echo "$XSLTPROC" >&6; }
18661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18662 $as_echo "no" >&6; }
18666 test -n "$XSLTPROC" && break
18670 # Report the value of XSLTPROC in configure's output in all cases.
18671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18672 $as_echo_n "checking for XSLTPROC... " >&6; }
18673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18674 $as_echo "$XSLTPROC" >&6; }
18677 if test -z "$FOP"; then
18680 # Extract the first word of "$ac_prog", so it can be a program name with args.
18681 set dummy $ac_prog; ac_word=$2
18682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18683 $as_echo_n "checking for $ac_word... " >&6; }
18684 if ${ac_cv_path_FOP+:} false; then :
18685 $as_echo_n "(cached) " >&6
18689 ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
18692 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18693 for as_dir in $PATH
18696 test -z "$as_dir" && as_dir=.
18697 for ac_exec_ext in '' $ac_executable_extensions; do
18698 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18699 ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
18700 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18710 FOP=$ac_cv_path_FOP
18711 if test -n "$FOP"; then
18712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18713 $as_echo "$FOP" >&6; }
18715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18716 $as_echo "no" >&6; }
18720 test -n "$FOP" && break
18724 # Report the value of FOP in configure's output in all cases.
18725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
18726 $as_echo_n "checking for FOP... " >&6; }
18727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18728 $as_echo "$FOP" >&6; }
18733 # Check for test tools
18735 if test "$enable_tap_tests" = yes; then
18736 # Check for necessary modules, unless user has specified the "prove" to use;
18737 # in that case it's her responsibility to have a working configuration.
18738 # (prove might be part of a different Perl installation than perl, eg on
18739 # MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)
18740 if test -z "$PROVE"; then
18741 # Test::More and Time::HiRes are supposed to be part of core Perl,
18742 # but some distros omit them in a minimal installation.
18753 # Make sure we have perl
18754 if test -z "$PERL"; then
18755 # Extract the first word of "perl", so it can be a program name with args.
18756 set dummy perl; ac_word=$2
18757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18758 $as_echo_n "checking for $ac_word... " >&6; }
18759 if ${ac_cv_prog_PERL+:} false; then :
18760 $as_echo_n "(cached) " >&6
18762 if test -n "$PERL"; then
18763 ac_cv_prog_PERL="$PERL" # Let the user override the test.
18765 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18766 for as_dir in $PATH
18769 test -z "$as_dir" && as_dir=.
18770 for ac_exec_ext in '' $ac_executable_extensions; do
18771 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18772 ac_cv_prog_PERL="perl"
18773 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18782 PERL=$ac_cv_prog_PERL
18783 if test -n "$PERL"; then
18784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
18785 $as_echo "$PERL" >&6; }
18787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18788 $as_echo "no" >&6; }
18794 if test "x$PERL" != x; then
18795 ax_perl_modules_failed=0
18796 for ax_perl_module in 'IPC::Run' 'Test::More 0.87' 'Time::HiRes' ; do
18797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl module $ax_perl_module" >&5
18798 $as_echo_n "checking for perl module $ax_perl_module... " >&6; }
18800 # Would be nice to log result here, but can't rely on autoconf internals
18801 $PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1
18802 if test $? -ne 0; then
18803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18804 $as_echo "no" >&6; };
18805 ax_perl_modules_failed=1
18807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
18808 $as_echo "ok" >&6; };
18812 # Run optional shell commands
18813 if test "$ax_perl_modules_failed" = 0; then
18818 as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
18821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5
18822 $as_echo "$as_me: WARNING: could not find perl" >&2;}
18825 # Now make sure we know where prove is
18826 if test -z "$PROVE"; then
18827 for ac_prog in prove
18829 # Extract the first word of "$ac_prog", so it can be a program name with args.
18830 set dummy $ac_prog; ac_word=$2
18831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18832 $as_echo_n "checking for $ac_word... " >&6; }
18833 if ${ac_cv_path_PROVE+:} false; then :
18834 $as_echo_n "(cached) " >&6
18838 ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
18841 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18842 for as_dir in $PATH
18845 test -z "$as_dir" && as_dir=.
18846 for ac_exec_ext in '' $ac_executable_extensions; do
18847 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18848 ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
18849 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18859 PROVE=$ac_cv_path_PROVE
18860 if test -n "$PROVE"; then
18861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18862 $as_echo "$PROVE" >&6; }
18864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18865 $as_echo "no" >&6; }
18869 test -n "$PROVE" && break
18873 # Report the value of PROVE in configure's output in all cases.
18874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
18875 $as_echo_n "checking for PROVE... " >&6; }
18876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18877 $as_echo "$PROVE" >&6; }
18880 if test -z "$PROVE"; then
18881 as_fn_error $? "prove not found" "$LINENO" 5
18887 # We have to run the thread test near the end so we have all our symbols
18888 # defined. Cross compiling throws a warning.
18890 if test "$enable_thread_safety" = yes; then
18891 if test "$PORTNAME" != "win32"
18893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
18894 $as_echo_n "checking thread safety of required library functions... " >&6; }
18898 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
18899 LIBS="$LIBS $PTHREAD_LIBS"
18900 if test "$cross_compiling" = yes; then :
18901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
18902 $as_echo "maybe" >&6; }
18903 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
18904 *** Skipping thread test program because of cross-compile build.
18905 *** Run the program in src/test/thread on the target machine.
18907 $as_echo "$as_me: WARNING:
18908 *** Skipping thread test program because of cross-compile build.
18909 *** Run the program in src/test/thread on the target machine.
18912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18913 /* end confdefs.h. */
18914 #include "$srcdir/src/test/thread/thread_test.c"
18916 if ac_fn_c_try_run "$LINENO"; then :
18917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18918 $as_echo "yes" >&6; }
18920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18921 $as_echo "no" >&6; }
18922 as_fn_error $? "thread test program failed
18923 This platform is not thread-safe. Check the file 'config.log' or compile
18924 and run src/test/thread/thread_test for the exact reason.
18925 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
18927 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18928 conftest.$ac_objext conftest.beam conftest.$ac_ext
18934 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
18935 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
18939 # If compiler will take -Wl,--as-needed (or various platform-specific
18940 # spellings thereof) then add that to LDFLAGS. This is much easier than
18941 # trying to filter LIBS to the minimum for each executable.
18942 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
18943 # libreadline; therefore we postpone testing it until we know what library
18944 # dependencies readline has. The test code will try to link with $LIBS.
18945 if test "$with_readline" = yes; then
18946 link_test_func=readline
18948 link_test_func=exit
18951 if test "$PORTNAME" = "darwin"; then
18952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
18953 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
18954 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
18955 $as_echo_n "(cached) " >&6
18957 pgac_save_LDFLAGS=$LDFLAGS
18958 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
18959 if test "$cross_compiling" = yes; then :
18960 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
18962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18963 /* end confdefs.h. */
18964 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18973 if ac_fn_c_try_run "$LINENO"; then :
18974 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
18976 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
18978 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18979 conftest.$ac_objext conftest.beam conftest.$ac_ext
18982 LDFLAGS="$pgac_save_LDFLAGS"
18984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
18985 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
18986 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
18987 LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
18990 elif test "$PORTNAME" = "openbsd"; then
18991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
18992 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
18993 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
18994 $as_echo_n "(cached) " >&6
18996 pgac_save_LDFLAGS=$LDFLAGS
18997 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
18998 if test "$cross_compiling" = yes; then :
18999 pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
19001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19002 /* end confdefs.h. */
19003 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19012 if ac_fn_c_try_run "$LINENO"; then :
19013 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
19015 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
19017 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19018 conftest.$ac_objext conftest.beam conftest.$ac_ext
19021 LDFLAGS="$pgac_save_LDFLAGS"
19023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
19024 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
19025 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
19026 LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
19030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
19031 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
19032 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
19033 $as_echo_n "(cached) " >&6
19035 pgac_save_LDFLAGS=$LDFLAGS
19036 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
19037 if test "$cross_compiling" = yes; then :
19038 pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
19040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19041 /* end confdefs.h. */
19042 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19051 if ac_fn_c_try_run "$LINENO"; then :
19052 pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
19054 pgac_cv_prog_cc_ldflags__Wl___as_needed=no
19056 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19057 conftest.$ac_objext conftest.beam conftest.$ac_ext
19060 LDFLAGS="$pgac_save_LDFLAGS"
19062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
19063 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
19064 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
19065 LDFLAGS="$LDFLAGS -Wl,--as-needed"
19070 # Create compiler version string
19071 if test x"$GCC" = x"yes" ; then
19072 cc_string=`${CC} --version | sed q`
19073 case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
19074 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
19075 cc_string=`${CC} -V 2>&1 | sed q`
19081 cat >>confdefs.h <<_ACEOF
19082 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
19086 # Supply a numeric version string for use by 3rd party add-ons
19087 # awk -F is a regex on some platforms, and not on others, so make "." a tab
19088 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
19090 $AWK '{printf "%d%04d", $1, $2}'`"
19092 cat >>confdefs.h <<_ACEOF
19093 #define PG_VERSION_NUM $PG_VERSION_NUM
19098 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
19099 # literally, so that it's possible to override it at build time using
19100 # a command like "make ... PG_SYSROOT=path". This has to be done after
19101 # we've finished all configure checks that depend on CPPFLAGS.
19102 if test x"$PG_SYSROOT" != x; then
19103 CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19108 # Begin output steps
19110 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
19111 $as_echo "$as_me: using compiler=$cc_string" >&6;}
19112 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
19113 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
19114 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
19115 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
19116 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
19117 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
19118 # Currently only used when LLVM is used
19119 if test "$with_llvm" = yes ; then
19120 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
19121 $as_echo "$as_me: using CXX=$CXX" >&6;}
19122 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
19123 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
19124 { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
19125 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
19126 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
19127 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
19128 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
19129 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
19132 # prepare build tree if outside source tree
19133 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
19134 # Note 2: /bin/pwd might be better than shell's built-in at getting
19135 # a symlink-free name.
19136 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
19140 if test "$no_create" != yes; then
19141 $as_echo_n "preparing build tree... " >&6
19142 pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
19143 $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
19144 || as_fn_error $? "failed" "$LINENO" 5
19145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
19146 $as_echo "done" >&6; }
19152 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
19155 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}"
19158 if test "$PORTNAME" = "win32"; then
19159 ac_config_commands="$ac_config_commands check_win32_symlinks"
19163 ac_config_headers="$ac_config_headers src/include/pg_config.h"
19166 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
19169 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
19172 cat >confcache <<\_ACEOF
19173 # This file is a shell script that caches the results of configure
19174 # tests run on this system so they can be shared between configure
19175 # scripts and configure runs, see configure's option --config-cache.
19176 # It is not useful on other systems. If it contains results you don't
19177 # want to keep, you may remove or edit it.
19179 # config.status only pays attention to the cache file if you give it
19180 # the --recheck option to rerun configure.
19182 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19183 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19184 # following values.
19188 # The following way of writing the cache mishandles newlines in values,
19189 # but we know of no workaround that is simple, portable, and efficient.
19190 # So, we kill variables containing newlines.
19191 # Ultrix sh set writes to stderr and can't be redirected directly,
19192 # and sets the high bit in the cache file unless we assign to the vars.
19194 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19195 eval ac_val=\$$ac_var
19199 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19200 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19203 _ | IFS | as_nl) ;; #(
19204 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19205 *) { eval $ac_var=; unset $ac_var;} ;;
19211 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19212 *${as_nl}ac_space=\ *)
19213 # `set' does not quote correctly, so add quotes: double-quote
19214 # substitution turns \\\\ into \\, and sed turns \\ into \.
19217 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19220 # `set' quotes correctly as required by POSIX, so do not add quotes.
19221 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19230 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19232 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19234 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19235 if test -w "$cache_file"; then
19236 if test "x$cache_file" != "x/dev/null"; then
19237 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19238 $as_echo "$as_me: updating cache $cache_file" >&6;}
19239 if test ! -f "$cache_file" || test -h "$cache_file"; then
19240 cat confcache >"$cache_file"
19242 case $cache_file in #(
19244 mv -f confcache "$cache_file"$$ &&
19245 mv -f "$cache_file"$$ "$cache_file" ;; #(
19247 mv -f confcache "$cache_file" ;;
19252 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19253 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19258 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19259 # Let make expand exec_prefix.
19260 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19262 DEFS=-DHAVE_CONFIG_H
19267 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19268 # 1. Remove the extension, and $U if already installed.
19269 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19270 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19271 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19272 # will be set to the directory where LIBOBJS objects are built.
19273 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19274 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19276 LIBOBJS=$ac_libobjs
19278 LTLIBOBJS=$ac_ltlibobjs
19283 : "${CONFIG_STATUS=./config.status}"
19285 ac_clean_files_save=$ac_clean_files
19286 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19287 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19288 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19290 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19292 # Generated by $as_me.
19293 # Run this file to recreate the current configuration.
19294 # Compiler output produced by configure, useful for debugging
19295 # configure, is in config.log if it exists.
19298 ac_cs_recheck=false
19301 SHELL=\${CONFIG_SHELL-$SHELL}
19304 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19305 ## -------------------- ##
19306 ## M4sh Initialization. ##
19307 ## -------------------- ##
19309 # Be more Bourne compatible
19310 DUALCASE=1; export DUALCASE # for MKS sh
19311 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19314 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19315 # is contrary to our usage. Disable this feature.
19316 alias -g '${1+"$@"}'='"$@"'
19317 setopt NO_GLOB_SUBST
19319 case `(set -o) 2>/dev/null` in #(
19331 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19332 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19333 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19334 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19335 # Prefer a ksh shell builtin over an external printf program on Solaris,
19336 # but without wasting forks for bash or zsh.
19337 if test -z "$BASH_VERSION$ZSH_VERSION" \
19338 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19339 as_echo='print -r --'
19340 as_echo_n='print -rn --'
19341 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19342 as_echo='printf %s\n'
19343 as_echo_n='printf %s'
19345 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19346 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19347 as_echo_n='/usr/ucb/echo -n'
19349 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19350 as_echo_n_body='eval
19354 expr "X$arg" : "X\\(.*\\)$as_nl";
19355 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19357 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19359 export as_echo_n_body
19360 as_echo_n='sh -c $as_echo_n_body as_echo'
19362 export as_echo_body
19363 as_echo='sh -c $as_echo_body as_echo'
19366 # The user is always right.
19367 if test "${PATH_SEPARATOR+set}" != set; then
19369 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19370 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19377 # We need space, tab and new line, in precisely that order. Quoting is
19378 # there to prevent editors from complaining about space-tab.
19379 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19380 # splitting by setting IFS to empty value.)
19383 # Find who we are. Look in the path if we contain no directory separator.
19386 *[\\/]* ) as_myself=$0 ;;
19387 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19388 for as_dir in $PATH
19391 test -z "$as_dir" && as_dir=.
19392 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19398 # We did not find ourselves, most probably we were run as `sh COMMAND'
19399 # in which case we are not to be found in the path.
19400 if test "x$as_myself" = x; then
19403 if test ! -f "$as_myself"; then
19404 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19408 # Unset variables that we do not need and which cause bugs (e.g. in
19409 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19410 # suppresses any "Segmentation fault" message there. '((' could
19411 # trigger a bug in pdksh 5.2.14.
19412 for as_var in BASH_ENV ENV MAIL MAILPATH
19413 do eval test x\${$as_var+set} = xset \
19414 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19427 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19430 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19431 # ----------------------------------------
19432 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19433 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19434 # script with STATUS, using 1 if that was 0.
19437 as_status=$1; test $as_status -eq 0 && as_status=1
19439 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19440 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19442 $as_echo "$as_me: error: $2" >&2
19443 as_fn_exit $as_status
19447 # as_fn_set_status STATUS
19448 # -----------------------
19449 # Set $? to STATUS, without forking.
19450 as_fn_set_status ()
19453 } # as_fn_set_status
19455 # as_fn_exit STATUS
19456 # -----------------
19457 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19461 as_fn_set_status $1
19467 # Portably unset VAR.
19470 { eval $1=; unset $1;}
19472 as_unset=as_fn_unset
19473 # as_fn_append VAR VALUE
19474 # ----------------------
19475 # Append the text in VALUE to the end of the definition contained in VAR. Take
19476 # advantage of any shell optimizations that allow amortized linear growth over
19477 # repeated appends, instead of the typical quadratic growth present in naive
19479 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19480 eval 'as_fn_append ()
19491 # as_fn_arith ARG...
19492 # ------------------
19493 # Perform arithmetic evaluation on the ARGs, and store the result in the
19494 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19495 # must be portable across $(()) and expr.
19496 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19497 eval 'as_fn_arith ()
19504 as_val=`expr "$@" || test $? -eq 1`
19509 if expr a : '\(a\)' >/dev/null 2>&1 &&
19510 test "X`expr 00001 : '.*\(...\)'`" = X001; then
19516 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19517 as_basename=basename
19522 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19528 as_me=`$as_basename -- "$0" ||
19529 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19530 X"$0" : 'X\(//\)$' \| \
19531 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19533 sed '/^.*\/\([^/][^/]*\)\/*$/{
19547 # Avoid depending upon Character Ranges.
19548 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19549 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19550 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19551 as_cr_digits='0123456789'
19552 as_cr_alnum=$as_cr_Letters$as_cr_digits
19554 ECHO_C= ECHO_N= ECHO_T=
19555 case `echo -n x` in #(((((
19557 case `echo 'xy\c'` in
19558 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19560 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19567 rm -f conf$$ conf$$.exe conf$$.file
19568 if test -d conf$$.dir; then
19569 rm -f conf$$.dir/conf$$.file
19572 mkdir conf$$.dir 2>/dev/null
19574 if (echo >conf$$.file) 2>/dev/null; then
19575 if ln -s conf$$.file conf$$ 2>/dev/null; then
19577 # ... but there are two gotchas:
19578 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19579 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19580 # In both cases, we have to default to `cp -pR'.
19581 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19583 elif ln conf$$.file conf$$ 2>/dev/null; then
19591 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19592 rmdir conf$$.dir 2>/dev/null
19597 # Create "$as_dir" as a directory, including parents if necessary.
19602 -*) as_dir=./$as_dir;;
19604 test -d "$as_dir" || eval $as_mkdir_p || {
19608 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19609 *) as_qdir=$as_dir;;
19611 as_dirs="'$as_qdir' $as_dirs"
19612 as_dir=`$as_dirname -- "$as_dir" ||
19613 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19614 X"$as_dir" : 'X\(//\)[^/]' \| \
19615 X"$as_dir" : 'X\(//\)$' \| \
19616 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19617 $as_echo X"$as_dir" |
19618 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19622 /^X\(\/\/\)[^/].*/{
19635 test -d "$as_dir" && break
19637 test -z "$as_dirs" || eval "mkdir $as_dirs"
19638 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19642 if mkdir -p . 2>/dev/null; then
19643 as_mkdir_p='mkdir -p "$as_dir"'
19645 test -d ./-p && rmdir ./-p
19650 # as_fn_executable_p FILE
19651 # -----------------------
19652 # Test if FILE is an executable regular file.
19653 as_fn_executable_p ()
19655 test -f "$1" && test -x "$1"
19656 } # as_fn_executable_p
19657 as_test_x='test -x'
19658 as_executable_p=as_fn_executable_p
19660 # Sed expression to map a string onto a valid CPP name.
19661 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19663 # Sed expression to map a string onto a valid variable name.
19664 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19668 ## ----------------------------------- ##
19669 ## Main body of $CONFIG_STATUS script. ##
19670 ## ----------------------------------- ##
19672 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19674 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19675 # Save the log message, to keep $0 and so on meaningful, and to
19676 # report actual input values of CONFIG_FILES etc. instead of their
19677 # values after options handling.
19679 This file was extended by PostgreSQL $as_me 12devel, which was
19680 generated by GNU Autoconf 2.69. Invocation command line was
19682 CONFIG_FILES = $CONFIG_FILES
19683 CONFIG_HEADERS = $CONFIG_HEADERS
19684 CONFIG_LINKS = $CONFIG_LINKS
19685 CONFIG_COMMANDS = $CONFIG_COMMANDS
19688 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19693 case $ac_config_files in *"
19694 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19697 case $ac_config_headers in *"
19698 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19702 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19703 # Files that config.status was made for.
19704 config_files="$ac_config_files"
19705 config_headers="$ac_config_headers"
19706 config_links="$ac_config_links"
19707 config_commands="$ac_config_commands"
19711 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19713 \`$as_me' instantiates files and other configuration actions
19714 from templates according to the current configuration. Unless the files
19715 and actions are specified as TAGs, all are instantiated by default.
19717 Usage: $0 [OPTION]... [TAG]...
19719 -h, --help print this help, then exit
19720 -V, --version print version number and configuration settings, then exit
19721 --config print configuration, then exit
19722 -q, --quiet, --silent
19723 do not print progress messages
19724 -d, --debug don't remove temporary files
19725 --recheck update $as_me by reconfiguring in the same conditions
19726 --file=FILE[:TEMPLATE]
19727 instantiate the configuration file FILE
19728 --header=FILE[:TEMPLATE]
19729 instantiate the configuration header FILE
19731 Configuration files:
19734 Configuration headers:
19737 Configuration links:
19740 Configuration commands:
19743 Report bugs to <pgsql-bugs@postgresql.org>."
19746 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19747 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19749 PostgreSQL config.status 12devel
19750 configured by $0, generated by GNU Autoconf 2.69,
19751 with options \\"\$ac_cs_config\\"
19753 Copyright (C) 2012 Free Software Foundation, Inc.
19754 This config.status script is free software; the Free Software Foundation
19755 gives unlimited permission to copy, distribute and modify it."
19762 test -n "\$AWK" || AWK=awk
19765 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19766 # The default lists apply if the user does not specify any file.
19772 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19773 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19777 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19789 # Handling of the options.
19790 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19792 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19793 $as_echo "$ac_cs_version"; exit ;;
19794 --config | --confi | --conf | --con | --co | --c )
19795 $as_echo "$ac_cs_config"; exit ;;
19796 --debug | --debu | --deb | --de | --d | -d )
19798 --file | --fil | --fi | --f )
19801 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19802 '') as_fn_error $? "missing file argument" ;;
19804 as_fn_append CONFIG_FILES " '$ac_optarg'"
19805 ac_need_defaults=false;;
19806 --header | --heade | --head | --hea )
19809 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19811 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19812 ac_need_defaults=false;;
19814 # Conflict between --help and --header
19815 as_fn_error $? "ambiguous option: \`$1'
19816 Try \`$0 --help' for more information.";;
19817 --help | --hel | -h )
19818 $as_echo "$ac_cs_usage"; exit ;;
19819 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19820 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19823 # This is an error.
19824 -*) as_fn_error $? "unrecognized option: \`$1'
19825 Try \`$0 --help' for more information." ;;
19827 *) as_fn_append ac_config_targets " $1"
19828 ac_need_defaults=false ;;
19834 ac_configure_extra_args=
19836 if $ac_cs_silent; then
19838 ac_configure_extra_args="$ac_configure_extra_args --silent"
19842 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19843 if \$ac_cs_recheck; then
19844 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19846 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19847 CONFIG_SHELL='$SHELL'
19848 export CONFIG_SHELL
19853 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19857 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19858 ## Running $as_me. ##
19864 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19867 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19869 # Handling of arguments.
19870 for ac_config_target in $ac_config_targets
19872 case $ac_config_target in
19873 "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
19874 "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
19875 "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
19876 "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
19877 "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
19878 "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
19879 "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
19880 "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
19881 "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
19882 "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
19883 "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
19885 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19890 # If the user did not use the arguments to specify the items to instantiate,
19891 # then the envvar interface is used. Set only those that are not.
19892 # We use the long form for the default assignment because of an extremely
19893 # bizarre bug on SunOS 4.1.3.
19894 if $ac_need_defaults; then
19895 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19896 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19897 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
19898 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19901 # Have a temporary directory for convenience. Make it in the build tree
19902 # simply because there is no reason against having it here, and in addition,
19903 # creating and moving files from /tmp can sometimes cause problems.
19904 # Hook for its removal unless debugging.
19905 # Note that there is a small window in which the directory will not be cleaned:
19906 # after its creation but before its name has been assigned to `$tmp'.
19910 trap 'exit_status=$?
19911 : "${ac_tmp:=$tmp}"
19912 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
19914 trap 'as_fn_exit 1' 1 2 13 15
19916 # Create a (secure) tmp directory for tmp files.
19919 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19923 tmp=./conf$$-$RANDOM
19924 (umask 077 && mkdir "$tmp")
19925 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19928 # Set up the scripts for CONFIG_FILES section.
19929 # No need to generate them if there are no CONFIG_FILES.
19930 # This happens for instance with `./config.status config.h'.
19931 if test -n "$CONFIG_FILES"; then
19934 ac_cr=`echo X | tr X '\015'`
19935 # On cygwin, bash can eat \r inside `` if the user requested igncr.
19936 # But we know of no other shell where ac_cr would be empty at this
19937 # point, so we can use a bashism as a fallback.
19938 if test "x$ac_cr" = x; then
19939 eval ac_cr=\$\'\\r\'
19941 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19942 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
19945 ac_cs_awk_cr=$ac_cr
19948 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
19953 echo "cat >conf$$subs.awk <<_ACEOF" &&
19954 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19956 } >conf$$subs.sh ||
19957 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19958 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
19960 for ac_last_try in false false false false false :; do
19961 . ./conf$$subs.sh ||
19962 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19964 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19965 if test $ac_delim_n = $ac_delim_num; then
19967 elif $ac_last_try; then
19968 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19970 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19973 rm -f conf$$subs.sh
19975 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19976 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
19980 s/^/S["/; s/!.*/"]=/
19990 s/\(.\{148\}\)..*/\1/
19992 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19997 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20004 s/\(.\{148\}\)..*/\1/
20006 s/["\\]/\\&/g; s/^/"/; s/$/"/
20010 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20015 ' <conf$$subs.awk | sed '
20020 ' >>$CONFIG_STATUS || ac_write_fail=1
20021 rm -f conf$$subs.awk
20022 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20024 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20025 for (key in S) S_is_set[key] = 1
20031 nfields = split(line, field, "@")
20033 len = length(field[1])
20034 for (i = 2; i < nfields; i++) {
20036 keylen = length(key)
20037 if (S_is_set[key]) {
20039 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20040 len += length(value) + length(field[++i])
20051 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20052 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20053 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20056 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20057 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20060 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20061 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20062 # trailing colons and then remove the whole line if VPATH becomes empty
20063 # (actually we leave an empty line to preserve line numbers).
20064 if test "x$srcdir" = x.; then
20065 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20083 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20084 fi # test -n "$CONFIG_FILES"
20086 # Set up the scripts for CONFIG_HEADERS section.
20087 # No need to generate them if there are no CONFIG_HEADERS.
20088 # This happens for instance with `./config.status Makefile'.
20089 if test -n "$CONFIG_HEADERS"; then
20090 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20094 # Transform confdefs.h into an awk script `defines.awk', embedded as
20095 # here-document in config.status, that substitutes the proper values into
20096 # config.h.in to produce config.h.
20098 # Create a delimiter string that does not exist in confdefs.h, to ease
20099 # handling of long lines.
20101 for ac_last_try in false false :; do
20102 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20103 if test -z "$ac_tt"; then
20105 elif $ac_last_try; then
20106 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20108 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20112 # For the awk script, D is an array of macro values keyed by name,
20113 # likewise P contains macro parameters if any. Preserve backslash
20114 # newline sequences.
20116 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20118 s/.\{148\}/&'"$ac_delim"'/g
20121 s/^[ ]*#[ ]*define[ ][ ]*/ /
20128 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20130 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20134 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20135 D["\1"]=" \3\\\\\\n"\\/p
20137 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20142 s/.\{148\}/&'"$ac_delim"'/g
20147 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20150 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20152 ' <confdefs.h | sed '
20153 s/'"$ac_delim"'/"\\\
20154 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20156 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20157 for (key in D) D_is_set[key] = 1
20160 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20162 split(line, arg, " ")
20163 if (arg[1] == "#") {
20167 defundef = substr(arg[1], 2)
20170 split(mac1, mac2, "(") #)
20172 prefix = substr(line, 1, index(line, defundef) - 1)
20173 if (D_is_set[macro]) {
20174 # Preserve the white space surrounding the "#".
20175 print prefix "define", macro P[macro] D[macro]
20178 # Replace #undef with comments. This is necessary, for example,
20179 # in the case of _POSIX_SOURCE, which is predefined and required
20180 # on some systems where configure will not decide to define it.
20181 if (defundef == "undef") {
20182 print "/*", prefix defundef, macro, "*/"
20190 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20191 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20192 fi # test -n "$CONFIG_HEADERS"
20195 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20200 :[FHLC]) ac_mode=$ac_tag; continue;;
20202 case $ac_mode$ac_tag in
20204 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20205 :[FH]-) ac_tag=-:-;;
20206 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20223 -) ac_f="$ac_tmp/stdin";;
20224 *) # Look for the file first in the build tree, then in the source tree
20225 # (if the path is not absolute). The absolute path cannot be DOS-style,
20226 # because $ac_f cannot contain `:'.
20230 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20232 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20234 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20235 as_fn_append ac_file_inputs " '$ac_f'"
20238 # Let's still pretend it is `configure' which instantiates (i.e., don't
20239 # use $as_me), people would be surprised to read:
20240 # /* config.h. Generated by config.status. */
20241 configure_input='Generated from '`
20242 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20244 if test x"$ac_file" != x-; then
20245 configure_input="$ac_file. $configure_input"
20246 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20247 $as_echo "$as_me: creating $ac_file" >&6;}
20249 # Neutralize special characters interpreted by sed in replacement strings.
20250 case $configure_input in #(
20251 *\&* | *\|* | *\\* )
20252 ac_sed_conf_input=`$as_echo "$configure_input" |
20253 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20254 *) ac_sed_conf_input=$configure_input;;
20258 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20259 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20264 ac_dir=`$as_dirname -- "$ac_file" ||
20265 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20266 X"$ac_file" : 'X\(//\)[^/]' \| \
20267 X"$ac_file" : 'X\(//\)$' \| \
20268 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20269 $as_echo X"$ac_file" |
20270 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20274 /^X\(\/\/\)[^/].*/{
20287 as_dir="$ac_dir"; as_fn_mkdir_p
20291 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20293 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20294 # A ".." for each directory in $ac_dir_suffix.
20295 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20296 case $ac_top_builddir_sub in
20297 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20298 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20301 ac_abs_top_builddir=$ac_pwd
20302 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20303 # for backward compatibility:
20304 ac_top_builddir=$ac_top_build_prefix
20307 .) # We are building in place.
20309 ac_top_srcdir=$ac_top_builddir_sub
20310 ac_abs_top_srcdir=$ac_pwd ;;
20311 [\\/]* | ?:[\\/]* ) # Absolute name.
20312 ac_srcdir=$srcdir$ac_dir_suffix;
20313 ac_top_srcdir=$srcdir
20314 ac_abs_top_srcdir=$srcdir ;;
20315 *) # Relative name.
20316 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20317 ac_top_srcdir=$ac_top_build_prefix$srcdir
20318 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20320 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20330 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20331 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20333 ac_MKDIR_P=$MKDIR_P
20335 [\\/$]* | ?:[\\/]* ) ;;
20336 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20340 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20341 # If the template does not know about datarootdir, expand it.
20342 # FIXME: This hack should be removed a few years after 2.60.
20343 ac_datarootdir_hack=; ac_datarootdir_seen=
20354 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20355 *datarootdir*) ac_datarootdir_seen=yes;;
20356 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20357 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20358 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20360 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20361 ac_datarootdir_hack='
20362 s&@datadir@&$datadir&g
20363 s&@docdir@&$docdir&g
20364 s&@infodir@&$infodir&g
20365 s&@localedir@&$localedir&g
20366 s&@mandir@&$mandir&g
20367 s&\\\${datarootdir}&$datarootdir&g' ;;
20371 # Neutralize VPATH when `$srcdir' = `.'.
20372 # Shell code in configure.ac might set extrasub.
20373 # FIXME: do we really want to maintain this feature?
20374 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20375 ac_sed_extra="$ac_vpsub
20378 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20380 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20381 s|@configure_input@|$ac_sed_conf_input|;t t
20382 s&@top_builddir@&$ac_top_builddir_sub&;t t
20383 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20384 s&@srcdir@&$ac_srcdir&;t t
20385 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20386 s&@top_srcdir@&$ac_top_srcdir&;t t
20387 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20388 s&@builddir@&$ac_builddir&;t t
20389 s&@abs_builddir@&$ac_abs_builddir&;t t
20390 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20391 s&@INSTALL@&$ac_INSTALL&;t t
20392 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20393 $ac_datarootdir_hack
20395 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20396 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20398 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20399 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20400 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20401 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20402 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20403 which seems to be undefined. Please make sure it is defined" >&5
20404 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20405 which seems to be undefined. Please make sure it is defined" >&2;}
20407 rm -f "$ac_tmp/stdin"
20409 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20410 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20412 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20418 if test x"$ac_file" != x-; then
20420 $as_echo "/* $configure_input */" \
20421 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20422 } >"$ac_tmp/config.h" \
20423 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20424 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20425 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20426 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20429 mv "$ac_tmp/config.h" "$ac_file" \
20430 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20433 $as_echo "/* $configure_input */" \
20434 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20435 || as_fn_error $? "could not create -" "$LINENO" 5
20443 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20446 # Prefer the file from the source tree if names are identical.
20447 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20448 ac_source=$srcdir/$ac_source
20451 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20452 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20454 if test ! -r "$ac_source"; then
20455 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20459 # Try a relative symlink, then a hard link, then a copy.
20461 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20462 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20464 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20465 ln "$ac_source" "$ac_file" 2>/dev/null ||
20466 cp -p "$ac_source" "$ac_file" ||
20467 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20470 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20471 $as_echo "$as_me: executing $ac_file commands" >&6;}
20476 case $ac_file$ac_mode in
20477 "check_win32_symlinks":C)
20478 # Links sometimes fail undetected on Mingw -
20479 # so here we detect it and warn the user
20480 for FILE in $CONFIG_LINKS
20482 # test -e works for symlinks in the MinGW console
20483 test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20484 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20487 "src/include/pg_config.h":H)
20488 # Update timestamp for pg_config.h (see Makefile.global)
20489 echo >src/include/stamp-h
20491 "src/include/pg_config_ext.h":H)
20492 # Update timestamp for pg_config_ext.h (see Makefile.global)
20493 echo >src/include/stamp-ext-h
20495 "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20503 ac_clean_files=$ac_clean_files_save
20505 test $ac_write_fail = 0 ||
20506 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20509 # configure is writing to config.log, and then calls config.status.
20510 # config.status does its own redirection, appending to config.log.
20511 # Unfortunately, on DOS this fails, as config.log is still kept open
20512 # by configure, so config.status won't be able to write to it; its
20513 # output is simply discarded. So we exec the FD to /dev/null,
20514 # effectively closing config.log, so it can be properly (re)opened and
20515 # appended to by config.status. When coming back to configure, we
20516 # need to make the FD available again.
20517 if test "$no_create" != yes; then
20519 ac_config_status_args=
20520 test "$silent" = yes &&
20521 ac_config_status_args="$ac_config_status_args --quiet"
20523 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20525 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20526 # would make configure fail if this is the last instruction.
20527 $ac_cs_success || as_fn_exit 1
20529 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20530 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20531 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}