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
662 python_additional_libs
806 program_transform_name
819 enable_option_checking
825 enable_integer_datetimes
860 with_libedit_preferred
872 ac_precious_vars='build_alias
895 # Initialize some variables set by options.
897 ac_init_version=false
898 ac_unrecognized_opts=
900 # The variables have the same names as the options, with
901 # dashes changed to underlines.
909 program_transform_name=s,x,x,
917 # Installation directory options.
918 # These are left unexpanded so users can "make install exec_prefix=/foo"
919 # and all the variables that are supposed to be based on exec_prefix
920 # by default will actually change.
921 # Use braces instead of parens because sh, perl, etc. also accept them.
922 # (The list follows the same order as the GNU Coding Standards.)
923 bindir='${exec_prefix}/bin'
924 sbindir='${exec_prefix}/sbin'
925 libexecdir='${exec_prefix}/libexec'
926 datarootdir='${prefix}/share'
927 datadir='${datarootdir}'
928 sysconfdir='${prefix}/etc'
929 sharedstatedir='${prefix}/com'
930 localstatedir='${prefix}/var'
931 includedir='${prefix}/include'
932 oldincludedir='/usr/include'
933 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
934 infodir='${datarootdir}/info'
939 libdir='${exec_prefix}/lib'
940 localedir='${datarootdir}/locale'
941 mandir='${datarootdir}/man'
947 # If the previous option needs an argument, assign it.
948 if test -n "$ac_prev"; then
949 eval $ac_prev=\$ac_option
955 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
960 # Accept the important Cygnus configure options, so we can diagnose typos.
962 case $ac_dashdash$ac_option in
966 -bindir | --bindir | --bindi | --bind | --bin | --bi)
968 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
971 -build | --build | --buil | --bui | --bu)
972 ac_prev=build_alias ;;
973 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
974 build_alias=$ac_optarg ;;
976 -cache-file | --cache-file | --cache-fil | --cache-fi \
977 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
978 ac_prev=cache_file ;;
979 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
980 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
981 cache_file=$ac_optarg ;;
984 cache_file=config.cache ;;
986 -datadir | --datadir | --datadi | --datad)
988 -datadir=* | --datadir=* | --datadi=* | --datad=*)
989 datadir=$ac_optarg ;;
991 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
992 | --dataroo | --dataro | --datar)
993 ac_prev=datarootdir ;;
994 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
995 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
996 datarootdir=$ac_optarg ;;
998 -disable-* | --disable-*)
999 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1000 # Reject names that are not valid shell variable names.
1001 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1002 as_fn_error $? "invalid feature name: $ac_useropt"
1003 ac_useropt_orig=$ac_useropt
1004 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1005 case $ac_user_opts in
1007 "enable_$ac_useropt"
1009 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1010 ac_unrecognized_sep=', ';;
1012 eval enable_$ac_useropt=no ;;
1014 -docdir | --docdir | --docdi | --doc | --do)
1016 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1017 docdir=$ac_optarg ;;
1019 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1021 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1022 dvidir=$ac_optarg ;;
1024 -enable-* | --enable-*)
1025 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1026 # Reject names that are not valid shell variable names.
1027 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1028 as_fn_error $? "invalid feature name: $ac_useropt"
1029 ac_useropt_orig=$ac_useropt
1030 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1031 case $ac_user_opts in
1033 "enable_$ac_useropt"
1035 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1036 ac_unrecognized_sep=', ';;
1038 eval enable_$ac_useropt=\$ac_optarg ;;
1040 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1041 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1042 | --exec | --exe | --ex)
1043 ac_prev=exec_prefix ;;
1044 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1045 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1046 | --exec=* | --exe=* | --ex=*)
1047 exec_prefix=$ac_optarg ;;
1049 -gas | --gas | --ga | --g)
1050 # Obsolete; use --with-gas.
1053 -help | --help | --hel | --he | -h)
1054 ac_init_help=long ;;
1055 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1056 ac_init_help=recursive ;;
1057 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1058 ac_init_help=short ;;
1060 -host | --host | --hos | --ho)
1061 ac_prev=host_alias ;;
1062 -host=* | --host=* | --hos=* | --ho=*)
1063 host_alias=$ac_optarg ;;
1065 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1067 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1069 htmldir=$ac_optarg ;;
1071 -includedir | --includedir | --includedi | --included | --include \
1072 | --includ | --inclu | --incl | --inc)
1073 ac_prev=includedir ;;
1074 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1075 | --includ=* | --inclu=* | --incl=* | --inc=*)
1076 includedir=$ac_optarg ;;
1078 -infodir | --infodir | --infodi | --infod | --info | --inf)
1080 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1081 infodir=$ac_optarg ;;
1083 -libdir | --libdir | --libdi | --libd)
1085 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1086 libdir=$ac_optarg ;;
1088 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1089 | --libexe | --libex | --libe)
1090 ac_prev=libexecdir ;;
1091 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1092 | --libexe=* | --libex=* | --libe=*)
1093 libexecdir=$ac_optarg ;;
1095 -localedir | --localedir | --localedi | --localed | --locale)
1096 ac_prev=localedir ;;
1097 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1098 localedir=$ac_optarg ;;
1100 -localstatedir | --localstatedir | --localstatedi | --localstated \
1101 | --localstate | --localstat | --localsta | --localst | --locals)
1102 ac_prev=localstatedir ;;
1103 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1104 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1105 localstatedir=$ac_optarg ;;
1107 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1109 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1110 mandir=$ac_optarg ;;
1112 -nfp | --nfp | --nf)
1113 # Obsolete; use --without-fp.
1116 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1117 | --no-cr | --no-c | -n)
1120 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1121 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1124 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1125 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1126 | --oldin | --oldi | --old | --ol | --o)
1127 ac_prev=oldincludedir ;;
1128 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1129 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1130 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1131 oldincludedir=$ac_optarg ;;
1133 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1135 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1136 prefix=$ac_optarg ;;
1138 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1139 | --program-pre | --program-pr | --program-p)
1140 ac_prev=program_prefix ;;
1141 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1142 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1143 program_prefix=$ac_optarg ;;
1145 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1146 | --program-suf | --program-su | --program-s)
1147 ac_prev=program_suffix ;;
1148 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1149 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1150 program_suffix=$ac_optarg ;;
1152 -program-transform-name | --program-transform-name \
1153 | --program-transform-nam | --program-transform-na \
1154 | --program-transform-n | --program-transform- \
1155 | --program-transform | --program-transfor \
1156 | --program-transfo | --program-transf \
1157 | --program-trans | --program-tran \
1158 | --progr-tra | --program-tr | --program-t)
1159 ac_prev=program_transform_name ;;
1160 -program-transform-name=* | --program-transform-name=* \
1161 | --program-transform-nam=* | --program-transform-na=* \
1162 | --program-transform-n=* | --program-transform-=* \
1163 | --program-transform=* | --program-transfor=* \
1164 | --program-transfo=* | --program-transf=* \
1165 | --program-trans=* | --program-tran=* \
1166 | --progr-tra=* | --program-tr=* | --program-t=*)
1167 program_transform_name=$ac_optarg ;;
1169 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1171 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1172 pdfdir=$ac_optarg ;;
1174 -psdir | --psdir | --psdi | --psd | --ps)
1176 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1179 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1180 | -silent | --silent | --silen | --sile | --sil)
1183 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1185 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1187 sbindir=$ac_optarg ;;
1189 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1190 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1191 | --sharedst | --shareds | --shared | --share | --shar \
1193 ac_prev=sharedstatedir ;;
1194 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1195 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1196 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1198 sharedstatedir=$ac_optarg ;;
1200 -site | --site | --sit)
1202 -site=* | --site=* | --sit=*)
1205 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1207 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1208 srcdir=$ac_optarg ;;
1210 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1211 | --syscon | --sysco | --sysc | --sys | --sy)
1212 ac_prev=sysconfdir ;;
1213 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1214 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1215 sysconfdir=$ac_optarg ;;
1217 -target | --target | --targe | --targ | --tar | --ta | --t)
1218 ac_prev=target_alias ;;
1219 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1220 target_alias=$ac_optarg ;;
1222 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1225 -version | --version | --versio | --versi | --vers | -V)
1226 ac_init_version=: ;;
1229 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1230 # Reject names that are not valid shell variable names.
1231 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1232 as_fn_error $? "invalid package name: $ac_useropt"
1233 ac_useropt_orig=$ac_useropt
1234 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1235 case $ac_user_opts in
1239 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1240 ac_unrecognized_sep=', ';;
1242 eval with_$ac_useropt=\$ac_optarg ;;
1244 -without-* | --without-*)
1245 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1246 # Reject names that are not valid shell variable names.
1247 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1248 as_fn_error $? "invalid package name: $ac_useropt"
1249 ac_useropt_orig=$ac_useropt
1250 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1251 case $ac_user_opts in
1255 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1256 ac_unrecognized_sep=', ';;
1258 eval with_$ac_useropt=no ;;
1261 # Obsolete; use --with-x.
1264 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1265 | --x-incl | --x-inc | --x-in | --x-i)
1266 ac_prev=x_includes ;;
1267 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1268 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1269 x_includes=$ac_optarg ;;
1271 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1272 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1273 ac_prev=x_libraries ;;
1274 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1275 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1276 x_libraries=$ac_optarg ;;
1278 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1279 Try \`$0 --help' for more information"
1283 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1284 # Reject names that are not valid shell variable names.
1285 case $ac_envvar in #(
1286 '' | [0-9]* | *[!_$as_cr_alnum]* )
1287 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1289 eval $ac_envvar=\$ac_optarg
1290 export $ac_envvar ;;
1293 # FIXME: should be removed in autoconf 3.0.
1294 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1295 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1296 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1297 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1303 if test -n "$ac_prev"; then
1304 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1305 as_fn_error $? "missing argument to $ac_option"
1308 if test -n "$ac_unrecognized_opts"; then
1309 case $enable_option_checking in
1311 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1312 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1316 # Check all directory arguments for consistency.
1317 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1318 datadir sysconfdir sharedstatedir localstatedir includedir \
1319 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1320 libdir localedir mandir
1322 eval ac_val=\$$ac_var
1323 # Remove trailing slashes.
1326 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1327 eval $ac_var=\$ac_val;;
1329 # Be sure to have absolute directory names.
1331 [\\/$]* | ?:[\\/]* ) continue;;
1332 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1334 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1337 # There might be people who depend on the old broken behavior: `$host'
1338 # used to hold the argument of --host etc.
1339 # FIXME: To remove some day.
1342 target=$target_alias
1344 # FIXME: To remove some day.
1345 if test "x$host_alias" != x; then
1346 if test "x$build_alias" = x; then
1347 cross_compiling=maybe
1348 elif test "x$build_alias" != "x$host_alias"; then
1354 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1356 test "$silent" = yes && exec 6>/dev/null
1359 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1360 ac_ls_di=`ls -di .` &&
1361 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1362 as_fn_error $? "working directory cannot be determined"
1363 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1364 as_fn_error $? "pwd does not report name of working directory"
1367 # Find the source files, if location was not specified.
1368 if test -z "$srcdir"; then
1369 ac_srcdir_defaulted=yes
1370 # Try the directory containing this script, then the parent directory.
1371 ac_confdir=`$as_dirname -- "$as_myself" ||
1372 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1373 X"$as_myself" : 'X\(//\)[^/]' \| \
1374 X"$as_myself" : 'X\(//\)$' \| \
1375 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1376 $as_echo X"$as_myself" |
1377 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1395 if test ! -r "$srcdir/$ac_unique_file"; then
1399 ac_srcdir_defaulted=no
1401 if test ! -r "$srcdir/$ac_unique_file"; then
1402 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1403 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1405 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1407 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1409 # When building in place, set srcdir=.
1410 if test "$ac_abs_confdir" = "$ac_pwd"; then
1413 # Remove unnecessary trailing slashes from srcdir.
1414 # Double slashes in file names in object file debugging info
1415 # mess up M-x gdb in Emacs.
1417 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1419 for ac_var in $ac_precious_vars; do
1420 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1421 eval ac_env_${ac_var}_value=\$${ac_var}
1422 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1423 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1427 # Report the --help message.
1429 if test "$ac_init_help" = "long"; then
1430 # Omit some internal or obsolete options to make the list less imposing.
1431 # This message is too long to be a string in the A/UX 3.1 sh.
1433 \`configure' configures PostgreSQL 12devel to adapt to many kinds of systems.
1435 Usage: $0 [OPTION]... [VAR=VALUE]...
1437 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1438 VAR=VALUE. See below for descriptions of some of the useful variables.
1440 Defaults for the options are specified in brackets.
1443 -h, --help display this help and exit
1444 --help=short display options specific to this package
1445 --help=recursive display the short help of all the included packages
1446 -V, --version display version information and exit
1447 -q, --quiet, --silent do not print \`checking ...' messages
1448 --cache-file=FILE cache test results in FILE [disabled]
1449 -C, --config-cache alias for \`--cache-file=config.cache'
1450 -n, --no-create do not create output files
1451 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1453 Installation directories:
1454 --prefix=PREFIX install architecture-independent files in PREFIX
1455 [$ac_default_prefix]
1456 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1459 By default, \`make install' will install all the files in
1460 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1461 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1462 for instance \`--prefix=\$HOME'.
1464 For better control, use the options below.
1466 Fine tuning of the installation directories:
1467 --bindir=DIR user executables [EPREFIX/bin]
1468 --sbindir=DIR system admin executables [EPREFIX/sbin]
1469 --libexecdir=DIR program executables [EPREFIX/libexec]
1470 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1471 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1472 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1473 --libdir=DIR object code libraries [EPREFIX/lib]
1474 --includedir=DIR C header files [PREFIX/include]
1475 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1476 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1477 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1478 --infodir=DIR info documentation [DATAROOTDIR/info]
1479 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1480 --mandir=DIR man documentation [DATAROOTDIR/man]
1481 --docdir=DIR documentation root [DATAROOTDIR/doc/postgresql]
1482 --htmldir=DIR html documentation [DOCDIR]
1483 --dvidir=DIR dvi documentation [DOCDIR]
1484 --pdfdir=DIR pdf documentation [DOCDIR]
1485 --psdir=DIR ps documentation [DOCDIR]
1491 --build=BUILD configure for building on BUILD [guessed]
1492 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1496 if test -n "$ac_init_help"; then
1497 case $ac_init_help in
1498 short | recursive ) echo "Configuration of PostgreSQL 12devel:";;
1503 --disable-option-checking ignore unrecognized --enable/--with options
1504 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1505 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1506 --disable-integer-datetimes
1507 obsolete option, no longer supported
1508 --enable-nls[=LANGUAGES]
1509 enable Native Language Support
1510 --disable-rpath do not embed shared library search path in
1512 --disable-spinlocks do not use spinlocks
1513 --disable-atomics do not use atomic operations
1514 --disable-strong-random do not use a strong random number source
1515 --enable-debug build with debugging symbols (-g)
1516 --enable-profiling build with profiling enabled
1517 --enable-coverage build with coverage testing instrumentation
1518 --enable-dtrace build with DTrace support
1519 --enable-tap-tests enable TAP tests (requires Perl and IPC::Run)
1520 --enable-depend turn on automatic dependency tracking
1521 --enable-cassert enable assertion checks (for debugging)
1522 --disable-thread-safety disable thread-safety in client libraries
1523 --disable-largefile omit support for large files
1524 --disable-float4-byval disable float4 passed by value
1525 --disable-float8-byval disable float8 passed by value
1528 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1529 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1530 --with-extra-version=STRING
1531 append STRING to version
1532 --with-template=NAME override operating system template
1533 --with-includes=DIRS look for additional header files in DIRS
1534 --with-libraries=DIRS look for additional libraries in DIRS
1535 --with-libs=DIRS alternative spelling of --with-libraries
1536 --with-pgport=PORTNUM set default port number [5432]
1537 --with-blocksize=BLOCKSIZE
1538 set table block size in kB [8]
1539 --with-segsize=SEGSIZE set table segment size in GB [1]
1540 --with-wal-blocksize=BLOCKSIZE
1541 set WAL block size in kB [8]
1542 --with-CC=CMD set compiler (deprecated)
1543 --with-llvm build with LLVM based JIT support
1544 --with-icu build with ICU support
1545 --with-tcl build Tcl modules (PL/Tcl)
1546 --with-tclconfig=DIR tclConfig.sh is in DIR
1547 --with-perl build Perl modules (PL/Perl)
1548 --with-python build Python modules (PL/Python)
1549 --with-gssapi build with GSSAPI support
1550 --with-krb-srvnam=NAME default service principal name in Kerberos (GSSAPI)
1552 --with-pam build with PAM support
1553 --with-bsd-auth build with BSD Authentication support
1554 --with-ldap build with LDAP support
1555 --with-bonjour build with Bonjour support
1556 --with-openssl build with OpenSSL support
1557 --with-selinux build with SELinux support
1558 --with-systemd build with systemd support
1559 --without-readline do not use GNU Readline nor BSD Libedit for editing
1560 --with-libedit-preferred
1561 prefer BSD Libedit over GNU Readline
1562 --with-uuid=LIB build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1563 --with-ossp-uuid obsolete spelling of --with-uuid=ossp
1564 --with-libxml build with XML support
1565 --with-libxslt use XSLT support when building contrib/xml2
1566 --with-system-tzdata=DIR
1567 use system time zone data in DIR
1568 --without-zlib do not use Zlib
1569 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1571 Some influential environment variables:
1572 CC C compiler command
1573 CFLAGS C compiler flags
1574 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1575 nonstandard directory <lib dir>
1576 LIBS libraries to pass to the linker, e.g. -l<library>
1577 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1578 you have headers in a nonstandard directory <include dir>
1579 CXX C++ compiler command
1580 CXXFLAGS C++ compiler flags
1581 LLVM_CONFIG path to llvm-config command
1582 CLANG path to clang compiler to generate bitcode
1584 PKG_CONFIG path to pkg-config utility
1586 directories to add to pkg-config's search path
1588 path overriding pkg-config's built-in search path
1589 ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
1590 ICU_LIBS linker flags for ICU, overriding pkg-config
1591 LDFLAGS_EX extra linker flags for linking executables only
1592 LDFLAGS_SL extra linker flags for linking shared libraries only
1594 Use these variables to override the choices made by `configure' or to help
1595 it to find libraries and programs with nonstandard names/locations.
1597 Report bugs to <pgsql-bugs@postgresql.org>.
1602 if test "$ac_init_help" = "recursive"; then
1603 # If there are subdirs, report their specific --help.
1604 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1605 test -d "$ac_dir" ||
1606 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1611 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1613 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1614 # A ".." for each directory in $ac_dir_suffix.
1615 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1616 case $ac_top_builddir_sub in
1617 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1618 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1621 ac_abs_top_builddir=$ac_pwd
1622 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1623 # for backward compatibility:
1624 ac_top_builddir=$ac_top_build_prefix
1627 .) # We are building in place.
1629 ac_top_srcdir=$ac_top_builddir_sub
1630 ac_abs_top_srcdir=$ac_pwd ;;
1631 [\\/]* | ?:[\\/]* ) # Absolute name.
1632 ac_srcdir=$srcdir$ac_dir_suffix;
1633 ac_top_srcdir=$srcdir
1634 ac_abs_top_srcdir=$srcdir ;;
1636 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1637 ac_top_srcdir=$ac_top_build_prefix$srcdir
1638 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1640 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1642 cd "$ac_dir" || { ac_status=$?; continue; }
1643 # Check for guested configure.
1644 if test -f "$ac_srcdir/configure.gnu"; then
1646 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1647 elif test -f "$ac_srcdir/configure"; then
1649 $SHELL "$ac_srcdir/configure" --help=recursive
1651 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1653 cd "$ac_pwd" || { ac_status=$?; break; }
1657 test -n "$ac_init_help" && exit $ac_status
1658 if $ac_init_version; then
1660 PostgreSQL configure 12devel
1661 generated by GNU Autoconf 2.69
1663 Copyright (C) 2012 Free Software Foundation, Inc.
1664 This configure script is free software; the Free Software Foundation
1665 gives unlimited permission to copy, distribute and modify it.
1667 Copyright (c) 1996-2018, PostgreSQL Global Development Group
1672 ## ------------------------ ##
1673 ## Autoconf initialization. ##
1674 ## ------------------------ ##
1676 # ac_fn_c_try_compile LINENO
1677 # --------------------------
1678 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1679 ac_fn_c_try_compile ()
1681 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1682 rm -f conftest.$ac_objext
1683 if { { ac_try="$ac_compile"
1685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1686 *) ac_try_echo=$ac_try;;
1688 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1689 $as_echo "$ac_try_echo"; } >&5
1690 (eval "$ac_compile") 2>conftest.err
1692 if test -s conftest.err; then
1693 grep -v '^ *+' conftest.err >conftest.er1
1694 cat conftest.er1 >&5
1695 mv -f conftest.er1 conftest.err
1697 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1698 test $ac_status = 0; } && {
1699 test -z "$ac_c_werror_flag" ||
1700 test ! -s conftest.err
1701 } && test -s conftest.$ac_objext; then :
1704 $as_echo "$as_me: failed program was:" >&5
1705 sed 's/^/| /' conftest.$ac_ext >&5
1709 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1710 as_fn_set_status $ac_retval
1712 } # ac_fn_c_try_compile
1714 # ac_fn_cxx_try_compile LINENO
1715 # ----------------------------
1716 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1717 ac_fn_cxx_try_compile ()
1719 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1720 rm -f conftest.$ac_objext
1721 if { { ac_try="$ac_compile"
1723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1724 *) ac_try_echo=$ac_try;;
1726 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1727 $as_echo "$ac_try_echo"; } >&5
1728 (eval "$ac_compile") 2>conftest.err
1730 if test -s conftest.err; then
1731 grep -v '^ *+' conftest.err >conftest.er1
1732 cat conftest.er1 >&5
1733 mv -f conftest.er1 conftest.err
1735 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1736 test $ac_status = 0; } && {
1737 test -z "$ac_cxx_werror_flag" ||
1738 test ! -s conftest.err
1739 } && test -s conftest.$ac_objext; then :
1742 $as_echo "$as_me: failed program was:" >&5
1743 sed 's/^/| /' conftest.$ac_ext >&5
1747 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1748 as_fn_set_status $ac_retval
1750 } # ac_fn_cxx_try_compile
1752 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1753 # ---------------------------------------------
1754 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1756 ac_fn_c_check_decl ()
1758 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1759 as_decl_name=`echo $2|sed 's/ *(.*//'`
1760 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1762 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
1763 if eval \${$3+:} false; then :
1764 $as_echo_n "(cached) " >&6
1766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1767 /* end confdefs.h. */
1772 #ifndef $as_decl_name
1774 (void) $as_decl_use;
1776 (void) $as_decl_name;
1784 if ac_fn_c_try_compile "$LINENO"; then :
1789 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1793 $as_echo "$ac_res" >&6; }
1794 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1796 } # ac_fn_c_check_decl
1798 # ac_fn_c_try_link LINENO
1799 # -----------------------
1800 # Try to link conftest.$ac_ext, and return whether this succeeded.
1803 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1804 rm -f conftest.$ac_objext conftest$ac_exeext
1805 if { { ac_try="$ac_link"
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_link") 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; } && {
1821 test -z "$ac_c_werror_flag" ||
1822 test ! -s conftest.err
1823 } && test -s conftest$ac_exeext && {
1824 test "$cross_compiling" = yes ||
1825 test -x conftest$ac_exeext
1829 $as_echo "$as_me: failed program was:" >&5
1830 sed 's/^/| /' conftest.$ac_ext >&5
1834 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1835 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1836 # interfere with the next link command; also delete a directory that is
1837 # left behind by Apple's compiler. We do this before executing the actions.
1838 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1839 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1840 as_fn_set_status $ac_retval
1842 } # ac_fn_c_try_link
1844 # ac_fn_c_try_cpp LINENO
1845 # ----------------------
1846 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1849 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1850 if { { ac_try="$ac_cpp conftest.$ac_ext"
1852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1853 *) ac_try_echo=$ac_try;;
1855 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1856 $as_echo "$ac_try_echo"; } >&5
1857 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1859 if test -s conftest.err; then
1860 grep -v '^ *+' conftest.err >conftest.er1
1861 cat conftest.er1 >&5
1862 mv -f conftest.er1 conftest.err
1864 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1865 test $ac_status = 0; } > conftest.i && {
1866 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1867 test ! -s conftest.err
1871 $as_echo "$as_me: failed program was:" >&5
1872 sed 's/^/| /' conftest.$ac_ext >&5
1876 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1877 as_fn_set_status $ac_retval
1881 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1882 # -------------------------------------------------------
1883 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1884 # the include files in INCLUDES and setting the cache variable VAR
1886 ac_fn_c_check_header_mongrel ()
1888 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1889 if eval \${$3+:} false; then :
1890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1891 $as_echo_n "checking for $2... " >&6; }
1892 if eval \${$3+:} false; then :
1893 $as_echo_n "(cached) " >&6
1896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1897 $as_echo "$ac_res" >&6; }
1899 # Is the header compilable?
1900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1901 $as_echo_n "checking $2 usability... " >&6; }
1902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1903 /* end confdefs.h. */
1907 if ac_fn_c_try_compile "$LINENO"; then :
1908 ac_header_compiler=yes
1910 ac_header_compiler=no
1912 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1914 $as_echo "$ac_header_compiler" >&6; }
1916 # Is the header present?
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1918 $as_echo_n "checking $2 presence... " >&6; }
1919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1920 /* end confdefs.h. */
1923 if ac_fn_c_try_cpp "$LINENO"; then :
1924 ac_header_preproc=yes
1926 ac_header_preproc=no
1928 rm -f conftest.err conftest.i conftest.$ac_ext
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1930 $as_echo "$ac_header_preproc" >&6; }
1932 # So? What about this header?
1933 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1936 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1937 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1938 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1942 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1943 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1944 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1945 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1946 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1947 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1948 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1949 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1950 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1951 ( $as_echo "## ---------------------------------------- ##
1952 ## Report this to pgsql-bugs@postgresql.org ##
1953 ## ---------------------------------------- ##"
1954 ) | sed "s/^/$as_me: WARNING: /" >&2
1957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1958 $as_echo_n "checking for $2... " >&6; }
1959 if eval \${$3+:} false; then :
1960 $as_echo_n "(cached) " >&6
1962 eval "$3=\$ac_header_compiler"
1965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1966 $as_echo "$ac_res" >&6; }
1968 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1970 } # ac_fn_c_check_header_mongrel
1972 # ac_fn_c_try_run LINENO
1973 # ----------------------
1974 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1975 # that executables *can* be run.
1978 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1979 if { { ac_try="$ac_link"
1981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1982 *) ac_try_echo=$ac_try;;
1984 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1985 $as_echo "$ac_try_echo"; } >&5
1986 (eval "$ac_link") 2>&5
1988 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1989 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1990 { { case "(($ac_try" in
1991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1992 *) ac_try_echo=$ac_try;;
1994 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1995 $as_echo "$ac_try_echo"; } >&5
1996 (eval "$ac_try") 2>&5
1998 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1999 test $ac_status = 0; }; }; then :
2002 $as_echo "$as_me: program exited with status $ac_status" >&5
2003 $as_echo "$as_me: failed program was:" >&5
2004 sed 's/^/| /' conftest.$ac_ext >&5
2006 ac_retval=$ac_status
2008 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2009 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2010 as_fn_set_status $ac_retval
2014 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2015 # -------------------------------------------------------
2016 # Tests whether HEADER exists and can be compiled using the include files in
2017 # INCLUDES, setting the cache variable VAR accordingly.
2018 ac_fn_c_check_header_compile ()
2020 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2022 $as_echo_n "checking for $2... " >&6; }
2023 if eval \${$3+:} false; then :
2024 $as_echo_n "(cached) " >&6
2026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2027 /* end confdefs.h. */
2031 if ac_fn_c_try_compile "$LINENO"; then :
2036 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2040 $as_echo "$ac_res" >&6; }
2041 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2043 } # ac_fn_c_check_header_compile
2045 # ac_fn_c_check_func LINENO FUNC VAR
2046 # ----------------------------------
2047 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2048 ac_fn_c_check_func ()
2050 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2052 $as_echo_n "checking for $2... " >&6; }
2053 if eval \${$3+:} false; then :
2054 $as_echo_n "(cached) " >&6
2056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2057 /* end confdefs.h. */
2058 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2059 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2060 #define $2 innocuous_$2
2062 /* System header to define __stub macros and hopefully few prototypes,
2063 which can conflict with char $2 (); below.
2064 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2065 <limits.h> exists even on freestanding compilers. */
2068 # include <limits.h>
2070 # include <assert.h>
2075 /* Override any GCC internal prototype to avoid an error.
2076 Use char because int might match the return type of a GCC
2077 builtin and then its argument prototype would still apply. */
2082 /* The GNU C library defines this for functions which it implements
2083 to always fail with ENOSYS. Some functions are actually named
2084 something starting with __ and the normal name is an alias. */
2085 #if defined __stub_$2 || defined __stub___$2
2097 if ac_fn_c_try_link "$LINENO"; then :
2102 rm -f core conftest.err conftest.$ac_objext \
2103 conftest$ac_exeext conftest.$ac_ext
2106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2107 $as_echo "$ac_res" >&6; }
2108 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2110 } # ac_fn_c_check_func
2112 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2113 # -------------------------------------------
2114 # Tests whether TYPE exists after having included INCLUDES, setting cache
2115 # variable VAR accordingly.
2116 ac_fn_c_check_type ()
2118 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2120 $as_echo_n "checking for $2... " >&6; }
2121 if eval \${$3+:} false; then :
2122 $as_echo_n "(cached) " >&6
2125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2126 /* end confdefs.h. */
2137 if ac_fn_c_try_compile "$LINENO"; then :
2138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2139 /* end confdefs.h. */
2150 if ac_fn_c_try_compile "$LINENO"; then :
2155 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2157 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2161 $as_echo "$ac_res" >&6; }
2162 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2164 } # ac_fn_c_check_type
2166 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2167 # ----------------------------------------------------
2168 # Tries to find if the field MEMBER exists in type AGGR, after including
2169 # INCLUDES, setting cache variable VAR accordingly.
2170 ac_fn_c_check_member ()
2172 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2174 $as_echo_n "checking for $2.$3... " >&6; }
2175 if eval \${$4+:} false; then :
2176 $as_echo_n "(cached) " >&6
2178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2179 /* end confdefs.h. */
2191 if ac_fn_c_try_compile "$LINENO"; then :
2194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2195 /* end confdefs.h. */
2201 if (sizeof ac_aggr.$3)
2207 if ac_fn_c_try_compile "$LINENO"; then :
2212 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2218 $as_echo "$ac_res" >&6; }
2219 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2221 } # ac_fn_c_check_member
2223 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2224 # --------------------------------------------
2225 # Tries to find the compile-time value of EXPR in a program that includes
2226 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2228 ac_fn_c_compute_int ()
2230 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2231 if test "$cross_compiling" = yes; then
2232 # Depending upon the size, compute the lo and hi bounds.
2233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2234 /* end confdefs.h. */
2239 static int test_array [1 - 2 * !(($2) >= 0)];
2241 return test_array [0];
2247 if ac_fn_c_try_compile "$LINENO"; then :
2250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2251 /* end confdefs.h. */
2256 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2258 return test_array [0];
2264 if ac_fn_c_try_compile "$LINENO"; then :
2265 ac_hi=$ac_mid; break
2267 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2268 if test $ac_lo -le $ac_mid; then
2272 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2274 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2278 /* end confdefs.h. */
2283 static int test_array [1 - 2 * !(($2) < 0)];
2285 return test_array [0];
2291 if ac_fn_c_try_compile "$LINENO"; then :
2294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2295 /* end confdefs.h. */
2300 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2302 return test_array [0];
2308 if ac_fn_c_try_compile "$LINENO"; then :
2309 ac_lo=$ac_mid; break
2311 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2312 if test $ac_mid -le $ac_hi; then
2316 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2318 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2323 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2325 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2326 # Binary search between lo and hi bounds.
2327 while test "x$ac_lo" != "x$ac_hi"; do
2328 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2330 /* end confdefs.h. */
2335 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2337 return test_array [0];
2343 if ac_fn_c_try_compile "$LINENO"; then :
2346 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2348 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2351 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2356 /* end confdefs.h. */
2358 static long int longval () { return $2; }
2359 static unsigned long int ulongval () { return $2; }
2366 FILE *f = fopen ("conftest.val", "w");
2371 long int i = longval ();
2374 fprintf (f, "%ld", i);
2378 unsigned long int i = ulongval ();
2381 fprintf (f, "%lu", i);
2383 /* Do not output a trailing newline, as this causes \r\n confusion
2384 on some platforms. */
2385 return ferror (f) || fclose (f) != 0;
2391 if ac_fn_c_try_run "$LINENO"; then :
2392 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2396 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2397 conftest.$ac_objext conftest.beam conftest.$ac_ext
2401 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2402 as_fn_set_status $ac_retval
2404 } # ac_fn_c_compute_int
2405 cat >config.log <<_ACEOF
2406 This file contains any messages produced by compilers while
2407 running configure, to aid debugging if configure makes a mistake.
2409 It was created by PostgreSQL $as_me 12devel, which was
2410 generated by GNU Autoconf 2.69. Invocation command line was
2422 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2423 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2424 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2425 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2426 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2428 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2429 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2431 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2432 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2433 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2434 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2435 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2436 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2437 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2441 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2445 test -z "$as_dir" && as_dir=.
2446 $as_echo "PATH: $as_dir"
2462 # Keep a trace of the command line.
2463 # Strip out --no-create and --no-recursion so they do not pile up.
2464 # Strip out --silent because we don't want to record it for future runs.
2465 # Also quote any args containing shell meta-characters.
2466 # Make two passes to allow for proper duplicate-argument suppression.
2470 ac_must_keep_next=false
2476 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2477 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2478 | -silent | --silent | --silen | --sile | --sil)
2481 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2484 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2486 as_fn_append ac_configure_args1 " '$ac_arg'"
2487 if test $ac_must_keep_next = true; then
2488 ac_must_keep_next=false # Got value, back to normal.
2491 *=* | --config-cache | -C | -disable-* | --disable-* \
2492 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2493 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2494 | -with-* | --with-* | -without-* | --without-* | --x)
2495 case "$ac_configure_args0 " in
2496 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2499 -* ) ac_must_keep_next=true ;;
2502 as_fn_append ac_configure_args " '$ac_arg'"
2507 { ac_configure_args0=; unset ac_configure_args0;}
2508 { ac_configure_args1=; unset ac_configure_args1;}
2510 # When interrupted or exit'd, cleanup temporary files, and complete
2511 # config.log. We remove comments because anyway the quotes in there
2512 # would cause problems or look ugly.
2513 # WARNING: Use '\'' to represent an apostrophe within the trap.
2514 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2515 trap 'exit_status=$?
2516 # Save into config.log some information that might help in debugging.
2520 $as_echo "## ---------------- ##
2521 ## Cache variables. ##
2522 ## ---------------- ##"
2524 # The following way of writing the cache mishandles newlines in values,
2526 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2527 eval ac_val=\$$ac_var
2531 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2532 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2535 _ | IFS | as_nl) ;; #(
2536 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2537 *) { eval $ac_var=; unset $ac_var;} ;;
2542 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2543 *${as_nl}ac_space=\ *)
2545 "s/'\''/'\''\\\\'\'''\''/g;
2546 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2549 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2556 $as_echo "## ----------------- ##
2557 ## Output variables. ##
2558 ## ----------------- ##"
2560 for ac_var in $ac_subst_vars
2562 eval ac_val=\$$ac_var
2564 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2566 $as_echo "$ac_var='\''$ac_val'\''"
2570 if test -n "$ac_subst_files"; then
2571 $as_echo "## ------------------- ##
2572 ## File substitutions. ##
2573 ## ------------------- ##"
2575 for ac_var in $ac_subst_files
2577 eval ac_val=\$$ac_var
2579 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2581 $as_echo "$ac_var='\''$ac_val'\''"
2586 if test -s confdefs.h; then
2587 $as_echo "## ----------- ##
2594 test "$ac_signal" != 0 &&
2595 $as_echo "$as_me: caught signal $ac_signal"
2596 $as_echo "$as_me: exit $exit_status"
2598 rm -f core *.core core.conftest.* &&
2599 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2602 for ac_signal in 1 2 13 15; do
2603 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2607 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2608 rm -f -r conftest* confdefs.h
2610 $as_echo "/* confdefs.h */" > confdefs.h
2612 # Predefined preprocessor variables.
2614 cat >>confdefs.h <<_ACEOF
2615 #define PACKAGE_NAME "$PACKAGE_NAME"
2618 cat >>confdefs.h <<_ACEOF
2619 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2622 cat >>confdefs.h <<_ACEOF
2623 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2626 cat >>confdefs.h <<_ACEOF
2627 #define PACKAGE_STRING "$PACKAGE_STRING"
2630 cat >>confdefs.h <<_ACEOF
2631 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2634 cat >>confdefs.h <<_ACEOF
2635 #define PACKAGE_URL "$PACKAGE_URL"
2639 # Let the site file select an alternate cache file if it wants to.
2640 # Prefer an explicitly selected file to automatically selected ones.
2643 if test -n "$CONFIG_SITE"; then
2644 # We do not want a PATH search for config.site.
2645 case $CONFIG_SITE in #((
2646 -*) ac_site_file1=./$CONFIG_SITE;;
2647 */*) ac_site_file1=$CONFIG_SITE;;
2648 *) ac_site_file1=./$CONFIG_SITE;;
2650 elif test "x$prefix" != xNONE; then
2651 ac_site_file1=$prefix/share/config.site
2652 ac_site_file2=$prefix/etc/config.site
2654 ac_site_file1=$ac_default_prefix/share/config.site
2655 ac_site_file2=$ac_default_prefix/etc/config.site
2657 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2659 test "x$ac_site_file" = xNONE && continue
2660 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2661 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2662 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2663 sed 's/^/| /' "$ac_site_file" >&5
2665 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2666 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2667 as_fn_error $? "failed to load site script $ac_site_file
2668 See \`config.log' for more details" "$LINENO" 5; }
2672 if test -r "$cache_file"; then
2673 # Some versions of bash will fail to source /dev/null (special files
2674 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2675 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2676 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2677 $as_echo "$as_me: loading cache $cache_file" >&6;}
2679 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2680 *) . "./$cache_file";;
2684 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2685 $as_echo "$as_me: creating cache $cache_file" >&6;}
2689 # Check that the precious variables saved in the cache have kept the same
2691 ac_cache_corrupted=false
2692 for ac_var in $ac_precious_vars; do
2693 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2694 eval ac_new_set=\$ac_env_${ac_var}_set
2695 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2696 eval ac_new_val=\$ac_env_${ac_var}_value
2697 case $ac_old_set,$ac_new_set in
2699 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2700 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2701 ac_cache_corrupted=: ;;
2703 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2704 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2705 ac_cache_corrupted=: ;;
2708 if test "x$ac_old_val" != "x$ac_new_val"; then
2709 # differences in whitespace do not lead to failure.
2710 ac_old_val_w=`echo x $ac_old_val`
2711 ac_new_val_w=`echo x $ac_new_val`
2712 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2713 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2714 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2715 ac_cache_corrupted=:
2717 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2718 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2719 eval $ac_var=\$ac_old_val
2721 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2722 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2723 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2724 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2727 # Pass precious variables to config.status.
2728 if test "$ac_new_set" = set; then
2730 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2731 *) ac_arg=$ac_var=$ac_new_val ;;
2733 case " $ac_configure_args " in
2734 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2735 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2739 if $ac_cache_corrupted; then
2740 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2741 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2742 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2743 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2744 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2746 ## -------------------- ##
2747 ## Main body of script. ##
2748 ## -------------------- ##
2751 ac_cpp='$CPP $CPPFLAGS'
2752 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2753 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2754 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2762 for ac_dir in config "$srcdir"/config; do
2763 if test -f "$ac_dir/install-sh"; then
2765 ac_install_sh="$ac_aux_dir/install-sh -c"
2767 elif test -f "$ac_dir/install.sh"; then
2769 ac_install_sh="$ac_aux_dir/install.sh -c"
2771 elif test -f "$ac_dir/shtool"; then
2773 ac_install_sh="$ac_aux_dir/shtool install -c"
2777 if test -z "$ac_aux_dir"; then
2778 as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2781 # These three variables are undocumented and unsupported,
2782 # and are intended to be withdrawn in a future Autoconf release.
2783 # They can cause serious problems if a builder's source tree is in a directory
2784 # whose full name contains unusual characters.
2785 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2786 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2787 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2791 configure_args=$ac_configure_args
2794 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2797 cat >>confdefs.h <<_ACEOF
2798 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2805 # Check whether --with-extra-version was given.
2806 if test "${with_extra_version+set}" = set; then :
2807 withval=$with_extra_version;
2810 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2813 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2816 PG_VERSION="$PACKAGE_VERSION$withval"
2821 PG_VERSION="$PACKAGE_VERSION"
2826 cat >>confdefs.h <<_ACEOF
2827 #define PG_VERSION "$PG_VERSION"
2831 # Make sure we can run config.sub.
2832 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2833 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2836 $as_echo_n "checking build system type... " >&6; }
2837 if ${ac_cv_build+:} false; then :
2838 $as_echo_n "(cached) " >&6
2840 ac_build_alias=$build_alias
2841 test "x$ac_build_alias" = x &&
2842 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2843 test "x$ac_build_alias" = x &&
2844 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2845 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2846 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2850 $as_echo "$ac_cv_build" >&6; }
2851 case $ac_cv_build in
2853 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2856 ac_save_IFS=$IFS; IFS='-'
2862 # Remember, the first character of IFS is used to create $*,
2863 # except with old shells:
2866 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2870 $as_echo_n "checking host system type... " >&6; }
2871 if ${ac_cv_host+:} false; then :
2872 $as_echo_n "(cached) " >&6
2874 if test "x$host_alias" = x; then
2875 ac_cv_host=$ac_cv_build
2877 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2878 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2883 $as_echo "$ac_cv_host" >&6; }
2886 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2889 ac_save_IFS=$IFS; IFS='-'
2895 # Remember, the first character of IFS is used to create $*,
2896 # except with old shells:
2899 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2905 $as_echo_n "checking which template to use... " >&6; }
2910 # Check whether --with-template was given.
2911 if test "${with_template+set}" = set; then :
2912 withval=$with_template;
2915 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2918 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2923 list) echo; ls "$srcdir/src/template"; exit;;
2924 *) if test -f "$srcdir/src/template/$with_template" ; then
2927 as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2936 # --with-template not given
2939 aix*) template=aix ;;
2940 cygwin*) template=cygwin ;;
2941 darwin*) template=darwin ;;
2942 dragonfly*) template=netbsd ;;
2943 freebsd*) template=freebsd ;;
2944 hpux*) template=hpux ;;
2945 linux*|gnu*|k*bsd*-gnu)
2947 mingw*) template=win32 ;;
2948 netbsd*) template=netbsd ;;
2949 openbsd*) template=openbsd ;;
2950 solaris*) template=solaris ;;
2953 if test x"$template" = x"" ; then
2955 *******************************************************************
2956 PostgreSQL has apparently not been ported to your platform yet.
2957 To try a manual configuration, look into the src/template directory
2958 for a similar platform and use the '--with-template=' option.
2960 Please also contact <pgsql-bugs@postgresql.org> to see about
2961 rectifying this. Include the above 'checking host system type...'
2963 *******************************************************************
2972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2973 $as_echo "$template" >&6; }
2978 # Initialize default assumption that we do not need separate assembly code
2979 # for TAS (test-and-set). This can be overridden by the template file
2980 # when it's executed.
2987 ## Command line options
2991 # Add non-standard directories to the include path
2996 # Check whether --with-includes was given.
2997 if test "${with_includes+set}" = set; then :
2998 withval=$with_includes;
3001 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3004 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3017 # Add non-standard directories to the library search path
3022 # Check whether --with-libraries was given.
3023 if test "${with_libraries+set}" = set; then :
3024 withval=$with_libraries;
3027 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3030 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3033 LIBRARY_DIRS=$withval
3044 # Check whether --with-libs was given.
3045 if test "${with_libs+set}" = set; then :
3049 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3052 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3055 LIBRARY_DIRS=$withval
3065 # 64-bit integer date/time storage is now the only option, but to avoid
3066 # unnecessary breakage of build scripts, continue to accept an explicit
3067 # "--enable-integer-datetimes" switch.
3071 # Check whether --enable-integer-datetimes was given.
3072 if test "${enable_integer_datetimes+set}" = set; then :
3073 enableval=$enable_integer_datetimes;
3079 as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3082 as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3087 enable_integer_datetimes=yes
3097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3098 $as_echo_n "checking whether NLS is wanted... " >&6; }
3101 # Check whether --enable-nls was given.
3102 if test "${enable_nls+set}" = set; then :
3103 enableval=$enable_nls;
3113 WANTED_LANGUAGES=$enableval
3123 if test "$enable_nls" = yes; then
3125 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3130 $as_echo "$enable_nls" >&6; }
3135 # Default port number (--with-pgport), default 5432
3137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3138 $as_echo_n "checking for default port number... " >&6; }
3142 # Check whether --with-pgport was given.
3143 if test "${with_pgport+set}" = set; then :
3144 withval=$with_pgport;
3147 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3150 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3153 default_port=$withval
3162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3163 $as_echo "$default_port" >&6; }
3164 # Need both of these because some places want an integer and some a string
3166 cat >>confdefs.h <<_ACEOF
3167 #define DEF_PGPORT ${default_port}
3171 cat >>confdefs.h <<_ACEOF
3172 #define DEF_PGPORT_STR "${default_port}"
3177 # It's worth validating port; you can get very confusing errors otherwise
3178 if test x"$default_port" = x""; then
3179 as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3180 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3181 as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3182 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3183 as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3184 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3185 as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3189 # '-rpath'-like feature can be disabled
3193 # Check whether --enable-rpath was given.
3194 if test "${enable_rpath+set}" = set; then :
3195 enableval=$enable_rpath;
3204 as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3221 # Check whether --enable-spinlocks was given.
3222 if test "${enable_spinlocks+set}" = set; then :
3223 enableval=$enable_spinlocks;
3232 as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3237 enable_spinlocks=yes
3248 # Check whether --enable-atomics was given.
3249 if test "${enable_atomics+set}" = set; then :
3250 enableval=$enable_atomics;
3259 as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3271 # Random number generation
3275 # Check whether --enable-strong-random was given.
3276 if test "${enable_strong_random+set}" = set; then :
3277 enableval=$enable_strong_random;
3286 as_fn_error $? "no argument expected for --enable-strong-random option" "$LINENO" 5
3291 enable_strong_random=yes
3299 # --enable-debug adds -g to compiler flags
3303 # Check whether --enable-debug was given.
3304 if test "${enable_debug+set}" = set; then :
3305 enableval=$enable_debug;
3314 as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3327 # --enable-profiling enables gcc profiling
3331 # Check whether --enable-profiling was given.
3332 if test "${enable_profiling+set}" = set; then :
3333 enableval=$enable_profiling;
3342 as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3354 # --enable-coverage enables generation of code coverage metrics with gcov
3358 # Check whether --enable-coverage was given.
3359 if test "${enable_coverage+set}" = set; then :
3360 enableval=$enable_coverage;
3363 if test -z "$GCOV"; then
3366 # Extract the first word of "$ac_prog", so it can be a program name with args.
3367 set dummy $ac_prog; ac_word=$2
3368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3369 $as_echo_n "checking for $ac_word... " >&6; }
3370 if ${ac_cv_path_GCOV+:} false; then :
3371 $as_echo_n "(cached) " >&6
3375 ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3378 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3382 test -z "$as_dir" && as_dir=.
3383 for ac_exec_ext in '' $ac_executable_extensions; do
3384 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3385 ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3386 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3396 GCOV=$ac_cv_path_GCOV
3397 if test -n "$GCOV"; then
3398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3399 $as_echo "$GCOV" >&6; }
3401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3402 $as_echo "no" >&6; }
3406 test -n "$GCOV" && break
3410 # Report the value of GCOV in configure's output in all cases.
3411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3412 $as_echo_n "checking for GCOV... " >&6; }
3413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3414 $as_echo "$GCOV" >&6; }
3417 if test -z "$GCOV"; then
3418 as_fn_error $? "gcov not found" "$LINENO" 5
3420 if test -z "$LCOV"; then
3423 # Extract the first word of "$ac_prog", so it can be a program name with args.
3424 set dummy $ac_prog; ac_word=$2
3425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3426 $as_echo_n "checking for $ac_word... " >&6; }
3427 if ${ac_cv_path_LCOV+:} false; then :
3428 $as_echo_n "(cached) " >&6
3432 ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3435 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3439 test -z "$as_dir" && as_dir=.
3440 for ac_exec_ext in '' $ac_executable_extensions; do
3441 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3442 ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3443 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3453 LCOV=$ac_cv_path_LCOV
3454 if test -n "$LCOV"; then
3455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3456 $as_echo "$LCOV" >&6; }
3458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3459 $as_echo "no" >&6; }
3463 test -n "$LCOV" && break
3467 # Report the value of LCOV in configure's output in all cases.
3468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3469 $as_echo_n "checking for LCOV... " >&6; }
3470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3471 $as_echo "$LCOV" >&6; }
3474 if test -z "$LCOV"; then
3475 as_fn_error $? "lcov not found" "$LINENO" 5
3477 if test -z "$GENHTML"; then
3478 for ac_prog in genhtml
3480 # Extract the first word of "$ac_prog", so it can be a program name with args.
3481 set dummy $ac_prog; ac_word=$2
3482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3483 $as_echo_n "checking for $ac_word... " >&6; }
3484 if ${ac_cv_path_GENHTML+:} false; then :
3485 $as_echo_n "(cached) " >&6
3489 ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3492 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3496 test -z "$as_dir" && as_dir=.
3497 for ac_exec_ext in '' $ac_executable_extensions; do
3498 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3499 ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3500 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3510 GENHTML=$ac_cv_path_GENHTML
3511 if test -n "$GENHTML"; then
3512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3513 $as_echo "$GENHTML" >&6; }
3515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3516 $as_echo "no" >&6; }
3520 test -n "$GENHTML" && break
3524 # Report the value of GENHTML in configure's output in all cases.
3525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3526 $as_echo_n "checking for GENHTML... " >&6; }
3527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3528 $as_echo "$GENHTML" >&6; }
3531 if test -z "$GENHTML"; then
3532 as_fn_error $? "genhtml not found" "$LINENO" 5
3539 as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3556 # Check whether --enable-dtrace was given.
3557 if test "${enable_dtrace+set}" = set; then :
3558 enableval=$enable_dtrace;
3561 if test -z "$DTRACE"; then
3562 for ac_prog in dtrace
3564 # Extract the first word of "$ac_prog", so it can be a program name with args.
3565 set dummy $ac_prog; ac_word=$2
3566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3567 $as_echo_n "checking for $ac_word... " >&6; }
3568 if ${ac_cv_path_DTRACE+:} false; then :
3569 $as_echo_n "(cached) " >&6
3573 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3576 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3580 test -z "$as_dir" && as_dir=.
3581 for ac_exec_ext in '' $ac_executable_extensions; do
3582 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3583 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3584 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3594 DTRACE=$ac_cv_path_DTRACE
3595 if test -n "$DTRACE"; then
3596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3597 $as_echo "$DTRACE" >&6; }
3599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3600 $as_echo "no" >&6; }
3604 test -n "$DTRACE" && break
3608 # Report the value of DTRACE in configure's output in all cases.
3609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3610 $as_echo_n "checking for DTRACE... " >&6; }
3611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3612 $as_echo "$DTRACE" >&6; }
3615 if test -z "$DTRACE"; then
3616 as_fn_error $? "dtrace not found" "$LINENO" 5
3624 as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3641 # Check whether --enable-tap-tests was given.
3642 if test "${enable_tap_tests+set}" = set; then :
3643 enableval=$enable_tap_tests;
3652 as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3668 $as_echo_n "checking for block size... " >&6; }
3672 # Check whether --with-blocksize was given.
3673 if test "${with_blocksize+set}" = set; then :
3674 withval=$with_blocksize;
3677 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3680 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3692 case ${blocksize} in
3699 *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3702 $as_echo "${blocksize}kB" >&6; }
3705 cat >>confdefs.h <<_ACEOF
3706 #define BLCKSZ ${BLCKSZ}
3711 # Relation segment size
3713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3714 $as_echo_n "checking for segment size... " >&6; }
3718 # Check whether --with-segsize was given.
3719 if test "${with_segsize+set}" = set; then :
3720 withval=$with_segsize;
3723 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3726 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3738 # this expression is set up to avoid unnecessary integer overflow
3739 # blocksize is already guaranteed to be a factor of 1024
3740 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3741 test $? -eq 0 || exit 1
3742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3743 $as_echo "${segsize}GB" >&6; }
3746 cat >>confdefs.h <<_ACEOF
3747 #define RELSEG_SIZE ${RELSEG_SIZE}
3754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3755 $as_echo_n "checking for WAL block size... " >&6; }
3759 # Check whether --with-wal-blocksize was given.
3760 if test "${with_wal_blocksize+set}" = set; then :
3761 withval=$with_wal_blocksize;
3764 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3767 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3770 wal_blocksize=$withval
3779 case ${wal_blocksize} in
3780 1) XLOG_BLCKSZ=1024;;
3781 2) XLOG_BLCKSZ=2048;;
3782 4) XLOG_BLCKSZ=4096;;
3783 8) XLOG_BLCKSZ=8192;;
3784 16) XLOG_BLCKSZ=16384;;
3785 32) XLOG_BLCKSZ=32768;;
3786 64) XLOG_BLCKSZ=65536;;
3787 *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3790 $as_echo "${wal_blocksize}kB" >&6; }
3793 cat >>confdefs.h <<_ACEOF
3794 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3802 # For historical reasons you can also use --with-CC to specify the C compiler
3803 # to use, although the standard way to do this is to set the CC environment
3808 # Check whether --with-CC was given.
3809 if test "${with_CC+set}" = set; then :
3813 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3816 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3828 aix) pgac_cc_list="gcc xlc"; pgac_cxx_list="g++ xlC";;
3829 *) pgac_cc_list="gcc cc"; pgac_cxx_list="g++ c++";;
3833 ac_cpp='$CPP $CPPFLAGS'
3834 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3835 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3836 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3837 if test -n "$ac_tool_prefix"; then
3838 for ac_prog in $pgac_cc_list
3840 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3841 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3843 $as_echo_n "checking for $ac_word... " >&6; }
3844 if ${ac_cv_prog_CC+:} false; then :
3845 $as_echo_n "(cached) " >&6
3847 if test -n "$CC"; then
3848 ac_cv_prog_CC="$CC" # Let the user override the test.
3850 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3854 test -z "$as_dir" && as_dir=.
3855 for ac_exec_ext in '' $ac_executable_extensions; do
3856 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3857 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3858 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3868 if test -n "$CC"; then
3869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3870 $as_echo "$CC" >&6; }
3872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3873 $as_echo "no" >&6; }
3877 test -n "$CC" && break
3880 if test -z "$CC"; then
3882 for ac_prog in $pgac_cc_list
3884 # Extract the first word of "$ac_prog", so it can be a program name with args.
3885 set dummy $ac_prog; ac_word=$2
3886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3887 $as_echo_n "checking for $ac_word... " >&6; }
3888 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3889 $as_echo_n "(cached) " >&6
3891 if test -n "$ac_ct_CC"; then
3892 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3894 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3898 test -z "$as_dir" && as_dir=.
3899 for ac_exec_ext in '' $ac_executable_extensions; do
3900 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3901 ac_cv_prog_ac_ct_CC="$ac_prog"
3902 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3911 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3912 if test -n "$ac_ct_CC"; then
3913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3914 $as_echo "$ac_ct_CC" >&6; }
3916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3917 $as_echo "no" >&6; }
3921 test -n "$ac_ct_CC" && break
3924 if test "x$ac_ct_CC" = x; then
3927 case $cross_compiling:$ac_tool_warned in
3929 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3930 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3931 ac_tool_warned=yes ;;
3938 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3939 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3940 as_fn_error $? "no acceptable C compiler found in \$PATH
3941 See \`config.log' for more details" "$LINENO" 5; }
3943 # Provide some information about the compiler.
3944 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3947 for ac_option in --version -v -V -qversion; do
3948 { { ac_try="$ac_compiler $ac_option >&5"
3950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3951 *) ac_try_echo=$ac_try;;
3953 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3954 $as_echo "$ac_try_echo"; } >&5
3955 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3957 if test -s conftest.err; then
3959 ... rest of stderr output deleted ...
3960 10q' conftest.err >conftest.er1
3961 cat conftest.er1 >&5
3963 rm -f conftest.er1 conftest.err
3964 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3965 test $ac_status = 0; }
3968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3969 /* end confdefs.h. */
3979 ac_clean_files_save=$ac_clean_files
3980 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3981 # Try to create an executable without -o first, disregard a.out.
3982 # It will help us diagnose broken compilers, and finding out an intuition
3984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3985 $as_echo_n "checking whether the C compiler works... " >&6; }
3986 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3988 # The possible output files:
3989 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3992 for ac_file in $ac_files
3995 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3996 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4001 if { { ac_try="$ac_link_default"
4003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4004 *) ac_try_echo=$ac_try;;
4006 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4007 $as_echo "$ac_try_echo"; } >&5
4008 (eval "$ac_link_default") 2>&5
4010 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4011 test $ac_status = 0; }; then :
4012 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4013 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4014 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4015 # so that the user can short-circuit this test for compilers unknown to
4017 for ac_file in $ac_files ''
4019 test -f "$ac_file" || continue
4021 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4024 # We found the default executable, but exeext='' is most
4028 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4030 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4032 # We set ac_cv_exeext here because the later test for it is not
4033 # safe: cross compilers may not add the suffix if given an `-o'
4034 # argument, so we may need to know it at that point already.
4035 # Even if this section looks crufty: it has the advantage of
4042 test "$ac_cv_exeext" = no && ac_cv_exeext=
4047 if test -z "$ac_file"; then :
4048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4049 $as_echo "no" >&6; }
4050 $as_echo "$as_me: failed program was:" >&5
4051 sed 's/^/| /' conftest.$ac_ext >&5
4053 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4054 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4055 as_fn_error 77 "C compiler cannot create executables
4056 See \`config.log' for more details" "$LINENO" 5; }
4058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4059 $as_echo "yes" >&6; }
4061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4062 $as_echo_n "checking for C compiler default output file name... " >&6; }
4063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4064 $as_echo "$ac_file" >&6; }
4065 ac_exeext=$ac_cv_exeext
4067 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4068 ac_clean_files=$ac_clean_files_save
4069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4070 $as_echo_n "checking for suffix of executables... " >&6; }
4071 if { { ac_try="$ac_link"
4073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4074 *) ac_try_echo=$ac_try;;
4076 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4077 $as_echo "$ac_try_echo"; } >&5
4078 (eval "$ac_link") 2>&5
4080 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4081 test $ac_status = 0; }; then :
4082 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4083 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4084 # work properly (i.e., refer to `conftest.exe'), while it won't with
4086 for ac_file in conftest.exe conftest conftest.*; do
4087 test -f "$ac_file" || continue
4089 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4090 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4096 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4097 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4098 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4099 See \`config.log' for more details" "$LINENO" 5; }
4101 rm -f conftest conftest$ac_cv_exeext
4102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4103 $as_echo "$ac_cv_exeext" >&6; }
4105 rm -f conftest.$ac_ext
4106 EXEEXT=$ac_cv_exeext
4108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4109 /* end confdefs.h. */
4114 FILE *f = fopen ("conftest.out", "w");
4115 return ferror (f) || fclose (f) != 0;
4121 ac_clean_files="$ac_clean_files conftest.out"
4122 # Check that the compiler produces executables we can run. If not, either
4123 # the compiler is broken, or we cross compile.
4124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4125 $as_echo_n "checking whether we are cross compiling... " >&6; }
4126 if test "$cross_compiling" != yes; then
4127 { { ac_try="$ac_link"
4129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4130 *) ac_try_echo=$ac_try;;
4132 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4133 $as_echo "$ac_try_echo"; } >&5
4134 (eval "$ac_link") 2>&5
4136 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4137 test $ac_status = 0; }
4138 if { ac_try='./conftest$ac_cv_exeext'
4139 { { case "(($ac_try" in
4140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4141 *) ac_try_echo=$ac_try;;
4143 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4144 $as_echo "$ac_try_echo"; } >&5
4145 (eval "$ac_try") 2>&5
4147 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4148 test $ac_status = 0; }; }; then
4151 if test "$cross_compiling" = maybe; then
4154 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4155 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4156 as_fn_error $? "cannot run C compiled programs.
4157 If you meant to cross compile, use \`--host'.
4158 See \`config.log' for more details" "$LINENO" 5; }
4162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4163 $as_echo "$cross_compiling" >&6; }
4165 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4166 ac_clean_files=$ac_clean_files_save
4167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4168 $as_echo_n "checking for suffix of object files... " >&6; }
4169 if ${ac_cv_objext+:} false; then :
4170 $as_echo_n "(cached) " >&6
4172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4173 /* end confdefs.h. */
4183 rm -f conftest.o conftest.obj
4184 if { { ac_try="$ac_compile"
4186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4187 *) ac_try_echo=$ac_try;;
4189 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4190 $as_echo "$ac_try_echo"; } >&5
4191 (eval "$ac_compile") 2>&5
4193 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4194 test $ac_status = 0; }; then :
4195 for ac_file in conftest.o conftest.obj conftest.*; do
4196 test -f "$ac_file" || continue;
4198 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4199 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4204 $as_echo "$as_me: failed program was:" >&5
4205 sed 's/^/| /' conftest.$ac_ext >&5
4207 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4208 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4209 as_fn_error $? "cannot compute suffix of object files: cannot compile
4210 See \`config.log' for more details" "$LINENO" 5; }
4212 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4215 $as_echo "$ac_cv_objext" >&6; }
4216 OBJEXT=$ac_cv_objext
4218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4219 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4220 if ${ac_cv_c_compiler_gnu+:} false; then :
4221 $as_echo_n "(cached) " >&6
4223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4224 /* end confdefs.h. */
4237 if ac_fn_c_try_compile "$LINENO"; then :
4242 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4243 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4247 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4248 if test $ac_compiler_gnu = yes; then
4253 ac_test_CFLAGS=${CFLAGS+set}
4254 ac_save_CFLAGS=$CFLAGS
4255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4256 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4257 if ${ac_cv_prog_cc_g+:} false; then :
4258 $as_echo_n "(cached) " >&6
4260 ac_save_c_werror_flag=$ac_c_werror_flag
4261 ac_c_werror_flag=yes
4264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4265 /* end confdefs.h. */
4275 if ac_fn_c_try_compile "$LINENO"; then :
4279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4280 /* end confdefs.h. */
4290 if ac_fn_c_try_compile "$LINENO"; then :
4293 ac_c_werror_flag=$ac_save_c_werror_flag
4295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4296 /* end confdefs.h. */
4306 if ac_fn_c_try_compile "$LINENO"; then :
4309 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4313 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4314 ac_c_werror_flag=$ac_save_c_werror_flag
4316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4317 $as_echo "$ac_cv_prog_cc_g" >&6; }
4318 if test "$ac_test_CFLAGS" = set; then
4319 CFLAGS=$ac_save_CFLAGS
4320 elif test $ac_cv_prog_cc_g = yes; then
4321 if test "$GCC" = yes; then
4327 if test "$GCC" = yes; then
4333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4334 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4335 if ${ac_cv_prog_cc_c89+:} false; then :
4336 $as_echo_n "(cached) " >&6
4338 ac_cv_prog_cc_c89=no
4340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4341 /* end confdefs.h. */
4345 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4346 struct buf { int x; };
4347 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4348 static char *e (p, i)
4354 static char *f (char * (*g) (char **, int), char **p, ...)
4359 s = g (p, va_arg (v,int));
4364 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4365 function prototypes and stuff, but not '\xHH' hex character constants.
4366 These don't provoke an error unfortunately, instead are silently treated
4367 as 'x'. The following induces an error, until -std is added to get
4368 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4369 array size at least. It's necessary to write '\x00'==0 to get something
4370 that's true only with -std. */
4371 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4373 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4374 inside strings and character constants. */
4376 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4378 int test (int i, double x);
4379 struct s1 {int (*f) (int a);};
4380 struct s2 {int (*f) (double a);};
4381 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4387 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4392 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4393 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4395 CC="$ac_save_CC $ac_arg"
4396 if ac_fn_c_try_compile "$LINENO"; then :
4397 ac_cv_prog_cc_c89=$ac_arg
4399 rm -f core conftest.err conftest.$ac_objext
4400 test "x$ac_cv_prog_cc_c89" != "xno" && break
4402 rm -f conftest.$ac_ext
4407 case "x$ac_cv_prog_cc_c89" in
4409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4410 $as_echo "none needed" >&6; } ;;
4412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4413 $as_echo "unsupported" >&6; } ;;
4415 CC="$CC $ac_cv_prog_cc_c89"
4416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4417 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4419 if test "x$ac_cv_prog_cc_c89" != xno; then :
4424 ac_cpp='$CPP $CPPFLAGS'
4425 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4426 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4427 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4430 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4431 if ${ac_cv_prog_cc_c99+:} false; then :
4432 $as_echo_n "(cached) " >&6
4434 ac_cv_prog_cc_c99=no
4436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4437 /* end confdefs.h. */
4439 #include <stdbool.h>
4444 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4445 #define debug(...) fprintf (stderr, __VA_ARGS__)
4446 #define showlist(...) puts (#__VA_ARGS__)
4447 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4449 test_varargs_macros (void)
4454 debug ("X = %d\n", x);
4455 showlist (The first, second, and third items.);
4456 report (x>y, "x is %d but y is %d", x, y);
4459 // Check long long types.
4460 #define BIG64 18446744073709551615ull
4461 #define BIG32 4294967295ul
4462 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4464 your preprocessor is broken;
4468 your preprocessor is broken;
4470 static long long int bignum = -9223372036854775807LL;
4471 static unsigned long long int ubignum = BIG64;
4473 struct incomplete_array
4481 const wchar_t *name;
4485 typedef const char *ccp;
4488 test_restrict (ccp restrict text)
4490 // See if C++-style comments work.
4491 // Iterate through items via the restricted pointer.
4492 // Also check for declarations in for loops.
4493 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4498 // Check varargs and va_copy.
4500 test_varargs (const char *format, ...)
4503 va_start (args, format);
4505 va_copy (args_copy, args);
4516 str = va_arg (args_copy, const char *);
4519 number = va_arg (args_copy, int);
4522 fnumber = va_arg (args_copy, double);
4537 _Bool success = false;
4540 if (test_restrict ("String literal") == 0)
4542 char *restrict newvar = "Another string";
4545 test_varargs ("s, d' f .", "string", 65, 34.234);
4546 test_varargs_macros ();
4548 // Check flexible array members.
4549 struct incomplete_array *ia =
4550 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4552 for (int i = 0; i < ia->datasize; ++i)
4553 ia->data[i] = i * 1.234;
4555 // Check named initializers.
4556 struct named_init ni = {
4558 .name = L"Test wide string",
4559 .average = 543.34343,
4564 int dynamic_array[ni.number];
4565 dynamic_array[ni.number - 1] = 543;
4567 // work around unused variable warnings
4568 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4569 || dynamic_array[ni.number - 1] != 543);
4575 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4577 CC="$ac_save_CC $ac_arg"
4578 if ac_fn_c_try_compile "$LINENO"; then :
4579 ac_cv_prog_cc_c99=$ac_arg
4581 rm -f core conftest.err conftest.$ac_objext
4582 test "x$ac_cv_prog_cc_c99" != "xno" && break
4584 rm -f conftest.$ac_ext
4589 case "x$ac_cv_prog_cc_c99" in
4591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4592 $as_echo "none needed" >&6; } ;;
4594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4595 $as_echo "unsupported" >&6; } ;;
4597 CC="$CC $ac_cv_prog_cc_c99"
4598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4599 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4601 if test "x$ac_cv_prog_cc_c99" != xno; then :
4607 # Error out if the compiler does not support C99, as the codebase
4609 if test "$ac_cv_prog_cc_c99" = no; then
4610 as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4614 ac_cpp='$CXXCPP $CPPFLAGS'
4615 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4616 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4617 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4618 if test -z "$CXX"; then
4619 if test -n "$CCC"; then
4622 if test -n "$ac_tool_prefix"; then
4623 for ac_prog in $pgac_cxx_list
4625 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4626 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4628 $as_echo_n "checking for $ac_word... " >&6; }
4629 if ${ac_cv_prog_CXX+:} false; then :
4630 $as_echo_n "(cached) " >&6
4632 if test -n "$CXX"; then
4633 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4635 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4639 test -z "$as_dir" && as_dir=.
4640 for ac_exec_ext in '' $ac_executable_extensions; do
4641 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4642 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4643 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4653 if test -n "$CXX"; then
4654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4655 $as_echo "$CXX" >&6; }
4657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4658 $as_echo "no" >&6; }
4662 test -n "$CXX" && break
4665 if test -z "$CXX"; then
4667 for ac_prog in $pgac_cxx_list
4669 # Extract the first word of "$ac_prog", so it can be a program name with args.
4670 set dummy $ac_prog; ac_word=$2
4671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4672 $as_echo_n "checking for $ac_word... " >&6; }
4673 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4674 $as_echo_n "(cached) " >&6
4676 if test -n "$ac_ct_CXX"; then
4677 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4679 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4683 test -z "$as_dir" && as_dir=.
4684 for ac_exec_ext in '' $ac_executable_extensions; do
4685 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4686 ac_cv_prog_ac_ct_CXX="$ac_prog"
4687 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4696 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4697 if test -n "$ac_ct_CXX"; then
4698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4699 $as_echo "$ac_ct_CXX" >&6; }
4701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4702 $as_echo "no" >&6; }
4706 test -n "$ac_ct_CXX" && break
4709 if test "x$ac_ct_CXX" = x; then
4712 case $cross_compiling:$ac_tool_warned in
4714 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4715 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4716 ac_tool_warned=yes ;;
4724 # Provide some information about the compiler.
4725 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4728 for ac_option in --version -v -V -qversion; do
4729 { { ac_try="$ac_compiler $ac_option >&5"
4731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4732 *) ac_try_echo=$ac_try;;
4734 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4735 $as_echo "$ac_try_echo"; } >&5
4736 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4738 if test -s conftest.err; then
4740 ... rest of stderr output deleted ...
4741 10q' conftest.err >conftest.er1
4742 cat conftest.er1 >&5
4744 rm -f conftest.er1 conftest.err
4745 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4746 test $ac_status = 0; }
4749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4750 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4751 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4752 $as_echo_n "(cached) " >&6
4754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4755 /* end confdefs.h. */
4768 if ac_fn_cxx_try_compile "$LINENO"; then :
4773 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4774 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4778 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4779 if test $ac_compiler_gnu = yes; then
4784 ac_test_CXXFLAGS=${CXXFLAGS+set}
4785 ac_save_CXXFLAGS=$CXXFLAGS
4786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4787 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4788 if ${ac_cv_prog_cxx_g+:} false; then :
4789 $as_echo_n "(cached) " >&6
4791 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4792 ac_cxx_werror_flag=yes
4795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4796 /* end confdefs.h. */
4806 if ac_fn_cxx_try_compile "$LINENO"; then :
4807 ac_cv_prog_cxx_g=yes
4810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4811 /* end confdefs.h. */
4821 if ac_fn_cxx_try_compile "$LINENO"; then :
4824 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4827 /* end confdefs.h. */
4837 if ac_fn_cxx_try_compile "$LINENO"; then :
4838 ac_cv_prog_cxx_g=yes
4840 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4842 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4844 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4845 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4848 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4849 if test "$ac_test_CXXFLAGS" = set; then
4850 CXXFLAGS=$ac_save_CXXFLAGS
4851 elif test $ac_cv_prog_cxx_g = yes; then
4852 if test "$GXX" = yes; then
4858 if test "$GXX" = yes; then
4865 ac_cpp='$CPP $CPPFLAGS'
4866 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4867 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4868 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4871 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4872 # but has idiosyncrasies of its own. We assume icc will define
4873 # __INTEL_COMPILER regardless of CFLAGS.
4875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4876 /* end confdefs.h. */
4881 #ifndef __INTEL_COMPILER
4888 if ac_fn_c_try_compile "$LINENO"; then :
4893 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4895 # Check if it's Sun Studio compiler. We assume that
4896 # __SUNPRO_C will be defined for Sun Studio compilers
4897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4898 /* end confdefs.h. */
4910 if ac_fn_c_try_compile "$LINENO"; then :
4915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4923 # Checked early because subsequent tests depend on it.
4927 # Check whether --with-llvm was given.
4928 if test "${with_llvm+set}" = set; then :
4933 $as_echo "#define USE_LLVM 1" >>confdefs.h
4940 as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4951 if test "$with_llvm" = yes ; then
4952 for ac_prog in gawk mawk nawk awk
4954 # Extract the first word of "$ac_prog", so it can be a program name with args.
4955 set dummy $ac_prog; ac_word=$2
4956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4957 $as_echo_n "checking for $ac_word... " >&6; }
4958 if ${ac_cv_prog_AWK+:} false; then :
4959 $as_echo_n "(cached) " >&6
4961 if test -n "$AWK"; then
4962 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4964 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4968 test -z "$as_dir" && as_dir=.
4969 for ac_exec_ext in '' $ac_executable_extensions; do
4970 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4971 ac_cv_prog_AWK="$ac_prog"
4972 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4982 if test -n "$AWK"; then
4983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4984 $as_echo "$AWK" >&6; }
4986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4987 $as_echo "no" >&6; }
4991 test -n "$AWK" && break
4998 if test -z "$LLVM_CONFIG"; then
4999 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
5001 # Extract the first word of "$ac_prog", so it can be a program name with args.
5002 set dummy $ac_prog; ac_word=$2
5003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5004 $as_echo_n "checking for $ac_word... " >&6; }
5005 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
5006 $as_echo_n "(cached) " >&6
5008 case $LLVM_CONFIG in
5010 ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
5013 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5017 test -z "$as_dir" && as_dir=.
5018 for ac_exec_ext in '' $ac_executable_extensions; do
5019 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5020 ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5021 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5031 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5032 if test -n "$LLVM_CONFIG"; then
5033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5034 $as_echo "$LLVM_CONFIG" >&6; }
5036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5037 $as_echo "no" >&6; }
5041 test -n "$LLVM_CONFIG" && break
5045 # Report the value of LLVM_CONFIG in configure's output in all cases.
5046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5047 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5049 $as_echo "$LLVM_CONFIG" >&6; }
5053 # no point continuing if llvm wasn't found
5054 if test -z "$LLVM_CONFIG"; then
5055 as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5057 # check if detected $LLVM_CONFIG is executable
5058 pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5059 if test "x$pgac_llvm_version" = "xno"; then
5060 as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5062 # and whether the version is supported
5063 if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 4 || ($1 == 3 && $2 >= 9)) exit 1; else exit 0;}';then
5064 as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 3.9 is required" "$LINENO" 5
5067 # need clang to create some bitcode files
5069 if test -z "$CLANG"; then
5070 for ac_prog in clang clang-7 clang-6.0 clang-5.0 clang-4.0 clang-3.9
5072 # Extract the first word of "$ac_prog", so it can be a program name with args.
5073 set dummy $ac_prog; ac_word=$2
5074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5075 $as_echo_n "checking for $ac_word... " >&6; }
5076 if ${ac_cv_path_CLANG+:} false; then :
5077 $as_echo_n "(cached) " >&6
5081 ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5084 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5088 test -z "$as_dir" && as_dir=.
5089 for ac_exec_ext in '' $ac_executable_extensions; do
5090 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5091 ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5092 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5102 CLANG=$ac_cv_path_CLANG
5103 if test -n "$CLANG"; then
5104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5105 $as_echo "$CLANG" >&6; }
5107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5108 $as_echo "no" >&6; }
5112 test -n "$CLANG" && break
5116 # Report the value of CLANG in configure's output in all cases.
5117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5118 $as_echo_n "checking for CLANG... " >&6; }
5119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5120 $as_echo "$CLANG" >&6; }
5123 if test -z "$CLANG"; then
5124 as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5126 # make sure clang is executable
5127 if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5128 as_fn_error $? "$CLANG does not work" "$LINENO" 5
5130 # Could check clang version, but it doesn't seem that
5131 # important. Systems with a new enough LLVM version are usually
5132 # going to have a decent clang version too. It's also not entirely
5133 # clear what the minimum version is.
5135 # Collect compiler flags necessary to build the LLVM dependent
5137 for pgac_option in `$LLVM_CONFIG --cppflags`; do
5138 case $pgac_option in
5139 -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5143 for pgac_option in `$LLVM_CONFIG --ldflags`; do
5144 case $pgac_option in
5145 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5149 # ABI influencing options, standard influencing options
5150 for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5151 case $pgac_option in
5152 -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5153 -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5157 # Look for components we're interested in, collect necessary
5158 # libs. As some components are optional, we can't just list all of
5159 # them as it'd raise an error.
5161 for pgac_component in `$LLVM_CONFIG --components`; do
5162 case $pgac_component in
5163 engine) pgac_components="$pgac_components $pgac_component";;
5164 debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5165 orcjit) pgac_components="$pgac_components $pgac_component";;
5166 passes) pgac_components="$pgac_components $pgac_component";;
5167 perfjitevents) pgac_components="$pgac_components $pgac_component";;
5171 # And then get the libraries that need to be linked in for the
5172 # selected components. They're large libraries, we only want to
5173 # link them into the LLVM using shared library.
5174 for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5175 case $pgac_option in
5176 -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5180 LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5182 # Check which functionality is present
5183 SAVE_CPPFLAGS="$CPPFLAGS"
5184 CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
5185 ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
5187 if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
5193 cat >>confdefs.h <<_ACEOF
5194 #define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
5197 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
5199 if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
5205 cat >>confdefs.h <<_ACEOF
5206 #define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
5208 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUFeatures" "ac_cv_have_decl_LLVMGetHostCPUFeatures" "#include <llvm-c/TargetMachine.h>
5210 if test "x$ac_cv_have_decl_LLVMGetHostCPUFeatures" = xyes; then :
5216 cat >>confdefs.h <<_ACEOF
5217 #define HAVE_DECL_LLVMGETHOSTCPUFEATURES $ac_have_decl
5220 ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
5222 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
5228 cat >>confdefs.h <<_ACEOF
5229 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
5231 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
5233 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
5239 cat >>confdefs.h <<_ACEOF
5240 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
5243 CPPFLAGS="$SAVE_CPPFLAGS"
5245 # LLVM_CONFIG, CLANG are already output via AC_ARG_VAR
5262 . "$srcdir/src/template/$template" || exit
5264 # C[XX]FLAGS are selected so:
5265 # If the user specifies something in the environment, that is used.
5266 # else: If the template file set something, that is used.
5267 # else: If coverage was enabled, don't set anything.
5268 # else: If the compiler is GCC, then we use -O2.
5269 # else: If the compiler is something else, then we use -O, unless debugging.
5271 if test "$ac_env_CFLAGS_set" = set; then
5272 CFLAGS=$ac_env_CFLAGS_value
5273 elif test "${CFLAGS+set}" = set; then
5274 : # (keep what template set)
5275 elif test "$enable_coverage" = yes; then
5276 : # no optimization by default
5277 elif test "$GCC" = yes; then
5280 # if the user selected debug mode, don't use -O
5281 if test "$enable_debug" != yes; then
5286 if test "$ac_env_CXXFLAGS_set" = set; then
5287 CXXFLAGS=$ac_env_CXXFLAGS_value
5288 elif test "${CXXFLAGS+set}" = set; then
5289 : # (keep what template set)
5290 elif test "$enable_coverage" = yes; then
5291 : # no optimization by default
5292 elif test "$GCC" = yes; then
5295 # if the user selected debug mode, don't use -O
5296 if test "$enable_debug" != yes; then
5301 # When generating bitcode (for inlining) we always want to use -O2
5302 # even when --enable-debug is specified. The bitcode it's not going to
5303 # be used for line-by-line debugging, and JIT inlining doesn't work
5304 # without at least -O1 (otherwise clang will emit 'noinline'
5305 # attributes everywhere), which is bad for testing. Still allow the
5306 # environment to override if done explicitly.
5307 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5308 BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5310 BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5312 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5313 BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5315 BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5318 # C[XX]FLAGS we determined above will be added back at the end
5321 user_CXXFLAGS=$CXXFLAGS
5323 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5325 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5328 # set CFLAGS_VECTOR from the environment, if available
5329 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
5330 CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
5333 # Some versions of GCC support some additional useful warning flags.
5334 # Check whether they are supported, and add them to CFLAGS if so.
5335 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5336 # but has its own. Also check other compiler-specific flags here.
5338 if test "$GCC" = yes -a "$ICC" = no; then
5339 CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5340 CXXFLAGS="-Wall -Wpointer-arith"
5341 # These work in some but not all gcc versions
5343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5344 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5345 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5346 $as_echo_n "(cached) " >&6
5348 pgac_save_CFLAGS=$CFLAGS
5351 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5352 ac_save_c_werror_flag=$ac_c_werror_flag
5353 ac_c_werror_flag=yes
5354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5355 /* end confdefs.h. */
5365 if ac_fn_c_try_compile "$LINENO"; then :
5366 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5368 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5370 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5371 ac_c_werror_flag=$ac_save_c_werror_flag
5372 CFLAGS="$pgac_save_CFLAGS"
5375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5376 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5377 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5378 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5382 # -Wdeclaration-after-statement isn't applicable for C++
5383 # Really don't want VLAs to be used in our dialect of C
5385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5386 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5387 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5388 $as_echo_n "(cached) " >&6
5390 pgac_save_CFLAGS=$CFLAGS
5393 CFLAGS="${CFLAGS} -Werror=vla"
5394 ac_save_c_werror_flag=$ac_c_werror_flag
5395 ac_c_werror_flag=yes
5396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5397 /* end confdefs.h. */
5407 if ac_fn_c_try_compile "$LINENO"; then :
5408 pgac_cv_prog_CC_cflags__Werror_vla=yes
5410 pgac_cv_prog_CC_cflags__Werror_vla=no
5412 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5413 ac_c_werror_flag=$ac_save_c_werror_flag
5414 CFLAGS="$pgac_save_CFLAGS"
5417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5418 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5419 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5420 CFLAGS="${CFLAGS} -Werror=vla"
5424 # -Wvla is not applicable for C++
5426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5427 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5428 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5429 $as_echo_n "(cached) " >&6
5431 pgac_save_CFLAGS=$CFLAGS
5434 CFLAGS="${CFLAGS} -Wendif-labels"
5435 ac_save_c_werror_flag=$ac_c_werror_flag
5436 ac_c_werror_flag=yes
5437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5438 /* end confdefs.h. */
5448 if ac_fn_c_try_compile "$LINENO"; then :
5449 pgac_cv_prog_CC_cflags__Wendif_labels=yes
5451 pgac_cv_prog_CC_cflags__Wendif_labels=no
5453 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5454 ac_c_werror_flag=$ac_save_c_werror_flag
5455 CFLAGS="$pgac_save_CFLAGS"
5458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5459 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5460 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5461 CFLAGS="${CFLAGS} -Wendif-labels"
5465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5466 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5467 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5468 $as_echo_n "(cached) " >&6
5470 pgac_save_CXXFLAGS=$CXXFLAGS
5473 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5474 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5475 ac_cxx_werror_flag=yes
5477 ac_cpp='$CXXCPP $CPPFLAGS'
5478 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5479 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5480 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5483 /* end confdefs.h. */
5493 if ac_fn_cxx_try_compile "$LINENO"; then :
5494 pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5496 pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5498 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5500 ac_cpp='$CPP $CPPFLAGS'
5501 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5502 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5503 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5505 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5506 CXXFLAGS="$pgac_save_CXXFLAGS"
5507 CXX="$pgac_save_CXX"
5509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5510 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5511 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5512 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5518 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5519 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5520 $as_echo_n "(cached) " >&6
5522 pgac_save_CFLAGS=$CFLAGS
5525 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5526 ac_save_c_werror_flag=$ac_c_werror_flag
5527 ac_c_werror_flag=yes
5528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5529 /* end confdefs.h. */
5539 if ac_fn_c_try_compile "$LINENO"; then :
5540 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5542 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5544 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5545 ac_c_werror_flag=$ac_save_c_werror_flag
5546 CFLAGS="$pgac_save_CFLAGS"
5549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5550 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5551 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5552 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5557 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5558 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5559 $as_echo_n "(cached) " >&6
5561 pgac_save_CXXFLAGS=$CXXFLAGS
5564 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5565 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5566 ac_cxx_werror_flag=yes
5568 ac_cpp='$CXXCPP $CPPFLAGS'
5569 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5570 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5571 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5574 /* end confdefs.h. */
5584 if ac_fn_cxx_try_compile "$LINENO"; then :
5585 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5587 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5589 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5591 ac_cpp='$CPP $CPPFLAGS'
5592 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5593 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5594 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5596 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5597 CXXFLAGS="$pgac_save_CXXFLAGS"
5598 CXX="$pgac_save_CXX"
5600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5601 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5602 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5603 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5607 # This was included in -Wall/-Wformat in older GCC versions
5609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5610 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5611 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5612 $as_echo_n "(cached) " >&6
5614 pgac_save_CFLAGS=$CFLAGS
5617 CFLAGS="${CFLAGS} -Wformat-security"
5618 ac_save_c_werror_flag=$ac_c_werror_flag
5619 ac_c_werror_flag=yes
5620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5621 /* end confdefs.h. */
5631 if ac_fn_c_try_compile "$LINENO"; then :
5632 pgac_cv_prog_CC_cflags__Wformat_security=yes
5634 pgac_cv_prog_CC_cflags__Wformat_security=no
5636 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5637 ac_c_werror_flag=$ac_save_c_werror_flag
5638 CFLAGS="$pgac_save_CFLAGS"
5641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5642 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5643 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5644 CFLAGS="${CFLAGS} -Wformat-security"
5648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5649 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5650 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5651 $as_echo_n "(cached) " >&6
5653 pgac_save_CXXFLAGS=$CXXFLAGS
5656 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5657 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5658 ac_cxx_werror_flag=yes
5660 ac_cpp='$CXXCPP $CPPFLAGS'
5661 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5662 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5663 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5666 /* end confdefs.h. */
5676 if ac_fn_cxx_try_compile "$LINENO"; then :
5677 pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
5679 pgac_cv_prog_CXX_cxxflags__Wformat_security=no
5681 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5683 ac_cpp='$CPP $CPPFLAGS'
5684 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5685 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5686 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5688 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5689 CXXFLAGS="$pgac_save_CXXFLAGS"
5690 CXX="$pgac_save_CXX"
5692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
5693 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
5694 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
5695 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5699 # Disable strict-aliasing rules; needed for gcc 3.3+
5701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
5702 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
5703 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
5704 $as_echo_n "(cached) " >&6
5706 pgac_save_CFLAGS=$CFLAGS
5709 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5710 ac_save_c_werror_flag=$ac_c_werror_flag
5711 ac_c_werror_flag=yes
5712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5713 /* end confdefs.h. */
5723 if ac_fn_c_try_compile "$LINENO"; then :
5724 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
5726 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
5728 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5729 ac_c_werror_flag=$ac_save_c_werror_flag
5730 CFLAGS="$pgac_save_CFLAGS"
5733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
5734 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
5735 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
5736 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
5741 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
5742 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
5743 $as_echo_n "(cached) " >&6
5745 pgac_save_CXXFLAGS=$CXXFLAGS
5748 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5749 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5750 ac_cxx_werror_flag=yes
5752 ac_cpp='$CXXCPP $CPPFLAGS'
5753 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5754 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5755 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5758 /* end confdefs.h. */
5768 if ac_fn_cxx_try_compile "$LINENO"; then :
5769 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
5771 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
5773 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5775 ac_cpp='$CPP $CPPFLAGS'
5776 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5777 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5778 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5780 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5781 CXXFLAGS="$pgac_save_CXXFLAGS"
5782 CXX="$pgac_save_CXX"
5784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
5785 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
5786 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
5787 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
5791 # Disable optimizations that assume no overflow; needed for gcc 4.3+
5793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
5794 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
5795 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
5796 $as_echo_n "(cached) " >&6
5798 pgac_save_CFLAGS=$CFLAGS
5801 CFLAGS="${CFLAGS} -fwrapv"
5802 ac_save_c_werror_flag=$ac_c_werror_flag
5803 ac_c_werror_flag=yes
5804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5805 /* end confdefs.h. */
5815 if ac_fn_c_try_compile "$LINENO"; then :
5816 pgac_cv_prog_CC_cflags__fwrapv=yes
5818 pgac_cv_prog_CC_cflags__fwrapv=no
5820 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5821 ac_c_werror_flag=$ac_save_c_werror_flag
5822 CFLAGS="$pgac_save_CFLAGS"
5825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
5826 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
5827 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
5828 CFLAGS="${CFLAGS} -fwrapv"
5832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
5833 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
5834 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
5835 $as_echo_n "(cached) " >&6
5837 pgac_save_CXXFLAGS=$CXXFLAGS
5840 CXXFLAGS="${CXXFLAGS} -fwrapv"
5841 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5842 ac_cxx_werror_flag=yes
5844 ac_cpp='$CXXCPP $CPPFLAGS'
5845 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5846 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5847 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5850 /* end confdefs.h. */
5860 if ac_fn_cxx_try_compile "$LINENO"; then :
5861 pgac_cv_prog_CXX_cxxflags__fwrapv=yes
5863 pgac_cv_prog_CXX_cxxflags__fwrapv=no
5865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5867 ac_cpp='$CPP $CPPFLAGS'
5868 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5869 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5870 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5872 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5873 CXXFLAGS="$pgac_save_CXXFLAGS"
5874 CXX="$pgac_save_CXX"
5876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
5877 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
5878 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
5879 CXXFLAGS="${CXXFLAGS} -fwrapv"
5883 # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
5885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
5886 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
5887 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
5888 $as_echo_n "(cached) " >&6
5890 pgac_save_CFLAGS=$CFLAGS
5893 CFLAGS="${CFLAGS} -fexcess-precision=standard"
5894 ac_save_c_werror_flag=$ac_c_werror_flag
5895 ac_c_werror_flag=yes
5896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5897 /* end confdefs.h. */
5907 if ac_fn_c_try_compile "$LINENO"; then :
5908 pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
5910 pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
5912 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5913 ac_c_werror_flag=$ac_save_c_werror_flag
5914 CFLAGS="$pgac_save_CFLAGS"
5917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
5918 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
5919 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
5920 CFLAGS="${CFLAGS} -fexcess-precision=standard"
5924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
5925 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
5926 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
5927 $as_echo_n "(cached) " >&6
5929 pgac_save_CXXFLAGS=$CXXFLAGS
5932 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5933 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5934 ac_cxx_werror_flag=yes
5936 ac_cpp='$CXXCPP $CPPFLAGS'
5937 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5938 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5939 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5942 /* end confdefs.h. */
5952 if ac_fn_cxx_try_compile "$LINENO"; then :
5953 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
5955 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
5957 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5959 ac_cpp='$CPP $CPPFLAGS'
5960 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5961 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5962 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5964 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5965 CXXFLAGS="$pgac_save_CXXFLAGS"
5966 CXX="$pgac_save_CXX"
5968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
5969 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
5970 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
5971 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
5975 # Optimization flags for specific files that benefit from vectorization
5976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR" >&5
5977 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_VECTOR... " >&6; }
5978 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
5979 $as_echo_n "(cached) " >&6
5981 pgac_save_CFLAGS=$CFLAGS
5984 CFLAGS="${CFLAGS_VECTOR} -funroll-loops"
5985 ac_save_c_werror_flag=$ac_c_werror_flag
5986 ac_c_werror_flag=yes
5987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5988 /* end confdefs.h. */
5998 if ac_fn_c_try_compile "$LINENO"; then :
5999 pgac_cv_prog_CC_cflags__funroll_loops=yes
6001 pgac_cv_prog_CC_cflags__funroll_loops=no
6003 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6004 ac_c_werror_flag=$ac_save_c_werror_flag
6005 CFLAGS="$pgac_save_CFLAGS"
6008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
6009 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
6010 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
6011 CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
6015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR" >&5
6016 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTOR... " >&6; }
6017 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
6018 $as_echo_n "(cached) " >&6
6020 pgac_save_CFLAGS=$CFLAGS
6023 CFLAGS="${CFLAGS_VECTOR} -ftree-vectorize"
6024 ac_save_c_werror_flag=$ac_c_werror_flag
6025 ac_c_werror_flag=yes
6026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6027 /* end confdefs.h. */
6037 if ac_fn_c_try_compile "$LINENO"; then :
6038 pgac_cv_prog_CC_cflags__ftree_vectorize=yes
6040 pgac_cv_prog_CC_cflags__ftree_vectorize=no
6042 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6043 ac_c_werror_flag=$ac_save_c_werror_flag
6044 CFLAGS="$pgac_save_CFLAGS"
6047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
6048 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
6049 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
6050 CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
6054 # We want to suppress clang's unhelpful unused-command-line-argument warnings
6055 # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
6056 # test for the positive form and if that works, add the negative form
6058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
6059 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
6060 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
6061 $as_echo_n "(cached) " >&6
6063 pgac_save_CFLAGS=$CFLAGS
6066 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6067 ac_save_c_werror_flag=$ac_c_werror_flag
6068 ac_c_werror_flag=yes
6069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6070 /* end confdefs.h. */
6080 if ac_fn_c_try_compile "$LINENO"; then :
6081 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6083 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6085 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6086 ac_c_werror_flag=$ac_save_c_werror_flag
6087 CFLAGS="$pgac_save_CFLAGS"
6090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6091 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6092 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6093 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6097 if test -n "$NOT_THE_CFLAGS"; then
6098 CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6100 # Similarly disable useless truncation warnings from gcc 8+
6102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6103 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6104 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6105 $as_echo_n "(cached) " >&6
6107 pgac_save_CFLAGS=$CFLAGS
6110 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6111 ac_save_c_werror_flag=$ac_c_werror_flag
6112 ac_c_werror_flag=yes
6113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6114 /* end confdefs.h. */
6124 if ac_fn_c_try_compile "$LINENO"; then :
6125 pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6127 pgac_cv_prog_CC_cflags__Wformat_truncation=no
6129 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6130 ac_c_werror_flag=$ac_save_c_werror_flag
6131 CFLAGS="$pgac_save_CFLAGS"
6134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6135 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6136 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6137 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6141 if test -n "$NOT_THE_CFLAGS"; then
6142 CFLAGS="$CFLAGS -Wno-format-truncation"
6145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6146 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6147 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6148 $as_echo_n "(cached) " >&6
6150 pgac_save_CFLAGS=$CFLAGS
6153 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6154 ac_save_c_werror_flag=$ac_c_werror_flag
6155 ac_c_werror_flag=yes
6156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6157 /* end confdefs.h. */
6167 if ac_fn_c_try_compile "$LINENO"; then :
6168 pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6170 pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6172 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6173 ac_c_werror_flag=$ac_save_c_werror_flag
6174 CFLAGS="$pgac_save_CFLAGS"
6177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6178 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6179 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6180 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6184 if test -n "$NOT_THE_CFLAGS"; then
6185 CFLAGS="$CFLAGS -Wno-stringop-truncation"
6187 elif test "$ICC" = yes; then
6188 # Intel's compiler has a bug/misoptimization in checking for
6189 # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6192 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6193 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6194 $as_echo_n "(cached) " >&6
6196 pgac_save_CFLAGS=$CFLAGS
6199 CFLAGS="${CFLAGS} -mp1"
6200 ac_save_c_werror_flag=$ac_c_werror_flag
6201 ac_c_werror_flag=yes
6202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6203 /* end confdefs.h. */
6213 if ac_fn_c_try_compile "$LINENO"; then :
6214 pgac_cv_prog_CC_cflags__mp1=yes
6216 pgac_cv_prog_CC_cflags__mp1=no
6218 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6219 ac_c_werror_flag=$ac_save_c_werror_flag
6220 CFLAGS="$pgac_save_CFLAGS"
6223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6224 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6225 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6226 CFLAGS="${CFLAGS} -mp1"
6230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6231 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6232 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6233 $as_echo_n "(cached) " >&6
6235 pgac_save_CXXFLAGS=$CXXFLAGS
6238 CXXFLAGS="${CXXFLAGS} -mp1"
6239 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6240 ac_cxx_werror_flag=yes
6242 ac_cpp='$CXXCPP $CPPFLAGS'
6243 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6244 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6245 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6248 /* end confdefs.h. */
6258 if ac_fn_cxx_try_compile "$LINENO"; then :
6259 pgac_cv_prog_CXX_cxxflags__mp1=yes
6261 pgac_cv_prog_CXX_cxxflags__mp1=no
6263 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6265 ac_cpp='$CPP $CPPFLAGS'
6266 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6267 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6268 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6270 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6271 CXXFLAGS="$pgac_save_CXXFLAGS"
6272 CXX="$pgac_save_CXX"
6274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6275 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6276 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6277 CXXFLAGS="${CXXFLAGS} -mp1"
6281 # Make sure strict aliasing is off (though this is said to be the default)
6283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6284 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6285 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6286 $as_echo_n "(cached) " >&6
6288 pgac_save_CFLAGS=$CFLAGS
6291 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6292 ac_save_c_werror_flag=$ac_c_werror_flag
6293 ac_c_werror_flag=yes
6294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6295 /* end confdefs.h. */
6305 if ac_fn_c_try_compile "$LINENO"; then :
6306 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6308 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6311 ac_c_werror_flag=$ac_save_c_werror_flag
6312 CFLAGS="$pgac_save_CFLAGS"
6315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6316 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6317 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6318 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6323 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6324 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6325 $as_echo_n "(cached) " >&6
6327 pgac_save_CXXFLAGS=$CXXFLAGS
6330 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6331 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6332 ac_cxx_werror_flag=yes
6334 ac_cpp='$CXXCPP $CPPFLAGS'
6335 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6336 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6337 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6340 /* end confdefs.h. */
6350 if ac_fn_cxx_try_compile "$LINENO"; then :
6351 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6353 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6355 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6357 ac_cpp='$CPP $CPPFLAGS'
6358 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6359 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6360 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6362 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6363 CXXFLAGS="$pgac_save_CXXFLAGS"
6364 CXX="$pgac_save_CXX"
6366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6367 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6368 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6369 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6373 elif test "$PORTNAME" = "aix"; then
6374 # AIX's xlc has to have strict aliasing turned off too
6376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6377 $as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6378 if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6379 $as_echo_n "(cached) " >&6
6381 pgac_save_CFLAGS=$CFLAGS
6384 CFLAGS="${CFLAGS} -qnoansialias"
6385 ac_save_c_werror_flag=$ac_c_werror_flag
6386 ac_c_werror_flag=yes
6387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6388 /* end confdefs.h. */
6398 if ac_fn_c_try_compile "$LINENO"; then :
6399 pgac_cv_prog_CC_cflags__qnoansialias=yes
6401 pgac_cv_prog_CC_cflags__qnoansialias=no
6403 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6404 ac_c_werror_flag=$ac_save_c_werror_flag
6405 CFLAGS="$pgac_save_CFLAGS"
6408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6409 $as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6410 if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6411 CFLAGS="${CFLAGS} -qnoansialias"
6415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6416 $as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6417 if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6418 $as_echo_n "(cached) " >&6
6420 pgac_save_CXXFLAGS=$CXXFLAGS
6423 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6424 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6425 ac_cxx_werror_flag=yes
6427 ac_cpp='$CXXCPP $CPPFLAGS'
6428 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6429 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6430 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6433 /* end confdefs.h. */
6443 if ac_fn_cxx_try_compile "$LINENO"; then :
6444 pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6446 pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6448 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6450 ac_cpp='$CPP $CPPFLAGS'
6451 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6452 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6453 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6455 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6456 CXXFLAGS="$pgac_save_CXXFLAGS"
6457 CXX="$pgac_save_CXX"
6459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6460 $as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6461 if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6462 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6468 $as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6469 if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6470 $as_echo_n "(cached) " >&6
6472 pgac_save_CFLAGS=$CFLAGS
6475 CFLAGS="${CFLAGS} -qlonglong"
6476 ac_save_c_werror_flag=$ac_c_werror_flag
6477 ac_c_werror_flag=yes
6478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6479 /* end confdefs.h. */
6489 if ac_fn_c_try_compile "$LINENO"; then :
6490 pgac_cv_prog_CC_cflags__qlonglong=yes
6492 pgac_cv_prog_CC_cflags__qlonglong=no
6494 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6495 ac_c_werror_flag=$ac_save_c_werror_flag
6496 CFLAGS="$pgac_save_CFLAGS"
6499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6500 $as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6501 if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6502 CFLAGS="${CFLAGS} -qlonglong"
6506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6507 $as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6508 if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6509 $as_echo_n "(cached) " >&6
6511 pgac_save_CXXFLAGS=$CXXFLAGS
6514 CXXFLAGS="${CXXFLAGS} -qlonglong"
6515 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6516 ac_cxx_werror_flag=yes
6518 ac_cpp='$CXXCPP $CPPFLAGS'
6519 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6520 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6521 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6524 /* end confdefs.h. */
6534 if ac_fn_cxx_try_compile "$LINENO"; then :
6535 pgac_cv_prog_CXX_cxxflags__qlonglong=yes
6537 pgac_cv_prog_CXX_cxxflags__qlonglong=no
6539 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6541 ac_cpp='$CPP $CPPFLAGS'
6542 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6543 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6544 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6546 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6547 CXXFLAGS="$pgac_save_CXXFLAGS"
6548 CXX="$pgac_save_CXX"
6550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
6551 $as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
6552 if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
6553 CXXFLAGS="${CXXFLAGS} -qlonglong"
6557 elif test "$PORTNAME" = "hpux"; then
6558 # On some versions of HP-UX, libm functions do not set errno by default.
6559 # Fix that by using +Olibmerrno if the compiler recognizes it.
6561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports +Olibmerrno, for CFLAGS" >&5
6562 $as_echo_n "checking whether ${CC} supports +Olibmerrno, for CFLAGS... " >&6; }
6563 if ${pgac_cv_prog_CC_cflags_pOlibmerrno+:} false; then :
6564 $as_echo_n "(cached) " >&6
6566 pgac_save_CFLAGS=$CFLAGS
6569 CFLAGS="${CFLAGS} +Olibmerrno"
6570 ac_save_c_werror_flag=$ac_c_werror_flag
6571 ac_c_werror_flag=yes
6572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6573 /* end confdefs.h. */
6583 if ac_fn_c_try_compile "$LINENO"; then :
6584 pgac_cv_prog_CC_cflags_pOlibmerrno=yes
6586 pgac_cv_prog_CC_cflags_pOlibmerrno=no
6588 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6589 ac_c_werror_flag=$ac_save_c_werror_flag
6590 CFLAGS="$pgac_save_CFLAGS"
6593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags_pOlibmerrno" >&5
6594 $as_echo "$pgac_cv_prog_CC_cflags_pOlibmerrno" >&6; }
6595 if test x"$pgac_cv_prog_CC_cflags_pOlibmerrno" = x"yes"; then
6596 CFLAGS="${CFLAGS} +Olibmerrno"
6600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS" >&5
6601 $as_echo_n "checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS... " >&6; }
6602 if ${pgac_cv_prog_CXX_cxxflags_pOlibmerrno+:} false; then :
6603 $as_echo_n "(cached) " >&6
6605 pgac_save_CXXFLAGS=$CXXFLAGS
6608 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6609 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6610 ac_cxx_werror_flag=yes
6612 ac_cpp='$CXXCPP $CPPFLAGS'
6613 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6614 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6615 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6618 /* end confdefs.h. */
6628 if ac_fn_cxx_try_compile "$LINENO"; then :
6629 pgac_cv_prog_CXX_cxxflags_pOlibmerrno=yes
6631 pgac_cv_prog_CXX_cxxflags_pOlibmerrno=no
6633 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6635 ac_cpp='$CPP $CPPFLAGS'
6636 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6637 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6638 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6640 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6641 CXXFLAGS="$pgac_save_CXXFLAGS"
6642 CXX="$pgac_save_CXX"
6644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&5
6645 $as_echo "$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&6; }
6646 if test x"$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" = x"yes"; then
6647 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6653 CFLAGS_VECTOR=$CFLAGS_VECTOR
6656 # Determine flags used to emit bitcode for JIT inlining. Need to test
6657 # for behaviour changing compiler flags, to keep compatibility with
6658 # compiler used for normal postgres code.
6659 if test "$with_llvm" = yes ; then
6660 CLANGXX="$CLANG -xc++"
6662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
6663 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
6664 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
6665 $as_echo_n "(cached) " >&6
6667 pgac_save_CFLAGS=$CFLAGS
6670 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6671 ac_save_c_werror_flag=$ac_c_werror_flag
6672 ac_c_werror_flag=yes
6673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6674 /* end confdefs.h. */
6684 if ac_fn_c_try_compile "$LINENO"; then :
6685 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
6687 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
6689 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6690 ac_c_werror_flag=$ac_save_c_werror_flag
6691 CFLAGS="$pgac_save_CFLAGS"
6694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
6695 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
6696 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
6697 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
6701 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
6702 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
6703 $as_echo_n "(cached) " >&6
6705 pgac_save_CXXFLAGS=$CXXFLAGS
6708 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6709 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6710 ac_cxx_werror_flag=yes
6712 ac_cpp='$CXXCPP $CPPFLAGS'
6713 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6714 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6715 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6718 /* end confdefs.h. */
6728 if ac_fn_cxx_try_compile "$LINENO"; then :
6729 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
6731 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
6733 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6735 ac_cpp='$CPP $CPPFLAGS'
6736 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6737 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6738 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6740 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6741 CXXFLAGS="$pgac_save_CXXFLAGS"
6742 CXX="$pgac_save_CXX"
6744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
6745 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
6746 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6747 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
6750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
6751 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
6752 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
6753 $as_echo_n "(cached) " >&6
6755 pgac_save_CFLAGS=$CFLAGS
6758 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6759 ac_save_c_werror_flag=$ac_c_werror_flag
6760 ac_c_werror_flag=yes
6761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6762 /* end confdefs.h. */
6772 if ac_fn_c_try_compile "$LINENO"; then :
6773 pgac_cv_prog_CLANG_cflags__fwrapv=yes
6775 pgac_cv_prog_CLANG_cflags__fwrapv=no
6777 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6778 ac_c_werror_flag=$ac_save_c_werror_flag
6779 CFLAGS="$pgac_save_CFLAGS"
6782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
6783 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
6784 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
6785 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
6788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
6789 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
6790 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
6791 $as_echo_n "(cached) " >&6
6793 pgac_save_CXXFLAGS=$CXXFLAGS
6796 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6797 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6798 ac_cxx_werror_flag=yes
6800 ac_cpp='$CXXCPP $CPPFLAGS'
6801 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6802 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6803 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6806 /* end confdefs.h. */
6816 if ac_fn_cxx_try_compile "$LINENO"; then :
6817 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
6819 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
6821 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6823 ac_cpp='$CPP $CPPFLAGS'
6824 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6825 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6826 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6828 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6829 CXXFLAGS="$pgac_save_CXXFLAGS"
6830 CXX="$pgac_save_CXX"
6832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
6833 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
6834 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
6835 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
6838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
6839 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
6840 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
6841 $as_echo_n "(cached) " >&6
6843 pgac_save_CFLAGS=$CFLAGS
6846 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6847 ac_save_c_werror_flag=$ac_c_werror_flag
6848 ac_c_werror_flag=yes
6849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6850 /* end confdefs.h. */
6860 if ac_fn_c_try_compile "$LINENO"; then :
6861 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
6863 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
6865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6866 ac_c_werror_flag=$ac_save_c_werror_flag
6867 CFLAGS="$pgac_save_CFLAGS"
6870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
6871 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
6872 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
6873 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
6876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
6877 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
6878 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
6879 $as_echo_n "(cached) " >&6
6881 pgac_save_CXXFLAGS=$CXXFLAGS
6884 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6885 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6886 ac_cxx_werror_flag=yes
6888 ac_cpp='$CXXCPP $CPPFLAGS'
6889 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6890 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6891 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6894 /* end confdefs.h. */
6904 if ac_fn_cxx_try_compile "$LINENO"; then :
6905 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
6907 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
6909 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6911 ac_cpp='$CPP $CPPFLAGS'
6912 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6913 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6914 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6916 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6917 CXXFLAGS="$pgac_save_CXXFLAGS"
6918 CXX="$pgac_save_CXX"
6920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
6921 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
6922 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6923 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
6928 # supply -g if --enable-debug
6929 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
6933 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
6934 CXXFLAGS="$CXXFLAGS -g"
6937 # enable code coverage if --enable-coverage
6938 if test "$enable_coverage" = yes; then
6939 if test "$GCC" = yes; then
6940 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
6941 CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
6943 as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
6947 # enable profiling if --enable-profiling
6948 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
6949 if test "$GCC" = yes; then
6951 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
6953 CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6954 CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
6956 as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
6960 # We already have this in Makefile.win32, but configure needs it too
6961 if test "$PORTNAME" = "win32"; then
6962 CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
6965 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
6966 # user-specified flags (if any) at the end. This lets users override
6967 # the automatic additions.
6968 CFLAGS="$CFLAGS $user_CFLAGS"
6969 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
6970 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
6971 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
6973 BITCODE_CFLAGS=$BITCODE_CFLAGS
6975 BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
6978 # Check if the compiler still works with the final flag settings
6979 # (note, we're not checking that for CXX, which is optional)
6980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
6981 $as_echo_n "checking whether the C compiler still works... " >&6; }
6982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6983 /* end confdefs.h. */
6993 if ac_fn_c_try_link "$LINENO"; then :
6994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6995 $as_echo "yes" >&6; }
6997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6998 $as_echo "no" >&6; }
6999 as_fn_error $? "cannot proceed" "$LINENO" 5
7001 rm -f core conftest.err conftest.$ac_objext \
7002 conftest$ac_exeext conftest.$ac_ext
7004 # Defend against gcc -ffast-math
7005 if test "$GCC" = yes; then
7006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7007 /* end confdefs.h. */
7012 #ifdef __FAST_MATH__
7019 if ac_fn_c_try_compile "$LINENO"; then :
7022 as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
7024 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7027 # Defend against clang being used on x86-32 without SSE2 enabled. As current
7028 # versions of clang do not understand -fexcess-precision=standard, the use of
7029 # x87 floating point operations leads to problems like isinf possibly returning
7030 # false for a value that is infinite when converted from the 80bit register to
7031 # the 8byte memory representation.
7033 # Only perform the test if the compiler doesn't understand
7034 # -fexcess-precision=standard, that way a potentially fixed compiler will work
7036 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
7037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7038 /* end confdefs.h. */
7044 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
7052 if ac_fn_c_try_compile "$LINENO"; then :
7055 as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
7057 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7061 ac_cpp='$CPP $CPPFLAGS'
7062 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7063 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7064 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7066 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7067 # On Suns, sometimes $CPP names a directory.
7068 if test -n "$CPP" && test -d "$CPP"; then
7071 if test -z "$CPP"; then
7072 if ${ac_cv_prog_CPP+:} false; then :
7073 $as_echo_n "(cached) " >&6
7075 # Double quotes because CPP needs to be expanded
7076 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7079 for ac_c_preproc_warn_flag in '' yes
7081 # Use a header file that comes with gcc, so configuring glibc
7082 # with a fresh cross-compiler works.
7083 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7084 # <limits.h> exists even on freestanding compilers.
7085 # On the NeXT, cc -E runs the code through the compiler's parser,
7086 # not just through cpp. "Syntax error" is here to catch this case.
7087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7088 /* end confdefs.h. */
7090 # include <limits.h>
7092 # include <assert.h>
7096 if ac_fn_c_try_cpp "$LINENO"; then :
7099 # Broken: fails on valid input.
7102 rm -f conftest.err conftest.i conftest.$ac_ext
7104 # OK, works on sane cases. Now check whether nonexistent headers
7105 # can be detected and how.
7106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7107 /* end confdefs.h. */
7108 #include <ac_nonexistent.h>
7110 if ac_fn_c_try_cpp "$LINENO"; then :
7111 # Broken: success on invalid input.
7114 # Passes both tests.
7118 rm -f conftest.err conftest.i conftest.$ac_ext
7121 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7122 rm -f conftest.i conftest.err conftest.$ac_ext
7123 if $ac_preproc_ok; then :
7135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7136 $as_echo "$CPP" >&6; }
7138 for ac_c_preproc_warn_flag in '' yes
7140 # Use a header file that comes with gcc, so configuring glibc
7141 # with a fresh cross-compiler works.
7142 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7143 # <limits.h> exists even on freestanding compilers.
7144 # On the NeXT, cc -E runs the code through the compiler's parser,
7145 # not just through cpp. "Syntax error" is here to catch this case.
7146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7147 /* end confdefs.h. */
7149 # include <limits.h>
7151 # include <assert.h>
7155 if ac_fn_c_try_cpp "$LINENO"; then :
7158 # Broken: fails on valid input.
7161 rm -f conftest.err conftest.i conftest.$ac_ext
7163 # OK, works on sane cases. Now check whether nonexistent headers
7164 # can be detected and how.
7165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7166 /* end confdefs.h. */
7167 #include <ac_nonexistent.h>
7169 if ac_fn_c_try_cpp "$LINENO"; then :
7170 # Broken: success on invalid input.
7173 # Passes both tests.
7177 rm -f conftest.err conftest.i conftest.$ac_ext
7180 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7181 rm -f conftest.i conftest.err conftest.$ac_ext
7182 if $ac_preproc_ok; then :
7185 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7186 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7187 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7188 See \`config.log' for more details" "$LINENO" 5; }
7192 ac_cpp='$CPP $CPPFLAGS'
7193 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7194 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7195 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7201 # Set up TAS assembly code if needed; the template file has now had its
7202 # chance to request this.
7204 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
7207 if test "$need_tas" = yes ; then
7216 # Automatic dependency tracking
7220 # Check whether --enable-depend was given.
7221 if test "${enable_depend+set}" = set; then :
7222 enableval=$enable_depend;
7231 as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
7245 # Enable assert checks
7249 # Check whether --enable-cassert was given.
7250 if test "${enable_cassert+set}" = set; then :
7251 enableval=$enable_cassert;
7255 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
7262 as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
7275 # Include directories
7278 IFS="${IFS}${PATH_SEPARATOR}"
7279 # SRCH_INC comes from the template file
7280 for dir in $with_includes $SRCH_INC; do
7281 if test -d "$dir"; then
7282 INCLUDES="$INCLUDES -I$dir"
7284 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
7285 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
7293 # Library directories
7296 IFS="${IFS}${PATH_SEPARATOR}"
7297 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
7298 for dir in $LIBRARY_DIRS $SRCH_LIB; do
7299 if test -d "$dir"; then
7300 LIBDIRS="$LIBDIRS -L$dir"
7302 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
7303 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
7309 # Enable thread-safe client libraries
7311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
7312 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
7315 # Check whether --enable-thread-safety was given.
7316 if test "${enable_thread_safety+set}" = set; then :
7317 enableval=$enable_thread_safety;
7326 as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
7331 enable_thread_safety=yes
7336 if test "$enable_thread_safety" = yes; then
7338 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
7341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
7342 $as_echo "$enable_thread_safety" >&6; }
7348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
7349 $as_echo_n "checking whether to build with ICU support... " >&6; }
7353 # Check whether --with-icu was given.
7354 if test "${with_icu+set}" = set; then :
7359 $as_echo "#define USE_ICU 1" >>confdefs.h
7366 as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
7376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
7377 $as_echo "$with_icu" >&6; }
7380 if test "$with_icu" = yes; then
7388 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7389 if test -n "$ac_tool_prefix"; then
7390 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7391 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7393 $as_echo_n "checking for $ac_word... " >&6; }
7394 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7395 $as_echo_n "(cached) " >&6
7399 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7402 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7406 test -z "$as_dir" && as_dir=.
7407 for ac_exec_ext in '' $ac_executable_extensions; do
7408 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7409 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7410 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7420 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7421 if test -n "$PKG_CONFIG"; then
7422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7423 $as_echo "$PKG_CONFIG" >&6; }
7425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7426 $as_echo "no" >&6; }
7431 if test -z "$ac_cv_path_PKG_CONFIG"; then
7432 ac_pt_PKG_CONFIG=$PKG_CONFIG
7433 # Extract the first word of "pkg-config", so it can be a program name with args.
7434 set dummy pkg-config; ac_word=$2
7435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7436 $as_echo_n "checking for $ac_word... " >&6; }
7437 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7438 $as_echo_n "(cached) " >&6
7440 case $ac_pt_PKG_CONFIG in
7442 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7445 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7449 test -z "$as_dir" && as_dir=.
7450 for ac_exec_ext in '' $ac_executable_extensions; do
7451 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7452 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7453 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7463 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7464 if test -n "$ac_pt_PKG_CONFIG"; then
7465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7466 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7469 $as_echo "no" >&6; }
7472 if test "x$ac_pt_PKG_CONFIG" = x; then
7475 case $cross_compiling:$ac_tool_warned in
7477 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7478 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7479 ac_tool_warned=yes ;;
7481 PKG_CONFIG=$ac_pt_PKG_CONFIG
7484 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7488 if test -n "$PKG_CONFIG"; then
7489 _pkg_min_version=0.9.0
7490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7491 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7492 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7494 $as_echo "yes" >&6; }
7496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7497 $as_echo "no" >&6; }
7503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
7504 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
7506 if test -n "$ICU_CFLAGS"; then
7507 pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
7508 elif test -n "$PKG_CONFIG"; then
7509 if test -n "$PKG_CONFIG" && \
7510 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7511 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7513 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7514 test $ac_status = 0; }; then
7515 pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
7516 test "x$?" != "x0" && pkg_failed=yes
7523 if test -n "$ICU_LIBS"; then
7524 pkg_cv_ICU_LIBS="$ICU_LIBS"
7525 elif test -n "$PKG_CONFIG"; then
7526 if test -n "$PKG_CONFIG" && \
7527 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
7528 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
7530 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7531 test $ac_status = 0; }; then
7532 pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
7533 test "x$?" != "x0" && pkg_failed=yes
7543 if test $pkg_failed = yes; then
7544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7545 $as_echo "no" >&6; }
7547 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7548 _pkg_short_errors_supported=yes
7550 _pkg_short_errors_supported=no
7552 if test $_pkg_short_errors_supported = yes; then
7553 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7555 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
7557 # Put the nasty error message in config.log where it belongs
7558 echo "$ICU_PKG_ERRORS" >&5
7560 as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
7564 Consider adjusting the PKG_CONFIG_PATH environment variable if you
7565 installed software in a non-standard prefix.
7567 Alternatively, you may set the environment variables ICU_CFLAGS
7568 and ICU_LIBS to avoid the need to call pkg-config.
7569 See the pkg-config man page for more details." "$LINENO" 5
7570 elif test $pkg_failed = untried; then
7571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7572 $as_echo "no" >&6; }
7573 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7574 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7575 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
7576 is in your PATH or set the PKG_CONFIG environment variable to the full
7579 Alternatively, you may set the environment variables ICU_CFLAGS
7580 and ICU_LIBS to avoid the need to call pkg-config.
7581 See the pkg-config man page for more details.
7583 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
7584 See \`config.log' for more details" "$LINENO" 5; }
7586 ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
7587 ICU_LIBS=$pkg_cv_ICU_LIBS
7588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7589 $as_echo "yes" >&6; }
7595 # Optionally build Tcl modules (PL/Tcl)
7597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
7598 $as_echo_n "checking whether to build with Tcl... " >&6; }
7602 # Check whether --with-tcl was given.
7603 if test "${with_tcl+set}" = set; then :
7613 as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
7623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
7624 $as_echo "$with_tcl" >&6; }
7627 # We see if the path to the Tcl/Tk configuration scripts is specified.
7628 # This will override the use of tclsh to find the paths to search.
7633 # Check whether --with-tclconfig was given.
7634 if test "${with_tclconfig+set}" = set; then :
7635 withval=$with_tclconfig;
7638 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7641 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
7653 # Optionally build Perl modules (PL/Perl)
7655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
7656 $as_echo_n "checking whether to build Perl modules... " >&6; }
7660 # Check whether --with-perl was given.
7661 if test "${with_perl+set}" = set; then :
7671 as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
7681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
7682 $as_echo "$with_perl" >&6; }
7686 # Optionally build Python modules (PL/Python)
7688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
7689 $as_echo_n "checking whether to build Python modules... " >&6; }
7693 # Check whether --with-python was given.
7694 if test "${with_python+set}" = set; then :
7695 withval=$with_python;
7704 as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
7714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
7715 $as_echo "$with_python" >&6; }
7721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
7722 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
7726 # Check whether --with-gssapi was given.
7727 if test "${with_gssapi+set}" = set; then :
7728 withval=$with_gssapi;
7733 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
7735 krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
7742 as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
7752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
7753 $as_echo "$with_gssapi" >&6; }
7761 # Kerberos configuration parameters
7766 # Check whether --with-krb-srvnam was given.
7767 if test "${with_krb_srvnam+set}" = set; then :
7768 withval=$with_krb_srvnam;
7771 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7774 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
7782 with_krb_srvnam="postgres"
7788 cat >>confdefs.h <<_ACEOF
7789 #define PG_KRB_SRVNAM "$with_krb_srvnam"
7797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
7798 $as_echo_n "checking whether to build with PAM support... " >&6; }
7802 # Check whether --with-pam was given.
7803 if test "${with_pam+set}" = set; then :
7808 $as_echo "#define USE_PAM 1" >>confdefs.h
7815 as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
7825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
7826 $as_echo "$with_pam" >&6; }
7832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
7833 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
7837 # Check whether --with-bsd-auth was given.
7838 if test "${with_bsd_auth+set}" = set; then :
7839 withval=$with_bsd_auth;
7843 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
7850 as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
7860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
7861 $as_echo "$with_bsd_auth" >&6; }
7867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
7868 $as_echo_n "checking whether to build with LDAP support... " >&6; }
7872 # Check whether --with-ldap was given.
7873 if test "${with_ldap+set}" = set; then :
7878 $as_echo "#define USE_LDAP 1" >>confdefs.h
7885 as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
7895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
7896 $as_echo "$with_ldap" >&6; }
7903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
7904 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
7908 # Check whether --with-bonjour was given.
7909 if test "${with_bonjour+set}" = set; then :
7910 withval=$with_bonjour;
7914 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
7921 as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
7931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
7932 $as_echo "$with_bonjour" >&6; }
7938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
7939 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
7943 # Check whether --with-openssl was given.
7944 if test "${with_openssl+set}" = set; then :
7945 withval=$with_openssl;
7949 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
7956 as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
7966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
7967 $as_echo "$with_openssl" >&6; }
7973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
7974 $as_echo_n "checking whether to build with SELinux support... " >&6; }
7978 # Check whether --with-selinux was given.
7979 if test "${with_selinux+set}" = set; then :
7980 withval=$with_selinux;
7989 as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
8000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
8001 $as_echo "$with_selinux" >&6; }
8006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
8007 $as_echo_n "checking whether to build with systemd support... " >&6; }
8011 # Check whether --with-systemd was given.
8012 if test "${with_systemd+set}" = set; then :
8013 withval=$with_systemd;
8017 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
8024 as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
8035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
8036 $as_echo "$with_systemd" >&6; }
8044 # Check whether --with-readline was given.
8045 if test "${with_readline+set}" = set; then :
8046 withval=$with_readline;
8055 as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
8065 # readline on MinGW has problems with backslashes in psql and other bugs.
8066 # This is particularly a problem with non-US code pages.
8067 # Therefore disable its use until we understand the cause. 2004-07-20
8068 if test "$PORTNAME" = "win32"; then
8069 if test "$with_readline" = yes; then
8070 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8071 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8083 # Check whether --with-libedit-preferred was given.
8084 if test "${with_libedit_preferred+set}" = set; then :
8085 withval=$with_libedit_preferred;
8094 as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8099 with_libedit_preferred=no
8109 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8110 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8111 # UUID library. More than one of these might be present on a given platform,
8112 # so we make the user say which one she wants.
8117 # Check whether --with-uuid was given.
8118 if test "${with_uuid+set}" = set; then :
8122 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8125 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8135 if test x"$with_uuid" = x"" ; then
8141 # Check whether --with-ossp-uuid was given.
8142 if test "${with_ossp_uuid+set}" = set; then :
8143 withval=$with_ossp_uuid;
8152 as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8162 if test "$with_ossp_uuid" = yes ; then
8166 if test "$with_uuid" = bsd ; then
8168 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8170 UUID_EXTRA_OBJS="md5.o sha1.o"
8171 elif test "$with_uuid" = e2fs ; then
8173 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
8175 UUID_EXTRA_OBJS="md5.o sha1.o"
8176 elif test "$with_uuid" = ossp ; then
8178 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
8181 elif test "$with_uuid" = no ; then
8184 as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
8196 # Check whether --with-libxml was given.
8197 if test "${with_libxml+set}" = set; then :
8198 withval=$with_libxml;
8202 $as_echo "#define USE_LIBXML 1" >>confdefs.h
8209 as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
8220 if test "$with_libxml" = yes ; then
8221 if test -z "$XML2_CONFIG"; then
8222 for ac_prog in xml2-config
8224 # Extract the first word of "$ac_prog", so it can be a program name with args.
8225 set dummy $ac_prog; ac_word=$2
8226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8227 $as_echo_n "checking for $ac_word... " >&6; }
8228 if ${ac_cv_path_XML2_CONFIG+:} false; then :
8229 $as_echo_n "(cached) " >&6
8231 case $XML2_CONFIG in
8233 ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
8236 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8240 test -z "$as_dir" && as_dir=.
8241 for ac_exec_ext in '' $ac_executable_extensions; do
8242 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8243 ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8244 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8254 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
8255 if test -n "$XML2_CONFIG"; then
8256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8257 $as_echo "$XML2_CONFIG" >&6; }
8259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8260 $as_echo "no" >&6; }
8264 test -n "$XML2_CONFIG" && break
8268 # Report the value of XML2_CONFIG in configure's output in all cases.
8269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
8270 $as_echo_n "checking for XML2_CONFIG... " >&6; }
8271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8272 $as_echo "$XML2_CONFIG" >&6; }
8275 if test -n "$XML2_CONFIG"; then
8276 for pgac_option in `$XML2_CONFIG --cflags`; do
8277 case $pgac_option in
8278 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8281 for pgac_option in `$XML2_CONFIG --libs`; do
8282 case $pgac_option in
8283 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8297 # Check whether --with-libxslt was given.
8298 if test "${with_libxslt+set}" = set; then :
8299 withval=$with_libxslt;
8303 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8310 as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8330 # Check whether --with-system-tzdata was given.
8331 if test "${with_system_tzdata+set}" = set; then :
8332 withval=$with_system_tzdata;
8335 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8338 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8356 # Check whether --with-zlib was given.
8357 if test "${with_zlib+set}" = set; then :
8367 as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
8383 # Assume system is ELF if it predefines __ELF__ as 1,
8384 # otherwise believe host_os based default.
8386 freebsd1*|freebsd2*) elf=no;;
8387 freebsd3*|freebsd4*) elf=yes;;
8391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
8392 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
8393 if ${ac_cv_path_GREP+:} false; then :
8394 $as_echo_n "(cached) " >&6
8396 if test -z "$GREP"; then
8397 ac_path_GREP_found=false
8398 # Loop through the user's path and test for each of PROGNAME-LIST
8399 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8400 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8403 test -z "$as_dir" && as_dir=.
8404 for ac_prog in grep ggrep; do
8405 for ac_exec_ext in '' $ac_executable_extensions; do
8406 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
8407 as_fn_executable_p "$ac_path_GREP" || continue
8408 # Check for GNU ac_path_GREP and select it if it is found.
8409 # Check for GNU $ac_path_GREP
8410 case `"$ac_path_GREP" --version 2>&1` in
8412 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
8415 $as_echo_n 0123456789 >"conftest.in"
8418 cat "conftest.in" "conftest.in" >"conftest.tmp"
8419 mv "conftest.tmp" "conftest.in"
8420 cp "conftest.in" "conftest.nl"
8421 $as_echo 'GREP' >> "conftest.nl"
8422 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8423 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8424 as_fn_arith $ac_count + 1 && ac_count=$as_val
8425 if test $ac_count -gt ${ac_path_GREP_max-0}; then
8426 # Best one so far, save it but keep looking for a better one
8427 ac_cv_path_GREP="$ac_path_GREP"
8428 ac_path_GREP_max=$ac_count
8430 # 10*(2^10) chars as input seems more than enough
8431 test $ac_count -gt 10 && break
8433 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8436 $ac_path_GREP_found && break 3
8441 if test -z "$ac_cv_path_GREP"; then
8442 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8445 ac_cv_path_GREP=$GREP
8449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
8450 $as_echo "$ac_cv_path_GREP" >&6; }
8451 GREP="$ac_cv_path_GREP"
8454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
8455 $as_echo_n "checking for egrep... " >&6; }
8456 if ${ac_cv_path_EGREP+:} false; then :
8457 $as_echo_n "(cached) " >&6
8459 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
8460 then ac_cv_path_EGREP="$GREP -E"
8462 if test -z "$EGREP"; then
8463 ac_path_EGREP_found=false
8464 # Loop through the user's path and test for each of PROGNAME-LIST
8465 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8466 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8469 test -z "$as_dir" && as_dir=.
8470 for ac_prog in egrep; do
8471 for ac_exec_ext in '' $ac_executable_extensions; do
8472 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
8473 as_fn_executable_p "$ac_path_EGREP" || continue
8474 # Check for GNU ac_path_EGREP and select it if it is found.
8475 # Check for GNU $ac_path_EGREP
8476 case `"$ac_path_EGREP" --version 2>&1` in
8478 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
8481 $as_echo_n 0123456789 >"conftest.in"
8484 cat "conftest.in" "conftest.in" >"conftest.tmp"
8485 mv "conftest.tmp" "conftest.in"
8486 cp "conftest.in" "conftest.nl"
8487 $as_echo 'EGREP' >> "conftest.nl"
8488 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
8489 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
8490 as_fn_arith $ac_count + 1 && ac_count=$as_val
8491 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
8492 # Best one so far, save it but keep looking for a better one
8493 ac_cv_path_EGREP="$ac_path_EGREP"
8494 ac_path_EGREP_max=$ac_count
8496 # 10*(2^10) chars as input seems more than enough
8497 test $ac_count -gt 10 && break
8499 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
8502 $ac_path_EGREP_found && break 3
8507 if test -z "$ac_cv_path_EGREP"; then
8508 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
8511 ac_cv_path_EGREP=$EGREP
8516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
8517 $as_echo "$ac_cv_path_EGREP" >&6; }
8518 EGREP="$ac_cv_path_EGREP"
8521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8522 /* end confdefs.h. */
8528 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8529 $EGREP "yes" >/dev/null 2>&1; then :
8532 if test "X$elf" = "Xyes" ; then
8546 CPPFLAGS="$CPPFLAGS $INCLUDES"
8547 LDFLAGS="$LDFLAGS $LIBDIRS"
8553 # Check whether --with-gnu-ld was given.
8554 if test "${with_gnu_ld+set}" = set; then :
8555 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8561 if test "$GCC" = yes; then
8562 # Check if gcc -print-prog-name=ld gives a path.
8563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8564 $as_echo_n "checking for ld used by GCC... " >&6; }
8567 # gcc leaves a trailing carriage return which upsets mingw
8568 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8570 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8573 # Accept absolute paths.
8574 [\\/]* | [A-Za-z]:[\\/]*)
8575 re_direlt='/[^/][^/]*/\.\./'
8576 # Canonicalize the path of ld
8577 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8578 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8579 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8581 test -z "$LD" && LD="$ac_prog"
8584 # If it fails, then pretend we aren't using GCC.
8588 # If it is relative, then search for the first ld in PATH.
8592 elif test "$with_gnu_ld" = yes; then
8593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8594 $as_echo_n "checking for GNU ld... " >&6; }
8596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8597 $as_echo_n "checking for non-GNU ld... " >&6; }
8599 if ${ac_cv_path_LD+:} false; then :
8600 $as_echo_n "(cached) " >&6
8602 if test -z "$LD"; then
8603 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8604 for ac_dir in $PATH; do
8605 test -z "$ac_dir" && ac_dir=.
8606 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8607 ac_cv_path_LD="$ac_dir/$ac_prog"
8608 # Check to see if the program is GNU ld. I'd rather use --version,
8609 # but apparently some GNU ld's only accept -v.
8610 # Break only if it was the GNU/non-GNU ld that we prefer.
8611 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8612 test "$with_gnu_ld" != no && break
8614 test "$with_gnu_ld" != yes && break
8620 ac_cv_path_LD="$LD" # Let the user override the test with a path.
8625 if test -n "$LD"; then
8626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8627 $as_echo "$LD" >&6; }
8629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8630 $as_echo "no" >&6; }
8632 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8634 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8635 if ${ac_cv_prog_gnu_ld+:} false; then :
8636 $as_echo_n "(cached) " >&6
8638 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8639 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8640 ac_cv_prog_gnu_ld=yes
8642 ac_cv_prog_gnu_ld=no
8645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
8646 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
8647 with_gnu_ld=$ac_cv_prog_gnu_ld
8652 if test -n "$ac_tool_prefix"; then
8653 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8654 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8656 $as_echo_n "checking for $ac_word... " >&6; }
8657 if ${ac_cv_prog_RANLIB+:} false; then :
8658 $as_echo_n "(cached) " >&6
8660 if test -n "$RANLIB"; then
8661 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8663 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8667 test -z "$as_dir" && as_dir=.
8668 for ac_exec_ext in '' $ac_executable_extensions; do
8669 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8670 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8671 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8680 RANLIB=$ac_cv_prog_RANLIB
8681 if test -n "$RANLIB"; then
8682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8683 $as_echo "$RANLIB" >&6; }
8685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8686 $as_echo "no" >&6; }
8691 if test -z "$ac_cv_prog_RANLIB"; then
8692 ac_ct_RANLIB=$RANLIB
8693 # Extract the first word of "ranlib", so it can be a program name with args.
8694 set dummy ranlib; ac_word=$2
8695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8696 $as_echo_n "checking for $ac_word... " >&6; }
8697 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8698 $as_echo_n "(cached) " >&6
8700 if test -n "$ac_ct_RANLIB"; then
8701 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8703 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8707 test -z "$as_dir" && as_dir=.
8708 for ac_exec_ext in '' $ac_executable_extensions; do
8709 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8710 ac_cv_prog_ac_ct_RANLIB="ranlib"
8711 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8720 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8721 if test -n "$ac_ct_RANLIB"; then
8722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8723 $as_echo "$ac_ct_RANLIB" >&6; }
8725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8726 $as_echo "no" >&6; }
8729 if test "x$ac_ct_RANLIB" = x; then
8732 case $cross_compiling:$ac_tool_warned in
8734 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8735 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8736 ac_tool_warned=yes ;;
8738 RANLIB=$ac_ct_RANLIB
8741 RANLIB="$ac_cv_prog_RANLIB"
8745 if test -n "$ac_tool_prefix"; then
8746 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8747 set dummy ${ac_tool_prefix}strip; ac_word=$2
8748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8749 $as_echo_n "checking for $ac_word... " >&6; }
8750 if ${ac_cv_prog_STRIP+:} false; then :
8751 $as_echo_n "(cached) " >&6
8753 if test -n "$STRIP"; then
8754 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8756 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8760 test -z "$as_dir" && as_dir=.
8761 for ac_exec_ext in '' $ac_executable_extensions; do
8762 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8763 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8764 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8773 STRIP=$ac_cv_prog_STRIP
8774 if test -n "$STRIP"; then
8775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8776 $as_echo "$STRIP" >&6; }
8778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8779 $as_echo "no" >&6; }
8784 if test -z "$ac_cv_prog_STRIP"; then
8786 # Extract the first word of "strip", so it can be a program name with args.
8787 set dummy strip; ac_word=$2
8788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8789 $as_echo_n "checking for $ac_word... " >&6; }
8790 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8791 $as_echo_n "(cached) " >&6
8793 if test -n "$ac_ct_STRIP"; then
8794 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8796 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8800 test -z "$as_dir" && as_dir=.
8801 for ac_exec_ext in '' $ac_executable_extensions; do
8802 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8803 ac_cv_prog_ac_ct_STRIP="strip"
8804 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8813 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8814 if test -n "$ac_ct_STRIP"; then
8815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8816 $as_echo "$ac_ct_STRIP" >&6; }
8818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8819 $as_echo "no" >&6; }
8822 if test "x$ac_ct_STRIP" = x; then
8825 case $cross_compiling:$ac_tool_warned in
8827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8828 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8829 ac_tool_warned=yes ;;
8834 STRIP="$ac_cv_prog_STRIP"
8838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
8839 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
8840 if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
8841 STRIP_STATIC_LIB="$STRIP -x"
8842 STRIP_SHARED_LIB="$STRIP --strip-unneeded"
8843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8844 $as_echo "yes" >&6; }
8849 STRIP_STATIC_LIB=$STRIP
8850 STRIP_SHARED_LIB=$STRIP
8851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8852 $as_echo "yes" >&6; }
8857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8858 $as_echo "no" >&6; }
8865 if test -n "$ac_tool_prefix"; then
8866 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8867 set dummy ${ac_tool_prefix}ar; ac_word=$2
8868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8869 $as_echo_n "checking for $ac_word... " >&6; }
8870 if ${ac_cv_prog_AR+:} false; then :
8871 $as_echo_n "(cached) " >&6
8873 if test -n "$AR"; then
8874 ac_cv_prog_AR="$AR" # Let the user override the test.
8876 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8880 test -z "$as_dir" && as_dir=.
8881 for ac_exec_ext in '' $ac_executable_extensions; do
8882 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8883 ac_cv_prog_AR="${ac_tool_prefix}ar"
8884 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8894 if test -n "$AR"; then
8895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8896 $as_echo "$AR" >&6; }
8898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8899 $as_echo "no" >&6; }
8904 if test -z "$ac_cv_prog_AR"; then
8906 # Extract the first word of "ar", so it can be a program name with args.
8907 set dummy ar; ac_word=$2
8908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8909 $as_echo_n "checking for $ac_word... " >&6; }
8910 if ${ac_cv_prog_ac_ct_AR+:} false; then :
8911 $as_echo_n "(cached) " >&6
8913 if test -n "$ac_ct_AR"; then
8914 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8916 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8920 test -z "$as_dir" && as_dir=.
8921 for ac_exec_ext in '' $ac_executable_extensions; do
8922 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8923 ac_cv_prog_ac_ct_AR="ar"
8924 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8933 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8934 if test -n "$ac_ct_AR"; then
8935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8936 $as_echo "$ac_ct_AR" >&6; }
8938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8939 $as_echo "no" >&6; }
8942 if test "x$ac_ct_AR" = x; then
8945 case $cross_compiling:$ac_tool_warned in
8947 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8948 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8949 ac_tool_warned=yes ;;
8957 if test "$PORTNAME" = "win32"; then
8958 if test -n "$ac_tool_prefix"; then
8959 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8960 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8962 $as_echo_n "checking for $ac_word... " >&6; }
8963 if ${ac_cv_prog_DLLTOOL+:} false; then :
8964 $as_echo_n "(cached) " >&6
8966 if test -n "$DLLTOOL"; then
8967 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8969 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8973 test -z "$as_dir" && as_dir=.
8974 for ac_exec_ext in '' $ac_executable_extensions; do
8975 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8976 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8977 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8986 DLLTOOL=$ac_cv_prog_DLLTOOL
8987 if test -n "$DLLTOOL"; then
8988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8989 $as_echo "$DLLTOOL" >&6; }
8991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8992 $as_echo "no" >&6; }
8997 if test -z "$ac_cv_prog_DLLTOOL"; then
8998 ac_ct_DLLTOOL=$DLLTOOL
8999 # Extract the first word of "dlltool", so it can be a program name with args.
9000 set dummy dlltool; ac_word=$2
9001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9002 $as_echo_n "checking for $ac_word... " >&6; }
9003 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
9004 $as_echo_n "(cached) " >&6
9006 if test -n "$ac_ct_DLLTOOL"; then
9007 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
9009 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9013 test -z "$as_dir" && as_dir=.
9014 for ac_exec_ext in '' $ac_executable_extensions; do
9015 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9016 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
9017 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9026 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
9027 if test -n "$ac_ct_DLLTOOL"; then
9028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
9029 $as_echo "$ac_ct_DLLTOOL" >&6; }
9031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9032 $as_echo "no" >&6; }
9035 if test "x$ac_ct_DLLTOOL" = x; then
9038 case $cross_compiling:$ac_tool_warned in
9040 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9041 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9042 ac_tool_warned=yes ;;
9044 DLLTOOL=$ac_ct_DLLTOOL
9047 DLLTOOL="$ac_cv_prog_DLLTOOL"
9050 if test -n "$ac_tool_prefix"; then
9051 # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
9052 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
9053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9054 $as_echo_n "checking for $ac_word... " >&6; }
9055 if ${ac_cv_prog_DLLWRAP+:} false; then :
9056 $as_echo_n "(cached) " >&6
9058 if test -n "$DLLWRAP"; then
9059 ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
9061 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9065 test -z "$as_dir" && as_dir=.
9066 for ac_exec_ext in '' $ac_executable_extensions; do
9067 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9068 ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
9069 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9078 DLLWRAP=$ac_cv_prog_DLLWRAP
9079 if test -n "$DLLWRAP"; then
9080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
9081 $as_echo "$DLLWRAP" >&6; }
9083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9084 $as_echo "no" >&6; }
9089 if test -z "$ac_cv_prog_DLLWRAP"; then
9090 ac_ct_DLLWRAP=$DLLWRAP
9091 # Extract the first word of "dllwrap", so it can be a program name with args.
9092 set dummy dllwrap; ac_word=$2
9093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9094 $as_echo_n "checking for $ac_word... " >&6; }
9095 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
9096 $as_echo_n "(cached) " >&6
9098 if test -n "$ac_ct_DLLWRAP"; then
9099 ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
9101 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9105 test -z "$as_dir" && as_dir=.
9106 for ac_exec_ext in '' $ac_executable_extensions; do
9107 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9108 ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
9109 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9118 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
9119 if test -n "$ac_ct_DLLWRAP"; then
9120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
9121 $as_echo "$ac_ct_DLLWRAP" >&6; }
9123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9124 $as_echo "no" >&6; }
9127 if test "x$ac_ct_DLLWRAP" = x; then
9130 case $cross_compiling:$ac_tool_warned in
9132 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9133 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9134 ac_tool_warned=yes ;;
9136 DLLWRAP=$ac_ct_DLLWRAP
9139 DLLWRAP="$ac_cv_prog_DLLWRAP"
9142 if test -n "$ac_tool_prefix"; then
9143 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9144 set dummy ${ac_tool_prefix}windres; ac_word=$2
9145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9146 $as_echo_n "checking for $ac_word... " >&6; }
9147 if ${ac_cv_prog_WINDRES+:} false; then :
9148 $as_echo_n "(cached) " >&6
9150 if test -n "$WINDRES"; then
9151 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9153 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9157 test -z "$as_dir" && as_dir=.
9158 for ac_exec_ext in '' $ac_executable_extensions; do
9159 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9160 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9161 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9170 WINDRES=$ac_cv_prog_WINDRES
9171 if test -n "$WINDRES"; then
9172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9173 $as_echo "$WINDRES" >&6; }
9175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9176 $as_echo "no" >&6; }
9181 if test -z "$ac_cv_prog_WINDRES"; then
9182 ac_ct_WINDRES=$WINDRES
9183 # Extract the first word of "windres", so it can be a program name with args.
9184 set dummy windres; ac_word=$2
9185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9186 $as_echo_n "checking for $ac_word... " >&6; }
9187 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9188 $as_echo_n "(cached) " >&6
9190 if test -n "$ac_ct_WINDRES"; then
9191 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9193 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9197 test -z "$as_dir" && as_dir=.
9198 for ac_exec_ext in '' $ac_executable_extensions; do
9199 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9200 ac_cv_prog_ac_ct_WINDRES="windres"
9201 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9210 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9211 if test -n "$ac_ct_WINDRES"; then
9212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9213 $as_echo "$ac_ct_WINDRES" >&6; }
9215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9216 $as_echo "no" >&6; }
9219 if test "x$ac_ct_WINDRES" = x; then
9222 case $cross_compiling:$ac_tool_warned in
9224 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9225 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9226 ac_tool_warned=yes ;;
9228 WINDRES=$ac_ct_WINDRES
9231 WINDRES="$ac_cv_prog_WINDRES"
9236 # Find a good install program. We prefer a C program (faster),
9237 # so one script is as good as another. But avoid the broken or
9238 # incompatible versions:
9239 # SysV /etc/install, /usr/sbin/install
9240 # SunOS /usr/etc/install
9241 # IRIX /sbin/install
9243 # AmigaOS /C/install, which installs bootblocks on floppy discs
9244 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9245 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9246 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9247 # OS/2's system install, which has a completely different semantic
9248 # ./install, which can be erroneously created by make from ./install.sh.
9249 # Reject install programs that cannot install multiple files.
9250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9251 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9252 if test -z "$INSTALL"; then
9253 if ${ac_cv_path_install+:} false; then :
9254 $as_echo_n "(cached) " >&6
9256 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9260 test -z "$as_dir" && as_dir=.
9261 # Account for people who put trailing slashes in PATH elements.
9262 case $as_dir/ in #((
9263 ./ | .// | /[cC]/* | \
9264 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9265 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9268 # OSF1 and SCO ODT 3.0 have their own names for install.
9269 # Don't use installbsd from OSF since it installs stuff as root
9271 for ac_prog in ginstall scoinst install; do
9272 for ac_exec_ext in '' $ac_executable_extensions; do
9273 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9274 if test $ac_prog = install &&
9275 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9276 # AIX install. It has an incompatible calling convention.
9278 elif test $ac_prog = install &&
9279 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9280 # program-specific install script used by HP pwplus--don't use.
9283 rm -rf conftest.one conftest.two conftest.dir
9284 echo one > conftest.one
9285 echo two > conftest.two
9287 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9288 test -s conftest.one && test -s conftest.two &&
9289 test -s conftest.dir/conftest.one &&
9290 test -s conftest.dir/conftest.two
9292 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9305 rm -rf conftest.one conftest.two conftest.dir
9308 if test "${ac_cv_path_install+set}" = set; then
9309 INSTALL=$ac_cv_path_install
9311 # As a last resort, use the slow shell script. Don't cache a
9312 # value for INSTALL within a source directory, because that will
9313 # break other packages using the cache if that directory is
9314 # removed, or if the value is a relative name.
9315 INSTALL=$ac_install_sh
9318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9319 $as_echo "$INSTALL" >&6; }
9321 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9322 # It thinks the first close brace ends the variable substitution.
9323 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9325 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9327 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9329 # When Autoconf chooses install-sh as install program it tries to generate
9330 # a relative path to it in each makefile where it substitutes it. This clashes
9331 # with our Makefile.global concept. This workaround helps.
9333 *install-sh*) install_bin='';;
9334 *) install_bin=$INSTALL;;
9338 if test -z "$TAR"; then
9341 # Extract the first word of "$ac_prog", so it can be a program name with args.
9342 set dummy $ac_prog; ac_word=$2
9343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9344 $as_echo_n "checking for $ac_word... " >&6; }
9345 if ${ac_cv_path_TAR+:} false; then :
9346 $as_echo_n "(cached) " >&6
9350 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9353 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9357 test -z "$as_dir" && as_dir=.
9358 for ac_exec_ext in '' $ac_executable_extensions; do
9359 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9360 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9361 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9372 if test -n "$TAR"; then
9373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9374 $as_echo "$TAR" >&6; }
9376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9377 $as_echo "no" >&6; }
9381 test -n "$TAR" && break
9385 # Report the value of TAR in configure's output in all cases.
9386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9387 $as_echo_n "checking for TAR... " >&6; }
9388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9389 $as_echo "$TAR" >&6; }
9392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9393 $as_echo_n "checking whether ln -s works... " >&6; }
9395 if test "$LN_S" = "ln -s"; then
9396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9397 $as_echo "yes" >&6; }
9399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9400 $as_echo "no, using $LN_S" >&6; }
9403 for ac_prog in gawk mawk nawk awk
9405 # Extract the first word of "$ac_prog", so it can be a program name with args.
9406 set dummy $ac_prog; ac_word=$2
9407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9408 $as_echo_n "checking for $ac_word... " >&6; }
9409 if ${ac_cv_prog_AWK+:} false; then :
9410 $as_echo_n "(cached) " >&6
9412 if test -n "$AWK"; then
9413 ac_cv_prog_AWK="$AWK" # Let the user override the test.
9415 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9419 test -z "$as_dir" && as_dir=.
9420 for ac_exec_ext in '' $ac_executable_extensions; do
9421 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9422 ac_cv_prog_AWK="$ac_prog"
9423 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9433 if test -n "$AWK"; then
9434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
9435 $as_echo "$AWK" >&6; }
9437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9438 $as_echo "no" >&6; }
9442 test -n "$AWK" && break
9445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
9446 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
9447 if test -z "$MKDIR_P"; then
9448 if ${ac_cv_path_mkdir+:} false; then :
9449 $as_echo_n "(cached) " >&6
9451 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9452 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
9455 test -z "$as_dir" && as_dir=.
9456 for ac_prog in mkdir gmkdir; do
9457 for ac_exec_ext in '' $ac_executable_extensions; do
9458 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
9459 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
9460 'mkdir (GNU coreutils) '* | \
9461 'mkdir (coreutils) '* | \
9462 'mkdir (fileutils) '4.1*)
9463 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
9473 test -d ./--version && rmdir ./--version
9474 if test "${ac_cv_path_mkdir+set}" = set; then
9475 MKDIR_P="$ac_cv_path_mkdir -p"
9477 # As a last resort, use the slow shell script. Don't cache a
9478 # value for MKDIR_P within a source directory, because that will
9479 # break other packages using the cache if that directory is
9480 # removed, or if the value is a relative name.
9481 MKDIR_P="$ac_install_sh -d"
9484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
9485 $as_echo "$MKDIR_P" >&6; }
9487 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
9488 # a relative path to it in each makefile where it substitutes it. This clashes
9489 # with our Makefile.global concept. This workaround helps.
9491 *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
9494 if test -z "$BISON"; then
9495 for ac_prog in bison
9497 # Extract the first word of "$ac_prog", so it can be a program name with args.
9498 set dummy $ac_prog; ac_word=$2
9499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9500 $as_echo_n "checking for $ac_word... " >&6; }
9501 if ${ac_cv_path_BISON+:} false; then :
9502 $as_echo_n "(cached) " >&6
9506 ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
9509 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9513 test -z "$as_dir" && as_dir=.
9514 for ac_exec_ext in '' $ac_executable_extensions; do
9515 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9516 ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
9517 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9527 BISON=$ac_cv_path_BISON
9528 if test -n "$BISON"; then
9529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9530 $as_echo "$BISON" >&6; }
9532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9533 $as_echo "no" >&6; }
9537 test -n "$BISON" && break
9541 # Report the value of BISON in configure's output in all cases.
9542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
9543 $as_echo_n "checking for BISON... " >&6; }
9544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
9545 $as_echo "$BISON" >&6; }
9549 if test "$BISON"; then
9550 pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
9551 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
9552 $as_echo "$as_me: using $pgac_bison_version" >&6;}
9553 if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
9555 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9556 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9557 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
9558 $as_echo "$as_me: WARNING:
9559 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
9560 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
9563 # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
9564 # of the now preferred %name-prefix "base_yy", but the latter
9565 # doesn't work with Bison 2.3 or less. So for now we silence the
9566 # deprecation warnings.
9567 if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
9569 BISONFLAGS="$BISONFLAGS -Wno-deprecated"
9573 if test -z "$BISON"; then
9574 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9575 *** Without Bison you will not be able to build PostgreSQL from Git nor
9576 *** change any of the parser definition files. You can obtain Bison from
9577 *** a GNU mirror site. (If you are using the official distribution of
9578 *** PostgreSQL then you do not need to worry about this, because the Bison
9579 *** output is pre-generated.)" >&5
9580 $as_echo "$as_me: WARNING:
9581 *** Without Bison you will not be able to build PostgreSQL from Git nor
9582 *** change any of the parser definition files. You can obtain Bison from
9583 *** a GNU mirror site. (If you are using the official distribution of
9584 *** PostgreSQL then you do not need to worry about this, because the Bison
9585 *** output is pre-generated.)" >&2;}
9587 # We don't need AC_SUBST(BISON) because PGAC_PATH_PROGS did it
9590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
9591 $as_echo_n "checking for flex... " >&6; }
9592 if ${pgac_cv_path_flex+:} false; then :
9593 $as_echo_n "(cached) " >&6
9595 # Let the user override the test
9596 if test -n "$FLEX"; then
9597 pgac_cv_path_flex=$FLEX
9601 for pgac_dir in $PATH; do
9603 if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
9606 for pgac_prog in flex lex; do
9607 pgac_candidate="$pgac_dir/$pgac_prog"
9608 if test -f "$pgac_candidate" \
9609 && $pgac_candidate --version </dev/null >/dev/null 2>&1
9611 echo '%%' > conftest.l
9612 if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
9613 pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
9614 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;}'
9616 pgac_cv_path_flex=$pgac_candidate
9619 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9620 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9621 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
9622 $as_echo "$as_me: WARNING:
9623 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
9624 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
9630 rm -f conftest.l lex.yy.c
9631 : ${pgac_cv_path_flex=no}
9635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
9636 $as_echo "$pgac_cv_path_flex" >&6; }
9637 if test x"$pgac_cv_path_flex" = x"no"; then
9638 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9639 *** Without Flex you will not be able to build PostgreSQL from Git nor
9640 *** change any of the scanner definition files. You can obtain Flex from
9641 *** a GNU mirror site. (If you are using the official distribution of
9642 *** PostgreSQL then you do not need to worry about this because the Flex
9643 *** output is pre-generated.)" >&5
9644 $as_echo "$as_me: WARNING:
9645 *** Without Flex you will not be able to build PostgreSQL from Git nor
9646 *** change any of the scanner definition files. You can obtain Flex from
9647 *** a GNU mirror site. (If you are using the official distribution of
9648 *** PostgreSQL then you do not need to worry about this because the Flex
9649 *** output is pre-generated.)" >&2;}
9653 FLEX=$pgac_cv_path_flex
9654 pgac_flex_version=`$FLEX --version 2>/dev/null`
9655 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
9656 $as_echo "$as_me: using $pgac_flex_version" >&6;}
9663 if test -z "$PERL"; then
9666 # Extract the first word of "$ac_prog", so it can be a program name with args.
9667 set dummy $ac_prog; ac_word=$2
9668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9669 $as_echo_n "checking for $ac_word... " >&6; }
9670 if ${ac_cv_path_PERL+:} false; then :
9671 $as_echo_n "(cached) " >&6
9675 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
9678 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9682 test -z "$as_dir" && as_dir=.
9683 for ac_exec_ext in '' $ac_executable_extensions; do
9684 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9685 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
9686 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9696 PERL=$ac_cv_path_PERL
9697 if test -n "$PERL"; then
9698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9699 $as_echo "$PERL" >&6; }
9701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9702 $as_echo "no" >&6; }
9706 test -n "$PERL" && break
9710 # Report the value of PERL in configure's output in all cases.
9711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
9712 $as_echo_n "checking for PERL... " >&6; }
9713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
9714 $as_echo "$PERL" >&6; }
9718 if test "$PERL"; then
9719 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'`
9720 { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
9721 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
9722 if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
9723 $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
9725 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9726 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9727 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
9728 $as_echo "$as_me: WARNING:
9729 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
9730 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
9735 if test -z "$PERL"; then
9736 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9737 *** Without Perl you will not be able to build PostgreSQL from Git.
9738 *** You can obtain Perl from any CPAN mirror site.
9739 *** (If you are using the official distribution of PostgreSQL then you do not
9740 *** need to worry about this, because the Perl output is pre-generated.)" >&5
9741 $as_echo "$as_me: WARNING:
9742 *** Without Perl you will not be able to build PostgreSQL from Git.
9743 *** You can obtain Perl from any CPAN mirror site.
9744 *** (If you are using the official distribution of PostgreSQL then you do not
9745 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
9748 if test "$with_perl" = yes; then
9749 if test -z "$PERL"; then
9750 as_fn_error $? "Perl not found" "$LINENO" 5
9753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
9754 $as_echo_n "checking for Perl archlibexp... " >&6; }
9755 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
9756 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
9757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
9758 $as_echo "$perl_archlibexp" >&6; }
9759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
9760 $as_echo_n "checking for Perl privlibexp... " >&6; }
9761 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
9762 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
9763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
9764 $as_echo "$perl_privlibexp" >&6; }
9765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
9766 $as_echo_n "checking for Perl useshrplib... " >&6; }
9767 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
9768 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
9769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
9770 $as_echo "$perl_useshrplib" >&6; }
9771 if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
9772 as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
9773 You might have to rebuild your Perl installation. Refer to the
9774 documentation for details. Use --without-perl to disable building
9775 PL/Perl." "$LINENO" 5
9777 # On most platforms, archlibexp is also where the Perl include files live ...
9778 perl_includespec="-I$perl_archlibexp/CORE"
9779 # ... but on newer macOS versions, we must use -iwithsysroot to look
9781 if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
9782 if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
9783 perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
9787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
9788 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
9789 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
9790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
9791 $as_echo "$perl_ccflags" >&6; }
9792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
9793 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
9794 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
9795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
9796 $as_echo "$perl_embed_ccflags" >&6; }
9799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
9800 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
9801 if test "$PORTNAME" = "win32" ; then
9802 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
9803 if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
9804 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9806 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
9807 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
9808 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
9812 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
9813 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
9814 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
9816 if test -z "$perl_embed_ldflags" ; then
9817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9818 $as_echo "no" >&6; }
9819 as_fn_error $? "could not determine flags for linking embedded Perl.
9820 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
9821 installed." "$LINENO" 5
9823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
9824 $as_echo "$perl_embed_ldflags" >&6; }
9829 if test "$with_python" = yes; then
9830 if test -z "$PYTHON"; then
9831 for ac_prog in python
9833 # Extract the first word of "$ac_prog", so it can be a program name with args.
9834 set dummy $ac_prog; ac_word=$2
9835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9836 $as_echo_n "checking for $ac_word... " >&6; }
9837 if ${ac_cv_path_PYTHON+:} false; then :
9838 $as_echo_n "(cached) " >&6
9842 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
9845 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9849 test -z "$as_dir" && as_dir=.
9850 for ac_exec_ext in '' $ac_executable_extensions; do
9851 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9852 ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
9853 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9863 PYTHON=$ac_cv_path_PYTHON
9864 if test -n "$PYTHON"; then
9865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9866 $as_echo "$PYTHON" >&6; }
9868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9869 $as_echo "no" >&6; }
9873 test -n "$PYTHON" && break
9877 # Report the value of PYTHON in configure's output in all cases.
9878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
9879 $as_echo_n "checking for PYTHON... " >&6; }
9880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
9881 $as_echo "$PYTHON" >&6; }
9884 if test x"$PYTHON" = x""; then
9885 as_fn_error $? "Python not found" "$LINENO" 5
9889 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
9890 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
9891 $as_echo "$as_me: using python $python_fullversion" >&6;}
9892 # python_fullversion is typically n.n.n plus some trailing junk
9893 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
9894 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
9895 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
9896 # Reject unsupported Python versions as soon as practical.
9897 if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 4; then
9898 as_fn_error $? "Python version $python_version is too old (version 2.4 or later is required)" "$LINENO" 5
9901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
9902 $as_echo_n "checking for Python distutils module... " >&6; }
9903 if "${PYTHON}" -c 'import distutils' 2>&5
9905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9906 $as_echo "yes" >&6; }
9908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9909 $as_echo "no" >&6; }
9910 as_fn_error $? "distutils module not found" "$LINENO" 5
9913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
9914 $as_echo_n "checking Python configuration directory... " >&6; }
9915 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
9916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
9917 $as_echo "$python_configdir" >&6; }
9919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
9920 $as_echo_n "checking Python include directories... " >&6; }
9921 python_includespec=`${PYTHON} -c "
9922 import distutils.sysconfig
9923 a = '-I' + distutils.sysconfig.get_python_inc(False)
9924 b = '-I' + distutils.sysconfig.get_python_inc(True)
9928 print(a + ' ' + b)"`
9929 if test "$PORTNAME" = win32 ; then
9930 python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
9932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
9933 $as_echo "$python_includespec" >&6; }
9937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
9938 $as_echo_n "checking how to link an embedded Python application... " >&6; }
9940 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
9941 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
9943 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
9944 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
9945 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
9947 ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
9950 # Otherwise, guess the base name of the shlib.
9951 # LDVERSION was added in Python 3.2, before that use VERSION,
9952 # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
9953 python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
9954 if test x"${python_ldversion}" != x""; then
9955 ldlibrary="python${python_ldversion}"
9957 python_version_var=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('VERSION'))))"`
9958 if test x"${python_version_var}" != x""; then
9959 ldlibrary="python${python_version_var}"
9961 ldlibrary="python${python_version}"
9964 # Search for a likely-looking file.
9966 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9968 # We don't know the platform DLSUFFIX here, so check 'em all.
9969 for e in .so .dll .dylib .sl; do
9970 if test -e "$d/lib${ldlibrary}$e"; then
9977 # Some platforms (OpenBSD) require us to accept a bare versioned shlib
9978 # (".so.n.n") as well. However, check this only after failing to find
9979 # ".so" anywhere, because yet other platforms (Debian) put the .so
9980 # symlink in a different directory from the underlying versioned shlib.
9981 if test "$found_shlib" != 1; then
9982 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
9984 for f in "$d/lib${ldlibrary}.so."* ; do
9985 if test -e "$f"; then
9993 # As usual, Windows has its own ideas. Possible default library
9994 # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
9995 # and the "lib" prefix might not be there.
9996 if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
9997 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
9999 for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
10000 if test -e "$f"; then
10009 if test "$found_shlib" != 1; then
10010 as_fn_error $? "could not find shared library for Python
10011 You might have to rebuild your Python installation. Refer to the
10012 documentation for details. Use --without-python to disable building
10013 PL/Python." "$LINENO" 5
10015 python_libspec="-L${python_libdir} -l${ldlibrary}"
10017 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
10019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
10020 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
10026 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
10027 if test -z "$ZIC"; then
10030 # Extract the first word of "$ac_prog", so it can be a program name with args.
10031 set dummy $ac_prog; ac_word=$2
10032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10033 $as_echo_n "checking for $ac_word... " >&6; }
10034 if ${ac_cv_path_ZIC+:} false; then :
10035 $as_echo_n "(cached) " >&6
10039 ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
10042 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10043 for as_dir in $PATH
10046 test -z "$as_dir" && as_dir=.
10047 for ac_exec_ext in '' $ac_executable_extensions; do
10048 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10049 ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
10050 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10060 ZIC=$ac_cv_path_ZIC
10061 if test -n "$ZIC"; then
10062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10063 $as_echo "$ZIC" >&6; }
10065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10066 $as_echo "no" >&6; }
10070 test -n "$ZIC" && break
10074 # Report the value of ZIC in configure's output in all cases.
10075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
10076 $as_echo_n "checking for ZIC... " >&6; }
10077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10078 $as_echo "$ZIC" >&6; }
10081 if test -z "$ZIC"; then
10083 When cross-compiling, either use the option --with-system-tzdata to use
10084 existing time-zone data, or set the environment variable ZIC to a zic
10085 program to use during the build." "$LINENO" 5
10092 # For each platform, we need to know about any special compile and link
10093 # libraries, and whether the normal C function names are thread-safe.
10094 # See the comment at the top of src/port/thread.c for more information.
10095 # WIN32 doesn't need the pthread tests; it always uses threads
10097 # These tests are run before the library-tests, because linking with the
10098 # other libraries can pull in the pthread functions as a side-effect. We
10099 # want to use the -pthread or similar flags directly, and not rely on
10100 # the side-effects of linking with some other library.
10102 # note: We have to use AS_IF here rather than plain if. The AC_CHECK_HEADER
10103 # invocation below is the first one in the script, and autoconf generates
10104 # additional code for that, which must not be inside the if-block. AS_IF
10105 # knows how to do that.
10106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10107 $as_echo_n "checking for ANSI C header files... " >&6; }
10108 if ${ac_cv_header_stdc+:} false; then :
10109 $as_echo_n "(cached) " >&6
10111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10112 /* end confdefs.h. */
10113 #include <stdlib.h>
10114 #include <stdarg.h>
10115 #include <string.h>
10126 if ac_fn_c_try_compile "$LINENO"; then :
10127 ac_cv_header_stdc=yes
10129 ac_cv_header_stdc=no
10131 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10133 if test $ac_cv_header_stdc = yes; then
10134 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10136 /* end confdefs.h. */
10137 #include <string.h>
10140 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10141 $EGREP "memchr" >/dev/null 2>&1; then :
10144 ac_cv_header_stdc=no
10150 if test $ac_cv_header_stdc = yes; then
10151 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10153 /* end confdefs.h. */
10154 #include <stdlib.h>
10157 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10158 $EGREP "free" >/dev/null 2>&1; then :
10161 ac_cv_header_stdc=no
10167 if test $ac_cv_header_stdc = yes; then
10168 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10169 if test "$cross_compiling" = yes; then :
10172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10173 /* end confdefs.h. */
10175 #include <stdlib.h>
10176 #if ((' ' & 0x0FF) == 0x020)
10177 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10178 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10180 # define ISLOWER(c) \
10181 (('a' <= (c) && (c) <= 'i') \
10182 || ('j' <= (c) && (c) <= 'r') \
10183 || ('s' <= (c) && (c) <= 'z'))
10184 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10187 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10192 for (i = 0; i < 256; i++)
10193 if (XOR (islower (i), ISLOWER (i))
10194 || toupper (i) != TOUPPER (i))
10199 if ac_fn_c_try_run "$LINENO"; then :
10202 ac_cv_header_stdc=no
10204 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10205 conftest.$ac_objext conftest.beam conftest.$ac_ext
10210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
10211 $as_echo "$ac_cv_header_stdc" >&6; }
10212 if test $ac_cv_header_stdc = yes; then
10214 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
10218 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10219 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10220 inttypes.h stdint.h unistd.h
10222 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10223 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
10225 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10226 cat >>confdefs.h <<_ACEOF
10227 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10235 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
10241 ac_cpp='$CPP $CPPFLAGS'
10242 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10243 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10244 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10248 # We used to check for pthread.h first, but this fails if pthread.h
10249 # requires special compiler flags (e.g. on Tru64 or Sequent).
10250 # It gets checked for in the link test anyway.
10252 # First of all, check if the user has set any of the PTHREAD_LIBS,
10253 # etcetera environment variables, and if threads linking works using
10255 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
10256 save_CFLAGS="$CFLAGS"
10257 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10259 LIBS="$PTHREAD_LIBS $LIBS"
10260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
10261 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
10262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10263 /* end confdefs.h. */
10265 /* Override any GCC internal prototype to avoid an error.
10266 Use char because int might match the return type of a GCC
10267 builtin and then its argument prototype would still apply. */
10271 char pthread_join ();
10275 return pthread_join ();
10280 if ac_fn_c_try_link "$LINENO"; then :
10283 rm -f core conftest.err conftest.$ac_objext \
10284 conftest$ac_exeext conftest.$ac_ext
10285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10286 $as_echo "$ax_pthread_ok" >&6; }
10287 if test x"$ax_pthread_ok" = xno; then
10292 CFLAGS="$save_CFLAGS"
10295 # We must check for the threads library under a number of different
10296 # names; the ordering is very important because some systems
10297 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
10298 # libraries is broken (non-POSIX).
10300 # Create a list of thread flags to try. Items starting with a "-" are
10301 # C compiler flags, and other items are library names, except for "none"
10302 # which indicates that we try without any flags at all, and "pthread-config"
10303 # which is a program returning the flags for the Pth emulation library.
10305 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt -mthreads pthread --thread-safe pthread-config"
10307 # The ordering *is* (sometimes) important. Some notes on the
10308 # individual items follow:
10310 # pthreads: AIX (must check this before -lpthread)
10311 # none: in case threads are in libc; should be tried before -Kthread and
10312 # other compiler flags to prevent continual compiler warnings
10313 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
10314 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
10315 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
10316 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
10317 # -pthreads: Solaris/gcc
10318 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
10319 # doesn't hurt to check since this sometimes defines pthreads and
10320 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
10321 # is present but should not be used directly)
10322 # -mthreads: Mingw32/gcc, Lynx/gcc
10323 # pthread: Linux, etcetera
10324 # --thread-safe: KAI C++
10325 # pthread-config: use pthread-config program (for GNU Pth library)
10331 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
10332 # multi-threading and also sets -lpthread."
10334 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
10339 # IBM z/OS requires a feature-test macro to be defined in order to
10340 # enable POSIX threads at all, so give the user a hint if this is
10341 # not set. (We don't define these ourselves, as they can affect
10342 # other portions of the system API in unpredictable ways.)
10344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10345 /* end confdefs.h. */
10347 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
10348 AX_PTHREAD_ZOS_MISSING
10352 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10353 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
10354 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
10355 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
10363 # Newer versions of Solaris require the "-mt -lpthread" pair, and we
10364 # check that first. On some older versions, libc contains stubbed
10365 # (non-functional) versions of the pthreads routines, so link-based
10366 # tests will erroneously succeed. (We need to link with -pthreads/-mt/
10367 # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
10368 # a function called by this macro, so we could check for that, but
10369 # who knows whether they'll stub that too in a future libc.) So
10370 # we'll look for -pthreads and -lpthread shortly thereafter.
10372 ax_pthread_flags="-mt,pthread -pthreads -pthread pthread $ax_pthread_flags"
10376 # Older versions of Clang only give a warning instead of an error for an
10377 # unrecognized option, unless we specify -Werror. (We throw in some extra
10378 # Clang warning flags for good measure.)
10380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs certain flags to reject unknown flags" >&5
10381 $as_echo_n "checking if compiler needs certain flags to reject unknown flags... " >&6; }
10382 if ${ax_cv_PTHREAD_REJECT_UNKNOWN+:} false; then :
10383 $as_echo_n "(cached) " >&6
10385 ax_cv_PTHREAD_REJECT_UNKNOWN=unknown
10386 save_CFLAGS="$CFLAGS"
10387 ax_pthread_extra_flags="-Wunknown-warning-option -Wunused-command-line-argument"
10388 CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wfoobaz -foobaz"
10389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10390 /* end confdefs.h. */
10400 if ac_fn_c_try_compile "$LINENO"; then :
10401 ax_cv_PTHREAD_REJECT_UNKNOWN="-Werror $ax_pthread_extra_flags"
10403 ax_cv_PTHREAD_REJECT_UNKNOWN=no
10405 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10406 CFLAGS="$save_CFLAGS"
10409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_REJECT_UNKNOWN" >&5
10410 $as_echo "$ax_cv_PTHREAD_REJECT_UNKNOWN" >&6; }
10411 ax_pthread_extra_flags=
10412 if test "x$ax_cv_PTHREAD_REJECT_UNKNOWN" != "xno"; then :
10413 ax_pthread_extra_flags="$ax_cv_PTHREAD_REJECT_UNKNOWN"
10416 if test x"$ax_pthread_ok" = xno; then
10417 for flag in $ax_pthread_flags; do
10421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
10422 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
10426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
10427 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
10428 PTHREAD_CFLAGS="-mt"
10429 PTHREAD_LIBS="-lpthread"
10433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
10434 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
10435 PTHREAD_CFLAGS="$flag"
10439 # Extract the first word of "pthread-config", so it can be a program name with args.
10440 set dummy pthread-config; ac_word=$2
10441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10442 $as_echo_n "checking for $ac_word... " >&6; }
10443 if ${ac_cv_prog_ax_pthread_config+:} false; then :
10444 $as_echo_n "(cached) " >&6
10446 if test -n "$ax_pthread_config"; then
10447 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
10449 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10450 for as_dir in $PATH
10453 test -z "$as_dir" && as_dir=.
10454 for ac_exec_ext in '' $ac_executable_extensions; do
10455 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10456 ac_cv_prog_ax_pthread_config="yes"
10457 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10464 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
10467 ax_pthread_config=$ac_cv_prog_ax_pthread_config
10468 if test -n "$ax_pthread_config"; then
10469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
10470 $as_echo "$ax_pthread_config" >&6; }
10472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10473 $as_echo "no" >&6; }
10477 if test x"$ax_pthread_config" = xno; then continue; fi
10478 PTHREAD_CFLAGS="`pthread-config --cflags`"
10479 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
10483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
10484 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
10485 PTHREAD_LIBS="-l$flag"
10490 save_CFLAGS="$CFLAGS"
10491 LIBS="$PTHREAD_LIBS $LIBS"
10492 CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
10494 # Check for various functions. We must include pthread.h,
10495 # since some functions may be macros. (On the Sequent, we
10496 # need a special flag -Kthread to make this header compile.)
10497 # We check for pthread_join because it is in -lpthread on IRIX
10498 # while pthread_create is in libc. We check for pthread_attr_init
10499 # due to DEC craziness with -lpthreads. We check for
10500 # pthread_cleanup_push because it is one of the few pthread
10501 # functions on Solaris that doesn't have a non-functional libc stub.
10502 # We try pthread_create on general principles.
10503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10504 /* end confdefs.h. */
10505 #include <pthread.h>
10506 static void routine(void *a) { a = 0; }
10507 static void *start_routine(void *a) { return a; }
10511 pthread_t th; pthread_attr_t attr;
10512 pthread_create(&th, 0, start_routine, 0);
10513 pthread_join(th, 0);
10514 pthread_attr_init(&attr);
10515 pthread_cleanup_push(routine, 0);
10516 pthread_cleanup_pop(0) /* ; */
10521 if ac_fn_c_try_link "$LINENO"; then :
10524 rm -f core conftest.err conftest.$ac_objext \
10525 conftest$ac_exeext conftest.$ac_ext
10528 CFLAGS="$save_CFLAGS"
10530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10531 $as_echo "$ax_pthread_ok" >&6; }
10532 if test "x$ax_pthread_ok" = xyes; then
10541 # Various other checks:
10542 if test "x$ax_pthread_ok" = xyes; then
10544 LIBS="$PTHREAD_LIBS $LIBS"
10545 save_CFLAGS="$CFLAGS"
10546 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10548 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
10549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
10550 $as_echo_n "checking for joinable pthread attribute... " >&6; }
10551 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
10552 $as_echo_n "(cached) " >&6
10554 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
10555 for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
10556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10557 /* end confdefs.h. */
10558 #include <pthread.h>
10562 int attr = $attr; return attr /* ; */
10567 if ac_fn_c_try_link "$LINENO"; then :
10568 ax_cv_PTHREAD_JOINABLE_ATTR=$attr; break
10570 rm -f core conftest.err conftest.$ac_objext \
10571 conftest$ac_exeext conftest.$ac_ext
10575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
10576 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
10577 if test "$ax_cv_PTHREAD_JOINABLE_ATTR" != unknown && \
10578 test "$ax_cv_PTHREAD_JOINABLE_ATTR" != PTHREAD_CREATE_JOINABLE; then :
10580 cat >>confdefs.h <<_ACEOF
10581 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
10586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
10587 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
10588 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
10589 $as_echo_n "(cached) " >&6
10591 ax_cv_PTHREAD_SPECIAL_FLAGS=no
10592 ax_pthread_special_flags_added=no
10593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10594 /* end confdefs.h. */
10596 # if !defined(_REENTRANT) && !defined(_THREAD_SAFE)
10597 AX_PTHREAD_NEED_SPECIAL_FLAG
10601 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10602 $EGREP "AX_PTHREAD_NEED_SPECIAL_FLAG" >/dev/null 2>&1; then :
10605 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_THREAD_SAFE"
10607 darwin* | hpux* | osf* | solaris*)
10608 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_REENTRANT"
10617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
10618 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
10619 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
10620 test "x$ax_pthread_special_flags_added" != "xyes"; then :
10621 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
10622 ax_pthread_special_flags_added=yes
10625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
10626 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
10627 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
10628 $as_echo_n "(cached) " >&6
10630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10631 /* end confdefs.h. */
10632 #include <pthread.h>
10636 int i = PTHREAD_PRIO_INHERIT;
10641 if ac_fn_c_try_link "$LINENO"; then :
10642 ax_cv_PTHREAD_PRIO_INHERIT=yes
10644 ax_cv_PTHREAD_PRIO_INHERIT=no
10646 rm -f core conftest.err conftest.$ac_objext \
10647 conftest$ac_exeext conftest.$ac_ext
10650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
10651 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
10652 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
10654 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
10659 CFLAGS="$save_CFLAGS"
10661 # More AIX lossage: compile with *_r variant
10662 if test "x$GCC" != xyes; then
10666 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
10667 #handle absolute path differently from PATH based program lookup
10670 if as_fn_executable_p ${CC}_r; then :
10671 PTHREAD_CC="${CC}_r"
10674 for ac_prog in ${CC}_r
10676 # Extract the first word of "$ac_prog", so it can be a program name with args.
10677 set dummy $ac_prog; ac_word=$2
10678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10679 $as_echo_n "checking for $ac_word... " >&6; }
10680 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
10681 $as_echo_n "(cached) " >&6
10683 if test -n "$PTHREAD_CC"; then
10684 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
10686 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10687 for as_dir in $PATH
10690 test -z "$as_dir" && as_dir=.
10691 for ac_exec_ext in '' $ac_executable_extensions; do
10692 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10693 ac_cv_prog_PTHREAD_CC="$ac_prog"
10694 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10703 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
10704 if test -n "$PTHREAD_CC"; then
10705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
10706 $as_echo "$PTHREAD_CC" >&6; }
10708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10709 $as_echo "no" >&6; }
10713 test -n "$PTHREAD_CC" && break
10715 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10726 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10732 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
10733 if test x"$ax_pthread_ok" = xyes; then
10735 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10743 ac_cpp='$CPP $CPPFLAGS'
10744 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10745 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10746 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10750 # Some platforms use these, so just define them. They can't hurt if they
10751 # are not supported. For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
10752 # enables 5-arg getpwuid_r, among other things.
10753 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
10755 # Check for *_r functions
10758 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10759 LIBS="$LIBS $PTHREAD_LIBS"
10761 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
10762 if test "x$ac_cv_header_pthread_h" = xyes; then :
10766 pthread.h not found; use --disable-thread-safety to disable thread safety" "$LINENO" 5
10771 for ac_func in strerror_r getpwuid_r gethostbyname_r
10773 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10774 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10775 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10776 cat >>confdefs.h <<_ACEOF
10777 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10784 # Do test here with the proper thread flags
10785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
10786 $as_echo_n "checking whether strerror_r returns int... " >&6; }
10787 if ${pgac_cv_func_strerror_r_int+:} false; then :
10788 $as_echo_n "(cached) " >&6
10790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10791 /* end confdefs.h. */
10792 #include <string.h>
10797 switch (strerror_r(1, buf, sizeof(buf)))
10798 { case 0: break; default: break; }
10804 if ac_fn_c_try_compile "$LINENO"; then :
10805 pgac_cv_func_strerror_r_int=yes
10807 pgac_cv_func_strerror_r_int=no
10809 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
10812 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
10813 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
10815 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
10826 # do not use values from template file
10839 ## Most libraries are included only if they demonstrably provide a function
10840 ## we need, but libm is an exception: always include it, because there are
10841 ## too many compilers that play cute optimization games that will break
10842 ## probes for standard functions such as pow().
10845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
10846 $as_echo_n "checking for main in -lm... " >&6; }
10847 if ${ac_cv_lib_m_main+:} false; then :
10848 $as_echo_n "(cached) " >&6
10850 ac_check_lib_save_LIBS=$LIBS
10852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10853 /* end confdefs.h. */
10864 if ac_fn_c_try_link "$LINENO"; then :
10865 ac_cv_lib_m_main=yes
10867 ac_cv_lib_m_main=no
10869 rm -f core conftest.err conftest.$ac_objext \
10870 conftest$ac_exeext conftest.$ac_ext
10871 LIBS=$ac_check_lib_save_LIBS
10873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
10874 $as_echo "$ac_cv_lib_m_main" >&6; }
10875 if test "x$ac_cv_lib_m_main" = xyes; then :
10876 cat >>confdefs.h <<_ACEOF
10877 #define HAVE_LIBM 1
10884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
10885 $as_echo_n "checking for library containing setproctitle... " >&6; }
10886 if ${ac_cv_search_setproctitle+:} false; then :
10887 $as_echo_n "(cached) " >&6
10889 ac_func_search_save_LIBS=$LIBS
10890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10891 /* end confdefs.h. */
10893 /* Override any GCC internal prototype to avoid an error.
10894 Use char because int might match the return type of a GCC
10895 builtin and then its argument prototype would still apply. */
10899 char setproctitle ();
10903 return setproctitle ();
10908 for ac_lib in '' util; do
10909 if test -z "$ac_lib"; then
10910 ac_res="none required"
10913 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10915 if ac_fn_c_try_link "$LINENO"; then :
10916 ac_cv_search_setproctitle=$ac_res
10918 rm -f core conftest.err conftest.$ac_objext \
10920 if ${ac_cv_search_setproctitle+:} false; then :
10924 if ${ac_cv_search_setproctitle+:} false; then :
10927 ac_cv_search_setproctitle=no
10929 rm conftest.$ac_ext
10930 LIBS=$ac_func_search_save_LIBS
10932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
10933 $as_echo "$ac_cv_search_setproctitle" >&6; }
10934 ac_res=$ac_cv_search_setproctitle
10935 if test "$ac_res" != no; then :
10936 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
10941 $as_echo_n "checking for library containing dlopen... " >&6; }
10942 if ${ac_cv_search_dlopen+:} false; then :
10943 $as_echo_n "(cached) " >&6
10945 ac_func_search_save_LIBS=$LIBS
10946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10947 /* end confdefs.h. */
10949 /* Override any GCC internal prototype to avoid an error.
10950 Use char because int might match the return type of a GCC
10951 builtin and then its argument prototype would still apply. */
10964 for ac_lib in '' dl; do
10965 if test -z "$ac_lib"; then
10966 ac_res="none required"
10969 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10971 if ac_fn_c_try_link "$LINENO"; then :
10972 ac_cv_search_dlopen=$ac_res
10974 rm -f core conftest.err conftest.$ac_objext \
10976 if ${ac_cv_search_dlopen+:} false; then :
10980 if ${ac_cv_search_dlopen+:} false; then :
10983 ac_cv_search_dlopen=no
10985 rm conftest.$ac_ext
10986 LIBS=$ac_func_search_save_LIBS
10988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
10989 $as_echo "$ac_cv_search_dlopen" >&6; }
10990 ac_res=$ac_cv_search_dlopen
10991 if test "$ac_res" != no; then :
10992 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
10997 $as_echo_n "checking for library containing socket... " >&6; }
10998 if ${ac_cv_search_socket+:} false; then :
10999 $as_echo_n "(cached) " >&6
11001 ac_func_search_save_LIBS=$LIBS
11002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11003 /* end confdefs.h. */
11005 /* Override any GCC internal prototype to avoid an error.
11006 Use char because int might match the return type of a GCC
11007 builtin and then its argument prototype would still apply. */
11020 for ac_lib in '' socket ws2_32; do
11021 if test -z "$ac_lib"; then
11022 ac_res="none required"
11025 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11027 if ac_fn_c_try_link "$LINENO"; then :
11028 ac_cv_search_socket=$ac_res
11030 rm -f core conftest.err conftest.$ac_objext \
11032 if ${ac_cv_search_socket+:} false; then :
11036 if ${ac_cv_search_socket+:} false; then :
11039 ac_cv_search_socket=no
11041 rm conftest.$ac_ext
11042 LIBS=$ac_func_search_save_LIBS
11044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11045 $as_echo "$ac_cv_search_socket" >&6; }
11046 ac_res=$ac_cv_search_socket
11047 if test "$ac_res" != no; then :
11048 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
11053 $as_echo_n "checking for library containing shl_load... " >&6; }
11054 if ${ac_cv_search_shl_load+:} false; then :
11055 $as_echo_n "(cached) " >&6
11057 ac_func_search_save_LIBS=$LIBS
11058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11059 /* end confdefs.h. */
11061 /* Override any GCC internal prototype to avoid an error.
11062 Use char because int might match the return type of a GCC
11063 builtin and then its argument prototype would still apply. */
11071 return shl_load ();
11076 for ac_lib in '' dld; do
11077 if test -z "$ac_lib"; then
11078 ac_res="none required"
11081 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11083 if ac_fn_c_try_link "$LINENO"; then :
11084 ac_cv_search_shl_load=$ac_res
11086 rm -f core conftest.err conftest.$ac_objext \
11088 if ${ac_cv_search_shl_load+:} false; then :
11092 if ${ac_cv_search_shl_load+:} false; then :
11095 ac_cv_search_shl_load=no
11097 rm conftest.$ac_ext
11098 LIBS=$ac_func_search_save_LIBS
11100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
11101 $as_echo "$ac_cv_search_shl_load" >&6; }
11102 ac_res=$ac_cv_search_shl_load
11103 if test "$ac_res" != no; then :
11104 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
11109 $as_echo_n "checking for library containing getopt_long... " >&6; }
11110 if ${ac_cv_search_getopt_long+:} false; then :
11111 $as_echo_n "(cached) " >&6
11113 ac_func_search_save_LIBS=$LIBS
11114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11115 /* end confdefs.h. */
11117 /* Override any GCC internal prototype to avoid an error.
11118 Use char because int might match the return type of a GCC
11119 builtin and then its argument prototype would still apply. */
11123 char getopt_long ();
11127 return getopt_long ();
11132 for ac_lib in '' getopt gnugetopt; do
11133 if test -z "$ac_lib"; then
11134 ac_res="none required"
11137 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11139 if ac_fn_c_try_link "$LINENO"; then :
11140 ac_cv_search_getopt_long=$ac_res
11142 rm -f core conftest.err conftest.$ac_objext \
11144 if ${ac_cv_search_getopt_long+:} false; then :
11148 if ${ac_cv_search_getopt_long+:} false; then :
11151 ac_cv_search_getopt_long=no
11153 rm conftest.$ac_ext
11154 LIBS=$ac_func_search_save_LIBS
11156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
11157 $as_echo "$ac_cv_search_getopt_long" >&6; }
11158 ac_res=$ac_cv_search_getopt_long
11159 if test "$ac_res" != no; then :
11160 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
11165 $as_echo_n "checking for library containing crypt... " >&6; }
11166 if ${ac_cv_search_crypt+:} false; then :
11167 $as_echo_n "(cached) " >&6
11169 ac_func_search_save_LIBS=$LIBS
11170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11171 /* end confdefs.h. */
11173 /* Override any GCC internal prototype to avoid an error.
11174 Use char because int might match the return type of a GCC
11175 builtin and then its argument prototype would still apply. */
11188 for ac_lib in '' crypt; do
11189 if test -z "$ac_lib"; then
11190 ac_res="none required"
11193 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11195 if ac_fn_c_try_link "$LINENO"; then :
11196 ac_cv_search_crypt=$ac_res
11198 rm -f core conftest.err conftest.$ac_objext \
11200 if ${ac_cv_search_crypt+:} false; then :
11204 if ${ac_cv_search_crypt+:} false; then :
11207 ac_cv_search_crypt=no
11209 rm conftest.$ac_ext
11210 LIBS=$ac_func_search_save_LIBS
11212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
11213 $as_echo "$ac_cv_search_crypt" >&6; }
11214 ac_res=$ac_cv_search_crypt
11215 if test "$ac_res" != no; then :
11216 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
11221 $as_echo_n "checking for library containing shm_open... " >&6; }
11222 if ${ac_cv_search_shm_open+:} false; then :
11223 $as_echo_n "(cached) " >&6
11225 ac_func_search_save_LIBS=$LIBS
11226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11227 /* end confdefs.h. */
11229 /* Override any GCC internal prototype to avoid an error.
11230 Use char because int might match the return type of a GCC
11231 builtin and then its argument prototype would still apply. */
11239 return shm_open ();
11244 for ac_lib in '' rt; do
11245 if test -z "$ac_lib"; then
11246 ac_res="none required"
11249 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11251 if ac_fn_c_try_link "$LINENO"; then :
11252 ac_cv_search_shm_open=$ac_res
11254 rm -f core conftest.err conftest.$ac_objext \
11256 if ${ac_cv_search_shm_open+:} false; then :
11260 if ${ac_cv_search_shm_open+:} false; then :
11263 ac_cv_search_shm_open=no
11265 rm conftest.$ac_ext
11266 LIBS=$ac_func_search_save_LIBS
11268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
11269 $as_echo "$ac_cv_search_shm_open" >&6; }
11270 ac_res=$ac_cv_search_shm_open
11271 if test "$ac_res" != no; then :
11272 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
11277 $as_echo_n "checking for library containing shm_unlink... " >&6; }
11278 if ${ac_cv_search_shm_unlink+:} false; then :
11279 $as_echo_n "(cached) " >&6
11281 ac_func_search_save_LIBS=$LIBS
11282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11283 /* end confdefs.h. */
11285 /* Override any GCC internal prototype to avoid an error.
11286 Use char because int might match the return type of a GCC
11287 builtin and then its argument prototype would still apply. */
11291 char shm_unlink ();
11295 return shm_unlink ();
11300 for ac_lib in '' rt; do
11301 if test -z "$ac_lib"; then
11302 ac_res="none required"
11305 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11307 if ac_fn_c_try_link "$LINENO"; then :
11308 ac_cv_search_shm_unlink=$ac_res
11310 rm -f core conftest.err conftest.$ac_objext \
11312 if ${ac_cv_search_shm_unlink+:} false; then :
11316 if ${ac_cv_search_shm_unlink+:} false; then :
11319 ac_cv_search_shm_unlink=no
11321 rm conftest.$ac_ext
11322 LIBS=$ac_func_search_save_LIBS
11324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
11325 $as_echo "$ac_cv_search_shm_unlink" >&6; }
11326 ac_res=$ac_cv_search_shm_unlink
11327 if test "$ac_res" != no; then :
11328 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11333 $as_echo_n "checking for library containing clock_gettime... " >&6; }
11334 if ${ac_cv_search_clock_gettime+:} false; then :
11335 $as_echo_n "(cached) " >&6
11337 ac_func_search_save_LIBS=$LIBS
11338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11339 /* end confdefs.h. */
11341 /* Override any GCC internal prototype to avoid an error.
11342 Use char because int might match the return type of a GCC
11343 builtin and then its argument prototype would still apply. */
11347 char clock_gettime ();
11351 return clock_gettime ();
11356 for ac_lib in '' rt posix4; do
11357 if test -z "$ac_lib"; then
11358 ac_res="none required"
11361 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11363 if ac_fn_c_try_link "$LINENO"; then :
11364 ac_cv_search_clock_gettime=$ac_res
11366 rm -f core conftest.err conftest.$ac_objext \
11368 if ${ac_cv_search_clock_gettime+:} false; then :
11372 if ${ac_cv_search_clock_gettime+:} false; then :
11375 ac_cv_search_clock_gettime=no
11377 rm conftest.$ac_ext
11378 LIBS=$ac_func_search_save_LIBS
11380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11381 $as_echo "$ac_cv_search_clock_gettime" >&6; }
11382 ac_res=$ac_cv_search_clock_gettime
11383 if test "$ac_res" != no; then :
11384 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
11390 $as_echo_n "checking for library containing fdatasync... " >&6; }
11391 if ${ac_cv_search_fdatasync+:} false; then :
11392 $as_echo_n "(cached) " >&6
11394 ac_func_search_save_LIBS=$LIBS
11395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11396 /* end confdefs.h. */
11398 /* Override any GCC internal prototype to avoid an error.
11399 Use char because int might match the return type of a GCC
11400 builtin and then its argument prototype would still apply. */
11408 return fdatasync ();
11413 for ac_lib in '' rt posix4; do
11414 if test -z "$ac_lib"; then
11415 ac_res="none required"
11418 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11420 if ac_fn_c_try_link "$LINENO"; then :
11421 ac_cv_search_fdatasync=$ac_res
11423 rm -f core conftest.err conftest.$ac_objext \
11425 if ${ac_cv_search_fdatasync+:} false; then :
11429 if ${ac_cv_search_fdatasync+:} false; then :
11432 ac_cv_search_fdatasync=no
11434 rm conftest.$ac_ext
11435 LIBS=$ac_func_search_save_LIBS
11437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
11438 $as_echo "$ac_cv_search_fdatasync" >&6; }
11439 ac_res=$ac_cv_search_fdatasync
11440 if test "$ac_res" != no; then :
11441 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11445 # Required for thread_test.c on Solaris
11446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
11447 $as_echo_n "checking for library containing sched_yield... " >&6; }
11448 if ${ac_cv_search_sched_yield+:} false; then :
11449 $as_echo_n "(cached) " >&6
11451 ac_func_search_save_LIBS=$LIBS
11452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11453 /* end confdefs.h. */
11455 /* Override any GCC internal prototype to avoid an error.
11456 Use char because int might match the return type of a GCC
11457 builtin and then its argument prototype would still apply. */
11461 char sched_yield ();
11465 return sched_yield ();
11470 for ac_lib in '' rt; do
11471 if test -z "$ac_lib"; then
11472 ac_res="none required"
11475 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11477 if ac_fn_c_try_link "$LINENO"; then :
11478 ac_cv_search_sched_yield=$ac_res
11480 rm -f core conftest.err conftest.$ac_objext \
11482 if ${ac_cv_search_sched_yield+:} false; then :
11486 if ${ac_cv_search_sched_yield+:} false; then :
11489 ac_cv_search_sched_yield=no
11491 rm conftest.$ac_ext
11492 LIBS=$ac_func_search_save_LIBS
11494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
11495 $as_echo "$ac_cv_search_sched_yield" >&6; }
11496 ac_res=$ac_cv_search_sched_yield
11497 if test "$ac_res" != no; then :
11498 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11502 # Required for thread_test.c on Solaris 2.5:
11503 # Other ports use it too (HP-UX) so test unconditionally
11504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
11505 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
11506 if ${ac_cv_search_gethostbyname_r+:} false; then :
11507 $as_echo_n "(cached) " >&6
11509 ac_func_search_save_LIBS=$LIBS
11510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11511 /* end confdefs.h. */
11513 /* Override any GCC internal prototype to avoid an error.
11514 Use char because int might match the return type of a GCC
11515 builtin and then its argument prototype would still apply. */
11519 char gethostbyname_r ();
11523 return gethostbyname_r ();
11528 for ac_lib in '' nsl; do
11529 if test -z "$ac_lib"; then
11530 ac_res="none required"
11533 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11535 if ac_fn_c_try_link "$LINENO"; then :
11536 ac_cv_search_gethostbyname_r=$ac_res
11538 rm -f core conftest.err conftest.$ac_objext \
11540 if ${ac_cv_search_gethostbyname_r+:} false; then :
11544 if ${ac_cv_search_gethostbyname_r+:} false; then :
11547 ac_cv_search_gethostbyname_r=no
11549 rm conftest.$ac_ext
11550 LIBS=$ac_func_search_save_LIBS
11552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
11553 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
11554 ac_res=$ac_cv_search_gethostbyname_r
11555 if test "$ac_res" != no; then :
11556 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
11562 $as_echo_n "checking for library containing shmget... " >&6; }
11563 if ${ac_cv_search_shmget+:} false; then :
11564 $as_echo_n "(cached) " >&6
11566 ac_func_search_save_LIBS=$LIBS
11567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11568 /* end confdefs.h. */
11570 /* Override any GCC internal prototype to avoid an error.
11571 Use char because int might match the return type of a GCC
11572 builtin and then its argument prototype would still apply. */
11585 for ac_lib in '' cygipc; do
11586 if test -z "$ac_lib"; then
11587 ac_res="none required"
11590 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11592 if ac_fn_c_try_link "$LINENO"; then :
11593 ac_cv_search_shmget=$ac_res
11595 rm -f core conftest.err conftest.$ac_objext \
11597 if ${ac_cv_search_shmget+:} false; then :
11601 if ${ac_cv_search_shmget+:} false; then :
11604 ac_cv_search_shmget=no
11606 rm conftest.$ac_ext
11607 LIBS=$ac_func_search_save_LIBS
11609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
11610 $as_echo "$ac_cv_search_shmget" >&6; }
11611 ac_res=$ac_cv_search_shmget
11612 if test "$ac_res" != no; then :
11613 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11618 if test "$with_readline" = yes; then
11621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
11622 $as_echo_n "checking for library containing readline... " >&6; }
11623 if ${pgac_cv_check_readline+:} false; then :
11624 $as_echo_n "(cached) " >&6
11626 pgac_cv_check_readline=no
11627 pgac_save_LIBS=$LIBS
11628 if test x"$with_libedit_preferred" != x"yes"
11629 then READLINE_ORDER="-lreadline -ledit"
11630 else READLINE_ORDER="-ledit -lreadline"
11632 for pgac_rllib in $READLINE_ORDER ; do
11633 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
11634 LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
11635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11636 /* end confdefs.h. */
11638 /* Override any GCC internal prototype to avoid an error.
11639 Use char because int might match the return type of a GCC
11640 builtin and then its argument prototype would still apply. */
11648 return readline ();
11653 if ac_fn_c_try_link "$LINENO"; then :
11655 # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
11656 # recognize dependent libraries; assume curses is needed if we didn't
11657 # find any dependency.
11659 netbsd* | openbsd* | irix*)
11660 if test x"$pgac_lib" = x"" ; then
11661 pgac_lib=" -lcurses"
11665 pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
11669 rm -f core conftest.err conftest.$ac_objext \
11670 conftest$ac_exeext conftest.$ac_ext
11672 if test "$pgac_cv_check_readline" != no ; then
11676 LIBS=$pgac_save_LIBS
11679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
11680 $as_echo "$pgac_cv_check_readline" >&6; }
11681 if test "$pgac_cv_check_readline" != no ; then
11682 LIBS="$pgac_cv_check_readline $LIBS"
11684 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
11689 if test x"$pgac_cv_check_readline" = x"no"; then
11690 as_fn_error $? "readline library not found
11691 If you have readline already installed, see config.log for details on the
11692 failure. It is possible the compiler isn't looking in the proper directory.
11693 Use --without-readline to disable readline support." "$LINENO" 5
11697 if test "$with_zlib" = yes; then
11698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
11699 $as_echo_n "checking for inflate in -lz... " >&6; }
11700 if ${ac_cv_lib_z_inflate+:} false; then :
11701 $as_echo_n "(cached) " >&6
11703 ac_check_lib_save_LIBS=$LIBS
11705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11706 /* end confdefs.h. */
11708 /* Override any GCC internal prototype to avoid an error.
11709 Use char because int might match the return type of a GCC
11710 builtin and then its argument prototype would still apply. */
11723 if ac_fn_c_try_link "$LINENO"; then :
11724 ac_cv_lib_z_inflate=yes
11726 ac_cv_lib_z_inflate=no
11728 rm -f core conftest.err conftest.$ac_objext \
11729 conftest$ac_exeext conftest.$ac_ext
11730 LIBS=$ac_check_lib_save_LIBS
11732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
11733 $as_echo "$ac_cv_lib_z_inflate" >&6; }
11734 if test "x$ac_cv_lib_z_inflate" = xyes; then :
11735 cat >>confdefs.h <<_ACEOF
11736 #define HAVE_LIBZ 1
11742 as_fn_error $? "zlib library not found
11743 If you have zlib already installed, see config.log for details on the
11744 failure. It is possible the compiler isn't looking in the proper directory.
11745 Use --without-zlib to disable zlib support." "$LINENO" 5
11750 if test "$enable_spinlocks" = yes; then
11752 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
11755 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11756 *** Not using spinlocks will cause poor performance." >&5
11757 $as_echo "$as_me: WARNING:
11758 *** Not using spinlocks will cause poor performance." >&2;}
11761 if test "$enable_atomics" = yes; then
11763 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
11766 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11767 *** Not using atomic operations will cause poor performance." >&5
11768 $as_echo "$as_me: WARNING:
11769 *** Not using atomic operations will cause poor performance." >&2;}
11772 if test "$with_gssapi" = yes ; then
11773 if test "$PORTNAME" != "win32"; then
11774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
11775 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
11776 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11777 $as_echo_n "(cached) " >&6
11779 ac_func_search_save_LIBS=$LIBS
11780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11781 /* end confdefs.h. */
11783 /* Override any GCC internal prototype to avoid an error.
11784 Use char because int might match the return type of a GCC
11785 builtin and then its argument prototype would still apply. */
11789 char gss_init_sec_context ();
11793 return gss_init_sec_context ();
11798 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
11799 if test -z "$ac_lib"; then
11800 ac_res="none required"
11803 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11805 if ac_fn_c_try_link "$LINENO"; then :
11806 ac_cv_search_gss_init_sec_context=$ac_res
11808 rm -f core conftest.err conftest.$ac_objext \
11810 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11814 if ${ac_cv_search_gss_init_sec_context+:} false; then :
11817 ac_cv_search_gss_init_sec_context=no
11819 rm conftest.$ac_ext
11820 LIBS=$ac_func_search_save_LIBS
11822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
11823 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
11824 ac_res=$ac_cv_search_gss_init_sec_context
11825 if test "$ac_res" != no; then :
11826 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11829 as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
11833 LIBS="$LIBS -lgssapi32"
11837 if test "$with_openssl" = yes ; then
11838 if test "$PORTNAME" != "win32"; then
11839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
11840 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
11841 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
11842 $as_echo_n "(cached) " >&6
11844 ac_check_lib_save_LIBS=$LIBS
11845 LIBS="-lcrypto $LIBS"
11846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11847 /* end confdefs.h. */
11849 /* Override any GCC internal prototype to avoid an error.
11850 Use char because int might match the return type of a GCC
11851 builtin and then its argument prototype would still apply. */
11855 char CRYPTO_new_ex_data ();
11859 return CRYPTO_new_ex_data ();
11864 if ac_fn_c_try_link "$LINENO"; then :
11865 ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
11867 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
11869 rm -f core conftest.err conftest.$ac_objext \
11870 conftest$ac_exeext conftest.$ac_ext
11871 LIBS=$ac_check_lib_save_LIBS
11873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
11874 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
11875 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
11876 cat >>confdefs.h <<_ACEOF
11877 #define HAVE_LIBCRYPTO 1
11880 LIBS="-lcrypto $LIBS"
11883 as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
11886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
11887 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
11888 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
11889 $as_echo_n "(cached) " >&6
11891 ac_check_lib_save_LIBS=$LIBS
11893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11894 /* end confdefs.h. */
11896 /* Override any GCC internal prototype to avoid an error.
11897 Use char because int might match the return type of a GCC
11898 builtin and then its argument prototype would still apply. */
11911 if ac_fn_c_try_link "$LINENO"; then :
11912 ac_cv_lib_ssl_SSL_new=yes
11914 ac_cv_lib_ssl_SSL_new=no
11916 rm -f core conftest.err conftest.$ac_objext \
11917 conftest$ac_exeext conftest.$ac_ext
11918 LIBS=$ac_check_lib_save_LIBS
11920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
11921 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
11922 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
11923 cat >>confdefs.h <<_ACEOF
11924 #define HAVE_LIBSSL 1
11930 as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
11934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
11935 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
11936 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
11937 $as_echo_n "(cached) " >&6
11939 ac_func_search_save_LIBS=$LIBS
11940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11941 /* end confdefs.h. */
11943 /* Override any GCC internal prototype to avoid an error.
11944 Use char because int might match the return type of a GCC
11945 builtin and then its argument prototype would still apply. */
11949 char CRYPTO_new_ex_data ();
11953 return CRYPTO_new_ex_data ();
11958 for ac_lib in '' eay32 crypto; do
11959 if test -z "$ac_lib"; then
11960 ac_res="none required"
11963 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11965 if ac_fn_c_try_link "$LINENO"; then :
11966 ac_cv_search_CRYPTO_new_ex_data=$ac_res
11968 rm -f core conftest.err conftest.$ac_objext \
11970 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
11974 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
11977 ac_cv_search_CRYPTO_new_ex_data=no
11979 rm conftest.$ac_ext
11980 LIBS=$ac_func_search_save_LIBS
11982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
11983 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
11984 ac_res=$ac_cv_search_CRYPTO_new_ex_data
11985 if test "$ac_res" != no; then :
11986 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11989 as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
11992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
11993 $as_echo_n "checking for library containing SSL_new... " >&6; }
11994 if ${ac_cv_search_SSL_new+:} false; then :
11995 $as_echo_n "(cached) " >&6
11997 ac_func_search_save_LIBS=$LIBS
11998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11999 /* end confdefs.h. */
12001 /* Override any GCC internal prototype to avoid an error.
12002 Use char because int might match the return type of a GCC
12003 builtin and then its argument prototype would still apply. */
12016 for ac_lib in '' ssleay32 ssl; do
12017 if test -z "$ac_lib"; then
12018 ac_res="none required"
12021 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12023 if ac_fn_c_try_link "$LINENO"; then :
12024 ac_cv_search_SSL_new=$ac_res
12026 rm -f core conftest.err conftest.$ac_objext \
12028 if ${ac_cv_search_SSL_new+:} false; then :
12032 if ${ac_cv_search_SSL_new+:} false; then :
12035 ac_cv_search_SSL_new=no
12037 rm conftest.$ac_ext
12038 LIBS=$ac_func_search_save_LIBS
12040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12041 $as_echo "$ac_cv_search_SSL_new" >&6; }
12042 ac_res=$ac_cv_search_SSL_new
12043 if test "$ac_res" != no; then :
12044 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12047 as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12051 for ac_func in SSL_clear_options SSL_get_current_compression X509_get_signature_nid
12053 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12054 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12055 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12056 cat >>confdefs.h <<_ACEOF
12057 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12063 # Functions introduced in OpenSSL 1.1.0. We used to check for
12064 # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
12065 # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
12066 # doesn't have these OpenSSL 1.1.0 functions. So check for individual
12068 for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL
12070 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12071 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12072 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12073 cat >>confdefs.h <<_ACEOF
12074 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12080 # OpenSSL versions before 1.1.0 required setting callback functions, for
12081 # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
12082 # function was removed.
12083 for ac_func in CRYPTO_lock
12085 ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
12086 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
12087 cat >>confdefs.h <<_ACEOF
12088 #define HAVE_CRYPTO_LOCK 1
12096 if test "$with_pam" = yes ; then
12097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
12098 $as_echo_n "checking for pam_start in -lpam... " >&6; }
12099 if ${ac_cv_lib_pam_pam_start+:} false; then :
12100 $as_echo_n "(cached) " >&6
12102 ac_check_lib_save_LIBS=$LIBS
12104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12105 /* end confdefs.h. */
12107 /* Override any GCC internal prototype to avoid an error.
12108 Use char because int might match the return type of a GCC
12109 builtin and then its argument prototype would still apply. */
12117 return pam_start ();
12122 if ac_fn_c_try_link "$LINENO"; then :
12123 ac_cv_lib_pam_pam_start=yes
12125 ac_cv_lib_pam_pam_start=no
12127 rm -f core conftest.err conftest.$ac_objext \
12128 conftest$ac_exeext conftest.$ac_ext
12129 LIBS=$ac_check_lib_save_LIBS
12131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
12132 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
12133 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
12134 cat >>confdefs.h <<_ACEOF
12135 #define HAVE_LIBPAM 1
12141 as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
12146 if test "$with_libxml" = yes ; then
12147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
12148 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
12149 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
12150 $as_echo_n "(cached) " >&6
12152 ac_check_lib_save_LIBS=$LIBS
12153 LIBS="-lxml2 $LIBS"
12154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12155 /* end confdefs.h. */
12157 /* Override any GCC internal prototype to avoid an error.
12158 Use char because int might match the return type of a GCC
12159 builtin and then its argument prototype would still apply. */
12163 char xmlSaveToBuffer ();
12167 return xmlSaveToBuffer ();
12172 if ac_fn_c_try_link "$LINENO"; then :
12173 ac_cv_lib_xml2_xmlSaveToBuffer=yes
12175 ac_cv_lib_xml2_xmlSaveToBuffer=no
12177 rm -f core conftest.err conftest.$ac_objext \
12178 conftest$ac_exeext conftest.$ac_ext
12179 LIBS=$ac_check_lib_save_LIBS
12181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
12182 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
12183 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
12184 cat >>confdefs.h <<_ACEOF
12185 #define HAVE_LIBXML2 1
12188 LIBS="-lxml2 $LIBS"
12191 as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
12196 if test "$with_libxslt" = yes ; then
12197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
12198 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
12199 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
12200 $as_echo_n "(cached) " >&6
12202 ac_check_lib_save_LIBS=$LIBS
12203 LIBS="-lxslt $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. */
12213 char xsltCleanupGlobals ();
12217 return xsltCleanupGlobals ();
12222 if ac_fn_c_try_link "$LINENO"; then :
12223 ac_cv_lib_xslt_xsltCleanupGlobals=yes
12225 ac_cv_lib_xslt_xsltCleanupGlobals=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_xslt_xsltCleanupGlobals" >&5
12232 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
12233 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
12234 cat >>confdefs.h <<_ACEOF
12235 #define HAVE_LIBXSLT 1
12238 LIBS="-lxslt $LIBS"
12241 as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
12246 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
12247 if test "$with_ldap" = yes ; then
12249 if test "$PORTNAME" != "win32"; then
12250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
12251 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
12252 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
12253 $as_echo_n "(cached) " >&6
12255 ac_check_lib_save_LIBS=$LIBS
12256 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
12257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12258 /* end confdefs.h. */
12260 /* Override any GCC internal prototype to avoid an error.
12261 Use char because int might match the return type of a GCC
12262 builtin and then its argument prototype would still apply. */
12270 return ldap_bind ();
12275 if ac_fn_c_try_link "$LINENO"; then :
12276 ac_cv_lib_ldap_ldap_bind=yes
12278 ac_cv_lib_ldap_ldap_bind=no
12280 rm -f core conftest.err conftest.$ac_objext \
12281 conftest$ac_exeext conftest.$ac_ext
12282 LIBS=$ac_check_lib_save_LIBS
12284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
12285 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
12286 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
12287 cat >>confdefs.h <<_ACEOF
12288 #define HAVE_LIBLDAP 1
12291 LIBS="-lldap $LIBS"
12294 as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
12297 LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
12298 if test "$enable_thread_safety" = yes; then
12299 # on some platforms ldap_r fails to link without PTHREAD_LIBS
12300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
12301 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
12302 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
12303 $as_echo_n "(cached) " >&6
12305 ac_check_lib_save_LIBS=$LIBS
12306 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
12307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12308 /* end confdefs.h. */
12310 /* Override any GCC internal prototype to avoid an error.
12311 Use char because int might match the return type of a GCC
12312 builtin and then its argument prototype would still apply. */
12316 char ldap_simple_bind ();
12320 return ldap_simple_bind ();
12325 if ac_fn_c_try_link "$LINENO"; then :
12326 ac_cv_lib_ldap_r_ldap_simple_bind=yes
12328 ac_cv_lib_ldap_r_ldap_simple_bind=no
12330 rm -f core conftest.err conftest.$ac_objext \
12331 conftest$ac_exeext conftest.$ac_ext
12332 LIBS=$ac_check_lib_save_LIBS
12334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
12335 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
12336 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
12337 cat >>confdefs.h <<_ACEOF
12338 #define HAVE_LIBLDAP_R 1
12341 LIBS="-lldap_r $LIBS"
12344 as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
12347 LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
12349 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
12351 for ac_func in ldap_initialize
12353 ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
12354 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
12355 cat >>confdefs.h <<_ACEOF
12356 #define HAVE_LDAP_INITIALIZE 1
12363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
12364 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
12365 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
12366 $as_echo_n "(cached) " >&6
12368 ac_check_lib_save_LIBS=$LIBS
12369 LIBS="-lwldap32 $LIBS"
12370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12371 /* end confdefs.h. */
12373 /* Override any GCC internal prototype to avoid an error.
12374 Use char because int might match the return type of a GCC
12375 builtin and then its argument prototype would still apply. */
12383 return ldap_bind ();
12388 if ac_fn_c_try_link "$LINENO"; then :
12389 ac_cv_lib_wldap32_ldap_bind=yes
12391 ac_cv_lib_wldap32_ldap_bind=no
12393 rm -f core conftest.err conftest.$ac_objext \
12394 conftest$ac_exeext conftest.$ac_ext
12395 LIBS=$ac_check_lib_save_LIBS
12397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
12398 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
12399 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
12400 cat >>confdefs.h <<_ACEOF
12401 #define HAVE_LIBWLDAP32 1
12404 LIBS="-lwldap32 $LIBS"
12407 as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
12410 LDAP_LIBS_FE="-lwldap32"
12411 LDAP_LIBS_BE="-lwldap32"
12418 # for contrib/sepgsql
12419 if test "$with_selinux" = yes; then
12420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
12421 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
12422 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
12423 $as_echo_n "(cached) " >&6
12425 ac_check_lib_save_LIBS=$LIBS
12426 LIBS="-lselinux $LIBS"
12427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12428 /* end confdefs.h. */
12430 /* Override any GCC internal prototype to avoid an error.
12431 Use char because int might match the return type of a GCC
12432 builtin and then its argument prototype would still apply. */
12436 char security_compute_create_name ();
12440 return security_compute_create_name ();
12445 if ac_fn_c_try_link "$LINENO"; then :
12446 ac_cv_lib_selinux_security_compute_create_name=yes
12448 ac_cv_lib_selinux_security_compute_create_name=no
12450 rm -f core conftest.err conftest.$ac_objext \
12451 conftest$ac_exeext conftest.$ac_ext
12452 LIBS=$ac_check_lib_save_LIBS
12454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
12455 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
12456 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
12457 cat >>confdefs.h <<_ACEOF
12458 #define HAVE_LIBSELINUX 1
12461 LIBS="-lselinux $LIBS"
12464 as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
12469 # for contrib/uuid-ossp
12470 if test "$with_uuid" = bsd ; then
12471 # On BSD, the UUID functions are in libc
12472 ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
12473 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
12476 as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
12479 elif test "$with_uuid" = e2fs ; then
12480 # On macOS, the UUID functions are in libc
12481 ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
12482 if test "x$ac_cv_func_uuid_generate" = xyes; then :
12485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
12486 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
12487 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
12488 $as_echo_n "(cached) " >&6
12490 ac_check_lib_save_LIBS=$LIBS
12491 LIBS="-luuid $LIBS"
12492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12493 /* end confdefs.h. */
12495 /* Override any GCC internal prototype to avoid an error.
12496 Use char because int might match the return type of a GCC
12497 builtin and then its argument prototype would still apply. */
12501 char uuid_generate ();
12505 return uuid_generate ();
12510 if ac_fn_c_try_link "$LINENO"; then :
12511 ac_cv_lib_uuid_uuid_generate=yes
12513 ac_cv_lib_uuid_uuid_generate=no
12515 rm -f core conftest.err conftest.$ac_objext \
12516 conftest$ac_exeext conftest.$ac_ext
12517 LIBS=$ac_check_lib_save_LIBS
12519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
12520 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
12521 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
12524 as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
12529 elif test "$with_uuid" = ossp ; then
12530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
12531 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
12532 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
12533 $as_echo_n "(cached) " >&6
12535 ac_check_lib_save_LIBS=$LIBS
12536 LIBS="-lossp-uuid $LIBS"
12537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12538 /* end confdefs.h. */
12540 /* Override any GCC internal prototype to avoid an error.
12541 Use char because int might match the return type of a GCC
12542 builtin and then its argument prototype would still apply. */
12546 char uuid_export ();
12550 return uuid_export ();
12555 if ac_fn_c_try_link "$LINENO"; then :
12556 ac_cv_lib_ossp_uuid_uuid_export=yes
12558 ac_cv_lib_ossp_uuid_uuid_export=no
12560 rm -f core conftest.err conftest.$ac_objext \
12561 conftest$ac_exeext conftest.$ac_ext
12562 LIBS=$ac_check_lib_save_LIBS
12564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
12565 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
12566 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
12567 UUID_LIBS="-lossp-uuid"
12569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
12570 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
12571 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
12572 $as_echo_n "(cached) " >&6
12574 ac_check_lib_save_LIBS=$LIBS
12575 LIBS="-luuid $LIBS"
12576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12577 /* end confdefs.h. */
12579 /* Override any GCC internal prototype to avoid an error.
12580 Use char because int might match the return type of a GCC
12581 builtin and then its argument prototype would still apply. */
12585 char uuid_export ();
12589 return uuid_export ();
12594 if ac_fn_c_try_link "$LINENO"; then :
12595 ac_cv_lib_uuid_uuid_export=yes
12597 ac_cv_lib_uuid_uuid_export=no
12599 rm -f core conftest.err conftest.$ac_objext \
12600 conftest$ac_exeext conftest.$ac_ext
12601 LIBS=$ac_check_lib_save_LIBS
12603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
12604 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
12605 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
12608 as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
12621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
12622 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
12623 if ${ac_cv_header_stdbool_h+:} false; then :
12624 $as_echo_n "(cached) " >&6
12626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12627 /* end confdefs.h. */
12629 #include <stdbool.h>
12631 "error: bool is not defined"
12634 "error: false is not defined"
12637 "error: false is not 0"
12640 "error: true is not defined"
12643 "error: true is not 1"
12645 #ifndef __bool_true_false_are_defined
12646 "error: __bool_true_false_are_defined is not defined"
12649 struct s { _Bool s: 1; _Bool t; } s;
12651 char a[true == 1 ? 1 : -1];
12652 char b[false == 0 ? 1 : -1];
12653 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
12654 char d[(bool) 0.5 == true ? 1 : -1];
12655 /* See body of main program for 'e'. */
12656 char f[(_Bool) 0.0 == false ? 1 : -1];
12658 char h[sizeof (_Bool)];
12659 char i[sizeof s.t];
12660 enum { j = false, k = true, l = false * true, m = true * 256 };
12661 /* The following fails for
12662 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
12664 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
12665 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
12666 /* Catch a bug in an HP-UX C compiler. See
12667 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
12668 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
12680 /* Refer to every declared value, to avoid compiler optimizations. */
12681 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
12682 + !m + !n + !o + !p + !q + !pq);
12688 if ac_fn_c_try_compile "$LINENO"; then :
12689 ac_cv_header_stdbool_h=yes
12691 ac_cv_header_stdbool_h=no
12693 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
12696 $as_echo "$ac_cv_header_stdbool_h" >&6; }
12697 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
12698 if test "x$ac_cv_type__Bool" = xyes; then :
12700 cat >>confdefs.h <<_ACEOF
12701 #define HAVE__BOOL 1
12708 if test $ac_cv_header_stdbool_h = yes; then
12710 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
12715 for ac_header in atomic.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
12717 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12718 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12719 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12720 cat >>confdefs.h <<_ACEOF
12721 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12729 # On BSD, test for net/if.h will fail unless sys/socket.h
12730 # is included first.
12731 for ac_header in net/if.h
12733 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
12734 #include <sys/socket.h>
12737 if test "x$ac_cv_header_net_if_h" = xyes; then :
12738 cat >>confdefs.h <<_ACEOF
12739 #define HAVE_NET_IF_H 1
12747 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
12748 # is included first.
12749 for ac_header in sys/ucred.h
12751 ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
12752 #include <sys/param.h>
12755 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
12756 cat >>confdefs.h <<_ACEOF
12757 #define HAVE_SYS_UCRED_H 1
12765 # At least on IRIX, test for netinet/tcp.h will fail unless
12766 # netinet/in.h is included first.
12767 for ac_header in netinet/tcp.h
12769 ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
12770 #include <netinet/in.h>
12773 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
12774 cat >>confdefs.h <<_ACEOF
12775 #define HAVE_NETINET_TCP_H 1
12783 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
12784 for ac_header in readline/readline.h
12786 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12787 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12788 cat >>confdefs.h <<_ACEOF
12789 #define HAVE_READLINE_READLINE_H 1
12793 for ac_header in readline.h
12795 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12796 if test "x$ac_cv_header_readline_h" = xyes; then :
12797 cat >>confdefs.h <<_ACEOF
12798 #define HAVE_READLINE_H 1
12802 as_fn_error $? "readline header not found
12803 If you have readline already installed, see config.log for details on the
12804 failure. It is possible the compiler isn't looking in the proper directory.
12805 Use --without-readline to disable readline support." "$LINENO" 5
12814 for ac_header in readline/history.h
12816 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
12817 if test "x$ac_cv_header_readline_history_h" = xyes; then :
12818 cat >>confdefs.h <<_ACEOF
12819 #define HAVE_READLINE_HISTORY_H 1
12823 for ac_header in history.h
12825 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12826 if test "x$ac_cv_header_history_h" = xyes; then :
12827 cat >>confdefs.h <<_ACEOF
12828 #define HAVE_HISTORY_H 1
12832 as_fn_error $? "history header not found
12833 If you have readline already installed, see config.log for details on the
12834 failure. It is possible the compiler isn't looking in the proper directory.
12835 Use --without-readline to disable readline support." "$LINENO" 5
12846 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
12847 # Some installations of libedit usurp /usr/include/readline/, which seems
12848 # bad practice, since in combined installations readline will have its headers
12849 # there. We might have to resort to AC_EGREP checks to make sure we found
12850 # the proper header...
12851 for ac_header in editline/readline.h
12853 ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
12854 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
12855 cat >>confdefs.h <<_ACEOF
12856 #define HAVE_EDITLINE_READLINE_H 1
12860 for ac_header in readline.h
12862 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
12863 if test "x$ac_cv_header_readline_h" = xyes; then :
12864 cat >>confdefs.h <<_ACEOF
12865 #define HAVE_READLINE_H 1
12869 for ac_header in readline/readline.h
12871 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
12872 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
12873 cat >>confdefs.h <<_ACEOF
12874 #define HAVE_READLINE_READLINE_H 1
12878 as_fn_error $? "readline header not found
12879 If you have libedit already installed, see config.log for details on the
12880 failure. It is possible the compiler isn't looking in the proper directory.
12881 Use --without-readline to disable libedit support." "$LINENO" 5
12894 # Note: in a libedit installation, history.h is sometimes a dummy, and may
12895 # not be there at all. Hence, don't complain if not found. We must check
12896 # though, since in yet other versions it is an independent header.
12897 for ac_header in editline/history.h
12899 ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
12900 if test "x$ac_cv_header_editline_history_h" = xyes; then :
12901 cat >>confdefs.h <<_ACEOF
12902 #define HAVE_EDITLINE_HISTORY_H 1
12906 for ac_header in history.h
12908 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
12909 if test "x$ac_cv_header_history_h" = xyes; then :
12910 cat >>confdefs.h <<_ACEOF
12911 #define HAVE_HISTORY_H 1
12915 for ac_header in readline/history.h
12917 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
12918 if test "x$ac_cv_header_readline_history_h" = xyes; then :
12919 cat >>confdefs.h <<_ACEOF
12920 #define HAVE_READLINE_HISTORY_H 1
12937 if test "$with_zlib" = yes; then
12938 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
12939 if test "x$ac_cv_header_zlib_h" = xyes; then :
12942 as_fn_error $? "zlib header not found
12943 If you have zlib already installed, see config.log for details on the
12944 failure. It is possible the compiler isn't looking in the proper directory.
12945 Use --without-zlib to disable zlib support." "$LINENO" 5
12951 if test "$with_gssapi" = yes ; then
12952 for ac_header in gssapi/gssapi.h
12954 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
12955 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
12956 cat >>confdefs.h <<_ACEOF
12957 #define HAVE_GSSAPI_GSSAPI_H 1
12961 for ac_header in gssapi.h
12963 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
12964 if test "x$ac_cv_header_gssapi_h" = xyes; then :
12965 cat >>confdefs.h <<_ACEOF
12966 #define HAVE_GSSAPI_H 1
12970 as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
12981 if test "$with_openssl" = yes ; then
12982 ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
12983 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
12986 as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
12990 ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
12991 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
12994 as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
13000 if test "$with_pam" = yes ; then
13001 for ac_header in security/pam_appl.h
13003 ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
13004 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
13005 cat >>confdefs.h <<_ACEOF
13006 #define HAVE_SECURITY_PAM_APPL_H 1
13010 for ac_header in pam/pam_appl.h
13012 ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
13013 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
13014 cat >>confdefs.h <<_ACEOF
13015 #define HAVE_PAM_PAM_APPL_H 1
13019 as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
13030 if test "$with_bsd_auth" = yes ; then
13031 ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
13032 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
13035 as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
13041 if test "$with_systemd" = yes ; then
13042 ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
13043 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
13046 as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
13052 if test "$with_libxml" = yes ; then
13053 ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
13054 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
13057 as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
13063 if test "$with_libxslt" = yes ; then
13064 ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
13065 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
13068 as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
13074 if test "$with_ldap" = yes ; then
13075 if test "$PORTNAME" != "win32"; then
13076 for ac_header in ldap.h
13078 ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
13079 if test "x$ac_cv_header_ldap_h" = xyes; then :
13080 cat >>confdefs.h <<_ACEOF
13081 #define HAVE_LDAP_H 1
13085 as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
13090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
13091 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
13092 if ${pgac_cv_ldap_safe+:} false; then :
13093 $as_echo_n "(cached) " >&6
13095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13096 /* end confdefs.h. */
13098 #if !defined(LDAP_VENDOR_VERSION) || \
13099 (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
13100 LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
13111 if ac_fn_c_try_compile "$LINENO"; then :
13112 pgac_cv_ldap_safe=yes
13114 pgac_cv_ldap_safe=no
13116 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
13119 $as_echo "$pgac_cv_ldap_safe" >&6; }
13121 if test "$pgac_cv_ldap_safe" != yes; then
13122 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
13123 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13124 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13125 *** also uses LDAP will crash on exit." >&5
13126 $as_echo "$as_me: WARNING:
13127 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
13128 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
13129 *** also uses LDAP will crash on exit." >&2;}
13132 for ac_header in winldap.h
13134 ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
13135 #include <windows.h>
13138 if test "x$ac_cv_header_winldap_h" = xyes; then :
13139 cat >>confdefs.h <<_ACEOF
13140 #define HAVE_WINLDAP_H 1
13144 as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
13152 if test "$with_bonjour" = yes ; then
13153 ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
13154 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
13157 as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
13163 # for contrib/uuid-ossp
13164 if test "$with_uuid" = bsd ; then
13165 for ac_header in uuid.h
13167 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13168 if test "x$ac_cv_header_uuid_h" = xyes; then :
13169 cat >>confdefs.h <<_ACEOF
13170 #define HAVE_UUID_H 1
13172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13173 /* end confdefs.h. */
13177 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13178 $EGREP "uuid_to_string" >/dev/null 2>&1; then :
13181 as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
13186 as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
13191 elif test "$with_uuid" = e2fs ; then
13192 for ac_header in uuid/uuid.h
13194 ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
13195 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
13196 cat >>confdefs.h <<_ACEOF
13197 #define HAVE_UUID_UUID_H 1
13199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13200 /* end confdefs.h. */
13201 #include <uuid/uuid.h>
13204 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13205 $EGREP "uuid_generate" >/dev/null 2>&1; then :
13208 as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
13213 for ac_header in uuid.h
13215 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
13216 if test "x$ac_cv_header_uuid_h" = xyes; then :
13217 cat >>confdefs.h <<_ACEOF
13218 #define HAVE_UUID_H 1
13220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13221 /* end confdefs.h. */
13225 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13226 $EGREP "uuid_generate" >/dev/null 2>&1; then :
13229 as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
13234 as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
13243 elif test "$with_uuid" = ossp ; then
13244 for ac_header in ossp/uuid.h
13246 ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
13247 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
13248 cat >>confdefs.h <<_ACEOF
13249 #define HAVE_OSSP_UUID_H 1
13251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13252 /* end confdefs.h. */
13253 #include <ossp/uuid.h>
13256 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13257 $EGREP "uuid_export" >/dev/null 2>&1; then :
13260 as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
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_export" >/dev/null 2>&1; then :
13281 as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
13286 as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
13297 if test "$PORTNAME" = "win32" ; then
13298 for ac_header in crtdefs.h
13300 ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
13301 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
13302 cat >>confdefs.h <<_ACEOF
13303 #define HAVE_CRTDEFS_H 1
13313 ## Types, structures, compiler characteristics
13316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13317 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13318 if ${ac_cv_c_bigendian+:} false; then :
13319 $as_echo_n "(cached) " >&6
13321 ac_cv_c_bigendian=unknown
13322 # See if we're dealing with a universal compiler.
13323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13324 /* end confdefs.h. */
13325 #ifndef __APPLE_CC__
13326 not a universal capable compiler
13331 if ac_fn_c_try_compile "$LINENO"; then :
13333 # Check for potential -arch flags. It is not universal unless
13334 # there are at least two -arch flags with different values.
13337 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13338 if test -n "$ac_prev"; then
13340 i?86 | x86_64 | ppc | ppc64)
13341 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13344 ac_cv_c_bigendian=universal
13350 elif test "x$ac_word" = "x-arch"; then
13355 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13356 if test $ac_cv_c_bigendian = unknown; then
13357 # See if sys/param.h defines the BYTE_ORDER macro.
13358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13359 /* end confdefs.h. */
13360 #include <sys/types.h>
13361 #include <sys/param.h>
13366 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13367 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13369 bogus endian macros
13376 if ac_fn_c_try_compile "$LINENO"; then :
13377 # It does; now see whether it defined to BIG_ENDIAN or not.
13378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13379 /* end confdefs.h. */
13380 #include <sys/types.h>
13381 #include <sys/param.h>
13386 #if BYTE_ORDER != BIG_ENDIAN
13394 if ac_fn_c_try_compile "$LINENO"; then :
13395 ac_cv_c_bigendian=yes
13397 ac_cv_c_bigendian=no
13399 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13401 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13403 if test $ac_cv_c_bigendian = unknown; then
13404 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13406 /* end confdefs.h. */
13407 #include <limits.h>
13412 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13413 bogus endian macros
13420 if ac_fn_c_try_compile "$LINENO"; then :
13421 # It does; now see whether it defined to _BIG_ENDIAN or not.
13422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13423 /* end confdefs.h. */
13424 #include <limits.h>
13429 #ifndef _BIG_ENDIAN
13437 if ac_fn_c_try_compile "$LINENO"; then :
13438 ac_cv_c_bigendian=yes
13440 ac_cv_c_bigendian=no
13442 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13444 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13446 if test $ac_cv_c_bigendian = unknown; then
13447 # Compile a test program.
13448 if test "$cross_compiling" = yes; then :
13449 # Try to guess by grepping values from an object file.
13450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13451 /* end confdefs.h. */
13452 short int ascii_mm[] =
13453 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13454 short int ascii_ii[] =
13455 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13456 int use_ascii (int i) {
13457 return ascii_mm[i] + ascii_ii[i];
13459 short int ebcdic_ii[] =
13460 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13461 short int ebcdic_mm[] =
13462 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13463 int use_ebcdic (int i) {
13464 return ebcdic_mm[i] + ebcdic_ii[i];
13471 return use_ascii (foo) == use_ebcdic (foo);
13476 if ac_fn_c_try_compile "$LINENO"; then :
13477 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13478 ac_cv_c_bigendian=yes
13480 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13481 if test "$ac_cv_c_bigendian" = unknown; then
13482 ac_cv_c_bigendian=no
13484 # finding both strings is unlikely to happen, but who knows?
13485 ac_cv_c_bigendian=unknown
13489 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13492 /* end confdefs.h. */
13493 $ac_includes_default
13498 /* Are we little or big endian? From Harbison&Steele. */
13502 char c[sizeof (long int)];
13505 return u.c[sizeof (long int) - 1] == 1;
13511 if ac_fn_c_try_run "$LINENO"; then :
13512 ac_cv_c_bigendian=no
13514 ac_cv_c_bigendian=yes
13516 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13517 conftest.$ac_objext conftest.beam conftest.$ac_ext
13522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13523 $as_echo "$ac_cv_c_bigendian" >&6; }
13524 case $ac_cv_c_bigendian in #(
13526 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13532 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13536 as_fn_error $? "unknown endianness
13537 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
13541 $as_echo_n "checking for inline... " >&6; }
13542 if ${ac_cv_c_inline+:} false; then :
13543 $as_echo_n "(cached) " >&6
13546 for ac_kw in inline __inline__ __inline; do
13547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13548 /* end confdefs.h. */
13549 #ifndef __cplusplus
13551 static $ac_kw foo_t static_foo () {return 0; }
13552 $ac_kw foo_t foo () {return 0; }
13556 if ac_fn_c_try_compile "$LINENO"; then :
13557 ac_cv_c_inline=$ac_kw
13559 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13560 test "$ac_cv_c_inline" != no && break
13564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
13565 $as_echo "$ac_cv_c_inline" >&6; }
13567 case $ac_cv_c_inline in
13570 case $ac_cv_c_inline in
13572 *) ac_val=$ac_cv_c_inline;;
13574 cat >>confdefs.h <<_ACEOF
13575 #ifndef __cplusplus
13576 #define inline $ac_val
13582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
13583 $as_echo_n "checking for printf format archetype... " >&6; }
13584 if ${pgac_cv_printf_archetype+:} false; then :
13585 $as_echo_n "(cached) " >&6
13587 pgac_cv_printf_archetype=gnu_printf
13588 ac_save_c_werror_flag=$ac_c_werror_flag
13589 ac_c_werror_flag=yes
13590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13591 /* end confdefs.h. */
13592 extern void pgac_write(int ignore, const char *fmt,...)
13593 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
13597 pgac_write(0, "error %s: %m", "foo");
13602 if ac_fn_c_try_compile "$LINENO"; then :
13603 ac_archetype_ok=yes
13607 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13608 ac_c_werror_flag=$ac_save_c_werror_flag
13610 if [ "$ac_archetype_ok" = no ]; then
13611 pgac_cv_printf_archetype=__syslog__
13612 ac_save_c_werror_flag=$ac_c_werror_flag
13613 ac_c_werror_flag=yes
13614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13615 /* end confdefs.h. */
13616 extern void pgac_write(int ignore, const char *fmt,...)
13617 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
13621 pgac_write(0, "error %s: %m", "foo");
13626 if ac_fn_c_try_compile "$LINENO"; then :
13627 ac_archetype_ok=yes
13631 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13632 ac_c_werror_flag=$ac_save_c_werror_flag
13634 if [ "$ac_archetype_ok" = no ]; then
13635 pgac_cv_printf_archetype=printf
13639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
13640 $as_echo "$pgac_cv_printf_archetype" >&6; }
13642 cat >>confdefs.h <<_ACEOF
13643 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
13648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
13649 $as_echo_n "checking for flexible array members... " >&6; }
13650 if ${ac_cv_c_flexmember+:} false; then :
13651 $as_echo_n "(cached) " >&6
13653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13654 /* end confdefs.h. */
13655 #include <stdlib.h>
13657 #include <stddef.h>
13658 struct s { int n; double d[]; };
13662 int m = getchar ();
13663 struct s *p = malloc (offsetof (struct s, d)
13664 + m * sizeof (double));
13666 return p->d != (double *) NULL;
13671 if ac_fn_c_try_compile "$LINENO"; then :
13672 ac_cv_c_flexmember=yes
13674 ac_cv_c_flexmember=no
13676 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
13679 $as_echo "$ac_cv_c_flexmember" >&6; }
13680 if test $ac_cv_c_flexmember = yes; then
13682 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
13685 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
13689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
13690 $as_echo_n "checking for signed types... " >&6; }
13691 if ${pgac_cv_c_signed+:} false; then :
13692 $as_echo_n "(cached) " >&6
13694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13695 /* end confdefs.h. */
13700 signed char c; signed short s; signed int i;
13705 if ac_fn_c_try_compile "$LINENO"; then :
13706 pgac_cv_c_signed=yes
13708 pgac_cv_c_signed=no
13710 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
13713 $as_echo "$pgac_cv_c_signed" >&6; }
13714 if test x"$pgac_cv_c_signed" = xno ; then
13716 $as_echo "#define signed /**/" >>confdefs.h
13719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
13720 $as_echo_n "checking for __func__... " >&6; }
13721 if ${pgac_cv_funcname_func_support+:} false; then :
13722 $as_echo_n "(cached) " >&6
13724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13725 /* end confdefs.h. */
13730 printf("%s\n", __func__);
13735 if ac_fn_c_try_compile "$LINENO"; then :
13736 pgac_cv_funcname_func_support=yes
13738 pgac_cv_funcname_func_support=no
13740 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
13743 $as_echo "$pgac_cv_funcname_func_support" >&6; }
13744 if test x"$pgac_cv_funcname_func_support" = xyes ; then
13746 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
13749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
13750 $as_echo_n "checking for __FUNCTION__... " >&6; }
13751 if ${pgac_cv_funcname_function_support+:} false; then :
13752 $as_echo_n "(cached) " >&6
13754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13755 /* end confdefs.h. */
13760 printf("%s\n", __FUNCTION__);
13765 if ac_fn_c_try_compile "$LINENO"; then :
13766 pgac_cv_funcname_function_support=yes
13768 pgac_cv_funcname_function_support=no
13770 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
13773 $as_echo "$pgac_cv_funcname_function_support" >&6; }
13774 if test x"$pgac_cv_funcname_function_support" = xyes ; then
13776 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
13780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
13781 $as_echo_n "checking for _Static_assert... " >&6; }
13782 if ${pgac_cv__static_assert+:} false; then :
13783 $as_echo_n "(cached) " >&6
13785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13786 /* end confdefs.h. */
13791 ({ _Static_assert(1, "foo"); })
13796 if ac_fn_c_try_link "$LINENO"; then :
13797 pgac_cv__static_assert=yes
13799 pgac_cv__static_assert=no
13801 rm -f core conftest.err conftest.$ac_objext \
13802 conftest$ac_exeext conftest.$ac_ext
13804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
13805 $as_echo "$pgac_cv__static_assert" >&6; }
13806 if test x"$pgac_cv__static_assert" = xyes ; then
13808 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
13811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
13812 $as_echo_n "checking for typeof... " >&6; }
13813 if ${pgac_cv_c_typeof+:} false; then :
13814 $as_echo_n "(cached) " >&6
13816 pgac_cv_c_typeof=no
13817 for pgac_kw in typeof __typeof__ decltype; do
13818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13819 /* end confdefs.h. */
13832 if ac_fn_c_try_compile "$LINENO"; then :
13833 pgac_cv_c_typeof=$pgac_kw
13835 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13836 test "$pgac_cv_c_typeof" != no && break
13839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
13840 $as_echo "$pgac_cv_c_typeof" >&6; }
13841 if test "$pgac_cv_c_typeof" != no; then
13843 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
13845 if test "$pgac_cv_c_typeof" != typeof; then
13847 cat >>confdefs.h <<_ACEOF
13848 #define typeof $pgac_cv_c_typeof
13853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
13854 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
13855 if ${pgac_cv__types_compatible+:} false; then :
13856 $as_echo_n "(cached) " >&6
13858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13859 /* end confdefs.h. */
13864 int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
13869 if ac_fn_c_try_compile "$LINENO"; then :
13870 pgac_cv__types_compatible=yes
13872 pgac_cv__types_compatible=no
13874 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
13877 $as_echo "$pgac_cv__types_compatible" >&6; }
13878 if test x"$pgac_cv__types_compatible" = xyes ; then
13880 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
13883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
13884 $as_echo_n "checking for __builtin_bswap16... " >&6; }
13885 if ${pgac_cv__builtin_bswap16+:} false; then :
13886 $as_echo_n "(cached) " >&6
13888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13889 /* end confdefs.h. */
13890 static unsigned long int x = __builtin_bswap16(0xaabb);
13893 if ac_fn_c_try_compile "$LINENO"; then :
13894 pgac_cv__builtin_bswap16=yes
13896 pgac_cv__builtin_bswap16=no
13898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
13901 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
13902 if test x"$pgac_cv__builtin_bswap16" = xyes ; then
13904 $as_echo "#define HAVE__BUILTIN_BSWAP16 1" >>confdefs.h
13907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
13908 $as_echo_n "checking for __builtin_bswap32... " >&6; }
13909 if ${pgac_cv__builtin_bswap32+:} false; then :
13910 $as_echo_n "(cached) " >&6
13912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13913 /* end confdefs.h. */
13914 static unsigned long int x = __builtin_bswap32(0xaabbccdd);
13917 if ac_fn_c_try_compile "$LINENO"; then :
13918 pgac_cv__builtin_bswap32=yes
13920 pgac_cv__builtin_bswap32=no
13922 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
13925 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
13926 if test x"$pgac_cv__builtin_bswap32" = xyes ; then
13928 $as_echo "#define HAVE__BUILTIN_BSWAP32 1" >>confdefs.h
13931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
13932 $as_echo_n "checking for __builtin_bswap64... " >&6; }
13933 if ${pgac_cv__builtin_bswap64+:} false; then :
13934 $as_echo_n "(cached) " >&6
13936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13937 /* end confdefs.h. */
13938 static unsigned long int x = __builtin_bswap64(0xaabbccddeeff0011);
13941 if ac_fn_c_try_compile "$LINENO"; then :
13942 pgac_cv__builtin_bswap64=yes
13944 pgac_cv__builtin_bswap64=no
13946 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
13949 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
13950 if test x"$pgac_cv__builtin_bswap64" = xyes ; then
13952 $as_echo "#define HAVE__BUILTIN_BSWAP64 1" >>confdefs.h
13955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
13956 $as_echo_n "checking for __builtin_constant_p... " >&6; }
13957 if ${pgac_cv__builtin_constant_p+:} false; then :
13958 $as_echo_n "(cached) " >&6
13960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13961 /* end confdefs.h. */
13963 static int y[__builtin_constant_p(x) ? x : 1];
13964 static int z[__builtin_constant_p("string literal") ? 1 : x];
13968 if ac_fn_c_try_compile "$LINENO"; then :
13969 pgac_cv__builtin_constant_p=yes
13971 pgac_cv__builtin_constant_p=no
13973 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
13976 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
13977 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
13979 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
13982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
13983 $as_echo_n "checking for __builtin_unreachable... " >&6; }
13984 if ${pgac_cv__builtin_unreachable+:} false; then :
13985 $as_echo_n "(cached) " >&6
13987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13988 /* end confdefs.h. */
13993 __builtin_unreachable();
13998 if ac_fn_c_try_link "$LINENO"; then :
13999 pgac_cv__builtin_unreachable=yes
14001 pgac_cv__builtin_unreachable=no
14003 rm -f core conftest.err conftest.$ac_objext \
14004 conftest$ac_exeext conftest.$ac_ext
14006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
14007 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
14008 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
14010 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
14013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
14014 $as_echo_n "checking for computed goto support... " >&6; }
14015 if ${pgac_cv_computed_goto+:} false; then :
14016 $as_echo_n "(cached) " >&6
14018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14019 /* end confdefs.h. */
14024 void *labeladdrs[] = {&&my_label};
14025 goto *labeladdrs[0];
14033 if ac_fn_c_try_compile "$LINENO"; then :
14034 pgac_cv_computed_goto=yes
14036 pgac_cv_computed_goto=no
14038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
14041 $as_echo "$pgac_cv_computed_goto" >&6; }
14042 if test x"$pgac_cv_computed_goto" = xyes ; then
14044 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
14047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
14048 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
14049 if ${ac_cv_struct_tm+:} false; then :
14050 $as_echo_n "(cached) " >&6
14052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14053 /* end confdefs.h. */
14054 #include <sys/types.h>
14061 int *p = &tm.tm_sec;
14067 if ac_fn_c_try_compile "$LINENO"; then :
14068 ac_cv_struct_tm=time.h
14070 ac_cv_struct_tm=sys/time.h
14072 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
14075 $as_echo "$ac_cv_struct_tm" >&6; }
14076 if test $ac_cv_struct_tm = sys/time.h; then
14078 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
14082 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
14083 #include <$ac_cv_struct_tm>
14086 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
14088 cat >>confdefs.h <<_ACEOF
14089 #define HAVE_STRUCT_TM_TM_ZONE 1
14095 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14097 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
14100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14101 $as_echo_n "checking for tzname... " >&6; }
14102 if ${ac_cv_var_tzname+:} false; then :
14103 $as_echo_n "(cached) " >&6
14105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14106 /* end confdefs.h. */
14107 #include <stdlib.h>
14109 #ifndef tzname /* For SGI. */
14110 extern char *tzname[]; /* RS6000 and others reject char **tzname. */
14121 if ac_fn_c_try_link "$LINENO"; then :
14122 ac_cv_var_tzname=yes
14124 ac_cv_var_tzname=no
14126 rm -f core conftest.err conftest.$ac_objext \
14127 conftest$ac_exeext conftest.$ac_ext
14129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14130 $as_echo "$ac_cv_var_tzname" >&6; }
14131 if test $ac_cv_var_tzname = yes; then
14133 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
14137 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
14138 #ifdef HAVE_SYS_IPC_H
14139 #include <sys/ipc.h>
14141 #ifdef HAVE_SYS_SEM_H
14142 #include <sys/sem.h>
14145 if test "x$ac_cv_type_union_semun" = xyes; then :
14147 cat >>confdefs.h <<_ACEOF
14148 #define HAVE_UNION_SEMUN 1
14154 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
14155 #ifdef HAVE_SYS_UN_H
14156 #include <sys/un.h>
14160 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
14162 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
14166 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
14167 #include <sys/socket.h>
14170 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
14172 cat >>confdefs.h <<_ACEOF
14173 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
14179 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
14180 #include <sys/socket.h>
14183 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
14185 cat >>confdefs.h <<_ACEOF
14186 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
14191 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
14192 #include <sys/socket.h>
14195 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
14197 cat >>confdefs.h <<_ACEOF
14198 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
14203 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
14204 #include <sys/socket.h>
14207 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
14209 cat >>confdefs.h <<_ACEOF
14210 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
14215 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
14216 #include <sys/socket.h>
14219 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
14221 cat >>confdefs.h <<_ACEOF
14222 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
14227 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
14228 #include <sys/socket.h>
14231 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
14233 cat >>confdefs.h <<_ACEOF
14234 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
14240 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
14241 #include <sys/socket.h>
14245 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
14247 cat >>confdefs.h <<_ACEOF
14248 #define HAVE_STRUCT_ADDRINFO 1
14255 ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
14256 if test "x$ac_cv_type_intptr_t" = xyes; then :
14258 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
14261 for ac_type in 'int' 'long int' 'long long int'; do
14262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14263 /* end confdefs.h. */
14264 $ac_includes_default
14268 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14269 test_array [0] = 0;
14270 return test_array [0];
14276 if ac_fn_c_try_compile "$LINENO"; then :
14278 cat >>confdefs.h <<_ACEOF
14279 #define intptr_t $ac_type
14284 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14285 test -z "$ac_type" && break
14291 ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
14292 if test "x$ac_cv_type_uintptr_t" = xyes; then :
14294 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
14297 for ac_type in 'unsigned int' 'unsigned long int' \
14298 'unsigned long long int'; do
14299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14300 /* end confdefs.h. */
14301 $ac_includes_default
14305 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
14306 test_array [0] = 0;
14307 return test_array [0];
14313 if ac_fn_c_try_compile "$LINENO"; then :
14315 cat >>confdefs.h <<_ACEOF
14316 #define uintptr_t $ac_type
14321 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14322 test -z "$ac_type" && break
14328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
14329 $as_echo_n "checking for unsigned long long int... " >&6; }
14330 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
14331 $as_echo_n "(cached) " >&6
14333 ac_cv_type_unsigned_long_long_int=yes
14334 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14336 /* end confdefs.h. */
14338 /* For now, do not test the preprocessor; as of 2007 there are too many
14339 implementations with broken preprocessors. Perhaps this can
14340 be revisited in 2012. In the meantime, code should not expect
14341 #if to work with literals wider than 32 bits. */
14342 /* Test literals. */
14343 long long int ll = 9223372036854775807ll;
14344 long long int nll = -9223372036854775807LL;
14345 unsigned long long int ull = 18446744073709551615ULL;
14346 /* Test constant expressions. */
14347 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
14349 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
14355 /* Test availability of runtime routines for shift and division. */
14356 long long int llmax = 9223372036854775807ll;
14357 unsigned long long int ullmax = 18446744073709551615ull;
14358 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
14359 | (llmax / ll) | (llmax % ll)
14360 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
14361 | (ullmax / ull) | (ullmax % ull));
14367 if ac_fn_c_try_link "$LINENO"; then :
14370 ac_cv_type_unsigned_long_long_int=no
14372 rm -f core conftest.err conftest.$ac_objext \
14373 conftest$ac_exeext conftest.$ac_ext
14376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
14377 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
14378 if test $ac_cv_type_unsigned_long_long_int = yes; then
14380 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
14386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
14387 $as_echo_n "checking for long long int... " >&6; }
14388 if ${ac_cv_type_long_long_int+:} false; then :
14389 $as_echo_n "(cached) " >&6
14391 ac_cv_type_long_long_int=yes
14392 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
14393 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
14394 if test $ac_cv_type_long_long_int = yes; then
14395 if test "$cross_compiling" = yes; then :
14398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14399 /* end confdefs.h. */
14400 #include <limits.h>
14403 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
14404 # define LLONG_MAX (HALF - 1 + HALF)
14409 long long int n = 1;
14413 long long int m = n << i;
14416 if (LLONG_MAX / 2 < m)
14424 if ac_fn_c_try_run "$LINENO"; then :
14427 ac_cv_type_long_long_int=no
14429 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14430 conftest.$ac_objext conftest.beam conftest.$ac_ext
14436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
14437 $as_echo "$ac_cv_type_long_long_int" >&6; }
14438 if test $ac_cv_type_long_long_int = yes; then
14440 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
14445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
14446 $as_echo_n "checking for locale_t... " >&6; }
14447 if ${pgac_cv_type_locale_t+:} false; then :
14448 $as_echo_n "(cached) " >&6
14450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14451 /* end confdefs.h. */
14452 #include <locale.h>
14462 if ac_fn_c_try_compile "$LINENO"; then :
14463 pgac_cv_type_locale_t=yes
14465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14466 /* end confdefs.h. */
14467 #include <xlocale.h>
14477 if ac_fn_c_try_compile "$LINENO"; then :
14478 pgac_cv_type_locale_t='yes (in xlocale.h)'
14480 pgac_cv_type_locale_t=no
14482 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14484 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
14487 $as_echo "$pgac_cv_type_locale_t" >&6; }
14488 if test "$pgac_cv_type_locale_t" != no; then
14490 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
14493 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
14495 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
14499 # MSVC doesn't cope well with defining restrict to __restrict, the
14500 # spelling it understands, because it conflicts with
14501 # __declspec(restrict). Therefore we define pg_restrict to the
14502 # appropriate definition, which presumably won't conflict.
14504 # Allow platforms with buggy compilers to force restrict to not be
14505 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
14507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14508 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
14509 if ${ac_cv_c_restrict+:} false; then :
14510 $as_echo_n "(cached) " >&6
14512 ac_cv_c_restrict=no
14513 # The order here caters to the fact that C++ does not require restrict.
14514 for ac_kw in __restrict __restrict__ _Restrict restrict; do
14515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14516 /* end confdefs.h. */
14517 typedef int * int_ptr;
14518 int foo (int_ptr $ac_kw ip) {
14525 int * $ac_kw t = s;
14532 if ac_fn_c_try_compile "$LINENO"; then :
14533 ac_cv_c_restrict=$ac_kw
14535 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14536 test "$ac_cv_c_restrict" != no && break
14540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14541 $as_echo "$ac_cv_c_restrict" >&6; }
14543 case $ac_cv_c_restrict in
14545 no) $as_echo "#define restrict /**/" >>confdefs.h
14547 *) cat >>confdefs.h <<_ACEOF
14548 #define restrict $ac_cv_c_restrict
14553 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
14556 pg_restrict="$ac_cv_c_restrict"
14559 cat >>confdefs.h <<_ACEOF
14560 #define pg_restrict $pg_restrict
14564 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
14565 #include <sys/param.h>
14566 #ifdef HAVE_SYS_UCRED_H
14567 #include <sys/ucred.h>
14570 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
14572 cat >>confdefs.h <<_ACEOF
14573 #define HAVE_STRUCT_CMSGCRED 1
14580 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
14581 #include <getopt.h>
14584 if test "x$ac_cv_type_struct_option" = xyes; then :
14586 cat >>confdefs.h <<_ACEOF
14587 #define HAVE_STRUCT_OPTION 1
14594 if test "$with_zlib" = yes; then
14595 # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
14596 # did not). While we could work around the lack of z_streamp, it
14597 # seems unwise to encourage people to use such old zlib versions...
14598 ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
14600 if test "x$ac_cv_type_z_streamp" = xyes; then :
14603 as_fn_error $? "zlib version is too old
14604 Use --without-zlib to disable zlib support." "$LINENO" 5
14609 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
14612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
14613 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
14614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14615 /* end confdefs.h. */
14620 int a = 0; int *p = &a; int r;
14621 __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
14626 if ac_fn_c_try_compile "$LINENO"; then :
14627 pgac_cv_have_ppc_mutex_hint=yes
14629 pgac_cv_have_ppc_mutex_hint=no
14631 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
14633 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
14634 if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
14636 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
14642 # Check largefile support. You might think this is a system service not a
14643 # compiler characteristic, but you'd be wrong. We must check this before
14644 # probing existence of related functions such as fseeko, since the largefile
14645 # defines can affect what is generated for that.
14646 if test "$PORTNAME" != "win32"; then
14647 # Check whether --enable-largefile was given.
14648 if test "${enable_largefile+set}" = set; then :
14649 enableval=$enable_largefile;
14652 if test "$enable_largefile" != no; then
14654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
14655 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
14656 if ${ac_cv_sys_largefile_CC+:} false; then :
14657 $as_echo_n "(cached) " >&6
14659 ac_cv_sys_largefile_CC=no
14660 if test "$GCC" != yes; then
14663 # IRIX 6.2 and later do not support large files by default,
14664 # so use the C compiler's -n32 option if that helps.
14665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14666 /* end confdefs.h. */
14667 #include <sys/types.h>
14668 /* Check that off_t can represent 2**63 - 1 correctly.
14669 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14670 since some C++ compilers masquerading as C compilers
14671 incorrectly reject 9223372036854775807. */
14672 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14673 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14674 && LARGE_OFF_T % 2147483647 == 1)
14684 if ac_fn_c_try_compile "$LINENO"; then :
14687 rm -f core conftest.err conftest.$ac_objext
14689 if ac_fn_c_try_compile "$LINENO"; then :
14690 ac_cv_sys_largefile_CC=' -n32'; break
14692 rm -f core conftest.err conftest.$ac_objext
14696 rm -f conftest.$ac_ext
14699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
14700 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
14701 if test "$ac_cv_sys_largefile_CC" != no; then
14702 CC=$CC$ac_cv_sys_largefile_CC
14705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14706 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
14707 if ${ac_cv_sys_file_offset_bits+:} false; then :
14708 $as_echo_n "(cached) " >&6
14711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14712 /* end confdefs.h. */
14713 #include <sys/types.h>
14714 /* Check that off_t can represent 2**63 - 1 correctly.
14715 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14716 since some C++ compilers masquerading as C compilers
14717 incorrectly reject 9223372036854775807. */
14718 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14719 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14720 && LARGE_OFF_T % 2147483647 == 1)
14730 if ac_fn_c_try_compile "$LINENO"; then :
14731 ac_cv_sys_file_offset_bits=no; break
14733 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14735 /* end confdefs.h. */
14736 #define _FILE_OFFSET_BITS 64
14737 #include <sys/types.h>
14738 /* Check that off_t can represent 2**63 - 1 correctly.
14739 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14740 since some C++ compilers masquerading as C compilers
14741 incorrectly reject 9223372036854775807. */
14742 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14743 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14744 && LARGE_OFF_T % 2147483647 == 1)
14754 if ac_fn_c_try_compile "$LINENO"; then :
14755 ac_cv_sys_file_offset_bits=64; break
14757 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14758 ac_cv_sys_file_offset_bits=unknown
14762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
14763 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
14764 case $ac_cv_sys_file_offset_bits in #(
14767 cat >>confdefs.h <<_ACEOF
14768 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14773 if test $ac_cv_sys_file_offset_bits = unknown; then
14774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
14775 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
14776 if ${ac_cv_sys_large_files+:} false; then :
14777 $as_echo_n "(cached) " >&6
14780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14781 /* end confdefs.h. */
14782 #include <sys/types.h>
14783 /* Check that off_t can represent 2**63 - 1 correctly.
14784 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14785 since some C++ compilers masquerading as C compilers
14786 incorrectly reject 9223372036854775807. */
14787 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14788 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14789 && LARGE_OFF_T % 2147483647 == 1)
14799 if ac_fn_c_try_compile "$LINENO"; then :
14800 ac_cv_sys_large_files=no; break
14802 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14804 /* end confdefs.h. */
14805 #define _LARGE_FILES 1
14806 #include <sys/types.h>
14807 /* Check that off_t can represent 2**63 - 1 correctly.
14808 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14809 since some C++ compilers masquerading as C compilers
14810 incorrectly reject 9223372036854775807. */
14811 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14812 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14813 && LARGE_OFF_T % 2147483647 == 1)
14823 if ac_fn_c_try_compile "$LINENO"; then :
14824 ac_cv_sys_large_files=1; break
14826 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14827 ac_cv_sys_large_files=unknown
14831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
14832 $as_echo "$ac_cv_sys_large_files" >&6; }
14833 case $ac_cv_sys_large_files in #(
14836 cat >>confdefs.h <<_ACEOF
14837 #define _LARGE_FILES $ac_cv_sys_large_files
14850 # Check for largefile support (must be after AC_SYS_LARGEFILE)
14851 # The cast to long int works around a bug in the HP C Compiler
14852 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14853 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14854 # This bug is HP SR number 8606223364.
14855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
14856 $as_echo_n "checking size of off_t... " >&6; }
14857 if ${ac_cv_sizeof_off_t+:} false; then :
14858 $as_echo_n "(cached) " >&6
14860 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
14863 if test "$ac_cv_type_off_t" = yes; then
14864 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14865 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14866 as_fn_error 77 "cannot compute sizeof (off_t)
14867 See \`config.log' for more details" "$LINENO" 5; }
14869 ac_cv_sizeof_off_t=0
14874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
14875 $as_echo "$ac_cv_sizeof_off_t" >&6; }
14879 cat >>confdefs.h <<_ACEOF
14880 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
14885 # If we don't have largefile support, can't handle segsize >= 2GB.
14886 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
14887 as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
14890 # The cast to long int works around a bug in the HP C Compiler
14891 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14892 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14893 # This bug is HP SR number 8606223364.
14894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
14895 $as_echo_n "checking size of bool... " >&6; }
14896 if ${ac_cv_sizeof_bool+:} false; then :
14897 $as_echo_n "(cached) " >&6
14899 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool" "#ifdef HAVE_STDBOOL_H
14900 #include <stdbool.h>
14905 if test "$ac_cv_type_bool" = yes; then
14906 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14907 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14908 as_fn_error 77 "cannot compute sizeof (bool)
14909 See \`config.log' for more details" "$LINENO" 5; }
14911 ac_cv_sizeof_bool=0
14916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
14917 $as_echo "$ac_cv_sizeof_bool" >&6; }
14921 cat >>confdefs.h <<_ACEOF
14922 #define SIZEOF_BOOL $ac_cv_sizeof_bool
14929 ## Functions, global variables
14932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
14933 $as_echo_n "checking for int timezone... " >&6; }
14934 if ${pgac_cv_var_int_timezone+:} false; then :
14935 $as_echo_n "(cached) " >&6
14937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14938 /* end confdefs.h. */
14945 res = timezone / 60;
14947 res = _timezone / 60;
14953 if ac_fn_c_try_link "$LINENO"; then :
14954 pgac_cv_var_int_timezone=yes
14956 pgac_cv_var_int_timezone=no
14958 rm -f core conftest.err conftest.$ac_objext \
14959 conftest$ac_exeext conftest.$ac_ext
14961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
14962 $as_echo "$pgac_cv_var_int_timezone" >&6; }
14963 if test x"$pgac_cv_var_int_timezone" = xyes ; then
14965 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
14968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
14969 $as_echo_n "checking types of arguments for accept()... " >&6; }
14970 if ${ac_cv_func_accept_return+:} false; then :
14971 $as_echo_n "(cached) " >&6
14973 if ${ac_cv_func_accept_arg1+:} false; then :
14974 $as_echo_n "(cached) " >&6
14976 if ${ac_cv_func_accept_arg2+:} false; then :
14977 $as_echo_n "(cached) " >&6
14979 if ${ac_cv_func_accept_arg3+:} false; then :
14980 $as_echo_n "(cached) " >&6
14982 for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
14983 for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
14984 for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
14985 for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
14986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14987 /* end confdefs.h. */
14988 #include <sys/types.h>
14989 #include <sys/socket.h>
14990 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
14992 if ac_fn_c_try_compile "$LINENO"; then :
14993 ac_not_found=no; break 4
14997 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15002 if test "$ac_not_found" = yes; then
15003 as_fn_error $? "could not determine argument types" "$LINENO" 5
15005 if test "$ac_cv_func_accept_arg3" = "void"; then
15006 ac_cv_func_accept_arg3=int
15016 { $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
15017 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
15019 cat >>confdefs.h <<_ACEOF
15020 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
15024 cat >>confdefs.h <<_ACEOF
15025 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
15029 cat >>confdefs.h <<_ACEOF
15030 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
15034 cat >>confdefs.h <<_ACEOF
15035 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
15039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
15040 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
15041 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
15042 $as_echo_n "(cached) " >&6
15044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15045 /* end confdefs.h. */
15046 #include <sys/time.h>
15050 struct timeval *tp;
15051 struct timezone *tzp;
15052 gettimeofday(tp,tzp);
15057 if ac_fn_c_try_compile "$LINENO"; then :
15058 pgac_cv_func_gettimeofday_1arg=no
15060 pgac_cv_func_gettimeofday_1arg=yes
15062 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
15065 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
15066 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
15068 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
15072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
15073 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
15074 if ${pgac_cv_func_wcstombs_l+:} false; then :
15075 $as_echo_n "(cached) " >&6
15077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15078 /* end confdefs.h. */
15079 #include <stdlib.h>
15080 #include <locale.h>
15091 if ac_fn_c_try_compile "$LINENO"; then :
15092 pgac_cv_func_wcstombs_l='yes'
15094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15095 /* end confdefs.h. */
15096 #include <stdlib.h>
15097 #include <locale.h>
15098 #include <xlocale.h>
15109 if ac_fn_c_try_compile "$LINENO"; then :
15110 pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
15112 pgac_cv_func_wcstombs_l='no'
15114 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15116 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
15119 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
15120 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
15122 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
15126 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15127 # symbols that that library has no business exposing to the world. Pending
15128 # acquisition of a clue by those developers, ignore libedit (including its
15129 # possible alias of libreadline) while checking for everything else.
15130 LIBS_including_readline="$LIBS"
15131 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15133 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
15135 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15136 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15137 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15138 cat >>confdefs.h <<_ACEOF
15139 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15146 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
15147 if test "x$ac_cv_func_fseeko" = xyes; then :
15148 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15151 case " $LIBOBJS " in
15152 *" fseeko.$ac_objext "* ) ;;
15153 *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
15161 # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
15162 # Mingw uses macros to access Win32 API calls
15165 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15167 ac_cv_func_fseeko=yes;;
15169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15170 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15171 if ${ac_cv_sys_largefile_source+:} false; then :
15172 $as_echo_n "(cached) " >&6
15175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15176 /* end confdefs.h. */
15177 #include <sys/types.h> /* for off_t */
15182 int (*fp) (FILE *, off_t, int) = fseeko;
15183 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15188 if ac_fn_c_try_link "$LINENO"; then :
15189 ac_cv_sys_largefile_source=no; break
15191 rm -f core conftest.err conftest.$ac_objext \
15192 conftest$ac_exeext conftest.$ac_ext
15193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15194 /* end confdefs.h. */
15195 #define _LARGEFILE_SOURCE 1
15196 #include <sys/types.h> /* for off_t */
15201 int (*fp) (FILE *, off_t, int) = fseeko;
15202 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15207 if ac_fn_c_try_link "$LINENO"; then :
15208 ac_cv_sys_largefile_source=1; break
15210 rm -f core conftest.err conftest.$ac_objext \
15211 conftest$ac_exeext conftest.$ac_ext
15212 ac_cv_sys_largefile_source=unknown
15216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
15217 $as_echo "$ac_cv_sys_largefile_source" >&6; }
15218 case $ac_cv_sys_largefile_source in #(
15221 cat >>confdefs.h <<_ACEOF
15222 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
15228 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
15229 # in glibc 2.1.3, but that breaks too many other things.
15230 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
15231 if test $ac_cv_sys_largefile_source != unknown; then
15233 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
15239 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
15240 # by calling it, 2009-04-02
15241 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
15242 if test "$PORTNAME" != "solaris"; then
15243 for ac_func in posix_fadvise
15245 ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
15246 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
15247 cat >>confdefs.h <<_ACEOF
15248 #define HAVE_POSIX_FADVISE 1
15254 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
15256 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
15262 cat >>confdefs.h <<_ACEOF
15263 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
15268 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
15270 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
15276 cat >>confdefs.h <<_ACEOF
15277 #define HAVE_DECL_FDATASYNC $ac_have_decl
15280 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
15281 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
15287 cat >>confdefs.h <<_ACEOF
15288 #define HAVE_DECL_STRLCAT $ac_have_decl
15290 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
15291 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
15297 cat >>confdefs.h <<_ACEOF
15298 #define HAVE_DECL_STRLCPY $ac_have_decl
15300 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15301 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15307 cat >>confdefs.h <<_ACEOF
15308 #define HAVE_DECL_STRNLEN $ac_have_decl
15311 # This is probably only present on macOS, but may as well check always
15312 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
15314 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
15320 cat >>confdefs.h <<_ACEOF
15321 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
15325 ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
15327 if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
15333 cat >>confdefs.h <<_ACEOF
15334 #define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
15336 ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
15338 if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
15344 cat >>confdefs.h <<_ACEOF
15345 #define HAVE_DECL_RTLD_NOW $ac_have_decl
15349 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
15350 #include <netinet/in.h>
15352 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
15354 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
15359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
15360 $as_echo_n "checking for PS_STRINGS... " >&6; }
15361 if ${pgac_cv_var_PS_STRINGS+:} false; then :
15362 $as_echo_n "(cached) " >&6
15364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15365 /* end confdefs.h. */
15366 #include <machine/vmparam.h>
15367 #include <sys/exec.h>
15372 PS_STRINGS->ps_nargvstr = 1;
15373 PS_STRINGS->ps_argvstr = "foo";
15378 if ac_fn_c_try_link "$LINENO"; then :
15379 pgac_cv_var_PS_STRINGS=yes
15381 pgac_cv_var_PS_STRINGS=no
15383 rm -f core conftest.err conftest.$ac_objext \
15384 conftest$ac_exeext conftest.$ac_ext
15386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
15387 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
15388 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
15390 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
15395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
15396 $as_echo_n "checking for isinf... " >&6; }
15397 if ${ac_cv_func_isinf+:} false; then :
15398 $as_echo_n "(cached) " >&6
15400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15401 /* end confdefs.h. */
15404 double glob_double;
15409 return isinf(glob_double) ? 0 : 1;
15414 if ac_fn_c_try_link "$LINENO"; then :
15415 ac_cv_func_isinf=yes
15417 ac_cv_func_isinf=no
15419 rm -f core conftest.err conftest.$ac_objext \
15420 conftest$ac_exeext conftest.$ac_ext
15422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
15423 $as_echo "$ac_cv_func_isinf" >&6; }
15425 if test $ac_cv_func_isinf = yes ; then
15427 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
15430 case " $LIBOBJS " in
15431 *" isinf.$ac_objext "* ) ;;
15432 *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
15436 # Look for a way to implement a substitute for isinf()
15437 for ac_func in fpclass fp_class fp_class_d class
15439 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15440 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15441 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15442 cat >>confdefs.h <<_ACEOF
15443 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15451 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
15452 if test "x$ac_cv_func_crypt" = xyes; then :
15453 $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
15456 case " $LIBOBJS " in
15457 *" crypt.$ac_objext "* ) ;;
15458 *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
15464 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
15465 if test "x$ac_cv_func_dlopen" = xyes; then :
15466 $as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
15469 case " $LIBOBJS " in
15470 *" dlopen.$ac_objext "* ) ;;
15471 *) LIBOBJS="$LIBOBJS dlopen.$ac_objext"
15477 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
15478 if test "x$ac_cv_func_fls" = xyes; then :
15479 $as_echo "#define HAVE_FLS 1" >>confdefs.h
15482 case " $LIBOBJS " in
15483 *" fls.$ac_objext "* ) ;;
15484 *) LIBOBJS="$LIBOBJS fls.$ac_objext"
15490 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
15491 if test "x$ac_cv_func_getopt" = xyes; then :
15492 $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
15495 case " $LIBOBJS " in
15496 *" getopt.$ac_objext "* ) ;;
15497 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15503 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
15504 if test "x$ac_cv_func_getrusage" = xyes; then :
15505 $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
15508 case " $LIBOBJS " in
15509 *" getrusage.$ac_objext "* ) ;;
15510 *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
15516 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
15517 if test "x$ac_cv_func_inet_aton" = xyes; then :
15518 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
15521 case " $LIBOBJS " in
15522 *" inet_aton.$ac_objext "* ) ;;
15523 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
15529 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
15530 if test "x$ac_cv_func_mkdtemp" = xyes; then :
15531 $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
15534 case " $LIBOBJS " in
15535 *" mkdtemp.$ac_objext "* ) ;;
15536 *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
15542 ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread"
15543 if test "x$ac_cv_func_pread" = xyes; then :
15544 $as_echo "#define HAVE_PREAD 1" >>confdefs.h
15547 case " $LIBOBJS " in
15548 *" pread.$ac_objext "* ) ;;
15549 *) LIBOBJS="$LIBOBJS pread.$ac_objext"
15555 ac_fn_c_check_func "$LINENO" "pwrite" "ac_cv_func_pwrite"
15556 if test "x$ac_cv_func_pwrite" = xyes; then :
15557 $as_echo "#define HAVE_PWRITE 1" >>confdefs.h
15560 case " $LIBOBJS " in
15561 *" pwrite.$ac_objext "* ) ;;
15562 *) LIBOBJS="$LIBOBJS pwrite.$ac_objext"
15568 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
15569 if test "x$ac_cv_func_random" = xyes; then :
15570 $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
15573 case " $LIBOBJS " in
15574 *" random.$ac_objext "* ) ;;
15575 *) LIBOBJS="$LIBOBJS random.$ac_objext"
15581 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
15582 if test "x$ac_cv_func_rint" = xyes; then :
15583 $as_echo "#define HAVE_RINT 1" >>confdefs.h
15586 case " $LIBOBJS " in
15587 *" rint.$ac_objext "* ) ;;
15588 *) LIBOBJS="$LIBOBJS rint.$ac_objext"
15594 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
15595 if test "x$ac_cv_func_srandom" = xyes; then :
15596 $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
15599 case " $LIBOBJS " in
15600 *" srandom.$ac_objext "* ) ;;
15601 *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
15607 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
15608 if test "x$ac_cv_func_strlcat" = xyes; then :
15609 $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
15612 case " $LIBOBJS " in
15613 *" strlcat.$ac_objext "* ) ;;
15614 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
15620 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
15621 if test "x$ac_cv_func_strlcpy" = xyes; then :
15622 $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
15625 case " $LIBOBJS " in
15626 *" strlcpy.$ac_objext "* ) ;;
15627 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
15633 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
15634 if test "x$ac_cv_func_strnlen" = xyes; then :
15635 $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
15638 case " $LIBOBJS " in
15639 *" strnlen.$ac_objext "* ) ;;
15640 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
15650 # Windows uses a specialised env handler
15651 # and doesn't need a replacement getpeereid because it doesn't use
15655 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15658 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15660 ac_cv_func_unsetenv=yes
15661 ac_cv_func_getpeereid=yes;;
15663 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
15664 if test "x$ac_cv_func_unsetenv" = xyes; then :
15665 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
15668 case " $LIBOBJS " in
15669 *" unsetenv.$ac_objext "* ) ;;
15670 *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
15676 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
15677 if test "x$ac_cv_func_getpeereid" = xyes; then :
15678 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
15681 case " $LIBOBJS " in
15682 *" getpeereid.$ac_objext "* ) ;;
15683 *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
15693 # System's version of getaddrinfo(), if any, may be used only if we found
15694 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
15695 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
15696 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
15697 test "$PORTNAME" != "win32"; then
15698 ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
15699 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
15700 $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
15703 case " $LIBOBJS " in
15704 *" getaddrinfo.$ac_objext "* ) ;;
15705 *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
15713 case " $LIBOBJS " in
15714 *" getaddrinfo.$ac_objext "* ) ;;
15715 *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
15721 # Similarly, use system's getopt_long() only if system provides struct option.
15722 if test x"$ac_cv_type_struct_option" = xyes ; then
15723 ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
15724 if test "x$ac_cv_func_getopt_long" = xyes; then :
15725 $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
15728 case " $LIBOBJS " in
15729 *" getopt_long.$ac_objext "* ) ;;
15730 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15738 case " $LIBOBJS " in
15739 *" getopt_long.$ac_objext "* ) ;;
15740 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15746 # Solaris' getopt() doesn't do what we want for long options, so always use
15747 # our version on that platform.
15748 if test "$PORTNAME" = "solaris"; then
15749 case " $LIBOBJS " in
15750 *" getopt.$ac_objext "* ) ;;
15751 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15757 # mingw has adopted a GNU-centric interpretation of optind/optreset,
15758 # so always use our version on Windows.
15759 if test "$PORTNAME" = "win32"; then
15760 case " $LIBOBJS " in
15761 *" getopt.$ac_objext "* ) ;;
15762 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
15766 case " $LIBOBJS " in
15767 *" getopt_long.$ac_objext "* ) ;;
15768 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
15774 # Win32 (really MinGW) support
15775 if test "$PORTNAME" = "win32"; then
15776 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
15777 if test "x$ac_cv_func_gettimeofday" = xyes; then :
15778 $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
15781 case " $LIBOBJS " in
15782 *" gettimeofday.$ac_objext "* ) ;;
15783 *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
15790 case " $LIBOBJS " in
15791 *" dirmod.$ac_objext "* ) ;;
15792 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
15796 case " $LIBOBJS " in
15797 *" kill.$ac_objext "* ) ;;
15798 *) LIBOBJS="$LIBOBJS kill.$ac_objext"
15802 case " $LIBOBJS " in
15803 *" open.$ac_objext "* ) ;;
15804 *) LIBOBJS="$LIBOBJS open.$ac_objext"
15808 case " $LIBOBJS " in
15809 *" system.$ac_objext "* ) ;;
15810 *) LIBOBJS="$LIBOBJS system.$ac_objext"
15814 case " $LIBOBJS " in
15815 *" win32env.$ac_objext "* ) ;;
15816 *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
15820 case " $LIBOBJS " in
15821 *" win32error.$ac_objext "* ) ;;
15822 *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
15826 case " $LIBOBJS " in
15827 *" win32security.$ac_objext "* ) ;;
15828 *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
15832 case " $LIBOBJS " in
15833 *" win32setlocale.$ac_objext "* ) ;;
15834 *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
15839 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
15841 ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
15842 #define WIN32_LEAN_AND_MEAN
15843 #include <windows.h>
15844 #include <string.h>
15845 #include <dbghelp.h>
15847 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
15849 cat >>confdefs.h <<_ACEOF
15850 #define HAVE_MINIDUMP_TYPE 1
15853 pgac_minidump_type=yes
15855 pgac_minidump_type=no
15859 if test x"$pgac_minidump_type" = x"yes" ; then
15860 have_win32_dbghelp=yes
15863 have_win32_dbghelp=no
15867 # Cygwin needs only a bit of that
15868 if test "$PORTNAME" = "cygwin"; then
15869 case " $LIBOBJS " in
15870 *" dirmod.$ac_objext "* ) ;;
15871 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
15877 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
15878 /* NetBSD declares sys_siglist in unistd.h. */
15879 #ifdef HAVE_UNISTD_H
15880 # include <unistd.h>
15884 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
15890 cat >>confdefs.h <<_ACEOF
15891 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
15895 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
15896 if test "x$ac_cv_func_syslog" = xyes; then :
15897 ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
15898 if test "x$ac_cv_header_syslog_h" = xyes; then :
15900 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
15908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
15909 $as_echo_n "checking for opterr... " >&6; }
15910 if ${pgac_cv_var_int_opterr+:} false; then :
15911 $as_echo_n "(cached) " >&6
15913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15914 /* end confdefs.h. */
15915 #include <unistd.h>
15919 extern int opterr; opterr = 1;
15924 if ac_fn_c_try_link "$LINENO"; then :
15925 pgac_cv_var_int_opterr=yes
15927 pgac_cv_var_int_opterr=no
15929 rm -f core conftest.err conftest.$ac_objext \
15930 conftest$ac_exeext conftest.$ac_ext
15932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
15933 $as_echo "$pgac_cv_var_int_opterr" >&6; }
15934 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
15936 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
15940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
15941 $as_echo_n "checking for optreset... " >&6; }
15942 if ${pgac_cv_var_int_optreset+:} false; then :
15943 $as_echo_n "(cached) " >&6
15945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15946 /* end confdefs.h. */
15947 #include <unistd.h>
15951 extern int optreset; optreset = 1;
15956 if ac_fn_c_try_link "$LINENO"; then :
15957 pgac_cv_var_int_optreset=yes
15959 pgac_cv_var_int_optreset=no
15961 rm -f core conftest.err conftest.$ac_objext \
15962 conftest$ac_exeext conftest.$ac_ext
15964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
15965 $as_echo "$pgac_cv_var_int_optreset" >&6; }
15966 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
15968 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
15972 for ac_func in strtoll __strtoll strtoq
15974 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15975 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15976 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15977 cat >>confdefs.h <<_ACEOF
15978 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15984 for ac_func in strtoull __strtoull strtouq
15986 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15987 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15988 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15989 cat >>confdefs.h <<_ACEOF
15990 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15996 # strto[u]ll may exist but not be declared
15997 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
15998 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
16004 cat >>confdefs.h <<_ACEOF
16005 #define HAVE_DECL_STRTOLL $ac_have_decl
16007 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
16008 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
16014 cat >>confdefs.h <<_ACEOF
16015 #define HAVE_DECL_STRTOULL $ac_have_decl
16019 if test "$with_icu" = yes; then
16020 ac_save_CPPFLAGS=$CPPFLAGS
16021 CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16023 # Verify we have ICU's header files
16024 ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16025 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16028 as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16033 CPPFLAGS=$ac_save_CPPFLAGS
16036 # Lastly, restore full LIBS list and check for readline/libedit symbols
16037 LIBS="$LIBS_including_readline"
16039 if test "$with_readline" = yes; then
16040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
16041 $as_echo_n "checking for rl_completion_append_character... " >&6; }
16042 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
16043 $as_echo_n "(cached) " >&6
16045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16046 /* end confdefs.h. */
16048 #ifdef HAVE_READLINE_READLINE_H
16049 # include <readline/readline.h>
16050 #elif defined(HAVE_READLINE_H)
16051 # include <readline.h>
16057 rl_completion_append_character = 'x';
16062 if ac_fn_c_try_link "$LINENO"; then :
16063 pgac_cv_var_rl_completion_append_character=yes
16065 pgac_cv_var_rl_completion_append_character=no
16067 rm -f core conftest.err conftest.$ac_objext \
16068 conftest$ac_exeext conftest.$ac_ext
16070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
16071 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
16072 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
16074 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
16077 for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
16079 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16080 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16081 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16082 cat >>confdefs.h <<_ACEOF
16083 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16089 for ac_func in append_history history_truncate_file
16091 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16092 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16093 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16094 cat >>confdefs.h <<_ACEOF
16095 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16104 # This test makes sure that run tests work at all. Sometimes a shared
16105 # library is found by the linker, but the runtime linker can't find it.
16106 # This check should come after all modifications of compiler or linker
16107 # variables, and before any other run tests.
16108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16109 $as_echo_n "checking test program... " >&6; }
16110 if test "$cross_compiling" = yes; then :
16111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16112 $as_echo "cross-compiling" >&6; }
16114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16115 /* end confdefs.h. */
16116 int main() { return 0; }
16118 if ac_fn_c_try_run "$LINENO"; then :
16119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16120 $as_echo "ok" >&6; }
16122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16123 $as_echo "failed" >&6; }
16125 Could not execute a simple test program. This may be a problem
16126 related to locating shared libraries. Check the file 'config.log'
16127 for the exact reason." "$LINENO" 5
16129 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16130 conftest.$ac_objext conftest.beam conftest.$ac_ext
16134 # --------------------
16135 # Run tests below here
16136 # --------------------
16139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16140 $as_echo_n "checking whether long int is 64 bits... " >&6; }
16141 if ${pgac_cv_type_long_int_64+:} false; then :
16142 $as_echo_n "(cached) " >&6
16144 if test "$cross_compiling" = yes; then :
16145 # If cross-compiling, check the size reported by the compiler and
16146 # trust that the arithmetic works.
16147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16148 /* end confdefs.h. */
16153 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16154 test_array [0] = 0;
16155 return test_array [0];
16161 if ac_fn_c_try_compile "$LINENO"; then :
16162 pgac_cv_type_long_int_64=yes
16164 pgac_cv_type_long_int_64=no
16166 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16169 /* end confdefs.h. */
16170 typedef long int ac_int64;
16173 * These are globals to discourage the compiler from folding all the
16174 * arithmetic tests down to compile-time constants.
16176 ac_int64 a = 20000001;
16177 ac_int64 b = 40000005;
16179 int does_int64_work()
16183 if (sizeof(ac_int64) != 8)
16184 return 0; /* definitely not the right size */
16186 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16196 return (! does_int64_work());
16199 if ac_fn_c_try_run "$LINENO"; then :
16200 pgac_cv_type_long_int_64=yes
16202 pgac_cv_type_long_int_64=no
16204 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16205 conftest.$ac_objext conftest.beam conftest.$ac_ext
16209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
16210 $as_echo "$pgac_cv_type_long_int_64" >&6; }
16212 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
16213 if test x"$pgac_cv_type_long_int_64" = xyes ; then
16215 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
16220 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
16221 pg_int64_type="long int"
16223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
16224 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
16225 if ${pgac_cv_type_long_long_int_64+:} false; then :
16226 $as_echo_n "(cached) " >&6
16228 if test "$cross_compiling" = yes; then :
16229 # If cross-compiling, check the size reported by the compiler and
16230 # trust that the arithmetic works.
16231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16232 /* end confdefs.h. */
16237 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
16238 test_array [0] = 0;
16239 return test_array [0];
16245 if ac_fn_c_try_compile "$LINENO"; then :
16246 pgac_cv_type_long_long_int_64=yes
16248 pgac_cv_type_long_long_int_64=no
16250 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16253 /* end confdefs.h. */
16254 typedef long long int ac_int64;
16257 * These are globals to discourage the compiler from folding all the
16258 * arithmetic tests down to compile-time constants.
16260 ac_int64 a = 20000001;
16261 ac_int64 b = 40000005;
16263 int does_int64_work()
16267 if (sizeof(ac_int64) != 8)
16268 return 0; /* definitely not the right size */
16270 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16280 return (! does_int64_work());
16283 if ac_fn_c_try_run "$LINENO"; then :
16284 pgac_cv_type_long_long_int_64=yes
16286 pgac_cv_type_long_long_int_64=no
16288 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16289 conftest.$ac_objext conftest.beam conftest.$ac_ext
16293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
16294 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
16296 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
16297 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
16299 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
16303 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16304 pg_int64_type="long long int"
16306 as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
16311 cat >>confdefs.h <<_ACEOF
16312 #define PG_INT64_TYPE $pg_int64_type
16316 # Select the printf length modifier that goes with that, too.
16317 if test x"$pg_int64_type" = x"long long int" ; then
16318 INT64_MODIFIER='"ll"'
16320 INT64_MODIFIER='"l"'
16324 cat >>confdefs.h <<_ACEOF
16325 #define INT64_MODIFIER $INT64_MODIFIER
16329 # has to be down here, rather than with the other builtins, because
16330 # the test uses PG_INT64_TYPE.
16331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
16332 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
16333 if ${pgac_cv__builtin_op_overflow+:} false; then :
16334 $as_echo_n "(cached) " >&6
16336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16337 /* end confdefs.h. */
16339 PG_INT64_TYPE a = 1;
16340 PG_INT64_TYPE b = 1;
16341 PG_INT64_TYPE result;
16347 oflo = __builtin_mul_overflow(a, b, &result);
16352 if ac_fn_c_try_link "$LINENO"; then :
16353 pgac_cv__builtin_op_overflow=yes
16355 pgac_cv__builtin_op_overflow=no
16357 rm -f core conftest.err conftest.$ac_objext \
16358 conftest$ac_exeext conftest.$ac_ext
16360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
16361 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
16362 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
16364 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
16368 # Check size of void *, size_t (enables tweaks for > 32bit address space)
16369 # The cast to long int works around a bug in the HP C Compiler
16370 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16371 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16372 # This bug is HP SR number 8606223364.
16373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
16374 $as_echo_n "checking size of void *... " >&6; }
16375 if ${ac_cv_sizeof_void_p+:} false; then :
16376 $as_echo_n "(cached) " >&6
16378 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
16381 if test "$ac_cv_type_void_p" = yes; then
16382 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16383 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16384 as_fn_error 77 "cannot compute sizeof (void *)
16385 See \`config.log' for more details" "$LINENO" 5; }
16387 ac_cv_sizeof_void_p=0
16392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
16393 $as_echo "$ac_cv_sizeof_void_p" >&6; }
16397 cat >>confdefs.h <<_ACEOF
16398 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
16402 # The cast to long int works around a bug in the HP C Compiler
16403 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16404 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16405 # This bug is HP SR number 8606223364.
16406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
16407 $as_echo_n "checking size of size_t... " >&6; }
16408 if ${ac_cv_sizeof_size_t+:} false; then :
16409 $as_echo_n "(cached) " >&6
16411 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
16414 if test "$ac_cv_type_size_t" = yes; then
16415 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16416 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16417 as_fn_error 77 "cannot compute sizeof (size_t)
16418 See \`config.log' for more details" "$LINENO" 5; }
16420 ac_cv_sizeof_size_t=0
16425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
16426 $as_echo "$ac_cv_sizeof_size_t" >&6; }
16430 cat >>confdefs.h <<_ACEOF
16431 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
16435 # The cast to long int works around a bug in the HP C Compiler
16436 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16437 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16438 # This bug is HP SR number 8606223364.
16439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
16440 $as_echo_n "checking size of long... " >&6; }
16441 if ${ac_cv_sizeof_long+:} false; then :
16442 $as_echo_n "(cached) " >&6
16444 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
16447 if test "$ac_cv_type_long" = yes; then
16448 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16449 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16450 as_fn_error 77 "cannot compute sizeof (long)
16451 See \`config.log' for more details" "$LINENO" 5; }
16453 ac_cv_sizeof_long=0
16458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
16459 $as_echo "$ac_cv_sizeof_long" >&6; }
16463 cat >>confdefs.h <<_ACEOF
16464 #define SIZEOF_LONG $ac_cv_sizeof_long
16469 # Decide whether float4 is passed by value: user-selectable, enabled by default
16470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
16471 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
16474 # Check whether --enable-float4-byval was given.
16475 if test "${enable_float4_byval+set}" = set; then :
16476 enableval=$enable_float4_byval;
16480 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16482 float4passbyval=true
16485 float4passbyval=false
16488 as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
16493 enable_float4_byval=yes
16495 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
16497 float4passbyval=true
16501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
16502 $as_echo "$enable_float4_byval" >&6; }
16504 cat >>confdefs.h <<_ACEOF
16505 #define FLOAT4PASSBYVAL $float4passbyval
16509 # Decide whether float8 is passed by value.
16510 # Note: this setting also controls int8 and related types such as timestamp.
16511 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
16512 # If not, trying to select it is an error.
16513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
16514 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
16515 if test $ac_cv_sizeof_void_p -ge 8 ; then
16518 # Check whether --enable-float8-byval was given.
16519 if test "${enable_float8_byval+set}" = set; then :
16520 enableval=$enable_float8_byval;
16529 as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16534 enable_float8_byval=yes
16542 # Check whether --enable-float8-byval was given.
16543 if test "${enable_float8_byval+set}" = set; then :
16544 enableval=$enable_float8_byval;
16553 as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
16558 enable_float8_byval=no
16563 if test "$enable_float8_byval" = yes ; then
16564 as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
16567 if test "$enable_float8_byval" = yes ; then
16569 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
16571 float8passbyval=true
16573 float8passbyval=false
16575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
16576 $as_echo "$enable_float8_byval" >&6; }
16578 cat >>confdefs.h <<_ACEOF
16579 #define FLOAT8PASSBYVAL $float8passbyval
16583 # Determine memory alignment requirements for the basic C data types.
16585 # The cast to long int works around a bug in the HP C Compiler,
16586 # see AC_CHECK_SIZEOF for more information.
16587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
16588 $as_echo_n "checking alignment of short... " >&6; }
16589 if ${ac_cv_alignof_short+:} false; then :
16590 $as_echo_n "(cached) " >&6
16592 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short" "$ac_includes_default
16594 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16596 typedef struct { char x; short y; } ac__type_alignof_;"; then :
16599 if test "$ac_cv_type_short" = yes; then
16600 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16601 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16602 as_fn_error 77 "cannot compute alignment of short
16603 See \`config.log' for more details" "$LINENO" 5; }
16605 ac_cv_alignof_short=0
16610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
16611 $as_echo "$ac_cv_alignof_short" >&6; }
16615 cat >>confdefs.h <<_ACEOF
16616 #define ALIGNOF_SHORT $ac_cv_alignof_short
16620 # The cast to long int works around a bug in the HP C Compiler,
16621 # see AC_CHECK_SIZEOF for more information.
16622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
16623 $as_echo_n "checking alignment of int... " >&6; }
16624 if ${ac_cv_alignof_int+:} false; then :
16625 $as_echo_n "(cached) " >&6
16627 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int" "$ac_includes_default
16629 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16631 typedef struct { char x; int y; } ac__type_alignof_;"; then :
16634 if test "$ac_cv_type_int" = yes; then
16635 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16636 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16637 as_fn_error 77 "cannot compute alignment of int
16638 See \`config.log' for more details" "$LINENO" 5; }
16640 ac_cv_alignof_int=0
16645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
16646 $as_echo "$ac_cv_alignof_int" >&6; }
16650 cat >>confdefs.h <<_ACEOF
16651 #define ALIGNOF_INT $ac_cv_alignof_int
16655 # The cast to long int works around a bug in the HP C Compiler,
16656 # see AC_CHECK_SIZEOF for more information.
16657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
16658 $as_echo_n "checking alignment of long... " >&6; }
16659 if ${ac_cv_alignof_long+:} false; then :
16660 $as_echo_n "(cached) " >&6
16662 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
16664 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16666 typedef struct { char x; long y; } ac__type_alignof_;"; then :
16669 if test "$ac_cv_type_long" = yes; then
16670 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16671 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16672 as_fn_error 77 "cannot compute alignment of long
16673 See \`config.log' for more details" "$LINENO" 5; }
16675 ac_cv_alignof_long=0
16680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
16681 $as_echo "$ac_cv_alignof_long" >&6; }
16685 cat >>confdefs.h <<_ACEOF
16686 #define ALIGNOF_LONG $ac_cv_alignof_long
16690 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
16691 # The cast to long int works around a bug in the HP C Compiler,
16692 # see AC_CHECK_SIZEOF for more information.
16693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
16694 $as_echo_n "checking alignment of long long int... " >&6; }
16695 if ${ac_cv_alignof_long_long_int+:} false; then :
16696 $as_echo_n "(cached) " >&6
16698 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int" "$ac_includes_default
16700 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16702 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
16705 if test "$ac_cv_type_long_long_int" = yes; then
16706 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16707 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16708 as_fn_error 77 "cannot compute alignment of long long int
16709 See \`config.log' for more details" "$LINENO" 5; }
16711 ac_cv_alignof_long_long_int=0
16716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
16717 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
16721 cat >>confdefs.h <<_ACEOF
16722 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
16727 # The cast to long int works around a bug in the HP C Compiler,
16728 # see AC_CHECK_SIZEOF for more information.
16729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
16730 $as_echo_n "checking alignment of double... " >&6; }
16731 if ${ac_cv_alignof_double+:} false; then :
16732 $as_echo_n "(cached) " >&6
16734 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double" "$ac_includes_default
16736 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16738 typedef struct { char x; double y; } ac__type_alignof_;"; then :
16741 if test "$ac_cv_type_double" = yes; then
16742 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16743 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16744 as_fn_error 77 "cannot compute alignment of double
16745 See \`config.log' for more details" "$LINENO" 5; }
16747 ac_cv_alignof_double=0
16752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
16753 $as_echo "$ac_cv_alignof_double" >&6; }
16757 cat >>confdefs.h <<_ACEOF
16758 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
16763 # Compute maximum alignment of any basic type.
16764 # We assume long's alignment is at least as strong as char, short, or int;
16765 # but we must check long long (if it is being used for int64) and double.
16766 # Note that we intentionally do not consider any types wider than 64 bits,
16767 # as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
16768 # for disk and memory space.
16770 MAX_ALIGNOF=$ac_cv_alignof_long
16771 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
16772 MAX_ALIGNOF=$ac_cv_alignof_double
16774 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
16775 MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
16778 cat >>confdefs.h <<_ACEOF
16779 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
16784 # Some platforms predefine the types int8, int16, etc. Only check
16785 # a (hopefully) representative subset.
16786 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
16788 if test "x$ac_cv_type_int8" = xyes; then :
16790 cat >>confdefs.h <<_ACEOF
16791 #define HAVE_INT8 1
16796 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
16798 if test "x$ac_cv_type_uint8" = xyes; then :
16800 cat >>confdefs.h <<_ACEOF
16801 #define HAVE_UINT8 1
16806 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
16808 if test "x$ac_cv_type_int64" = xyes; then :
16810 cat >>confdefs.h <<_ACEOF
16811 #define HAVE_INT64 1
16816 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
16818 if test "x$ac_cv_type_uint64" = xyes; then :
16820 cat >>confdefs.h <<_ACEOF
16821 #define HAVE_UINT64 1
16828 # Some compilers offer a 128-bit integer scalar type.
16829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
16830 $as_echo_n "checking for __int128... " >&6; }
16831 if ${pgac_cv__128bit_int+:} false; then :
16832 $as_echo_n "(cached) " >&6
16834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16835 /* end confdefs.h. */
16838 * We don't actually run this test, just link it to verify that any support
16839 * functions needed for __int128 are present.
16841 * These are globals to discourage the compiler from folding all the
16842 * arithmetic tests down to compile-time constants. We do not have
16843 * convenient support for 128bit literals at this point...
16845 __int128 a = 48828125;
16846 __int128 b = 97656250;
16853 a = (a << 12) + 1; /* 200000000001 */
16854 b = (b << 12) + 5; /* 400000000005 */
16855 /* try the most relevant arithmetic ops */
16858 /* must use the results, else compiler may optimize arithmetic away */
16866 if ac_fn_c_try_link "$LINENO"; then :
16867 pgac_cv__128bit_int=yes
16869 pgac_cv__128bit_int=no
16871 rm -f core conftest.err conftest.$ac_objext \
16872 conftest$ac_exeext conftest.$ac_ext
16874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
16875 $as_echo "$pgac_cv__128bit_int" >&6; }
16876 if test x"$pgac_cv__128bit_int" = xyes ; then
16877 # Use of non-default alignment with __int128 tickles bugs in some compilers.
16878 # If not cross-compiling, we can test for bugs and disable use of __int128
16879 # with buggy compilers. If cross-compiling, hope for the best.
16880 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
16881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
16882 $as_echo_n "checking for __int128 alignment bug... " >&6; }
16883 if ${pgac_cv__128bit_int_bug+:} false; then :
16884 $as_echo_n "(cached) " >&6
16886 if test "$cross_compiling" = yes; then :
16887 pgac_cv__128bit_int_bug="assuming ok"
16889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16890 /* end confdefs.h. */
16892 /* This must match the corresponding code in c.h: */
16893 #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
16894 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
16896 typedef __int128 int128a
16897 #if defined(pg_attribute_aligned)
16898 pg_attribute_aligned(8)
16902 void pass_by_val(void *buffer, int128a par) { holder = par; }
16908 long int i64 = 97656225L << 12;
16910 pass_by_val(main, (int128a) i64);
16919 if ac_fn_c_try_run "$LINENO"; then :
16920 pgac_cv__128bit_int_bug=ok
16922 pgac_cv__128bit_int_bug=broken
16924 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16925 conftest.$ac_objext conftest.beam conftest.$ac_ext
16929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
16930 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
16931 if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
16933 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
16935 # The cast to long int works around a bug in the HP C Compiler,
16936 # see AC_CHECK_SIZEOF for more information.
16937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
16938 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
16939 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
16940 $as_echo_n "(cached) " >&6
16942 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE" "$ac_includes_default
16944 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
16946 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
16949 if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
16950 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16951 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16952 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
16953 See \`config.log' for more details" "$LINENO" 5; }
16955 ac_cv_alignof_PG_INT128_TYPE=0
16960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
16961 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
16965 cat >>confdefs.h <<_ACEOF
16966 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
16973 # Check for various atomic operations now that we have checked how to declare
16975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
16976 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
16977 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
16978 $as_echo_n "(cached) " >&6
16980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16981 /* end confdefs.h. */
16987 __sync_lock_test_and_set(&lock, 1);
16988 __sync_lock_release(&lock);
16993 if ac_fn_c_try_link "$LINENO"; then :
16994 pgac_cv_gcc_sync_char_tas="yes"
16996 pgac_cv_gcc_sync_char_tas="no"
16998 rm -f core conftest.err conftest.$ac_objext \
16999 conftest$ac_exeext conftest.$ac_ext
17001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
17002 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
17003 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
17005 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
17008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
17009 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
17010 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
17011 $as_echo_n "(cached) " >&6
17013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17014 /* end confdefs.h. */
17020 __sync_lock_test_and_set(&lock, 1);
17021 __sync_lock_release(&lock);
17026 if ac_fn_c_try_link "$LINENO"; then :
17027 pgac_cv_gcc_sync_int32_tas="yes"
17029 pgac_cv_gcc_sync_int32_tas="no"
17031 rm -f core conftest.err conftest.$ac_objext \
17032 conftest$ac_exeext conftest.$ac_ext
17034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
17035 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
17036 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
17038 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
17041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17042 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17043 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17044 $as_echo_n "(cached) " >&6
17046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17047 /* end confdefs.h. */
17053 __sync_val_compare_and_swap(&val, 0, 37);
17058 if ac_fn_c_try_link "$LINENO"; then :
17059 pgac_cv_gcc_sync_int32_cas="yes"
17061 pgac_cv_gcc_sync_int32_cas="no"
17063 rm -f core conftest.err conftest.$ac_objext \
17064 conftest$ac_exeext conftest.$ac_ext
17066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17067 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17068 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17070 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17074 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17075 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17076 $as_echo_n "(cached) " >&6
17078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17079 /* end confdefs.h. */
17084 PG_INT64_TYPE lock = 0;
17085 __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17090 if ac_fn_c_try_link "$LINENO"; then :
17091 pgac_cv_gcc_sync_int64_cas="yes"
17093 pgac_cv_gcc_sync_int64_cas="no"
17095 rm -f core conftest.err conftest.$ac_objext \
17096 conftest$ac_exeext conftest.$ac_ext
17098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17099 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17100 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17102 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17106 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17107 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17108 $as_echo_n "(cached) " >&6
17110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17111 /* end confdefs.h. */
17118 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17123 if ac_fn_c_try_link "$LINENO"; then :
17124 pgac_cv_gcc_atomic_int32_cas="yes"
17126 pgac_cv_gcc_atomic_int32_cas="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_gcc_atomic_int32_cas" >&5
17132 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17133 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17135 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17139 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17140 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17141 $as_echo_n "(cached) " >&6
17143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17144 /* end confdefs.h. */
17149 PG_INT64_TYPE val = 0;
17150 PG_INT64_TYPE expect = 0;
17151 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17156 if ac_fn_c_try_link "$LINENO"; then :
17157 pgac_cv_gcc_atomic_int64_cas="yes"
17159 pgac_cv_gcc_atomic_int64_cas="no"
17161 rm -f core conftest.err conftest.$ac_objext \
17162 conftest$ac_exeext conftest.$ac_ext
17164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17165 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17166 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17168 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17173 # Check for x86 cpuid instruction
17174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17175 $as_echo_n "checking for __get_cpuid... " >&6; }
17176 if ${pgac_cv__get_cpuid+:} false; then :
17177 $as_echo_n "(cached) " >&6
17179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17180 /* end confdefs.h. */
17185 unsigned int exx[4] = {0, 0, 0, 0};
17186 __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17192 if ac_fn_c_try_link "$LINENO"; then :
17193 pgac_cv__get_cpuid="yes"
17195 pgac_cv__get_cpuid="no"
17197 rm -f core conftest.err conftest.$ac_objext \
17198 conftest$ac_exeext conftest.$ac_ext
17200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17201 $as_echo "$pgac_cv__get_cpuid" >&6; }
17202 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17204 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17209 $as_echo_n "checking for __cpuid... " >&6; }
17210 if ${pgac_cv__cpuid+:} false; then :
17211 $as_echo_n "(cached) " >&6
17213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17214 /* end confdefs.h. */
17215 #include <intrin.h>
17219 unsigned int exx[4] = {0, 0, 0, 0};
17220 __get_cpuid(exx[0], 1);
17226 if ac_fn_c_try_link "$LINENO"; then :
17227 pgac_cv__cpuid="yes"
17229 pgac_cv__cpuid="no"
17231 rm -f core conftest.err conftest.$ac_objext \
17232 conftest$ac_exeext conftest.$ac_ext
17234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17235 $as_echo "$pgac_cv__cpuid" >&6; }
17236 if test x"$pgac_cv__cpuid" = x"yes"; then
17238 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17242 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17244 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17245 # with the default compiler flags. If not, check if adding the -msse4.2
17246 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
17247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17248 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17249 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17250 $as_echo_n "(cached) " >&6
17252 pgac_save_CFLAGS=$CFLAGS
17253 CFLAGS="$pgac_save_CFLAGS "
17254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17255 /* end confdefs.h. */
17256 #include <nmmintrin.h>
17260 unsigned int crc = 0;
17261 crc = _mm_crc32_u8(crc, 0);
17262 crc = _mm_crc32_u32(crc, 0);
17263 /* return computed value, to prevent the above being optimized away */
17269 if ac_fn_c_try_link "$LINENO"; then :
17270 pgac_cv_sse42_crc32_intrinsics_=yes
17272 pgac_cv_sse42_crc32_intrinsics_=no
17274 rm -f core conftest.err conftest.$ac_objext \
17275 conftest$ac_exeext conftest.$ac_ext
17276 CFLAGS="$pgac_save_CFLAGS"
17278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
17279 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
17280 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
17282 pgac_sse42_crc32_intrinsics=yes
17285 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
17286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
17287 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
17288 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
17289 $as_echo_n "(cached) " >&6
17291 pgac_save_CFLAGS=$CFLAGS
17292 CFLAGS="$pgac_save_CFLAGS -msse4.2"
17293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17294 /* end confdefs.h. */
17295 #include <nmmintrin.h>
17299 unsigned int crc = 0;
17300 crc = _mm_crc32_u8(crc, 0);
17301 crc = _mm_crc32_u32(crc, 0);
17302 /* return computed value, to prevent the above being optimized away */
17308 if ac_fn_c_try_link "$LINENO"; then :
17309 pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
17311 pgac_cv_sse42_crc32_intrinsics__msse4_2=no
17313 rm -f core conftest.err conftest.$ac_objext \
17314 conftest$ac_exeext conftest.$ac_ext
17315 CFLAGS="$pgac_save_CFLAGS"
17317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
17318 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
17319 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
17320 CFLAGS_SSE42="-msse4.2"
17321 pgac_sse42_crc32_intrinsics=yes
17327 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
17328 # define __SSE4_2__ in that case.
17329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17330 /* end confdefs.h. */
17337 #error __SSE4_2__ not defined
17344 if ac_fn_c_try_compile "$LINENO"; then :
17347 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17349 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
17351 # First check if __crc32c* intrinsics can be used with the default compiler
17352 # flags. If not, check if adding -march=armv8-a+crc flag helps.
17353 # CFLAGS_ARMV8_CRC32C is set if the extra flag is required.
17354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
17355 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
17356 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
17357 $as_echo_n "(cached) " >&6
17359 pgac_save_CFLAGS=$CFLAGS
17360 CFLAGS="$pgac_save_CFLAGS "
17361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17362 /* end confdefs.h. */
17363 #include <arm_acle.h>
17367 unsigned int crc = 0;
17368 crc = __crc32cb(crc, 0);
17369 crc = __crc32ch(crc, 0);
17370 crc = __crc32cw(crc, 0);
17371 crc = __crc32cd(crc, 0);
17372 /* return computed value, to prevent the above being optimized away */
17378 if ac_fn_c_try_link "$LINENO"; then :
17379 pgac_cv_armv8_crc32c_intrinsics_=yes
17381 pgac_cv_armv8_crc32c_intrinsics_=no
17383 rm -f core conftest.err conftest.$ac_objext \
17384 conftest$ac_exeext conftest.$ac_ext
17385 CFLAGS="$pgac_save_CFLAGS"
17387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
17388 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
17389 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
17390 CFLAGS_ARMV8_CRC32C=""
17391 pgac_armv8_crc32c_intrinsics=yes
17394 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
17395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
17396 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
17397 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
17398 $as_echo_n "(cached) " >&6
17400 pgac_save_CFLAGS=$CFLAGS
17401 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
17402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17403 /* end confdefs.h. */
17404 #include <arm_acle.h>
17408 unsigned int crc = 0;
17409 crc = __crc32cb(crc, 0);
17410 crc = __crc32ch(crc, 0);
17411 crc = __crc32cw(crc, 0);
17412 crc = __crc32cd(crc, 0);
17413 /* return computed value, to prevent the above being optimized away */
17419 if ac_fn_c_try_link "$LINENO"; then :
17420 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
17422 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
17424 rm -f core conftest.err conftest.$ac_objext \
17425 conftest$ac_exeext conftest.$ac_ext
17426 CFLAGS="$pgac_save_CFLAGS"
17428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
17429 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
17430 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
17431 CFLAGS_ARMV8_CRC32C="-march=armv8-a+crc"
17432 pgac_armv8_crc32c_intrinsics=yes
17438 # Select CRC-32C implementation.
17440 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
17441 # use the special CRC instructions for calculating CRC-32C. If we're not
17442 # targeting such a processor, but we can nevertheless produce code that uses
17443 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
17444 # implementations and select which one to use at runtime, depending on whether
17445 # SSE 4.2 is supported by the processor we're running on.
17447 # Similarly, if we are targeting an ARM processor that has the CRC
17448 # instructions that are part of the ARMv8 CRC Extension, use them. And if
17449 # we're not targeting such a processor, but can nevertheless produce code that
17450 # uses the CRC instructions, compile both, and select at runtime.
17452 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
17453 # in the template or configure command line.
17454 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
17455 # Use Intel SSE 4.2 if available.
17456 if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
17459 # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
17460 # the runtime check.
17461 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
17462 USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
17464 # Use ARM CRC Extension if available.
17465 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_ARMV8_CRC32C" = x""; then
17468 # ARM CRC Extension, with runtime check?
17469 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
17470 USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
17472 # fall back to slicing-by-8 algorithm, which doesn't require any
17473 # special CPU support.
17474 USE_SLICING_BY_8_CRC32C=1
17481 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
17482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
17483 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
17484 if test x"$USE_SSE42_CRC32C" = x"1"; then
17486 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
17488 PG_CRC32C_OBJS="pg_crc32c_sse42.o"
17489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
17490 $as_echo "SSE 4.2" >&6; }
17492 if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17494 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17496 PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
17497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
17498 $as_echo "SSE 4.2 with runtime check" >&6; }
17500 if test x"$USE_ARMV8_CRC32C" = x"1"; then
17502 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
17504 PG_CRC32C_OBJS="pg_crc32c_armv8.o"
17505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
17506 $as_echo "ARMv8 CRC instructions" >&6; }
17508 if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
17510 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
17512 PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
17513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
17514 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
17517 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
17519 PG_CRC32C_OBJS="pg_crc32c_sb8.o"
17520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
17521 $as_echo "slicing-by-8" >&6; }
17529 # Select semaphore implementation type.
17530 if test "$PORTNAME" != "win32"; then
17531 if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
17532 # Need sem_open for this
17533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
17534 $as_echo_n "checking for library containing sem_open... " >&6; }
17535 if ${ac_cv_search_sem_open+:} false; then :
17536 $as_echo_n "(cached) " >&6
17538 ac_func_search_save_LIBS=$LIBS
17539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17540 /* end confdefs.h. */
17542 /* Override any GCC internal prototype to avoid an error.
17543 Use char because int might match the return type of a GCC
17544 builtin and then its argument prototype would still apply. */
17552 return sem_open ();
17557 for ac_lib in '' rt pthread; do
17558 if test -z "$ac_lib"; then
17559 ac_res="none required"
17562 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17564 if ac_fn_c_try_link "$LINENO"; then :
17565 ac_cv_search_sem_open=$ac_res
17567 rm -f core conftest.err conftest.$ac_objext \
17569 if ${ac_cv_search_sem_open+:} false; then :
17573 if ${ac_cv_search_sem_open+:} false; then :
17576 ac_cv_search_sem_open=no
17578 rm conftest.$ac_ext
17579 LIBS=$ac_func_search_save_LIBS
17581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
17582 $as_echo "$ac_cv_search_sem_open" >&6; }
17583 ac_res=$ac_cv_search_sem_open
17584 if test "$ac_res" != no; then :
17585 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17586 USE_NAMED_POSIX_SEMAPHORES=1
17590 if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
17591 # Need sem_init for this
17592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
17593 $as_echo_n "checking for library containing sem_init... " >&6; }
17594 if ${ac_cv_search_sem_init+:} false; then :
17595 $as_echo_n "(cached) " >&6
17597 ac_func_search_save_LIBS=$LIBS
17598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17599 /* end confdefs.h. */
17601 /* Override any GCC internal prototype to avoid an error.
17602 Use char because int might match the return type of a GCC
17603 builtin and then its argument prototype would still apply. */
17611 return sem_init ();
17616 for ac_lib in '' rt pthread; do
17617 if test -z "$ac_lib"; then
17618 ac_res="none required"
17621 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17623 if ac_fn_c_try_link "$LINENO"; then :
17624 ac_cv_search_sem_init=$ac_res
17626 rm -f core conftest.err conftest.$ac_objext \
17628 if ${ac_cv_search_sem_init+:} false; then :
17632 if ${ac_cv_search_sem_init+:} false; then :
17635 ac_cv_search_sem_init=no
17637 rm conftest.$ac_ext
17638 LIBS=$ac_func_search_save_LIBS
17640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
17641 $as_echo "$ac_cv_search_sem_init" >&6; }
17642 ac_res=$ac_cv_search_sem_init
17643 if test "$ac_res" != no; then :
17644 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17645 USE_UNNAMED_POSIX_SEMAPHORES=1
17649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
17650 $as_echo_n "checking which semaphore API to use... " >&6; }
17651 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
17653 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17655 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17656 sematype="named POSIX"
17658 if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
17660 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
17662 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
17663 sematype="unnamed POSIX"
17666 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
17668 SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
17669 sematype="System V"
17672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
17673 $as_echo "$sematype" >&6; }
17676 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
17678 SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
17682 # Select shared-memory implementation type.
17683 if test "$PORTNAME" != "win32"; then
17685 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
17687 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
17690 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
17692 SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
17695 # Select random number source
17697 # You can override this logic by setting the appropriate USE_*RANDOM flag to 1
17698 # in the template or configure command line.
17700 # If not selected manually, try to select a source automatically.
17701 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
17702 if test x"$with_openssl" = x"yes" ; then
17703 USE_OPENSSL_RANDOM=1
17704 elif test "$PORTNAME" = "win32" ; then
17707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
17708 $as_echo_n "checking for /dev/urandom... " >&6; }
17709 if ${ac_cv_file__dev_urandom+:} false; then :
17710 $as_echo_n "(cached) " >&6
17712 test "$cross_compiling" = yes &&
17713 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
17714 if test -r "/dev/urandom"; then
17715 ac_cv_file__dev_urandom=yes
17717 ac_cv_file__dev_urandom=no
17720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
17721 $as_echo "$ac_cv_file__dev_urandom" >&6; }
17722 if test "x$ac_cv_file__dev_urandom" = xyes; then :
17727 if test x"$ac_cv_file__dev_urandom" = x"yes" ; then
17733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
17734 $as_echo_n "checking which random number source to use... " >&6; }
17735 if test "$enable_strong_random" = yes ; then
17736 if test x"$USE_OPENSSL_RANDOM" = x"1" ; then
17738 $as_echo "#define USE_OPENSSL_RANDOM 1" >>confdefs.h
17740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
17741 $as_echo "OpenSSL" >&6; }
17742 elif test x"$USE_WIN32_RANDOM" = x"1" ; then
17744 $as_echo "#define USE_WIN32_RANDOM 1" >>confdefs.h
17746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
17747 $as_echo "Windows native" >&6; }
17748 elif test x"$USE_DEV_URANDOM" = x"1" ; then
17750 $as_echo "#define USE_DEV_URANDOM 1" >>confdefs.h
17752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
17753 $as_echo "/dev/urandom" >&6; }
17756 no source of strong random numbers was found
17757 PostgreSQL can use OpenSSL or /dev/urandom as a source of random numbers,
17758 for authentication protocols. You can use --disable-strong-random to use a
17759 built-in pseudo random number generator, but that may be insecure." "$LINENO" 5
17762 $as_echo "#define HAVE_STRONG_RANDOM 1" >>confdefs.h
17765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: weak builtin PRNG" >&5
17766 $as_echo "weak builtin PRNG" >&6; }
17767 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
17768 *** Not using a strong random number source may be insecure." >&5
17769 $as_echo "$as_me: WARNING:
17770 *** Not using a strong random number source may be insecure." >&2;}
17773 # If not set in template file, set bytes to use libc memset()
17774 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
17775 MEMSET_LOOP_LIMIT=1024
17778 cat >>confdefs.h <<_ACEOF
17779 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
17784 if test "$enable_nls" = yes ; then
17786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
17787 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
17788 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17789 $as_echo_n "(cached) " >&6
17791 ac_func_search_save_LIBS=$LIBS
17792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17793 /* end confdefs.h. */
17795 /* Override any GCC internal prototype to avoid an error.
17796 Use char because int might match the return type of a GCC
17797 builtin and then its argument prototype would still apply. */
17801 char bind_textdomain_codeset ();
17805 return bind_textdomain_codeset ();
17810 for ac_lib in '' intl; do
17811 if test -z "$ac_lib"; then
17812 ac_res="none required"
17815 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17817 if ac_fn_c_try_link "$LINENO"; then :
17818 ac_cv_search_bind_textdomain_codeset=$ac_res
17820 rm -f core conftest.err conftest.$ac_objext \
17822 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17826 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
17829 ac_cv_search_bind_textdomain_codeset=no
17831 rm conftest.$ac_ext
17832 LIBS=$ac_func_search_save_LIBS
17834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
17835 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
17836 ac_res=$ac_cv_search_bind_textdomain_codeset
17837 if test "$ac_res" != no; then :
17838 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17841 as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
17844 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
17845 if test "x$ac_cv_header_libintl_h" = xyes; then :
17848 as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
17852 if test -z "$MSGFMT"; then
17853 for ac_prog in msgfmt
17855 # Extract the first word of "$ac_prog", so it can be a program name with args.
17856 set dummy $ac_prog; ac_word=$2
17857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17858 $as_echo_n "checking for $ac_word... " >&6; }
17859 if ${ac_cv_path_MSGFMT+:} false; then :
17860 $as_echo_n "(cached) " >&6
17864 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
17867 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17868 for as_dir in $PATH
17871 test -z "$as_dir" && as_dir=.
17872 for ac_exec_ext in '' $ac_executable_extensions; do
17873 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17874 ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
17875 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17885 MSGFMT=$ac_cv_path_MSGFMT
17886 if test -n "$MSGFMT"; then
17887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
17888 $as_echo "$MSGFMT" >&6; }
17890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17891 $as_echo "no" >&6; }
17895 test -n "$MSGFMT" && break
17899 # Report the value of MSGFMT in configure's output in all cases.
17900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
17901 $as_echo_n "checking for MSGFMT... " >&6; }
17902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
17903 $as_echo "$MSGFMT" >&6; }
17906 if test -z "$MSGFMT"; then
17907 as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
17909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
17910 $as_echo_n "checking for msgfmt flags... " >&6; }
17911 if ${pgac_cv_msgfmt_flags+:} false; then :
17912 $as_echo_n "(cached) " >&6
17914 if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
17915 pgac_cv_msgfmt_flags=-c
17918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
17919 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
17920 MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
17922 if test -z "$MSGMERGE"; then
17923 for ac_prog in msgmerge
17925 # Extract the first word of "$ac_prog", so it can be a program name with args.
17926 set dummy $ac_prog; ac_word=$2
17927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17928 $as_echo_n "checking for $ac_word... " >&6; }
17929 if ${ac_cv_path_MSGMERGE+:} false; then :
17930 $as_echo_n "(cached) " >&6
17934 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
17937 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17938 for as_dir in $PATH
17941 test -z "$as_dir" && as_dir=.
17942 for ac_exec_ext in '' $ac_executable_extensions; do
17943 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17944 ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
17945 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17955 MSGMERGE=$ac_cv_path_MSGMERGE
17956 if test -n "$MSGMERGE"; then
17957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
17958 $as_echo "$MSGMERGE" >&6; }
17960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17961 $as_echo "no" >&6; }
17965 test -n "$MSGMERGE" && break
17969 # Report the value of MSGMERGE in configure's output in all cases.
17970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
17971 $as_echo_n "checking for MSGMERGE... " >&6; }
17972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
17973 $as_echo "$MSGMERGE" >&6; }
17976 if test -z "$XGETTEXT"; then
17977 for ac_prog in xgettext
17979 # Extract the first word of "$ac_prog", so it can be a program name with args.
17980 set dummy $ac_prog; ac_word=$2
17981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17982 $as_echo_n "checking for $ac_word... " >&6; }
17983 if ${ac_cv_path_XGETTEXT+:} false; then :
17984 $as_echo_n "(cached) " >&6
17988 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
17991 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17992 for as_dir in $PATH
17995 test -z "$as_dir" && as_dir=.
17996 for ac_exec_ext in '' $ac_executable_extensions; do
17997 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17998 ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
17999 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18009 XGETTEXT=$ac_cv_path_XGETTEXT
18010 if test -n "$XGETTEXT"; then
18011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18012 $as_echo "$XGETTEXT" >&6; }
18014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18015 $as_echo "no" >&6; }
18019 test -n "$XGETTEXT" && break
18023 # Report the value of XGETTEXT in configure's output in all cases.
18024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18025 $as_echo_n "checking for XGETTEXT... " >&6; }
18026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18027 $as_echo "$XGETTEXT" >&6; }
18033 # Check for Tcl configuration script tclConfig.sh
18034 if test "$with_tcl" = yes; then
18035 if test -z "$TCLSH"; then
18036 for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18038 # Extract the first word of "$ac_prog", so it can be a program name with args.
18039 set dummy $ac_prog; ac_word=$2
18040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18041 $as_echo_n "checking for $ac_word... " >&6; }
18042 if ${ac_cv_path_TCLSH+:} false; then :
18043 $as_echo_n "(cached) " >&6
18047 ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18050 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18051 for as_dir in $PATH
18054 test -z "$as_dir" && as_dir=.
18055 for ac_exec_ext in '' $ac_executable_extensions; do
18056 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18057 ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18058 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18068 TCLSH=$ac_cv_path_TCLSH
18069 if test -n "$TCLSH"; then
18070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18071 $as_echo "$TCLSH" >&6; }
18073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18074 $as_echo "no" >&6; }
18078 test -n "$TCLSH" && break
18082 # Report the value of TCLSH in configure's output in all cases.
18083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18084 $as_echo_n "checking for TCLSH... " >&6; }
18085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18086 $as_echo "$TCLSH" >&6; }
18089 if test x"$TCLSH" = x""; then
18090 as_fn_error $? "Tcl shell not found" "$LINENO" 5
18093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18094 $as_echo_n "checking for tclConfig.sh... " >&6; }
18095 # Let user override test
18096 if test -z "$TCL_CONFIG_SH"; then
18097 pgac_test_dirs="$with_tclconfig"
18099 set X $pgac_test_dirs; shift
18100 if test $# -eq 0; then
18101 test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18102 pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18103 # On newer macOS, $auto_path frequently doesn't include the place
18104 # where tclConfig.sh actually lives. Append that to the end, so as not
18105 # to break cases where a non-default Tcl installation is being used.
18106 if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18107 pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18109 set X $pgac_test_dirs; shift
18113 if test -r "$pgac_dir/tclConfig.sh"; then
18114 TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18120 if test -z "$TCL_CONFIG_SH"; then
18121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18122 $as_echo "no" >&6; }
18123 as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18126 $as_echo "$TCL_CONFIG_SH" >&6; }
18132 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18133 eval TCL_LIBS=\"$TCL_LIBS\"
18134 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18135 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18137 if test "$TCL_SHARED_BUILD" != 1; then
18138 as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18139 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18141 # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18142 ac_save_CPPFLAGS=$CPPFLAGS
18143 CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18144 ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18145 if test "x$ac_cv_header_tcl_h" = xyes; then :
18148 as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18152 CPPFLAGS=$ac_save_CPPFLAGS
18155 # check for <perl.h>
18156 if test "$with_perl" = yes; then
18157 ac_save_CPPFLAGS=$CPPFLAGS
18158 CPPFLAGS="$CPPFLAGS $perl_includespec"
18159 ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18161 if test "x$ac_cv_header_perl_h" = xyes; then :
18164 as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18168 # While we're at it, check that we can link to libperl.
18169 # On most platforms, if perl.h is there then libperl.so will be too, but at
18170 # this writing Debian packages them separately. There is no known reason to
18171 # waste cycles on separate probes for the Tcl or Python libraries, though.
18172 pgac_save_LIBS=$LIBS
18173 LIBS="$perl_embed_ldflags"
18174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18175 $as_echo_n "checking for libperl... " >&6; }
18176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18177 /* end confdefs.h. */
18179 #include <EXTERN.h>
18190 if ac_fn_c_try_link "$LINENO"; then :
18191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18192 $as_echo "yes" >&6; }
18194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18195 $as_echo "no" >&6; }
18196 as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18198 rm -f core conftest.err conftest.$ac_objext \
18199 conftest$ac_exeext conftest.$ac_ext
18200 LIBS=$pgac_save_LIBS
18201 CPPFLAGS=$ac_save_CPPFLAGS
18204 # check for <Python.h>
18205 if test "$with_python" = yes; then
18206 ac_save_CPPFLAGS=$CPPFLAGS
18207 CPPFLAGS="$python_includespec $CPPFLAGS"
18208 ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18209 if test "x$ac_cv_header_Python_h" = xyes; then :
18212 as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18216 CPPFLAGS=$ac_save_CPPFLAGS
18220 # Check for DocBook and tools
18222 if test -z "$XMLLINT"; then
18223 for ac_prog in xmllint
18225 # Extract the first word of "$ac_prog", so it can be a program name with args.
18226 set dummy $ac_prog; ac_word=$2
18227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18228 $as_echo_n "checking for $ac_word... " >&6; }
18229 if ${ac_cv_path_XMLLINT+:} false; then :
18230 $as_echo_n "(cached) " >&6
18234 ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18237 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18238 for as_dir in $PATH
18241 test -z "$as_dir" && as_dir=.
18242 for ac_exec_ext in '' $ac_executable_extensions; do
18243 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18244 ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18245 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18255 XMLLINT=$ac_cv_path_XMLLINT
18256 if test -n "$XMLLINT"; then
18257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18258 $as_echo "$XMLLINT" >&6; }
18260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18261 $as_echo "no" >&6; }
18265 test -n "$XMLLINT" && break
18269 # Report the value of XMLLINT in configure's output in all cases.
18270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18271 $as_echo_n "checking for XMLLINT... " >&6; }
18272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18273 $as_echo "$XMLLINT" >&6; }
18277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook XML V4.2" >&5
18278 $as_echo_n "checking for DocBook XML V4.2... " >&6; }
18279 if ${pgac_cv_check_docbook+:} false; then :
18280 $as_echo_n "(cached) " >&6
18282 cat >conftest.xml <<EOF
18283 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
18285 <title>test</title>
18287 <title>random</title>
18289 <title>testsect</title>
18296 pgac_cv_check_docbook=no
18298 if test -n "$XMLLINT"; then
18299 $XMLLINT --noout --valid conftest.xml 1>&5 2>&1
18300 if test $? -eq 0; then
18301 pgac_cv_check_docbook=yes
18306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
18307 $as_echo "$pgac_cv_check_docbook" >&6; }
18309 have_docbook=$pgac_cv_check_docbook
18312 if test -z "$DBTOEPUB"; then
18313 for ac_prog in dbtoepub
18315 # Extract the first word of "$ac_prog", so it can be a program name with args.
18316 set dummy $ac_prog; ac_word=$2
18317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18318 $as_echo_n "checking for $ac_word... " >&6; }
18319 if ${ac_cv_path_DBTOEPUB+:} false; then :
18320 $as_echo_n "(cached) " >&6
18324 ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
18327 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18328 for as_dir in $PATH
18331 test -z "$as_dir" && as_dir=.
18332 for ac_exec_ext in '' $ac_executable_extensions; do
18333 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18334 ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
18335 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18345 DBTOEPUB=$ac_cv_path_DBTOEPUB
18346 if test -n "$DBTOEPUB"; then
18347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18348 $as_echo "$DBTOEPUB" >&6; }
18350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18351 $as_echo "no" >&6; }
18355 test -n "$DBTOEPUB" && break
18359 # Report the value of DBTOEPUB in configure's output in all cases.
18360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
18361 $as_echo_n "checking for DBTOEPUB... " >&6; }
18362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
18363 $as_echo "$DBTOEPUB" >&6; }
18366 if test -z "$XSLTPROC"; then
18367 for ac_prog in xsltproc
18369 # Extract the first word of "$ac_prog", so it can be a program name with args.
18370 set dummy $ac_prog; ac_word=$2
18371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18372 $as_echo_n "checking for $ac_word... " >&6; }
18373 if ${ac_cv_path_XSLTPROC+:} false; then :
18374 $as_echo_n "(cached) " >&6
18378 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18381 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18382 for as_dir in $PATH
18385 test -z "$as_dir" && as_dir=.
18386 for ac_exec_ext in '' $ac_executable_extensions; do
18387 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18388 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18389 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18399 XSLTPROC=$ac_cv_path_XSLTPROC
18400 if test -n "$XSLTPROC"; then
18401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18402 $as_echo "$XSLTPROC" >&6; }
18404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18405 $as_echo "no" >&6; }
18409 test -n "$XSLTPROC" && break
18413 # Report the value of XSLTPROC in configure's output in all cases.
18414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18415 $as_echo_n "checking for XSLTPROC... " >&6; }
18416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18417 $as_echo "$XSLTPROC" >&6; }
18420 if test -z "$FOP"; then
18423 # Extract the first word of "$ac_prog", so it can be a program name with args.
18424 set dummy $ac_prog; ac_word=$2
18425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18426 $as_echo_n "checking for $ac_word... " >&6; }
18427 if ${ac_cv_path_FOP+:} false; then :
18428 $as_echo_n "(cached) " >&6
18432 ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
18435 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18436 for as_dir in $PATH
18439 test -z "$as_dir" && as_dir=.
18440 for ac_exec_ext in '' $ac_executable_extensions; do
18441 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18442 ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
18443 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18453 FOP=$ac_cv_path_FOP
18454 if test -n "$FOP"; then
18455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18456 $as_echo "$FOP" >&6; }
18458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18459 $as_echo "no" >&6; }
18463 test -n "$FOP" && break
18467 # Report the value of FOP in configure's output in all cases.
18468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
18469 $as_echo_n "checking for FOP... " >&6; }
18470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
18471 $as_echo "$FOP" >&6; }
18476 # Check for test tools
18478 if test "$enable_tap_tests" = yes; then
18479 # Check for necessary modules, unless user has specified the "prove" to use;
18480 # in that case it's her responsibility to have a working configuration.
18481 # (prove might be part of a different Perl installation than perl, eg on
18482 # MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)
18483 if test -z "$PROVE"; then
18484 # Test::More and Time::HiRes are supposed to be part of core Perl,
18485 # but some distros omit them in a minimal installation.
18496 # Make sure we have perl
18497 if test -z "$PERL"; then
18498 # Extract the first word of "perl", so it can be a program name with args.
18499 set dummy perl; ac_word=$2
18500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18501 $as_echo_n "checking for $ac_word... " >&6; }
18502 if ${ac_cv_prog_PERL+:} false; then :
18503 $as_echo_n "(cached) " >&6
18505 if test -n "$PERL"; then
18506 ac_cv_prog_PERL="$PERL" # Let the user override the test.
18508 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18509 for as_dir in $PATH
18512 test -z "$as_dir" && as_dir=.
18513 for ac_exec_ext in '' $ac_executable_extensions; do
18514 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18515 ac_cv_prog_PERL="perl"
18516 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18525 PERL=$ac_cv_prog_PERL
18526 if test -n "$PERL"; then
18527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
18528 $as_echo "$PERL" >&6; }
18530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18531 $as_echo "no" >&6; }
18537 if test "x$PERL" != x; then
18538 ax_perl_modules_failed=0
18539 for ax_perl_module in 'IPC::Run' 'Test::More 0.87' 'Time::HiRes' ; do
18540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl module $ax_perl_module" >&5
18541 $as_echo_n "checking for perl module $ax_perl_module... " >&6; }
18543 # Would be nice to log result here, but can't rely on autoconf internals
18544 $PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1
18545 if test $? -ne 0; then
18546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18547 $as_echo "no" >&6; };
18548 ax_perl_modules_failed=1
18550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
18551 $as_echo "ok" >&6; };
18555 # Run optional shell commands
18556 if test "$ax_perl_modules_failed" = 0; then
18561 as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
18564 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5
18565 $as_echo "$as_me: WARNING: could not find perl" >&2;}
18568 # Now make sure we know where prove is
18569 if test -z "$PROVE"; then
18570 for ac_prog in prove
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_PROVE+:} false; then :
18577 $as_echo_n "(cached) " >&6
18581 ac_cv_path_PROVE="$PROVE" # 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_PROVE="$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 PROVE=$ac_cv_path_PROVE
18603 if test -n "$PROVE"; then
18604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18605 $as_echo "$PROVE" >&6; }
18607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18608 $as_echo "no" >&6; }
18612 test -n "$PROVE" && break
18616 # Report the value of PROVE in configure's output in all cases.
18617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
18618 $as_echo_n "checking for PROVE... " >&6; }
18619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
18620 $as_echo "$PROVE" >&6; }
18623 if test -z "$PROVE"; then
18624 as_fn_error $? "prove not found" "$LINENO" 5
18630 # We have to run the thread test near the end so we have all our symbols
18631 # defined. Cross compiling throws a warning.
18633 if test "$enable_thread_safety" = yes; then
18634 if test "$PORTNAME" != "win32"
18636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
18637 $as_echo_n "checking thread safety of required library functions... " >&6; }
18641 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
18642 LIBS="$LIBS $PTHREAD_LIBS"
18643 if test "$cross_compiling" = yes; then :
18644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
18645 $as_echo "maybe" >&6; }
18646 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
18647 *** Skipping thread test program because of cross-compile build.
18648 *** Run the program in src/test/thread on the target machine.
18650 $as_echo "$as_me: WARNING:
18651 *** Skipping thread test program because of cross-compile build.
18652 *** Run the program in src/test/thread on the target machine.
18655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18656 /* end confdefs.h. */
18657 #include "$srcdir/src/test/thread/thread_test.c"
18659 if ac_fn_c_try_run "$LINENO"; then :
18660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18661 $as_echo "yes" >&6; }
18663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18664 $as_echo "no" >&6; }
18665 as_fn_error $? "thread test program failed
18666 This platform is not thread-safe. Check the file 'config.log' or compile
18667 and run src/test/thread/thread_test for the exact reason.
18668 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
18670 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18671 conftest.$ac_objext conftest.beam conftest.$ac_ext
18677 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
18678 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
18682 # If compiler will take -Wl,--as-needed (or various platform-specific
18683 # spellings thereof) then add that to LDFLAGS. This is much easier than
18684 # trying to filter LIBS to the minimum for each executable.
18685 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
18686 # libreadline; therefore we postpone testing it until we know what library
18687 # dependencies readline has. The test code will try to link with $LIBS.
18688 if test "$with_readline" = yes; then
18689 link_test_func=readline
18691 link_test_func=exit
18694 if test "$PORTNAME" = "darwin"; then
18695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
18696 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
18697 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
18698 $as_echo_n "(cached) " >&6
18700 pgac_save_LDFLAGS=$LDFLAGS
18701 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
18702 if test "$cross_compiling" = yes; then :
18703 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
18705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18706 /* end confdefs.h. */
18707 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18716 if ac_fn_c_try_run "$LINENO"; then :
18717 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
18719 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
18721 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18722 conftest.$ac_objext conftest.beam conftest.$ac_ext
18725 LDFLAGS="$pgac_save_LDFLAGS"
18727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
18728 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
18729 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
18730 LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
18733 elif test "$PORTNAME" = "openbsd"; then
18734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
18735 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
18736 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
18737 $as_echo_n "(cached) " >&6
18739 pgac_save_LDFLAGS=$LDFLAGS
18740 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
18741 if test "$cross_compiling" = yes; then :
18742 pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
18744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18745 /* end confdefs.h. */
18746 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18755 if ac_fn_c_try_run "$LINENO"; then :
18756 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
18758 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
18760 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18761 conftest.$ac_objext conftest.beam conftest.$ac_ext
18764 LDFLAGS="$pgac_save_LDFLAGS"
18766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
18767 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
18768 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
18769 LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
18773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
18774 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
18775 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
18776 $as_echo_n "(cached) " >&6
18778 pgac_save_LDFLAGS=$LDFLAGS
18779 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
18780 if test "$cross_compiling" = yes; then :
18781 pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
18783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18784 /* end confdefs.h. */
18785 extern void $link_test_func (); void (*fptr) () = $link_test_func;
18794 if ac_fn_c_try_run "$LINENO"; then :
18795 pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
18797 pgac_cv_prog_cc_ldflags__Wl___as_needed=no
18799 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18800 conftest.$ac_objext conftest.beam conftest.$ac_ext
18803 LDFLAGS="$pgac_save_LDFLAGS"
18805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
18806 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
18807 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
18808 LDFLAGS="$LDFLAGS -Wl,--as-needed"
18813 # Create compiler version string
18814 if test x"$GCC" = x"yes" ; then
18815 cc_string=`${CC} --version | sed q`
18816 case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
18817 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
18818 cc_string=`${CC} -V 2>&1 | sed q`
18824 cat >>confdefs.h <<_ACEOF
18825 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
18829 # Supply a numeric version string for use by 3rd party add-ons
18830 # awk -F is a regex on some platforms, and not on others, so make "." a tab
18831 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
18833 $AWK '{printf "%d%04d", $1, $2}'`"
18835 cat >>confdefs.h <<_ACEOF
18836 #define PG_VERSION_NUM $PG_VERSION_NUM
18841 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
18842 # literally, so that it's possible to override it at build time using
18843 # a command like "make ... PG_SYSROOT=path". This has to be done after
18844 # we've finished all configure checks that depend on CPPFLAGS.
18845 if test x"$PG_SYSROOT" != x; then
18846 CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
18851 # Begin output steps
18853 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
18854 $as_echo "$as_me: using compiler=$cc_string" >&6;}
18855 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
18856 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
18857 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
18858 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
18859 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
18860 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
18861 # Currently only used when LLVM is used
18862 if test "$with_llvm" = yes ; then
18863 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
18864 $as_echo "$as_me: using CXX=$CXX" >&6;}
18865 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
18866 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
18867 { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
18868 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
18869 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
18870 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
18871 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
18872 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
18875 # prepare build tree if outside source tree
18876 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
18877 # Note 2: /bin/pwd might be better than shell's built-in at getting
18878 # a symlink-free name.
18879 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
18883 if test "$no_create" != yes; then
18884 $as_echo_n "preparing build tree... " >&6
18885 pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
18886 $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
18887 || as_fn_error $? "failed" "$LINENO" 5
18888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
18889 $as_echo "done" >&6; }
18895 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
18898 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}"
18901 if test "$PORTNAME" = "win32"; then
18902 ac_config_commands="$ac_config_commands check_win32_symlinks"
18906 ac_config_headers="$ac_config_headers src/include/pg_config.h"
18909 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
18912 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
18915 cat >confcache <<\_ACEOF
18916 # This file is a shell script that caches the results of configure
18917 # tests run on this system so they can be shared between configure
18918 # scripts and configure runs, see configure's option --config-cache.
18919 # It is not useful on other systems. If it contains results you don't
18920 # want to keep, you may remove or edit it.
18922 # config.status only pays attention to the cache file if you give it
18923 # the --recheck option to rerun configure.
18925 # `ac_cv_env_foo' variables (set or unset) will be overridden when
18926 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18927 # following values.
18931 # The following way of writing the cache mishandles newlines in values,
18932 # but we know of no workaround that is simple, portable, and efficient.
18933 # So, we kill variables containing newlines.
18934 # Ultrix sh set writes to stderr and can't be redirected directly,
18935 # and sets the high bit in the cache file unless we assign to the vars.
18937 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
18938 eval ac_val=\$$ac_var
18942 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
18943 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
18946 _ | IFS | as_nl) ;; #(
18947 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
18948 *) { eval $ac_var=; unset $ac_var;} ;;
18954 case $as_nl`(ac_space=' '; set) 2>&1` in #(
18955 *${as_nl}ac_space=\ *)
18956 # `set' does not quote correctly, so add quotes: double-quote
18957 # substitution turns \\\\ into \\, and sed turns \\ into \.
18960 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18963 # `set' quotes correctly as required by POSIX, so do not add quotes.
18964 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
18973 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18975 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18977 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
18978 if test -w "$cache_file"; then
18979 if test "x$cache_file" != "x/dev/null"; then
18980 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
18981 $as_echo "$as_me: updating cache $cache_file" >&6;}
18982 if test ! -f "$cache_file" || test -h "$cache_file"; then
18983 cat confcache >"$cache_file"
18985 case $cache_file in #(
18987 mv -f confcache "$cache_file"$$ &&
18988 mv -f "$cache_file"$$ "$cache_file" ;; #(
18990 mv -f confcache "$cache_file" ;;
18995 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
18996 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19001 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19002 # Let make expand exec_prefix.
19003 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19005 DEFS=-DHAVE_CONFIG_H
19010 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19011 # 1. Remove the extension, and $U if already installed.
19012 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19013 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19014 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19015 # will be set to the directory where LIBOBJS objects are built.
19016 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19017 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19019 LIBOBJS=$ac_libobjs
19021 LTLIBOBJS=$ac_ltlibobjs
19026 : "${CONFIG_STATUS=./config.status}"
19028 ac_clean_files_save=$ac_clean_files
19029 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19030 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19031 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19033 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19035 # Generated by $as_me.
19036 # Run this file to recreate the current configuration.
19037 # Compiler output produced by configure, useful for debugging
19038 # configure, is in config.log if it exists.
19041 ac_cs_recheck=false
19044 SHELL=\${CONFIG_SHELL-$SHELL}
19047 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19048 ## -------------------- ##
19049 ## M4sh Initialization. ##
19050 ## -------------------- ##
19052 # Be more Bourne compatible
19053 DUALCASE=1; export DUALCASE # for MKS sh
19054 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19057 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19058 # is contrary to our usage. Disable this feature.
19059 alias -g '${1+"$@"}'='"$@"'
19060 setopt NO_GLOB_SUBST
19062 case `(set -o) 2>/dev/null` in #(
19074 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19075 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19076 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19077 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19078 # Prefer a ksh shell builtin over an external printf program on Solaris,
19079 # but without wasting forks for bash or zsh.
19080 if test -z "$BASH_VERSION$ZSH_VERSION" \
19081 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19082 as_echo='print -r --'
19083 as_echo_n='print -rn --'
19084 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19085 as_echo='printf %s\n'
19086 as_echo_n='printf %s'
19088 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19089 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19090 as_echo_n='/usr/ucb/echo -n'
19092 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19093 as_echo_n_body='eval
19097 expr "X$arg" : "X\\(.*\\)$as_nl";
19098 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19100 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19102 export as_echo_n_body
19103 as_echo_n='sh -c $as_echo_n_body as_echo'
19105 export as_echo_body
19106 as_echo='sh -c $as_echo_body as_echo'
19109 # The user is always right.
19110 if test "${PATH_SEPARATOR+set}" != set; then
19112 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19113 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19120 # We need space, tab and new line, in precisely that order. Quoting is
19121 # there to prevent editors from complaining about space-tab.
19122 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19123 # splitting by setting IFS to empty value.)
19126 # Find who we are. Look in the path if we contain no directory separator.
19129 *[\\/]* ) as_myself=$0 ;;
19130 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19131 for as_dir in $PATH
19134 test -z "$as_dir" && as_dir=.
19135 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19141 # We did not find ourselves, most probably we were run as `sh COMMAND'
19142 # in which case we are not to be found in the path.
19143 if test "x$as_myself" = x; then
19146 if test ! -f "$as_myself"; then
19147 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19151 # Unset variables that we do not need and which cause bugs (e.g. in
19152 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19153 # suppresses any "Segmentation fault" message there. '((' could
19154 # trigger a bug in pdksh 5.2.14.
19155 for as_var in BASH_ENV ENV MAIL MAILPATH
19156 do eval test x\${$as_var+set} = xset \
19157 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19170 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19173 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19174 # ----------------------------------------
19175 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19176 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19177 # script with STATUS, using 1 if that was 0.
19180 as_status=$1; test $as_status -eq 0 && as_status=1
19182 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19183 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19185 $as_echo "$as_me: error: $2" >&2
19186 as_fn_exit $as_status
19190 # as_fn_set_status STATUS
19191 # -----------------------
19192 # Set $? to STATUS, without forking.
19193 as_fn_set_status ()
19196 } # as_fn_set_status
19198 # as_fn_exit STATUS
19199 # -----------------
19200 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19204 as_fn_set_status $1
19210 # Portably unset VAR.
19213 { eval $1=; unset $1;}
19215 as_unset=as_fn_unset
19216 # as_fn_append VAR VALUE
19217 # ----------------------
19218 # Append the text in VALUE to the end of the definition contained in VAR. Take
19219 # advantage of any shell optimizations that allow amortized linear growth over
19220 # repeated appends, instead of the typical quadratic growth present in naive
19222 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19223 eval 'as_fn_append ()
19234 # as_fn_arith ARG...
19235 # ------------------
19236 # Perform arithmetic evaluation on the ARGs, and store the result in the
19237 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19238 # must be portable across $(()) and expr.
19239 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19240 eval 'as_fn_arith ()
19247 as_val=`expr "$@" || test $? -eq 1`
19252 if expr a : '\(a\)' >/dev/null 2>&1 &&
19253 test "X`expr 00001 : '.*\(...\)'`" = X001; then
19259 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19260 as_basename=basename
19265 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19271 as_me=`$as_basename -- "$0" ||
19272 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19273 X"$0" : 'X\(//\)$' \| \
19274 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19276 sed '/^.*\/\([^/][^/]*\)\/*$/{
19290 # Avoid depending upon Character Ranges.
19291 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19292 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19293 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19294 as_cr_digits='0123456789'
19295 as_cr_alnum=$as_cr_Letters$as_cr_digits
19297 ECHO_C= ECHO_N= ECHO_T=
19298 case `echo -n x` in #(((((
19300 case `echo 'xy\c'` in
19301 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19303 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19310 rm -f conf$$ conf$$.exe conf$$.file
19311 if test -d conf$$.dir; then
19312 rm -f conf$$.dir/conf$$.file
19315 mkdir conf$$.dir 2>/dev/null
19317 if (echo >conf$$.file) 2>/dev/null; then
19318 if ln -s conf$$.file conf$$ 2>/dev/null; then
19320 # ... but there are two gotchas:
19321 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19322 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19323 # In both cases, we have to default to `cp -pR'.
19324 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19326 elif ln conf$$.file conf$$ 2>/dev/null; then
19334 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19335 rmdir conf$$.dir 2>/dev/null
19340 # Create "$as_dir" as a directory, including parents if necessary.
19345 -*) as_dir=./$as_dir;;
19347 test -d "$as_dir" || eval $as_mkdir_p || {
19351 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19352 *) as_qdir=$as_dir;;
19354 as_dirs="'$as_qdir' $as_dirs"
19355 as_dir=`$as_dirname -- "$as_dir" ||
19356 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19357 X"$as_dir" : 'X\(//\)[^/]' \| \
19358 X"$as_dir" : 'X\(//\)$' \| \
19359 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19360 $as_echo X"$as_dir" |
19361 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19365 /^X\(\/\/\)[^/].*/{
19378 test -d "$as_dir" && break
19380 test -z "$as_dirs" || eval "mkdir $as_dirs"
19381 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19385 if mkdir -p . 2>/dev/null; then
19386 as_mkdir_p='mkdir -p "$as_dir"'
19388 test -d ./-p && rmdir ./-p
19393 # as_fn_executable_p FILE
19394 # -----------------------
19395 # Test if FILE is an executable regular file.
19396 as_fn_executable_p ()
19398 test -f "$1" && test -x "$1"
19399 } # as_fn_executable_p
19400 as_test_x='test -x'
19401 as_executable_p=as_fn_executable_p
19403 # Sed expression to map a string onto a valid CPP name.
19404 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19406 # Sed expression to map a string onto a valid variable name.
19407 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19411 ## ----------------------------------- ##
19412 ## Main body of $CONFIG_STATUS script. ##
19413 ## ----------------------------------- ##
19415 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19417 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19418 # Save the log message, to keep $0 and so on meaningful, and to
19419 # report actual input values of CONFIG_FILES etc. instead of their
19420 # values after options handling.
19422 This file was extended by PostgreSQL $as_me 12devel, which was
19423 generated by GNU Autoconf 2.69. Invocation command line was
19425 CONFIG_FILES = $CONFIG_FILES
19426 CONFIG_HEADERS = $CONFIG_HEADERS
19427 CONFIG_LINKS = $CONFIG_LINKS
19428 CONFIG_COMMANDS = $CONFIG_COMMANDS
19431 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19436 case $ac_config_files in *"
19437 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19440 case $ac_config_headers in *"
19441 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19445 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19446 # Files that config.status was made for.
19447 config_files="$ac_config_files"
19448 config_headers="$ac_config_headers"
19449 config_links="$ac_config_links"
19450 config_commands="$ac_config_commands"
19454 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19456 \`$as_me' instantiates files and other configuration actions
19457 from templates according to the current configuration. Unless the files
19458 and actions are specified as TAGs, all are instantiated by default.
19460 Usage: $0 [OPTION]... [TAG]...
19462 -h, --help print this help, then exit
19463 -V, --version print version number and configuration settings, then exit
19464 --config print configuration, then exit
19465 -q, --quiet, --silent
19466 do not print progress messages
19467 -d, --debug don't remove temporary files
19468 --recheck update $as_me by reconfiguring in the same conditions
19469 --file=FILE[:TEMPLATE]
19470 instantiate the configuration file FILE
19471 --header=FILE[:TEMPLATE]
19472 instantiate the configuration header FILE
19474 Configuration files:
19477 Configuration headers:
19480 Configuration links:
19483 Configuration commands:
19486 Report bugs to <pgsql-bugs@postgresql.org>."
19489 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19490 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19492 PostgreSQL config.status 12devel
19493 configured by $0, generated by GNU Autoconf 2.69,
19494 with options \\"\$ac_cs_config\\"
19496 Copyright (C) 2012 Free Software Foundation, Inc.
19497 This config.status script is free software; the Free Software Foundation
19498 gives unlimited permission to copy, distribute and modify it."
19505 test -n "\$AWK" || AWK=awk
19508 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19509 # The default lists apply if the user does not specify any file.
19515 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19516 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19520 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19532 # Handling of the options.
19533 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19535 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19536 $as_echo "$ac_cs_version"; exit ;;
19537 --config | --confi | --conf | --con | --co | --c )
19538 $as_echo "$ac_cs_config"; exit ;;
19539 --debug | --debu | --deb | --de | --d | -d )
19541 --file | --fil | --fi | --f )
19544 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19545 '') as_fn_error $? "missing file argument" ;;
19547 as_fn_append CONFIG_FILES " '$ac_optarg'"
19548 ac_need_defaults=false;;
19549 --header | --heade | --head | --hea )
19552 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19554 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19555 ac_need_defaults=false;;
19557 # Conflict between --help and --header
19558 as_fn_error $? "ambiguous option: \`$1'
19559 Try \`$0 --help' for more information.";;
19560 --help | --hel | -h )
19561 $as_echo "$ac_cs_usage"; exit ;;
19562 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19563 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19566 # This is an error.
19567 -*) as_fn_error $? "unrecognized option: \`$1'
19568 Try \`$0 --help' for more information." ;;
19570 *) as_fn_append ac_config_targets " $1"
19571 ac_need_defaults=false ;;
19577 ac_configure_extra_args=
19579 if $ac_cs_silent; then
19581 ac_configure_extra_args="$ac_configure_extra_args --silent"
19585 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19586 if \$ac_cs_recheck; then
19587 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19589 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19590 CONFIG_SHELL='$SHELL'
19591 export CONFIG_SHELL
19596 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19600 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19601 ## Running $as_me. ##
19607 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19610 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19612 # Handling of arguments.
19613 for ac_config_target in $ac_config_targets
19615 case $ac_config_target in
19616 "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
19617 "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
19618 "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
19619 "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
19620 "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
19621 "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
19622 "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
19623 "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
19624 "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
19625 "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
19626 "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
19628 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19633 # If the user did not use the arguments to specify the items to instantiate,
19634 # then the envvar interface is used. Set only those that are not.
19635 # We use the long form for the default assignment because of an extremely
19636 # bizarre bug on SunOS 4.1.3.
19637 if $ac_need_defaults; then
19638 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19639 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19640 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
19641 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19644 # Have a temporary directory for convenience. Make it in the build tree
19645 # simply because there is no reason against having it here, and in addition,
19646 # creating and moving files from /tmp can sometimes cause problems.
19647 # Hook for its removal unless debugging.
19648 # Note that there is a small window in which the directory will not be cleaned:
19649 # after its creation but before its name has been assigned to `$tmp'.
19653 trap 'exit_status=$?
19654 : "${ac_tmp:=$tmp}"
19655 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
19657 trap 'as_fn_exit 1' 1 2 13 15
19659 # Create a (secure) tmp directory for tmp files.
19662 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19666 tmp=./conf$$-$RANDOM
19667 (umask 077 && mkdir "$tmp")
19668 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19671 # Set up the scripts for CONFIG_FILES section.
19672 # No need to generate them if there are no CONFIG_FILES.
19673 # This happens for instance with `./config.status config.h'.
19674 if test -n "$CONFIG_FILES"; then
19677 ac_cr=`echo X | tr X '\015'`
19678 # On cygwin, bash can eat \r inside `` if the user requested igncr.
19679 # But we know of no other shell where ac_cr would be empty at this
19680 # point, so we can use a bashism as a fallback.
19681 if test "x$ac_cr" = x; then
19682 eval ac_cr=\$\'\\r\'
19684 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19685 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
19688 ac_cs_awk_cr=$ac_cr
19691 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
19696 echo "cat >conf$$subs.awk <<_ACEOF" &&
19697 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19699 } >conf$$subs.sh ||
19700 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19701 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
19703 for ac_last_try in false false false false false :; do
19704 . ./conf$$subs.sh ||
19705 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19707 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19708 if test $ac_delim_n = $ac_delim_num; then
19710 elif $ac_last_try; then
19711 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19713 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19716 rm -f conf$$subs.sh
19718 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19719 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
19723 s/^/S["/; s/!.*/"]=/
19733 s/\(.\{148\}\)..*/\1/
19735 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19740 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19747 s/\(.\{148\}\)..*/\1/
19749 s/["\\]/\\&/g; s/^/"/; s/$/"/
19753 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19758 ' <conf$$subs.awk | sed '
19763 ' >>$CONFIG_STATUS || ac_write_fail=1
19764 rm -f conf$$subs.awk
19765 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19767 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
19768 for (key in S) S_is_set[key] = 1
19774 nfields = split(line, field, "@")
19776 len = length(field[1])
19777 for (i = 2; i < nfields; i++) {
19779 keylen = length(key)
19780 if (S_is_set[key]) {
19782 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
19783 len += length(value) + length(field[++i])
19794 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19795 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
19796 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
19799 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
19800 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
19803 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
19804 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
19805 # trailing colons and then remove the whole line if VPATH becomes empty
19806 # (actually we leave an empty line to preserve line numbers).
19807 if test "x$srcdir" = x.; then
19808 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
19826 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19827 fi # test -n "$CONFIG_FILES"
19829 # Set up the scripts for CONFIG_HEADERS section.
19830 # No need to generate them if there are no CONFIG_HEADERS.
19831 # This happens for instance with `./config.status Makefile'.
19832 if test -n "$CONFIG_HEADERS"; then
19833 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
19837 # Transform confdefs.h into an awk script `defines.awk', embedded as
19838 # here-document in config.status, that substitutes the proper values into
19839 # config.h.in to produce config.h.
19841 # Create a delimiter string that does not exist in confdefs.h, to ease
19842 # handling of long lines.
19844 for ac_last_try in false false :; do
19845 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
19846 if test -z "$ac_tt"; then
19848 elif $ac_last_try; then
19849 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
19851 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19855 # For the awk script, D is an array of macro values keyed by name,
19856 # likewise P contains macro parameters if any. Preserve backslash
19857 # newline sequences.
19859 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
19861 s/.\{148\}/&'"$ac_delim"'/g
19864 s/^[ ]*#[ ]*define[ ][ ]*/ /
19871 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
19873 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
19877 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
19878 D["\1"]=" \3\\\\\\n"\\/p
19880 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
19885 s/.\{148\}/&'"$ac_delim"'/g
19890 s/["\\]/\\&/g; s/^/"/; s/$/"/p
19893 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
19895 ' <confdefs.h | sed '
19896 s/'"$ac_delim"'/"\\\
19897 "/g' >>$CONFIG_STATUS || ac_write_fail=1
19899 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19900 for (key in D) D_is_set[key] = 1
19903 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
19905 split(line, arg, " ")
19906 if (arg[1] == "#") {
19910 defundef = substr(arg[1], 2)
19913 split(mac1, mac2, "(") #)
19915 prefix = substr(line, 1, index(line, defundef) - 1)
19916 if (D_is_set[macro]) {
19917 # Preserve the white space surrounding the "#".
19918 print prefix "define", macro P[macro] D[macro]
19921 # Replace #undef with comments. This is necessary, for example,
19922 # in the case of _POSIX_SOURCE, which is predefined and required
19923 # on some systems where configure will not decide to define it.
19924 if (defundef == "undef") {
19925 print "/*", prefix defundef, macro, "*/"
19933 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19934 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
19935 fi # test -n "$CONFIG_HEADERS"
19938 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
19943 :[FHLC]) ac_mode=$ac_tag; continue;;
19945 case $ac_mode$ac_tag in
19947 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
19948 :[FH]-) ac_tag=-:-;;
19949 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
19966 -) ac_f="$ac_tmp/stdin";;
19967 *) # Look for the file first in the build tree, then in the source tree
19968 # (if the path is not absolute). The absolute path cannot be DOS-style,
19969 # because $ac_f cannot contain `:'.
19973 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
19975 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
19977 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
19978 as_fn_append ac_file_inputs " '$ac_f'"
19981 # Let's still pretend it is `configure' which instantiates (i.e., don't
19982 # use $as_me), people would be surprised to read:
19983 # /* config.h. Generated by config.status. */
19984 configure_input='Generated from '`
19985 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
19987 if test x"$ac_file" != x-; then
19988 configure_input="$ac_file. $configure_input"
19989 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
19990 $as_echo "$as_me: creating $ac_file" >&6;}
19992 # Neutralize special characters interpreted by sed in replacement strings.
19993 case $configure_input in #(
19994 *\&* | *\|* | *\\* )
19995 ac_sed_conf_input=`$as_echo "$configure_input" |
19996 sed 's/[\\\\&|]/\\\\&/g'`;; #(
19997 *) ac_sed_conf_input=$configure_input;;
20001 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20002 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20007 ac_dir=`$as_dirname -- "$ac_file" ||
20008 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20009 X"$ac_file" : 'X\(//\)[^/]' \| \
20010 X"$ac_file" : 'X\(//\)$' \| \
20011 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20012 $as_echo X"$ac_file" |
20013 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20017 /^X\(\/\/\)[^/].*/{
20030 as_dir="$ac_dir"; as_fn_mkdir_p
20034 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20036 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20037 # A ".." for each directory in $ac_dir_suffix.
20038 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20039 case $ac_top_builddir_sub in
20040 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20041 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20044 ac_abs_top_builddir=$ac_pwd
20045 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20046 # for backward compatibility:
20047 ac_top_builddir=$ac_top_build_prefix
20050 .) # We are building in place.
20052 ac_top_srcdir=$ac_top_builddir_sub
20053 ac_abs_top_srcdir=$ac_pwd ;;
20054 [\\/]* | ?:[\\/]* ) # Absolute name.
20055 ac_srcdir=$srcdir$ac_dir_suffix;
20056 ac_top_srcdir=$srcdir
20057 ac_abs_top_srcdir=$srcdir ;;
20058 *) # Relative name.
20059 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20060 ac_top_srcdir=$ac_top_build_prefix$srcdir
20061 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20063 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20073 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20074 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20076 ac_MKDIR_P=$MKDIR_P
20078 [\\/$]* | ?:[\\/]* ) ;;
20079 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20083 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20084 # If the template does not know about datarootdir, expand it.
20085 # FIXME: This hack should be removed a few years after 2.60.
20086 ac_datarootdir_hack=; ac_datarootdir_seen=
20097 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20098 *datarootdir*) ac_datarootdir_seen=yes;;
20099 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20100 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20101 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20103 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20104 ac_datarootdir_hack='
20105 s&@datadir@&$datadir&g
20106 s&@docdir@&$docdir&g
20107 s&@infodir@&$infodir&g
20108 s&@localedir@&$localedir&g
20109 s&@mandir@&$mandir&g
20110 s&\\\${datarootdir}&$datarootdir&g' ;;
20114 # Neutralize VPATH when `$srcdir' = `.'.
20115 # Shell code in configure.ac might set extrasub.
20116 # FIXME: do we really want to maintain this feature?
20117 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20118 ac_sed_extra="$ac_vpsub
20121 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20123 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20124 s|@configure_input@|$ac_sed_conf_input|;t t
20125 s&@top_builddir@&$ac_top_builddir_sub&;t t
20126 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20127 s&@srcdir@&$ac_srcdir&;t t
20128 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20129 s&@top_srcdir@&$ac_top_srcdir&;t t
20130 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20131 s&@builddir@&$ac_builddir&;t t
20132 s&@abs_builddir@&$ac_abs_builddir&;t t
20133 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20134 s&@INSTALL@&$ac_INSTALL&;t t
20135 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20136 $ac_datarootdir_hack
20138 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20139 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20141 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20142 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20143 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20144 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20145 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20146 which seems to be undefined. Please make sure it is defined" >&5
20147 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20148 which seems to be undefined. Please make sure it is defined" >&2;}
20150 rm -f "$ac_tmp/stdin"
20152 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20153 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20155 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20161 if test x"$ac_file" != x-; then
20163 $as_echo "/* $configure_input */" \
20164 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20165 } >"$ac_tmp/config.h" \
20166 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20167 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20168 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20169 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20172 mv "$ac_tmp/config.h" "$ac_file" \
20173 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20176 $as_echo "/* $configure_input */" \
20177 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20178 || as_fn_error $? "could not create -" "$LINENO" 5
20186 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20189 # Prefer the file from the source tree if names are identical.
20190 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20191 ac_source=$srcdir/$ac_source
20194 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20195 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20197 if test ! -r "$ac_source"; then
20198 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20202 # Try a relative symlink, then a hard link, then a copy.
20204 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20205 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20207 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20208 ln "$ac_source" "$ac_file" 2>/dev/null ||
20209 cp -p "$ac_source" "$ac_file" ||
20210 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20213 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20214 $as_echo "$as_me: executing $ac_file commands" >&6;}
20219 case $ac_file$ac_mode in
20220 "check_win32_symlinks":C)
20221 # Links sometimes fail undetected on Mingw -
20222 # so here we detect it and warn the user
20223 for FILE in $CONFIG_LINKS
20225 # test -e works for symlinks in the MinGW console
20226 test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20227 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20230 "src/include/pg_config.h":H)
20231 # Update timestamp for pg_config.h (see Makefile.global)
20232 echo >src/include/stamp-h
20234 "src/include/pg_config_ext.h":H)
20235 # Update timestamp for pg_config_ext.h (see Makefile.global)
20236 echo >src/include/stamp-ext-h
20238 "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20246 ac_clean_files=$ac_clean_files_save
20248 test $ac_write_fail = 0 ||
20249 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20252 # configure is writing to config.log, and then calls config.status.
20253 # config.status does its own redirection, appending to config.log.
20254 # Unfortunately, on DOS this fails, as config.log is still kept open
20255 # by configure, so config.status won't be able to write to it; its
20256 # output is simply discarded. So we exec the FD to /dev/null,
20257 # effectively closing config.log, so it can be properly (re)opened and
20258 # appended to by config.status. When coming back to configure, we
20259 # need to make the FD available again.
20260 if test "$no_create" != yes; then
20262 ac_config_status_args=
20263 test "$silent" = yes &&
20264 ac_config_status_args="$ac_config_status_args --quiet"
20266 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20268 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20269 # would make configure fail if this is the last instruction.
20270 $ac_cs_success || as_fn_exit 1
20272 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20273 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20274 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}