2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 11devel.
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-2017, 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='11devel'
586 PACKAGE_STRING='PostgreSQL 11devel'
587 PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org'
590 ac_unique_file="src/backend/access/common/heaptuple.c"
591 ac_default_prefix=/usr/local/pgsql
592 # Factoring default headers for most tests.
593 ac_includes_default="\
595 #ifdef HAVE_SYS_TYPES_H
596 # include <sys/types.h>
598 #ifdef HAVE_SYS_STAT_H
599 # include <sys/stat.h>
605 # ifdef HAVE_STDLIB_H
610 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
615 #ifdef HAVE_STRINGS_H
616 # include <strings.h>
618 #ifdef HAVE_INTTYPES_H
619 # include <inttypes.h>
628 ac_subst_vars='LTLIBOBJS
663 python_additional_libs
790 program_transform_name
803 enable_option_checking
809 enable_integer_datetimes
843 with_libedit_preferred
855 ac_precious_vars='build_alias
873 # Initialize some variables set by options.
875 ac_init_version=false
876 ac_unrecognized_opts=
878 # The variables have the same names as the options, with
879 # dashes changed to underlines.
887 program_transform_name=s,x,x,
895 # Installation directory options.
896 # These are left unexpanded so users can "make install exec_prefix=/foo"
897 # and all the variables that are supposed to be based on exec_prefix
898 # by default will actually change.
899 # Use braces instead of parens because sh, perl, etc. also accept them.
900 # (The list follows the same order as the GNU Coding Standards.)
901 bindir='${exec_prefix}/bin'
902 sbindir='${exec_prefix}/sbin'
903 libexecdir='${exec_prefix}/libexec'
904 datarootdir='${prefix}/share'
905 datadir='${datarootdir}'
906 sysconfdir='${prefix}/etc'
907 sharedstatedir='${prefix}/com'
908 localstatedir='${prefix}/var'
909 includedir='${prefix}/include'
910 oldincludedir='/usr/include'
911 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
912 infodir='${datarootdir}/info'
917 libdir='${exec_prefix}/lib'
918 localedir='${datarootdir}/locale'
919 mandir='${datarootdir}/man'
925 # If the previous option needs an argument, assign it.
926 if test -n "$ac_prev"; then
927 eval $ac_prev=\$ac_option
933 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
938 # Accept the important Cygnus configure options, so we can diagnose typos.
940 case $ac_dashdash$ac_option in
944 -bindir | --bindir | --bindi | --bind | --bin | --bi)
946 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
949 -build | --build | --buil | --bui | --bu)
950 ac_prev=build_alias ;;
951 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
952 build_alias=$ac_optarg ;;
954 -cache-file | --cache-file | --cache-fil | --cache-fi \
955 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
956 ac_prev=cache_file ;;
957 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
958 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
959 cache_file=$ac_optarg ;;
962 cache_file=config.cache ;;
964 -datadir | --datadir | --datadi | --datad)
966 -datadir=* | --datadir=* | --datadi=* | --datad=*)
967 datadir=$ac_optarg ;;
969 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
970 | --dataroo | --dataro | --datar)
971 ac_prev=datarootdir ;;
972 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
973 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
974 datarootdir=$ac_optarg ;;
976 -disable-* | --disable-*)
977 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
978 # Reject names that are not valid shell variable names.
979 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
980 as_fn_error $? "invalid feature name: $ac_useropt"
981 ac_useropt_orig=$ac_useropt
982 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
983 case $ac_user_opts in
987 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
988 ac_unrecognized_sep=', ';;
990 eval enable_$ac_useropt=no ;;
992 -docdir | --docdir | --docdi | --doc | --do)
994 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
997 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
999 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1000 dvidir=$ac_optarg ;;
1002 -enable-* | --enable-*)
1003 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1004 # Reject names that are not valid shell variable names.
1005 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1006 as_fn_error $? "invalid feature name: $ac_useropt"
1007 ac_useropt_orig=$ac_useropt
1008 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1009 case $ac_user_opts in
1011 "enable_$ac_useropt"
1013 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1014 ac_unrecognized_sep=', ';;
1016 eval enable_$ac_useropt=\$ac_optarg ;;
1018 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1019 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1020 | --exec | --exe | --ex)
1021 ac_prev=exec_prefix ;;
1022 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1023 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1024 | --exec=* | --exe=* | --ex=*)
1025 exec_prefix=$ac_optarg ;;
1027 -gas | --gas | --ga | --g)
1028 # Obsolete; use --with-gas.
1031 -help | --help | --hel | --he | -h)
1032 ac_init_help=long ;;
1033 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1034 ac_init_help=recursive ;;
1035 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1036 ac_init_help=short ;;
1038 -host | --host | --hos | --ho)
1039 ac_prev=host_alias ;;
1040 -host=* | --host=* | --hos=* | --ho=*)
1041 host_alias=$ac_optarg ;;
1043 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1045 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1047 htmldir=$ac_optarg ;;
1049 -includedir | --includedir | --includedi | --included | --include \
1050 | --includ | --inclu | --incl | --inc)
1051 ac_prev=includedir ;;
1052 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1053 | --includ=* | --inclu=* | --incl=* | --inc=*)
1054 includedir=$ac_optarg ;;
1056 -infodir | --infodir | --infodi | --infod | --info | --inf)
1058 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1059 infodir=$ac_optarg ;;
1061 -libdir | --libdir | --libdi | --libd)
1063 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1064 libdir=$ac_optarg ;;
1066 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1067 | --libexe | --libex | --libe)
1068 ac_prev=libexecdir ;;
1069 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1070 | --libexe=* | --libex=* | --libe=*)
1071 libexecdir=$ac_optarg ;;
1073 -localedir | --localedir | --localedi | --localed | --locale)
1074 ac_prev=localedir ;;
1075 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1076 localedir=$ac_optarg ;;
1078 -localstatedir | --localstatedir | --localstatedi | --localstated \
1079 | --localstate | --localstat | --localsta | --localst | --locals)
1080 ac_prev=localstatedir ;;
1081 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1082 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1083 localstatedir=$ac_optarg ;;
1085 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1087 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1088 mandir=$ac_optarg ;;
1090 -nfp | --nfp | --nf)
1091 # Obsolete; use --without-fp.
1094 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1095 | --no-cr | --no-c | -n)
1098 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1099 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1102 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1103 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1104 | --oldin | --oldi | --old | --ol | --o)
1105 ac_prev=oldincludedir ;;
1106 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1107 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1108 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1109 oldincludedir=$ac_optarg ;;
1111 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1113 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1114 prefix=$ac_optarg ;;
1116 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1117 | --program-pre | --program-pr | --program-p)
1118 ac_prev=program_prefix ;;
1119 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1120 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1121 program_prefix=$ac_optarg ;;
1123 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1124 | --program-suf | --program-su | --program-s)
1125 ac_prev=program_suffix ;;
1126 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1127 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1128 program_suffix=$ac_optarg ;;
1130 -program-transform-name | --program-transform-name \
1131 | --program-transform-nam | --program-transform-na \
1132 | --program-transform-n | --program-transform- \
1133 | --program-transform | --program-transfor \
1134 | --program-transfo | --program-transf \
1135 | --program-trans | --program-tran \
1136 | --progr-tra | --program-tr | --program-t)
1137 ac_prev=program_transform_name ;;
1138 -program-transform-name=* | --program-transform-name=* \
1139 | --program-transform-nam=* | --program-transform-na=* \
1140 | --program-transform-n=* | --program-transform-=* \
1141 | --program-transform=* | --program-transfor=* \
1142 | --program-transfo=* | --program-transf=* \
1143 | --program-trans=* | --program-tran=* \
1144 | --progr-tra=* | --program-tr=* | --program-t=*)
1145 program_transform_name=$ac_optarg ;;
1147 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1149 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1150 pdfdir=$ac_optarg ;;
1152 -psdir | --psdir | --psdi | --psd | --ps)
1154 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1157 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1158 | -silent | --silent | --silen | --sile | --sil)
1161 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1163 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1165 sbindir=$ac_optarg ;;
1167 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1168 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1169 | --sharedst | --shareds | --shared | --share | --shar \
1171 ac_prev=sharedstatedir ;;
1172 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1173 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1174 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1176 sharedstatedir=$ac_optarg ;;
1178 -site | --site | --sit)
1180 -site=* | --site=* | --sit=*)
1183 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1185 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1186 srcdir=$ac_optarg ;;
1188 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1189 | --syscon | --sysco | --sysc | --sys | --sy)
1190 ac_prev=sysconfdir ;;
1191 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1192 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1193 sysconfdir=$ac_optarg ;;
1195 -target | --target | --targe | --targ | --tar | --ta | --t)
1196 ac_prev=target_alias ;;
1197 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1198 target_alias=$ac_optarg ;;
1200 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1203 -version | --version | --versio | --versi | --vers | -V)
1204 ac_init_version=: ;;
1207 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1208 # Reject names that are not valid shell variable names.
1209 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1210 as_fn_error $? "invalid package name: $ac_useropt"
1211 ac_useropt_orig=$ac_useropt
1212 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1213 case $ac_user_opts in
1217 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1218 ac_unrecognized_sep=', ';;
1220 eval with_$ac_useropt=\$ac_optarg ;;
1222 -without-* | --without-*)
1223 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1224 # Reject names that are not valid shell variable names.
1225 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1226 as_fn_error $? "invalid package name: $ac_useropt"
1227 ac_useropt_orig=$ac_useropt
1228 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1229 case $ac_user_opts in
1233 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1234 ac_unrecognized_sep=', ';;
1236 eval with_$ac_useropt=no ;;
1239 # Obsolete; use --with-x.
1242 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1243 | --x-incl | --x-inc | --x-in | --x-i)
1244 ac_prev=x_includes ;;
1245 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1246 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1247 x_includes=$ac_optarg ;;
1249 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1250 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1251 ac_prev=x_libraries ;;
1252 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1253 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1254 x_libraries=$ac_optarg ;;
1256 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1257 Try \`$0 --help' for more information"
1261 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1262 # Reject names that are not valid shell variable names.
1263 case $ac_envvar in #(
1264 '' | [0-9]* | *[!_$as_cr_alnum]* )
1265 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1267 eval $ac_envvar=\$ac_optarg
1268 export $ac_envvar ;;
1271 # FIXME: should be removed in autoconf 3.0.
1272 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1273 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1274 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1275 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1281 if test -n "$ac_prev"; then
1282 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1283 as_fn_error $? "missing argument to $ac_option"
1286 if test -n "$ac_unrecognized_opts"; then
1287 case $enable_option_checking in
1289 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1290 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1294 # Check all directory arguments for consistency.
1295 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1296 datadir sysconfdir sharedstatedir localstatedir includedir \
1297 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1298 libdir localedir mandir
1300 eval ac_val=\$$ac_var
1301 # Remove trailing slashes.
1304 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1305 eval $ac_var=\$ac_val;;
1307 # Be sure to have absolute directory names.
1309 [\\/$]* | ?:[\\/]* ) continue;;
1310 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1312 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1315 # There might be people who depend on the old broken behavior: `$host'
1316 # used to hold the argument of --host etc.
1317 # FIXME: To remove some day.
1320 target=$target_alias
1322 # FIXME: To remove some day.
1323 if test "x$host_alias" != x; then
1324 if test "x$build_alias" = x; then
1325 cross_compiling=maybe
1326 elif test "x$build_alias" != "x$host_alias"; then
1332 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1334 test "$silent" = yes && exec 6>/dev/null
1337 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1338 ac_ls_di=`ls -di .` &&
1339 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1340 as_fn_error $? "working directory cannot be determined"
1341 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1342 as_fn_error $? "pwd does not report name of working directory"
1345 # Find the source files, if location was not specified.
1346 if test -z "$srcdir"; then
1347 ac_srcdir_defaulted=yes
1348 # Try the directory containing this script, then the parent directory.
1349 ac_confdir=`$as_dirname -- "$as_myself" ||
1350 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1351 X"$as_myself" : 'X\(//\)[^/]' \| \
1352 X"$as_myself" : 'X\(//\)$' \| \
1353 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1354 $as_echo X"$as_myself" |
1355 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1373 if test ! -r "$srcdir/$ac_unique_file"; then
1377 ac_srcdir_defaulted=no
1379 if test ! -r "$srcdir/$ac_unique_file"; then
1380 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1381 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1383 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1385 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1387 # When building in place, set srcdir=.
1388 if test "$ac_abs_confdir" = "$ac_pwd"; then
1391 # Remove unnecessary trailing slashes from srcdir.
1392 # Double slashes in file names in object file debugging info
1393 # mess up M-x gdb in Emacs.
1395 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1397 for ac_var in $ac_precious_vars; do
1398 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1399 eval ac_env_${ac_var}_value=\$${ac_var}
1400 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1401 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1405 # Report the --help message.
1407 if test "$ac_init_help" = "long"; then
1408 # Omit some internal or obsolete options to make the list less imposing.
1409 # This message is too long to be a string in the A/UX 3.1 sh.
1411 \`configure' configures PostgreSQL 11devel to adapt to many kinds of systems.
1413 Usage: $0 [OPTION]... [VAR=VALUE]...
1415 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1416 VAR=VALUE. See below for descriptions of some of the useful variables.
1418 Defaults for the options are specified in brackets.
1421 -h, --help display this help and exit
1422 --help=short display options specific to this package
1423 --help=recursive display the short help of all the included packages
1424 -V, --version display version information and exit
1425 -q, --quiet, --silent do not print \`checking ...' messages
1426 --cache-file=FILE cache test results in FILE [disabled]
1427 -C, --config-cache alias for \`--cache-file=config.cache'
1428 -n, --no-create do not create output files
1429 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1431 Installation directories:
1432 --prefix=PREFIX install architecture-independent files in PREFIX
1433 [$ac_default_prefix]
1434 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1437 By default, \`make install' will install all the files in
1438 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1439 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1440 for instance \`--prefix=\$HOME'.
1442 For better control, use the options below.
1444 Fine tuning of the installation directories:
1445 --bindir=DIR user executables [EPREFIX/bin]
1446 --sbindir=DIR system admin executables [EPREFIX/sbin]
1447 --libexecdir=DIR program executables [EPREFIX/libexec]
1448 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1449 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1450 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1451 --libdir=DIR object code libraries [EPREFIX/lib]
1452 --includedir=DIR C header files [PREFIX/include]
1453 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1454 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1455 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1456 --infodir=DIR info documentation [DATAROOTDIR/info]
1457 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1458 --mandir=DIR man documentation [DATAROOTDIR/man]
1459 --docdir=DIR documentation root [DATAROOTDIR/doc/postgresql]
1460 --htmldir=DIR html documentation [DOCDIR]
1461 --dvidir=DIR dvi documentation [DOCDIR]
1462 --pdfdir=DIR pdf documentation [DOCDIR]
1463 --psdir=DIR ps documentation [DOCDIR]
1469 --build=BUILD configure for building on BUILD [guessed]
1470 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1474 if test -n "$ac_init_help"; then
1475 case $ac_init_help in
1476 short | recursive ) echo "Configuration of PostgreSQL 11devel:";;
1481 --disable-option-checking ignore unrecognized --enable/--with options
1482 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1483 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1484 --disable-integer-datetimes
1485 obsolete option, no longer supported
1486 --enable-nls[=LANGUAGES]
1487 enable Native Language Support
1488 --disable-rpath do not embed shared library search path in
1490 --disable-spinlocks do not use spinlocks
1491 --disable-atomics do not use atomic operations
1492 --disable-strong-random do not use a strong random number source
1493 --enable-debug build with debugging symbols (-g)
1494 --enable-profiling build with profiling enabled
1495 --enable-coverage build with coverage testing instrumentation
1496 --enable-dtrace build with DTrace support
1497 --enable-tap-tests enable TAP tests (requires Perl and IPC::Run)
1498 --enable-depend turn on automatic dependency tracking
1499 --enable-cassert enable assertion checks (for debugging)
1500 --disable-thread-safety disable thread-safety in client libraries
1501 --disable-largefile omit support for large files
1502 --disable-float4-byval disable float4 passed by value
1503 --disable-float8-byval disable float8 passed by value
1506 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1507 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1508 --with-extra-version=STRING
1509 append STRING to version
1510 --with-template=NAME override operating system template
1511 --with-includes=DIRS look for additional header files in DIRS
1512 --with-libraries=DIRS look for additional libraries in DIRS
1513 --with-libs=DIRS alternative spelling of --with-libraries
1514 --with-pgport=PORTNUM set default port number [5432]
1515 --with-blocksize=BLOCKSIZE
1516 set table block size in kB [8]
1517 --with-segsize=SEGSIZE set table segment size in GB [1]
1518 --with-wal-blocksize=BLOCKSIZE
1519 set WAL block size in kB [8]
1520 --with-CC=CMD set compiler (deprecated)
1521 --with-icu build with ICU support
1522 --with-tcl build Tcl modules (PL/Tcl)
1523 --with-tclconfig=DIR tclConfig.sh is in DIR
1524 --with-perl build Perl modules (PL/Perl)
1525 --with-python build Python modules (PL/Python)
1526 --with-gssapi build with GSSAPI support
1527 --with-krb-srvnam=NAME default service principal name in Kerberos (GSSAPI)
1529 --with-pam build with PAM support
1530 --with-bsd-auth build with BSD Authentication support
1531 --with-ldap build with LDAP support
1532 --with-bonjour build with Bonjour support
1533 --with-openssl build with OpenSSL support
1534 --with-selinux build with SELinux support
1535 --with-systemd build with systemd support
1536 --without-readline do not use GNU Readline nor BSD Libedit for editing
1537 --with-libedit-preferred
1538 prefer BSD Libedit over GNU Readline
1539 --with-uuid=LIB build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1540 --with-ossp-uuid obsolete spelling of --with-uuid=ossp
1541 --with-libxml build with XML support
1542 --with-libxslt use XSLT support when building contrib/xml2
1543 --with-system-tzdata=DIR
1544 use system time zone data in DIR
1545 --without-zlib do not use Zlib
1546 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1548 Some influential environment variables:
1549 CC C compiler command
1550 CFLAGS C compiler flags
1551 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1552 nonstandard directory <lib dir>
1553 LIBS libraries to pass to the linker, e.g. -l<library>
1554 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1555 you have headers in a nonstandard directory <include dir>
1557 PKG_CONFIG path to pkg-config utility
1559 directories to add to pkg-config's search path
1561 path overriding pkg-config's built-in search path
1562 ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
1563 ICU_LIBS linker flags for ICU, overriding pkg-config
1564 LDFLAGS_EX extra linker flags for linking executables only
1565 LDFLAGS_SL extra linker flags for linking shared libraries only
1567 Use these variables to override the choices made by `configure' or to help
1568 it to find libraries and programs with nonstandard names/locations.
1570 Report bugs to <pgsql-bugs@postgresql.org>.
1575 if test "$ac_init_help" = "recursive"; then
1576 # If there are subdirs, report their specific --help.
1577 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1578 test -d "$ac_dir" ||
1579 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1584 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1586 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1587 # A ".." for each directory in $ac_dir_suffix.
1588 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1589 case $ac_top_builddir_sub in
1590 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1591 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1594 ac_abs_top_builddir=$ac_pwd
1595 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1596 # for backward compatibility:
1597 ac_top_builddir=$ac_top_build_prefix
1600 .) # We are building in place.
1602 ac_top_srcdir=$ac_top_builddir_sub
1603 ac_abs_top_srcdir=$ac_pwd ;;
1604 [\\/]* | ?:[\\/]* ) # Absolute name.
1605 ac_srcdir=$srcdir$ac_dir_suffix;
1606 ac_top_srcdir=$srcdir
1607 ac_abs_top_srcdir=$srcdir ;;
1609 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1610 ac_top_srcdir=$ac_top_build_prefix$srcdir
1611 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1613 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1615 cd "$ac_dir" || { ac_status=$?; continue; }
1616 # Check for guested configure.
1617 if test -f "$ac_srcdir/configure.gnu"; then
1619 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1620 elif test -f "$ac_srcdir/configure"; then
1622 $SHELL "$ac_srcdir/configure" --help=recursive
1624 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1626 cd "$ac_pwd" || { ac_status=$?; break; }
1630 test -n "$ac_init_help" && exit $ac_status
1631 if $ac_init_version; then
1633 PostgreSQL configure 11devel
1634 generated by GNU Autoconf 2.69
1636 Copyright (C) 2012 Free Software Foundation, Inc.
1637 This configure script is free software; the Free Software Foundation
1638 gives unlimited permission to copy, distribute and modify it.
1640 Copyright (c) 1996-2017, PostgreSQL Global Development Group
1645 ## ------------------------ ##
1646 ## Autoconf initialization. ##
1647 ## ------------------------ ##
1649 # ac_fn_c_try_compile LINENO
1650 # --------------------------
1651 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1652 ac_fn_c_try_compile ()
1654 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1655 rm -f conftest.$ac_objext
1656 if { { ac_try="$ac_compile"
1658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1659 *) ac_try_echo=$ac_try;;
1661 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1662 $as_echo "$ac_try_echo"; } >&5
1663 (eval "$ac_compile") 2>conftest.err
1665 if test -s conftest.err; then
1666 grep -v '^ *+' conftest.err >conftest.er1
1667 cat conftest.er1 >&5
1668 mv -f conftest.er1 conftest.err
1670 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1671 test $ac_status = 0; } && {
1672 test -z "$ac_c_werror_flag" ||
1673 test ! -s conftest.err
1674 } && test -s conftest.$ac_objext; then :
1677 $as_echo "$as_me: failed program was:" >&5
1678 sed 's/^/| /' conftest.$ac_ext >&5
1682 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1683 as_fn_set_status $ac_retval
1685 } # ac_fn_c_try_compile
1687 # ac_fn_c_try_link LINENO
1688 # -----------------------
1689 # Try to link conftest.$ac_ext, and return whether this succeeded.
1692 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1693 rm -f conftest.$ac_objext conftest$ac_exeext
1694 if { { ac_try="$ac_link"
1696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1697 *) ac_try_echo=$ac_try;;
1699 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1700 $as_echo "$ac_try_echo"; } >&5
1701 (eval "$ac_link") 2>conftest.err
1703 if test -s conftest.err; then
1704 grep -v '^ *+' conftest.err >conftest.er1
1705 cat conftest.er1 >&5
1706 mv -f conftest.er1 conftest.err
1708 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1709 test $ac_status = 0; } && {
1710 test -z "$ac_c_werror_flag" ||
1711 test ! -s conftest.err
1712 } && test -s conftest$ac_exeext && {
1713 test "$cross_compiling" = yes ||
1714 test -x conftest$ac_exeext
1718 $as_echo "$as_me: failed program was:" >&5
1719 sed 's/^/| /' conftest.$ac_ext >&5
1723 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1724 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1725 # interfere with the next link command; also delete a directory that is
1726 # left behind by Apple's compiler. We do this before executing the actions.
1727 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1728 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1729 as_fn_set_status $ac_retval
1731 } # ac_fn_c_try_link
1733 # ac_fn_c_try_cpp LINENO
1734 # ----------------------
1735 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1738 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1739 if { { ac_try="$ac_cpp conftest.$ac_ext"
1741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1742 *) ac_try_echo=$ac_try;;
1744 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1745 $as_echo "$ac_try_echo"; } >&5
1746 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1748 if test -s conftest.err; then
1749 grep -v '^ *+' conftest.err >conftest.er1
1750 cat conftest.er1 >&5
1751 mv -f conftest.er1 conftest.err
1753 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1754 test $ac_status = 0; } > conftest.i && {
1755 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1756 test ! -s conftest.err
1760 $as_echo "$as_me: failed program was:" >&5
1761 sed 's/^/| /' conftest.$ac_ext >&5
1765 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1766 as_fn_set_status $ac_retval
1770 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1771 # -------------------------------------------------------
1772 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1773 # the include files in INCLUDES and setting the cache variable VAR
1775 ac_fn_c_check_header_mongrel ()
1777 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1778 if eval \${$3+:} false; then :
1779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1780 $as_echo_n "checking for $2... " >&6; }
1781 if eval \${$3+:} false; then :
1782 $as_echo_n "(cached) " >&6
1785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1786 $as_echo "$ac_res" >&6; }
1788 # Is the header compilable?
1789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1790 $as_echo_n "checking $2 usability... " >&6; }
1791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1792 /* end confdefs.h. */
1796 if ac_fn_c_try_compile "$LINENO"; then :
1797 ac_header_compiler=yes
1799 ac_header_compiler=no
1801 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1803 $as_echo "$ac_header_compiler" >&6; }
1805 # Is the header present?
1806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1807 $as_echo_n "checking $2 presence... " >&6; }
1808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1809 /* end confdefs.h. */
1812 if ac_fn_c_try_cpp "$LINENO"; then :
1813 ac_header_preproc=yes
1815 ac_header_preproc=no
1817 rm -f conftest.err conftest.i conftest.$ac_ext
1818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1819 $as_echo "$ac_header_preproc" >&6; }
1821 # So? What about this header?
1822 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1825 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1827 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1831 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1833 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1835 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1837 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1838 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1839 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1840 ( $as_echo "## ---------------------------------------- ##
1841 ## Report this to pgsql-bugs@postgresql.org ##
1842 ## ---------------------------------------- ##"
1843 ) | sed "s/^/$as_me: WARNING: /" >&2
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1847 $as_echo_n "checking for $2... " >&6; }
1848 if eval \${$3+:} false; then :
1849 $as_echo_n "(cached) " >&6
1851 eval "$3=\$ac_header_compiler"
1854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1855 $as_echo "$ac_res" >&6; }
1857 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1859 } # ac_fn_c_check_header_mongrel
1861 # ac_fn_c_try_run LINENO
1862 # ----------------------
1863 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1864 # that executables *can* be run.
1867 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1868 if { { ac_try="$ac_link"
1870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1871 *) ac_try_echo=$ac_try;;
1873 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1874 $as_echo "$ac_try_echo"; } >&5
1875 (eval "$ac_link") 2>&5
1877 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1878 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1879 { { case "(($ac_try" in
1880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1881 *) ac_try_echo=$ac_try;;
1883 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1884 $as_echo "$ac_try_echo"; } >&5
1885 (eval "$ac_try") 2>&5
1887 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1888 test $ac_status = 0; }; }; then :
1891 $as_echo "$as_me: program exited with status $ac_status" >&5
1892 $as_echo "$as_me: failed program was:" >&5
1893 sed 's/^/| /' conftest.$ac_ext >&5
1895 ac_retval=$ac_status
1897 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1898 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1899 as_fn_set_status $ac_retval
1903 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1904 # -------------------------------------------------------
1905 # Tests whether HEADER exists and can be compiled using the include files in
1906 # INCLUDES, setting the cache variable VAR accordingly.
1907 ac_fn_c_check_header_compile ()
1909 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1911 $as_echo_n "checking for $2... " >&6; }
1912 if eval \${$3+:} false; then :
1913 $as_echo_n "(cached) " >&6
1915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1916 /* end confdefs.h. */
1920 if ac_fn_c_try_compile "$LINENO"; then :
1925 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1929 $as_echo "$ac_res" >&6; }
1930 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1932 } # ac_fn_c_check_header_compile
1934 # ac_fn_c_check_func LINENO FUNC VAR
1935 # ----------------------------------
1936 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1937 ac_fn_c_check_func ()
1939 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1941 $as_echo_n "checking for $2... " >&6; }
1942 if eval \${$3+:} false; then :
1943 $as_echo_n "(cached) " >&6
1945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1946 /* end confdefs.h. */
1947 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1948 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1949 #define $2 innocuous_$2
1951 /* System header to define __stub macros and hopefully few prototypes,
1952 which can conflict with char $2 (); below.
1953 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1954 <limits.h> exists even on freestanding compilers. */
1957 # include <limits.h>
1959 # include <assert.h>
1964 /* Override any GCC internal prototype to avoid an error.
1965 Use char because int might match the return type of a GCC
1966 builtin and then its argument prototype would still apply. */
1971 /* The GNU C library defines this for functions which it implements
1972 to always fail with ENOSYS. Some functions are actually named
1973 something starting with __ and the normal name is an alias. */
1974 #if defined __stub_$2 || defined __stub___$2
1986 if ac_fn_c_try_link "$LINENO"; then :
1991 rm -f core conftest.err conftest.$ac_objext \
1992 conftest$ac_exeext conftest.$ac_ext
1995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1996 $as_echo "$ac_res" >&6; }
1997 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1999 } # ac_fn_c_check_func
2001 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2002 # ----------------------------------------------------
2003 # Tries to find if the field MEMBER exists in type AGGR, after including
2004 # INCLUDES, setting cache variable VAR accordingly.
2005 ac_fn_c_check_member ()
2007 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2009 $as_echo_n "checking for $2.$3... " >&6; }
2010 if eval \${$4+:} false; then :
2011 $as_echo_n "(cached) " >&6
2013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2014 /* end confdefs.h. */
2026 if ac_fn_c_try_compile "$LINENO"; then :
2029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2030 /* end confdefs.h. */
2036 if (sizeof ac_aggr.$3)
2042 if ac_fn_c_try_compile "$LINENO"; then :
2047 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2049 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2053 $as_echo "$ac_res" >&6; }
2054 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2056 } # ac_fn_c_check_member
2058 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2059 # -------------------------------------------
2060 # Tests whether TYPE exists after having included INCLUDES, setting cache
2061 # variable VAR accordingly.
2062 ac_fn_c_check_type ()
2064 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2066 $as_echo_n "checking for $2... " >&6; }
2067 if eval \${$3+:} false; then :
2068 $as_echo_n "(cached) " >&6
2071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2072 /* end confdefs.h. */
2083 if ac_fn_c_try_compile "$LINENO"; then :
2084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2085 /* end confdefs.h. */
2096 if ac_fn_c_try_compile "$LINENO"; then :
2101 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2103 rm -f core conftest.err conftest.$ac_objext 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_type
2112 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2113 # --------------------------------------------
2114 # Tries to find the compile-time value of EXPR in a program that includes
2115 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2117 ac_fn_c_compute_int ()
2119 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2120 if test "$cross_compiling" = yes; then
2121 # Depending upon the size, compute the lo and hi bounds.
2122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2123 /* end confdefs.h. */
2128 static int test_array [1 - 2 * !(($2) >= 0)];
2130 return test_array [0];
2136 if ac_fn_c_try_compile "$LINENO"; then :
2139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2140 /* end confdefs.h. */
2145 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2147 return test_array [0];
2153 if ac_fn_c_try_compile "$LINENO"; then :
2154 ac_hi=$ac_mid; break
2156 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2157 if test $ac_lo -le $ac_mid; then
2161 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2163 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2167 /* end confdefs.h. */
2172 static int test_array [1 - 2 * !(($2) < 0)];
2174 return test_array [0];
2180 if ac_fn_c_try_compile "$LINENO"; then :
2183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2184 /* end confdefs.h. */
2189 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2191 return test_array [0];
2197 if ac_fn_c_try_compile "$LINENO"; then :
2198 ac_lo=$ac_mid; break
2200 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2201 if test $ac_mid -le $ac_hi; then
2205 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2207 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2212 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2215 # Binary search between lo and hi bounds.
2216 while test "x$ac_lo" != "x$ac_hi"; do
2217 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2219 /* end confdefs.h. */
2224 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2226 return test_array [0];
2232 if ac_fn_c_try_compile "$LINENO"; then :
2235 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2237 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2240 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2245 /* end confdefs.h. */
2247 static long int longval () { return $2; }
2248 static unsigned long int ulongval () { return $2; }
2255 FILE *f = fopen ("conftest.val", "w");
2260 long int i = longval ();
2263 fprintf (f, "%ld", i);
2267 unsigned long int i = ulongval ();
2270 fprintf (f, "%lu", i);
2272 /* Do not output a trailing newline, as this causes \r\n confusion
2273 on some platforms. */
2274 return ferror (f) || fclose (f) != 0;
2280 if ac_fn_c_try_run "$LINENO"; then :
2281 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2285 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2286 conftest.$ac_objext conftest.beam conftest.$ac_ext
2290 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2291 as_fn_set_status $ac_retval
2293 } # ac_fn_c_compute_int
2295 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2296 # ---------------------------------------------
2297 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2299 ac_fn_c_check_decl ()
2301 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2302 as_decl_name=`echo $2|sed 's/ *(.*//'`
2303 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2305 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2306 if eval \${$3+:} false; then :
2307 $as_echo_n "(cached) " >&6
2309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2310 /* end confdefs.h. */
2315 #ifndef $as_decl_name
2317 (void) $as_decl_use;
2319 (void) $as_decl_name;
2327 if ac_fn_c_try_compile "$LINENO"; then :
2332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2336 $as_echo "$ac_res" >&6; }
2337 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2339 } # ac_fn_c_check_decl
2340 cat >config.log <<_ACEOF
2341 This file contains any messages produced by compilers while
2342 running configure, to aid debugging if configure makes a mistake.
2344 It was created by PostgreSQL $as_me 11devel, which was
2345 generated by GNU Autoconf 2.69. Invocation command line was
2357 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2358 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2359 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2360 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2361 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2363 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2364 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2366 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2367 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2368 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2369 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2370 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2371 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2372 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2376 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2380 test -z "$as_dir" && as_dir=.
2381 $as_echo "PATH: $as_dir"
2397 # Keep a trace of the command line.
2398 # Strip out --no-create and --no-recursion so they do not pile up.
2399 # Strip out --silent because we don't want to record it for future runs.
2400 # Also quote any args containing shell meta-characters.
2401 # Make two passes to allow for proper duplicate-argument suppression.
2405 ac_must_keep_next=false
2411 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2412 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2413 | -silent | --silent | --silen | --sile | --sil)
2416 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2419 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2421 as_fn_append ac_configure_args1 " '$ac_arg'"
2422 if test $ac_must_keep_next = true; then
2423 ac_must_keep_next=false # Got value, back to normal.
2426 *=* | --config-cache | -C | -disable-* | --disable-* \
2427 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2428 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2429 | -with-* | --with-* | -without-* | --without-* | --x)
2430 case "$ac_configure_args0 " in
2431 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2434 -* ) ac_must_keep_next=true ;;
2437 as_fn_append ac_configure_args " '$ac_arg'"
2442 { ac_configure_args0=; unset ac_configure_args0;}
2443 { ac_configure_args1=; unset ac_configure_args1;}
2445 # When interrupted or exit'd, cleanup temporary files, and complete
2446 # config.log. We remove comments because anyway the quotes in there
2447 # would cause problems or look ugly.
2448 # WARNING: Use '\'' to represent an apostrophe within the trap.
2449 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2450 trap 'exit_status=$?
2451 # Save into config.log some information that might help in debugging.
2455 $as_echo "## ---------------- ##
2456 ## Cache variables. ##
2457 ## ---------------- ##"
2459 # The following way of writing the cache mishandles newlines in values,
2461 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2462 eval ac_val=\$$ac_var
2466 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2467 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2470 _ | IFS | as_nl) ;; #(
2471 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2472 *) { eval $ac_var=; unset $ac_var;} ;;
2477 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2478 *${as_nl}ac_space=\ *)
2480 "s/'\''/'\''\\\\'\'''\''/g;
2481 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2484 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2491 $as_echo "## ----------------- ##
2492 ## Output variables. ##
2493 ## ----------------- ##"
2495 for ac_var in $ac_subst_vars
2497 eval ac_val=\$$ac_var
2499 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2501 $as_echo "$ac_var='\''$ac_val'\''"
2505 if test -n "$ac_subst_files"; then
2506 $as_echo "## ------------------- ##
2507 ## File substitutions. ##
2508 ## ------------------- ##"
2510 for ac_var in $ac_subst_files
2512 eval ac_val=\$$ac_var
2514 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2516 $as_echo "$ac_var='\''$ac_val'\''"
2521 if test -s confdefs.h; then
2522 $as_echo "## ----------- ##
2529 test "$ac_signal" != 0 &&
2530 $as_echo "$as_me: caught signal $ac_signal"
2531 $as_echo "$as_me: exit $exit_status"
2533 rm -f core *.core core.conftest.* &&
2534 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2537 for ac_signal in 1 2 13 15; do
2538 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2542 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2543 rm -f -r conftest* confdefs.h
2545 $as_echo "/* confdefs.h */" > confdefs.h
2547 # Predefined preprocessor variables.
2549 cat >>confdefs.h <<_ACEOF
2550 #define PACKAGE_NAME "$PACKAGE_NAME"
2553 cat >>confdefs.h <<_ACEOF
2554 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2557 cat >>confdefs.h <<_ACEOF
2558 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2561 cat >>confdefs.h <<_ACEOF
2562 #define PACKAGE_STRING "$PACKAGE_STRING"
2565 cat >>confdefs.h <<_ACEOF
2566 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2569 cat >>confdefs.h <<_ACEOF
2570 #define PACKAGE_URL "$PACKAGE_URL"
2574 # Let the site file select an alternate cache file if it wants to.
2575 # Prefer an explicitly selected file to automatically selected ones.
2578 if test -n "$CONFIG_SITE"; then
2579 # We do not want a PATH search for config.site.
2580 case $CONFIG_SITE in #((
2581 -*) ac_site_file1=./$CONFIG_SITE;;
2582 */*) ac_site_file1=$CONFIG_SITE;;
2583 *) ac_site_file1=./$CONFIG_SITE;;
2585 elif test "x$prefix" != xNONE; then
2586 ac_site_file1=$prefix/share/config.site
2587 ac_site_file2=$prefix/etc/config.site
2589 ac_site_file1=$ac_default_prefix/share/config.site
2590 ac_site_file2=$ac_default_prefix/etc/config.site
2592 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2594 test "x$ac_site_file" = xNONE && continue
2595 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2596 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2597 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2598 sed 's/^/| /' "$ac_site_file" >&5
2600 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2601 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2602 as_fn_error $? "failed to load site script $ac_site_file
2603 See \`config.log' for more details" "$LINENO" 5; }
2607 if test -r "$cache_file"; then
2608 # Some versions of bash will fail to source /dev/null (special files
2609 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2610 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2611 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2612 $as_echo "$as_me: loading cache $cache_file" >&6;}
2614 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2615 *) . "./$cache_file";;
2619 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2620 $as_echo "$as_me: creating cache $cache_file" >&6;}
2624 # Check that the precious variables saved in the cache have kept the same
2626 ac_cache_corrupted=false
2627 for ac_var in $ac_precious_vars; do
2628 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2629 eval ac_new_set=\$ac_env_${ac_var}_set
2630 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2631 eval ac_new_val=\$ac_env_${ac_var}_value
2632 case $ac_old_set,$ac_new_set in
2634 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2635 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2636 ac_cache_corrupted=: ;;
2638 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2639 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2640 ac_cache_corrupted=: ;;
2643 if test "x$ac_old_val" != "x$ac_new_val"; then
2644 # differences in whitespace do not lead to failure.
2645 ac_old_val_w=`echo x $ac_old_val`
2646 ac_new_val_w=`echo x $ac_new_val`
2647 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2648 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2649 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2650 ac_cache_corrupted=:
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2653 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2654 eval $ac_var=\$ac_old_val
2656 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2657 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2658 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2659 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2662 # Pass precious variables to config.status.
2663 if test "$ac_new_set" = set; then
2665 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2666 *) ac_arg=$ac_var=$ac_new_val ;;
2668 case " $ac_configure_args " in
2669 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2670 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2674 if $ac_cache_corrupted; then
2675 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2676 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2677 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2678 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2679 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2681 ## -------------------- ##
2682 ## Main body of script. ##
2683 ## -------------------- ##
2686 ac_cpp='$CPP $CPPFLAGS'
2687 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2688 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2689 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2697 for ac_dir in config "$srcdir"/config; do
2698 if test -f "$ac_dir/install-sh"; then
2700 ac_install_sh="$ac_aux_dir/install-sh -c"
2702 elif test -f "$ac_dir/install.sh"; then
2704 ac_install_sh="$ac_aux_dir/install.sh -c"
2706 elif test -f "$ac_dir/shtool"; then
2708 ac_install_sh="$ac_aux_dir/shtool install -c"
2712 if test -z "$ac_aux_dir"; then
2713 as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2716 # These three variables are undocumented and unsupported,
2717 # and are intended to be withdrawn in a future Autoconf release.
2718 # They can cause serious problems if a builder's source tree is in a directory
2719 # whose full name contains unusual characters.
2720 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2721 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2722 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2726 configure_args=$ac_configure_args
2729 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2732 cat >>confdefs.h <<_ACEOF
2733 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2740 # Check whether --with-extra-version was given.
2741 if test "${with_extra_version+set}" = set; then :
2742 withval=$with_extra_version;
2745 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2748 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2751 PG_VERSION="$PACKAGE_VERSION$withval"
2756 PG_VERSION="$PACKAGE_VERSION"
2761 cat >>confdefs.h <<_ACEOF
2762 #define PG_VERSION "$PG_VERSION"
2766 # Make sure we can run config.sub.
2767 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2768 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2771 $as_echo_n "checking build system type... " >&6; }
2772 if ${ac_cv_build+:} false; then :
2773 $as_echo_n "(cached) " >&6
2775 ac_build_alias=$build_alias
2776 test "x$ac_build_alias" = x &&
2777 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2778 test "x$ac_build_alias" = x &&
2779 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2780 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2781 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2785 $as_echo "$ac_cv_build" >&6; }
2786 case $ac_cv_build in
2788 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2791 ac_save_IFS=$IFS; IFS='-'
2797 # Remember, the first character of IFS is used to create $*,
2798 # except with old shells:
2801 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2805 $as_echo_n "checking host system type... " >&6; }
2806 if ${ac_cv_host+:} false; then :
2807 $as_echo_n "(cached) " >&6
2809 if test "x$host_alias" = x; then
2810 ac_cv_host=$ac_cv_build
2812 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2813 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2818 $as_echo "$ac_cv_host" >&6; }
2821 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2824 ac_save_IFS=$IFS; IFS='-'
2830 # Remember, the first character of IFS is used to create $*,
2831 # except with old shells:
2834 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2840 $as_echo_n "checking which template to use... " >&6; }
2845 # Check whether --with-template was given.
2846 if test "${with_template+set}" = set; then :
2847 withval=$with_template;
2850 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2853 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2858 list) echo; ls "$srcdir/src/template"; exit;;
2859 *) if test -f "$srcdir/src/template/$with_template" ; then
2862 as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2871 # --with-template not given
2874 aix*) template=aix ;;
2875 cygwin*) template=cygwin ;;
2876 darwin*) template=darwin ;;
2877 dragonfly*) template=netbsd ;;
2878 freebsd*) template=freebsd ;;
2879 hpux*) template=hpux ;;
2880 linux*|gnu*|k*bsd*-gnu)
2882 mingw*) template=win32 ;;
2883 netbsd*) template=netbsd ;;
2884 openbsd*) template=openbsd ;;
2885 solaris*) template=solaris ;;
2888 if test x"$template" = x"" ; then
2890 *******************************************************************
2891 PostgreSQL has apparently not been ported to your platform yet.
2892 To try a manual configuration, look into the src/template directory
2893 for a similar platform and use the '--with-template=' option.
2895 Please also contact <pgsql-bugs@postgresql.org> to see about
2896 rectifying this. Include the above 'checking host system type...'
2898 *******************************************************************
2907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2908 $as_echo "$template" >&6; }
2913 # Initialize default assumption that we do not need separate assembly code
2914 # for TAS (test-and-set). This can be overridden by the template file
2915 # when it's executed.
2922 ## Command line options
2926 # Add non-standard directories to the include path
2931 # Check whether --with-includes was given.
2932 if test "${with_includes+set}" = set; then :
2933 withval=$with_includes;
2936 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2939 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2952 # Add non-standard directories to the library search path
2957 # Check whether --with-libraries was given.
2958 if test "${with_libraries+set}" = set; then :
2959 withval=$with_libraries;
2962 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2965 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2968 LIBRARY_DIRS=$withval
2979 # Check whether --with-libs was given.
2980 if test "${with_libs+set}" = set; then :
2984 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2987 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2990 LIBRARY_DIRS=$withval
3000 # 64-bit integer date/time storage is now the only option, but to avoid
3001 # unnecessary breakage of build scripts, continue to accept an explicit
3002 # "--enable-integer-datetimes" switch.
3006 # Check whether --enable-integer-datetimes was given.
3007 if test "${enable_integer_datetimes+set}" = set; then :
3008 enableval=$enable_integer_datetimes;
3014 as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3017 as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3022 enable_integer_datetimes=yes
3032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3033 $as_echo_n "checking whether NLS is wanted... " >&6; }
3036 # Check whether --enable-nls was given.
3037 if test "${enable_nls+set}" = set; then :
3038 enableval=$enable_nls;
3048 WANTED_LANGUAGES=$enableval
3058 if test "$enable_nls" = yes; then
3060 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3065 $as_echo "$enable_nls" >&6; }
3070 # Default port number (--with-pgport), default 5432
3072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3073 $as_echo_n "checking for default port number... " >&6; }
3077 # Check whether --with-pgport was given.
3078 if test "${with_pgport+set}" = set; then :
3079 withval=$with_pgport;
3082 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3085 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3088 default_port=$withval
3097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3098 $as_echo "$default_port" >&6; }
3099 # Need both of these because some places want an integer and some a string
3101 cat >>confdefs.h <<_ACEOF
3102 #define DEF_PGPORT ${default_port}
3106 cat >>confdefs.h <<_ACEOF
3107 #define DEF_PGPORT_STR "${default_port}"
3112 # It's worth validating port; you can get very confusing errors otherwise
3113 if test x"$default_port" = x""; then
3114 as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3115 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3116 as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3117 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3118 as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3119 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3120 as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3124 # '-rpath'-like feature can be disabled
3128 # Check whether --enable-rpath was given.
3129 if test "${enable_rpath+set}" = set; then :
3130 enableval=$enable_rpath;
3139 as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3156 # Check whether --enable-spinlocks was given.
3157 if test "${enable_spinlocks+set}" = set; then :
3158 enableval=$enable_spinlocks;
3167 as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3172 enable_spinlocks=yes
3183 # Check whether --enable-atomics was given.
3184 if test "${enable_atomics+set}" = set; then :
3185 enableval=$enable_atomics;
3194 as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3206 # Random number generation
3210 # Check whether --enable-strong-random was given.
3211 if test "${enable_strong_random+set}" = set; then :
3212 enableval=$enable_strong_random;
3221 as_fn_error $? "no argument expected for --enable-strong-random option" "$LINENO" 5
3226 enable_strong_random=yes
3234 # --enable-debug adds -g to compiler flags
3238 # Check whether --enable-debug was given.
3239 if test "${enable_debug+set}" = set; then :
3240 enableval=$enable_debug;
3249 as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3262 # --enable-profiling enables gcc profiling
3266 # Check whether --enable-profiling was given.
3267 if test "${enable_profiling+set}" = set; then :
3268 enableval=$enable_profiling;
3277 as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3289 # --enable-coverage enables generation of code coverage metrics with gcov
3293 # Check whether --enable-coverage was given.
3294 if test "${enable_coverage+set}" = set; then :
3295 enableval=$enable_coverage;
3298 if test -z "$GCOV"; then
3301 # Extract the first word of "$ac_prog", so it can be a program name with args.
3302 set dummy $ac_prog; ac_word=$2
3303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3304 $as_echo_n "checking for $ac_word... " >&6; }
3305 if ${ac_cv_path_GCOV+:} false; then :
3306 $as_echo_n "(cached) " >&6
3310 ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3313 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3317 test -z "$as_dir" && as_dir=.
3318 for ac_exec_ext in '' $ac_executable_extensions; do
3319 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3320 ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3321 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3331 GCOV=$ac_cv_path_GCOV
3332 if test -n "$GCOV"; then
3333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3334 $as_echo "$GCOV" >&6; }
3336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3337 $as_echo "no" >&6; }
3341 test -n "$GCOV" && break
3345 # Report the value of GCOV in configure's output in all cases.
3346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3347 $as_echo_n "checking for GCOV... " >&6; }
3348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3349 $as_echo "$GCOV" >&6; }
3352 if test -z "$GCOV"; then
3353 as_fn_error $? "gcov not found" "$LINENO" 5
3355 if test -z "$LCOV"; then
3358 # Extract the first word of "$ac_prog", so it can be a program name with args.
3359 set dummy $ac_prog; ac_word=$2
3360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3361 $as_echo_n "checking for $ac_word... " >&6; }
3362 if ${ac_cv_path_LCOV+:} false; then :
3363 $as_echo_n "(cached) " >&6
3367 ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3370 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3374 test -z "$as_dir" && as_dir=.
3375 for ac_exec_ext in '' $ac_executable_extensions; do
3376 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3377 ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3378 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3388 LCOV=$ac_cv_path_LCOV
3389 if test -n "$LCOV"; then
3390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3391 $as_echo "$LCOV" >&6; }
3393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3394 $as_echo "no" >&6; }
3398 test -n "$LCOV" && break
3402 # Report the value of LCOV in configure's output in all cases.
3403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3404 $as_echo_n "checking for LCOV... " >&6; }
3405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3406 $as_echo "$LCOV" >&6; }
3409 if test -z "$LCOV"; then
3410 as_fn_error $? "lcov not found" "$LINENO" 5
3412 if test -z "$GENHTML"; then
3413 for ac_prog in genhtml
3415 # Extract the first word of "$ac_prog", so it can be a program name with args.
3416 set dummy $ac_prog; ac_word=$2
3417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3418 $as_echo_n "checking for $ac_word... " >&6; }
3419 if ${ac_cv_path_GENHTML+:} false; then :
3420 $as_echo_n "(cached) " >&6
3424 ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3427 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3431 test -z "$as_dir" && as_dir=.
3432 for ac_exec_ext in '' $ac_executable_extensions; do
3433 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3434 ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3435 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3445 GENHTML=$ac_cv_path_GENHTML
3446 if test -n "$GENHTML"; then
3447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3448 $as_echo "$GENHTML" >&6; }
3450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3451 $as_echo "no" >&6; }
3455 test -n "$GENHTML" && break
3459 # Report the value of GENHTML in configure's output in all cases.
3460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3461 $as_echo_n "checking for GENHTML... " >&6; }
3462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3463 $as_echo "$GENHTML" >&6; }
3466 if test -z "$GENHTML"; then
3467 as_fn_error $? "genhtml not found" "$LINENO" 5
3474 as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3491 # Check whether --enable-dtrace was given.
3492 if test "${enable_dtrace+set}" = set; then :
3493 enableval=$enable_dtrace;
3496 if test -z "$DTRACE"; then
3497 for ac_prog in dtrace
3499 # Extract the first word of "$ac_prog", so it can be a program name with args.
3500 set dummy $ac_prog; ac_word=$2
3501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3502 $as_echo_n "checking for $ac_word... " >&6; }
3503 if ${ac_cv_path_DTRACE+:} false; then :
3504 $as_echo_n "(cached) " >&6
3508 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3511 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3515 test -z "$as_dir" && as_dir=.
3516 for ac_exec_ext in '' $ac_executable_extensions; do
3517 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3518 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3519 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3529 DTRACE=$ac_cv_path_DTRACE
3530 if test -n "$DTRACE"; then
3531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3532 $as_echo "$DTRACE" >&6; }
3534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3535 $as_echo "no" >&6; }
3539 test -n "$DTRACE" && break
3543 # Report the value of DTRACE in configure's output in all cases.
3544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3545 $as_echo_n "checking for DTRACE... " >&6; }
3546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3547 $as_echo "$DTRACE" >&6; }
3550 if test -z "$DTRACE"; then
3551 as_fn_error $? "dtrace not found" "$LINENO" 5
3559 as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3576 # Check whether --enable-tap-tests was given.
3577 if test "${enable_tap_tests+set}" = set; then :
3578 enableval=$enable_tap_tests;
3587 as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3603 $as_echo_n "checking for block size... " >&6; }
3607 # Check whether --with-blocksize was given.
3608 if test "${with_blocksize+set}" = set; then :
3609 withval=$with_blocksize;
3612 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3615 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3627 case ${blocksize} in
3634 *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3637 $as_echo "${blocksize}kB" >&6; }
3640 cat >>confdefs.h <<_ACEOF
3641 #define BLCKSZ ${BLCKSZ}
3646 # Relation segment size
3648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3649 $as_echo_n "checking for segment size... " >&6; }
3653 # Check whether --with-segsize was given.
3654 if test "${with_segsize+set}" = set; then :
3655 withval=$with_segsize;
3658 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3661 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3673 # this expression is set up to avoid unnecessary integer overflow
3674 # blocksize is already guaranteed to be a factor of 1024
3675 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3676 test $? -eq 0 || exit 1
3677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3678 $as_echo "${segsize}GB" >&6; }
3681 cat >>confdefs.h <<_ACEOF
3682 #define RELSEG_SIZE ${RELSEG_SIZE}
3689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3690 $as_echo_n "checking for WAL block size... " >&6; }
3694 # Check whether --with-wal-blocksize was given.
3695 if test "${with_wal_blocksize+set}" = set; then :
3696 withval=$with_wal_blocksize;
3699 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3702 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3705 wal_blocksize=$withval
3714 case ${wal_blocksize} in
3715 1) XLOG_BLCKSZ=1024;;
3716 2) XLOG_BLCKSZ=2048;;
3717 4) XLOG_BLCKSZ=4096;;
3718 8) XLOG_BLCKSZ=8192;;
3719 16) XLOG_BLCKSZ=16384;;
3720 32) XLOG_BLCKSZ=32768;;
3721 64) XLOG_BLCKSZ=65536;;
3722 *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3725 $as_echo "${wal_blocksize}kB" >&6; }
3728 cat >>confdefs.h <<_ACEOF
3729 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3737 # For historical reasons you can also use --with-CC to specify the C compiler
3738 # to use, although the standard way to do this is to set the CC environment
3743 # Check whether --with-CC was given.
3744 if test "${with_CC+set}" = set; then :
3748 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3751 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3763 aix) pgac_cc_list="gcc xlc";;
3764 *) pgac_cc_list="gcc cc";;
3768 ac_cpp='$CPP $CPPFLAGS'
3769 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3770 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3771 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3772 if test -n "$ac_tool_prefix"; then
3773 for ac_prog in $pgac_cc_list
3775 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3776 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3778 $as_echo_n "checking for $ac_word... " >&6; }
3779 if ${ac_cv_prog_CC+:} false; then :
3780 $as_echo_n "(cached) " >&6
3782 if test -n "$CC"; then
3783 ac_cv_prog_CC="$CC" # Let the user override the test.
3785 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3789 test -z "$as_dir" && as_dir=.
3790 for ac_exec_ext in '' $ac_executable_extensions; do
3791 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3792 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3793 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3803 if test -n "$CC"; then
3804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3805 $as_echo "$CC" >&6; }
3807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3808 $as_echo "no" >&6; }
3812 test -n "$CC" && break
3815 if test -z "$CC"; then
3817 for ac_prog in $pgac_cc_list
3819 # Extract the first word of "$ac_prog", so it can be a program name with args.
3820 set dummy $ac_prog; ac_word=$2
3821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3822 $as_echo_n "checking for $ac_word... " >&6; }
3823 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3824 $as_echo_n "(cached) " >&6
3826 if test -n "$ac_ct_CC"; then
3827 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3829 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3833 test -z "$as_dir" && as_dir=.
3834 for ac_exec_ext in '' $ac_executable_extensions; do
3835 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3836 ac_cv_prog_ac_ct_CC="$ac_prog"
3837 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3846 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3847 if test -n "$ac_ct_CC"; then
3848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3849 $as_echo "$ac_ct_CC" >&6; }
3851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3852 $as_echo "no" >&6; }
3856 test -n "$ac_ct_CC" && break
3859 if test "x$ac_ct_CC" = x; then
3862 case $cross_compiling:$ac_tool_warned in
3864 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3865 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3866 ac_tool_warned=yes ;;
3873 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3874 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3875 as_fn_error $? "no acceptable C compiler found in \$PATH
3876 See \`config.log' for more details" "$LINENO" 5; }
3878 # Provide some information about the compiler.
3879 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3882 for ac_option in --version -v -V -qversion; do
3883 { { ac_try="$ac_compiler $ac_option >&5"
3885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3886 *) ac_try_echo=$ac_try;;
3888 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3889 $as_echo "$ac_try_echo"; } >&5
3890 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3892 if test -s conftest.err; then
3894 ... rest of stderr output deleted ...
3895 10q' conftest.err >conftest.er1
3896 cat conftest.er1 >&5
3898 rm -f conftest.er1 conftest.err
3899 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3900 test $ac_status = 0; }
3903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3904 /* end confdefs.h. */
3914 ac_clean_files_save=$ac_clean_files
3915 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3916 # Try to create an executable without -o first, disregard a.out.
3917 # It will help us diagnose broken compilers, and finding out an intuition
3919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3920 $as_echo_n "checking whether the C compiler works... " >&6; }
3921 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3923 # The possible output files:
3924 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3927 for ac_file in $ac_files
3930 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3931 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3936 if { { ac_try="$ac_link_default"
3938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3939 *) ac_try_echo=$ac_try;;
3941 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3942 $as_echo "$ac_try_echo"; } >&5
3943 (eval "$ac_link_default") 2>&5
3945 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3946 test $ac_status = 0; }; then :
3947 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3948 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3949 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3950 # so that the user can short-circuit this test for compilers unknown to
3952 for ac_file in $ac_files ''
3954 test -f "$ac_file" || continue
3956 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3959 # We found the default executable, but exeext='' is most
3963 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3965 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3967 # We set ac_cv_exeext here because the later test for it is not
3968 # safe: cross compilers may not add the suffix if given an `-o'
3969 # argument, so we may need to know it at that point already.
3970 # Even if this section looks crufty: it has the advantage of
3977 test "$ac_cv_exeext" = no && ac_cv_exeext=
3982 if test -z "$ac_file"; then :
3983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3984 $as_echo "no" >&6; }
3985 $as_echo "$as_me: failed program was:" >&5
3986 sed 's/^/| /' conftest.$ac_ext >&5
3988 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3989 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3990 as_fn_error 77 "C compiler cannot create executables
3991 See \`config.log' for more details" "$LINENO" 5; }
3993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3994 $as_echo "yes" >&6; }
3996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3997 $as_echo_n "checking for C compiler default output file name... " >&6; }
3998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3999 $as_echo "$ac_file" >&6; }
4000 ac_exeext=$ac_cv_exeext
4002 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4003 ac_clean_files=$ac_clean_files_save
4004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4005 $as_echo_n "checking for suffix of executables... " >&6; }
4006 if { { ac_try="$ac_link"
4008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4009 *) ac_try_echo=$ac_try;;
4011 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4012 $as_echo "$ac_try_echo"; } >&5
4013 (eval "$ac_link") 2>&5
4015 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4016 test $ac_status = 0; }; then :
4017 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4018 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4019 # work properly (i.e., refer to `conftest.exe'), while it won't with
4021 for ac_file in conftest.exe conftest conftest.*; do
4022 test -f "$ac_file" || continue
4024 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4025 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4031 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4032 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4033 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4034 See \`config.log' for more details" "$LINENO" 5; }
4036 rm -f conftest conftest$ac_cv_exeext
4037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4038 $as_echo "$ac_cv_exeext" >&6; }
4040 rm -f conftest.$ac_ext
4041 EXEEXT=$ac_cv_exeext
4043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4044 /* end confdefs.h. */
4049 FILE *f = fopen ("conftest.out", "w");
4050 return ferror (f) || fclose (f) != 0;
4056 ac_clean_files="$ac_clean_files conftest.out"
4057 # Check that the compiler produces executables we can run. If not, either
4058 # the compiler is broken, or we cross compile.
4059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4060 $as_echo_n "checking whether we are cross compiling... " >&6; }
4061 if test "$cross_compiling" != yes; then
4062 { { ac_try="$ac_link"
4064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4065 *) ac_try_echo=$ac_try;;
4067 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4068 $as_echo "$ac_try_echo"; } >&5
4069 (eval "$ac_link") 2>&5
4071 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4072 test $ac_status = 0; }
4073 if { ac_try='./conftest$ac_cv_exeext'
4074 { { case "(($ac_try" in
4075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4076 *) ac_try_echo=$ac_try;;
4078 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4079 $as_echo "$ac_try_echo"; } >&5
4080 (eval "$ac_try") 2>&5
4082 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4083 test $ac_status = 0; }; }; then
4086 if test "$cross_compiling" = maybe; then
4089 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4090 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4091 as_fn_error $? "cannot run C compiled programs.
4092 If you meant to cross compile, use \`--host'.
4093 See \`config.log' for more details" "$LINENO" 5; }
4097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4098 $as_echo "$cross_compiling" >&6; }
4100 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4101 ac_clean_files=$ac_clean_files_save
4102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4103 $as_echo_n "checking for suffix of object files... " >&6; }
4104 if ${ac_cv_objext+:} false; then :
4105 $as_echo_n "(cached) " >&6
4107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4108 /* end confdefs.h. */
4118 rm -f conftest.o conftest.obj
4119 if { { ac_try="$ac_compile"
4121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4122 *) ac_try_echo=$ac_try;;
4124 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4125 $as_echo "$ac_try_echo"; } >&5
4126 (eval "$ac_compile") 2>&5
4128 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4129 test $ac_status = 0; }; then :
4130 for ac_file in conftest.o conftest.obj conftest.*; do
4131 test -f "$ac_file" || continue;
4133 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4134 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4139 $as_echo "$as_me: failed program was:" >&5
4140 sed 's/^/| /' conftest.$ac_ext >&5
4142 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4143 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4144 as_fn_error $? "cannot compute suffix of object files: cannot compile
4145 See \`config.log' for more details" "$LINENO" 5; }
4147 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4150 $as_echo "$ac_cv_objext" >&6; }
4151 OBJEXT=$ac_cv_objext
4153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4154 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4155 if ${ac_cv_c_compiler_gnu+:} false; then :
4156 $as_echo_n "(cached) " >&6
4158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4159 /* end confdefs.h. */
4172 if ac_fn_c_try_compile "$LINENO"; then :
4177 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4178 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4182 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4183 if test $ac_compiler_gnu = yes; then
4188 ac_test_CFLAGS=${CFLAGS+set}
4189 ac_save_CFLAGS=$CFLAGS
4190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4191 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4192 if ${ac_cv_prog_cc_g+:} false; then :
4193 $as_echo_n "(cached) " >&6
4195 ac_save_c_werror_flag=$ac_c_werror_flag
4196 ac_c_werror_flag=yes
4199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4200 /* end confdefs.h. */
4210 if ac_fn_c_try_compile "$LINENO"; then :
4214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4215 /* end confdefs.h. */
4225 if ac_fn_c_try_compile "$LINENO"; then :
4228 ac_c_werror_flag=$ac_save_c_werror_flag
4230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4231 /* end confdefs.h. */
4241 if ac_fn_c_try_compile "$LINENO"; then :
4244 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4246 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4248 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4249 ac_c_werror_flag=$ac_save_c_werror_flag
4251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4252 $as_echo "$ac_cv_prog_cc_g" >&6; }
4253 if test "$ac_test_CFLAGS" = set; then
4254 CFLAGS=$ac_save_CFLAGS
4255 elif test $ac_cv_prog_cc_g = yes; then
4256 if test "$GCC" = yes; then
4262 if test "$GCC" = yes; then
4268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4269 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4270 if ${ac_cv_prog_cc_c89+:} false; then :
4271 $as_echo_n "(cached) " >&6
4273 ac_cv_prog_cc_c89=no
4275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4276 /* end confdefs.h. */
4280 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4281 struct buf { int x; };
4282 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4283 static char *e (p, i)
4289 static char *f (char * (*g) (char **, int), char **p, ...)
4294 s = g (p, va_arg (v,int));
4299 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4300 function prototypes and stuff, but not '\xHH' hex character constants.
4301 These don't provoke an error unfortunately, instead are silently treated
4302 as 'x'. The following induces an error, until -std is added to get
4303 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4304 array size at least. It's necessary to write '\x00'==0 to get something
4305 that's true only with -std. */
4306 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4308 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4309 inside strings and character constants. */
4311 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4313 int test (int i, double x);
4314 struct s1 {int (*f) (int a);};
4315 struct s2 {int (*f) (double a);};
4316 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4322 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4327 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4328 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4330 CC="$ac_save_CC $ac_arg"
4331 if ac_fn_c_try_compile "$LINENO"; then :
4332 ac_cv_prog_cc_c89=$ac_arg
4334 rm -f core conftest.err conftest.$ac_objext
4335 test "x$ac_cv_prog_cc_c89" != "xno" && break
4337 rm -f conftest.$ac_ext
4342 case "x$ac_cv_prog_cc_c89" in
4344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4345 $as_echo "none needed" >&6; } ;;
4347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4348 $as_echo "unsupported" >&6; } ;;
4350 CC="$CC $ac_cv_prog_cc_c89"
4351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4352 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4354 if test "x$ac_cv_prog_cc_c89" != xno; then :
4359 ac_cpp='$CPP $CPPFLAGS'
4360 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4361 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4362 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4365 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4366 # but has idiosyncrasies of its own. We assume icc will define
4367 # __INTEL_COMPILER regardless of CFLAGS.
4369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4370 /* end confdefs.h. */
4375 #ifndef __INTEL_COMPILER
4382 if ac_fn_c_try_compile "$LINENO"; then :
4387 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4389 # Check if it's Sun Studio compiler. We assume that
4390 # __SUNPRO_C will be defined for Sun Studio compilers
4391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4392 /* end confdefs.h. */
4404 if ac_fn_c_try_compile "$LINENO"; then :
4409 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4418 . "$srcdir/src/template/$template" || exit
4420 # CFLAGS are selected so:
4421 # If the user specifies something in the environment, that is used.
4422 # else: If the template file set something, that is used.
4423 # else: If coverage was enabled, don't set anything.
4424 # else: If the compiler is GCC, then we use -O2.
4425 # else: If the compiler is something else, then we use -O, unless debugging.
4427 if test "$ac_env_CFLAGS_set" = set; then
4428 CFLAGS=$ac_env_CFLAGS_value
4429 elif test "${CFLAGS+set}" = set; then
4430 : # (keep what template set)
4431 elif test "$enable_coverage" = yes; then
4432 : # no optimization by default
4433 elif test "$GCC" = yes; then
4436 # if the user selected debug mode, don't use -O
4437 if test "$enable_debug" != yes; then
4442 # CFLAGS we determined above will be added back at the end
4446 # set CFLAGS_VECTOR from the environment, if available
4447 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
4448 CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
4451 # Some versions of GCC support some additional useful warning flags.
4452 # Check whether they are supported, and add them to CFLAGS if so.
4453 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
4454 # but has its own. Also check other compiler-specific flags here.
4456 if test "$GCC" = yes -a "$ICC" = no; then
4457 CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
4458 # These work in some but not all gcc versions
4459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
4460 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
4461 if ${pgac_cv_prog_cc_cflags__Wdeclaration_after_statement+:} false; then :
4462 $as_echo_n "(cached) " >&6
4464 pgac_save_CFLAGS=$CFLAGS
4465 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
4466 ac_save_c_werror_flag=$ac_c_werror_flag
4467 ac_c_werror_flag=yes
4468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4469 /* end confdefs.h. */
4479 if ac_fn_c_try_compile "$LINENO"; then :
4480 pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=yes
4482 pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=no
4484 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4485 ac_c_werror_flag=$ac_save_c_werror_flag
4486 CFLAGS="$pgac_save_CFLAGS"
4488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&5
4489 $as_echo "$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&6; }
4490 if test x"$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" = x"yes"; then
4491 CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wendif-labels" >&5
4495 $as_echo_n "checking whether $CC supports -Wendif-labels... " >&6; }
4496 if ${pgac_cv_prog_cc_cflags__Wendif_labels+:} false; then :
4497 $as_echo_n "(cached) " >&6
4499 pgac_save_CFLAGS=$CFLAGS
4500 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
4501 ac_save_c_werror_flag=$ac_c_werror_flag
4502 ac_c_werror_flag=yes
4503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4504 /* end confdefs.h. */
4514 if ac_fn_c_try_compile "$LINENO"; then :
4515 pgac_cv_prog_cc_cflags__Wendif_labels=yes
4517 pgac_cv_prog_cc_cflags__Wendif_labels=no
4519 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4520 ac_c_werror_flag=$ac_save_c_werror_flag
4521 CFLAGS="$pgac_save_CFLAGS"
4523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wendif_labels" >&5
4524 $as_echo "$pgac_cv_prog_cc_cflags__Wendif_labels" >&6; }
4525 if test x"$pgac_cv_prog_cc_cflags__Wendif_labels" = x"yes"; then
4526 CFLAGS="$CFLAGS -Wendif-labels"
4529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wmissing-format-attribute" >&5
4530 $as_echo_n "checking whether $CC supports -Wmissing-format-attribute... " >&6; }
4531 if ${pgac_cv_prog_cc_cflags__Wmissing_format_attribute+:} false; then :
4532 $as_echo_n "(cached) " >&6
4534 pgac_save_CFLAGS=$CFLAGS
4535 CFLAGS="$pgac_save_CFLAGS -Wmissing-format-attribute"
4536 ac_save_c_werror_flag=$ac_c_werror_flag
4537 ac_c_werror_flag=yes
4538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4539 /* end confdefs.h. */
4549 if ac_fn_c_try_compile "$LINENO"; then :
4550 pgac_cv_prog_cc_cflags__Wmissing_format_attribute=yes
4552 pgac_cv_prog_cc_cflags__Wmissing_format_attribute=no
4554 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4555 ac_c_werror_flag=$ac_save_c_werror_flag
4556 CFLAGS="$pgac_save_CFLAGS"
4558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&5
4559 $as_echo "$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&6; }
4560 if test x"$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" = x"yes"; then
4561 CFLAGS="$CFLAGS -Wmissing-format-attribute"
4564 # This was included in -Wall/-Wformat in older GCC versions
4565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wformat-security" >&5
4566 $as_echo_n "checking whether $CC supports -Wformat-security... " >&6; }
4567 if ${pgac_cv_prog_cc_cflags__Wformat_security+:} false; then :
4568 $as_echo_n "(cached) " >&6
4570 pgac_save_CFLAGS=$CFLAGS
4571 CFLAGS="$pgac_save_CFLAGS -Wformat-security"
4572 ac_save_c_werror_flag=$ac_c_werror_flag
4573 ac_c_werror_flag=yes
4574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4575 /* end confdefs.h. */
4585 if ac_fn_c_try_compile "$LINENO"; then :
4586 pgac_cv_prog_cc_cflags__Wformat_security=yes
4588 pgac_cv_prog_cc_cflags__Wformat_security=no
4590 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4591 ac_c_werror_flag=$ac_save_c_werror_flag
4592 CFLAGS="$pgac_save_CFLAGS"
4594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wformat_security" >&5
4595 $as_echo "$pgac_cv_prog_cc_cflags__Wformat_security" >&6; }
4596 if test x"$pgac_cv_prog_cc_cflags__Wformat_security" = x"yes"; then
4597 CFLAGS="$CFLAGS -Wformat-security"
4600 # Disable strict-aliasing rules; needed for gcc 3.3+
4601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4602 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4603 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4604 $as_echo_n "(cached) " >&6
4606 pgac_save_CFLAGS=$CFLAGS
4607 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4608 ac_save_c_werror_flag=$ac_c_werror_flag
4609 ac_c_werror_flag=yes
4610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4611 /* end confdefs.h. */
4621 if ac_fn_c_try_compile "$LINENO"; then :
4622 pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4624 pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4626 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4627 ac_c_werror_flag=$ac_save_c_werror_flag
4628 CFLAGS="$pgac_save_CFLAGS"
4630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4631 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4632 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4633 CFLAGS="$CFLAGS -fno-strict-aliasing"
4636 # Disable optimizations that assume no overflow; needed for gcc 4.3+
4637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fwrapv" >&5
4638 $as_echo_n "checking whether $CC supports -fwrapv... " >&6; }
4639 if ${pgac_cv_prog_cc_cflags__fwrapv+:} false; then :
4640 $as_echo_n "(cached) " >&6
4642 pgac_save_CFLAGS=$CFLAGS
4643 CFLAGS="$pgac_save_CFLAGS -fwrapv"
4644 ac_save_c_werror_flag=$ac_c_werror_flag
4645 ac_c_werror_flag=yes
4646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4647 /* end confdefs.h. */
4657 if ac_fn_c_try_compile "$LINENO"; then :
4658 pgac_cv_prog_cc_cflags__fwrapv=yes
4660 pgac_cv_prog_cc_cflags__fwrapv=no
4662 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4663 ac_c_werror_flag=$ac_save_c_werror_flag
4664 CFLAGS="$pgac_save_CFLAGS"
4666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fwrapv" >&5
4667 $as_echo "$pgac_cv_prog_cc_cflags__fwrapv" >&6; }
4668 if test x"$pgac_cv_prog_cc_cflags__fwrapv" = x"yes"; then
4669 CFLAGS="$CFLAGS -fwrapv"
4672 # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
4673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fexcess-precision=standard" >&5
4674 $as_echo_n "checking whether $CC supports -fexcess-precision=standard... " >&6; }
4675 if ${pgac_cv_prog_cc_cflags__fexcess_precision_standard+:} false; then :
4676 $as_echo_n "(cached) " >&6
4678 pgac_save_CFLAGS=$CFLAGS
4679 CFLAGS="$pgac_save_CFLAGS -fexcess-precision=standard"
4680 ac_save_c_werror_flag=$ac_c_werror_flag
4681 ac_c_werror_flag=yes
4682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4683 /* end confdefs.h. */
4693 if ac_fn_c_try_compile "$LINENO"; then :
4694 pgac_cv_prog_cc_cflags__fexcess_precision_standard=yes
4696 pgac_cv_prog_cc_cflags__fexcess_precision_standard=no
4698 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4699 ac_c_werror_flag=$ac_save_c_werror_flag
4700 CFLAGS="$pgac_save_CFLAGS"
4702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&5
4703 $as_echo "$pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&6; }
4704 if test x"$pgac_cv_prog_cc_cflags__fexcess_precision_standard" = x"yes"; then
4705 CFLAGS="$CFLAGS -fexcess-precision=standard"
4708 # Optimization flags for specific files that benefit from vectorization
4709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -funroll-loops" >&5
4710 $as_echo_n "checking whether $CC supports -funroll-loops... " >&6; }
4711 if ${pgac_cv_prog_cc_cflags__funroll_loops+:} false; then :
4712 $as_echo_n "(cached) " >&6
4714 pgac_save_CFLAGS=$CFLAGS
4715 CFLAGS="$pgac_save_CFLAGS -funroll-loops"
4716 ac_save_c_werror_flag=$ac_c_werror_flag
4717 ac_c_werror_flag=yes
4718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4719 /* end confdefs.h. */
4729 if ac_fn_c_try_compile "$LINENO"; then :
4730 pgac_cv_prog_cc_cflags__funroll_loops=yes
4732 pgac_cv_prog_cc_cflags__funroll_loops=no
4734 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4735 ac_c_werror_flag=$ac_save_c_werror_flag
4736 CFLAGS="$pgac_save_CFLAGS"
4738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__funroll_loops" >&5
4739 $as_echo "$pgac_cv_prog_cc_cflags__funroll_loops" >&6; }
4740 if test x"$pgac_cv_prog_cc_cflags__funroll_loops" = x"yes"; then
4741 CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
4744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -ftree-vectorize" >&5
4745 $as_echo_n "checking whether $CC supports -ftree-vectorize... " >&6; }
4746 if ${pgac_cv_prog_cc_cflags__ftree_vectorize+:} false; then :
4747 $as_echo_n "(cached) " >&6
4749 pgac_save_CFLAGS=$CFLAGS
4750 CFLAGS="$pgac_save_CFLAGS -ftree-vectorize"
4751 ac_save_c_werror_flag=$ac_c_werror_flag
4752 ac_c_werror_flag=yes
4753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4754 /* end confdefs.h. */
4764 if ac_fn_c_try_compile "$LINENO"; then :
4765 pgac_cv_prog_cc_cflags__ftree_vectorize=yes
4767 pgac_cv_prog_cc_cflags__ftree_vectorize=no
4769 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4770 ac_c_werror_flag=$ac_save_c_werror_flag
4771 CFLAGS="$pgac_save_CFLAGS"
4773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__ftree_vectorize" >&5
4774 $as_echo "$pgac_cv_prog_cc_cflags__ftree_vectorize" >&6; }
4775 if test x"$pgac_cv_prog_cc_cflags__ftree_vectorize" = x"yes"; then
4776 CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
4779 # We want to suppress clang's unhelpful unused-command-line-argument warnings
4780 # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
4781 # test for the positive form and if that works, add the negative form
4782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wunused-command-line-argument" >&5
4783 $as_echo_n "checking whether $CC supports -Wunused-command-line-argument... " >&6; }
4784 if ${pgac_cv_prog_cc_cflags__Wunused_command_line_argument+:} false; then :
4785 $as_echo_n "(cached) " >&6
4787 pgac_save_CFLAGS=$CFLAGS
4788 CFLAGS="$pgac_save_CFLAGS -Wunused-command-line-argument"
4789 ac_save_c_werror_flag=$ac_c_werror_flag
4790 ac_c_werror_flag=yes
4791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4792 /* end confdefs.h. */
4802 if ac_fn_c_try_compile "$LINENO"; then :
4803 pgac_cv_prog_cc_cflags__Wunused_command_line_argument=yes
4805 pgac_cv_prog_cc_cflags__Wunused_command_line_argument=no
4807 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4808 ac_c_werror_flag=$ac_save_c_werror_flag
4809 CFLAGS="$pgac_save_CFLAGS"
4811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wunused_command_line_argument" >&5
4812 $as_echo "$pgac_cv_prog_cc_cflags__Wunused_command_line_argument" >&6; }
4813 if test x"$pgac_cv_prog_cc_cflags__Wunused_command_line_argument" = x"yes"; then
4814 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
4817 if test -n "$NOT_THE_CFLAGS"; then
4818 CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
4820 elif test "$ICC" = yes; then
4821 # Intel's compiler has a bug/misoptimization in checking for
4822 # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
4823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mp1" >&5
4824 $as_echo_n "checking whether $CC supports -mp1... " >&6; }
4825 if ${pgac_cv_prog_cc_cflags__mp1+:} false; then :
4826 $as_echo_n "(cached) " >&6
4828 pgac_save_CFLAGS=$CFLAGS
4829 CFLAGS="$pgac_save_CFLAGS -mp1"
4830 ac_save_c_werror_flag=$ac_c_werror_flag
4831 ac_c_werror_flag=yes
4832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4833 /* end confdefs.h. */
4843 if ac_fn_c_try_compile "$LINENO"; then :
4844 pgac_cv_prog_cc_cflags__mp1=yes
4846 pgac_cv_prog_cc_cflags__mp1=no
4848 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4849 ac_c_werror_flag=$ac_save_c_werror_flag
4850 CFLAGS="$pgac_save_CFLAGS"
4852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__mp1" >&5
4853 $as_echo "$pgac_cv_prog_cc_cflags__mp1" >&6; }
4854 if test x"$pgac_cv_prog_cc_cflags__mp1" = x"yes"; then
4855 CFLAGS="$CFLAGS -mp1"
4858 # Make sure strict aliasing is off (though this is said to be the default)
4859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4860 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4861 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4862 $as_echo_n "(cached) " >&6
4864 pgac_save_CFLAGS=$CFLAGS
4865 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4866 ac_save_c_werror_flag=$ac_c_werror_flag
4867 ac_c_werror_flag=yes
4868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4869 /* end confdefs.h. */
4879 if ac_fn_c_try_compile "$LINENO"; then :
4880 pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4882 pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4884 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4885 ac_c_werror_flag=$ac_save_c_werror_flag
4886 CFLAGS="$pgac_save_CFLAGS"
4888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4889 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4890 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4891 CFLAGS="$CFLAGS -fno-strict-aliasing"
4894 elif test "$PORTNAME" = "aix"; then
4895 # AIX's xlc has to have strict aliasing turned off too
4896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qnoansialias" >&5
4897 $as_echo_n "checking whether $CC supports -qnoansialias... " >&6; }
4898 if ${pgac_cv_prog_cc_cflags__qnoansialias+:} false; then :
4899 $as_echo_n "(cached) " >&6
4901 pgac_save_CFLAGS=$CFLAGS
4902 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
4903 ac_save_c_werror_flag=$ac_c_werror_flag
4904 ac_c_werror_flag=yes
4905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4906 /* end confdefs.h. */
4916 if ac_fn_c_try_compile "$LINENO"; then :
4917 pgac_cv_prog_cc_cflags__qnoansialias=yes
4919 pgac_cv_prog_cc_cflags__qnoansialias=no
4921 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4922 ac_c_werror_flag=$ac_save_c_werror_flag
4923 CFLAGS="$pgac_save_CFLAGS"
4925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qnoansialias" >&5
4926 $as_echo "$pgac_cv_prog_cc_cflags__qnoansialias" >&6; }
4927 if test x"$pgac_cv_prog_cc_cflags__qnoansialias" = x"yes"; then
4928 CFLAGS="$CFLAGS -qnoansialias"
4931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qlonglong" >&5
4932 $as_echo_n "checking whether $CC supports -qlonglong... " >&6; }
4933 if ${pgac_cv_prog_cc_cflags__qlonglong+:} false; then :
4934 $as_echo_n "(cached) " >&6
4936 pgac_save_CFLAGS=$CFLAGS
4937 CFLAGS="$pgac_save_CFLAGS -qlonglong"
4938 ac_save_c_werror_flag=$ac_c_werror_flag
4939 ac_c_werror_flag=yes
4940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4941 /* end confdefs.h. */
4951 if ac_fn_c_try_compile "$LINENO"; then :
4952 pgac_cv_prog_cc_cflags__qlonglong=yes
4954 pgac_cv_prog_cc_cflags__qlonglong=no
4956 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4957 ac_c_werror_flag=$ac_save_c_werror_flag
4958 CFLAGS="$pgac_save_CFLAGS"
4960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qlonglong" >&5
4961 $as_echo "$pgac_cv_prog_cc_cflags__qlonglong" >&6; }
4962 if test x"$pgac_cv_prog_cc_cflags__qlonglong" = x"yes"; then
4963 CFLAGS="$CFLAGS -qlonglong"
4966 elif test "$PORTNAME" = "hpux"; then
4967 # On some versions of HP-UX, libm functions do not set errno by default.
4968 # Fix that by using +Olibmerrno if the compiler recognizes it.
4969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports +Olibmerrno" >&5
4970 $as_echo_n "checking whether $CC supports +Olibmerrno... " >&6; }
4971 if ${pgac_cv_prog_cc_cflags_pOlibmerrno+:} false; then :
4972 $as_echo_n "(cached) " >&6
4974 pgac_save_CFLAGS=$CFLAGS
4975 CFLAGS="$pgac_save_CFLAGS +Olibmerrno"
4976 ac_save_c_werror_flag=$ac_c_werror_flag
4977 ac_c_werror_flag=yes
4978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4979 /* end confdefs.h. */
4989 if ac_fn_c_try_compile "$LINENO"; then :
4990 pgac_cv_prog_cc_cflags_pOlibmerrno=yes
4992 pgac_cv_prog_cc_cflags_pOlibmerrno=no
4994 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4995 ac_c_werror_flag=$ac_save_c_werror_flag
4996 CFLAGS="$pgac_save_CFLAGS"
4998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags_pOlibmerrno" >&5
4999 $as_echo "$pgac_cv_prog_cc_cflags_pOlibmerrno" >&6; }
5000 if test x"$pgac_cv_prog_cc_cflags_pOlibmerrno" = x"yes"; then
5001 CFLAGS="$CFLAGS +Olibmerrno"
5006 CFLAGS_VECTOR=$CFLAGS_VECTOR
5009 # supply -g if --enable-debug
5010 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
5014 # enable code coverage if --enable-coverage
5015 if test "$enable_coverage" = yes; then
5016 if test "$GCC" = yes; then
5017 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
5019 as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
5023 # enable profiling if --enable-profiling
5024 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
5025 if test "$GCC" = yes; then
5027 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
5029 CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
5031 as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
5035 # We already have this in Makefile.win32, but configure needs it too
5036 if test "$PORTNAME" = "win32"; then
5037 CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
5040 # Now that we're done automatically adding stuff to CFLAGS, put back the
5041 # user-specified flags (if any) at the end. This lets users override
5042 # the automatic additions.
5043 CFLAGS="$CFLAGS $user_CFLAGS"
5045 # Check if the compiler still works with the final flag settings
5046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
5047 $as_echo_n "checking whether the C compiler still works... " >&6; }
5048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5049 /* end confdefs.h. */
5059 if ac_fn_c_try_link "$LINENO"; then :
5060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5061 $as_echo "yes" >&6; }
5063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5064 $as_echo "no" >&6; }
5065 as_fn_error $? "cannot proceed" "$LINENO" 5
5067 rm -f core conftest.err conftest.$ac_objext \
5068 conftest$ac_exeext conftest.$ac_ext
5070 # Defend against gcc -ffast-math
5071 if test "$GCC" = yes; then
5072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5073 /* end confdefs.h. */
5078 #ifdef __FAST_MATH__
5085 if ac_fn_c_try_compile "$LINENO"; then :
5088 as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
5090 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5094 ac_cpp='$CPP $CPPFLAGS'
5095 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5096 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5097 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5099 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5100 # On Suns, sometimes $CPP names a directory.
5101 if test -n "$CPP" && test -d "$CPP"; then
5104 if test -z "$CPP"; then
5105 if ${ac_cv_prog_CPP+:} false; then :
5106 $as_echo_n "(cached) " >&6
5108 # Double quotes because CPP needs to be expanded
5109 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5112 for ac_c_preproc_warn_flag in '' yes
5114 # Use a header file that comes with gcc, so configuring glibc
5115 # with a fresh cross-compiler works.
5116 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5117 # <limits.h> exists even on freestanding compilers.
5118 # On the NeXT, cc -E runs the code through the compiler's parser,
5119 # not just through cpp. "Syntax error" is here to catch this case.
5120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5121 /* end confdefs.h. */
5123 # include <limits.h>
5125 # include <assert.h>
5129 if ac_fn_c_try_cpp "$LINENO"; then :
5132 # Broken: fails on valid input.
5135 rm -f conftest.err conftest.i conftest.$ac_ext
5137 # OK, works on sane cases. Now check whether nonexistent headers
5138 # can be detected and how.
5139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5140 /* end confdefs.h. */
5141 #include <ac_nonexistent.h>
5143 if ac_fn_c_try_cpp "$LINENO"; then :
5144 # Broken: success on invalid input.
5147 # Passes both tests.
5151 rm -f conftest.err conftest.i conftest.$ac_ext
5154 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5155 rm -f conftest.i conftest.err conftest.$ac_ext
5156 if $ac_preproc_ok; then :
5168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5169 $as_echo "$CPP" >&6; }
5171 for ac_c_preproc_warn_flag in '' yes
5173 # Use a header file that comes with gcc, so configuring glibc
5174 # with a fresh cross-compiler works.
5175 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5176 # <limits.h> exists even on freestanding compilers.
5177 # On the NeXT, cc -E runs the code through the compiler's parser,
5178 # not just through cpp. "Syntax error" is here to catch this case.
5179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5180 /* end confdefs.h. */
5182 # include <limits.h>
5184 # include <assert.h>
5188 if ac_fn_c_try_cpp "$LINENO"; then :
5191 # Broken: fails on valid input.
5194 rm -f conftest.err conftest.i conftest.$ac_ext
5196 # OK, works on sane cases. Now check whether nonexistent headers
5197 # can be detected and how.
5198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5199 /* end confdefs.h. */
5200 #include <ac_nonexistent.h>
5202 if ac_fn_c_try_cpp "$LINENO"; then :
5203 # Broken: success on invalid input.
5206 # Passes both tests.
5210 rm -f conftest.err conftest.i conftest.$ac_ext
5213 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5214 rm -f conftest.i conftest.err conftest.$ac_ext
5215 if $ac_preproc_ok; then :
5218 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5219 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5220 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5221 See \`config.log' for more details" "$LINENO" 5; }
5225 ac_cpp='$CPP $CPPFLAGS'
5226 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5227 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5228 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5234 # Set up TAS assembly code if needed; the template file has now had its
5235 # chance to request this.
5237 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
5240 if test "$need_tas" = yes ; then
5249 # Automatic dependency tracking
5253 # Check whether --enable-depend was given.
5254 if test "${enable_depend+set}" = set; then :
5255 enableval=$enable_depend;
5264 as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
5278 # Enable assert checks
5282 # Check whether --enable-cassert was given.
5283 if test "${enable_cassert+set}" = set; then :
5284 enableval=$enable_cassert;
5288 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
5295 as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
5308 # Include directories
5311 IFS="${IFS}${PATH_SEPARATOR}"
5312 # SRCH_INC comes from the template file
5313 for dir in $with_includes $SRCH_INC; do
5314 if test -d "$dir"; then
5315 INCLUDES="$INCLUDES -I$dir"
5317 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
5318 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
5326 # Library directories
5329 IFS="${IFS}${PATH_SEPARATOR}"
5330 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
5331 for dir in $LIBRARY_DIRS $SRCH_LIB; do
5332 if test -d "$dir"; then
5333 LIBDIRS="$LIBDIRS -L$dir"
5335 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
5336 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
5342 # Enable thread-safe client libraries
5344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
5345 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
5348 # Check whether --enable-thread-safety was given.
5349 if test "${enable_thread_safety+set}" = set; then :
5350 enableval=$enable_thread_safety;
5359 as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
5364 enable_thread_safety=yes
5369 if test "$enable_thread_safety" = yes; then
5371 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
5374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
5375 $as_echo "$enable_thread_safety" >&6; }
5381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
5382 $as_echo_n "checking whether to build with ICU support... " >&6; }
5386 # Check whether --with-icu was given.
5387 if test "${with_icu+set}" = set; then :
5392 $as_echo "#define USE_ICU 1" >>confdefs.h
5399 as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
5409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
5410 $as_echo "$with_icu" >&6; }
5413 if test "$with_icu" = yes; then
5421 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
5422 if test -n "$ac_tool_prefix"; then
5423 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
5424 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
5425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5426 $as_echo_n "checking for $ac_word... " >&6; }
5427 if ${ac_cv_path_PKG_CONFIG+:} false; then :
5428 $as_echo_n "(cached) " >&6
5432 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5435 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5439 test -z "$as_dir" && as_dir=.
5440 for ac_exec_ext in '' $ac_executable_extensions; do
5441 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5442 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5443 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5453 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5454 if test -n "$PKG_CONFIG"; then
5455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
5456 $as_echo "$PKG_CONFIG" >&6; }
5458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5459 $as_echo "no" >&6; }
5464 if test -z "$ac_cv_path_PKG_CONFIG"; then
5465 ac_pt_PKG_CONFIG=$PKG_CONFIG
5466 # Extract the first word of "pkg-config", so it can be a program name with args.
5467 set dummy pkg-config; ac_word=$2
5468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5469 $as_echo_n "checking for $ac_word... " >&6; }
5470 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
5471 $as_echo_n "(cached) " >&6
5473 case $ac_pt_PKG_CONFIG in
5475 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
5478 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5482 test -z "$as_dir" && as_dir=.
5483 for ac_exec_ext in '' $ac_executable_extensions; do
5484 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5485 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5486 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5496 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
5497 if test -n "$ac_pt_PKG_CONFIG"; then
5498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
5499 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
5501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5502 $as_echo "no" >&6; }
5505 if test "x$ac_pt_PKG_CONFIG" = x; then
5508 case $cross_compiling:$ac_tool_warned in
5510 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5511 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5512 ac_tool_warned=yes ;;
5514 PKG_CONFIG=$ac_pt_PKG_CONFIG
5517 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
5521 if test -n "$PKG_CONFIG"; then
5522 _pkg_min_version=0.9.0
5523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
5524 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
5525 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
5526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5527 $as_echo "yes" >&6; }
5529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5530 $as_echo "no" >&6; }
5536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
5537 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
5539 if test -n "$ICU_CFLAGS"; then
5540 pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
5541 elif test -n "$PKG_CONFIG"; then
5542 if test -n "$PKG_CONFIG" && \
5543 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
5544 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
5546 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5547 test $ac_status = 0; }; then
5548 pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
5549 test "x$?" != "x0" && pkg_failed=yes
5556 if test -n "$ICU_LIBS"; then
5557 pkg_cv_ICU_LIBS="$ICU_LIBS"
5558 elif test -n "$PKG_CONFIG"; then
5559 if test -n "$PKG_CONFIG" && \
5560 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
5561 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
5563 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5564 test $ac_status = 0; }; then
5565 pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
5566 test "x$?" != "x0" && pkg_failed=yes
5576 if test $pkg_failed = yes; then
5577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5578 $as_echo "no" >&6; }
5580 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
5581 _pkg_short_errors_supported=yes
5583 _pkg_short_errors_supported=no
5585 if test $_pkg_short_errors_supported = yes; then
5586 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
5588 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
5590 # Put the nasty error message in config.log where it belongs
5591 echo "$ICU_PKG_ERRORS" >&5
5593 as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
5597 Consider adjusting the PKG_CONFIG_PATH environment variable if you
5598 installed software in a non-standard prefix.
5600 Alternatively, you may set the environment variables ICU_CFLAGS
5601 and ICU_LIBS to avoid the need to call pkg-config.
5602 See the pkg-config man page for more details." "$LINENO" 5
5603 elif test $pkg_failed = untried; then
5604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5605 $as_echo "no" >&6; }
5606 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5607 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5608 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
5609 is in your PATH or set the PKG_CONFIG environment variable to the full
5612 Alternatively, you may set the environment variables ICU_CFLAGS
5613 and ICU_LIBS to avoid the need to call pkg-config.
5614 See the pkg-config man page for more details.
5616 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
5617 See \`config.log' for more details" "$LINENO" 5; }
5619 ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
5620 ICU_LIBS=$pkg_cv_ICU_LIBS
5621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5622 $as_echo "yes" >&6; }
5628 # Optionally build Tcl modules (PL/Tcl)
5630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
5631 $as_echo_n "checking whether to build with Tcl... " >&6; }
5635 # Check whether --with-tcl was given.
5636 if test "${with_tcl+set}" = set; then :
5646 as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
5656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
5657 $as_echo "$with_tcl" >&6; }
5660 # We see if the path to the Tcl/Tk configuration scripts is specified.
5661 # This will override the use of tclsh to find the paths to search.
5666 # Check whether --with-tclconfig was given.
5667 if test "${with_tclconfig+set}" = set; then :
5668 withval=$with_tclconfig;
5671 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5674 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5686 # Optionally build Perl modules (PL/Perl)
5688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
5689 $as_echo_n "checking whether to build Perl modules... " >&6; }
5693 # Check whether --with-perl was given.
5694 if test "${with_perl+set}" = set; then :
5704 as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
5714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
5715 $as_echo "$with_perl" >&6; }
5719 # Optionally build Python modules (PL/Python)
5721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
5722 $as_echo_n "checking whether to build Python modules... " >&6; }
5726 # Check whether --with-python was given.
5727 if test "${with_python+set}" = set; then :
5728 withval=$with_python;
5737 as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
5747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
5748 $as_echo "$with_python" >&6; }
5754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
5755 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
5759 # Check whether --with-gssapi was given.
5760 if test "${with_gssapi+set}" = set; then :
5761 withval=$with_gssapi;
5766 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
5768 krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5775 as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
5785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
5786 $as_echo "$with_gssapi" >&6; }
5793 # Kerberos configuration parameters
5798 # Check whether --with-krb-srvnam was given.
5799 if test "${with_krb_srvnam+set}" = set; then :
5800 withval=$with_krb_srvnam;
5803 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5806 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5814 with_krb_srvnam="postgres"
5819 cat >>confdefs.h <<_ACEOF
5820 #define PG_KRB_SRVNAM "$with_krb_srvnam"
5828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
5829 $as_echo_n "checking whether to build with PAM support... " >&6; }
5833 # Check whether --with-pam was given.
5834 if test "${with_pam+set}" = set; then :
5839 $as_echo "#define USE_PAM 1" >>confdefs.h
5846 as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
5856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
5857 $as_echo "$with_pam" >&6; }
5863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
5864 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
5868 # Check whether --with-bsd-auth was given.
5869 if test "${with_bsd_auth+set}" = set; then :
5870 withval=$with_bsd_auth;
5874 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
5881 as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
5891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
5892 $as_echo "$with_bsd_auth" >&6; }
5898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
5899 $as_echo_n "checking whether to build with LDAP support... " >&6; }
5903 # Check whether --with-ldap was given.
5904 if test "${with_ldap+set}" = set; then :
5909 $as_echo "#define USE_LDAP 1" >>confdefs.h
5916 as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
5926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
5927 $as_echo "$with_ldap" >&6; }
5933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
5934 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
5938 # Check whether --with-bonjour was given.
5939 if test "${with_bonjour+set}" = set; then :
5940 withval=$with_bonjour;
5944 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
5951 as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
5961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
5962 $as_echo "$with_bonjour" >&6; }
5968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
5969 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
5973 # Check whether --with-openssl was given.
5974 if test "${with_openssl+set}" = set; then :
5975 withval=$with_openssl;
5979 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
5986 as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
5996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
5997 $as_echo "$with_openssl" >&6; }
6003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
6004 $as_echo_n "checking whether to build with SELinux support... " >&6; }
6008 # Check whether --with-selinux was given.
6009 if test "${with_selinux+set}" = set; then :
6010 withval=$with_selinux;
6019 as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
6030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
6031 $as_echo "$with_selinux" >&6; }
6036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
6037 $as_echo_n "checking whether to build with systemd support... " >&6; }
6041 # Check whether --with-systemd was given.
6042 if test "${with_systemd+set}" = set; then :
6043 withval=$with_systemd;
6047 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
6054 as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
6065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
6066 $as_echo "$with_systemd" >&6; }
6074 # Check whether --with-readline was given.
6075 if test "${with_readline+set}" = set; then :
6076 withval=$with_readline;
6085 as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
6095 # readline on MinGW has problems with backslashes in psql and other bugs.
6096 # This is particularly a problem with non-US code pages.
6097 # Therefore disable its use until we understand the cause. 2004-07-20
6098 if test "$PORTNAME" = "win32"; then
6099 if test "$with_readline" = yes; then
6100 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
6101 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
6113 # Check whether --with-libedit-preferred was given.
6114 if test "${with_libedit_preferred+set}" = set; then :
6115 withval=$with_libedit_preferred;
6124 as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
6129 with_libedit_preferred=no
6139 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
6140 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
6141 # UUID library. More than one of these might be present on a given platform,
6142 # so we make the user say which one she wants.
6147 # Check whether --with-uuid was given.
6148 if test "${with_uuid+set}" = set; then :
6152 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
6155 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
6165 if test x"$with_uuid" = x"" ; then
6171 # Check whether --with-ossp-uuid was given.
6172 if test "${with_ossp_uuid+set}" = set; then :
6173 withval=$with_ossp_uuid;
6182 as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
6192 if test "$with_ossp_uuid" = yes ; then
6196 if test "$with_uuid" = bsd ; then
6198 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
6200 UUID_EXTRA_OBJS="md5.o sha1.o"
6201 elif test "$with_uuid" = e2fs ; then
6203 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
6205 UUID_EXTRA_OBJS="md5.o sha1.o"
6206 elif test "$with_uuid" = ossp ; then
6208 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
6211 elif test "$with_uuid" = no ; then
6214 as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
6226 # Check whether --with-libxml was given.
6227 if test "${with_libxml+set}" = set; then :
6228 withval=$with_libxml;
6232 $as_echo "#define USE_LIBXML 1" >>confdefs.h
6239 as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
6250 if test "$with_libxml" = yes ; then
6251 if test -z "$XML2_CONFIG"; then
6252 for ac_prog in xml2-config
6254 # Extract the first word of "$ac_prog", so it can be a program name with args.
6255 set dummy $ac_prog; ac_word=$2
6256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6257 $as_echo_n "checking for $ac_word... " >&6; }
6258 if ${ac_cv_path_XML2_CONFIG+:} false; then :
6259 $as_echo_n "(cached) " >&6
6261 case $XML2_CONFIG in
6263 ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
6266 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6270 test -z "$as_dir" && as_dir=.
6271 for ac_exec_ext in '' $ac_executable_extensions; do
6272 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6273 ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6274 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6284 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
6285 if test -n "$XML2_CONFIG"; then
6286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
6287 $as_echo "$XML2_CONFIG" >&6; }
6289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6290 $as_echo "no" >&6; }
6294 test -n "$XML2_CONFIG" && break
6298 # Report the value of XML2_CONFIG in configure's output in all cases.
6299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
6300 $as_echo_n "checking for XML2_CONFIG... " >&6; }
6301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
6302 $as_echo "$XML2_CONFIG" >&6; }
6305 if test -n "$XML2_CONFIG"; then
6306 for pgac_option in `$XML2_CONFIG --cflags`; do
6307 case $pgac_option in
6308 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
6311 for pgac_option in `$XML2_CONFIG --libs`; do
6312 case $pgac_option in
6313 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
6327 # Check whether --with-libxslt was given.
6328 if test "${with_libxslt+set}" = set; then :
6329 withval=$with_libxslt;
6333 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
6340 as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
6360 # Check whether --with-system-tzdata was given.
6361 if test "${with_system_tzdata+set}" = set; then :
6362 withval=$with_system_tzdata;
6365 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
6368 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
6386 # Check whether --with-zlib was given.
6387 if test "${with_zlib+set}" = set; then :
6397 as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
6413 # Assume system is ELF if it predefines __ELF__ as 1,
6414 # otherwise believe host_os based default.
6416 freebsd1*|freebsd2*) elf=no;;
6417 freebsd3*|freebsd4*) elf=yes;;
6421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6422 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6423 if ${ac_cv_path_GREP+:} false; then :
6424 $as_echo_n "(cached) " >&6
6426 if test -z "$GREP"; then
6427 ac_path_GREP_found=false
6428 # Loop through the user's path and test for each of PROGNAME-LIST
6429 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6430 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6433 test -z "$as_dir" && as_dir=.
6434 for ac_prog in grep ggrep; do
6435 for ac_exec_ext in '' $ac_executable_extensions; do
6436 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6437 as_fn_executable_p "$ac_path_GREP" || continue
6438 # Check for GNU ac_path_GREP and select it if it is found.
6439 # Check for GNU $ac_path_GREP
6440 case `"$ac_path_GREP" --version 2>&1` in
6442 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6445 $as_echo_n 0123456789 >"conftest.in"
6448 cat "conftest.in" "conftest.in" >"conftest.tmp"
6449 mv "conftest.tmp" "conftest.in"
6450 cp "conftest.in" "conftest.nl"
6451 $as_echo 'GREP' >> "conftest.nl"
6452 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6453 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6454 as_fn_arith $ac_count + 1 && ac_count=$as_val
6455 if test $ac_count -gt ${ac_path_GREP_max-0}; then
6456 # Best one so far, save it but keep looking for a better one
6457 ac_cv_path_GREP="$ac_path_GREP"
6458 ac_path_GREP_max=$ac_count
6460 # 10*(2^10) chars as input seems more than enough
6461 test $ac_count -gt 10 && break
6463 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6466 $ac_path_GREP_found && break 3
6471 if test -z "$ac_cv_path_GREP"; then
6472 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6475 ac_cv_path_GREP=$GREP
6479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6480 $as_echo "$ac_cv_path_GREP" >&6; }
6481 GREP="$ac_cv_path_GREP"
6484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6485 $as_echo_n "checking for egrep... " >&6; }
6486 if ${ac_cv_path_EGREP+:} false; then :
6487 $as_echo_n "(cached) " >&6
6489 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6490 then ac_cv_path_EGREP="$GREP -E"
6492 if test -z "$EGREP"; then
6493 ac_path_EGREP_found=false
6494 # Loop through the user's path and test for each of PROGNAME-LIST
6495 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6496 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6499 test -z "$as_dir" && as_dir=.
6500 for ac_prog in egrep; do
6501 for ac_exec_ext in '' $ac_executable_extensions; do
6502 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6503 as_fn_executable_p "$ac_path_EGREP" || continue
6504 # Check for GNU ac_path_EGREP and select it if it is found.
6505 # Check for GNU $ac_path_EGREP
6506 case `"$ac_path_EGREP" --version 2>&1` in
6508 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6511 $as_echo_n 0123456789 >"conftest.in"
6514 cat "conftest.in" "conftest.in" >"conftest.tmp"
6515 mv "conftest.tmp" "conftest.in"
6516 cp "conftest.in" "conftest.nl"
6517 $as_echo 'EGREP' >> "conftest.nl"
6518 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6519 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6520 as_fn_arith $ac_count + 1 && ac_count=$as_val
6521 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6522 # Best one so far, save it but keep looking for a better one
6523 ac_cv_path_EGREP="$ac_path_EGREP"
6524 ac_path_EGREP_max=$ac_count
6526 # 10*(2^10) chars as input seems more than enough
6527 test $ac_count -gt 10 && break
6529 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6532 $ac_path_EGREP_found && break 3
6537 if test -z "$ac_cv_path_EGREP"; then
6538 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6541 ac_cv_path_EGREP=$EGREP
6546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6547 $as_echo "$ac_cv_path_EGREP" >&6; }
6548 EGREP="$ac_cv_path_EGREP"
6551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6552 /* end confdefs.h. */
6558 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6559 $EGREP "yes" >/dev/null 2>&1; then :
6562 if test "X$elf" = "Xyes" ; then
6576 CPPFLAGS="$CPPFLAGS $INCLUDES"
6577 LDFLAGS="$LDFLAGS $LIBDIRS"
6583 # Check whether --with-gnu-ld was given.
6584 if test "${with_gnu_ld+set}" = set; then :
6585 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6591 if test "$GCC" = yes; then
6592 # Check if gcc -print-prog-name=ld gives a path.
6593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
6594 $as_echo_n "checking for ld used by GCC... " >&6; }
6597 # gcc leaves a trailing carriage return which upsets mingw
6598 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6600 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6603 # Accept absolute paths.
6604 [\\/]* | [A-Za-z]:[\\/]*)
6605 re_direlt='/[^/][^/]*/\.\./'
6606 # Canonicalize the path of ld
6607 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6608 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6609 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6611 test -z "$LD" && LD="$ac_prog"
6614 # If it fails, then pretend we aren't using GCC.
6618 # If it is relative, then search for the first ld in PATH.
6622 elif test "$with_gnu_ld" = yes; then
6623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6624 $as_echo_n "checking for GNU ld... " >&6; }
6626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6627 $as_echo_n "checking for non-GNU ld... " >&6; }
6629 if ${ac_cv_path_LD+:} false; then :
6630 $as_echo_n "(cached) " >&6
6632 if test -z "$LD"; then
6633 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6634 for ac_dir in $PATH; do
6635 test -z "$ac_dir" && ac_dir=.
6636 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6637 ac_cv_path_LD="$ac_dir/$ac_prog"
6638 # Check to see if the program is GNU ld. I'd rather use --version,
6639 # but apparently some GNU ld's only accept -v.
6640 # Break only if it was the GNU/non-GNU ld that we prefer.
6641 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
6642 test "$with_gnu_ld" != no && break
6644 test "$with_gnu_ld" != yes && break
6650 ac_cv_path_LD="$LD" # Let the user override the test with a path.
6655 if test -n "$LD"; then
6656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6657 $as_echo "$LD" >&6; }
6659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6660 $as_echo "no" >&6; }
6662 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6664 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6665 if ${ac_cv_prog_gnu_ld+:} false; then :
6666 $as_echo_n "(cached) " >&6
6668 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
6669 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
6670 ac_cv_prog_gnu_ld=yes
6672 ac_cv_prog_gnu_ld=no
6675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
6676 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
6677 with_gnu_ld=$ac_cv_prog_gnu_ld
6682 if test -n "$ac_tool_prefix"; then
6683 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6684 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6686 $as_echo_n "checking for $ac_word... " >&6; }
6687 if ${ac_cv_prog_RANLIB+:} false; then :
6688 $as_echo_n "(cached) " >&6
6690 if test -n "$RANLIB"; then
6691 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6693 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6697 test -z "$as_dir" && as_dir=.
6698 for ac_exec_ext in '' $ac_executable_extensions; do
6699 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6700 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6701 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6710 RANLIB=$ac_cv_prog_RANLIB
6711 if test -n "$RANLIB"; then
6712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6713 $as_echo "$RANLIB" >&6; }
6715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6716 $as_echo "no" >&6; }
6721 if test -z "$ac_cv_prog_RANLIB"; then
6722 ac_ct_RANLIB=$RANLIB
6723 # Extract the first word of "ranlib", so it can be a program name with args.
6724 set dummy ranlib; ac_word=$2
6725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6726 $as_echo_n "checking for $ac_word... " >&6; }
6727 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6728 $as_echo_n "(cached) " >&6
6730 if test -n "$ac_ct_RANLIB"; then
6731 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6733 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6737 test -z "$as_dir" && as_dir=.
6738 for ac_exec_ext in '' $ac_executable_extensions; do
6739 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6740 ac_cv_prog_ac_ct_RANLIB="ranlib"
6741 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6750 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6751 if test -n "$ac_ct_RANLIB"; then
6752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6753 $as_echo "$ac_ct_RANLIB" >&6; }
6755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6756 $as_echo "no" >&6; }
6759 if test "x$ac_ct_RANLIB" = x; then
6762 case $cross_compiling:$ac_tool_warned in
6764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6765 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6766 ac_tool_warned=yes ;;
6768 RANLIB=$ac_ct_RANLIB
6771 RANLIB="$ac_cv_prog_RANLIB"
6775 if test -n "$ac_tool_prefix"; then
6776 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6777 set dummy ${ac_tool_prefix}strip; ac_word=$2
6778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6779 $as_echo_n "checking for $ac_word... " >&6; }
6780 if ${ac_cv_prog_STRIP+:} false; then :
6781 $as_echo_n "(cached) " >&6
6783 if test -n "$STRIP"; then
6784 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6786 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6790 test -z "$as_dir" && as_dir=.
6791 for ac_exec_ext in '' $ac_executable_extensions; do
6792 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6793 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6794 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6803 STRIP=$ac_cv_prog_STRIP
6804 if test -n "$STRIP"; then
6805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6806 $as_echo "$STRIP" >&6; }
6808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6809 $as_echo "no" >&6; }
6814 if test -z "$ac_cv_prog_STRIP"; then
6816 # Extract the first word of "strip", so it can be a program name with args.
6817 set dummy strip; ac_word=$2
6818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6819 $as_echo_n "checking for $ac_word... " >&6; }
6820 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6821 $as_echo_n "(cached) " >&6
6823 if test -n "$ac_ct_STRIP"; then
6824 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6826 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6830 test -z "$as_dir" && as_dir=.
6831 for ac_exec_ext in '' $ac_executable_extensions; do
6832 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6833 ac_cv_prog_ac_ct_STRIP="strip"
6834 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6843 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6844 if test -n "$ac_ct_STRIP"; then
6845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6846 $as_echo "$ac_ct_STRIP" >&6; }
6848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6849 $as_echo "no" >&6; }
6852 if test "x$ac_ct_STRIP" = x; then
6855 case $cross_compiling:$ac_tool_warned in
6857 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6858 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6859 ac_tool_warned=yes ;;
6864 STRIP="$ac_cv_prog_STRIP"
6868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
6869 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
6870 if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
6871 STRIP_STATIC_LIB="$STRIP -x"
6872 STRIP_SHARED_LIB="$STRIP --strip-unneeded"
6873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6874 $as_echo "yes" >&6; }
6879 STRIP_STATIC_LIB=$STRIP
6880 STRIP_SHARED_LIB=$STRIP
6881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6882 $as_echo "yes" >&6; }
6887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6888 $as_echo "no" >&6; }
6895 if test -n "$ac_tool_prefix"; then
6896 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6897 set dummy ${ac_tool_prefix}ar; ac_word=$2
6898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6899 $as_echo_n "checking for $ac_word... " >&6; }
6900 if ${ac_cv_prog_AR+:} false; then :
6901 $as_echo_n "(cached) " >&6
6903 if test -n "$AR"; then
6904 ac_cv_prog_AR="$AR" # Let the user override the test.
6906 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6910 test -z "$as_dir" && as_dir=.
6911 for ac_exec_ext in '' $ac_executable_extensions; do
6912 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6913 ac_cv_prog_AR="${ac_tool_prefix}ar"
6914 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6924 if test -n "$AR"; then
6925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6926 $as_echo "$AR" >&6; }
6928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6929 $as_echo "no" >&6; }
6934 if test -z "$ac_cv_prog_AR"; then
6936 # Extract the first word of "ar", so it can be a program name with args.
6937 set dummy ar; ac_word=$2
6938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6939 $as_echo_n "checking for $ac_word... " >&6; }
6940 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6941 $as_echo_n "(cached) " >&6
6943 if test -n "$ac_ct_AR"; then
6944 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6946 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6950 test -z "$as_dir" && as_dir=.
6951 for ac_exec_ext in '' $ac_executable_extensions; do
6952 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6953 ac_cv_prog_ac_ct_AR="ar"
6954 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6963 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6964 if test -n "$ac_ct_AR"; then
6965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6966 $as_echo "$ac_ct_AR" >&6; }
6968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6969 $as_echo "no" >&6; }
6972 if test "x$ac_ct_AR" = x; then
6975 case $cross_compiling:$ac_tool_warned in
6977 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6978 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6979 ac_tool_warned=yes ;;
6987 if test "$PORTNAME" = "win32"; then
6988 if test -n "$ac_tool_prefix"; then
6989 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6990 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6992 $as_echo_n "checking for $ac_word... " >&6; }
6993 if ${ac_cv_prog_DLLTOOL+:} false; then :
6994 $as_echo_n "(cached) " >&6
6996 if test -n "$DLLTOOL"; then
6997 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6999 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7003 test -z "$as_dir" && as_dir=.
7004 for ac_exec_ext in '' $ac_executable_extensions; do
7005 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7006 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7007 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7016 DLLTOOL=$ac_cv_prog_DLLTOOL
7017 if test -n "$DLLTOOL"; then
7018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7019 $as_echo "$DLLTOOL" >&6; }
7021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7022 $as_echo "no" >&6; }
7027 if test -z "$ac_cv_prog_DLLTOOL"; then
7028 ac_ct_DLLTOOL=$DLLTOOL
7029 # Extract the first word of "dlltool", so it can be a program name with args.
7030 set dummy dlltool; ac_word=$2
7031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7032 $as_echo_n "checking for $ac_word... " >&6; }
7033 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
7034 $as_echo_n "(cached) " >&6
7036 if test -n "$ac_ct_DLLTOOL"; then
7037 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7039 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7043 test -z "$as_dir" && as_dir=.
7044 for ac_exec_ext in '' $ac_executable_extensions; do
7045 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7046 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7047 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7056 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7057 if test -n "$ac_ct_DLLTOOL"; then
7058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7059 $as_echo "$ac_ct_DLLTOOL" >&6; }
7061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7062 $as_echo "no" >&6; }
7065 if test "x$ac_ct_DLLTOOL" = x; then
7068 case $cross_compiling:$ac_tool_warned in
7070 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7071 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7072 ac_tool_warned=yes ;;
7074 DLLTOOL=$ac_ct_DLLTOOL
7077 DLLTOOL="$ac_cv_prog_DLLTOOL"
7080 if test -n "$ac_tool_prefix"; then
7081 # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
7082 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
7083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7084 $as_echo_n "checking for $ac_word... " >&6; }
7085 if ${ac_cv_prog_DLLWRAP+:} false; then :
7086 $as_echo_n "(cached) " >&6
7088 if test -n "$DLLWRAP"; then
7089 ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
7091 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7095 test -z "$as_dir" && as_dir=.
7096 for ac_exec_ext in '' $ac_executable_extensions; do
7097 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7098 ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
7099 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7108 DLLWRAP=$ac_cv_prog_DLLWRAP
7109 if test -n "$DLLWRAP"; then
7110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
7111 $as_echo "$DLLWRAP" >&6; }
7113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7114 $as_echo "no" >&6; }
7119 if test -z "$ac_cv_prog_DLLWRAP"; then
7120 ac_ct_DLLWRAP=$DLLWRAP
7121 # Extract the first word of "dllwrap", so it can be a program name with args.
7122 set dummy dllwrap; ac_word=$2
7123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7124 $as_echo_n "checking for $ac_word... " >&6; }
7125 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
7126 $as_echo_n "(cached) " >&6
7128 if test -n "$ac_ct_DLLWRAP"; then
7129 ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
7131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7135 test -z "$as_dir" && as_dir=.
7136 for ac_exec_ext in '' $ac_executable_extensions; do
7137 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7138 ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
7139 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7148 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
7149 if test -n "$ac_ct_DLLWRAP"; then
7150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
7151 $as_echo "$ac_ct_DLLWRAP" >&6; }
7153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7154 $as_echo "no" >&6; }
7157 if test "x$ac_ct_DLLWRAP" = x; then
7160 case $cross_compiling:$ac_tool_warned in
7162 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7163 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7164 ac_tool_warned=yes ;;
7166 DLLWRAP=$ac_ct_DLLWRAP
7169 DLLWRAP="$ac_cv_prog_DLLWRAP"
7172 if test -n "$ac_tool_prefix"; then
7173 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7174 set dummy ${ac_tool_prefix}windres; ac_word=$2
7175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7176 $as_echo_n "checking for $ac_word... " >&6; }
7177 if ${ac_cv_prog_WINDRES+:} false; then :
7178 $as_echo_n "(cached) " >&6
7180 if test -n "$WINDRES"; then
7181 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7183 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7187 test -z "$as_dir" && as_dir=.
7188 for ac_exec_ext in '' $ac_executable_extensions; do
7189 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7190 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
7191 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7200 WINDRES=$ac_cv_prog_WINDRES
7201 if test -n "$WINDRES"; then
7202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7203 $as_echo "$WINDRES" >&6; }
7205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7206 $as_echo "no" >&6; }
7211 if test -z "$ac_cv_prog_WINDRES"; then
7212 ac_ct_WINDRES=$WINDRES
7213 # Extract the first word of "windres", so it can be a program name with args.
7214 set dummy windres; ac_word=$2
7215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7216 $as_echo_n "checking for $ac_word... " >&6; }
7217 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
7218 $as_echo_n "(cached) " >&6
7220 if test -n "$ac_ct_WINDRES"; then
7221 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7223 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7227 test -z "$as_dir" && as_dir=.
7228 for ac_exec_ext in '' $ac_executable_extensions; do
7229 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7230 ac_cv_prog_ac_ct_WINDRES="windres"
7231 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7240 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7241 if test -n "$ac_ct_WINDRES"; then
7242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7243 $as_echo "$ac_ct_WINDRES" >&6; }
7245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7246 $as_echo "no" >&6; }
7249 if test "x$ac_ct_WINDRES" = x; then
7252 case $cross_compiling:$ac_tool_warned in
7254 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7255 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7256 ac_tool_warned=yes ;;
7258 WINDRES=$ac_ct_WINDRES
7261 WINDRES="$ac_cv_prog_WINDRES"
7266 # Find a good install program. We prefer a C program (faster),
7267 # so one script is as good as another. But avoid the broken or
7268 # incompatible versions:
7269 # SysV /etc/install, /usr/sbin/install
7270 # SunOS /usr/etc/install
7271 # IRIX /sbin/install
7273 # AmigaOS /C/install, which installs bootblocks on floppy discs
7274 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7275 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
7276 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7277 # OS/2's system install, which has a completely different semantic
7278 # ./install, which can be erroneously created by make from ./install.sh.
7279 # Reject install programs that cannot install multiple files.
7280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7281 $as_echo_n "checking for a BSD-compatible install... " >&6; }
7282 if test -z "$INSTALL"; then
7283 if ${ac_cv_path_install+:} false; then :
7284 $as_echo_n "(cached) " >&6
7286 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7290 test -z "$as_dir" && as_dir=.
7291 # Account for people who put trailing slashes in PATH elements.
7292 case $as_dir/ in #((
7293 ./ | .// | /[cC]/* | \
7294 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7295 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7298 # OSF1 and SCO ODT 3.0 have their own names for install.
7299 # Don't use installbsd from OSF since it installs stuff as root
7301 for ac_prog in ginstall scoinst install; do
7302 for ac_exec_ext in '' $ac_executable_extensions; do
7303 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
7304 if test $ac_prog = install &&
7305 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7306 # AIX install. It has an incompatible calling convention.
7308 elif test $ac_prog = install &&
7309 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7310 # program-specific install script used by HP pwplus--don't use.
7313 rm -rf conftest.one conftest.two conftest.dir
7314 echo one > conftest.one
7315 echo two > conftest.two
7317 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7318 test -s conftest.one && test -s conftest.two &&
7319 test -s conftest.dir/conftest.one &&
7320 test -s conftest.dir/conftest.two
7322 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7335 rm -rf conftest.one conftest.two conftest.dir
7338 if test "${ac_cv_path_install+set}" = set; then
7339 INSTALL=$ac_cv_path_install
7341 # As a last resort, use the slow shell script. Don't cache a
7342 # value for INSTALL within a source directory, because that will
7343 # break other packages using the cache if that directory is
7344 # removed, or if the value is a relative name.
7345 INSTALL=$ac_install_sh
7348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7349 $as_echo "$INSTALL" >&6; }
7351 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7352 # It thinks the first close brace ends the variable substitution.
7353 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7355 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7357 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7359 # When Autoconf chooses install-sh as install program it tries to generate
7360 # a relative path to it in each makefile where it substitutes it. This clashes
7361 # with our Makefile.global concept. This workaround helps.
7363 *install-sh*) install_bin='';;
7364 *) install_bin=$INSTALL;;
7368 if test -z "$TAR"; then
7371 # Extract the first word of "$ac_prog", so it can be a program name with args.
7372 set dummy $ac_prog; ac_word=$2
7373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7374 $as_echo_n "checking for $ac_word... " >&6; }
7375 if ${ac_cv_path_TAR+:} false; then :
7376 $as_echo_n "(cached) " >&6
7380 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
7383 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7387 test -z "$as_dir" && as_dir=.
7388 for ac_exec_ext in '' $ac_executable_extensions; do
7389 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7390 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
7391 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7402 if test -n "$TAR"; then
7403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
7404 $as_echo "$TAR" >&6; }
7406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7407 $as_echo "no" >&6; }
7411 test -n "$TAR" && break
7415 # Report the value of TAR in configure's output in all cases.
7416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
7417 $as_echo_n "checking for TAR... " >&6; }
7418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
7419 $as_echo "$TAR" >&6; }
7422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7423 $as_echo_n "checking whether ln -s works... " >&6; }
7425 if test "$LN_S" = "ln -s"; then
7426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7427 $as_echo "yes" >&6; }
7429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7430 $as_echo "no, using $LN_S" >&6; }
7433 for ac_prog in gawk mawk nawk awk
7435 # Extract the first word of "$ac_prog", so it can be a program name with args.
7436 set dummy $ac_prog; ac_word=$2
7437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7438 $as_echo_n "checking for $ac_word... " >&6; }
7439 if ${ac_cv_prog_AWK+:} false; then :
7440 $as_echo_n "(cached) " >&6
7442 if test -n "$AWK"; then
7443 ac_cv_prog_AWK="$AWK" # Let the user override the test.
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_prog_AWK="$ac_prog"
7453 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7463 if test -n "$AWK"; then
7464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7465 $as_echo "$AWK" >&6; }
7467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7468 $as_echo "no" >&6; }
7472 test -n "$AWK" && break
7475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7476 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7477 if test -z "$MKDIR_P"; then
7478 if ${ac_cv_path_mkdir+:} false; then :
7479 $as_echo_n "(cached) " >&6
7481 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7482 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7485 test -z "$as_dir" && as_dir=.
7486 for ac_prog in mkdir gmkdir; do
7487 for ac_exec_ext in '' $ac_executable_extensions; do
7488 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
7489 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7490 'mkdir (GNU coreutils) '* | \
7491 'mkdir (coreutils) '* | \
7492 'mkdir (fileutils) '4.1*)
7493 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7503 test -d ./--version && rmdir ./--version
7504 if test "${ac_cv_path_mkdir+set}" = set; then
7505 MKDIR_P="$ac_cv_path_mkdir -p"
7507 # As a last resort, use the slow shell script. Don't cache a
7508 # value for MKDIR_P within a source directory, because that will
7509 # break other packages using the cache if that directory is
7510 # removed, or if the value is a relative name.
7511 MKDIR_P="$ac_install_sh -d"
7514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7515 $as_echo "$MKDIR_P" >&6; }
7517 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
7518 # a relative path to it in each makefile where it substitutes it. This clashes
7519 # with our Makefile.global concept. This workaround helps.
7521 *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
7524 if test -z "$BISON"; then
7525 for ac_prog in bison
7527 # Extract the first word of "$ac_prog", so it can be a program name with args.
7528 set dummy $ac_prog; ac_word=$2
7529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7530 $as_echo_n "checking for $ac_word... " >&6; }
7531 if ${ac_cv_path_BISON+:} false; then :
7532 $as_echo_n "(cached) " >&6
7536 ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
7539 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7543 test -z "$as_dir" && as_dir=.
7544 for ac_exec_ext in '' $ac_executable_extensions; do
7545 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7546 ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
7547 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7557 BISON=$ac_cv_path_BISON
7558 if test -n "$BISON"; then
7559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
7560 $as_echo "$BISON" >&6; }
7562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7563 $as_echo "no" >&6; }
7567 test -n "$BISON" && break
7571 # Report the value of BISON in configure's output in all cases.
7572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
7573 $as_echo_n "checking for BISON... " >&6; }
7574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
7575 $as_echo "$BISON" >&6; }
7579 if test "$BISON"; then
7580 pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
7581 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
7582 $as_echo "$as_me: using $pgac_bison_version" >&6;}
7583 if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
7585 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7586 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7587 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
7588 $as_echo "$as_me: WARNING:
7589 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7590 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
7593 # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
7594 # of the now preferred %name-prefix "base_yy", but the latter
7595 # doesn't work with Bison 2.3 or less. So for now we silence the
7596 # deprecation warnings.
7597 if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
7599 BISONFLAGS="$BISONFLAGS -Wno-deprecated"
7603 if test -z "$BISON"; then
7604 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7605 *** Without Bison you will not be able to build PostgreSQL from Git nor
7606 *** change any of the parser definition files. You can obtain Bison from
7607 *** a GNU mirror site. (If you are using the official distribution of
7608 *** PostgreSQL then you do not need to worry about this, because the Bison
7609 *** output is pre-generated.)" >&5
7610 $as_echo "$as_me: WARNING:
7611 *** Without Bison you will not be able to build PostgreSQL from Git nor
7612 *** change any of the parser definition files. You can obtain Bison from
7613 *** a GNU mirror site. (If you are using the official distribution of
7614 *** PostgreSQL then you do not need to worry about this, because the Bison
7615 *** output is pre-generated.)" >&2;}
7617 # We don't need AC_SUBST(BISON) because PGAC_PATH_PROGS did it
7620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
7621 $as_echo_n "checking for flex... " >&6; }
7622 if ${pgac_cv_path_flex+:} false; then :
7623 $as_echo_n "(cached) " >&6
7625 # Let the user override the test
7626 if test -n "$FLEX"; then
7627 pgac_cv_path_flex=$FLEX
7631 for pgac_dir in $PATH; do
7633 if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
7636 for pgac_prog in flex lex; do
7637 pgac_candidate="$pgac_dir/$pgac_prog"
7638 if test -f "$pgac_candidate" \
7639 && $pgac_candidate --version </dev/null >/dev/null 2>&1
7641 echo '%%' > conftest.l
7642 if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
7643 pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
7644 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;}'
7646 pgac_cv_path_flex=$pgac_candidate
7649 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7650 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7651 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
7652 $as_echo "$as_me: WARNING:
7653 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7654 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
7660 rm -f conftest.l lex.yy.c
7661 : ${pgac_cv_path_flex=no}
7665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
7666 $as_echo "$pgac_cv_path_flex" >&6; }
7667 if test x"$pgac_cv_path_flex" = x"no"; then
7668 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7669 *** Without Flex you will not be able to build PostgreSQL from Git nor
7670 *** change any of the scanner definition files. You can obtain Flex from
7671 *** a GNU mirror site. (If you are using the official distribution of
7672 *** PostgreSQL then you do not need to worry about this because the Flex
7673 *** output is pre-generated.)" >&5
7674 $as_echo "$as_me: WARNING:
7675 *** Without Flex you will not be able to build PostgreSQL from Git nor
7676 *** change any of the scanner definition files. You can obtain Flex from
7677 *** a GNU mirror site. (If you are using the official distribution of
7678 *** PostgreSQL then you do not need to worry about this because the Flex
7679 *** output is pre-generated.)" >&2;}
7683 FLEX=$pgac_cv_path_flex
7684 pgac_flex_version=`$FLEX --version 2>/dev/null`
7685 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
7686 $as_echo "$as_me: using $pgac_flex_version" >&6;}
7693 if test -z "$PERL"; then
7696 # Extract the first word of "$ac_prog", so it can be a program name with args.
7697 set dummy $ac_prog; ac_word=$2
7698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7699 $as_echo_n "checking for $ac_word... " >&6; }
7700 if ${ac_cv_path_PERL+:} false; then :
7701 $as_echo_n "(cached) " >&6
7705 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
7708 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7712 test -z "$as_dir" && as_dir=.
7713 for ac_exec_ext in '' $ac_executable_extensions; do
7714 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7715 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
7716 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7726 PERL=$ac_cv_path_PERL
7727 if test -n "$PERL"; then
7728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
7729 $as_echo "$PERL" >&6; }
7731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7732 $as_echo "no" >&6; }
7736 test -n "$PERL" && break
7740 # Report the value of PERL in configure's output in all cases.
7741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
7742 $as_echo_n "checking for PERL... " >&6; }
7743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
7744 $as_echo "$PERL" >&6; }
7748 if test "$PERL"; then
7749 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'`
7750 { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
7751 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
7752 if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
7753 $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
7755 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7756 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7757 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
7758 $as_echo "$as_me: WARNING:
7759 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7760 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
7765 if test -z "$PERL"; then
7766 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7767 *** Without Perl you will not be able to build PostgreSQL from Git.
7768 *** You can obtain Perl from any CPAN mirror site.
7769 *** (If you are using the official distribution of PostgreSQL then you do not
7770 *** need to worry about this, because the Perl output is pre-generated.)" >&5
7771 $as_echo "$as_me: WARNING:
7772 *** Without Perl you will not be able to build PostgreSQL from Git.
7773 *** You can obtain Perl from any CPAN mirror site.
7774 *** (If you are using the official distribution of PostgreSQL then you do not
7775 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
7778 if test "$with_perl" = yes; then
7779 if test -z "$PERL"; then
7780 as_fn_error $? "Perl not found" "$LINENO" 5
7783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
7784 $as_echo_n "checking for Perl archlibexp... " >&6; }
7785 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
7786 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
7787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
7788 $as_echo "$perl_archlibexp" >&6; }
7789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
7790 $as_echo_n "checking for Perl privlibexp... " >&6; }
7791 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
7792 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
7793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
7794 $as_echo "$perl_privlibexp" >&6; }
7795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
7796 $as_echo_n "checking for Perl useshrplib... " >&6; }
7797 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
7798 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
7799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
7800 $as_echo "$perl_useshrplib" >&6; }
7801 if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
7802 as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
7803 You might have to rebuild your Perl installation. Refer to the
7804 documentation for details. Use --without-perl to disable building
7805 PL/Perl." "$LINENO" 5
7808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
7809 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
7810 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
7811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
7812 $as_echo "$perl_ccflags" >&6; }
7813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
7814 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
7815 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
7816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
7817 $as_echo "$perl_embed_ccflags" >&6; }
7820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
7821 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
7822 if test "$PORTNAME" = "win32" ; then
7823 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
7824 test -e "$perl_archlibexp/CORE/$perl_lib.lib" && perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
7826 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
7827 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
7828 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
7830 if test -z "$perl_embed_ldflags" ; then
7831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7832 $as_echo "no" >&6; }
7833 as_fn_error $? "could not determine flags for linking embedded Perl.
7834 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
7835 installed." "$LINENO" 5
7837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
7838 $as_echo "$perl_embed_ldflags" >&6; }
7843 if test "$with_python" = yes; then
7844 if test -z "$PYTHON"; then
7845 for ac_prog in python
7847 # Extract the first word of "$ac_prog", so it can be a program name with args.
7848 set dummy $ac_prog; ac_word=$2
7849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7850 $as_echo_n "checking for $ac_word... " >&6; }
7851 if ${ac_cv_path_PYTHON+:} false; then :
7852 $as_echo_n "(cached) " >&6
7856 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
7859 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7863 test -z "$as_dir" && as_dir=.
7864 for ac_exec_ext in '' $ac_executable_extensions; do
7865 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7866 ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
7867 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7877 PYTHON=$ac_cv_path_PYTHON
7878 if test -n "$PYTHON"; then
7879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
7880 $as_echo "$PYTHON" >&6; }
7882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7883 $as_echo "no" >&6; }
7887 test -n "$PYTHON" && break
7891 # Report the value of PYTHON in configure's output in all cases.
7892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
7893 $as_echo_n "checking for PYTHON... " >&6; }
7894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
7895 $as_echo "$PYTHON" >&6; }
7898 if test x"$PYTHON" = x""; then
7899 as_fn_error $? "Python not found" "$LINENO" 5
7903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
7904 $as_echo_n "checking for Python distutils module... " >&6; }
7905 if "${PYTHON}" -c 'import distutils' 2>&5
7907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7908 $as_echo "yes" >&6; }
7910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7911 $as_echo "no" >&6; }
7912 as_fn_error $? "distutils module not found" "$LINENO" 5
7914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
7915 $as_echo_n "checking Python configuration directory... " >&6; }
7916 python_majorversion=`${PYTHON} -c "import sys; print(sys.version[0])"`
7917 python_minorversion=`${PYTHON} -c "import sys; print(sys.version[2])"`
7918 python_version=`${PYTHON} -c "import sys; print(sys.version[:3])"`
7919 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
7920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
7921 $as_echo "$python_configdir" >&6; }
7923 # Reject unsupported Python versions as soon as practical.
7924 if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 4; then
7925 as_fn_error $? "Python version $python_version is too old (version 2.4 or later is required)" "$LINENO" 5
7928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
7929 $as_echo_n "checking Python include directories... " >&6; }
7930 python_includespec=`${PYTHON} -c "
7931 import distutils.sysconfig
7932 a = '-I' + distutils.sysconfig.get_python_inc(False)
7933 b = '-I' + distutils.sysconfig.get_python_inc(True)
7937 print(a + ' ' + b)"`
7938 if test "$PORTNAME" = win32 ; then
7939 python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
7941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
7942 $as_echo "$python_includespec" >&6; }
7946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
7947 $as_echo_n "checking how to link an embedded Python application... " >&6; }
7949 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
7950 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
7952 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
7953 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
7954 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
7956 ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
7959 # Otherwise, guess the base name of the shlib.
7960 # LDVERSION was added in Python 3.2, before that use VERSION,
7961 # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
7962 python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
7963 if test x"${python_ldversion}" != x""; then
7964 ldlibrary="python${python_ldversion}"
7966 python_version_var=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('VERSION'))))"`
7967 if test x"${python_version_var}" != x""; then
7968 ldlibrary="python${python_version_var}"
7970 ldlibrary="python${python_version}"
7973 # Search for a likely-looking file.
7975 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
7977 # We don't know the platform DLSUFFIX here, so check 'em all.
7978 for e in .so .dll .dylib .sl; do
7979 if test -e "$d/lib${ldlibrary}$e"; then
7986 # Some platforms (OpenBSD) require us to accept a bare versioned shlib
7987 # (".so.n.n") as well. However, check this only after failing to find
7988 # ".so" anywhere, because yet other platforms (Debian) put the .so
7989 # symlink in a different directory from the underlying versioned shlib.
7990 if test "$found_shlib" != 1; then
7991 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
7993 for f in "$d/lib${ldlibrary}.so."* ; do
7994 if test -e "$f"; then
8002 # As usual, Windows has its own ideas. Possible default library
8003 # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
8004 # and the "lib" prefix might not be there.
8005 if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
8006 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
8008 for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
8009 if test -e "$f"; then
8018 if test "$found_shlib" != 1; then
8019 as_fn_error $? "could not find shared library for Python
8020 You might have to rebuild your Python installation. Refer to the
8021 documentation for details. Use --without-python to disable building
8022 PL/Python." "$LINENO" 5
8024 python_libspec="-L${python_libdir} -l${ldlibrary}"
8026 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
8028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
8029 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
8035 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
8036 if test -z "$ZIC"; then
8039 # Extract the first word of "$ac_prog", so it can be a program name with args.
8040 set dummy $ac_prog; ac_word=$2
8041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8042 $as_echo_n "checking for $ac_word... " >&6; }
8043 if ${ac_cv_path_ZIC+:} false; then :
8044 $as_echo_n "(cached) " >&6
8048 ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
8051 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8055 test -z "$as_dir" && as_dir=.
8056 for ac_exec_ext in '' $ac_executable_extensions; do
8057 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8058 ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
8059 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8070 if test -n "$ZIC"; then
8071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
8072 $as_echo "$ZIC" >&6; }
8074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8075 $as_echo "no" >&6; }
8079 test -n "$ZIC" && break
8083 # Report the value of ZIC in configure's output in all cases.
8084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
8085 $as_echo_n "checking for ZIC... " >&6; }
8086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
8087 $as_echo "$ZIC" >&6; }
8090 if test -z "$ZIC"; then
8092 When cross-compiling, either use the option --with-system-tzdata to use
8093 existing time-zone data, or set the environment variable ZIC to a zic
8094 program to use during the build." "$LINENO" 5
8101 # For each platform, we need to know about any special compile and link
8102 # libraries, and whether the normal C function names are thread-safe.
8103 # See the comment at the top of src/port/thread.c for more information.
8104 # WIN32 doesn't need the pthread tests; it always uses threads
8106 # These tests are run before the library-tests, because linking with the
8107 # other libraries can pull in the pthread functions as a side-effect. We
8108 # want to use the -pthread or similar flags directly, and not rely on
8109 # the side-effects of linking with some other library.
8111 # note: We have to use AS_IF here rather than plain if. The AC_CHECK_HEADER
8112 # invocation below is the first one in the script, and autoconf generates
8113 # additional code for that, which must not be inside the if-block. AS_IF
8114 # knows how to do that.
8115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
8116 $as_echo_n "checking for ANSI C header files... " >&6; }
8117 if ${ac_cv_header_stdc+:} false; then :
8118 $as_echo_n "(cached) " >&6
8120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8121 /* end confdefs.h. */
8135 if ac_fn_c_try_compile "$LINENO"; then :
8136 ac_cv_header_stdc=yes
8138 ac_cv_header_stdc=no
8140 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8142 if test $ac_cv_header_stdc = yes; then
8143 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8145 /* end confdefs.h. */
8149 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8150 $EGREP "memchr" >/dev/null 2>&1; then :
8153 ac_cv_header_stdc=no
8159 if test $ac_cv_header_stdc = yes; then
8160 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8162 /* end confdefs.h. */
8166 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8167 $EGREP "free" >/dev/null 2>&1; then :
8170 ac_cv_header_stdc=no
8176 if test $ac_cv_header_stdc = yes; then
8177 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8178 if test "$cross_compiling" = yes; then :
8181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8182 /* end confdefs.h. */
8185 #if ((' ' & 0x0FF) == 0x020)
8186 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8187 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8189 # define ISLOWER(c) \
8190 (('a' <= (c) && (c) <= 'i') \
8191 || ('j' <= (c) && (c) <= 'r') \
8192 || ('s' <= (c) && (c) <= 'z'))
8193 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8196 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8201 for (i = 0; i < 256; i++)
8202 if (XOR (islower (i), ISLOWER (i))
8203 || toupper (i) != TOUPPER (i))
8208 if ac_fn_c_try_run "$LINENO"; then :
8211 ac_cv_header_stdc=no
8213 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8214 conftest.$ac_objext conftest.beam conftest.$ac_ext
8219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8220 $as_echo "$ac_cv_header_stdc" >&6; }
8221 if test $ac_cv_header_stdc = yes; then
8223 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
8227 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8228 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8229 inttypes.h stdint.h unistd.h
8231 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8232 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
8234 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8235 cat >>confdefs.h <<_ACEOF
8236 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8244 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
8250 ac_cpp='$CPP $CPPFLAGS'
8251 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8252 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8253 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8257 # We used to check for pthread.h first, but this fails if pthread.h
8258 # requires special compiler flags (e.g. on Tru64 or Sequent).
8259 # It gets checked for in the link test anyway.
8261 # First of all, check if the user has set any of the PTHREAD_LIBS,
8262 # etcetera environment variables, and if threads linking works using
8264 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
8265 save_CFLAGS="$CFLAGS"
8266 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8268 LIBS="$PTHREAD_LIBS $LIBS"
8269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
8270 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
8271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8272 /* end confdefs.h. */
8274 /* Override any GCC internal prototype to avoid an error.
8275 Use char because int might match the return type of a GCC
8276 builtin and then its argument prototype would still apply. */
8280 char pthread_join ();
8284 return pthread_join ();
8289 if ac_fn_c_try_link "$LINENO"; then :
8292 rm -f core conftest.err conftest.$ac_objext \
8293 conftest$ac_exeext conftest.$ac_ext
8294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
8295 $as_echo "$ax_pthread_ok" >&6; }
8296 if test x"$ax_pthread_ok" = xno; then
8301 CFLAGS="$save_CFLAGS"
8304 # We must check for the threads library under a number of different
8305 # names; the ordering is very important because some systems
8306 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
8307 # libraries is broken (non-POSIX).
8309 # Create a list of thread flags to try. Items starting with a "-" are
8310 # C compiler flags, and other items are library names, except for "none"
8311 # which indicates that we try without any flags at all, and "pthread-config"
8312 # which is a program returning the flags for the Pth emulation library.
8314 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt -mthreads pthread --thread-safe pthread-config"
8316 # The ordering *is* (sometimes) important. Some notes on the
8317 # individual items follow:
8319 # pthreads: AIX (must check this before -lpthread)
8320 # none: in case threads are in libc; should be tried before -Kthread and
8321 # other compiler flags to prevent continual compiler warnings
8322 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
8323 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
8324 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
8325 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
8326 # -pthreads: Solaris/gcc
8327 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
8328 # doesn't hurt to check since this sometimes defines pthreads and
8329 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
8330 # is present but should not be used directly)
8331 # -mthreads: Mingw32/gcc, Lynx/gcc
8332 # pthread: Linux, etcetera
8333 # --thread-safe: KAI C++
8334 # pthread-config: use pthread-config program (for GNU Pth library)
8340 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
8341 # multi-threading and also sets -lpthread."
8343 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
8348 # IBM z/OS requires a feature-test macro to be defined in order to
8349 # enable POSIX threads at all, so give the user a hint if this is
8350 # not set. (We don't define these ourselves, as they can affect
8351 # other portions of the system API in unpredictable ways.)
8353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8354 /* end confdefs.h. */
8356 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
8357 AX_PTHREAD_ZOS_MISSING
8361 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8362 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
8363 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
8364 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
8372 # Newer versions of Solaris require the "-mt -lpthread" pair, and we
8373 # check that first. On some older versions, libc contains stubbed
8374 # (non-functional) versions of the pthreads routines, so link-based
8375 # tests will erroneously succeed. (We need to link with -pthreads/-mt/
8376 # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
8377 # a function called by this macro, so we could check for that, but
8378 # who knows whether they'll stub that too in a future libc.) So
8379 # we'll look for -pthreads and -lpthread shortly thereafter.
8381 ax_pthread_flags="-mt,pthread -pthreads -pthread pthread $ax_pthread_flags"
8385 # Older versions of Clang only give a warning instead of an error for an
8386 # unrecognized option, unless we specify -Werror. (We throw in some extra
8387 # Clang warning flags for good measure.)
8389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs certain flags to reject unknown flags" >&5
8390 $as_echo_n "checking if compiler needs certain flags to reject unknown flags... " >&6; }
8391 if ${ax_cv_PTHREAD_REJECT_UNKNOWN+:} false; then :
8392 $as_echo_n "(cached) " >&6
8394 ax_cv_PTHREAD_REJECT_UNKNOWN=unknown
8395 save_CFLAGS="$CFLAGS"
8396 ax_pthread_extra_flags="-Wunknown-warning-option -Wunused-command-line-argument"
8397 CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wfoobaz -foobaz"
8398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8399 /* end confdefs.h. */
8409 if ac_fn_c_try_compile "$LINENO"; then :
8410 ax_cv_PTHREAD_REJECT_UNKNOWN="-Werror $ax_pthread_extra_flags"
8412 ax_cv_PTHREAD_REJECT_UNKNOWN=no
8414 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8415 CFLAGS="$save_CFLAGS"
8418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_REJECT_UNKNOWN" >&5
8419 $as_echo "$ax_cv_PTHREAD_REJECT_UNKNOWN" >&6; }
8420 ax_pthread_extra_flags=
8421 if test "x$ax_cv_PTHREAD_REJECT_UNKNOWN" != "xno"; then :
8422 ax_pthread_extra_flags="$ax_cv_PTHREAD_REJECT_UNKNOWN"
8425 if test x"$ax_pthread_ok" = xno; then
8426 for flag in $ax_pthread_flags; do
8430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
8431 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
8435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
8436 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
8437 PTHREAD_CFLAGS="-mt"
8438 PTHREAD_LIBS="-lpthread"
8442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
8443 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
8444 PTHREAD_CFLAGS="$flag"
8448 # Extract the first word of "pthread-config", so it can be a program name with args.
8449 set dummy pthread-config; ac_word=$2
8450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8451 $as_echo_n "checking for $ac_word... " >&6; }
8452 if ${ac_cv_prog_ax_pthread_config+:} false; then :
8453 $as_echo_n "(cached) " >&6
8455 if test -n "$ax_pthread_config"; then
8456 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
8458 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8462 test -z "$as_dir" && as_dir=.
8463 for ac_exec_ext in '' $ac_executable_extensions; do
8464 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8465 ac_cv_prog_ax_pthread_config="yes"
8466 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8473 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
8476 ax_pthread_config=$ac_cv_prog_ax_pthread_config
8477 if test -n "$ax_pthread_config"; then
8478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
8479 $as_echo "$ax_pthread_config" >&6; }
8481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8482 $as_echo "no" >&6; }
8486 if test x"$ax_pthread_config" = xno; then continue; fi
8487 PTHREAD_CFLAGS="`pthread-config --cflags`"
8488 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
8492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
8493 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
8494 PTHREAD_LIBS="-l$flag"
8499 save_CFLAGS="$CFLAGS"
8500 LIBS="$PTHREAD_LIBS $LIBS"
8501 CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
8503 # Check for various functions. We must include pthread.h,
8504 # since some functions may be macros. (On the Sequent, we
8505 # need a special flag -Kthread to make this header compile.)
8506 # We check for pthread_join because it is in -lpthread on IRIX
8507 # while pthread_create is in libc. We check for pthread_attr_init
8508 # due to DEC craziness with -lpthreads. We check for
8509 # pthread_cleanup_push because it is one of the few pthread
8510 # functions on Solaris that doesn't have a non-functional libc stub.
8511 # We try pthread_create on general principles.
8512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8513 /* end confdefs.h. */
8514 #include <pthread.h>
8515 static void routine(void *a) { a = 0; }
8516 static void *start_routine(void *a) { return a; }
8520 pthread_t th; pthread_attr_t attr;
8521 pthread_create(&th, 0, start_routine, 0);
8522 pthread_join(th, 0);
8523 pthread_attr_init(&attr);
8524 pthread_cleanup_push(routine, 0);
8525 pthread_cleanup_pop(0) /* ; */
8530 if ac_fn_c_try_link "$LINENO"; then :
8533 rm -f core conftest.err conftest.$ac_objext \
8534 conftest$ac_exeext conftest.$ac_ext
8537 CFLAGS="$save_CFLAGS"
8539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
8540 $as_echo "$ax_pthread_ok" >&6; }
8541 if test "x$ax_pthread_ok" = xyes; then
8550 # Various other checks:
8551 if test "x$ax_pthread_ok" = xyes; then
8553 LIBS="$PTHREAD_LIBS $LIBS"
8554 save_CFLAGS="$CFLAGS"
8555 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8557 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
8558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
8559 $as_echo_n "checking for joinable pthread attribute... " >&6; }
8560 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
8561 $as_echo_n "(cached) " >&6
8563 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
8564 for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
8565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8566 /* end confdefs.h. */
8567 #include <pthread.h>
8571 int attr = $attr; return attr /* ; */
8576 if ac_fn_c_try_link "$LINENO"; then :
8577 ax_cv_PTHREAD_JOINABLE_ATTR=$attr; break
8579 rm -f core conftest.err conftest.$ac_objext \
8580 conftest$ac_exeext conftest.$ac_ext
8584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
8585 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
8586 if test "$ax_cv_PTHREAD_JOINABLE_ATTR" != unknown && \
8587 test "$ax_cv_PTHREAD_JOINABLE_ATTR" != PTHREAD_CREATE_JOINABLE; then :
8589 cat >>confdefs.h <<_ACEOF
8590 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
8595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
8596 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
8597 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
8598 $as_echo_n "(cached) " >&6
8600 ax_cv_PTHREAD_SPECIAL_FLAGS=no
8601 ax_pthread_special_flags_added=no
8602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8603 /* end confdefs.h. */
8605 # if !defined(_REENTRANT) && !defined(_THREAD_SAFE)
8606 AX_PTHREAD_NEED_SPECIAL_FLAG
8610 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8611 $EGREP "AX_PTHREAD_NEED_SPECIAL_FLAG" >/dev/null 2>&1; then :
8614 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_THREAD_SAFE"
8616 darwin* | hpux* | osf* | solaris*)
8617 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_REENTRANT"
8626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
8627 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
8628 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
8629 test "x$ax_pthread_special_flags_added" != "xyes"; then :
8630 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
8631 ax_pthread_special_flags_added=yes
8634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
8635 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
8636 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
8637 $as_echo_n "(cached) " >&6
8639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8640 /* end confdefs.h. */
8641 #include <pthread.h>
8645 int i = PTHREAD_PRIO_INHERIT;
8650 if ac_fn_c_try_link "$LINENO"; then :
8651 ax_cv_PTHREAD_PRIO_INHERIT=yes
8653 ax_cv_PTHREAD_PRIO_INHERIT=no
8655 rm -f core conftest.err conftest.$ac_objext \
8656 conftest$ac_exeext conftest.$ac_ext
8659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
8660 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
8661 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
8663 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
8668 CFLAGS="$save_CFLAGS"
8670 # More AIX lossage: compile with *_r variant
8671 if test "x$GCC" != xyes; then
8675 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
8676 #handle absolute path differently from PATH based program lookup
8679 if as_fn_executable_p ${CC}_r; then :
8680 PTHREAD_CC="${CC}_r"
8683 for ac_prog in ${CC}_r
8685 # Extract the first word of "$ac_prog", so it can be a program name with args.
8686 set dummy $ac_prog; ac_word=$2
8687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8688 $as_echo_n "checking for $ac_word... " >&6; }
8689 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
8690 $as_echo_n "(cached) " >&6
8692 if test -n "$PTHREAD_CC"; then
8693 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
8695 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8699 test -z "$as_dir" && as_dir=.
8700 for ac_exec_ext in '' $ac_executable_extensions; do
8701 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8702 ac_cv_prog_PTHREAD_CC="$ac_prog"
8703 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8712 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
8713 if test -n "$PTHREAD_CC"; then
8714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
8715 $as_echo "$PTHREAD_CC" >&6; }
8717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8718 $as_echo "no" >&6; }
8722 test -n "$PTHREAD_CC" && break
8724 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
8735 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
8741 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
8742 if test x"$ax_pthread_ok" = xyes; then
8744 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
8752 ac_cpp='$CPP $CPPFLAGS'
8753 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8754 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8755 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8759 # Some platforms use these, so just define them. They can't hurt if they
8760 # are not supported. For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
8761 # enables 5-arg getpwuid_r, among other things.
8762 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
8764 # Check for *_r functions
8767 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8768 LIBS="$LIBS $PTHREAD_LIBS"
8770 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
8771 if test "x$ac_cv_header_pthread_h" = xyes; then :
8775 pthread.h not found; use --disable-thread-safety to disable thread safety" "$LINENO" 5
8780 for ac_func in strerror_r getpwuid_r gethostbyname_r
8782 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8783 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8784 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8785 cat >>confdefs.h <<_ACEOF
8786 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8793 # Do test here with the proper thread flags
8794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
8795 $as_echo_n "checking whether strerror_r returns int... " >&6; }
8796 if ${pgac_cv_func_strerror_r_int+:} false; then :
8797 $as_echo_n "(cached) " >&6
8799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8800 /* end confdefs.h. */
8806 int strerror_r(int, char *, size_t);
8808 /* Older AIX has 'int' for the third argument so we don't test the args. */
8815 if ac_fn_c_try_compile "$LINENO"; then :
8816 pgac_cv_func_strerror_r_int=yes
8818 pgac_cv_func_strerror_r_int=no
8820 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
8823 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
8824 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
8826 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
8837 # do not use values from template file
8850 ## Most libraries are included only if they demonstrably provide a function
8851 ## we need, but libm is an exception: always include it, because there are
8852 ## too many compilers that play cute optimization games that will break
8853 ## probes for standard functions such as pow().
8856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
8857 $as_echo_n "checking for main in -lm... " >&6; }
8858 if ${ac_cv_lib_m_main+:} false; then :
8859 $as_echo_n "(cached) " >&6
8861 ac_check_lib_save_LIBS=$LIBS
8863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8864 /* end confdefs.h. */
8875 if ac_fn_c_try_link "$LINENO"; then :
8876 ac_cv_lib_m_main=yes
8880 rm -f core conftest.err conftest.$ac_objext \
8881 conftest$ac_exeext conftest.$ac_ext
8882 LIBS=$ac_check_lib_save_LIBS
8884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
8885 $as_echo "$ac_cv_lib_m_main" >&6; }
8886 if test "x$ac_cv_lib_m_main" = xyes; then :
8887 cat >>confdefs.h <<_ACEOF
8895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
8896 $as_echo_n "checking for library containing setproctitle... " >&6; }
8897 if ${ac_cv_search_setproctitle+:} false; then :
8898 $as_echo_n "(cached) " >&6
8900 ac_func_search_save_LIBS=$LIBS
8901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8902 /* end confdefs.h. */
8904 /* Override any GCC internal prototype to avoid an error.
8905 Use char because int might match the return type of a GCC
8906 builtin and then its argument prototype would still apply. */
8910 char setproctitle ();
8914 return setproctitle ();
8919 for ac_lib in '' util; do
8920 if test -z "$ac_lib"; then
8921 ac_res="none required"
8924 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8926 if ac_fn_c_try_link "$LINENO"; then :
8927 ac_cv_search_setproctitle=$ac_res
8929 rm -f core conftest.err conftest.$ac_objext \
8931 if ${ac_cv_search_setproctitle+:} false; then :
8935 if ${ac_cv_search_setproctitle+:} false; then :
8938 ac_cv_search_setproctitle=no
8941 LIBS=$ac_func_search_save_LIBS
8943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
8944 $as_echo "$ac_cv_search_setproctitle" >&6; }
8945 ac_res=$ac_cv_search_setproctitle
8946 if test "$ac_res" != no; then :
8947 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
8952 $as_echo_n "checking for library containing dlopen... " >&6; }
8953 if ${ac_cv_search_dlopen+:} false; then :
8954 $as_echo_n "(cached) " >&6
8956 ac_func_search_save_LIBS=$LIBS
8957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8958 /* end confdefs.h. */
8960 /* Override any GCC internal prototype to avoid an error.
8961 Use char because int might match the return type of a GCC
8962 builtin and then its argument prototype would still apply. */
8975 for ac_lib in '' dl; do
8976 if test -z "$ac_lib"; then
8977 ac_res="none required"
8980 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8982 if ac_fn_c_try_link "$LINENO"; then :
8983 ac_cv_search_dlopen=$ac_res
8985 rm -f core conftest.err conftest.$ac_objext \
8987 if ${ac_cv_search_dlopen+:} false; then :
8991 if ${ac_cv_search_dlopen+:} false; then :
8994 ac_cv_search_dlopen=no
8997 LIBS=$ac_func_search_save_LIBS
8999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9000 $as_echo "$ac_cv_search_dlopen" >&6; }
9001 ac_res=$ac_cv_search_dlopen
9002 if test "$ac_res" != no; then :
9003 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
9008 $as_echo_n "checking for library containing socket... " >&6; }
9009 if ${ac_cv_search_socket+:} false; then :
9010 $as_echo_n "(cached) " >&6
9012 ac_func_search_save_LIBS=$LIBS
9013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9014 /* end confdefs.h. */
9016 /* Override any GCC internal prototype to avoid an error.
9017 Use char because int might match the return type of a GCC
9018 builtin and then its argument prototype would still apply. */
9031 for ac_lib in '' socket ws2_32; do
9032 if test -z "$ac_lib"; then
9033 ac_res="none required"
9036 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9038 if ac_fn_c_try_link "$LINENO"; then :
9039 ac_cv_search_socket=$ac_res
9041 rm -f core conftest.err conftest.$ac_objext \
9043 if ${ac_cv_search_socket+:} false; then :
9047 if ${ac_cv_search_socket+:} false; then :
9050 ac_cv_search_socket=no
9053 LIBS=$ac_func_search_save_LIBS
9055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
9056 $as_echo "$ac_cv_search_socket" >&6; }
9057 ac_res=$ac_cv_search_socket
9058 if test "$ac_res" != no; then :
9059 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
9064 $as_echo_n "checking for library containing shl_load... " >&6; }
9065 if ${ac_cv_search_shl_load+:} false; then :
9066 $as_echo_n "(cached) " >&6
9068 ac_func_search_save_LIBS=$LIBS
9069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9070 /* end confdefs.h. */
9072 /* Override any GCC internal prototype to avoid an error.
9073 Use char because int might match the return type of a GCC
9074 builtin and then its argument prototype would still apply. */
9087 for ac_lib in '' dld; do
9088 if test -z "$ac_lib"; then
9089 ac_res="none required"
9092 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9094 if ac_fn_c_try_link "$LINENO"; then :
9095 ac_cv_search_shl_load=$ac_res
9097 rm -f core conftest.err conftest.$ac_objext \
9099 if ${ac_cv_search_shl_load+:} false; then :
9103 if ${ac_cv_search_shl_load+:} false; then :
9106 ac_cv_search_shl_load=no
9109 LIBS=$ac_func_search_save_LIBS
9111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
9112 $as_echo "$ac_cv_search_shl_load" >&6; }
9113 ac_res=$ac_cv_search_shl_load
9114 if test "$ac_res" != no; then :
9115 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9119 # We only use libld in port/dynloader/aix.c
9122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldopen" >&5
9123 $as_echo_n "checking for library containing ldopen... " >&6; }
9124 if ${ac_cv_search_ldopen+:} false; then :
9125 $as_echo_n "(cached) " >&6
9127 ac_func_search_save_LIBS=$LIBS
9128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9129 /* end confdefs.h. */
9131 /* Override any GCC internal prototype to avoid an error.
9132 Use char because int might match the return type of a GCC
9133 builtin and then its argument prototype would still apply. */
9146 for ac_lib in '' ld; do
9147 if test -z "$ac_lib"; then
9148 ac_res="none required"
9151 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9153 if ac_fn_c_try_link "$LINENO"; then :
9154 ac_cv_search_ldopen=$ac_res
9156 rm -f core conftest.err conftest.$ac_objext \
9158 if ${ac_cv_search_ldopen+:} false; then :
9162 if ${ac_cv_search_ldopen+:} false; then :
9165 ac_cv_search_ldopen=no
9168 LIBS=$ac_func_search_save_LIBS
9170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldopen" >&5
9171 $as_echo "$ac_cv_search_ldopen" >&6; }
9172 ac_res=$ac_cv_search_ldopen
9173 if test "$ac_res" != no; then :
9174 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
9181 $as_echo_n "checking for library containing getopt_long... " >&6; }
9182 if ${ac_cv_search_getopt_long+:} false; then :
9183 $as_echo_n "(cached) " >&6
9185 ac_func_search_save_LIBS=$LIBS
9186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9187 /* end confdefs.h. */
9189 /* Override any GCC internal prototype to avoid an error.
9190 Use char because int might match the return type of a GCC
9191 builtin and then its argument prototype would still apply. */
9195 char getopt_long ();
9199 return getopt_long ();
9204 for ac_lib in '' getopt gnugetopt; do
9205 if test -z "$ac_lib"; then
9206 ac_res="none required"
9209 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9211 if ac_fn_c_try_link "$LINENO"; then :
9212 ac_cv_search_getopt_long=$ac_res
9214 rm -f core conftest.err conftest.$ac_objext \
9216 if ${ac_cv_search_getopt_long+:} false; then :
9220 if ${ac_cv_search_getopt_long+:} false; then :
9223 ac_cv_search_getopt_long=no
9226 LIBS=$ac_func_search_save_LIBS
9228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
9229 $as_echo "$ac_cv_search_getopt_long" >&6; }
9230 ac_res=$ac_cv_search_getopt_long
9231 if test "$ac_res" != no; then :
9232 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
9237 $as_echo_n "checking for library containing crypt... " >&6; }
9238 if ${ac_cv_search_crypt+:} false; then :
9239 $as_echo_n "(cached) " >&6
9241 ac_func_search_save_LIBS=$LIBS
9242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9243 /* end confdefs.h. */
9245 /* Override any GCC internal prototype to avoid an error.
9246 Use char because int might match the return type of a GCC
9247 builtin and then its argument prototype would still apply. */
9260 for ac_lib in '' crypt; do
9261 if test -z "$ac_lib"; then
9262 ac_res="none required"
9265 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9267 if ac_fn_c_try_link "$LINENO"; then :
9268 ac_cv_search_crypt=$ac_res
9270 rm -f core conftest.err conftest.$ac_objext \
9272 if ${ac_cv_search_crypt+:} false; then :
9276 if ${ac_cv_search_crypt+:} false; then :
9279 ac_cv_search_crypt=no
9282 LIBS=$ac_func_search_save_LIBS
9284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
9285 $as_echo "$ac_cv_search_crypt" >&6; }
9286 ac_res=$ac_cv_search_crypt
9287 if test "$ac_res" != no; then :
9288 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
9293 $as_echo_n "checking for library containing shm_open... " >&6; }
9294 if ${ac_cv_search_shm_open+:} false; then :
9295 $as_echo_n "(cached) " >&6
9297 ac_func_search_save_LIBS=$LIBS
9298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9299 /* end confdefs.h. */
9301 /* Override any GCC internal prototype to avoid an error.
9302 Use char because int might match the return type of a GCC
9303 builtin and then its argument prototype would still apply. */
9316 for ac_lib in '' rt; do
9317 if test -z "$ac_lib"; then
9318 ac_res="none required"
9321 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9323 if ac_fn_c_try_link "$LINENO"; then :
9324 ac_cv_search_shm_open=$ac_res
9326 rm -f core conftest.err conftest.$ac_objext \
9328 if ${ac_cv_search_shm_open+:} false; then :
9332 if ${ac_cv_search_shm_open+:} false; then :
9335 ac_cv_search_shm_open=no
9338 LIBS=$ac_func_search_save_LIBS
9340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
9341 $as_echo "$ac_cv_search_shm_open" >&6; }
9342 ac_res=$ac_cv_search_shm_open
9343 if test "$ac_res" != no; then :
9344 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
9349 $as_echo_n "checking for library containing shm_unlink... " >&6; }
9350 if ${ac_cv_search_shm_unlink+:} false; then :
9351 $as_echo_n "(cached) " >&6
9353 ac_func_search_save_LIBS=$LIBS
9354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9355 /* end confdefs.h. */
9357 /* Override any GCC internal prototype to avoid an error.
9358 Use char because int might match the return type of a GCC
9359 builtin and then its argument prototype would still apply. */
9367 return shm_unlink ();
9372 for ac_lib in '' rt; do
9373 if test -z "$ac_lib"; then
9374 ac_res="none required"
9377 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9379 if ac_fn_c_try_link "$LINENO"; then :
9380 ac_cv_search_shm_unlink=$ac_res
9382 rm -f core conftest.err conftest.$ac_objext \
9384 if ${ac_cv_search_shm_unlink+:} false; then :
9388 if ${ac_cv_search_shm_unlink+:} false; then :
9391 ac_cv_search_shm_unlink=no
9394 LIBS=$ac_func_search_save_LIBS
9396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
9397 $as_echo "$ac_cv_search_shm_unlink" >&6; }
9398 ac_res=$ac_cv_search_shm_unlink
9399 if test "$ac_res" != no; then :
9400 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
9405 $as_echo_n "checking for library containing clock_gettime... " >&6; }
9406 if ${ac_cv_search_clock_gettime+:} false; then :
9407 $as_echo_n "(cached) " >&6
9409 ac_func_search_save_LIBS=$LIBS
9410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9411 /* end confdefs.h. */
9413 /* Override any GCC internal prototype to avoid an error.
9414 Use char because int might match the return type of a GCC
9415 builtin and then its argument prototype would still apply. */
9419 char clock_gettime ();
9423 return clock_gettime ();
9428 for ac_lib in '' rt posix4; do
9429 if test -z "$ac_lib"; then
9430 ac_res="none required"
9433 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9435 if ac_fn_c_try_link "$LINENO"; then :
9436 ac_cv_search_clock_gettime=$ac_res
9438 rm -f core conftest.err conftest.$ac_objext \
9440 if ${ac_cv_search_clock_gettime+:} false; then :
9444 if ${ac_cv_search_clock_gettime+:} false; then :
9447 ac_cv_search_clock_gettime=no
9450 LIBS=$ac_func_search_save_LIBS
9452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
9453 $as_echo "$ac_cv_search_clock_gettime" >&6; }
9454 ac_res=$ac_cv_search_clock_gettime
9455 if test "$ac_res" != no; then :
9456 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
9462 $as_echo_n "checking for library containing fdatasync... " >&6; }
9463 if ${ac_cv_search_fdatasync+:} false; then :
9464 $as_echo_n "(cached) " >&6
9466 ac_func_search_save_LIBS=$LIBS
9467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9468 /* end confdefs.h. */
9470 /* Override any GCC internal prototype to avoid an error.
9471 Use char because int might match the return type of a GCC
9472 builtin and then its argument prototype would still apply. */
9480 return fdatasync ();
9485 for ac_lib in '' rt posix4; do
9486 if test -z "$ac_lib"; then
9487 ac_res="none required"
9490 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9492 if ac_fn_c_try_link "$LINENO"; then :
9493 ac_cv_search_fdatasync=$ac_res
9495 rm -f core conftest.err conftest.$ac_objext \
9497 if ${ac_cv_search_fdatasync+:} false; then :
9501 if ${ac_cv_search_fdatasync+:} false; then :
9504 ac_cv_search_fdatasync=no
9507 LIBS=$ac_func_search_save_LIBS
9509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
9510 $as_echo "$ac_cv_search_fdatasync" >&6; }
9511 ac_res=$ac_cv_search_fdatasync
9512 if test "$ac_res" != no; then :
9513 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9517 # Required for thread_test.c on Solaris
9518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
9519 $as_echo_n "checking for library containing sched_yield... " >&6; }
9520 if ${ac_cv_search_sched_yield+:} false; then :
9521 $as_echo_n "(cached) " >&6
9523 ac_func_search_save_LIBS=$LIBS
9524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9525 /* end confdefs.h. */
9527 /* Override any GCC internal prototype to avoid an error.
9528 Use char because int might match the return type of a GCC
9529 builtin and then its argument prototype would still apply. */
9533 char sched_yield ();
9537 return sched_yield ();
9542 for ac_lib in '' rt; do
9543 if test -z "$ac_lib"; then
9544 ac_res="none required"
9547 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9549 if ac_fn_c_try_link "$LINENO"; then :
9550 ac_cv_search_sched_yield=$ac_res
9552 rm -f core conftest.err conftest.$ac_objext \
9554 if ${ac_cv_search_sched_yield+:} false; then :
9558 if ${ac_cv_search_sched_yield+:} false; then :
9561 ac_cv_search_sched_yield=no
9564 LIBS=$ac_func_search_save_LIBS
9566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
9567 $as_echo "$ac_cv_search_sched_yield" >&6; }
9568 ac_res=$ac_cv_search_sched_yield
9569 if test "$ac_res" != no; then :
9570 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9574 # Required for thread_test.c on Solaris 2.5:
9575 # Other ports use it too (HP-UX) so test unconditionally
9576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
9577 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
9578 if ${ac_cv_search_gethostbyname_r+:} false; then :
9579 $as_echo_n "(cached) " >&6
9581 ac_func_search_save_LIBS=$LIBS
9582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9583 /* end confdefs.h. */
9585 /* Override any GCC internal prototype to avoid an error.
9586 Use char because int might match the return type of a GCC
9587 builtin and then its argument prototype would still apply. */
9591 char gethostbyname_r ();
9595 return gethostbyname_r ();
9600 for ac_lib in '' nsl; do
9601 if test -z "$ac_lib"; then
9602 ac_res="none required"
9605 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9607 if ac_fn_c_try_link "$LINENO"; then :
9608 ac_cv_search_gethostbyname_r=$ac_res
9610 rm -f core conftest.err conftest.$ac_objext \
9612 if ${ac_cv_search_gethostbyname_r+:} false; then :
9616 if ${ac_cv_search_gethostbyname_r+:} false; then :
9619 ac_cv_search_gethostbyname_r=no
9622 LIBS=$ac_func_search_save_LIBS
9624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
9625 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
9626 ac_res=$ac_cv_search_gethostbyname_r
9627 if test "$ac_res" != no; then :
9628 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
9634 $as_echo_n "checking for library containing shmget... " >&6; }
9635 if ${ac_cv_search_shmget+:} false; then :
9636 $as_echo_n "(cached) " >&6
9638 ac_func_search_save_LIBS=$LIBS
9639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9640 /* end confdefs.h. */
9642 /* Override any GCC internal prototype to avoid an error.
9643 Use char because int might match the return type of a GCC
9644 builtin and then its argument prototype would still apply. */
9657 for ac_lib in '' cygipc; do
9658 if test -z "$ac_lib"; then
9659 ac_res="none required"
9662 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9664 if ac_fn_c_try_link "$LINENO"; then :
9665 ac_cv_search_shmget=$ac_res
9667 rm -f core conftest.err conftest.$ac_objext \
9669 if ${ac_cv_search_shmget+:} false; then :
9673 if ${ac_cv_search_shmget+:} false; then :
9676 ac_cv_search_shmget=no
9679 LIBS=$ac_func_search_save_LIBS
9681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
9682 $as_echo "$ac_cv_search_shmget" >&6; }
9683 ac_res=$ac_cv_search_shmget
9684 if test "$ac_res" != no; then :
9685 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9690 if test "$with_readline" = yes; then
9693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
9694 $as_echo_n "checking for library containing readline... " >&6; }
9695 if ${pgac_cv_check_readline+:} false; then :
9696 $as_echo_n "(cached) " >&6
9698 pgac_cv_check_readline=no
9699 pgac_save_LIBS=$LIBS
9700 if test x"$with_libedit_preferred" != x"yes"
9701 then READLINE_ORDER="-lreadline -ledit"
9702 else READLINE_ORDER="-ledit -lreadline"
9704 for pgac_rllib in $READLINE_ORDER ; do
9705 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
9706 LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
9707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9708 /* end confdefs.h. */
9710 /* Override any GCC internal prototype to avoid an error.
9711 Use char because int might match the return type of a GCC
9712 builtin and then its argument prototype would still apply. */
9725 if ac_fn_c_try_link "$LINENO"; then :
9727 # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
9728 # recognize dependent libraries; assume curses is needed if we didn't
9729 # find any dependency.
9731 netbsd* | openbsd* | irix*)
9732 if test x"$pgac_lib" = x"" ; then
9733 pgac_lib=" -lcurses"
9737 pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
9741 rm -f core conftest.err conftest.$ac_objext \
9742 conftest$ac_exeext conftest.$ac_ext
9744 if test "$pgac_cv_check_readline" != no ; then
9748 LIBS=$pgac_save_LIBS
9751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
9752 $as_echo "$pgac_cv_check_readline" >&6; }
9753 if test "$pgac_cv_check_readline" != no ; then
9754 LIBS="$pgac_cv_check_readline $LIBS"
9756 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
9761 if test x"$pgac_cv_check_readline" = x"no"; then
9762 as_fn_error $? "readline library not found
9763 If you have readline already installed, see config.log for details on the
9764 failure. It is possible the compiler isn't looking in the proper directory.
9765 Use --without-readline to disable readline support." "$LINENO" 5
9769 if test "$with_zlib" = yes; then
9770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
9771 $as_echo_n "checking for inflate in -lz... " >&6; }
9772 if ${ac_cv_lib_z_inflate+:} false; then :
9773 $as_echo_n "(cached) " >&6
9775 ac_check_lib_save_LIBS=$LIBS
9777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9778 /* end confdefs.h. */
9780 /* Override any GCC internal prototype to avoid an error.
9781 Use char because int might match the return type of a GCC
9782 builtin and then its argument prototype would still apply. */
9795 if ac_fn_c_try_link "$LINENO"; then :
9796 ac_cv_lib_z_inflate=yes
9798 ac_cv_lib_z_inflate=no
9800 rm -f core conftest.err conftest.$ac_objext \
9801 conftest$ac_exeext conftest.$ac_ext
9802 LIBS=$ac_check_lib_save_LIBS
9804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
9805 $as_echo "$ac_cv_lib_z_inflate" >&6; }
9806 if test "x$ac_cv_lib_z_inflate" = xyes; then :
9807 cat >>confdefs.h <<_ACEOF
9814 as_fn_error $? "zlib library not found
9815 If you have zlib already installed, see config.log for details on the
9816 failure. It is possible the compiler isn't looking in the proper directory.
9817 Use --without-zlib to disable zlib support." "$LINENO" 5
9822 if test "$enable_spinlocks" = yes; then
9824 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
9827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9828 *** Not using spinlocks will cause poor performance." >&5
9829 $as_echo "$as_me: WARNING:
9830 *** Not using spinlocks will cause poor performance." >&2;}
9833 if test "$enable_atomics" = yes; then
9835 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
9838 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9839 *** Not using atomic operations will cause poor performance." >&5
9840 $as_echo "$as_me: WARNING:
9841 *** Not using atomic operations will cause poor performance." >&2;}
9844 if test "$with_gssapi" = yes ; then
9845 if test "$PORTNAME" != "win32"; then
9846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
9847 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
9848 if ${ac_cv_search_gss_init_sec_context+:} false; then :
9849 $as_echo_n "(cached) " >&6
9851 ac_func_search_save_LIBS=$LIBS
9852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9853 /* end confdefs.h. */
9855 /* Override any GCC internal prototype to avoid an error.
9856 Use char because int might match the return type of a GCC
9857 builtin and then its argument prototype would still apply. */
9861 char gss_init_sec_context ();
9865 return gss_init_sec_context ();
9870 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
9871 if test -z "$ac_lib"; then
9872 ac_res="none required"
9875 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9877 if ac_fn_c_try_link "$LINENO"; then :
9878 ac_cv_search_gss_init_sec_context=$ac_res
9880 rm -f core conftest.err conftest.$ac_objext \
9882 if ${ac_cv_search_gss_init_sec_context+:} false; then :
9886 if ${ac_cv_search_gss_init_sec_context+:} false; then :
9889 ac_cv_search_gss_init_sec_context=no
9892 LIBS=$ac_func_search_save_LIBS
9894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
9895 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
9896 ac_res=$ac_cv_search_gss_init_sec_context
9897 if test "$ac_res" != no; then :
9898 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9901 as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
9905 LIBS="$LIBS -lgssapi32"
9909 if test "$with_openssl" = yes ; then
9910 if test "$PORTNAME" != "win32"; then
9911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
9912 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
9913 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
9914 $as_echo_n "(cached) " >&6
9916 ac_check_lib_save_LIBS=$LIBS
9917 LIBS="-lcrypto $LIBS"
9918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9919 /* end confdefs.h. */
9921 /* Override any GCC internal prototype to avoid an error.
9922 Use char because int might match the return type of a GCC
9923 builtin and then its argument prototype would still apply. */
9927 char CRYPTO_new_ex_data ();
9931 return CRYPTO_new_ex_data ();
9936 if ac_fn_c_try_link "$LINENO"; then :
9937 ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
9939 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
9941 rm -f core conftest.err conftest.$ac_objext \
9942 conftest$ac_exeext conftest.$ac_ext
9943 LIBS=$ac_check_lib_save_LIBS
9945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
9946 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
9947 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
9948 cat >>confdefs.h <<_ACEOF
9949 #define HAVE_LIBCRYPTO 1
9952 LIBS="-lcrypto $LIBS"
9955 as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
9958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
9959 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
9960 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
9961 $as_echo_n "(cached) " >&6
9963 ac_check_lib_save_LIBS=$LIBS
9965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9966 /* end confdefs.h. */
9968 /* Override any GCC internal prototype to avoid an error.
9969 Use char because int might match the return type of a GCC
9970 builtin and then its argument prototype would still apply. */
9983 if ac_fn_c_try_link "$LINENO"; then :
9984 ac_cv_lib_ssl_SSL_new=yes
9986 ac_cv_lib_ssl_SSL_new=no
9988 rm -f core conftest.err conftest.$ac_objext \
9989 conftest$ac_exeext conftest.$ac_ext
9990 LIBS=$ac_check_lib_save_LIBS
9992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
9993 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
9994 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
9995 cat >>confdefs.h <<_ACEOF
9996 #define HAVE_LIBSSL 1
10002 as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
10006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
10007 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
10008 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
10009 $as_echo_n "(cached) " >&6
10011 ac_func_search_save_LIBS=$LIBS
10012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10013 /* end confdefs.h. */
10015 /* Override any GCC internal prototype to avoid an error.
10016 Use char because int might match the return type of a GCC
10017 builtin and then its argument prototype would still apply. */
10021 char CRYPTO_new_ex_data ();
10025 return CRYPTO_new_ex_data ();
10030 for ac_lib in '' eay32 crypto; do
10031 if test -z "$ac_lib"; then
10032 ac_res="none required"
10035 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10037 if ac_fn_c_try_link "$LINENO"; then :
10038 ac_cv_search_CRYPTO_new_ex_data=$ac_res
10040 rm -f core conftest.err conftest.$ac_objext \
10042 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
10046 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
10049 ac_cv_search_CRYPTO_new_ex_data=no
10051 rm conftest.$ac_ext
10052 LIBS=$ac_func_search_save_LIBS
10054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
10055 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
10056 ac_res=$ac_cv_search_CRYPTO_new_ex_data
10057 if test "$ac_res" != no; then :
10058 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10061 as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
10064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
10065 $as_echo_n "checking for library containing SSL_new... " >&6; }
10066 if ${ac_cv_search_SSL_new+:} false; then :
10067 $as_echo_n "(cached) " >&6
10069 ac_func_search_save_LIBS=$LIBS
10070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10071 /* end confdefs.h. */
10073 /* Override any GCC internal prototype to avoid an error.
10074 Use char because int might match the return type of a GCC
10075 builtin and then its argument prototype would still apply. */
10088 for ac_lib in '' ssleay32 ssl; do
10089 if test -z "$ac_lib"; then
10090 ac_res="none required"
10093 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10095 if ac_fn_c_try_link "$LINENO"; then :
10096 ac_cv_search_SSL_new=$ac_res
10098 rm -f core conftest.err conftest.$ac_objext \
10100 if ${ac_cv_search_SSL_new+:} false; then :
10104 if ${ac_cv_search_SSL_new+:} false; then :
10107 ac_cv_search_SSL_new=no
10109 rm conftest.$ac_ext
10110 LIBS=$ac_func_search_save_LIBS
10112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
10113 $as_echo "$ac_cv_search_SSL_new" >&6; }
10114 ac_res=$ac_cv_search_SSL_new
10115 if test "$ac_res" != no; then :
10116 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10119 as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
10123 for ac_func in SSL_get_current_compression
10125 ac_fn_c_check_func "$LINENO" "SSL_get_current_compression" "ac_cv_func_SSL_get_current_compression"
10126 if test "x$ac_cv_func_SSL_get_current_compression" = xyes; then :
10127 cat >>confdefs.h <<_ACEOF
10128 #define HAVE_SSL_GET_CURRENT_COMPRESSION 1
10134 # Functions introduced in OpenSSL 1.1.0. We used to check for
10135 # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
10136 # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
10137 # doesn't have these OpenSSL 1.1.0 functions. So check for individual
10139 for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL
10141 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10142 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10143 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10144 cat >>confdefs.h <<_ACEOF
10145 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10151 # OpenSSL versions before 1.1.0 required setting callback functions, for
10152 # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
10153 # function was removed.
10154 for ac_func in CRYPTO_lock
10156 ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
10157 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
10158 cat >>confdefs.h <<_ACEOF
10159 #define HAVE_CRYPTO_LOCK 1
10167 if test "$with_pam" = yes ; then
10168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
10169 $as_echo_n "checking for pam_start in -lpam... " >&6; }
10170 if ${ac_cv_lib_pam_pam_start+:} false; then :
10171 $as_echo_n "(cached) " >&6
10173 ac_check_lib_save_LIBS=$LIBS
10175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10176 /* end confdefs.h. */
10178 /* Override any GCC internal prototype to avoid an error.
10179 Use char because int might match the return type of a GCC
10180 builtin and then its argument prototype would still apply. */
10188 return pam_start ();
10193 if ac_fn_c_try_link "$LINENO"; then :
10194 ac_cv_lib_pam_pam_start=yes
10196 ac_cv_lib_pam_pam_start=no
10198 rm -f core conftest.err conftest.$ac_objext \
10199 conftest$ac_exeext conftest.$ac_ext
10200 LIBS=$ac_check_lib_save_LIBS
10202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
10203 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
10204 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
10205 cat >>confdefs.h <<_ACEOF
10206 #define HAVE_LIBPAM 1
10212 as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
10217 if test "$with_libxml" = yes ; then
10218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
10219 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
10220 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
10221 $as_echo_n "(cached) " >&6
10223 ac_check_lib_save_LIBS=$LIBS
10224 LIBS="-lxml2 $LIBS"
10225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10226 /* end confdefs.h. */
10228 /* Override any GCC internal prototype to avoid an error.
10229 Use char because int might match the return type of a GCC
10230 builtin and then its argument prototype would still apply. */
10234 char xmlSaveToBuffer ();
10238 return xmlSaveToBuffer ();
10243 if ac_fn_c_try_link "$LINENO"; then :
10244 ac_cv_lib_xml2_xmlSaveToBuffer=yes
10246 ac_cv_lib_xml2_xmlSaveToBuffer=no
10248 rm -f core conftest.err conftest.$ac_objext \
10249 conftest$ac_exeext conftest.$ac_ext
10250 LIBS=$ac_check_lib_save_LIBS
10252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
10253 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
10254 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
10255 cat >>confdefs.h <<_ACEOF
10256 #define HAVE_LIBXML2 1
10259 LIBS="-lxml2 $LIBS"
10262 as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
10267 if test "$with_libxslt" = yes ; then
10268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
10269 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
10270 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
10271 $as_echo_n "(cached) " >&6
10273 ac_check_lib_save_LIBS=$LIBS
10274 LIBS="-lxslt $LIBS"
10275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10276 /* end confdefs.h. */
10278 /* Override any GCC internal prototype to avoid an error.
10279 Use char because int might match the return type of a GCC
10280 builtin and then its argument prototype would still apply. */
10284 char xsltCleanupGlobals ();
10288 return xsltCleanupGlobals ();
10293 if ac_fn_c_try_link "$LINENO"; then :
10294 ac_cv_lib_xslt_xsltCleanupGlobals=yes
10296 ac_cv_lib_xslt_xsltCleanupGlobals=no
10298 rm -f core conftest.err conftest.$ac_objext \
10299 conftest$ac_exeext conftest.$ac_ext
10300 LIBS=$ac_check_lib_save_LIBS
10302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
10303 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
10304 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
10305 cat >>confdefs.h <<_ACEOF
10306 #define HAVE_LIBXSLT 1
10309 LIBS="-lxslt $LIBS"
10312 as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
10317 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
10318 if test "$with_ldap" = yes ; then
10320 if test "$PORTNAME" != "win32"; then
10321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
10322 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
10323 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
10324 $as_echo_n "(cached) " >&6
10326 ac_check_lib_save_LIBS=$LIBS
10327 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
10328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10329 /* end confdefs.h. */
10331 /* Override any GCC internal prototype to avoid an error.
10332 Use char because int might match the return type of a GCC
10333 builtin and then its argument prototype would still apply. */
10341 return ldap_bind ();
10346 if ac_fn_c_try_link "$LINENO"; then :
10347 ac_cv_lib_ldap_ldap_bind=yes
10349 ac_cv_lib_ldap_ldap_bind=no
10351 rm -f core conftest.err conftest.$ac_objext \
10352 conftest$ac_exeext conftest.$ac_ext
10353 LIBS=$ac_check_lib_save_LIBS
10355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
10356 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
10357 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
10358 cat >>confdefs.h <<_ACEOF
10359 #define HAVE_LIBLDAP 1
10362 LIBS="-lldap $LIBS"
10365 as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
10368 LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
10369 if test "$enable_thread_safety" = yes; then
10370 # on some platforms ldap_r fails to link without PTHREAD_LIBS
10371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
10372 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
10373 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
10374 $as_echo_n "(cached) " >&6
10376 ac_check_lib_save_LIBS=$LIBS
10377 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
10378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10379 /* end confdefs.h. */
10381 /* Override any GCC internal prototype to avoid an error.
10382 Use char because int might match the return type of a GCC
10383 builtin and then its argument prototype would still apply. */
10387 char ldap_simple_bind ();
10391 return ldap_simple_bind ();
10396 if ac_fn_c_try_link "$LINENO"; then :
10397 ac_cv_lib_ldap_r_ldap_simple_bind=yes
10399 ac_cv_lib_ldap_r_ldap_simple_bind=no
10401 rm -f core conftest.err conftest.$ac_objext \
10402 conftest$ac_exeext conftest.$ac_ext
10403 LIBS=$ac_check_lib_save_LIBS
10405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
10406 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
10407 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
10408 cat >>confdefs.h <<_ACEOF
10409 #define HAVE_LIBLDAP_R 1
10412 LIBS="-lldap_r $LIBS"
10415 as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
10418 LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
10420 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
10423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
10424 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
10425 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
10426 $as_echo_n "(cached) " >&6
10428 ac_check_lib_save_LIBS=$LIBS
10429 LIBS="-lwldap32 $LIBS"
10430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10431 /* end confdefs.h. */
10433 /* Override any GCC internal prototype to avoid an error.
10434 Use char because int might match the return type of a GCC
10435 builtin and then its argument prototype would still apply. */
10443 return ldap_bind ();
10448 if ac_fn_c_try_link "$LINENO"; then :
10449 ac_cv_lib_wldap32_ldap_bind=yes
10451 ac_cv_lib_wldap32_ldap_bind=no
10453 rm -f core conftest.err conftest.$ac_objext \
10454 conftest$ac_exeext conftest.$ac_ext
10455 LIBS=$ac_check_lib_save_LIBS
10457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
10458 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
10459 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
10460 cat >>confdefs.h <<_ACEOF
10461 #define HAVE_LIBWLDAP32 1
10464 LIBS="-lwldap32 $LIBS"
10467 as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
10470 LDAP_LIBS_FE="-lwldap32"
10471 LDAP_LIBS_BE="-lwldap32"
10478 # for contrib/sepgsql
10479 if test "$with_selinux" = yes; then
10480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
10481 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
10482 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
10483 $as_echo_n "(cached) " >&6
10485 ac_check_lib_save_LIBS=$LIBS
10486 LIBS="-lselinux $LIBS"
10487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10488 /* end confdefs.h. */
10490 /* Override any GCC internal prototype to avoid an error.
10491 Use char because int might match the return type of a GCC
10492 builtin and then its argument prototype would still apply. */
10496 char security_compute_create_name ();
10500 return security_compute_create_name ();
10505 if ac_fn_c_try_link "$LINENO"; then :
10506 ac_cv_lib_selinux_security_compute_create_name=yes
10508 ac_cv_lib_selinux_security_compute_create_name=no
10510 rm -f core conftest.err conftest.$ac_objext \
10511 conftest$ac_exeext conftest.$ac_ext
10512 LIBS=$ac_check_lib_save_LIBS
10514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
10515 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
10516 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
10517 cat >>confdefs.h <<_ACEOF
10518 #define HAVE_LIBSELINUX 1
10521 LIBS="-lselinux $LIBS"
10524 as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
10529 # for contrib/uuid-ossp
10530 if test "$with_uuid" = bsd ; then
10531 # On BSD, the UUID functions are in libc
10532 ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
10533 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
10536 as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
10539 elif test "$with_uuid" = e2fs ; then
10540 # On macOS, the UUID functions are in libc
10541 ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
10542 if test "x$ac_cv_func_uuid_generate" = xyes; then :
10545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
10546 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
10547 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
10548 $as_echo_n "(cached) " >&6
10550 ac_check_lib_save_LIBS=$LIBS
10551 LIBS="-luuid $LIBS"
10552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10553 /* end confdefs.h. */
10555 /* Override any GCC internal prototype to avoid an error.
10556 Use char because int might match the return type of a GCC
10557 builtin and then its argument prototype would still apply. */
10561 char uuid_generate ();
10565 return uuid_generate ();
10570 if ac_fn_c_try_link "$LINENO"; then :
10571 ac_cv_lib_uuid_uuid_generate=yes
10573 ac_cv_lib_uuid_uuid_generate=no
10575 rm -f core conftest.err conftest.$ac_objext \
10576 conftest$ac_exeext conftest.$ac_ext
10577 LIBS=$ac_check_lib_save_LIBS
10579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
10580 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
10581 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
10584 as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
10589 elif test "$with_uuid" = ossp ; then
10590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
10591 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
10592 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
10593 $as_echo_n "(cached) " >&6
10595 ac_check_lib_save_LIBS=$LIBS
10596 LIBS="-lossp-uuid $LIBS"
10597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10598 /* end confdefs.h. */
10600 /* Override any GCC internal prototype to avoid an error.
10601 Use char because int might match the return type of a GCC
10602 builtin and then its argument prototype would still apply. */
10606 char uuid_export ();
10610 return uuid_export ();
10615 if ac_fn_c_try_link "$LINENO"; then :
10616 ac_cv_lib_ossp_uuid_uuid_export=yes
10618 ac_cv_lib_ossp_uuid_uuid_export=no
10620 rm -f core conftest.err conftest.$ac_objext \
10621 conftest$ac_exeext conftest.$ac_ext
10622 LIBS=$ac_check_lib_save_LIBS
10624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
10625 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
10626 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
10627 UUID_LIBS="-lossp-uuid"
10629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
10630 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
10631 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
10632 $as_echo_n "(cached) " >&6
10634 ac_check_lib_save_LIBS=$LIBS
10635 LIBS="-luuid $LIBS"
10636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10637 /* end confdefs.h. */
10639 /* Override any GCC internal prototype to avoid an error.
10640 Use char because int might match the return type of a GCC
10641 builtin and then its argument prototype would still apply. */
10645 char uuid_export ();
10649 return uuid_export ();
10654 if ac_fn_c_try_link "$LINENO"; then :
10655 ac_cv_lib_uuid_uuid_export=yes
10657 ac_cv_lib_uuid_uuid_export=no
10659 rm -f core conftest.err conftest.$ac_objext \
10660 conftest$ac_exeext conftest.$ac_ext
10661 LIBS=$ac_check_lib_save_LIBS
10663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
10664 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
10665 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
10668 as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
10681 for ac_header in atomic.h crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/ipc.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
10683 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10684 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10685 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10686 cat >>confdefs.h <<_ACEOF
10687 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10695 # On BSD, test for net/if.h will fail unless sys/socket.h
10696 # is included first.
10697 for ac_header in net/if.h
10699 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
10700 #include <sys/socket.h>
10703 if test "x$ac_cv_header_net_if_h" = xyes; then :
10704 cat >>confdefs.h <<_ACEOF
10705 #define HAVE_NET_IF_H 1
10713 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
10714 # is included first.
10715 for ac_header in sys/ucred.h
10717 ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
10718 #include <sys/param.h>
10721 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
10722 cat >>confdefs.h <<_ACEOF
10723 #define HAVE_SYS_UCRED_H 1
10731 # At least on IRIX, test for netinet/tcp.h will fail unless
10732 # netinet/in.h is included first.
10733 for ac_header in netinet/tcp.h
10735 ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
10736 #include <netinet/in.h>
10739 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
10740 cat >>confdefs.h <<_ACEOF
10741 #define HAVE_NETINET_TCP_H 1
10749 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
10750 for ac_header in readline/readline.h
10752 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
10753 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
10754 cat >>confdefs.h <<_ACEOF
10755 #define HAVE_READLINE_READLINE_H 1
10759 for ac_header in readline.h
10761 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
10762 if test "x$ac_cv_header_readline_h" = xyes; then :
10763 cat >>confdefs.h <<_ACEOF
10764 #define HAVE_READLINE_H 1
10768 as_fn_error $? "readline header not found
10769 If you have readline already installed, see config.log for details on the
10770 failure. It is possible the compiler isn't looking in the proper directory.
10771 Use --without-readline to disable readline support." "$LINENO" 5
10780 for ac_header in readline/history.h
10782 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
10783 if test "x$ac_cv_header_readline_history_h" = xyes; then :
10784 cat >>confdefs.h <<_ACEOF
10785 #define HAVE_READLINE_HISTORY_H 1
10789 for ac_header in history.h
10791 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
10792 if test "x$ac_cv_header_history_h" = xyes; then :
10793 cat >>confdefs.h <<_ACEOF
10794 #define HAVE_HISTORY_H 1
10798 as_fn_error $? "history header not found
10799 If you have readline already installed, see config.log for details on the
10800 failure. It is possible the compiler isn't looking in the proper directory.
10801 Use --without-readline to disable readline support." "$LINENO" 5
10812 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
10813 # Some installations of libedit usurp /usr/include/readline/, which seems
10814 # bad practice, since in combined installations readline will have its headers
10815 # there. We might have to resort to AC_EGREP checks to make sure we found
10816 # the proper header...
10817 for ac_header in editline/readline.h
10819 ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
10820 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
10821 cat >>confdefs.h <<_ACEOF
10822 #define HAVE_EDITLINE_READLINE_H 1
10826 for ac_header in readline.h
10828 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
10829 if test "x$ac_cv_header_readline_h" = xyes; then :
10830 cat >>confdefs.h <<_ACEOF
10831 #define HAVE_READLINE_H 1
10835 for ac_header in readline/readline.h
10837 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
10838 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
10839 cat >>confdefs.h <<_ACEOF
10840 #define HAVE_READLINE_READLINE_H 1
10844 as_fn_error $? "readline header not found
10845 If you have libedit already installed, see config.log for details on the
10846 failure. It is possible the compiler isn't looking in the proper directory.
10847 Use --without-readline to disable libedit support." "$LINENO" 5
10860 # Note: in a libedit installation, history.h is sometimes a dummy, and may
10861 # not be there at all. Hence, don't complain if not found. We must check
10862 # though, since in yet other versions it is an independent header.
10863 for ac_header in editline/history.h
10865 ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
10866 if test "x$ac_cv_header_editline_history_h" = xyes; then :
10867 cat >>confdefs.h <<_ACEOF
10868 #define HAVE_EDITLINE_HISTORY_H 1
10872 for ac_header in history.h
10874 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
10875 if test "x$ac_cv_header_history_h" = xyes; then :
10876 cat >>confdefs.h <<_ACEOF
10877 #define HAVE_HISTORY_H 1
10881 for ac_header in readline/history.h
10883 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
10884 if test "x$ac_cv_header_readline_history_h" = xyes; then :
10885 cat >>confdefs.h <<_ACEOF
10886 #define HAVE_READLINE_HISTORY_H 1
10903 if test "$with_zlib" = yes; then
10904 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
10905 if test "x$ac_cv_header_zlib_h" = xyes; then :
10908 as_fn_error $? "zlib header not found
10909 If you have zlib already installed, see config.log for details on the
10910 failure. It is possible the compiler isn't looking in the proper directory.
10911 Use --without-zlib to disable zlib support." "$LINENO" 5
10917 if test "$with_gssapi" = yes ; then
10918 for ac_header in gssapi/gssapi.h
10920 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
10921 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
10922 cat >>confdefs.h <<_ACEOF
10923 #define HAVE_GSSAPI_GSSAPI_H 1
10927 for ac_header in gssapi.h
10929 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
10930 if test "x$ac_cv_header_gssapi_h" = xyes; then :
10931 cat >>confdefs.h <<_ACEOF
10932 #define HAVE_GSSAPI_H 1
10936 as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
10947 if test "$with_openssl" = yes ; then
10948 ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
10949 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
10952 as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
10956 ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
10957 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
10960 as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
10966 if test "$with_pam" = yes ; then
10967 for ac_header in security/pam_appl.h
10969 ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
10970 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
10971 cat >>confdefs.h <<_ACEOF
10972 #define HAVE_SECURITY_PAM_APPL_H 1
10976 for ac_header in pam/pam_appl.h
10978 ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
10979 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
10980 cat >>confdefs.h <<_ACEOF
10981 #define HAVE_PAM_PAM_APPL_H 1
10985 as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
10996 if test "$with_bsd_auth" = yes ; then
10997 ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
10998 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
11001 as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
11007 if test "$with_systemd" = yes ; then
11008 ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
11009 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
11012 as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
11018 if test "$with_libxml" = yes ; then
11019 ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
11020 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
11023 as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
11029 if test "$with_libxslt" = yes ; then
11030 ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
11031 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
11034 as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
11040 if test "$with_ldap" = yes ; then
11041 if test "$PORTNAME" != "win32"; then
11042 for ac_header in ldap.h
11044 ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
11045 if test "x$ac_cv_header_ldap_h" = xyes; then :
11046 cat >>confdefs.h <<_ACEOF
11047 #define HAVE_LDAP_H 1
11051 as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
11056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
11057 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
11058 if ${pgac_cv_ldap_safe+:} false; then :
11059 $as_echo_n "(cached) " >&6
11061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11062 /* end confdefs.h. */
11064 #if !defined(LDAP_VENDOR_VERSION) || \
11065 (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
11066 LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
11077 if ac_fn_c_try_compile "$LINENO"; then :
11078 pgac_cv_ldap_safe=yes
11080 pgac_cv_ldap_safe=no
11082 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
11085 $as_echo "$pgac_cv_ldap_safe" >&6; }
11087 if test "$pgac_cv_ldap_safe" != yes; then
11088 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11089 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
11090 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
11091 *** also uses LDAP will crash on exit." >&5
11092 $as_echo "$as_me: WARNING:
11093 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
11094 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
11095 *** also uses LDAP will crash on exit." >&2;}
11098 for ac_header in winldap.h
11100 ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
11101 #include <windows.h>
11104 if test "x$ac_cv_header_winldap_h" = xyes; then :
11105 cat >>confdefs.h <<_ACEOF
11106 #define HAVE_WINLDAP_H 1
11110 as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
11118 if test "$with_bonjour" = yes ; then
11119 ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
11120 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
11123 as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
11129 # for contrib/uuid-ossp
11130 if test "$with_uuid" = bsd ; then
11131 for ac_header in uuid.h
11133 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
11134 if test "x$ac_cv_header_uuid_h" = xyes; then :
11135 cat >>confdefs.h <<_ACEOF
11136 #define HAVE_UUID_H 1
11138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11139 /* end confdefs.h. */
11143 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11144 $EGREP "uuid_to_string" >/dev/null 2>&1; then :
11147 as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
11152 as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
11157 elif test "$with_uuid" = e2fs ; then
11158 for ac_header in uuid/uuid.h
11160 ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
11161 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
11162 cat >>confdefs.h <<_ACEOF
11163 #define HAVE_UUID_UUID_H 1
11165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11166 /* end confdefs.h. */
11167 #include <uuid/uuid.h>
11170 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11171 $EGREP "uuid_generate" >/dev/null 2>&1; then :
11174 as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
11179 for ac_header in uuid.h
11181 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
11182 if test "x$ac_cv_header_uuid_h" = xyes; then :
11183 cat >>confdefs.h <<_ACEOF
11184 #define HAVE_UUID_H 1
11186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11187 /* end confdefs.h. */
11191 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11192 $EGREP "uuid_generate" >/dev/null 2>&1; then :
11195 as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
11200 as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
11209 elif test "$with_uuid" = ossp ; then
11210 for ac_header in ossp/uuid.h
11212 ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
11213 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
11214 cat >>confdefs.h <<_ACEOF
11215 #define HAVE_OSSP_UUID_H 1
11217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11218 /* end confdefs.h. */
11219 #include <ossp/uuid.h>
11222 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11223 $EGREP "uuid_export" >/dev/null 2>&1; then :
11226 as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
11231 for ac_header in uuid.h
11233 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
11234 if test "x$ac_cv_header_uuid_h" = xyes; then :
11235 cat >>confdefs.h <<_ACEOF
11236 #define HAVE_UUID_H 1
11238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11239 /* end confdefs.h. */
11243 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11244 $EGREP "uuid_export" >/dev/null 2>&1; then :
11247 as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
11252 as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
11263 if test "$PORTNAME" = "win32" ; then
11264 for ac_header in crtdefs.h
11266 ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
11267 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
11268 cat >>confdefs.h <<_ACEOF
11269 #define HAVE_CRTDEFS_H 1
11279 ## Types, structures, compiler characteristics
11282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11283 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11284 if ${ac_cv_c_bigendian+:} false; then :
11285 $as_echo_n "(cached) " >&6
11287 ac_cv_c_bigendian=unknown
11288 # See if we're dealing with a universal compiler.
11289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11290 /* end confdefs.h. */
11291 #ifndef __APPLE_CC__
11292 not a universal capable compiler
11297 if ac_fn_c_try_compile "$LINENO"; then :
11299 # Check for potential -arch flags. It is not universal unless
11300 # there are at least two -arch flags with different values.
11303 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11304 if test -n "$ac_prev"; then
11306 i?86 | x86_64 | ppc | ppc64)
11307 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11310 ac_cv_c_bigendian=universal
11316 elif test "x$ac_word" = "x-arch"; then
11321 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11322 if test $ac_cv_c_bigendian = unknown; then
11323 # See if sys/param.h defines the BYTE_ORDER macro.
11324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11325 /* end confdefs.h. */
11326 #include <sys/types.h>
11327 #include <sys/param.h>
11332 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11333 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11335 bogus endian macros
11342 if ac_fn_c_try_compile "$LINENO"; then :
11343 # It does; now see whether it defined to BIG_ENDIAN or not.
11344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11345 /* end confdefs.h. */
11346 #include <sys/types.h>
11347 #include <sys/param.h>
11352 #if BYTE_ORDER != BIG_ENDIAN
11360 if ac_fn_c_try_compile "$LINENO"; then :
11361 ac_cv_c_bigendian=yes
11363 ac_cv_c_bigendian=no
11365 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11367 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11369 if test $ac_cv_c_bigendian = unknown; then
11370 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11372 /* end confdefs.h. */
11373 #include <limits.h>
11378 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11379 bogus endian macros
11386 if ac_fn_c_try_compile "$LINENO"; then :
11387 # It does; now see whether it defined to _BIG_ENDIAN or not.
11388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11389 /* end confdefs.h. */
11390 #include <limits.h>
11395 #ifndef _BIG_ENDIAN
11403 if ac_fn_c_try_compile "$LINENO"; then :
11404 ac_cv_c_bigendian=yes
11406 ac_cv_c_bigendian=no
11408 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11410 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11412 if test $ac_cv_c_bigendian = unknown; then
11413 # Compile a test program.
11414 if test "$cross_compiling" = yes; then :
11415 # Try to guess by grepping values from an object file.
11416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11417 /* end confdefs.h. */
11418 short int ascii_mm[] =
11419 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11420 short int ascii_ii[] =
11421 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11422 int use_ascii (int i) {
11423 return ascii_mm[i] + ascii_ii[i];
11425 short int ebcdic_ii[] =
11426 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11427 short int ebcdic_mm[] =
11428 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11429 int use_ebcdic (int i) {
11430 return ebcdic_mm[i] + ebcdic_ii[i];
11437 return use_ascii (foo) == use_ebcdic (foo);
11442 if ac_fn_c_try_compile "$LINENO"; then :
11443 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11444 ac_cv_c_bigendian=yes
11446 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11447 if test "$ac_cv_c_bigendian" = unknown; then
11448 ac_cv_c_bigendian=no
11450 # finding both strings is unlikely to happen, but who knows?
11451 ac_cv_c_bigendian=unknown
11455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11458 /* end confdefs.h. */
11459 $ac_includes_default
11464 /* Are we little or big endian? From Harbison&Steele. */
11468 char c[sizeof (long int)];
11471 return u.c[sizeof (long int) - 1] == 1;
11477 if ac_fn_c_try_run "$LINENO"; then :
11478 ac_cv_c_bigendian=no
11480 ac_cv_c_bigendian=yes
11482 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11483 conftest.$ac_objext conftest.beam conftest.$ac_ext
11488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11489 $as_echo "$ac_cv_c_bigendian" >&6; }
11490 case $ac_cv_c_bigendian in #(
11492 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11498 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11502 as_fn_error $? "unknown endianness
11503 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11507 $as_echo_n "checking for inline... " >&6; }
11508 if ${ac_cv_c_inline+:} false; then :
11509 $as_echo_n "(cached) " >&6
11512 for ac_kw in inline __inline__ __inline; do
11513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11514 /* end confdefs.h. */
11515 #ifndef __cplusplus
11517 static $ac_kw foo_t static_foo () {return 0; }
11518 $ac_kw foo_t foo () {return 0; }
11522 if ac_fn_c_try_compile "$LINENO"; then :
11523 ac_cv_c_inline=$ac_kw
11525 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11526 test "$ac_cv_c_inline" != no && break
11530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11531 $as_echo "$ac_cv_c_inline" >&6; }
11533 case $ac_cv_c_inline in
11536 case $ac_cv_c_inline in
11538 *) ac_val=$ac_cv_c_inline;;
11540 cat >>confdefs.h <<_ACEOF
11541 #ifndef __cplusplus
11542 #define inline $ac_val
11548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
11549 $as_echo_n "checking for printf format archetype... " >&6; }
11550 if ${pgac_cv_printf_archetype+:} false; then :
11551 $as_echo_n "(cached) " >&6
11553 ac_save_c_werror_flag=$ac_c_werror_flag
11554 ac_c_werror_flag=yes
11555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11556 /* end confdefs.h. */
11558 pgac_write(int ignore, const char *fmt,...)
11559 __attribute__((format(gnu_printf, 2, 3)));
11568 if ac_fn_c_try_compile "$LINENO"; then :
11569 pgac_cv_printf_archetype=gnu_printf
11571 pgac_cv_printf_archetype=printf
11573 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11574 ac_c_werror_flag=$ac_save_c_werror_flag
11576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
11577 $as_echo "$pgac_cv_printf_archetype" >&6; }
11579 cat >>confdefs.h <<_ACEOF
11580 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
11585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
11586 $as_echo_n "checking for flexible array members... " >&6; }
11587 if ${ac_cv_c_flexmember+:} false; then :
11588 $as_echo_n "(cached) " >&6
11590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11591 /* end confdefs.h. */
11592 #include <stdlib.h>
11594 #include <stddef.h>
11595 struct s { int n; double d[]; };
11599 int m = getchar ();
11600 struct s *p = malloc (offsetof (struct s, d)
11601 + m * sizeof (double));
11603 return p->d != (double *) NULL;
11608 if ac_fn_c_try_compile "$LINENO"; then :
11609 ac_cv_c_flexmember=yes
11611 ac_cv_c_flexmember=no
11613 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
11616 $as_echo "$ac_cv_c_flexmember" >&6; }
11617 if test $ac_cv_c_flexmember = yes; then
11619 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
11622 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
11626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
11627 $as_echo_n "checking for signed types... " >&6; }
11628 if ${pgac_cv_c_signed+:} false; then :
11629 $as_echo_n "(cached) " >&6
11631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11632 /* end confdefs.h. */
11637 signed char c; signed short s; signed int i;
11642 if ac_fn_c_try_compile "$LINENO"; then :
11643 pgac_cv_c_signed=yes
11645 pgac_cv_c_signed=no
11647 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
11650 $as_echo "$pgac_cv_c_signed" >&6; }
11651 if test x"$pgac_cv_c_signed" = xno ; then
11653 $as_echo "#define signed /**/" >>confdefs.h
11656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
11657 $as_echo_n "checking for __func__... " >&6; }
11658 if ${pgac_cv_funcname_func_support+:} false; then :
11659 $as_echo_n "(cached) " >&6
11661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11662 /* end confdefs.h. */
11667 printf("%s\n", __func__);
11672 if ac_fn_c_try_compile "$LINENO"; then :
11673 pgac_cv_funcname_func_support=yes
11675 pgac_cv_funcname_func_support=no
11677 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
11680 $as_echo "$pgac_cv_funcname_func_support" >&6; }
11681 if test x"$pgac_cv_funcname_func_support" = xyes ; then
11683 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
11686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
11687 $as_echo_n "checking for __FUNCTION__... " >&6; }
11688 if ${pgac_cv_funcname_function_support+:} false; then :
11689 $as_echo_n "(cached) " >&6
11691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11692 /* end confdefs.h. */
11697 printf("%s\n", __FUNCTION__);
11702 if ac_fn_c_try_compile "$LINENO"; then :
11703 pgac_cv_funcname_function_support=yes
11705 pgac_cv_funcname_function_support=no
11707 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
11710 $as_echo "$pgac_cv_funcname_function_support" >&6; }
11711 if test x"$pgac_cv_funcname_function_support" = xyes ; then
11713 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
11717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
11718 $as_echo_n "checking for _Static_assert... " >&6; }
11719 if ${pgac_cv__static_assert+:} false; then :
11720 $as_echo_n "(cached) " >&6
11722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11723 /* end confdefs.h. */
11728 ({ _Static_assert(1, "foo"); })
11733 if ac_fn_c_try_link "$LINENO"; then :
11734 pgac_cv__static_assert=yes
11736 pgac_cv__static_assert=no
11738 rm -f core conftest.err conftest.$ac_objext \
11739 conftest$ac_exeext conftest.$ac_ext
11741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
11742 $as_echo "$pgac_cv__static_assert" >&6; }
11743 if test x"$pgac_cv__static_assert" = xyes ; then
11745 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
11748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
11749 $as_echo_n "checking for typeof... " >&6; }
11750 if ${pgac_cv_c_typeof+:} false; then :
11751 $as_echo_n "(cached) " >&6
11753 pgac_cv_c_typeof=no
11754 for pgac_kw in typeof __typeof__ decltype; do
11755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11756 /* end confdefs.h. */
11769 if ac_fn_c_try_compile "$LINENO"; then :
11770 pgac_cv_c_typeof=$pgac_kw
11772 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11773 test "$pgac_cv_c_typeof" != no && break
11776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
11777 $as_echo "$pgac_cv_c_typeof" >&6; }
11778 if test "$pgac_cv_c_typeof" != no; then
11780 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
11782 if test "$pgac_cv_c_typeof" != typeof; then
11784 cat >>confdefs.h <<_ACEOF
11785 #define typeof $pgac_cv_c_typeof
11790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
11791 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
11792 if ${pgac_cv__types_compatible+:} false; then :
11793 $as_echo_n "(cached) " >&6
11795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11796 /* end confdefs.h. */
11801 int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
11806 if ac_fn_c_try_compile "$LINENO"; then :
11807 pgac_cv__types_compatible=yes
11809 pgac_cv__types_compatible=no
11811 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
11814 $as_echo "$pgac_cv__types_compatible" >&6; }
11815 if test x"$pgac_cv__types_compatible" = xyes ; then
11817 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
11820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
11821 $as_echo_n "checking for __builtin_bswap16... " >&6; }
11822 if ${pgac_cv__builtin_bswap16+:} false; then :
11823 $as_echo_n "(cached) " >&6
11825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11826 /* end confdefs.h. */
11827 static unsigned long int x = __builtin_bswap16(0xaabb);
11830 if ac_fn_c_try_compile "$LINENO"; then :
11831 pgac_cv__builtin_bswap16=yes
11833 pgac_cv__builtin_bswap16=no
11835 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
11838 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
11839 if test x"$pgac_cv__builtin_bswap16" = xyes ; then
11841 $as_echo "#define HAVE__BUILTIN_BSWAP16 1" >>confdefs.h
11844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
11845 $as_echo_n "checking for __builtin_bswap32... " >&6; }
11846 if ${pgac_cv__builtin_bswap32+:} false; then :
11847 $as_echo_n "(cached) " >&6
11849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11850 /* end confdefs.h. */
11851 static unsigned long int x = __builtin_bswap32(0xaabbccdd);
11854 if ac_fn_c_try_compile "$LINENO"; then :
11855 pgac_cv__builtin_bswap32=yes
11857 pgac_cv__builtin_bswap32=no
11859 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
11862 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
11863 if test x"$pgac_cv__builtin_bswap32" = xyes ; then
11865 $as_echo "#define HAVE__BUILTIN_BSWAP32 1" >>confdefs.h
11868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
11869 $as_echo_n "checking for __builtin_bswap64... " >&6; }
11870 if ${pgac_cv__builtin_bswap64+:} false; then :
11871 $as_echo_n "(cached) " >&6
11873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11874 /* end confdefs.h. */
11875 static unsigned long int x = __builtin_bswap64(0xaabbccddeeff0011);
11878 if ac_fn_c_try_compile "$LINENO"; then :
11879 pgac_cv__builtin_bswap64=yes
11881 pgac_cv__builtin_bswap64=no
11883 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
11886 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
11887 if test x"$pgac_cv__builtin_bswap64" = xyes ; then
11889 $as_echo "#define HAVE__BUILTIN_BSWAP64 1" >>confdefs.h
11892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
11893 $as_echo_n "checking for __builtin_constant_p... " >&6; }
11894 if ${pgac_cv__builtin_constant_p+:} false; then :
11895 $as_echo_n "(cached) " >&6
11897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11898 /* end confdefs.h. */
11899 static int x; static int y[__builtin_constant_p(x) ? x : 1];
11902 if ac_fn_c_try_compile "$LINENO"; then :
11903 pgac_cv__builtin_constant_p=yes
11905 pgac_cv__builtin_constant_p=no
11907 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
11910 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
11911 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
11913 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
11916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
11917 $as_echo_n "checking for __builtin_unreachable... " >&6; }
11918 if ${pgac_cv__builtin_unreachable+:} false; then :
11919 $as_echo_n "(cached) " >&6
11921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11922 /* end confdefs.h. */
11927 __builtin_unreachable();
11932 if ac_fn_c_try_link "$LINENO"; then :
11933 pgac_cv__builtin_unreachable=yes
11935 pgac_cv__builtin_unreachable=no
11937 rm -f core conftest.err conftest.$ac_objext \
11938 conftest$ac_exeext conftest.$ac_ext
11940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
11941 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
11942 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
11944 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
11947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
11948 $as_echo_n "checking for computed goto support... " >&6; }
11949 if ${pgac_cv_computed_goto+:} false; then :
11950 $as_echo_n "(cached) " >&6
11952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11953 /* end confdefs.h. */
11958 void *labeladdrs[] = {&&my_label};
11959 goto *labeladdrs[0];
11967 if ac_fn_c_try_compile "$LINENO"; then :
11968 pgac_cv_computed_goto=yes
11970 pgac_cv_computed_goto=no
11972 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
11975 $as_echo "$pgac_cv_computed_goto" >&6; }
11976 if test x"$pgac_cv_computed_goto" = xyes ; then
11978 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
11981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__" >&5
11982 $as_echo_n "checking for __VA_ARGS__... " >&6; }
11983 if ${pgac_cv__va_args+:} false; then :
11984 $as_echo_n "(cached) " >&6
11986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11987 /* end confdefs.h. */
11992 #define debug(...) fprintf(stderr, __VA_ARGS__)
11993 debug("%s", "blarg");
11999 if ac_fn_c_try_compile "$LINENO"; then :
12000 pgac_cv__va_args=yes
12002 pgac_cv__va_args=no
12004 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__va_args" >&5
12007 $as_echo "$pgac_cv__va_args" >&6; }
12008 if test x"$pgac_cv__va_args" = xyes ; then
12010 $as_echo "#define HAVE__VA_ARGS 1" >>confdefs.h
12013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12014 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
12015 if ${ac_cv_struct_tm+:} false; then :
12016 $as_echo_n "(cached) " >&6
12018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12019 /* end confdefs.h. */
12020 #include <sys/types.h>
12027 int *p = &tm.tm_sec;
12033 if ac_fn_c_try_compile "$LINENO"; then :
12034 ac_cv_struct_tm=time.h
12036 ac_cv_struct_tm=sys/time.h
12038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12041 $as_echo "$ac_cv_struct_tm" >&6; }
12042 if test $ac_cv_struct_tm = sys/time.h; then
12044 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
12048 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
12049 #include <$ac_cv_struct_tm>
12052 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
12054 cat >>confdefs.h <<_ACEOF
12055 #define HAVE_STRUCT_TM_TM_ZONE 1
12061 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12063 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
12066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12067 $as_echo_n "checking for tzname... " >&6; }
12068 if ${ac_cv_var_tzname+:} false; then :
12069 $as_echo_n "(cached) " >&6
12071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12072 /* end confdefs.h. */
12073 #include <stdlib.h>
12075 #ifndef tzname /* For SGI. */
12076 extern char *tzname[]; /* RS6000 and others reject char **tzname. */
12087 if ac_fn_c_try_link "$LINENO"; then :
12088 ac_cv_var_tzname=yes
12090 ac_cv_var_tzname=no
12092 rm -f core conftest.err conftest.$ac_objext \
12093 conftest$ac_exeext conftest.$ac_ext
12095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12096 $as_echo "$ac_cv_var_tzname" >&6; }
12097 if test $ac_cv_var_tzname = yes; then
12099 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
12103 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
12104 #ifdef HAVE_SYS_IPC_H
12105 #include <sys/ipc.h>
12107 #ifdef HAVE_SYS_SEM_H
12108 #include <sys/sem.h>
12111 if test "x$ac_cv_type_union_semun" = xyes; then :
12113 cat >>confdefs.h <<_ACEOF
12114 #define HAVE_UNION_SEMUN 1
12120 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
12121 #ifdef HAVE_SYS_UN_H
12122 #include <sys/un.h>
12126 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
12128 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
12132 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
12133 #include <sys/socket.h>
12136 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
12138 cat >>confdefs.h <<_ACEOF
12139 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
12145 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
12146 #include <sys/socket.h>
12149 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
12151 cat >>confdefs.h <<_ACEOF
12152 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
12157 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
12158 #include <sys/socket.h>
12161 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
12163 cat >>confdefs.h <<_ACEOF
12164 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
12169 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
12170 #include <sys/socket.h>
12173 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
12175 cat >>confdefs.h <<_ACEOF
12176 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
12181 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
12182 #include <sys/socket.h>
12185 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
12187 cat >>confdefs.h <<_ACEOF
12188 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
12193 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
12194 #include <sys/socket.h>
12197 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
12199 cat >>confdefs.h <<_ACEOF
12200 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
12206 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
12207 #include <sys/socket.h>
12211 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
12213 cat >>confdefs.h <<_ACEOF
12214 #define HAVE_STRUCT_ADDRINFO 1
12221 ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
12222 if test "x$ac_cv_type_intptr_t" = xyes; then :
12224 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
12227 for ac_type in 'int' 'long int' 'long long int'; do
12228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12229 /* end confdefs.h. */
12230 $ac_includes_default
12234 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
12235 test_array [0] = 0;
12236 return test_array [0];
12242 if ac_fn_c_try_compile "$LINENO"; then :
12244 cat >>confdefs.h <<_ACEOF
12245 #define intptr_t $ac_type
12250 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12251 test -z "$ac_type" && break
12257 ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
12258 if test "x$ac_cv_type_uintptr_t" = xyes; then :
12260 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
12263 for ac_type in 'unsigned int' 'unsigned long int' \
12264 'unsigned long long int'; do
12265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12266 /* end confdefs.h. */
12267 $ac_includes_default
12271 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
12272 test_array [0] = 0;
12273 return test_array [0];
12279 if ac_fn_c_try_compile "$LINENO"; then :
12281 cat >>confdefs.h <<_ACEOF
12282 #define uintptr_t $ac_type
12287 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12288 test -z "$ac_type" && break
12294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
12295 $as_echo_n "checking for unsigned long long int... " >&6; }
12296 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
12297 $as_echo_n "(cached) " >&6
12299 ac_cv_type_unsigned_long_long_int=yes
12300 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12302 /* end confdefs.h. */
12304 /* For now, do not test the preprocessor; as of 2007 there are too many
12305 implementations with broken preprocessors. Perhaps this can
12306 be revisited in 2012. In the meantime, code should not expect
12307 #if to work with literals wider than 32 bits. */
12308 /* Test literals. */
12309 long long int ll = 9223372036854775807ll;
12310 long long int nll = -9223372036854775807LL;
12311 unsigned long long int ull = 18446744073709551615ULL;
12312 /* Test constant expressions. */
12313 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
12315 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
12321 /* Test availability of runtime routines for shift and division. */
12322 long long int llmax = 9223372036854775807ll;
12323 unsigned long long int ullmax = 18446744073709551615ull;
12324 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
12325 | (llmax / ll) | (llmax % ll)
12326 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
12327 | (ullmax / ull) | (ullmax % ull));
12333 if ac_fn_c_try_link "$LINENO"; then :
12336 ac_cv_type_unsigned_long_long_int=no
12338 rm -f core conftest.err conftest.$ac_objext \
12339 conftest$ac_exeext conftest.$ac_ext
12342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
12343 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
12344 if test $ac_cv_type_unsigned_long_long_int = yes; then
12346 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
12352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
12353 $as_echo_n "checking for long long int... " >&6; }
12354 if ${ac_cv_type_long_long_int+:} false; then :
12355 $as_echo_n "(cached) " >&6
12357 ac_cv_type_long_long_int=yes
12358 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12359 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
12360 if test $ac_cv_type_long_long_int = yes; then
12361 if test "$cross_compiling" = yes; then :
12364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12365 /* end confdefs.h. */
12366 #include <limits.h>
12369 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
12370 # define LLONG_MAX (HALF - 1 + HALF)
12375 long long int n = 1;
12379 long long int m = n << i;
12382 if (LLONG_MAX / 2 < m)
12390 if ac_fn_c_try_run "$LINENO"; then :
12393 ac_cv_type_long_long_int=no
12395 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12396 conftest.$ac_objext conftest.beam conftest.$ac_ext
12402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
12403 $as_echo "$ac_cv_type_long_long_int" >&6; }
12404 if test $ac_cv_type_long_long_int = yes; then
12406 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
12411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
12412 $as_echo_n "checking for locale_t... " >&6; }
12413 if ${pgac_cv_type_locale_t+:} false; then :
12414 $as_echo_n "(cached) " >&6
12416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12417 /* end confdefs.h. */
12418 #include <locale.h>
12428 if ac_fn_c_try_compile "$LINENO"; then :
12429 pgac_cv_type_locale_t=yes
12431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12432 /* end confdefs.h. */
12433 #include <xlocale.h>
12443 if ac_fn_c_try_compile "$LINENO"; then :
12444 pgac_cv_type_locale_t='yes (in xlocale.h)'
12446 pgac_cv_type_locale_t=no
12448 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12450 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
12453 $as_echo "$pgac_cv_type_locale_t" >&6; }
12454 if test "$pgac_cv_type_locale_t" != no; then
12456 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
12459 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
12461 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
12465 # MSVC doesn't cope well with defining restrict to __restrict, the
12466 # spelling it understands, because it conflicts with
12467 # __declspec(restrict). Therefore we define pg_restrict to the
12468 # appropriate definition, which presumably won't conflict.
12470 # Allow platforms with buggy compilers to force restrict to not be
12471 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
12473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
12474 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
12475 if ${ac_cv_c_restrict+:} false; then :
12476 $as_echo_n "(cached) " >&6
12478 ac_cv_c_restrict=no
12479 # The order here caters to the fact that C++ does not require restrict.
12480 for ac_kw in __restrict __restrict__ _Restrict restrict; do
12481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12482 /* end confdefs.h. */
12483 typedef int * int_ptr;
12484 int foo (int_ptr $ac_kw ip) {
12491 int * $ac_kw t = s;
12498 if ac_fn_c_try_compile "$LINENO"; then :
12499 ac_cv_c_restrict=$ac_kw
12501 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12502 test "$ac_cv_c_restrict" != no && break
12506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
12507 $as_echo "$ac_cv_c_restrict" >&6; }
12509 case $ac_cv_c_restrict in
12511 no) $as_echo "#define restrict /**/" >>confdefs.h
12513 *) cat >>confdefs.h <<_ACEOF
12514 #define restrict $ac_cv_c_restrict
12519 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
12522 pg_restrict="$ac_cv_c_restrict"
12525 cat >>confdefs.h <<_ACEOF
12526 #define pg_restrict $pg_restrict
12530 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
12531 #include <sys/param.h>
12532 #ifdef HAVE_SYS_UCRED_H
12533 #include <sys/ucred.h>
12536 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
12538 cat >>confdefs.h <<_ACEOF
12539 #define HAVE_STRUCT_CMSGCRED 1
12546 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
12547 #include <getopt.h>
12550 if test "x$ac_cv_type_struct_option" = xyes; then :
12552 cat >>confdefs.h <<_ACEOF
12553 #define HAVE_STRUCT_OPTION 1
12560 if test "$with_zlib" = yes; then
12561 # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
12562 # did not). While we could work around the lack of z_streamp, it
12563 # seems unwise to encourage people to use such old zlib versions...
12564 ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
12566 if test "x$ac_cv_type_z_streamp" = xyes; then :
12569 as_fn_error $? "zlib version is too old
12570 Use --without-zlib to disable zlib support." "$LINENO" 5
12575 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
12578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
12579 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
12580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12581 /* end confdefs.h. */
12586 int a = 0; int *p = &a; int r;
12587 __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
12592 if ac_fn_c_try_compile "$LINENO"; then :
12593 pgac_cv_have_ppc_mutex_hint=yes
12595 pgac_cv_have_ppc_mutex_hint=no
12597 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
12599 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
12600 if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
12602 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
12608 # Check largefile support. You might think this is a system service not a
12609 # compiler characteristic, but you'd be wrong. We must check this before
12610 # probing existence of related functions such as fseeko, since the largefile
12611 # defines can affect what is generated for that.
12612 if test "$PORTNAME" != "win32"; then
12613 # Check whether --enable-largefile was given.
12614 if test "${enable_largefile+set}" = set; then :
12615 enableval=$enable_largefile;
12618 if test "$enable_largefile" != no; then
12620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
12621 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
12622 if ${ac_cv_sys_largefile_CC+:} false; then :
12623 $as_echo_n "(cached) " >&6
12625 ac_cv_sys_largefile_CC=no
12626 if test "$GCC" != yes; then
12629 # IRIX 6.2 and later do not support large files by default,
12630 # so use the C compiler's -n32 option if that helps.
12631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12632 /* end confdefs.h. */
12633 #include <sys/types.h>
12634 /* Check that off_t can represent 2**63 - 1 correctly.
12635 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12636 since some C++ compilers masquerading as C compilers
12637 incorrectly reject 9223372036854775807. */
12638 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12639 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12640 && LARGE_OFF_T % 2147483647 == 1)
12650 if ac_fn_c_try_compile "$LINENO"; then :
12653 rm -f core conftest.err conftest.$ac_objext
12655 if ac_fn_c_try_compile "$LINENO"; then :
12656 ac_cv_sys_largefile_CC=' -n32'; break
12658 rm -f core conftest.err conftest.$ac_objext
12662 rm -f conftest.$ac_ext
12665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
12666 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
12667 if test "$ac_cv_sys_largefile_CC" != no; then
12668 CC=$CC$ac_cv_sys_largefile_CC
12671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12672 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
12673 if ${ac_cv_sys_file_offset_bits+:} false; then :
12674 $as_echo_n "(cached) " >&6
12677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12678 /* end confdefs.h. */
12679 #include <sys/types.h>
12680 /* Check that off_t can represent 2**63 - 1 correctly.
12681 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12682 since some C++ compilers masquerading as C compilers
12683 incorrectly reject 9223372036854775807. */
12684 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12685 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12686 && LARGE_OFF_T % 2147483647 == 1)
12696 if ac_fn_c_try_compile "$LINENO"; then :
12697 ac_cv_sys_file_offset_bits=no; break
12699 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12701 /* end confdefs.h. */
12702 #define _FILE_OFFSET_BITS 64
12703 #include <sys/types.h>
12704 /* Check that off_t can represent 2**63 - 1 correctly.
12705 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12706 since some C++ compilers masquerading as C compilers
12707 incorrectly reject 9223372036854775807. */
12708 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12709 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12710 && LARGE_OFF_T % 2147483647 == 1)
12720 if ac_fn_c_try_compile "$LINENO"; then :
12721 ac_cv_sys_file_offset_bits=64; break
12723 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12724 ac_cv_sys_file_offset_bits=unknown
12728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
12729 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
12730 case $ac_cv_sys_file_offset_bits in #(
12733 cat >>confdefs.h <<_ACEOF
12734 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12739 if test $ac_cv_sys_file_offset_bits = unknown; then
12740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
12741 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
12742 if ${ac_cv_sys_large_files+:} false; then :
12743 $as_echo_n "(cached) " >&6
12746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12747 /* end confdefs.h. */
12748 #include <sys/types.h>
12749 /* Check that off_t can represent 2**63 - 1 correctly.
12750 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12751 since some C++ compilers masquerading as C compilers
12752 incorrectly reject 9223372036854775807. */
12753 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12754 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12755 && LARGE_OFF_T % 2147483647 == 1)
12765 if ac_fn_c_try_compile "$LINENO"; then :
12766 ac_cv_sys_large_files=no; break
12768 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12770 /* end confdefs.h. */
12771 #define _LARGE_FILES 1
12772 #include <sys/types.h>
12773 /* Check that off_t can represent 2**63 - 1 correctly.
12774 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12775 since some C++ compilers masquerading as C compilers
12776 incorrectly reject 9223372036854775807. */
12777 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12778 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12779 && LARGE_OFF_T % 2147483647 == 1)
12789 if ac_fn_c_try_compile "$LINENO"; then :
12790 ac_cv_sys_large_files=1; break
12792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12793 ac_cv_sys_large_files=unknown
12797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
12798 $as_echo "$ac_cv_sys_large_files" >&6; }
12799 case $ac_cv_sys_large_files in #(
12802 cat >>confdefs.h <<_ACEOF
12803 #define _LARGE_FILES $ac_cv_sys_large_files
12816 # Check for largefile support (must be after AC_SYS_LARGEFILE)
12817 # The cast to long int works around a bug in the HP C Compiler
12818 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12819 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12820 # This bug is HP SR number 8606223364.
12821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
12822 $as_echo_n "checking size of off_t... " >&6; }
12823 if ${ac_cv_sizeof_off_t+:} false; then :
12824 $as_echo_n "(cached) " >&6
12826 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
12829 if test "$ac_cv_type_off_t" = yes; then
12830 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12831 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12832 as_fn_error 77 "cannot compute sizeof (off_t)
12833 See \`config.log' for more details" "$LINENO" 5; }
12835 ac_cv_sizeof_off_t=0
12840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
12841 $as_echo "$ac_cv_sizeof_off_t" >&6; }
12845 cat >>confdefs.h <<_ACEOF
12846 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
12851 # If we don't have largefile support, can't handle segsize >= 2GB.
12852 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
12853 as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
12858 ## Functions, global variables
12861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
12862 $as_echo_n "checking for int timezone... " >&6; }
12863 if ${pgac_cv_var_int_timezone+:} false; then :
12864 $as_echo_n "(cached) " >&6
12866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12867 /* end confdefs.h. */
12874 res = timezone / 60;
12876 res = _timezone / 60;
12882 if ac_fn_c_try_link "$LINENO"; then :
12883 pgac_cv_var_int_timezone=yes
12885 pgac_cv_var_int_timezone=no
12887 rm -f core conftest.err conftest.$ac_objext \
12888 conftest$ac_exeext conftest.$ac_ext
12890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
12891 $as_echo "$pgac_cv_var_int_timezone" >&6; }
12892 if test x"$pgac_cv_var_int_timezone" = xyes ; then
12894 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
12897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
12898 $as_echo_n "checking types of arguments for accept()... " >&6; }
12899 if ${ac_cv_func_accept_return+:} false; then :
12900 $as_echo_n "(cached) " >&6
12902 if ${ac_cv_func_accept_arg1+:} false; then :
12903 $as_echo_n "(cached) " >&6
12905 if ${ac_cv_func_accept_arg2+:} false; then :
12906 $as_echo_n "(cached) " >&6
12908 if ${ac_cv_func_accept_arg3+:} false; then :
12909 $as_echo_n "(cached) " >&6
12911 for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
12912 for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
12913 for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
12914 for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
12915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12916 /* end confdefs.h. */
12917 #include <sys/types.h>
12918 #include <sys/socket.h>
12919 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
12921 if ac_fn_c_try_compile "$LINENO"; then :
12922 ac_not_found=no; break 4
12926 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12931 if test "$ac_not_found" = yes; then
12932 as_fn_error $? "could not determine argument types" "$LINENO" 5
12934 if test "$ac_cv_func_accept_arg3" = "void"; then
12935 ac_cv_func_accept_arg3=int
12945 { $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
12946 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
12948 cat >>confdefs.h <<_ACEOF
12949 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
12953 cat >>confdefs.h <<_ACEOF
12954 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
12958 cat >>confdefs.h <<_ACEOF
12959 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
12963 cat >>confdefs.h <<_ACEOF
12964 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
12968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
12969 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
12970 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
12971 $as_echo_n "(cached) " >&6
12973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12974 /* end confdefs.h. */
12975 #include <sys/time.h>
12979 struct timeval *tp;
12980 struct timezone *tzp;
12981 gettimeofday(tp,tzp);
12986 if ac_fn_c_try_compile "$LINENO"; then :
12987 pgac_cv_func_gettimeofday_1arg=no
12989 pgac_cv_func_gettimeofday_1arg=yes
12991 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
12994 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
12995 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
12997 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
13001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
13002 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
13003 if ${pgac_cv_func_wcstombs_l+:} false; then :
13004 $as_echo_n "(cached) " >&6
13006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13007 /* end confdefs.h. */
13008 #include <stdlib.h>
13009 #include <locale.h>
13020 if ac_fn_c_try_compile "$LINENO"; then :
13021 pgac_cv_func_wcstombs_l='yes'
13023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13024 /* end confdefs.h. */
13025 #include <stdlib.h>
13026 #include <locale.h>
13027 #include <xlocale.h>
13038 if ac_fn_c_try_compile "$LINENO"; then :
13039 pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
13041 pgac_cv_func_wcstombs_l='no'
13043 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13045 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
13048 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
13049 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
13051 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
13055 # Some versions of libedit contain strlcpy(), setproctitle(), and other
13056 # symbols that that library has no business exposing to the world. Pending
13057 # acquisition of a clue by those developers, ignore libedit (including its
13058 # possible alias of libreadline) while checking for everything else.
13059 LIBS_including_readline="$LIBS"
13060 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
13062 for ac_func in cbrt clock_gettime dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate pstat pthread_is_threaded_np readlink setproctitle setsid shm_open symlink sync_file_range utime utimes wcstombs_l
13064 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13065 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13066 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13067 cat >>confdefs.h <<_ACEOF
13068 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13075 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
13076 if test "x$ac_cv_func_fseeko" = xyes; then :
13077 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
13080 case " $LIBOBJS " in
13081 *" fseeko.$ac_objext "* ) ;;
13082 *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
13090 # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
13091 # Mingw uses macros to access Win32 API calls
13094 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
13096 ac_cv_func_fseeko=yes;;
13098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13099 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
13100 if ${ac_cv_sys_largefile_source+:} false; then :
13101 $as_echo_n "(cached) " >&6
13104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13105 /* end confdefs.h. */
13106 #include <sys/types.h> /* for off_t */
13111 int (*fp) (FILE *, off_t, int) = fseeko;
13112 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13117 if ac_fn_c_try_link "$LINENO"; then :
13118 ac_cv_sys_largefile_source=no; break
13120 rm -f core conftest.err conftest.$ac_objext \
13121 conftest$ac_exeext conftest.$ac_ext
13122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13123 /* end confdefs.h. */
13124 #define _LARGEFILE_SOURCE 1
13125 #include <sys/types.h> /* for off_t */
13130 int (*fp) (FILE *, off_t, int) = fseeko;
13131 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13136 if ac_fn_c_try_link "$LINENO"; then :
13137 ac_cv_sys_largefile_source=1; break
13139 rm -f core conftest.err conftest.$ac_objext \
13140 conftest$ac_exeext conftest.$ac_ext
13141 ac_cv_sys_largefile_source=unknown
13145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
13146 $as_echo "$ac_cv_sys_largefile_source" >&6; }
13147 case $ac_cv_sys_largefile_source in #(
13150 cat >>confdefs.h <<_ACEOF
13151 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13157 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13158 # in glibc 2.1.3, but that breaks too many other things.
13159 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13160 if test $ac_cv_sys_largefile_source != unknown; then
13162 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
13168 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
13169 # by calling it, 2009-04-02
13170 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
13171 if test "$PORTNAME" != "solaris"; then
13172 for ac_func in posix_fadvise
13174 ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
13175 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
13176 cat >>confdefs.h <<_ACEOF
13177 #define HAVE_POSIX_FADVISE 1
13183 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
13185 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
13191 cat >>confdefs.h <<_ACEOF
13192 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
13197 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
13199 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
13205 cat >>confdefs.h <<_ACEOF
13206 #define HAVE_DECL_FDATASYNC $ac_have_decl
13209 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
13210 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
13216 cat >>confdefs.h <<_ACEOF
13217 #define HAVE_DECL_STRLCAT $ac_have_decl
13219 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
13220 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
13226 cat >>confdefs.h <<_ACEOF
13227 #define HAVE_DECL_STRLCPY $ac_have_decl
13229 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
13230 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
13236 cat >>confdefs.h <<_ACEOF
13237 #define HAVE_DECL_STRNLEN $ac_have_decl
13240 # This is probably only present on macOS, but may as well check always
13241 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
13243 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
13249 cat >>confdefs.h <<_ACEOF
13250 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
13255 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
13256 #include <netinet/in.h>
13258 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
13260 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
13267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
13268 $as_echo_n "checking for PS_STRINGS... " >&6; }
13269 if ${pgac_cv_var_PS_STRINGS+:} false; then :
13270 $as_echo_n "(cached) " >&6
13272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13273 /* end confdefs.h. */
13274 #include <machine/vmparam.h>
13275 #include <sys/exec.h>
13280 PS_STRINGS->ps_nargvstr = 1;
13281 PS_STRINGS->ps_argvstr = "foo";
13286 if ac_fn_c_try_link "$LINENO"; then :
13287 pgac_cv_var_PS_STRINGS=yes
13289 pgac_cv_var_PS_STRINGS=no
13291 rm -f core conftest.err conftest.$ac_objext \
13292 conftest$ac_exeext conftest.$ac_ext
13294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
13295 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
13296 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
13298 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
13303 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
13304 # is missing. Yes, there are machines that have only one. We may
13305 # also decide to use snprintf.c if snprintf() is present but does not
13306 # have all the features we need --- see below.
13308 if test "$PORTNAME" = "win32"; then
13309 # Win32 gets snprintf.c built unconditionally.
13311 # To properly translate all NLS languages strings, we must support the
13312 # *printf() %$ format, which allows *printf() arguments to be selected
13313 # by position in the translated string.
13315 # libintl versions < 0.13 use the native *printf() functions, and Win32
13316 # *printf() doesn't understand %$, so we must use our /port versions,
13317 # which do understand %$. libintl versions >= 0.13 include their own
13318 # *printf versions on Win32. The libintl 0.13 release note text is:
13320 # C format strings with positions, as they arise when a translator
13321 # needs to reorder a sentence, are now supported on all platforms.
13322 # On those few platforms (NetBSD and Woe32) for which the native
13323 # printf()/fprintf()/... functions don't support such format
13324 # strings, replacements are provided through <libintl.h>.
13326 # We could use libintl >= 0.13's *printf() if we were sure that we had
13327 # a litint >= 0.13 at runtime, but seeing that there is no clean way
13328 # to guarantee that, it is best to just use our own, so we are sure to
13329 # get %$ support. In include/port.h we disable the *printf() macros
13330 # that might have been defined by libintl.
13332 # We do this unconditionally whether NLS is used or not so we are sure
13333 # that all Win32 libraries and binaries behave the same.
13334 pgac_need_repl_snprintf=yes
13336 pgac_need_repl_snprintf=no
13337 for ac_func in snprintf
13339 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
13340 if test "x$ac_cv_func_snprintf" = xyes; then :
13341 cat >>confdefs.h <<_ACEOF
13342 #define HAVE_SNPRINTF 1
13346 pgac_need_repl_snprintf=yes
13350 for ac_func in vsnprintf
13352 ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
13353 if test "x$ac_cv_func_vsnprintf" = xyes; then :
13354 cat >>confdefs.h <<_ACEOF
13355 #define HAVE_VSNPRINTF 1
13359 pgac_need_repl_snprintf=yes
13366 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
13367 # include/c.h will provide declarations. Note this is a separate test
13368 # from whether the functions exist in the C library --- there are
13369 # systems that have the functions but don't bother to declare them :-(
13371 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
13372 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
13378 cat >>confdefs.h <<_ACEOF
13379 #define HAVE_DECL_SNPRINTF $ac_have_decl
13381 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
13382 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
13388 cat >>confdefs.h <<_ACEOF
13389 #define HAVE_DECL_VSNPRINTF $ac_have_decl
13394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
13395 $as_echo_n "checking for isinf... " >&6; }
13396 if ${ac_cv_func_isinf+:} false; then :
13397 $as_echo_n "(cached) " >&6
13399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13400 /* end confdefs.h. */
13403 double glob_double;
13408 return isinf(glob_double) ? 0 : 1;
13413 if ac_fn_c_try_link "$LINENO"; then :
13414 ac_cv_func_isinf=yes
13416 ac_cv_func_isinf=no
13418 rm -f core conftest.err conftest.$ac_objext \
13419 conftest$ac_exeext conftest.$ac_ext
13421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
13422 $as_echo "$ac_cv_func_isinf" >&6; }
13424 if test $ac_cv_func_isinf = yes ; then
13426 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
13429 case " $LIBOBJS " in
13430 *" isinf.$ac_objext "* ) ;;
13431 *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
13435 # Look for a way to implement a substitute for isinf()
13436 for ac_func in fpclass fp_class fp_class_d class
13438 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13439 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13440 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13441 cat >>confdefs.h <<_ACEOF
13442 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13450 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
13451 if test "x$ac_cv_func_crypt" = xyes; then :
13452 $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
13455 case " $LIBOBJS " in
13456 *" crypt.$ac_objext "* ) ;;
13457 *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
13463 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
13464 if test "x$ac_cv_func_fls" = xyes; then :
13465 $as_echo "#define HAVE_FLS 1" >>confdefs.h
13468 case " $LIBOBJS " in
13469 *" fls.$ac_objext "* ) ;;
13470 *) LIBOBJS="$LIBOBJS fls.$ac_objext"
13476 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
13477 if test "x$ac_cv_func_getopt" = xyes; then :
13478 $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
13481 case " $LIBOBJS " in
13482 *" getopt.$ac_objext "* ) ;;
13483 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
13489 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
13490 if test "x$ac_cv_func_getrusage" = xyes; then :
13491 $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
13494 case " $LIBOBJS " in
13495 *" getrusage.$ac_objext "* ) ;;
13496 *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
13502 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
13503 if test "x$ac_cv_func_inet_aton" = xyes; then :
13504 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
13507 case " $LIBOBJS " in
13508 *" inet_aton.$ac_objext "* ) ;;
13509 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
13515 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
13516 if test "x$ac_cv_func_mkdtemp" = xyes; then :
13517 $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
13520 case " $LIBOBJS " in
13521 *" mkdtemp.$ac_objext "* ) ;;
13522 *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
13528 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
13529 if test "x$ac_cv_func_random" = xyes; then :
13530 $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
13533 case " $LIBOBJS " in
13534 *" random.$ac_objext "* ) ;;
13535 *) LIBOBJS="$LIBOBJS random.$ac_objext"
13541 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
13542 if test "x$ac_cv_func_rint" = xyes; then :
13543 $as_echo "#define HAVE_RINT 1" >>confdefs.h
13546 case " $LIBOBJS " in
13547 *" rint.$ac_objext "* ) ;;
13548 *) LIBOBJS="$LIBOBJS rint.$ac_objext"
13554 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
13555 if test "x$ac_cv_func_srandom" = xyes; then :
13556 $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
13559 case " $LIBOBJS " in
13560 *" srandom.$ac_objext "* ) ;;
13561 *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
13567 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
13568 if test "x$ac_cv_func_strerror" = xyes; then :
13569 $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
13572 case " $LIBOBJS " in
13573 *" strerror.$ac_objext "* ) ;;
13574 *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
13580 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
13581 if test "x$ac_cv_func_strlcat" = xyes; then :
13582 $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
13585 case " $LIBOBJS " in
13586 *" strlcat.$ac_objext "* ) ;;
13587 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
13593 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
13594 if test "x$ac_cv_func_strlcpy" = xyes; then :
13595 $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
13598 case " $LIBOBJS " in
13599 *" strlcpy.$ac_objext "* ) ;;
13600 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
13606 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
13607 if test "x$ac_cv_func_strnlen" = xyes; then :
13608 $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
13611 case " $LIBOBJS " in
13612 *" strnlen.$ac_objext "* ) ;;
13613 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
13623 # Windows uses a specialised env handler
13624 # and doesn't need a replacement getpeereid because it doesn't use
13628 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
13631 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
13633 ac_cv_func_unsetenv=yes
13634 ac_cv_func_getpeereid=yes;;
13636 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
13637 if test "x$ac_cv_func_unsetenv" = xyes; then :
13638 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
13641 case " $LIBOBJS " in
13642 *" unsetenv.$ac_objext "* ) ;;
13643 *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
13649 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
13650 if test "x$ac_cv_func_getpeereid" = xyes; then :
13651 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
13654 case " $LIBOBJS " in
13655 *" getpeereid.$ac_objext "* ) ;;
13656 *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
13666 # System's version of getaddrinfo(), if any, may be used only if we found
13667 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
13668 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
13669 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
13670 test "$PORTNAME" != "win32"; then
13671 ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
13672 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
13673 $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
13676 case " $LIBOBJS " in
13677 *" getaddrinfo.$ac_objext "* ) ;;
13678 *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
13686 case " $LIBOBJS " in
13687 *" getaddrinfo.$ac_objext "* ) ;;
13688 *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
13694 # Similarly, use system's getopt_long() only if system provides struct option.
13695 if test x"$ac_cv_type_struct_option" = xyes ; then
13696 ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
13697 if test "x$ac_cv_func_getopt_long" = xyes; then :
13698 $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
13701 case " $LIBOBJS " in
13702 *" getopt_long.$ac_objext "* ) ;;
13703 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
13711 case " $LIBOBJS " in
13712 *" getopt_long.$ac_objext "* ) ;;
13713 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
13719 # Solaris' getopt() doesn't do what we want for long options, so always use
13720 # our version on that platform.
13721 if test "$PORTNAME" = "solaris"; then
13722 case " $LIBOBJS " in
13723 *" getopt.$ac_objext "* ) ;;
13724 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
13730 # mingw has adopted a GNU-centric interpretation of optind/optreset,
13731 # so always use our version on Windows.
13732 if test "$PORTNAME" = "win32"; then
13733 case " $LIBOBJS " in
13734 *" getopt.$ac_objext "* ) ;;
13735 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
13739 case " $LIBOBJS " in
13740 *" getopt_long.$ac_objext "* ) ;;
13741 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
13747 # Win32 (really MinGW) support
13748 if test "$PORTNAME" = "win32"; then
13749 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
13750 if test "x$ac_cv_func_gettimeofday" = xyes; then :
13751 $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
13754 case " $LIBOBJS " in
13755 *" gettimeofday.$ac_objext "* ) ;;
13756 *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
13763 case " $LIBOBJS " in
13764 *" dirmod.$ac_objext "* ) ;;
13765 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
13769 case " $LIBOBJS " in
13770 *" kill.$ac_objext "* ) ;;
13771 *) LIBOBJS="$LIBOBJS kill.$ac_objext"
13775 case " $LIBOBJS " in
13776 *" open.$ac_objext "* ) ;;
13777 *) LIBOBJS="$LIBOBJS open.$ac_objext"
13781 case " $LIBOBJS " in
13782 *" system.$ac_objext "* ) ;;
13783 *) LIBOBJS="$LIBOBJS system.$ac_objext"
13787 case " $LIBOBJS " in
13788 *" win32env.$ac_objext "* ) ;;
13789 *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
13793 case " $LIBOBJS " in
13794 *" win32error.$ac_objext "* ) ;;
13795 *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
13799 case " $LIBOBJS " in
13800 *" win32security.$ac_objext "* ) ;;
13801 *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
13805 case " $LIBOBJS " in
13806 *" win32setlocale.$ac_objext "* ) ;;
13807 *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
13812 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
13814 ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
13815 #define WIN32_LEAN_AND_MEAN
13816 #include <windows.h>
13817 #include <string.h>
13818 #include <dbghelp.h>
13820 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
13822 cat >>confdefs.h <<_ACEOF
13823 #define HAVE_MINIDUMP_TYPE 1
13826 pgac_minidump_type=yes
13828 pgac_minidump_type=no
13832 if test x"$pgac_minidump_type" = x"yes" ; then
13833 have_win32_dbghelp=yes
13836 have_win32_dbghelp=no
13840 # Cygwin needs only a bit of that
13841 if test "$PORTNAME" = "cygwin"; then
13842 case " $LIBOBJS " in
13843 *" dirmod.$ac_objext "* ) ;;
13844 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
13850 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
13851 /* NetBSD declares sys_siglist in unistd.h. */
13852 #ifdef HAVE_UNISTD_H
13853 # include <unistd.h>
13857 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
13863 cat >>confdefs.h <<_ACEOF
13864 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
13868 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
13869 if test "x$ac_cv_func_syslog" = xyes; then :
13870 ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
13871 if test "x$ac_cv_header_syslog_h" = xyes; then :
13873 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
13881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
13882 $as_echo_n "checking for opterr... " >&6; }
13883 if ${pgac_cv_var_int_opterr+:} false; then :
13884 $as_echo_n "(cached) " >&6
13886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13887 /* end confdefs.h. */
13888 #include <unistd.h>
13892 extern int opterr; opterr = 1;
13897 if ac_fn_c_try_link "$LINENO"; then :
13898 pgac_cv_var_int_opterr=yes
13900 pgac_cv_var_int_opterr=no
13902 rm -f core conftest.err conftest.$ac_objext \
13903 conftest$ac_exeext conftest.$ac_ext
13905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
13906 $as_echo "$pgac_cv_var_int_opterr" >&6; }
13907 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
13909 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
13913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
13914 $as_echo_n "checking for optreset... " >&6; }
13915 if ${pgac_cv_var_int_optreset+:} false; then :
13916 $as_echo_n "(cached) " >&6
13918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13919 /* end confdefs.h. */
13920 #include <unistd.h>
13924 extern int optreset; optreset = 1;
13929 if ac_fn_c_try_link "$LINENO"; then :
13930 pgac_cv_var_int_optreset=yes
13932 pgac_cv_var_int_optreset=no
13934 rm -f core conftest.err conftest.$ac_objext \
13935 conftest$ac_exeext conftest.$ac_ext
13937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
13938 $as_echo "$pgac_cv_var_int_optreset" >&6; }
13939 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
13941 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
13945 for ac_func in strtoll strtoq
13947 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13948 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13949 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13950 cat >>confdefs.h <<_ACEOF
13951 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13957 for ac_func in strtoull strtouq
13959 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13960 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13961 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13962 cat >>confdefs.h <<_ACEOF
13963 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13970 if test "$with_icu" = yes; then
13971 ac_save_CPPFLAGS=$CPPFLAGS
13972 CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
13974 # Verify we have ICU's header files
13975 ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
13976 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
13979 as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
13984 CPPFLAGS=$ac_save_CPPFLAGS
13987 # Lastly, restore full LIBS list and check for readline/libedit symbols
13988 LIBS="$LIBS_including_readline"
13990 if test "$with_readline" = yes; then
13991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
13992 $as_echo_n "checking for rl_completion_append_character... " >&6; }
13993 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
13994 $as_echo_n "(cached) " >&6
13996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13997 /* end confdefs.h. */
13999 #ifdef HAVE_READLINE_READLINE_H
14000 # include <readline/readline.h>
14001 #elif defined(HAVE_READLINE_H)
14002 # include <readline.h>
14008 rl_completion_append_character = 'x';
14013 if ac_fn_c_try_link "$LINENO"; then :
14014 pgac_cv_var_rl_completion_append_character=yes
14016 pgac_cv_var_rl_completion_append_character=no
14018 rm -f core conftest.err conftest.$ac_objext \
14019 conftest$ac_exeext conftest.$ac_ext
14021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
14022 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
14023 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
14025 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
14028 for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
14030 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14031 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14032 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14033 cat >>confdefs.h <<_ACEOF
14034 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14040 for ac_func in append_history history_truncate_file
14042 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14043 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14044 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14045 cat >>confdefs.h <<_ACEOF
14046 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14055 # This test makes sure that run tests work at all. Sometimes a shared
14056 # library is found by the linker, but the runtime linker can't find it.
14057 # This check should come after all modifications of compiler or linker
14058 # variables, and before any other run tests.
14059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
14060 $as_echo_n "checking test program... " >&6; }
14061 if test "$cross_compiling" = yes; then :
14062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
14063 $as_echo "cross-compiling" >&6; }
14065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14066 /* end confdefs.h. */
14067 int main() { return 0; }
14069 if ac_fn_c_try_run "$LINENO"; then :
14070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
14071 $as_echo "ok" >&6; }
14073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
14074 $as_echo "failed" >&6; }
14076 Could not execute a simple test program. This may be a problem
14077 related to locating shared libraries. Check the file 'config.log'
14078 for the exact reason." "$LINENO" 5
14080 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14081 conftest.$ac_objext conftest.beam conftest.$ac_ext
14085 # --------------------
14086 # Run tests below here
14087 # --------------------
14089 # Force use of our snprintf if system's doesn't do arg control
14090 # See comment above at snprintf test for details.
14091 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
14092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports argument control" >&5
14093 $as_echo_n "checking whether snprintf supports argument control... " >&6; }
14094 if ${pgac_cv_snprintf_arg_control+:} false; then :
14095 $as_echo_n "(cached) " >&6
14097 if test "$cross_compiling" = yes; then :
14098 pgac_cv_snprintf_arg_control=cross
14100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14101 /* end confdefs.h. */
14103 #include <string.h>
14109 /* can it swap arguments? */
14110 snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
14111 if (strcmp(buf, "4 3") != 0)
14116 if ac_fn_c_try_run "$LINENO"; then :
14117 pgac_cv_snprintf_arg_control=yes
14119 pgac_cv_snprintf_arg_control=no
14121 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14122 conftest.$ac_objext conftest.beam conftest.$ac_ext
14127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_arg_control" >&5
14128 $as_echo "$pgac_cv_snprintf_arg_control" >&6; }
14130 if test $pgac_cv_snprintf_arg_control != yes ; then
14131 pgac_need_repl_snprintf=yes
14138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
14139 $as_echo_n "checking whether long int is 64 bits... " >&6; }
14140 if ${pgac_cv_type_long_int_64+:} false; then :
14141 $as_echo_n "(cached) " >&6
14143 if test "$cross_compiling" = yes; then :
14144 # If cross-compiling, check the size reported by the compiler and
14145 # trust that the arithmetic works.
14146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14147 /* end confdefs.h. */
14152 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
14153 test_array [0] = 0;
14154 return test_array [0];
14160 if ac_fn_c_try_compile "$LINENO"; then :
14161 pgac_cv_type_long_int_64=yes
14163 pgac_cv_type_long_int_64=no
14165 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14168 /* end confdefs.h. */
14169 typedef long int ac_int64;
14172 * These are globals to discourage the compiler from folding all the
14173 * arithmetic tests down to compile-time constants.
14175 ac_int64 a = 20000001;
14176 ac_int64 b = 40000005;
14178 int does_int64_work()
14182 if (sizeof(ac_int64) != 8)
14183 return 0; /* definitely not the right size */
14185 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
14195 return (! does_int64_work());
14198 if ac_fn_c_try_run "$LINENO"; then :
14199 pgac_cv_type_long_int_64=yes
14201 pgac_cv_type_long_int_64=no
14203 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14204 conftest.$ac_objext conftest.beam conftest.$ac_ext
14208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
14209 $as_echo "$pgac_cv_type_long_int_64" >&6; }
14211 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
14212 if test x"$pgac_cv_type_long_int_64" = xyes ; then
14214 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
14219 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
14220 pg_int64_type="long int"
14222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
14223 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
14224 if ${pgac_cv_type_long_long_int_64+:} false; then :
14225 $as_echo_n "(cached) " >&6
14227 if test "$cross_compiling" = yes; then :
14228 # If cross-compiling, check the size reported by the compiler and
14229 # trust that the arithmetic works.
14230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14231 /* end confdefs.h. */
14236 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
14237 test_array [0] = 0;
14238 return test_array [0];
14244 if ac_fn_c_try_compile "$LINENO"; then :
14245 pgac_cv_type_long_long_int_64=yes
14247 pgac_cv_type_long_long_int_64=no
14249 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14252 /* end confdefs.h. */
14253 typedef long long int ac_int64;
14256 * These are globals to discourage the compiler from folding all the
14257 * arithmetic tests down to compile-time constants.
14259 ac_int64 a = 20000001;
14260 ac_int64 b = 40000005;
14262 int does_int64_work()
14266 if (sizeof(ac_int64) != 8)
14267 return 0; /* definitely not the right size */
14269 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
14279 return (! does_int64_work());
14282 if ac_fn_c_try_run "$LINENO"; then :
14283 pgac_cv_type_long_long_int_64=yes
14285 pgac_cv_type_long_long_int_64=no
14287 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14288 conftest.$ac_objext conftest.beam conftest.$ac_ext
14292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
14293 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
14295 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
14296 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
14298 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
14302 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
14303 pg_int64_type="long long int"
14305 as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
14310 cat >>confdefs.h <<_ACEOF
14311 #define PG_INT64_TYPE $pg_int64_type
14315 # If we found "long int" is 64 bits, assume snprintf handles it. If
14316 # we found we need to use "long long int", better check. We cope with
14317 # snprintfs that use %lld, %qd, or %I64d as the format. If none of these
14318 # work, fall back to our own snprintf emulation (which we know uses %lld).
14320 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
14321 if test $pgac_need_repl_snprintf = no; then
14322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking snprintf length modifier for long long int" >&5
14323 $as_echo_n "checking snprintf length modifier for long long int... " >&6; }
14324 if ${pgac_cv_snprintf_long_long_int_modifier+:} false; then :
14325 $as_echo_n "(cached) " >&6
14327 for pgac_modifier in 'll' 'q' 'I64'; do
14328 if test "$cross_compiling" = yes; then :
14329 pgac_cv_snprintf_long_long_int_modifier=cross; break
14331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14332 /* end confdefs.h. */
14334 #include <string.h>
14335 typedef long long int ac_int64;
14336 #define INT64_FORMAT "%${pgac_modifier}d"
14338 ac_int64 a = 20000001;
14339 ac_int64 b = 40000005;
14341 int does_int64_snprintf_work()
14346 if (sizeof(ac_int64) != 8)
14347 return 0; /* doesn't look like the right size */
14350 snprintf(buf, 100, INT64_FORMAT, c);
14351 if (strcmp(buf, "800000140000005") != 0)
14352 return 0; /* either multiply or snprintf is busted */
14358 return (! does_int64_snprintf_work());
14361 if ac_fn_c_try_run "$LINENO"; then :
14362 pgac_cv_snprintf_long_long_int_modifier=$pgac_modifier; break
14364 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14365 conftest.$ac_objext conftest.beam conftest.$ac_ext
14371 LONG_LONG_INT_MODIFIER=''
14373 case $pgac_cv_snprintf_long_long_int_modifier in
14374 cross) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot test (not on host machine)" >&5
14375 $as_echo "cannot test (not on host machine)" >&6; };;
14376 ?*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_long_long_int_modifier" >&5
14377 $as_echo "$pgac_cv_snprintf_long_long_int_modifier" >&6; }
14378 LONG_LONG_INT_MODIFIER=$pgac_cv_snprintf_long_long_int_modifier;;
14379 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14380 $as_echo "none" >&6; };;
14382 if test "$LONG_LONG_INT_MODIFIER" = ""; then
14383 # Force usage of our own snprintf, since system snprintf is broken
14384 pgac_need_repl_snprintf=yes
14385 LONG_LONG_INT_MODIFIER='ll'
14388 # Here if we previously decided we needed to use our own snprintf
14389 LONG_LONG_INT_MODIFIER='ll'
14392 # Here if we are not using 'long long int' at all
14393 LONG_LONG_INT_MODIFIER='l'
14396 INT64_MODIFIER="\"$LONG_LONG_INT_MODIFIER\""
14399 cat >>confdefs.h <<_ACEOF
14400 #define INT64_MODIFIER $INT64_MODIFIER
14404 # Also force use of our snprintf if the system's doesn't support the %z flag.
14405 if test "$pgac_need_repl_snprintf" = no; then
14406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports the %z modifier" >&5
14407 $as_echo_n "checking whether snprintf supports the %z modifier... " >&6; }
14408 if ${pgac_cv_snprintf_size_t_support+:} false; then :
14409 $as_echo_n "(cached) " >&6
14411 if test "$cross_compiling" = yes; then :
14412 pgac_cv_snprintf_size_t_support=cross
14414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14415 /* end confdefs.h. */
14417 #include <string.h>
14425 * Print the largest unsigned number fitting in a size_t using both %zu
14426 * and the previously-determined format for 64-bit integers. Note that
14427 * we don't run this code unless we know snprintf handles 64-bit ints.
14429 bufz[0] = '\0'; /* in case snprintf fails to emit anything */
14430 snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
14431 snprintf(buf64, sizeof(buf64), "%" INT64_MODIFIER "u",
14432 (unsigned PG_INT64_TYPE) ~((size_t) 0));
14433 if (strcmp(bufz, buf64) != 0)
14438 if ac_fn_c_try_run "$LINENO"; then :
14439 pgac_cv_snprintf_size_t_support=yes
14441 pgac_cv_snprintf_size_t_support=no
14443 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14444 conftest.$ac_objext conftest.beam conftest.$ac_ext
14449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_size_t_support" >&5
14450 $as_echo "$pgac_cv_snprintf_size_t_support" >&6; }
14452 if test "$pgac_cv_snprintf_size_t_support" != yes; then
14453 pgac_need_repl_snprintf=yes
14457 # Now we have checked all the reasons to replace snprintf
14458 if test $pgac_need_repl_snprintf = yes; then
14460 $as_echo "#define USE_REPL_SNPRINTF 1" >>confdefs.h
14462 case " $LIBOBJS " in
14463 *" snprintf.$ac_objext "* ) ;;
14464 *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
14470 # Check size of void *, size_t (enables tweaks for > 32bit address space)
14471 # The cast to long int works around a bug in the HP C Compiler
14472 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14473 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14474 # This bug is HP SR number 8606223364.
14475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
14476 $as_echo_n "checking size of void *... " >&6; }
14477 if ${ac_cv_sizeof_void_p+:} false; then :
14478 $as_echo_n "(cached) " >&6
14480 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
14483 if test "$ac_cv_type_void_p" = yes; then
14484 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14485 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14486 as_fn_error 77 "cannot compute sizeof (void *)
14487 See \`config.log' for more details" "$LINENO" 5; }
14489 ac_cv_sizeof_void_p=0
14494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
14495 $as_echo "$ac_cv_sizeof_void_p" >&6; }
14499 cat >>confdefs.h <<_ACEOF
14500 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
14504 # The cast to long int works around a bug in the HP C Compiler
14505 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14506 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14507 # This bug is HP SR number 8606223364.
14508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
14509 $as_echo_n "checking size of size_t... " >&6; }
14510 if ${ac_cv_sizeof_size_t+:} false; then :
14511 $as_echo_n "(cached) " >&6
14513 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
14516 if test "$ac_cv_type_size_t" = yes; then
14517 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14518 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14519 as_fn_error 77 "cannot compute sizeof (size_t)
14520 See \`config.log' for more details" "$LINENO" 5; }
14522 ac_cv_sizeof_size_t=0
14527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
14528 $as_echo "$ac_cv_sizeof_size_t" >&6; }
14532 cat >>confdefs.h <<_ACEOF
14533 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
14537 # The cast to long int works around a bug in the HP C Compiler
14538 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14539 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14540 # This bug is HP SR number 8606223364.
14541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
14542 $as_echo_n "checking size of long... " >&6; }
14543 if ${ac_cv_sizeof_long+:} false; then :
14544 $as_echo_n "(cached) " >&6
14546 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
14549 if test "$ac_cv_type_long" = yes; then
14550 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14551 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14552 as_fn_error 77 "cannot compute sizeof (long)
14553 See \`config.log' for more details" "$LINENO" 5; }
14555 ac_cv_sizeof_long=0
14560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
14561 $as_echo "$ac_cv_sizeof_long" >&6; }
14565 cat >>confdefs.h <<_ACEOF
14566 #define SIZEOF_LONG $ac_cv_sizeof_long
14571 # Decide whether float4 is passed by value: user-selectable, enabled by default
14572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
14573 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
14576 # Check whether --enable-float4-byval was given.
14577 if test "${enable_float4_byval+set}" = set; then :
14578 enableval=$enable_float4_byval;
14582 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
14584 float4passbyval=true
14587 float4passbyval=false
14590 as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
14595 enable_float4_byval=yes
14597 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
14599 float4passbyval=true
14603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
14604 $as_echo "$enable_float4_byval" >&6; }
14606 cat >>confdefs.h <<_ACEOF
14607 #define FLOAT4PASSBYVAL $float4passbyval
14611 # Decide whether float8 is passed by value.
14612 # Note: this setting also controls int8 and related types such as timestamp.
14613 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
14614 # If not, trying to select it is an error.
14615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
14616 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
14617 if test $ac_cv_sizeof_void_p -ge 8 ; then
14620 # Check whether --enable-float8-byval was given.
14621 if test "${enable_float8_byval+set}" = set; then :
14622 enableval=$enable_float8_byval;
14631 as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
14636 enable_float8_byval=yes
14644 # Check whether --enable-float8-byval was given.
14645 if test "${enable_float8_byval+set}" = set; then :
14646 enableval=$enable_float8_byval;
14655 as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
14660 enable_float8_byval=no
14665 if test "$enable_float8_byval" = yes ; then
14666 as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
14669 if test "$enable_float8_byval" = yes ; then
14671 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
14673 float8passbyval=true
14675 float8passbyval=false
14677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
14678 $as_echo "$enable_float8_byval" >&6; }
14680 cat >>confdefs.h <<_ACEOF
14681 #define FLOAT8PASSBYVAL $float8passbyval
14685 # Determine memory alignment requirements for the basic C data types.
14687 # The cast to long int works around a bug in the HP C Compiler,
14688 # see AC_CHECK_SIZEOF for more information.
14689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
14690 $as_echo_n "checking alignment of short... " >&6; }
14691 if ${ac_cv_alignof_short+:} false; then :
14692 $as_echo_n "(cached) " >&6
14694 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short" "$ac_includes_default
14696 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14698 typedef struct { char x; short y; } ac__type_alignof_;"; then :
14701 if test "$ac_cv_type_short" = yes; then
14702 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14703 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14704 as_fn_error 77 "cannot compute alignment of short
14705 See \`config.log' for more details" "$LINENO" 5; }
14707 ac_cv_alignof_short=0
14712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
14713 $as_echo "$ac_cv_alignof_short" >&6; }
14717 cat >>confdefs.h <<_ACEOF
14718 #define ALIGNOF_SHORT $ac_cv_alignof_short
14722 # The cast to long int works around a bug in the HP C Compiler,
14723 # see AC_CHECK_SIZEOF for more information.
14724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
14725 $as_echo_n "checking alignment of int... " >&6; }
14726 if ${ac_cv_alignof_int+:} false; then :
14727 $as_echo_n "(cached) " >&6
14729 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int" "$ac_includes_default
14731 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14733 typedef struct { char x; int y; } ac__type_alignof_;"; then :
14736 if test "$ac_cv_type_int" = yes; then
14737 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14738 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14739 as_fn_error 77 "cannot compute alignment of int
14740 See \`config.log' for more details" "$LINENO" 5; }
14742 ac_cv_alignof_int=0
14747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
14748 $as_echo "$ac_cv_alignof_int" >&6; }
14752 cat >>confdefs.h <<_ACEOF
14753 #define ALIGNOF_INT $ac_cv_alignof_int
14757 # The cast to long int works around a bug in the HP C Compiler,
14758 # see AC_CHECK_SIZEOF for more information.
14759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
14760 $as_echo_n "checking alignment of long... " >&6; }
14761 if ${ac_cv_alignof_long+:} false; then :
14762 $as_echo_n "(cached) " >&6
14764 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
14766 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14768 typedef struct { char x; long y; } ac__type_alignof_;"; then :
14771 if test "$ac_cv_type_long" = yes; then
14772 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14773 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14774 as_fn_error 77 "cannot compute alignment of long
14775 See \`config.log' for more details" "$LINENO" 5; }
14777 ac_cv_alignof_long=0
14782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
14783 $as_echo "$ac_cv_alignof_long" >&6; }
14787 cat >>confdefs.h <<_ACEOF
14788 #define ALIGNOF_LONG $ac_cv_alignof_long
14792 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
14793 # The cast to long int works around a bug in the HP C Compiler,
14794 # see AC_CHECK_SIZEOF for more information.
14795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
14796 $as_echo_n "checking alignment of long long int... " >&6; }
14797 if ${ac_cv_alignof_long_long_int+:} false; then :
14798 $as_echo_n "(cached) " >&6
14800 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int" "$ac_includes_default
14802 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14804 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
14807 if test "$ac_cv_type_long_long_int" = yes; then
14808 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14809 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14810 as_fn_error 77 "cannot compute alignment of long long int
14811 See \`config.log' for more details" "$LINENO" 5; }
14813 ac_cv_alignof_long_long_int=0
14818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
14819 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
14823 cat >>confdefs.h <<_ACEOF
14824 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
14829 # The cast to long int works around a bug in the HP C Compiler,
14830 # see AC_CHECK_SIZEOF for more information.
14831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
14832 $as_echo_n "checking alignment of double... " >&6; }
14833 if ${ac_cv_alignof_double+:} false; then :
14834 $as_echo_n "(cached) " >&6
14836 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double" "$ac_includes_default
14838 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14840 typedef struct { char x; double y; } ac__type_alignof_;"; then :
14843 if test "$ac_cv_type_double" = yes; then
14844 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14845 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14846 as_fn_error 77 "cannot compute alignment of double
14847 See \`config.log' for more details" "$LINENO" 5; }
14849 ac_cv_alignof_double=0
14854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
14855 $as_echo "$ac_cv_alignof_double" >&6; }
14859 cat >>confdefs.h <<_ACEOF
14860 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
14865 # Compute maximum alignment of any basic type.
14866 # We assume long's alignment is at least as strong as char, short, or int;
14867 # but we must check long long (if it exists) and double.
14869 MAX_ALIGNOF=$ac_cv_alignof_long
14870 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
14871 MAX_ALIGNOF=$ac_cv_alignof_double
14873 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
14874 MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
14877 cat >>confdefs.h <<_ACEOF
14878 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
14883 # Some platforms predefine the types int8, int16, etc. Only check
14884 # a (hopefully) representative subset.
14885 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
14887 if test "x$ac_cv_type_int8" = xyes; then :
14889 cat >>confdefs.h <<_ACEOF
14890 #define HAVE_INT8 1
14895 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
14897 if test "x$ac_cv_type_uint8" = xyes; then :
14899 cat >>confdefs.h <<_ACEOF
14900 #define HAVE_UINT8 1
14905 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
14907 if test "x$ac_cv_type_int64" = xyes; then :
14909 cat >>confdefs.h <<_ACEOF
14910 #define HAVE_INT64 1
14915 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
14917 if test "x$ac_cv_type_uint64" = xyes; then :
14919 cat >>confdefs.h <<_ACEOF
14920 #define HAVE_UINT64 1
14927 # Check for extensions offering the integer scalar type __int128.
14928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
14929 $as_echo_n "checking for __int128... " >&6; }
14930 if ${pgac_cv__128bit_int+:} false; then :
14931 $as_echo_n "(cached) " >&6
14933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14934 /* end confdefs.h. */
14937 * These are globals to discourage the compiler from folding all the
14938 * arithmetic tests down to compile-time constants. We do not have
14939 * convenient support for 64bit literals at this point...
14941 __int128 a = 48828125;
14942 __int128 b = 97656255;
14949 a = (a << 12) + 1; /* 200000000001 */
14950 b = (b << 12) + 5; /* 400000000005 */
14951 /* use the most relevant arithmetic ops */
14954 /* return different values, to prevent optimizations */
14963 if ac_fn_c_try_link "$LINENO"; then :
14964 pgac_cv__128bit_int=yes
14966 pgac_cv__128bit_int=no
14968 rm -f core conftest.err conftest.$ac_objext \
14969 conftest$ac_exeext conftest.$ac_ext
14971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
14972 $as_echo "$pgac_cv__128bit_int" >&6; }
14973 if test x"$pgac_cv__128bit_int" = xyes ; then
14975 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
14979 # Check for various atomic operations now that we have checked how to declare
14981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
14982 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
14983 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
14984 $as_echo_n "(cached) " >&6
14986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14987 /* end confdefs.h. */
14993 __sync_lock_test_and_set(&lock, 1);
14994 __sync_lock_release(&lock);
14999 if ac_fn_c_try_link "$LINENO"; then :
15000 pgac_cv_gcc_sync_char_tas="yes"
15002 pgac_cv_gcc_sync_char_tas="no"
15004 rm -f core conftest.err conftest.$ac_objext \
15005 conftest$ac_exeext conftest.$ac_ext
15007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
15008 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
15009 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
15011 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
15014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
15015 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
15016 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
15017 $as_echo_n "(cached) " >&6
15019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15020 /* end confdefs.h. */
15026 __sync_lock_test_and_set(&lock, 1);
15027 __sync_lock_release(&lock);
15032 if ac_fn_c_try_link "$LINENO"; then :
15033 pgac_cv_gcc_sync_int32_tas="yes"
15035 pgac_cv_gcc_sync_int32_tas="no"
15037 rm -f core conftest.err conftest.$ac_objext \
15038 conftest$ac_exeext conftest.$ac_ext
15040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
15041 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
15042 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
15044 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
15047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
15048 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
15049 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
15050 $as_echo_n "(cached) " >&6
15052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15053 /* end confdefs.h. */
15059 __sync_val_compare_and_swap(&val, 0, 37);
15064 if ac_fn_c_try_link "$LINENO"; then :
15065 pgac_cv_gcc_sync_int32_cas="yes"
15067 pgac_cv_gcc_sync_int32_cas="no"
15069 rm -f core conftest.err conftest.$ac_objext \
15070 conftest$ac_exeext conftest.$ac_ext
15072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
15073 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
15074 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
15076 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
15079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
15080 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
15081 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
15082 $as_echo_n "(cached) " >&6
15084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15085 /* end confdefs.h. */
15090 PG_INT64_TYPE lock = 0;
15091 __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
15096 if ac_fn_c_try_link "$LINENO"; then :
15097 pgac_cv_gcc_sync_int64_cas="yes"
15099 pgac_cv_gcc_sync_int64_cas="no"
15101 rm -f core conftest.err conftest.$ac_objext \
15102 conftest$ac_exeext conftest.$ac_ext
15104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
15105 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
15106 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
15108 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
15111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
15112 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
15113 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
15114 $as_echo_n "(cached) " >&6
15116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15117 /* end confdefs.h. */
15124 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
15129 if ac_fn_c_try_link "$LINENO"; then :
15130 pgac_cv_gcc_atomic_int32_cas="yes"
15132 pgac_cv_gcc_atomic_int32_cas="no"
15134 rm -f core conftest.err conftest.$ac_objext \
15135 conftest$ac_exeext conftest.$ac_ext
15137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
15138 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
15139 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
15141 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
15144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
15145 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
15146 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
15147 $as_echo_n "(cached) " >&6
15149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15150 /* end confdefs.h. */
15155 PG_INT64_TYPE val = 0;
15156 PG_INT64_TYPE expect = 0;
15157 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
15162 if ac_fn_c_try_link "$LINENO"; then :
15163 pgac_cv_gcc_atomic_int64_cas="yes"
15165 pgac_cv_gcc_atomic_int64_cas="no"
15167 rm -f core conftest.err conftest.$ac_objext \
15168 conftest$ac_exeext conftest.$ac_ext
15170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
15171 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
15172 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
15174 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
15179 # Check for x86 cpuid instruction
15180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
15181 $as_echo_n "checking for __get_cpuid... " >&6; }
15182 if ${pgac_cv__get_cpuid+:} false; then :
15183 $as_echo_n "(cached) " >&6
15185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15186 /* end confdefs.h. */
15191 unsigned int exx[4] = {0, 0, 0, 0};
15192 __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
15198 if ac_fn_c_try_link "$LINENO"; then :
15199 pgac_cv__get_cpuid="yes"
15201 pgac_cv__get_cpuid="no"
15203 rm -f core conftest.err conftest.$ac_objext \
15204 conftest$ac_exeext conftest.$ac_ext
15206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
15207 $as_echo "$pgac_cv__get_cpuid" >&6; }
15208 if test x"$pgac_cv__get_cpuid" = x"yes"; then
15210 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
15214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
15215 $as_echo_n "checking for __cpuid... " >&6; }
15216 if ${pgac_cv__cpuid+:} false; then :
15217 $as_echo_n "(cached) " >&6
15219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15220 /* end confdefs.h. */
15221 #include <intrin.h>
15225 unsigned int exx[4] = {0, 0, 0, 0};
15226 __get_cpuid(exx[0], 1);
15232 if ac_fn_c_try_link "$LINENO"; then :
15233 pgac_cv__cpuid="yes"
15235 pgac_cv__cpuid="no"
15237 rm -f core conftest.err conftest.$ac_objext \
15238 conftest$ac_exeext conftest.$ac_ext
15240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
15241 $as_echo "$pgac_cv__cpuid" >&6; }
15242 if test x"$pgac_cv__cpuid" = x"yes"; then
15244 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
15248 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
15250 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
15251 # with the default compiler flags. If not, check if adding the -msse4.2
15252 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
15253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
15254 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
15255 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
15256 $as_echo_n "(cached) " >&6
15258 pgac_save_CFLAGS=$CFLAGS
15259 CFLAGS="$pgac_save_CFLAGS "
15260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15261 /* end confdefs.h. */
15262 #include <nmmintrin.h>
15266 unsigned int crc = 0;
15267 crc = _mm_crc32_u8(crc, 0);
15268 crc = _mm_crc32_u32(crc, 0);
15269 /* return computed value, to prevent the above being optimized away */
15275 if ac_fn_c_try_link "$LINENO"; then :
15276 pgac_cv_sse42_crc32_intrinsics_=yes
15278 pgac_cv_sse42_crc32_intrinsics_=no
15280 rm -f core conftest.err conftest.$ac_objext \
15281 conftest$ac_exeext conftest.$ac_ext
15282 CFLAGS="$pgac_save_CFLAGS"
15284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
15285 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
15286 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
15288 pgac_sse42_crc32_intrinsics=yes
15291 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
15292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
15293 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
15294 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
15295 $as_echo_n "(cached) " >&6
15297 pgac_save_CFLAGS=$CFLAGS
15298 CFLAGS="$pgac_save_CFLAGS -msse4.2"
15299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15300 /* end confdefs.h. */
15301 #include <nmmintrin.h>
15305 unsigned int crc = 0;
15306 crc = _mm_crc32_u8(crc, 0);
15307 crc = _mm_crc32_u32(crc, 0);
15308 /* return computed value, to prevent the above being optimized away */
15314 if ac_fn_c_try_link "$LINENO"; then :
15315 pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
15317 pgac_cv_sse42_crc32_intrinsics__msse4_2=no
15319 rm -f core conftest.err conftest.$ac_objext \
15320 conftest$ac_exeext conftest.$ac_ext
15321 CFLAGS="$pgac_save_CFLAGS"
15323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
15324 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
15325 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
15326 CFLAGS_SSE42="-msse4.2"
15327 pgac_sse42_crc32_intrinsics=yes
15333 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
15334 # define __SSE4_2__ in that case.
15335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15336 /* end confdefs.h. */
15343 #error __SSE4_2__ not defined
15350 if ac_fn_c_try_compile "$LINENO"; then :
15353 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15355 # Select CRC-32C implementation.
15357 # If we are targeting a processor that has SSE 4.2 instructions, we can use the
15358 # special CRC instructions for calculating CRC-32C. If we're not targeting such
15359 # a processor, but we can nevertheless produce code that uses the SSE
15360 # intrinsics, perhaps with some extra CFLAGS, compile both implementations and
15361 # select which one to use at runtime, depending on whether SSE 4.2 is supported
15362 # by the processor we're running on.
15364 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
15365 # in the template or configure command line.
15366 if test x"$USE_SSE42_CRC32C" = x"" && test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"" && test x"$USE_SLICING_BY_8_CRC32C" = x""; then
15367 if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
15370 # the CPUID instruction is needed for the runtime check.
15371 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
15372 USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
15374 # fall back to slicing-by-8 algorithm which doesn't require any special
15376 USE_SLICING_BY_8_CRC32C=1
15381 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
15382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
15383 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
15384 if test x"$USE_SSE42_CRC32C" = x"1"; then
15386 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
15388 PG_CRC32C_OBJS="pg_crc32c_sse42.o"
15389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
15390 $as_echo "SSE 4.2" >&6; }
15392 if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
15394 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
15396 PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_choose.o"
15397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
15398 $as_echo "SSE 4.2 with runtime check" >&6; }
15401 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
15403 PG_CRC32C_OBJS="pg_crc32c_sb8.o"
15404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
15405 $as_echo "slicing-by-8" >&6; }
15411 # Select semaphore implementation type.
15412 if test "$PORTNAME" != "win32"; then
15413 if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
15414 # Need sem_open for this
15415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
15416 $as_echo_n "checking for library containing sem_open... " >&6; }
15417 if ${ac_cv_search_sem_open+:} false; then :
15418 $as_echo_n "(cached) " >&6
15420 ac_func_search_save_LIBS=$LIBS
15421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15422 /* end confdefs.h. */
15424 /* Override any GCC internal prototype to avoid an error.
15425 Use char because int might match the return type of a GCC
15426 builtin and then its argument prototype would still apply. */
15434 return sem_open ();
15439 for ac_lib in '' rt pthread; do
15440 if test -z "$ac_lib"; then
15441 ac_res="none required"
15444 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15446 if ac_fn_c_try_link "$LINENO"; then :
15447 ac_cv_search_sem_open=$ac_res
15449 rm -f core conftest.err conftest.$ac_objext \
15451 if ${ac_cv_search_sem_open+:} false; then :
15455 if ${ac_cv_search_sem_open+:} false; then :
15458 ac_cv_search_sem_open=no
15460 rm conftest.$ac_ext
15461 LIBS=$ac_func_search_save_LIBS
15463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
15464 $as_echo "$ac_cv_search_sem_open" >&6; }
15465 ac_res=$ac_cv_search_sem_open
15466 if test "$ac_res" != no; then :
15467 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15468 USE_NAMED_POSIX_SEMAPHORES=1
15472 if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
15473 # Need sem_init for this
15474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
15475 $as_echo_n "checking for library containing sem_init... " >&6; }
15476 if ${ac_cv_search_sem_init+:} false; then :
15477 $as_echo_n "(cached) " >&6
15479 ac_func_search_save_LIBS=$LIBS
15480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15481 /* end confdefs.h. */
15483 /* Override any GCC internal prototype to avoid an error.
15484 Use char because int might match the return type of a GCC
15485 builtin and then its argument prototype would still apply. */
15493 return sem_init ();
15498 for ac_lib in '' rt pthread; do
15499 if test -z "$ac_lib"; then
15500 ac_res="none required"
15503 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15505 if ac_fn_c_try_link "$LINENO"; then :
15506 ac_cv_search_sem_init=$ac_res
15508 rm -f core conftest.err conftest.$ac_objext \
15510 if ${ac_cv_search_sem_init+:} false; then :
15514 if ${ac_cv_search_sem_init+:} false; then :
15517 ac_cv_search_sem_init=no
15519 rm conftest.$ac_ext
15520 LIBS=$ac_func_search_save_LIBS
15522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
15523 $as_echo "$ac_cv_search_sem_init" >&6; }
15524 ac_res=$ac_cv_search_sem_init
15525 if test "$ac_res" != no; then :
15526 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15527 USE_UNNAMED_POSIX_SEMAPHORES=1
15531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
15532 $as_echo_n "checking which semaphore API to use... " >&6; }
15533 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
15535 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
15537 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
15538 sematype="named POSIX"
15540 if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
15542 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
15544 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
15545 sematype="unnamed POSIX"
15548 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
15550 SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
15551 sematype="System V"
15554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
15555 $as_echo "$sematype" >&6; }
15558 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
15560 SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
15564 # Select shared-memory implementation type.
15565 if test "$PORTNAME" != "win32"; then
15567 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
15569 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
15572 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
15574 SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
15577 # Select random number source
15579 # You can override this logic by setting the appropriate USE_*RANDOM flag to 1
15580 # in the template or configure command line.
15582 # If not selected manually, try to select a source automatically.
15583 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
15584 if test x"$with_openssl" = x"yes" ; then
15585 USE_OPENSSL_RANDOM=1
15586 elif test "$PORTNAME" = "win32" ; then
15589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
15590 $as_echo_n "checking for /dev/urandom... " >&6; }
15591 if ${ac_cv_file__dev_urandom+:} false; then :
15592 $as_echo_n "(cached) " >&6
15594 test "$cross_compiling" = yes &&
15595 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15596 if test -r "/dev/urandom"; then
15597 ac_cv_file__dev_urandom=yes
15599 ac_cv_file__dev_urandom=no
15602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
15603 $as_echo "$ac_cv_file__dev_urandom" >&6; }
15604 if test "x$ac_cv_file__dev_urandom" = xyes; then :
15609 if test x"$ac_cv_file__dev_urandom" = x"yes" ; then
15615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
15616 $as_echo_n "checking which random number source to use... " >&6; }
15617 if test "$enable_strong_random" = yes ; then
15618 if test x"$USE_OPENSSL_RANDOM" = x"1" ; then
15620 $as_echo "#define USE_OPENSSL_RANDOM 1" >>confdefs.h
15622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
15623 $as_echo "OpenSSL" >&6; }
15624 elif test x"$USE_WIN32_RANDOM" = x"1" ; then
15626 $as_echo "#define USE_WIN32_RANDOM 1" >>confdefs.h
15628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
15629 $as_echo "Windows native" >&6; }
15630 elif test x"$USE_DEV_URANDOM" = x"1" ; then
15632 $as_echo "#define USE_DEV_URANDOM 1" >>confdefs.h
15634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
15635 $as_echo "/dev/urandom" >&6; }
15638 no source of strong random numbers was found
15639 PostgreSQL can use OpenSSL or /dev/urandom as a source of random numbers,
15640 for authentication protocols. You can use --disable-strong-random to use a
15641 built-in pseudo random number generator, but that may be insecure." "$LINENO" 5
15644 $as_echo "#define HAVE_STRONG_RANDOM 1" >>confdefs.h
15647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: weak builtin PRNG" >&5
15648 $as_echo "weak builtin PRNG" >&6; }
15649 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
15650 *** Not using a strong random number source may be insecure." >&5
15651 $as_echo "$as_me: WARNING:
15652 *** Not using a strong random number source may be insecure." >&2;}
15655 # If not set in template file, set bytes to use libc memset()
15656 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
15657 MEMSET_LOOP_LIMIT=1024
15660 cat >>confdefs.h <<_ACEOF
15661 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
15666 if test "$enable_nls" = yes ; then
15668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
15669 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
15670 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
15671 $as_echo_n "(cached) " >&6
15673 ac_func_search_save_LIBS=$LIBS
15674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15675 /* end confdefs.h. */
15677 /* Override any GCC internal prototype to avoid an error.
15678 Use char because int might match the return type of a GCC
15679 builtin and then its argument prototype would still apply. */
15683 char bind_textdomain_codeset ();
15687 return bind_textdomain_codeset ();
15692 for ac_lib in '' intl; do
15693 if test -z "$ac_lib"; then
15694 ac_res="none required"
15697 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15699 if ac_fn_c_try_link "$LINENO"; then :
15700 ac_cv_search_bind_textdomain_codeset=$ac_res
15702 rm -f core conftest.err conftest.$ac_objext \
15704 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
15708 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
15711 ac_cv_search_bind_textdomain_codeset=no
15713 rm conftest.$ac_ext
15714 LIBS=$ac_func_search_save_LIBS
15716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
15717 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
15718 ac_res=$ac_cv_search_bind_textdomain_codeset
15719 if test "$ac_res" != no; then :
15720 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15723 as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
15726 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
15727 if test "x$ac_cv_header_libintl_h" = xyes; then :
15730 as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
15734 if test -z "$MSGFMT"; then
15735 for ac_prog in msgfmt
15737 # Extract the first word of "$ac_prog", so it can be a program name with args.
15738 set dummy $ac_prog; ac_word=$2
15739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15740 $as_echo_n "checking for $ac_word... " >&6; }
15741 if ${ac_cv_path_MSGFMT+:} false; then :
15742 $as_echo_n "(cached) " >&6
15746 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
15749 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15750 for as_dir in $PATH
15753 test -z "$as_dir" && as_dir=.
15754 for ac_exec_ext in '' $ac_executable_extensions; do
15755 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15756 ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
15757 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15767 MSGFMT=$ac_cv_path_MSGFMT
15768 if test -n "$MSGFMT"; then
15769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
15770 $as_echo "$MSGFMT" >&6; }
15772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15773 $as_echo "no" >&6; }
15777 test -n "$MSGFMT" && break
15781 # Report the value of MSGFMT in configure's output in all cases.
15782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
15783 $as_echo_n "checking for MSGFMT... " >&6; }
15784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
15785 $as_echo "$MSGFMT" >&6; }
15788 if test -z "$MSGFMT"; then
15789 as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
15791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
15792 $as_echo_n "checking for msgfmt flags... " >&6; }
15793 if ${pgac_cv_msgfmt_flags+:} false; then :
15794 $as_echo_n "(cached) " >&6
15796 if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
15797 pgac_cv_msgfmt_flags=-c
15800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
15801 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
15802 MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
15804 if test -z "$MSGMERGE"; then
15805 for ac_prog in msgmerge
15807 # Extract the first word of "$ac_prog", so it can be a program name with args.
15808 set dummy $ac_prog; ac_word=$2
15809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15810 $as_echo_n "checking for $ac_word... " >&6; }
15811 if ${ac_cv_path_MSGMERGE+:} false; then :
15812 $as_echo_n "(cached) " >&6
15816 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
15819 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15820 for as_dir in $PATH
15823 test -z "$as_dir" && as_dir=.
15824 for ac_exec_ext in '' $ac_executable_extensions; do
15825 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15826 ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
15827 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15837 MSGMERGE=$ac_cv_path_MSGMERGE
15838 if test -n "$MSGMERGE"; then
15839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
15840 $as_echo "$MSGMERGE" >&6; }
15842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15843 $as_echo "no" >&6; }
15847 test -n "$MSGMERGE" && break
15851 # Report the value of MSGMERGE in configure's output in all cases.
15852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
15853 $as_echo_n "checking for MSGMERGE... " >&6; }
15854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
15855 $as_echo "$MSGMERGE" >&6; }
15858 if test -z "$XGETTEXT"; then
15859 for ac_prog in xgettext
15861 # Extract the first word of "$ac_prog", so it can be a program name with args.
15862 set dummy $ac_prog; ac_word=$2
15863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15864 $as_echo_n "checking for $ac_word... " >&6; }
15865 if ${ac_cv_path_XGETTEXT+:} false; then :
15866 $as_echo_n "(cached) " >&6
15870 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
15873 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15874 for as_dir in $PATH
15877 test -z "$as_dir" && as_dir=.
15878 for ac_exec_ext in '' $ac_executable_extensions; do
15879 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15880 ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
15881 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15891 XGETTEXT=$ac_cv_path_XGETTEXT
15892 if test -n "$XGETTEXT"; then
15893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
15894 $as_echo "$XGETTEXT" >&6; }
15896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15897 $as_echo "no" >&6; }
15901 test -n "$XGETTEXT" && break
15905 # Report the value of XGETTEXT in configure's output in all cases.
15906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
15907 $as_echo_n "checking for XGETTEXT... " >&6; }
15908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
15909 $as_echo "$XGETTEXT" >&6; }
15915 # Check for Tcl configuration script tclConfig.sh
15916 if test "$with_tcl" = yes; then
15917 if test -z "$TCLSH"; then
15918 for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
15920 # Extract the first word of "$ac_prog", so it can be a program name with args.
15921 set dummy $ac_prog; ac_word=$2
15922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15923 $as_echo_n "checking for $ac_word... " >&6; }
15924 if ${ac_cv_path_TCLSH+:} false; then :
15925 $as_echo_n "(cached) " >&6
15929 ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
15932 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15933 for as_dir in $PATH
15936 test -z "$as_dir" && as_dir=.
15937 for ac_exec_ext in '' $ac_executable_extensions; do
15938 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15939 ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
15940 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15950 TCLSH=$ac_cv_path_TCLSH
15951 if test -n "$TCLSH"; then
15952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
15953 $as_echo "$TCLSH" >&6; }
15955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15956 $as_echo "no" >&6; }
15960 test -n "$TCLSH" && break
15964 # Report the value of TCLSH in configure's output in all cases.
15965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
15966 $as_echo_n "checking for TCLSH... " >&6; }
15967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
15968 $as_echo "$TCLSH" >&6; }
15971 if test x"$TCLSH" = x""; then
15972 as_fn_error $? "Tcl shell not found" "$LINENO" 5
15975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
15976 $as_echo_n "checking for tclConfig.sh... " >&6; }
15977 # Let user override test
15978 if test -z "$TCL_CONFIG_SH"; then
15979 pgac_test_dirs="$with_tclconfig"
15981 set X $pgac_test_dirs; shift
15982 if test $# -eq 0; then
15983 test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
15984 set X `echo 'puts $auto_path' | $TCLSH`; shift
15988 if test -r "$pgac_dir/tclConfig.sh"; then
15989 TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
15995 if test -z "$TCL_CONFIG_SH"; then
15996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15997 $as_echo "no" >&6; }
15998 as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
16000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
16001 $as_echo "$TCL_CONFIG_SH" >&6; }
16007 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
16008 eval TCL_LIBS=\"$TCL_LIBS\"
16009 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
16010 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
16012 if test "$TCL_SHARED_BUILD" != 1; then
16013 as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
16014 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
16016 # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
16017 ac_save_CPPFLAGS=$CPPFLAGS
16018 CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
16019 ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
16020 if test "x$ac_cv_header_tcl_h" = xyes; then :
16023 as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
16027 CPPFLAGS=$ac_save_CPPFLAGS
16030 # check for <perl.h>
16031 if test "$with_perl" = yes; then
16032 ac_save_CPPFLAGS=$CPPFLAGS
16033 CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
16034 ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
16036 if test "x$ac_cv_header_perl_h" = xyes; then :
16039 as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
16043 # While we're at it, check that we can link to libperl.
16044 # On most platforms, if perl.h is there then libperl.so will be too, but at
16045 # this writing Debian packages them separately. There is no known reason to
16046 # waste cycles on separate probes for the Tcl or Python libraries, though.
16047 pgac_save_LIBS=$LIBS
16048 LIBS="$perl_embed_ldflags"
16049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
16050 $as_echo_n "checking for libperl... " >&6; }
16051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16052 /* end confdefs.h. */
16054 #include <EXTERN.h>
16065 if ac_fn_c_try_link "$LINENO"; then :
16066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16067 $as_echo "yes" >&6; }
16069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16070 $as_echo "no" >&6; }
16071 as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
16073 rm -f core conftest.err conftest.$ac_objext \
16074 conftest$ac_exeext conftest.$ac_ext
16075 LIBS=$pgac_save_LIBS
16076 CPPFLAGS=$ac_save_CPPFLAGS
16079 # check for <Python.h>
16080 if test "$with_python" = yes; then
16081 ac_save_CPPFLAGS=$CPPFLAGS
16082 CPPFLAGS="$python_includespec $CPPFLAGS"
16083 ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
16084 if test "x$ac_cv_header_Python_h" = xyes; then :
16087 as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
16091 CPPFLAGS=$ac_save_CPPFLAGS
16095 # Check for DocBook and tools
16097 if test -z "$NSGMLS"; then
16098 for ac_prog in onsgmls nsgmls
16100 # Extract the first word of "$ac_prog", so it can be a program name with args.
16101 set dummy $ac_prog; ac_word=$2
16102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16103 $as_echo_n "checking for $ac_word... " >&6; }
16104 if ${ac_cv_path_NSGMLS+:} false; then :
16105 $as_echo_n "(cached) " >&6
16109 ac_cv_path_NSGMLS="$NSGMLS" # Let the user override the test with a path.
16112 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16113 for as_dir in $PATH
16116 test -z "$as_dir" && as_dir=.
16117 for ac_exec_ext in '' $ac_executable_extensions; do
16118 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16119 ac_cv_path_NSGMLS="$as_dir/$ac_word$ac_exec_ext"
16120 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16130 NSGMLS=$ac_cv_path_NSGMLS
16131 if test -n "$NSGMLS"; then
16132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSGMLS" >&5
16133 $as_echo "$NSGMLS" >&6; }
16135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16136 $as_echo "no" >&6; }
16140 test -n "$NSGMLS" && break
16144 # Report the value of NSGMLS in configure's output in all cases.
16145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NSGMLS" >&5
16146 $as_echo_n "checking for NSGMLS... " >&6; }
16147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSGMLS" >&5
16148 $as_echo "$NSGMLS" >&6; }
16152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook V4.2" >&5
16153 $as_echo_n "checking for DocBook V4.2... " >&6; }
16154 if ${pgac_cv_check_docbook+:} false; then :
16155 $as_echo_n "(cached) " >&6
16157 cat >conftest.sgml <<EOF
16158 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
16160 <title>test</title>
16162 <title>random</title>
16164 <title>testsect</title>
16171 pgac_cv_check_docbook=no
16173 if test -n "$NSGMLS"; then
16174 $NSGMLS -s conftest.sgml 1>&5 2>&1
16175 if test $? -eq 0; then
16176 pgac_cv_check_docbook=yes
16179 rm -f conftest.sgml
16181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
16182 $as_echo "$pgac_cv_check_docbook" >&6; }
16184 have_docbook=$pgac_cv_check_docbook
16187 if test -z "$DBTOEPUB"; then
16188 for ac_prog in dbtoepub
16190 # Extract the first word of "$ac_prog", so it can be a program name with args.
16191 set dummy $ac_prog; ac_word=$2
16192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16193 $as_echo_n "checking for $ac_word... " >&6; }
16194 if ${ac_cv_path_DBTOEPUB+:} false; then :
16195 $as_echo_n "(cached) " >&6
16199 ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
16202 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16203 for as_dir in $PATH
16206 test -z "$as_dir" && as_dir=.
16207 for ac_exec_ext in '' $ac_executable_extensions; do
16208 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16209 ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
16210 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16220 DBTOEPUB=$ac_cv_path_DBTOEPUB
16221 if test -n "$DBTOEPUB"; then
16222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
16223 $as_echo "$DBTOEPUB" >&6; }
16225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16226 $as_echo "no" >&6; }
16230 test -n "$DBTOEPUB" && break
16234 # Report the value of DBTOEPUB in configure's output in all cases.
16235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
16236 $as_echo_n "checking for DBTOEPUB... " >&6; }
16237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
16238 $as_echo "$DBTOEPUB" >&6; }
16241 if test -z "$XMLLINT"; then
16242 for ac_prog in xmllint
16244 # Extract the first word of "$ac_prog", so it can be a program name with args.
16245 set dummy $ac_prog; ac_word=$2
16246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16247 $as_echo_n "checking for $ac_word... " >&6; }
16248 if ${ac_cv_path_XMLLINT+:} false; then :
16249 $as_echo_n "(cached) " >&6
16253 ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
16256 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16257 for as_dir in $PATH
16260 test -z "$as_dir" && as_dir=.
16261 for ac_exec_ext in '' $ac_executable_extensions; do
16262 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16263 ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
16264 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16274 XMLLINT=$ac_cv_path_XMLLINT
16275 if test -n "$XMLLINT"; then
16276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
16277 $as_echo "$XMLLINT" >&6; }
16279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16280 $as_echo "no" >&6; }
16284 test -n "$XMLLINT" && break
16288 # Report the value of XMLLINT in configure's output in all cases.
16289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
16290 $as_echo_n "checking for XMLLINT... " >&6; }
16291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
16292 $as_echo "$XMLLINT" >&6; }
16295 if test -z "$XSLTPROC"; then
16296 for ac_prog in xsltproc
16298 # Extract the first word of "$ac_prog", so it can be a program name with args.
16299 set dummy $ac_prog; ac_word=$2
16300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16301 $as_echo_n "checking for $ac_word... " >&6; }
16302 if ${ac_cv_path_XSLTPROC+:} false; then :
16303 $as_echo_n "(cached) " >&6
16307 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
16310 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16311 for as_dir in $PATH
16314 test -z "$as_dir" && as_dir=.
16315 for ac_exec_ext in '' $ac_executable_extensions; do
16316 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16317 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
16318 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16328 XSLTPROC=$ac_cv_path_XSLTPROC
16329 if test -n "$XSLTPROC"; then
16330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
16331 $as_echo "$XSLTPROC" >&6; }
16333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16334 $as_echo "no" >&6; }
16338 test -n "$XSLTPROC" && break
16342 # Report the value of XSLTPROC in configure's output in all cases.
16343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
16344 $as_echo_n "checking for XSLTPROC... " >&6; }
16345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
16346 $as_echo "$XSLTPROC" >&6; }
16349 if test -z "$OSX"; then
16350 for ac_prog in osx sgml2xml sx
16352 # Extract the first word of "$ac_prog", so it can be a program name with args.
16353 set dummy $ac_prog; ac_word=$2
16354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16355 $as_echo_n "checking for $ac_word... " >&6; }
16356 if ${ac_cv_path_OSX+:} false; then :
16357 $as_echo_n "(cached) " >&6
16361 ac_cv_path_OSX="$OSX" # Let the user override the test with a path.
16364 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16365 for as_dir in $PATH
16368 test -z "$as_dir" && as_dir=.
16369 for ac_exec_ext in '' $ac_executable_extensions; do
16370 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16371 ac_cv_path_OSX="$as_dir/$ac_word$ac_exec_ext"
16372 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16382 OSX=$ac_cv_path_OSX
16383 if test -n "$OSX"; then
16384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OSX" >&5
16385 $as_echo "$OSX" >&6; }
16387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16388 $as_echo "no" >&6; }
16392 test -n "$OSX" && break
16396 # Report the value of OSX in configure's output in all cases.
16397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX" >&5
16398 $as_echo_n "checking for OSX... " >&6; }
16399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OSX" >&5
16400 $as_echo "$OSX" >&6; }
16403 if test -z "$FOP"; then
16406 # Extract the first word of "$ac_prog", so it can be a program name with args.
16407 set dummy $ac_prog; ac_word=$2
16408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16409 $as_echo_n "checking for $ac_word... " >&6; }
16410 if ${ac_cv_path_FOP+:} false; then :
16411 $as_echo_n "(cached) " >&6
16415 ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
16418 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16419 for as_dir in $PATH
16422 test -z "$as_dir" && as_dir=.
16423 for ac_exec_ext in '' $ac_executable_extensions; do
16424 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16425 ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
16426 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16436 FOP=$ac_cv_path_FOP
16437 if test -n "$FOP"; then
16438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
16439 $as_echo "$FOP" >&6; }
16441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16442 $as_echo "no" >&6; }
16446 test -n "$FOP" && break
16450 # Report the value of FOP in configure's output in all cases.
16451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
16452 $as_echo_n "checking for FOP... " >&6; }
16453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
16454 $as_echo "$FOP" >&6; }
16459 # Check for test tools
16461 if test "$enable_tap_tests" = yes; then
16462 # Check for necessary modules, unless user has specified the "prove" to use;
16463 # in that case it's her responsibility to have a working configuration.
16464 # (prove might be part of a different Perl installation than perl, eg on
16465 # MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)
16466 if test -z "$PROVE"; then
16473 # Make sure we have perl
16474 if test -z "$PERL"; then
16475 # Extract the first word of "perl", so it can be a program name with args.
16476 set dummy perl; ac_word=$2
16477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16478 $as_echo_n "checking for $ac_word... " >&6; }
16479 if ${ac_cv_prog_PERL+:} false; then :
16480 $as_echo_n "(cached) " >&6
16482 if test -n "$PERL"; then
16483 ac_cv_prog_PERL="$PERL" # Let the user override the test.
16485 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16486 for as_dir in $PATH
16489 test -z "$as_dir" && as_dir=.
16490 for ac_exec_ext in '' $ac_executable_extensions; do
16491 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16492 ac_cv_prog_PERL="perl"
16493 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16502 PERL=$ac_cv_prog_PERL
16503 if test -n "$PERL"; then
16504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
16505 $as_echo "$PERL" >&6; }
16507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16508 $as_echo "no" >&6; }
16514 if test "x$PERL" != x; then
16515 ax_perl_modules_failed=0
16516 for ax_perl_module in 'IPC::Run' ; do
16517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl module $ax_perl_module" >&5
16518 $as_echo_n "checking for perl module $ax_perl_module... " >&6; }
16520 # Would be nice to log result here, but can't rely on autoconf internals
16521 $PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1
16522 if test $? -ne 0; then
16523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16524 $as_echo "no" >&6; };
16525 ax_perl_modules_failed=1
16527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16528 $as_echo "ok" >&6; };
16532 # Run optional shell commands
16533 if test "$ax_perl_modules_failed" = 0; then
16538 as_fn_error $? "Perl module IPC::Run is required to run TAP tests" "$LINENO" 5
16541 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5
16542 $as_echo "$as_me: WARNING: could not find perl" >&2;}
16545 # Now make sure we know where prove is
16546 if test -z "$PROVE"; then
16547 for ac_prog in prove
16549 # Extract the first word of "$ac_prog", so it can be a program name with args.
16550 set dummy $ac_prog; ac_word=$2
16551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16552 $as_echo_n "checking for $ac_word... " >&6; }
16553 if ${ac_cv_path_PROVE+:} false; then :
16554 $as_echo_n "(cached) " >&6
16558 ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
16561 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16562 for as_dir in $PATH
16565 test -z "$as_dir" && as_dir=.
16566 for ac_exec_ext in '' $ac_executable_extensions; do
16567 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16568 ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
16569 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16579 PROVE=$ac_cv_path_PROVE
16580 if test -n "$PROVE"; then
16581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
16582 $as_echo "$PROVE" >&6; }
16584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16585 $as_echo "no" >&6; }
16589 test -n "$PROVE" && break
16593 # Report the value of PROVE in configure's output in all cases.
16594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
16595 $as_echo_n "checking for PROVE... " >&6; }
16596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
16597 $as_echo "$PROVE" >&6; }
16600 if test -z "$PROVE"; then
16601 as_fn_error $? "prove not found" "$LINENO" 5
16607 # We have to run the thread test near the end so we have all our symbols
16608 # defined. Cross compiling throws a warning.
16610 if test "$enable_thread_safety" = yes; then
16611 if test "$PORTNAME" != "win32"
16613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
16614 $as_echo_n "checking thread safety of required library functions... " >&6; }
16618 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
16619 LIBS="$LIBS $PTHREAD_LIBS"
16620 if test "$cross_compiling" = yes; then :
16621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
16622 $as_echo "maybe" >&6; }
16623 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
16624 *** Skipping thread test program because of cross-compile build.
16625 *** Run the program in src/test/thread on the target machine.
16627 $as_echo "$as_me: WARNING:
16628 *** Skipping thread test program because of cross-compile build.
16629 *** Run the program in src/test/thread on the target machine.
16632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16633 /* end confdefs.h. */
16634 #include "$srcdir/src/test/thread/thread_test.c"
16636 if ac_fn_c_try_run "$LINENO"; then :
16637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16638 $as_echo "yes" >&6; }
16640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16641 $as_echo "no" >&6; }
16642 as_fn_error $? "thread test program failed
16643 This platform is not thread-safe. Check the file 'config.log' or compile
16644 and run src/test/thread/thread_test for the exact reason.
16645 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
16647 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16648 conftest.$ac_objext conftest.beam conftest.$ac_ext
16654 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
16655 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
16659 # If compiler will take -Wl,--as-needed (or various platform-specific
16660 # spellings thereof) then add that to LDFLAGS. This is much easier than
16661 # trying to filter LIBS to the minimum for each executable.
16662 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
16663 # libreadline; therefore we postpone testing it until we know what library
16664 # dependencies readline has. The test code will try to link with $LIBS.
16665 if test "$with_readline" = yes; then
16666 link_test_func=readline
16668 link_test_func=exit
16671 if test "$PORTNAME" = "darwin"; then
16672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
16673 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
16674 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
16675 $as_echo_n "(cached) " >&6
16677 pgac_save_LDFLAGS=$LDFLAGS
16678 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
16679 if test "$cross_compiling" = yes; then :
16680 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
16682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16683 /* end confdefs.h. */
16684 extern void $link_test_func (); void (*fptr) () = $link_test_func;
16693 if ac_fn_c_try_run "$LINENO"; then :
16694 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
16696 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
16698 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16699 conftest.$ac_objext conftest.beam conftest.$ac_ext
16702 LDFLAGS="$pgac_save_LDFLAGS"
16704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
16705 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
16706 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
16707 LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
16710 elif test "$PORTNAME" = "openbsd"; then
16711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
16712 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
16713 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
16714 $as_echo_n "(cached) " >&6
16716 pgac_save_LDFLAGS=$LDFLAGS
16717 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
16718 if test "$cross_compiling" = yes; then :
16719 pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
16721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16722 /* end confdefs.h. */
16723 extern void $link_test_func (); void (*fptr) () = $link_test_func;
16732 if ac_fn_c_try_run "$LINENO"; then :
16733 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
16735 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
16737 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16738 conftest.$ac_objext conftest.beam conftest.$ac_ext
16741 LDFLAGS="$pgac_save_LDFLAGS"
16743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
16744 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
16745 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
16746 LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
16750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
16751 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
16752 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
16753 $as_echo_n "(cached) " >&6
16755 pgac_save_LDFLAGS=$LDFLAGS
16756 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
16757 if test "$cross_compiling" = yes; then :
16758 pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
16760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16761 /* end confdefs.h. */
16762 extern void $link_test_func (); void (*fptr) () = $link_test_func;
16771 if ac_fn_c_try_run "$LINENO"; then :
16772 pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
16774 pgac_cv_prog_cc_ldflags__Wl___as_needed=no
16776 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16777 conftest.$ac_objext conftest.beam conftest.$ac_ext
16780 LDFLAGS="$pgac_save_LDFLAGS"
16782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
16783 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
16784 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
16785 LDFLAGS="$LDFLAGS -Wl,--as-needed"
16790 # Create compiler version string
16791 if test x"$GCC" = x"yes" ; then
16792 cc_string=`${CC} --version | sed q`
16793 case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
16794 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
16795 cc_string=`${CC} -V 2>&1 | sed q`
16801 cat >>confdefs.h <<_ACEOF
16802 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
16806 # Supply a numeric version string for use by 3rd party add-ons
16807 # awk -F is a regex on some platforms, and not on others, so make "." a tab
16808 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
16810 $AWK '{printf "%d%04d", $1, $2}'`"
16812 cat >>confdefs.h <<_ACEOF
16813 #define PG_VERSION_NUM $PG_VERSION_NUM
16819 # Begin output steps
16821 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
16822 $as_echo "$as_me: using compiler=$cc_string" >&6;}
16823 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
16824 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
16825 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
16826 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
16827 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
16828 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
16830 # prepare build tree if outside source tree
16831 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
16832 # Note 2: /bin/pwd might be better than shell's built-in at getting
16833 # a symlink-free name.
16834 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
16838 if test "$no_create" != yes; then
16839 $as_echo_n "preparing build tree... " >&6
16840 pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
16841 $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
16842 || as_fn_error $? "failed" "$LINENO" 5
16843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16844 $as_echo "done" >&6; }
16850 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
16853 ac_config_links="$ac_config_links src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION} src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION} src/include/dynloader.h:src/backend/port/dynloader/${template}.h src/include/pg_config_os.h:src/include/port/${template}.h src/Makefile.port:src/makefiles/Makefile.${template}"
16856 if test "$PORTNAME" = "win32"; then
16857 ac_config_commands="$ac_config_commands check_win32_symlinks"
16861 ac_config_headers="$ac_config_headers src/include/pg_config.h"
16864 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
16867 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
16870 cat >confcache <<\_ACEOF
16871 # This file is a shell script that caches the results of configure
16872 # tests run on this system so they can be shared between configure
16873 # scripts and configure runs, see configure's option --config-cache.
16874 # It is not useful on other systems. If it contains results you don't
16875 # want to keep, you may remove or edit it.
16877 # config.status only pays attention to the cache file if you give it
16878 # the --recheck option to rerun configure.
16880 # `ac_cv_env_foo' variables (set or unset) will be overridden when
16881 # loading this file, other *unset* `ac_cv_foo' will be assigned the
16882 # following values.
16886 # The following way of writing the cache mishandles newlines in values,
16887 # but we know of no workaround that is simple, portable, and efficient.
16888 # So, we kill variables containing newlines.
16889 # Ultrix sh set writes to stderr and can't be redirected directly,
16890 # and sets the high bit in the cache file unless we assign to the vars.
16892 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16893 eval ac_val=\$$ac_var
16897 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16898 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
16901 _ | IFS | as_nl) ;; #(
16902 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16903 *) { eval $ac_var=; unset $ac_var;} ;;
16909 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16910 *${as_nl}ac_space=\ *)
16911 # `set' does not quote correctly, so add quotes: double-quote
16912 # substitution turns \\\\ into \\, and sed turns \\ into \.
16915 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16918 # `set' quotes correctly as required by POSIX, so do not add quotes.
16919 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
16928 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16930 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16932 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16933 if test -w "$cache_file"; then
16934 if test "x$cache_file" != "x/dev/null"; then
16935 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16936 $as_echo "$as_me: updating cache $cache_file" >&6;}
16937 if test ! -f "$cache_file" || test -h "$cache_file"; then
16938 cat confcache >"$cache_file"
16940 case $cache_file in #(
16942 mv -f confcache "$cache_file"$$ &&
16943 mv -f "$cache_file"$$ "$cache_file" ;; #(
16945 mv -f confcache "$cache_file" ;;
16950 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16951 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
16956 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16957 # Let make expand exec_prefix.
16958 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16960 DEFS=-DHAVE_CONFIG_H
16965 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16966 # 1. Remove the extension, and $U if already installed.
16967 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16968 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16969 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16970 # will be set to the directory where LIBOBJS objects are built.
16971 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16972 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
16974 LIBOBJS=$ac_libobjs
16976 LTLIBOBJS=$ac_ltlibobjs
16981 : "${CONFIG_STATUS=./config.status}"
16983 ac_clean_files_save=$ac_clean_files
16984 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16985 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16986 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16988 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
16990 # Generated by $as_me.
16991 # Run this file to recreate the current configuration.
16992 # Compiler output produced by configure, useful for debugging
16993 # configure, is in config.log if it exists.
16996 ac_cs_recheck=false
16999 SHELL=\${CONFIG_SHELL-$SHELL}
17002 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17003 ## -------------------- ##
17004 ## M4sh Initialization. ##
17005 ## -------------------- ##
17007 # Be more Bourne compatible
17008 DUALCASE=1; export DUALCASE # for MKS sh
17009 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
17012 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
17013 # is contrary to our usage. Disable this feature.
17014 alias -g '${1+"$@"}'='"$@"'
17015 setopt NO_GLOB_SUBST
17017 case `(set -o) 2>/dev/null` in #(
17029 # Printing a long string crashes Solaris 7 /usr/bin/printf.
17030 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17031 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17032 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17033 # Prefer a ksh shell builtin over an external printf program on Solaris,
17034 # but without wasting forks for bash or zsh.
17035 if test -z "$BASH_VERSION$ZSH_VERSION" \
17036 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17037 as_echo='print -r --'
17038 as_echo_n='print -rn --'
17039 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17040 as_echo='printf %s\n'
17041 as_echo_n='printf %s'
17043 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17044 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17045 as_echo_n='/usr/ucb/echo -n'
17047 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17048 as_echo_n_body='eval
17052 expr "X$arg" : "X\\(.*\\)$as_nl";
17053 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17055 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17057 export as_echo_n_body
17058 as_echo_n='sh -c $as_echo_n_body as_echo'
17060 export as_echo_body
17061 as_echo='sh -c $as_echo_body as_echo'
17064 # The user is always right.
17065 if test "${PATH_SEPARATOR+set}" != set; then
17067 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17068 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17075 # We need space, tab and new line, in precisely that order. Quoting is
17076 # there to prevent editors from complaining about space-tab.
17077 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
17078 # splitting by setting IFS to empty value.)
17081 # Find who we are. Look in the path if we contain no directory separator.
17084 *[\\/]* ) as_myself=$0 ;;
17085 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17086 for as_dir in $PATH
17089 test -z "$as_dir" && as_dir=.
17090 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17096 # We did not find ourselves, most probably we were run as `sh COMMAND'
17097 # in which case we are not to be found in the path.
17098 if test "x$as_myself" = x; then
17101 if test ! -f "$as_myself"; then
17102 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17106 # Unset variables that we do not need and which cause bugs (e.g. in
17107 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17108 # suppresses any "Segmentation fault" message there. '((' could
17109 # trigger a bug in pdksh 5.2.14.
17110 for as_var in BASH_ENV ENV MAIL MAILPATH
17111 do eval test x\${$as_var+set} = xset \
17112 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
17125 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17128 # as_fn_error STATUS ERROR [LINENO LOG_FD]
17129 # ----------------------------------------
17130 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17131 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
17132 # script with STATUS, using 1 if that was 0.
17135 as_status=$1; test $as_status -eq 0 && as_status=1
17137 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17138 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
17140 $as_echo "$as_me: error: $2" >&2
17141 as_fn_exit $as_status
17145 # as_fn_set_status STATUS
17146 # -----------------------
17147 # Set $? to STATUS, without forking.
17148 as_fn_set_status ()
17151 } # as_fn_set_status
17153 # as_fn_exit STATUS
17154 # -----------------
17155 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17159 as_fn_set_status $1
17165 # Portably unset VAR.
17168 { eval $1=; unset $1;}
17170 as_unset=as_fn_unset
17171 # as_fn_append VAR VALUE
17172 # ----------------------
17173 # Append the text in VALUE to the end of the definition contained in VAR. Take
17174 # advantage of any shell optimizations that allow amortized linear growth over
17175 # repeated appends, instead of the typical quadratic growth present in naive
17177 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17178 eval 'as_fn_append ()
17189 # as_fn_arith ARG...
17190 # ------------------
17191 # Perform arithmetic evaluation on the ARGs, and store the result in the
17192 # global $as_val. Take advantage of shells that can avoid forks. The arguments
17193 # must be portable across $(()) and expr.
17194 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17195 eval 'as_fn_arith ()
17202 as_val=`expr "$@" || test $? -eq 1`
17207 if expr a : '\(a\)' >/dev/null 2>&1 &&
17208 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17214 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17215 as_basename=basename
17220 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17226 as_me=`$as_basename -- "$0" ||
17227 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17228 X"$0" : 'X\(//\)$' \| \
17229 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
17231 sed '/^.*\/\([^/][^/]*\)\/*$/{
17245 # Avoid depending upon Character Ranges.
17246 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17247 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17248 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17249 as_cr_digits='0123456789'
17250 as_cr_alnum=$as_cr_Letters$as_cr_digits
17252 ECHO_C= ECHO_N= ECHO_T=
17253 case `echo -n x` in #(((((
17255 case `echo 'xy\c'` in
17256 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
17258 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17265 rm -f conf$$ conf$$.exe conf$$.file
17266 if test -d conf$$.dir; then
17267 rm -f conf$$.dir/conf$$.file
17270 mkdir conf$$.dir 2>/dev/null
17272 if (echo >conf$$.file) 2>/dev/null; then
17273 if ln -s conf$$.file conf$$ 2>/dev/null; then
17275 # ... but there are two gotchas:
17276 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17277 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
17278 # In both cases, we have to default to `cp -pR'.
17279 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
17281 elif ln conf$$.file conf$$ 2>/dev/null; then
17289 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17290 rmdir conf$$.dir 2>/dev/null
17295 # Create "$as_dir" as a directory, including parents if necessary.
17300 -*) as_dir=./$as_dir;;
17302 test -d "$as_dir" || eval $as_mkdir_p || {
17306 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17307 *) as_qdir=$as_dir;;
17309 as_dirs="'$as_qdir' $as_dirs"
17310 as_dir=`$as_dirname -- "$as_dir" ||
17311 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17312 X"$as_dir" : 'X\(//\)[^/]' \| \
17313 X"$as_dir" : 'X\(//\)$' \| \
17314 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17315 $as_echo X"$as_dir" |
17316 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17320 /^X\(\/\/\)[^/].*/{
17333 test -d "$as_dir" && break
17335 test -z "$as_dirs" || eval "mkdir $as_dirs"
17336 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
17340 if mkdir -p . 2>/dev/null; then
17341 as_mkdir_p='mkdir -p "$as_dir"'
17343 test -d ./-p && rmdir ./-p
17348 # as_fn_executable_p FILE
17349 # -----------------------
17350 # Test if FILE is an executable regular file.
17351 as_fn_executable_p ()
17353 test -f "$1" && test -x "$1"
17354 } # as_fn_executable_p
17355 as_test_x='test -x'
17356 as_executable_p=as_fn_executable_p
17358 # Sed expression to map a string onto a valid CPP name.
17359 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
17361 # Sed expression to map a string onto a valid variable name.
17362 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
17366 ## ----------------------------------- ##
17367 ## Main body of $CONFIG_STATUS script. ##
17368 ## ----------------------------------- ##
17370 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
17372 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17373 # Save the log message, to keep $0 and so on meaningful, and to
17374 # report actual input values of CONFIG_FILES etc. instead of their
17375 # values after options handling.
17377 This file was extended by PostgreSQL $as_me 11devel, which was
17378 generated by GNU Autoconf 2.69. Invocation command line was
17380 CONFIG_FILES = $CONFIG_FILES
17381 CONFIG_HEADERS = $CONFIG_HEADERS
17382 CONFIG_LINKS = $CONFIG_LINKS
17383 CONFIG_COMMANDS = $CONFIG_COMMANDS
17386 on `(hostname || uname -n) 2>/dev/null | sed 1q`
17391 case $ac_config_files in *"
17392 "*) set x $ac_config_files; shift; ac_config_files=$*;;
17395 case $ac_config_headers in *"
17396 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17400 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17401 # Files that config.status was made for.
17402 config_files="$ac_config_files"
17403 config_headers="$ac_config_headers"
17404 config_links="$ac_config_links"
17405 config_commands="$ac_config_commands"
17409 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17411 \`$as_me' instantiates files and other configuration actions
17412 from templates according to the current configuration. Unless the files
17413 and actions are specified as TAGs, all are instantiated by default.
17415 Usage: $0 [OPTION]... [TAG]...
17417 -h, --help print this help, then exit
17418 -V, --version print version number and configuration settings, then exit
17419 --config print configuration, then exit
17420 -q, --quiet, --silent
17421 do not print progress messages
17422 -d, --debug don't remove temporary files
17423 --recheck update $as_me by reconfiguring in the same conditions
17424 --file=FILE[:TEMPLATE]
17425 instantiate the configuration file FILE
17426 --header=FILE[:TEMPLATE]
17427 instantiate the configuration header FILE
17429 Configuration files:
17432 Configuration headers:
17435 Configuration links:
17438 Configuration commands:
17441 Report bugs to <pgsql-bugs@postgresql.org>."
17444 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17445 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
17447 PostgreSQL config.status 11devel
17448 configured by $0, generated by GNU Autoconf 2.69,
17449 with options \\"\$ac_cs_config\\"
17451 Copyright (C) 2012 Free Software Foundation, Inc.
17452 This config.status script is free software; the Free Software Foundation
17453 gives unlimited permission to copy, distribute and modify it."
17460 test -n "\$AWK" || AWK=awk
17463 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17464 # The default lists apply if the user does not specify any file.
17470 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17471 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
17475 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17487 # Handling of the options.
17488 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17490 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
17491 $as_echo "$ac_cs_version"; exit ;;
17492 --config | --confi | --conf | --con | --co | --c )
17493 $as_echo "$ac_cs_config"; exit ;;
17494 --debug | --debu | --deb | --de | --d | -d )
17496 --file | --fil | --fi | --f )
17499 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17500 '') as_fn_error $? "missing file argument" ;;
17502 as_fn_append CONFIG_FILES " '$ac_optarg'"
17503 ac_need_defaults=false;;
17504 --header | --heade | --head | --hea )
17507 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17509 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
17510 ac_need_defaults=false;;
17512 # Conflict between --help and --header
17513 as_fn_error $? "ambiguous option: \`$1'
17514 Try \`$0 --help' for more information.";;
17515 --help | --hel | -h )
17516 $as_echo "$ac_cs_usage"; exit ;;
17517 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17518 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17521 # This is an error.
17522 -*) as_fn_error $? "unrecognized option: \`$1'
17523 Try \`$0 --help' for more information." ;;
17525 *) as_fn_append ac_config_targets " $1"
17526 ac_need_defaults=false ;;
17532 ac_configure_extra_args=
17534 if $ac_cs_silent; then
17536 ac_configure_extra_args="$ac_configure_extra_args --silent"
17540 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17541 if \$ac_cs_recheck; then
17542 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
17544 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17545 CONFIG_SHELL='$SHELL'
17546 export CONFIG_SHELL
17551 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17555 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17556 ## Running $as_me. ##
17562 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17565 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17567 # Handling of arguments.
17568 for ac_config_target in $ac_config_targets
17570 case $ac_config_target in
17571 "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
17572 "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
17573 "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
17574 "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
17575 "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
17576 "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
17577 "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
17578 "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
17579 "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
17580 "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
17581 "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
17582 "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
17583 "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
17585 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
17590 # If the user did not use the arguments to specify the items to instantiate,
17591 # then the envvar interface is used. Set only those that are not.
17592 # We use the long form for the default assignment because of an extremely
17593 # bizarre bug on SunOS 4.1.3.
17594 if $ac_need_defaults; then
17595 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17596 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17597 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
17598 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17601 # Have a temporary directory for convenience. Make it in the build tree
17602 # simply because there is no reason against having it here, and in addition,
17603 # creating and moving files from /tmp can sometimes cause problems.
17604 # Hook for its removal unless debugging.
17605 # Note that there is a small window in which the directory will not be cleaned:
17606 # after its creation but before its name has been assigned to `$tmp'.
17610 trap 'exit_status=$?
17611 : "${ac_tmp:=$tmp}"
17612 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
17614 trap 'as_fn_exit 1' 1 2 13 15
17616 # Create a (secure) tmp directory for tmp files.
17619 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
17623 tmp=./conf$$-$RANDOM
17624 (umask 077 && mkdir "$tmp")
17625 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
17628 # Set up the scripts for CONFIG_FILES section.
17629 # No need to generate them if there are no CONFIG_FILES.
17630 # This happens for instance with `./config.status config.h'.
17631 if test -n "$CONFIG_FILES"; then
17634 ac_cr=`echo X | tr X '\015'`
17635 # On cygwin, bash can eat \r inside `` if the user requested igncr.
17636 # But we know of no other shell where ac_cr would be empty at this
17637 # point, so we can use a bashism as a fallback.
17638 if test "x$ac_cr" = x; then
17639 eval ac_cr=\$\'\\r\'
17641 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17642 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
17645 ac_cs_awk_cr=$ac_cr
17648 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
17653 echo "cat >conf$$subs.awk <<_ACEOF" &&
17654 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17656 } >conf$$subs.sh ||
17657 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17658 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
17660 for ac_last_try in false false false false false :; do
17661 . ./conf$$subs.sh ||
17662 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17664 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17665 if test $ac_delim_n = $ac_delim_num; then
17667 elif $ac_last_try; then
17668 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17670 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17673 rm -f conf$$subs.sh
17675 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17676 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
17680 s/^/S["/; s/!.*/"]=/
17690 s/\(.\{148\}\)..*/\1/
17692 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17697 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17704 s/\(.\{148\}\)..*/\1/
17706 s/["\\]/\\&/g; s/^/"/; s/$/"/
17710 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17715 ' <conf$$subs.awk | sed '
17720 ' >>$CONFIG_STATUS || ac_write_fail=1
17721 rm -f conf$$subs.awk
17722 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17724 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
17725 for (key in S) S_is_set[key] = 1
17731 nfields = split(line, field, "@")
17733 len = length(field[1])
17734 for (i = 2; i < nfields; i++) {
17736 keylen = length(key)
17737 if (S_is_set[key]) {
17739 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17740 len += length(value) + length(field[++i])
17751 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17752 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17753 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17756 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
17757 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
17760 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17761 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
17762 # trailing colons and then remove the whole line if VPATH becomes empty
17763 # (actually we leave an empty line to preserve line numbers).
17764 if test "x$srcdir" = x.; then
17765 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17783 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17784 fi # test -n "$CONFIG_FILES"
17786 # Set up the scripts for CONFIG_HEADERS section.
17787 # No need to generate them if there are no CONFIG_HEADERS.
17788 # This happens for instance with `./config.status Makefile'.
17789 if test -n "$CONFIG_HEADERS"; then
17790 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
17794 # Transform confdefs.h into an awk script `defines.awk', embedded as
17795 # here-document in config.status, that substitutes the proper values into
17796 # config.h.in to produce config.h.
17798 # Create a delimiter string that does not exist in confdefs.h, to ease
17799 # handling of long lines.
17801 for ac_last_try in false false :; do
17802 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17803 if test -z "$ac_tt"; then
17805 elif $ac_last_try; then
17806 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
17808 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17812 # For the awk script, D is an array of macro values keyed by name,
17813 # likewise P contains macro parameters if any. Preserve backslash
17814 # newline sequences.
17816 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17818 s/.\{148\}/&'"$ac_delim"'/g
17821 s/^[ ]*#[ ]*define[ ][ ]*/ /
17828 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17830 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17834 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17835 D["\1"]=" \3\\\\\\n"\\/p
17837 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17842 s/.\{148\}/&'"$ac_delim"'/g
17847 s/["\\]/\\&/g; s/^/"/; s/$/"/p
17850 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17852 ' <confdefs.h | sed '
17853 s/'"$ac_delim"'/"\\\
17854 "/g' >>$CONFIG_STATUS || ac_write_fail=1
17856 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17857 for (key in D) D_is_set[key] = 1
17860 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17862 split(line, arg, " ")
17863 if (arg[1] == "#") {
17867 defundef = substr(arg[1], 2)
17870 split(mac1, mac2, "(") #)
17872 prefix = substr(line, 1, index(line, defundef) - 1)
17873 if (D_is_set[macro]) {
17874 # Preserve the white space surrounding the "#".
17875 print prefix "define", macro P[macro] D[macro]
17878 # Replace #undef with comments. This is necessary, for example,
17879 # in the case of _POSIX_SOURCE, which is predefined and required
17880 # on some systems where configure will not decide to define it.
17881 if (defundef == "undef") {
17882 print "/*", prefix defundef, macro, "*/"
17890 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17891 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
17892 fi # test -n "$CONFIG_HEADERS"
17895 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
17900 :[FHLC]) ac_mode=$ac_tag; continue;;
17902 case $ac_mode$ac_tag in
17904 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
17905 :[FH]-) ac_tag=-:-;;
17906 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17923 -) ac_f="$ac_tmp/stdin";;
17924 *) # Look for the file first in the build tree, then in the source tree
17925 # (if the path is not absolute). The absolute path cannot be DOS-style,
17926 # because $ac_f cannot contain `:'.
17930 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17932 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
17934 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17935 as_fn_append ac_file_inputs " '$ac_f'"
17938 # Let's still pretend it is `configure' which instantiates (i.e., don't
17939 # use $as_me), people would be surprised to read:
17940 # /* config.h. Generated by config.status. */
17941 configure_input='Generated from '`
17942 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17944 if test x"$ac_file" != x-; then
17945 configure_input="$ac_file. $configure_input"
17946 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17947 $as_echo "$as_me: creating $ac_file" >&6;}
17949 # Neutralize special characters interpreted by sed in replacement strings.
17950 case $configure_input in #(
17951 *\&* | *\|* | *\\* )
17952 ac_sed_conf_input=`$as_echo "$configure_input" |
17953 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17954 *) ac_sed_conf_input=$configure_input;;
17958 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17959 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
17964 ac_dir=`$as_dirname -- "$ac_file" ||
17965 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17966 X"$ac_file" : 'X\(//\)[^/]' \| \
17967 X"$ac_file" : 'X\(//\)$' \| \
17968 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17969 $as_echo X"$ac_file" |
17970 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17974 /^X\(\/\/\)[^/].*/{
17987 as_dir="$ac_dir"; as_fn_mkdir_p
17991 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17993 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17994 # A ".." for each directory in $ac_dir_suffix.
17995 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17996 case $ac_top_builddir_sub in
17997 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17998 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18001 ac_abs_top_builddir=$ac_pwd
18002 ac_abs_builddir=$ac_pwd$ac_dir_suffix
18003 # for backward compatibility:
18004 ac_top_builddir=$ac_top_build_prefix
18007 .) # We are building in place.
18009 ac_top_srcdir=$ac_top_builddir_sub
18010 ac_abs_top_srcdir=$ac_pwd ;;
18011 [\\/]* | ?:[\\/]* ) # Absolute name.
18012 ac_srcdir=$srcdir$ac_dir_suffix;
18013 ac_top_srcdir=$srcdir
18014 ac_abs_top_srcdir=$srcdir ;;
18015 *) # Relative name.
18016 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18017 ac_top_srcdir=$ac_top_build_prefix$srcdir
18018 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
18020 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
18030 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18031 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
18033 ac_MKDIR_P=$MKDIR_P
18035 [\\/$]* | ?:[\\/]* ) ;;
18036 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18040 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18041 # If the template does not know about datarootdir, expand it.
18042 # FIXME: This hack should be removed a few years after 2.60.
18043 ac_datarootdir_hack=; ac_datarootdir_seen=
18054 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
18055 *datarootdir*) ac_datarootdir_seen=yes;;
18056 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
18057 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18058 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
18060 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18061 ac_datarootdir_hack='
18062 s&@datadir@&$datadir&g
18063 s&@docdir@&$docdir&g
18064 s&@infodir@&$infodir&g
18065 s&@localedir@&$localedir&g
18066 s&@mandir@&$mandir&g
18067 s&\\\${datarootdir}&$datarootdir&g' ;;
18071 # Neutralize VPATH when `$srcdir' = `.'.
18072 # Shell code in configure.ac might set extrasub.
18073 # FIXME: do we really want to maintain this feature?
18074 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18075 ac_sed_extra="$ac_vpsub
18078 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18080 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18081 s|@configure_input@|$ac_sed_conf_input|;t t
18082 s&@top_builddir@&$ac_top_builddir_sub&;t t
18083 s&@top_build_prefix@&$ac_top_build_prefix&;t t
18084 s&@srcdir@&$ac_srcdir&;t t
18085 s&@abs_srcdir@&$ac_abs_srcdir&;t t
18086 s&@top_srcdir@&$ac_top_srcdir&;t t
18087 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18088 s&@builddir@&$ac_builddir&;t t
18089 s&@abs_builddir@&$ac_abs_builddir&;t t
18090 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18091 s&@INSTALL@&$ac_INSTALL&;t t
18092 s&@MKDIR_P@&$ac_MKDIR_P&;t t
18093 $ac_datarootdir_hack
18095 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18096 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18098 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
18099 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18100 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18101 "$ac_tmp/out"`; test -z "$ac_out"; } &&
18102 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18103 which seems to be undefined. Please make sure it is defined" >&5
18104 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18105 which seems to be undefined. Please make sure it is defined" >&2;}
18107 rm -f "$ac_tmp/stdin"
18109 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18110 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
18112 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18118 if test x"$ac_file" != x-; then
18120 $as_echo "/* $configure_input */" \
18121 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18122 } >"$ac_tmp/config.h" \
18123 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18124 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
18125 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18126 $as_echo "$as_me: $ac_file is unchanged" >&6;}
18129 mv "$ac_tmp/config.h" "$ac_file" \
18130 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18133 $as_echo "/* $configure_input */" \
18134 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
18135 || as_fn_error $? "could not create -" "$LINENO" 5
18143 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
18146 # Prefer the file from the source tree if names are identical.
18147 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
18148 ac_source=$srcdir/$ac_source
18151 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
18152 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
18154 if test ! -r "$ac_source"; then
18155 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
18159 # Try a relative symlink, then a hard link, then a copy.
18161 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
18162 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
18164 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
18165 ln "$ac_source" "$ac_file" 2>/dev/null ||
18166 cp -p "$ac_source" "$ac_file" ||
18167 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
18170 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
18171 $as_echo "$as_me: executing $ac_file commands" >&6;}
18176 case $ac_file$ac_mode in
18177 "check_win32_symlinks":C)
18178 # Links sometimes fail undetected on Mingw -
18179 # so here we detect it and warn the user
18180 for FILE in $CONFIG_LINKS
18182 # test -e works for symlinks in the MinGW console
18183 test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
18184 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
18187 "src/include/pg_config.h":H)
18188 # Update timestamp for pg_config.h (see Makefile.global)
18189 echo >src/include/stamp-h
18191 "src/include/pg_config_ext.h":H)
18192 # Update timestamp for pg_config_ext.h (see Makefile.global)
18193 echo >src/include/stamp-ext-h
18195 "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
18203 ac_clean_files=$ac_clean_files_save
18205 test $ac_write_fail = 0 ||
18206 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
18209 # configure is writing to config.log, and then calls config.status.
18210 # config.status does its own redirection, appending to config.log.
18211 # Unfortunately, on DOS this fails, as config.log is still kept open
18212 # by configure, so config.status won't be able to write to it; its
18213 # output is simply discarded. So we exec the FD to /dev/null,
18214 # effectively closing config.log, so it can be properly (re)opened and
18215 # appended to by config.status. When coming back to configure, we
18216 # need to make the FD available again.
18217 if test "$no_create" != yes; then
18219 ac_config_status_args=
18220 test "$silent" = yes &&
18221 ac_config_status_args="$ac_config_status_args --quiet"
18223 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
18225 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18226 # would make configure fail if this is the last instruction.
18227 $ac_cs_success || as_fn_exit 1
18229 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18230 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18231 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}