2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 10devel.
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='10devel'
586 PACKAGE_STRING='PostgreSQL 10devel'
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
665 python_additional_libs
791 program_transform_name
804 enable_option_checking
810 enable_integer_datetimes
845 with_libedit_preferred
857 ac_precious_vars='build_alias
876 # Initialize some variables set by options.
878 ac_init_version=false
879 ac_unrecognized_opts=
881 # The variables have the same names as the options, with
882 # dashes changed to underlines.
890 program_transform_name=s,x,x,
898 # Installation directory options.
899 # These are left unexpanded so users can "make install exec_prefix=/foo"
900 # and all the variables that are supposed to be based on exec_prefix
901 # by default will actually change.
902 # Use braces instead of parens because sh, perl, etc. also accept them.
903 # (The list follows the same order as the GNU Coding Standards.)
904 bindir='${exec_prefix}/bin'
905 sbindir='${exec_prefix}/sbin'
906 libexecdir='${exec_prefix}/libexec'
907 datarootdir='${prefix}/share'
908 datadir='${datarootdir}'
909 sysconfdir='${prefix}/etc'
910 sharedstatedir='${prefix}/com'
911 localstatedir='${prefix}/var'
912 includedir='${prefix}/include'
913 oldincludedir='/usr/include'
914 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
915 infodir='${datarootdir}/info'
920 libdir='${exec_prefix}/lib'
921 localedir='${datarootdir}/locale'
922 mandir='${datarootdir}/man'
928 # If the previous option needs an argument, assign it.
929 if test -n "$ac_prev"; then
930 eval $ac_prev=\$ac_option
936 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
941 # Accept the important Cygnus configure options, so we can diagnose typos.
943 case $ac_dashdash$ac_option in
947 -bindir | --bindir | --bindi | --bind | --bin | --bi)
949 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
952 -build | --build | --buil | --bui | --bu)
953 ac_prev=build_alias ;;
954 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
955 build_alias=$ac_optarg ;;
957 -cache-file | --cache-file | --cache-fil | --cache-fi \
958 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
959 ac_prev=cache_file ;;
960 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
961 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
962 cache_file=$ac_optarg ;;
965 cache_file=config.cache ;;
967 -datadir | --datadir | --datadi | --datad)
969 -datadir=* | --datadir=* | --datadi=* | --datad=*)
970 datadir=$ac_optarg ;;
972 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
973 | --dataroo | --dataro | --datar)
974 ac_prev=datarootdir ;;
975 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
976 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
977 datarootdir=$ac_optarg ;;
979 -disable-* | --disable-*)
980 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
981 # Reject names that are not valid shell variable names.
982 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
983 as_fn_error $? "invalid feature name: $ac_useropt"
984 ac_useropt_orig=$ac_useropt
985 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
986 case $ac_user_opts in
990 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
991 ac_unrecognized_sep=', ';;
993 eval enable_$ac_useropt=no ;;
995 -docdir | --docdir | --docdi | --doc | --do)
997 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1000 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1002 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1003 dvidir=$ac_optarg ;;
1005 -enable-* | --enable-*)
1006 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1007 # Reject names that are not valid shell variable names.
1008 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1009 as_fn_error $? "invalid feature name: $ac_useropt"
1010 ac_useropt_orig=$ac_useropt
1011 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1012 case $ac_user_opts in
1014 "enable_$ac_useropt"
1016 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1017 ac_unrecognized_sep=', ';;
1019 eval enable_$ac_useropt=\$ac_optarg ;;
1021 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1022 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1023 | --exec | --exe | --ex)
1024 ac_prev=exec_prefix ;;
1025 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1026 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1027 | --exec=* | --exe=* | --ex=*)
1028 exec_prefix=$ac_optarg ;;
1030 -gas | --gas | --ga | --g)
1031 # Obsolete; use --with-gas.
1034 -help | --help | --hel | --he | -h)
1035 ac_init_help=long ;;
1036 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1037 ac_init_help=recursive ;;
1038 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1039 ac_init_help=short ;;
1041 -host | --host | --hos | --ho)
1042 ac_prev=host_alias ;;
1043 -host=* | --host=* | --hos=* | --ho=*)
1044 host_alias=$ac_optarg ;;
1046 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1048 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1050 htmldir=$ac_optarg ;;
1052 -includedir | --includedir | --includedi | --included | --include \
1053 | --includ | --inclu | --incl | --inc)
1054 ac_prev=includedir ;;
1055 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1056 | --includ=* | --inclu=* | --incl=* | --inc=*)
1057 includedir=$ac_optarg ;;
1059 -infodir | --infodir | --infodi | --infod | --info | --inf)
1061 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1062 infodir=$ac_optarg ;;
1064 -libdir | --libdir | --libdi | --libd)
1066 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1067 libdir=$ac_optarg ;;
1069 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1070 | --libexe | --libex | --libe)
1071 ac_prev=libexecdir ;;
1072 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1073 | --libexe=* | --libex=* | --libe=*)
1074 libexecdir=$ac_optarg ;;
1076 -localedir | --localedir | --localedi | --localed | --locale)
1077 ac_prev=localedir ;;
1078 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1079 localedir=$ac_optarg ;;
1081 -localstatedir | --localstatedir | --localstatedi | --localstated \
1082 | --localstate | --localstat | --localsta | --localst | --locals)
1083 ac_prev=localstatedir ;;
1084 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1085 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1086 localstatedir=$ac_optarg ;;
1088 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1090 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1091 mandir=$ac_optarg ;;
1093 -nfp | --nfp | --nf)
1094 # Obsolete; use --without-fp.
1097 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1098 | --no-cr | --no-c | -n)
1101 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1102 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1105 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1106 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1107 | --oldin | --oldi | --old | --ol | --o)
1108 ac_prev=oldincludedir ;;
1109 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1110 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1111 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1112 oldincludedir=$ac_optarg ;;
1114 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1116 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1117 prefix=$ac_optarg ;;
1119 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1120 | --program-pre | --program-pr | --program-p)
1121 ac_prev=program_prefix ;;
1122 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1123 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1124 program_prefix=$ac_optarg ;;
1126 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1127 | --program-suf | --program-su | --program-s)
1128 ac_prev=program_suffix ;;
1129 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1130 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1131 program_suffix=$ac_optarg ;;
1133 -program-transform-name | --program-transform-name \
1134 | --program-transform-nam | --program-transform-na \
1135 | --program-transform-n | --program-transform- \
1136 | --program-transform | --program-transfor \
1137 | --program-transfo | --program-transf \
1138 | --program-trans | --program-tran \
1139 | --progr-tra | --program-tr | --program-t)
1140 ac_prev=program_transform_name ;;
1141 -program-transform-name=* | --program-transform-name=* \
1142 | --program-transform-nam=* | --program-transform-na=* \
1143 | --program-transform-n=* | --program-transform-=* \
1144 | --program-transform=* | --program-transfor=* \
1145 | --program-transfo=* | --program-transf=* \
1146 | --program-trans=* | --program-tran=* \
1147 | --progr-tra=* | --program-tr=* | --program-t=*)
1148 program_transform_name=$ac_optarg ;;
1150 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1152 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1153 pdfdir=$ac_optarg ;;
1155 -psdir | --psdir | --psdi | --psd | --ps)
1157 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1160 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1161 | -silent | --silent | --silen | --sile | --sil)
1164 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1166 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1168 sbindir=$ac_optarg ;;
1170 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1171 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1172 | --sharedst | --shareds | --shared | --share | --shar \
1174 ac_prev=sharedstatedir ;;
1175 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1176 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1177 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1179 sharedstatedir=$ac_optarg ;;
1181 -site | --site | --sit)
1183 -site=* | --site=* | --sit=*)
1186 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1188 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1189 srcdir=$ac_optarg ;;
1191 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1192 | --syscon | --sysco | --sysc | --sys | --sy)
1193 ac_prev=sysconfdir ;;
1194 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1195 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1196 sysconfdir=$ac_optarg ;;
1198 -target | --target | --targe | --targ | --tar | --ta | --t)
1199 ac_prev=target_alias ;;
1200 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1201 target_alias=$ac_optarg ;;
1203 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1206 -version | --version | --versio | --versi | --vers | -V)
1207 ac_init_version=: ;;
1210 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1211 # Reject names that are not valid shell variable names.
1212 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1213 as_fn_error $? "invalid package name: $ac_useropt"
1214 ac_useropt_orig=$ac_useropt
1215 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1216 case $ac_user_opts in
1220 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1221 ac_unrecognized_sep=', ';;
1223 eval with_$ac_useropt=\$ac_optarg ;;
1225 -without-* | --without-*)
1226 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1227 # Reject names that are not valid shell variable names.
1228 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1229 as_fn_error $? "invalid package name: $ac_useropt"
1230 ac_useropt_orig=$ac_useropt
1231 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1232 case $ac_user_opts in
1236 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1237 ac_unrecognized_sep=', ';;
1239 eval with_$ac_useropt=no ;;
1242 # Obsolete; use --with-x.
1245 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1246 | --x-incl | --x-inc | --x-in | --x-i)
1247 ac_prev=x_includes ;;
1248 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1249 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1250 x_includes=$ac_optarg ;;
1252 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1253 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1254 ac_prev=x_libraries ;;
1255 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1256 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1257 x_libraries=$ac_optarg ;;
1259 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1260 Try \`$0 --help' for more information"
1264 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1265 # Reject names that are not valid shell variable names.
1266 case $ac_envvar in #(
1267 '' | [0-9]* | *[!_$as_cr_alnum]* )
1268 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1270 eval $ac_envvar=\$ac_optarg
1271 export $ac_envvar ;;
1274 # FIXME: should be removed in autoconf 3.0.
1275 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1276 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1277 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1278 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1284 if test -n "$ac_prev"; then
1285 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1286 as_fn_error $? "missing argument to $ac_option"
1289 if test -n "$ac_unrecognized_opts"; then
1290 case $enable_option_checking in
1292 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1293 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1297 # Check all directory arguments for consistency.
1298 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1299 datadir sysconfdir sharedstatedir localstatedir includedir \
1300 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1301 libdir localedir mandir
1303 eval ac_val=\$$ac_var
1304 # Remove trailing slashes.
1307 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1308 eval $ac_var=\$ac_val;;
1310 # Be sure to have absolute directory names.
1312 [\\/$]* | ?:[\\/]* ) continue;;
1313 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1315 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1318 # There might be people who depend on the old broken behavior: `$host'
1319 # used to hold the argument of --host etc.
1320 # FIXME: To remove some day.
1323 target=$target_alias
1325 # FIXME: To remove some day.
1326 if test "x$host_alias" != x; then
1327 if test "x$build_alias" = x; then
1328 cross_compiling=maybe
1329 elif test "x$build_alias" != "x$host_alias"; then
1335 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1337 test "$silent" = yes && exec 6>/dev/null
1340 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1341 ac_ls_di=`ls -di .` &&
1342 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1343 as_fn_error $? "working directory cannot be determined"
1344 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1345 as_fn_error $? "pwd does not report name of working directory"
1348 # Find the source files, if location was not specified.
1349 if test -z "$srcdir"; then
1350 ac_srcdir_defaulted=yes
1351 # Try the directory containing this script, then the parent directory.
1352 ac_confdir=`$as_dirname -- "$as_myself" ||
1353 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1354 X"$as_myself" : 'X\(//\)[^/]' \| \
1355 X"$as_myself" : 'X\(//\)$' \| \
1356 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1357 $as_echo X"$as_myself" |
1358 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1376 if test ! -r "$srcdir/$ac_unique_file"; then
1380 ac_srcdir_defaulted=no
1382 if test ! -r "$srcdir/$ac_unique_file"; then
1383 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1384 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1386 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1388 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1390 # When building in place, set srcdir=.
1391 if test "$ac_abs_confdir" = "$ac_pwd"; then
1394 # Remove unnecessary trailing slashes from srcdir.
1395 # Double slashes in file names in object file debugging info
1396 # mess up M-x gdb in Emacs.
1398 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1400 for ac_var in $ac_precious_vars; do
1401 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1402 eval ac_env_${ac_var}_value=\$${ac_var}
1403 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1404 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1408 # Report the --help message.
1410 if test "$ac_init_help" = "long"; then
1411 # Omit some internal or obsolete options to make the list less imposing.
1412 # This message is too long to be a string in the A/UX 3.1 sh.
1414 \`configure' configures PostgreSQL 10devel to adapt to many kinds of systems.
1416 Usage: $0 [OPTION]... [VAR=VALUE]...
1418 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1419 VAR=VALUE. See below for descriptions of some of the useful variables.
1421 Defaults for the options are specified in brackets.
1424 -h, --help display this help and exit
1425 --help=short display options specific to this package
1426 --help=recursive display the short help of all the included packages
1427 -V, --version display version information and exit
1428 -q, --quiet, --silent do not print \`checking ...' messages
1429 --cache-file=FILE cache test results in FILE [disabled]
1430 -C, --config-cache alias for \`--cache-file=config.cache'
1431 -n, --no-create do not create output files
1432 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1434 Installation directories:
1435 --prefix=PREFIX install architecture-independent files in PREFIX
1436 [$ac_default_prefix]
1437 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1440 By default, \`make install' will install all the files in
1441 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1442 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1443 for instance \`--prefix=\$HOME'.
1445 For better control, use the options below.
1447 Fine tuning of the installation directories:
1448 --bindir=DIR user executables [EPREFIX/bin]
1449 --sbindir=DIR system admin executables [EPREFIX/sbin]
1450 --libexecdir=DIR program executables [EPREFIX/libexec]
1451 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1452 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1453 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1454 --libdir=DIR object code libraries [EPREFIX/lib]
1455 --includedir=DIR C header files [PREFIX/include]
1456 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1457 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1458 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1459 --infodir=DIR info documentation [DATAROOTDIR/info]
1460 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1461 --mandir=DIR man documentation [DATAROOTDIR/man]
1462 --docdir=DIR documentation root [DATAROOTDIR/doc/postgresql]
1463 --htmldir=DIR html documentation [DOCDIR]
1464 --dvidir=DIR dvi documentation [DOCDIR]
1465 --pdfdir=DIR pdf documentation [DOCDIR]
1466 --psdir=DIR ps documentation [DOCDIR]
1472 --build=BUILD configure for building on BUILD [guessed]
1473 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1477 if test -n "$ac_init_help"; then
1478 case $ac_init_help in
1479 short | recursive ) echo "Configuration of PostgreSQL 10devel:";;
1484 --disable-option-checking ignore unrecognized --enable/--with options
1485 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1486 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1487 --disable-integer-datetimes
1488 obsolete option, no longer supported
1489 --enable-nls[=LANGUAGES]
1490 enable Native Language Support
1491 --disable-rpath do not embed shared library search path in
1493 --disable-spinlocks do not use spinlocks
1494 --disable-atomics do not use atomic operations
1495 --disable-strong-random do not use a strong random number source
1496 --enable-debug build with debugging symbols (-g)
1497 --enable-profiling build with profiling enabled
1498 --enable-coverage build with coverage testing instrumentation
1499 --enable-dtrace build with DTrace support
1500 --enable-tap-tests enable TAP tests (requires Perl and IPC::Run)
1501 --enable-depend turn on automatic dependency tracking
1502 --enable-cassert enable assertion checks (for debugging)
1503 --disable-thread-safety disable thread-safety in client libraries
1504 --disable-largefile omit support for large files
1505 --disable-float4-byval disable float4 passed by value
1506 --disable-float8-byval disable float8 passed by value
1509 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1510 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1511 --with-extra-version=STRING
1512 append STRING to version
1513 --with-template=NAME override operating system template
1514 --with-includes=DIRS look for additional header files in DIRS
1515 --with-libraries=DIRS look for additional libraries in DIRS
1516 --with-libs=DIRS alternative spelling of --with-libraries
1517 --with-pgport=PORTNUM set default port number [5432]
1518 --with-blocksize=BLOCKSIZE
1519 set table block size in kB [8]
1520 --with-segsize=SEGSIZE set table segment size in GB [1]
1521 --with-wal-blocksize=BLOCKSIZE
1522 set WAL block size in kB [8]
1523 --with-wal-segsize=SEGSIZE
1524 set WAL segment size in MB [16]
1525 --with-CC=CMD set compiler (deprecated)
1526 --with-icu build with ICU support
1527 --with-tcl build Tcl modules (PL/Tcl)
1528 --with-tclconfig=DIR tclConfig.sh is in DIR
1529 --with-perl build Perl modules (PL/Perl)
1530 --with-python build Python modules (PL/Python)
1531 --with-gssapi build with GSSAPI support
1532 --with-krb-srvnam=NAME default service principal name in Kerberos (GSSAPI)
1534 --with-pam build with PAM support
1535 --with-bsd-auth build with BSD Authentication support
1536 --with-ldap build with LDAP support
1537 --with-bonjour build with Bonjour support
1538 --with-openssl build with OpenSSL support
1539 --with-selinux build with SELinux support
1540 --with-systemd build with systemd support
1541 --without-readline do not use GNU Readline nor BSD Libedit for editing
1542 --with-libedit-preferred
1543 prefer BSD Libedit over GNU Readline
1544 --with-uuid=LIB build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1545 --with-ossp-uuid obsolete spelling of --with-uuid=ossp
1546 --with-libxml build with XML support
1547 --with-libxslt use XSLT support when building contrib/xml2
1548 --with-system-tzdata=DIR
1549 use system time zone data in DIR
1550 --without-zlib do not use Zlib
1551 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1553 Some influential environment variables:
1554 CC C compiler command
1555 CFLAGS C compiler flags
1556 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1557 nonstandard directory <lib dir>
1558 LIBS libraries to pass to the linker, e.g. -l<library>
1559 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1560 you have headers in a nonstandard directory <include dir>
1562 PKG_CONFIG path to pkg-config utility
1564 directories to add to pkg-config's search path
1566 path overriding pkg-config's built-in search path
1567 ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
1568 ICU_LIBS linker flags for ICU, overriding pkg-config
1569 LDFLAGS_EX extra linker flags for linking executables only
1570 LDFLAGS_SL extra linker flags for linking shared libraries only
1572 location of DocBook stylesheets
1574 Use these variables to override the choices made by `configure' or to help
1575 it to find libraries and programs with nonstandard names/locations.
1577 Report bugs to <pgsql-bugs@postgresql.org>.
1582 if test "$ac_init_help" = "recursive"; then
1583 # If there are subdirs, report their specific --help.
1584 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1585 test -d "$ac_dir" ||
1586 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1591 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1593 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1594 # A ".." for each directory in $ac_dir_suffix.
1595 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1596 case $ac_top_builddir_sub in
1597 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1598 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1601 ac_abs_top_builddir=$ac_pwd
1602 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1603 # for backward compatibility:
1604 ac_top_builddir=$ac_top_build_prefix
1607 .) # We are building in place.
1609 ac_top_srcdir=$ac_top_builddir_sub
1610 ac_abs_top_srcdir=$ac_pwd ;;
1611 [\\/]* | ?:[\\/]* ) # Absolute name.
1612 ac_srcdir=$srcdir$ac_dir_suffix;
1613 ac_top_srcdir=$srcdir
1614 ac_abs_top_srcdir=$srcdir ;;
1616 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1617 ac_top_srcdir=$ac_top_build_prefix$srcdir
1618 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1620 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1622 cd "$ac_dir" || { ac_status=$?; continue; }
1623 # Check for guested configure.
1624 if test -f "$ac_srcdir/configure.gnu"; then
1626 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1627 elif test -f "$ac_srcdir/configure"; then
1629 $SHELL "$ac_srcdir/configure" --help=recursive
1631 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1633 cd "$ac_pwd" || { ac_status=$?; break; }
1637 test -n "$ac_init_help" && exit $ac_status
1638 if $ac_init_version; then
1640 PostgreSQL configure 10devel
1641 generated by GNU Autoconf 2.69
1643 Copyright (C) 2012 Free Software Foundation, Inc.
1644 This configure script is free software; the Free Software Foundation
1645 gives unlimited permission to copy, distribute and modify it.
1647 Copyright (c) 1996-2017, PostgreSQL Global Development Group
1652 ## ------------------------ ##
1653 ## Autoconf initialization. ##
1654 ## ------------------------ ##
1656 # ac_fn_c_try_compile LINENO
1657 # --------------------------
1658 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1659 ac_fn_c_try_compile ()
1661 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1662 rm -f conftest.$ac_objext
1663 if { { ac_try="$ac_compile"
1665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1666 *) ac_try_echo=$ac_try;;
1668 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1669 $as_echo "$ac_try_echo"; } >&5
1670 (eval "$ac_compile") 2>conftest.err
1672 if test -s conftest.err; then
1673 grep -v '^ *+' conftest.err >conftest.er1
1674 cat conftest.er1 >&5
1675 mv -f conftest.er1 conftest.err
1677 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1678 test $ac_status = 0; } && {
1679 test -z "$ac_c_werror_flag" ||
1680 test ! -s conftest.err
1681 } && test -s conftest.$ac_objext; then :
1684 $as_echo "$as_me: failed program was:" >&5
1685 sed 's/^/| /' conftest.$ac_ext >&5
1689 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1690 as_fn_set_status $ac_retval
1692 } # ac_fn_c_try_compile
1694 # ac_fn_c_try_link LINENO
1695 # -----------------------
1696 # Try to link conftest.$ac_ext, and return whether this succeeded.
1699 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1700 rm -f conftest.$ac_objext conftest$ac_exeext
1701 if { { ac_try="$ac_link"
1703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1704 *) ac_try_echo=$ac_try;;
1706 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1707 $as_echo "$ac_try_echo"; } >&5
1708 (eval "$ac_link") 2>conftest.err
1710 if test -s conftest.err; then
1711 grep -v '^ *+' conftest.err >conftest.er1
1712 cat conftest.er1 >&5
1713 mv -f conftest.er1 conftest.err
1715 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1716 test $ac_status = 0; } && {
1717 test -z "$ac_c_werror_flag" ||
1718 test ! -s conftest.err
1719 } && test -s conftest$ac_exeext && {
1720 test "$cross_compiling" = yes ||
1721 test -x conftest$ac_exeext
1725 $as_echo "$as_me: failed program was:" >&5
1726 sed 's/^/| /' conftest.$ac_ext >&5
1730 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1731 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1732 # interfere with the next link command; also delete a directory that is
1733 # left behind by Apple's compiler. We do this before executing the actions.
1734 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1735 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1736 as_fn_set_status $ac_retval
1738 } # ac_fn_c_try_link
1740 # ac_fn_c_try_cpp LINENO
1741 # ----------------------
1742 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1745 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1746 if { { ac_try="$ac_cpp conftest.$ac_ext"
1748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1749 *) ac_try_echo=$ac_try;;
1751 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1752 $as_echo "$ac_try_echo"; } >&5
1753 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1755 if test -s conftest.err; then
1756 grep -v '^ *+' conftest.err >conftest.er1
1757 cat conftest.er1 >&5
1758 mv -f conftest.er1 conftest.err
1760 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1761 test $ac_status = 0; } > conftest.i && {
1762 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1763 test ! -s conftest.err
1767 $as_echo "$as_me: failed program was:" >&5
1768 sed 's/^/| /' conftest.$ac_ext >&5
1772 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1773 as_fn_set_status $ac_retval
1777 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1778 # -------------------------------------------------------
1779 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1780 # the include files in INCLUDES and setting the cache variable VAR
1782 ac_fn_c_check_header_mongrel ()
1784 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1785 if eval \${$3+:} false; then :
1786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1787 $as_echo_n "checking for $2... " >&6; }
1788 if eval \${$3+:} false; then :
1789 $as_echo_n "(cached) " >&6
1792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1793 $as_echo "$ac_res" >&6; }
1795 # Is the header compilable?
1796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1797 $as_echo_n "checking $2 usability... " >&6; }
1798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1799 /* end confdefs.h. */
1803 if ac_fn_c_try_compile "$LINENO"; then :
1804 ac_header_compiler=yes
1806 ac_header_compiler=no
1808 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1810 $as_echo "$ac_header_compiler" >&6; }
1812 # Is the header present?
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1814 $as_echo_n "checking $2 presence... " >&6; }
1815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1816 /* end confdefs.h. */
1819 if ac_fn_c_try_cpp "$LINENO"; then :
1820 ac_header_preproc=yes
1822 ac_header_preproc=no
1824 rm -f conftest.err conftest.i conftest.$ac_ext
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1826 $as_echo "$ac_header_preproc" >&6; }
1828 # So? What about this header?
1829 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1831 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1832 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1833 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1834 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1837 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1838 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1839 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1840 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1841 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1842 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1843 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1844 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1845 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1846 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1847 ( $as_echo "## ---------------------------------------- ##
1848 ## Report this to pgsql-bugs@postgresql.org ##
1849 ## ---------------------------------------- ##"
1850 ) | sed "s/^/$as_me: WARNING: /" >&2
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1854 $as_echo_n "checking for $2... " >&6; }
1855 if eval \${$3+:} false; then :
1856 $as_echo_n "(cached) " >&6
1858 eval "$3=\$ac_header_compiler"
1861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1862 $as_echo "$ac_res" >&6; }
1864 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1866 } # ac_fn_c_check_header_mongrel
1868 # ac_fn_c_try_run LINENO
1869 # ----------------------
1870 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1871 # that executables *can* be run.
1874 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1875 if { { ac_try="$ac_link"
1877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1878 *) ac_try_echo=$ac_try;;
1880 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1881 $as_echo "$ac_try_echo"; } >&5
1882 (eval "$ac_link") 2>&5
1884 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1885 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1886 { { case "(($ac_try" in
1887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1888 *) ac_try_echo=$ac_try;;
1890 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1891 $as_echo "$ac_try_echo"; } >&5
1892 (eval "$ac_try") 2>&5
1894 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1895 test $ac_status = 0; }; }; then :
1898 $as_echo "$as_me: program exited with status $ac_status" >&5
1899 $as_echo "$as_me: failed program was:" >&5
1900 sed 's/^/| /' conftest.$ac_ext >&5
1902 ac_retval=$ac_status
1904 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1905 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1906 as_fn_set_status $ac_retval
1910 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1911 # -------------------------------------------------------
1912 # Tests whether HEADER exists and can be compiled using the include files in
1913 # INCLUDES, setting the cache variable VAR accordingly.
1914 ac_fn_c_check_header_compile ()
1916 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1918 $as_echo_n "checking for $2... " >&6; }
1919 if eval \${$3+:} false; then :
1920 $as_echo_n "(cached) " >&6
1922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1923 /* end confdefs.h. */
1927 if ac_fn_c_try_compile "$LINENO"; then :
1932 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1936 $as_echo "$ac_res" >&6; }
1937 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1939 } # ac_fn_c_check_header_compile
1941 # ac_fn_c_check_func LINENO FUNC VAR
1942 # ----------------------------------
1943 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1944 ac_fn_c_check_func ()
1946 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1948 $as_echo_n "checking for $2... " >&6; }
1949 if eval \${$3+:} false; then :
1950 $as_echo_n "(cached) " >&6
1952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1953 /* end confdefs.h. */
1954 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1955 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1956 #define $2 innocuous_$2
1958 /* System header to define __stub macros and hopefully few prototypes,
1959 which can conflict with char $2 (); below.
1960 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1961 <limits.h> exists even on freestanding compilers. */
1964 # include <limits.h>
1966 # include <assert.h>
1971 /* Override any GCC internal prototype to avoid an error.
1972 Use char because int might match the return type of a GCC
1973 builtin and then its argument prototype would still apply. */
1978 /* The GNU C library defines this for functions which it implements
1979 to always fail with ENOSYS. Some functions are actually named
1980 something starting with __ and the normal name is an alias. */
1981 #if defined __stub_$2 || defined __stub___$2
1993 if ac_fn_c_try_link "$LINENO"; then :
1998 rm -f core conftest.err conftest.$ac_objext \
1999 conftest$ac_exeext conftest.$ac_ext
2002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2003 $as_echo "$ac_res" >&6; }
2004 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2006 } # ac_fn_c_check_func
2008 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2009 # ----------------------------------------------------
2010 # Tries to find if the field MEMBER exists in type AGGR, after including
2011 # INCLUDES, setting cache variable VAR accordingly.
2012 ac_fn_c_check_member ()
2014 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2016 $as_echo_n "checking for $2.$3... " >&6; }
2017 if eval \${$4+:} false; then :
2018 $as_echo_n "(cached) " >&6
2020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2021 /* end confdefs.h. */
2033 if ac_fn_c_try_compile "$LINENO"; then :
2036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2037 /* end confdefs.h. */
2043 if (sizeof ac_aggr.$3)
2049 if ac_fn_c_try_compile "$LINENO"; then :
2054 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2056 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2060 $as_echo "$ac_res" >&6; }
2061 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2063 } # ac_fn_c_check_member
2065 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2066 # -------------------------------------------
2067 # Tests whether TYPE exists after having included INCLUDES, setting cache
2068 # variable VAR accordingly.
2069 ac_fn_c_check_type ()
2071 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2073 $as_echo_n "checking for $2... " >&6; }
2074 if eval \${$3+:} false; then :
2075 $as_echo_n "(cached) " >&6
2078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2079 /* end confdefs.h. */
2090 if ac_fn_c_try_compile "$LINENO"; then :
2091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2092 /* end confdefs.h. */
2103 if ac_fn_c_try_compile "$LINENO"; then :
2108 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2110 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2114 $as_echo "$ac_res" >&6; }
2115 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2117 } # ac_fn_c_check_type
2119 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2120 # --------------------------------------------
2121 # Tries to find the compile-time value of EXPR in a program that includes
2122 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2124 ac_fn_c_compute_int ()
2126 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2127 if test "$cross_compiling" = yes; then
2128 # Depending upon the size, compute the lo and hi bounds.
2129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2130 /* end confdefs.h. */
2135 static int test_array [1 - 2 * !(($2) >= 0)];
2137 return test_array [0];
2143 if ac_fn_c_try_compile "$LINENO"; then :
2146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2147 /* end confdefs.h. */
2152 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2154 return test_array [0];
2160 if ac_fn_c_try_compile "$LINENO"; then :
2161 ac_hi=$ac_mid; break
2163 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2164 if test $ac_lo -le $ac_mid; then
2168 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2170 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2174 /* end confdefs.h. */
2179 static int test_array [1 - 2 * !(($2) < 0)];
2181 return test_array [0];
2187 if ac_fn_c_try_compile "$LINENO"; then :
2190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2191 /* end confdefs.h. */
2196 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2198 return test_array [0];
2204 if ac_fn_c_try_compile "$LINENO"; then :
2205 ac_lo=$ac_mid; break
2207 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2208 if test $ac_mid -le $ac_hi; then
2212 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2219 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2221 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2222 # Binary search between lo and hi bounds.
2223 while test "x$ac_lo" != "x$ac_hi"; do
2224 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2226 /* end confdefs.h. */
2231 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2233 return test_array [0];
2239 if ac_fn_c_try_compile "$LINENO"; then :
2242 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2244 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2247 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2252 /* end confdefs.h. */
2254 static long int longval () { return $2; }
2255 static unsigned long int ulongval () { return $2; }
2262 FILE *f = fopen ("conftest.val", "w");
2267 long int i = longval ();
2270 fprintf (f, "%ld", i);
2274 unsigned long int i = ulongval ();
2277 fprintf (f, "%lu", i);
2279 /* Do not output a trailing newline, as this causes \r\n confusion
2280 on some platforms. */
2281 return ferror (f) || fclose (f) != 0;
2287 if ac_fn_c_try_run "$LINENO"; then :
2288 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2292 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2293 conftest.$ac_objext conftest.beam conftest.$ac_ext
2297 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2298 as_fn_set_status $ac_retval
2300 } # ac_fn_c_compute_int
2302 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2303 # ---------------------------------------------
2304 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2306 ac_fn_c_check_decl ()
2308 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2309 as_decl_name=`echo $2|sed 's/ *(.*//'`
2310 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2312 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2313 if eval \${$3+:} false; then :
2314 $as_echo_n "(cached) " >&6
2316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2317 /* end confdefs.h. */
2322 #ifndef $as_decl_name
2324 (void) $as_decl_use;
2326 (void) $as_decl_name;
2334 if ac_fn_c_try_compile "$LINENO"; then :
2339 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2343 $as_echo "$ac_res" >&6; }
2344 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2346 } # ac_fn_c_check_decl
2347 cat >config.log <<_ACEOF
2348 This file contains any messages produced by compilers while
2349 running configure, to aid debugging if configure makes a mistake.
2351 It was created by PostgreSQL $as_me 10devel, which was
2352 generated by GNU Autoconf 2.69. Invocation command line was
2364 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2365 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2366 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2367 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2368 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2370 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2371 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2373 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2374 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2375 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2376 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2377 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2378 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2379 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2383 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2387 test -z "$as_dir" && as_dir=.
2388 $as_echo "PATH: $as_dir"
2404 # Keep a trace of the command line.
2405 # Strip out --no-create and --no-recursion so they do not pile up.
2406 # Strip out --silent because we don't want to record it for future runs.
2407 # Also quote any args containing shell meta-characters.
2408 # Make two passes to allow for proper duplicate-argument suppression.
2412 ac_must_keep_next=false
2418 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2419 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2420 | -silent | --silent | --silen | --sile | --sil)
2423 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2426 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2428 as_fn_append ac_configure_args1 " '$ac_arg'"
2429 if test $ac_must_keep_next = true; then
2430 ac_must_keep_next=false # Got value, back to normal.
2433 *=* | --config-cache | -C | -disable-* | --disable-* \
2434 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2435 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2436 | -with-* | --with-* | -without-* | --without-* | --x)
2437 case "$ac_configure_args0 " in
2438 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2441 -* ) ac_must_keep_next=true ;;
2444 as_fn_append ac_configure_args " '$ac_arg'"
2449 { ac_configure_args0=; unset ac_configure_args0;}
2450 { ac_configure_args1=; unset ac_configure_args1;}
2452 # When interrupted or exit'd, cleanup temporary files, and complete
2453 # config.log. We remove comments because anyway the quotes in there
2454 # would cause problems or look ugly.
2455 # WARNING: Use '\'' to represent an apostrophe within the trap.
2456 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2457 trap 'exit_status=$?
2458 # Save into config.log some information that might help in debugging.
2462 $as_echo "## ---------------- ##
2463 ## Cache variables. ##
2464 ## ---------------- ##"
2466 # The following way of writing the cache mishandles newlines in values,
2468 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2469 eval ac_val=\$$ac_var
2473 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2474 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2477 _ | IFS | as_nl) ;; #(
2478 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2479 *) { eval $ac_var=; unset $ac_var;} ;;
2484 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2485 *${as_nl}ac_space=\ *)
2487 "s/'\''/'\''\\\\'\'''\''/g;
2488 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2491 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2498 $as_echo "## ----------------- ##
2499 ## Output variables. ##
2500 ## ----------------- ##"
2502 for ac_var in $ac_subst_vars
2504 eval ac_val=\$$ac_var
2506 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2508 $as_echo "$ac_var='\''$ac_val'\''"
2512 if test -n "$ac_subst_files"; then
2513 $as_echo "## ------------------- ##
2514 ## File substitutions. ##
2515 ## ------------------- ##"
2517 for ac_var in $ac_subst_files
2519 eval ac_val=\$$ac_var
2521 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2523 $as_echo "$ac_var='\''$ac_val'\''"
2528 if test -s confdefs.h; then
2529 $as_echo "## ----------- ##
2536 test "$ac_signal" != 0 &&
2537 $as_echo "$as_me: caught signal $ac_signal"
2538 $as_echo "$as_me: exit $exit_status"
2540 rm -f core *.core core.conftest.* &&
2541 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2544 for ac_signal in 1 2 13 15; do
2545 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2549 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2550 rm -f -r conftest* confdefs.h
2552 $as_echo "/* confdefs.h */" > confdefs.h
2554 # Predefined preprocessor variables.
2556 cat >>confdefs.h <<_ACEOF
2557 #define PACKAGE_NAME "$PACKAGE_NAME"
2560 cat >>confdefs.h <<_ACEOF
2561 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2564 cat >>confdefs.h <<_ACEOF
2565 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2568 cat >>confdefs.h <<_ACEOF
2569 #define PACKAGE_STRING "$PACKAGE_STRING"
2572 cat >>confdefs.h <<_ACEOF
2573 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2576 cat >>confdefs.h <<_ACEOF
2577 #define PACKAGE_URL "$PACKAGE_URL"
2581 # Let the site file select an alternate cache file if it wants to.
2582 # Prefer an explicitly selected file to automatically selected ones.
2585 if test -n "$CONFIG_SITE"; then
2586 # We do not want a PATH search for config.site.
2587 case $CONFIG_SITE in #((
2588 -*) ac_site_file1=./$CONFIG_SITE;;
2589 */*) ac_site_file1=$CONFIG_SITE;;
2590 *) ac_site_file1=./$CONFIG_SITE;;
2592 elif test "x$prefix" != xNONE; then
2593 ac_site_file1=$prefix/share/config.site
2594 ac_site_file2=$prefix/etc/config.site
2596 ac_site_file1=$ac_default_prefix/share/config.site
2597 ac_site_file2=$ac_default_prefix/etc/config.site
2599 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2601 test "x$ac_site_file" = xNONE && continue
2602 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2603 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2604 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2605 sed 's/^/| /' "$ac_site_file" >&5
2607 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2608 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2609 as_fn_error $? "failed to load site script $ac_site_file
2610 See \`config.log' for more details" "$LINENO" 5; }
2614 if test -r "$cache_file"; then
2615 # Some versions of bash will fail to source /dev/null (special files
2616 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2617 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2618 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2619 $as_echo "$as_me: loading cache $cache_file" >&6;}
2621 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2622 *) . "./$cache_file";;
2626 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2627 $as_echo "$as_me: creating cache $cache_file" >&6;}
2631 # Check that the precious variables saved in the cache have kept the same
2633 ac_cache_corrupted=false
2634 for ac_var in $ac_precious_vars; do
2635 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2636 eval ac_new_set=\$ac_env_${ac_var}_set
2637 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2638 eval ac_new_val=\$ac_env_${ac_var}_value
2639 case $ac_old_set,$ac_new_set in
2641 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2642 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2643 ac_cache_corrupted=: ;;
2645 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2646 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2647 ac_cache_corrupted=: ;;
2650 if test "x$ac_old_val" != "x$ac_new_val"; then
2651 # differences in whitespace do not lead to failure.
2652 ac_old_val_w=`echo x $ac_old_val`
2653 ac_new_val_w=`echo x $ac_new_val`
2654 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2656 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2657 ac_cache_corrupted=:
2659 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2660 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2661 eval $ac_var=\$ac_old_val
2663 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2664 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2666 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2669 # Pass precious variables to config.status.
2670 if test "$ac_new_set" = set; then
2672 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2673 *) ac_arg=$ac_var=$ac_new_val ;;
2675 case " $ac_configure_args " in
2676 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2677 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2681 if $ac_cache_corrupted; then
2682 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2683 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2684 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2685 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2686 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2688 ## -------------------- ##
2689 ## Main body of script. ##
2690 ## -------------------- ##
2693 ac_cpp='$CPP $CPPFLAGS'
2694 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2695 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2696 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2704 for ac_dir in config "$srcdir"/config; do
2705 if test -f "$ac_dir/install-sh"; then
2707 ac_install_sh="$ac_aux_dir/install-sh -c"
2709 elif test -f "$ac_dir/install.sh"; then
2711 ac_install_sh="$ac_aux_dir/install.sh -c"
2713 elif test -f "$ac_dir/shtool"; then
2715 ac_install_sh="$ac_aux_dir/shtool install -c"
2719 if test -z "$ac_aux_dir"; then
2720 as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2723 # These three variables are undocumented and unsupported,
2724 # and are intended to be withdrawn in a future Autoconf release.
2725 # They can cause serious problems if a builder's source tree is in a directory
2726 # whose full name contains unusual characters.
2727 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2728 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2729 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2733 configure_args=$ac_configure_args
2736 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2739 cat >>confdefs.h <<_ACEOF
2740 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2747 # Check whether --with-extra-version was given.
2748 if test "${with_extra_version+set}" = set; then :
2749 withval=$with_extra_version;
2752 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2755 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2758 PG_VERSION="$PACKAGE_VERSION$withval"
2763 PG_VERSION="$PACKAGE_VERSION"
2768 cat >>confdefs.h <<_ACEOF
2769 #define PG_VERSION "$PG_VERSION"
2773 # Make sure we can run config.sub.
2774 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2775 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2778 $as_echo_n "checking build system type... " >&6; }
2779 if ${ac_cv_build+:} false; then :
2780 $as_echo_n "(cached) " >&6
2782 ac_build_alias=$build_alias
2783 test "x$ac_build_alias" = x &&
2784 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2785 test "x$ac_build_alias" = x &&
2786 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2787 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2788 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2792 $as_echo "$ac_cv_build" >&6; }
2793 case $ac_cv_build in
2795 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2798 ac_save_IFS=$IFS; IFS='-'
2804 # Remember, the first character of IFS is used to create $*,
2805 # except with old shells:
2808 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2812 $as_echo_n "checking host system type... " >&6; }
2813 if ${ac_cv_host+:} false; then :
2814 $as_echo_n "(cached) " >&6
2816 if test "x$host_alias" = x; then
2817 ac_cv_host=$ac_cv_build
2819 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2820 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2825 $as_echo "$ac_cv_host" >&6; }
2828 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2831 ac_save_IFS=$IFS; IFS='-'
2837 # Remember, the first character of IFS is used to create $*,
2838 # except with old shells:
2841 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2847 $as_echo_n "checking which template to use... " >&6; }
2852 # Check whether --with-template was given.
2853 if test "${with_template+set}" = set; then :
2854 withval=$with_template;
2857 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2860 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2865 list) echo; ls "$srcdir/src/template"; exit;;
2866 *) if test -f "$srcdir/src/template/$with_template" ; then
2869 as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2878 # --with-template not given
2881 aix*) template=aix ;;
2882 cygwin*) template=cygwin ;;
2883 darwin*) template=darwin ;;
2884 dragonfly*) template=netbsd ;;
2885 freebsd*) template=freebsd ;;
2886 hpux*) template=hpux ;;
2887 linux*|gnu*|k*bsd*-gnu)
2889 mingw*) template=win32 ;;
2890 netbsd*) template=netbsd ;;
2891 openbsd*) template=openbsd ;;
2892 solaris*) template=solaris ;;
2895 if test x"$template" = x"" ; then
2897 *******************************************************************
2898 PostgreSQL has apparently not been ported to your platform yet.
2899 To try a manual configuration, look into the src/template directory
2900 for a similar platform and use the '--with-template=' option.
2902 Please also contact <pgsql-bugs@postgresql.org> to see about
2903 rectifying this. Include the above 'checking host system type...'
2905 *******************************************************************
2914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
2915 $as_echo "$template" >&6; }
2920 # Initialize default assumption that we do not need separate assembly code
2921 # for TAS (test-and-set). This can be overridden by the template file
2922 # when it's executed.
2929 ## Command line options
2933 # Add non-standard directories to the include path
2938 # Check whether --with-includes was given.
2939 if test "${with_includes+set}" = set; then :
2940 withval=$with_includes;
2943 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2946 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
2959 # Add non-standard directories to the library search path
2964 # Check whether --with-libraries was given.
2965 if test "${with_libraries+set}" = set; then :
2966 withval=$with_libraries;
2969 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2972 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
2975 LIBRARY_DIRS=$withval
2986 # Check whether --with-libs was given.
2987 if test "${with_libs+set}" = set; then :
2991 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2994 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
2997 LIBRARY_DIRS=$withval
3007 # 64-bit integer date/time storage is now the only option, but to avoid
3008 # unnecessary breakage of build scripts, continue to accept an explicit
3009 # "--enable-integer-datetimes" switch.
3013 # Check whether --enable-integer-datetimes was given.
3014 if test "${enable_integer_datetimes+set}" = set; then :
3015 enableval=$enable_integer_datetimes;
3021 as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3024 as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3029 enable_integer_datetimes=yes
3039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3040 $as_echo_n "checking whether NLS is wanted... " >&6; }
3043 # Check whether --enable-nls was given.
3044 if test "${enable_nls+set}" = set; then :
3045 enableval=$enable_nls;
3055 WANTED_LANGUAGES=$enableval
3065 if test "$enable_nls" = yes; then
3067 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3072 $as_echo "$enable_nls" >&6; }
3077 # Default port number (--with-pgport), default 5432
3079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3080 $as_echo_n "checking for default port number... " >&6; }
3084 # Check whether --with-pgport was given.
3085 if test "${with_pgport+set}" = set; then :
3086 withval=$with_pgport;
3089 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3092 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3095 default_port=$withval
3104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3105 $as_echo "$default_port" >&6; }
3106 # Need both of these because some places want an integer and some a string
3108 cat >>confdefs.h <<_ACEOF
3109 #define DEF_PGPORT ${default_port}
3113 cat >>confdefs.h <<_ACEOF
3114 #define DEF_PGPORT_STR "${default_port}"
3119 # It's worth validating port; you can get very confusing errors otherwise
3120 if test x"$default_port" = x""; then
3121 as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3122 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3123 as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3124 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3125 as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3126 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3127 as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3131 # '-rpath'-like feature can be disabled
3135 # Check whether --enable-rpath was given.
3136 if test "${enable_rpath+set}" = set; then :
3137 enableval=$enable_rpath;
3146 as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3163 # Check whether --enable-spinlocks was given.
3164 if test "${enable_spinlocks+set}" = set; then :
3165 enableval=$enable_spinlocks;
3174 as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3179 enable_spinlocks=yes
3190 # Check whether --enable-atomics was given.
3191 if test "${enable_atomics+set}" = set; then :
3192 enableval=$enable_atomics;
3201 as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3213 # Random number generation
3217 # Check whether --enable-strong-random was given.
3218 if test "${enable_strong_random+set}" = set; then :
3219 enableval=$enable_strong_random;
3228 as_fn_error $? "no argument expected for --enable-strong-random option" "$LINENO" 5
3233 enable_strong_random=yes
3241 # --enable-debug adds -g to compiler flags
3245 # Check whether --enable-debug was given.
3246 if test "${enable_debug+set}" = set; then :
3247 enableval=$enable_debug;
3256 as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3269 # --enable-profiling enables gcc profiling
3273 # Check whether --enable-profiling was given.
3274 if test "${enable_profiling+set}" = set; then :
3275 enableval=$enable_profiling;
3284 as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3296 # --enable-coverage enables generation of code coverage metrics with gcov
3300 # Check whether --enable-coverage was given.
3301 if test "${enable_coverage+set}" = set; then :
3302 enableval=$enable_coverage;
3307 # Extract the first word of "$ac_prog", so it can be a program name with args.
3308 set dummy $ac_prog; ac_word=$2
3309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3310 $as_echo_n "checking for $ac_word... " >&6; }
3311 if ${ac_cv_prog_GCOV+:} false; then :
3312 $as_echo_n "(cached) " >&6
3314 if test -n "$GCOV"; then
3315 ac_cv_prog_GCOV="$GCOV" # Let the user override the test.
3317 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3321 test -z "$as_dir" && as_dir=.
3322 for ac_exec_ext in '' $ac_executable_extensions; do
3323 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3324 ac_cv_prog_GCOV="$ac_prog"
3325 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3334 GCOV=$ac_cv_prog_GCOV
3335 if test -n "$GCOV"; then
3336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3337 $as_echo "$GCOV" >&6; }
3339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3340 $as_echo "no" >&6; }
3344 test -n "$GCOV" && break
3347 if test -z "$GCOV"; then
3348 as_fn_error $? "gcov not found" "$LINENO" 5
3352 # Extract the first word of "$ac_prog", so it can be a program name with args.
3353 set dummy $ac_prog; ac_word=$2
3354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3355 $as_echo_n "checking for $ac_word... " >&6; }
3356 if ${ac_cv_prog_LCOV+:} false; then :
3357 $as_echo_n "(cached) " >&6
3359 if test -n "$LCOV"; then
3360 ac_cv_prog_LCOV="$LCOV" # Let the user override the test.
3362 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3366 test -z "$as_dir" && as_dir=.
3367 for ac_exec_ext in '' $ac_executable_extensions; do
3368 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3369 ac_cv_prog_LCOV="$ac_prog"
3370 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3379 LCOV=$ac_cv_prog_LCOV
3380 if test -n "$LCOV"; then
3381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3382 $as_echo "$LCOV" >&6; }
3384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3385 $as_echo "no" >&6; }
3389 test -n "$LCOV" && break
3392 if test -z "$LCOV"; then
3393 as_fn_error $? "lcov not found" "$LINENO" 5
3395 for ac_prog in genhtml
3397 # Extract the first word of "$ac_prog", so it can be a program name with args.
3398 set dummy $ac_prog; ac_word=$2
3399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3400 $as_echo_n "checking for $ac_word... " >&6; }
3401 if ${ac_cv_prog_GENHTML+:} false; then :
3402 $as_echo_n "(cached) " >&6
3404 if test -n "$GENHTML"; then
3405 ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test.
3407 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3411 test -z "$as_dir" && as_dir=.
3412 for ac_exec_ext in '' $ac_executable_extensions; do
3413 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3414 ac_cv_prog_GENHTML="$ac_prog"
3415 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3424 GENHTML=$ac_cv_prog_GENHTML
3425 if test -n "$GENHTML"; then
3426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3427 $as_echo "$GENHTML" >&6; }
3429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3430 $as_echo "no" >&6; }
3434 test -n "$GENHTML" && break
3437 if test -z "$GENHTML"; then
3438 as_fn_error $? "genhtml not found" "$LINENO" 5
3445 as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3462 # Check whether --enable-dtrace was given.
3463 if test "${enable_dtrace+set}" = set; then :
3464 enableval=$enable_dtrace;
3467 for ac_prog in dtrace
3469 # Extract the first word of "$ac_prog", so it can be a program name with args.
3470 set dummy $ac_prog; ac_word=$2
3471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3472 $as_echo_n "checking for $ac_word... " >&6; }
3473 if ${ac_cv_prog_DTRACE+:} false; then :
3474 $as_echo_n "(cached) " >&6
3476 if test -n "$DTRACE"; then
3477 ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
3479 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3483 test -z "$as_dir" && as_dir=.
3484 for ac_exec_ext in '' $ac_executable_extensions; do
3485 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3486 ac_cv_prog_DTRACE="$ac_prog"
3487 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3496 DTRACE=$ac_cv_prog_DTRACE
3497 if test -n "$DTRACE"; then
3498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3499 $as_echo "$DTRACE" >&6; }
3501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3502 $as_echo "no" >&6; }
3506 test -n "$DTRACE" && break
3509 if test -z "$DTRACE"; then
3510 as_fn_error $? "dtrace not found" "$LINENO" 5
3518 as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3535 # Check whether --enable-tap-tests was given.
3536 if test "${enable_tap_tests+set}" = set; then :
3537 enableval=$enable_tap_tests;
3546 as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3562 $as_echo_n "checking for block size... " >&6; }
3566 # Check whether --with-blocksize was given.
3567 if test "${with_blocksize+set}" = set; then :
3568 withval=$with_blocksize;
3571 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3574 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3586 case ${blocksize} in
3593 *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3596 $as_echo "${blocksize}kB" >&6; }
3599 cat >>confdefs.h <<_ACEOF
3600 #define BLCKSZ ${BLCKSZ}
3605 # Relation segment size
3607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3608 $as_echo_n "checking for segment size... " >&6; }
3612 # Check whether --with-segsize was given.
3613 if test "${with_segsize+set}" = set; then :
3614 withval=$with_segsize;
3617 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3620 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3632 # this expression is set up to avoid unnecessary integer overflow
3633 # blocksize is already guaranteed to be a factor of 1024
3634 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3635 test $? -eq 0 || exit 1
3636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3637 $as_echo "${segsize}GB" >&6; }
3640 cat >>confdefs.h <<_ACEOF
3641 #define RELSEG_SIZE ${RELSEG_SIZE}
3648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3649 $as_echo_n "checking for WAL block size... " >&6; }
3653 # Check whether --with-wal-blocksize was given.
3654 if test "${with_wal_blocksize+set}" = set; then :
3655 withval=$with_wal_blocksize;
3658 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3661 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3664 wal_blocksize=$withval
3673 case ${wal_blocksize} in
3674 1) XLOG_BLCKSZ=1024;;
3675 2) XLOG_BLCKSZ=2048;;
3676 4) XLOG_BLCKSZ=4096;;
3677 8) XLOG_BLCKSZ=8192;;
3678 16) XLOG_BLCKSZ=16384;;
3679 32) XLOG_BLCKSZ=32768;;
3680 64) XLOG_BLCKSZ=65536;;
3681 *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3684 $as_echo "${wal_blocksize}kB" >&6; }
3687 cat >>confdefs.h <<_ACEOF
3688 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL segment size" >&5
3696 $as_echo_n "checking for WAL segment size... " >&6; }
3700 # Check whether --with-wal-segsize was given.
3701 if test "${with_wal_segsize+set}" = set; then :
3702 withval=$with_wal_segsize;
3705 as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3708 as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
3711 wal_segsize=$withval
3720 case ${wal_segsize} in
3728 *) as_fn_error $? "Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_segsize}MB" >&5
3731 $as_echo "${wal_segsize}MB" >&6; }
3734 cat >>confdefs.h <<_ACEOF
3735 #define XLOG_SEG_SIZE (${wal_segsize} * 1024 * 1024)
3743 # For historical reasons you can also use --with-CC to specify the C compiler
3744 # to use, although the standard way to do this is to set the CC environment
3749 # Check whether --with-CC was given.
3750 if test "${with_CC+set}" = set; then :
3754 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3757 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3769 aix) pgac_cc_list="gcc xlc";;
3770 *) pgac_cc_list="gcc cc";;
3774 ac_cpp='$CPP $CPPFLAGS'
3775 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3776 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3777 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3778 if test -n "$ac_tool_prefix"; then
3779 for ac_prog in $pgac_cc_list
3781 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3782 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3784 $as_echo_n "checking for $ac_word... " >&6; }
3785 if ${ac_cv_prog_CC+:} false; then :
3786 $as_echo_n "(cached) " >&6
3788 if test -n "$CC"; then
3789 ac_cv_prog_CC="$CC" # Let the user override the test.
3791 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3795 test -z "$as_dir" && as_dir=.
3796 for ac_exec_ext in '' $ac_executable_extensions; do
3797 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3798 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3799 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3809 if test -n "$CC"; then
3810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3811 $as_echo "$CC" >&6; }
3813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3814 $as_echo "no" >&6; }
3818 test -n "$CC" && break
3821 if test -z "$CC"; then
3823 for ac_prog in $pgac_cc_list
3825 # Extract the first word of "$ac_prog", so it can be a program name with args.
3826 set dummy $ac_prog; ac_word=$2
3827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3828 $as_echo_n "checking for $ac_word... " >&6; }
3829 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3830 $as_echo_n "(cached) " >&6
3832 if test -n "$ac_ct_CC"; then
3833 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3835 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3839 test -z "$as_dir" && as_dir=.
3840 for ac_exec_ext in '' $ac_executable_extensions; do
3841 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3842 ac_cv_prog_ac_ct_CC="$ac_prog"
3843 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3852 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3853 if test -n "$ac_ct_CC"; then
3854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3855 $as_echo "$ac_ct_CC" >&6; }
3857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3858 $as_echo "no" >&6; }
3862 test -n "$ac_ct_CC" && break
3865 if test "x$ac_ct_CC" = x; then
3868 case $cross_compiling:$ac_tool_warned in
3870 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3871 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3872 ac_tool_warned=yes ;;
3879 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3880 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3881 as_fn_error $? "no acceptable C compiler found in \$PATH
3882 See \`config.log' for more details" "$LINENO" 5; }
3884 # Provide some information about the compiler.
3885 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3888 for ac_option in --version -v -V -qversion; do
3889 { { ac_try="$ac_compiler $ac_option >&5"
3891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3892 *) ac_try_echo=$ac_try;;
3894 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3895 $as_echo "$ac_try_echo"; } >&5
3896 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3898 if test -s conftest.err; then
3900 ... rest of stderr output deleted ...
3901 10q' conftest.err >conftest.er1
3902 cat conftest.er1 >&5
3904 rm -f conftest.er1 conftest.err
3905 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3906 test $ac_status = 0; }
3909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3910 /* end confdefs.h. */
3920 ac_clean_files_save=$ac_clean_files
3921 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3922 # Try to create an executable without -o first, disregard a.out.
3923 # It will help us diagnose broken compilers, and finding out an intuition
3925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3926 $as_echo_n "checking whether the C compiler works... " >&6; }
3927 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3929 # The possible output files:
3930 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3933 for ac_file in $ac_files
3936 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3937 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3942 if { { ac_try="$ac_link_default"
3944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3945 *) ac_try_echo=$ac_try;;
3947 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3948 $as_echo "$ac_try_echo"; } >&5
3949 (eval "$ac_link_default") 2>&5
3951 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3952 test $ac_status = 0; }; then :
3953 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3954 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3955 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3956 # so that the user can short-circuit this test for compilers unknown to
3958 for ac_file in $ac_files ''
3960 test -f "$ac_file" || continue
3962 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3965 # We found the default executable, but exeext='' is most
3969 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3971 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3973 # We set ac_cv_exeext here because the later test for it is not
3974 # safe: cross compilers may not add the suffix if given an `-o'
3975 # argument, so we may need to know it at that point already.
3976 # Even if this section looks crufty: it has the advantage of
3983 test "$ac_cv_exeext" = no && ac_cv_exeext=
3988 if test -z "$ac_file"; then :
3989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3990 $as_echo "no" >&6; }
3991 $as_echo "$as_me: failed program was:" >&5
3992 sed 's/^/| /' conftest.$ac_ext >&5
3994 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3995 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3996 as_fn_error 77 "C compiler cannot create executables
3997 See \`config.log' for more details" "$LINENO" 5; }
3999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4000 $as_echo "yes" >&6; }
4002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4003 $as_echo_n "checking for C compiler default output file name... " >&6; }
4004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4005 $as_echo "$ac_file" >&6; }
4006 ac_exeext=$ac_cv_exeext
4008 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4009 ac_clean_files=$ac_clean_files_save
4010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4011 $as_echo_n "checking for suffix of executables... " >&6; }
4012 if { { ac_try="$ac_link"
4014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4015 *) ac_try_echo=$ac_try;;
4017 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4018 $as_echo "$ac_try_echo"; } >&5
4019 (eval "$ac_link") 2>&5
4021 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4022 test $ac_status = 0; }; then :
4023 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4024 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4025 # work properly (i.e., refer to `conftest.exe'), while it won't with
4027 for ac_file in conftest.exe conftest conftest.*; do
4028 test -f "$ac_file" || continue
4030 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4031 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4037 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4038 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4039 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4040 See \`config.log' for more details" "$LINENO" 5; }
4042 rm -f conftest conftest$ac_cv_exeext
4043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4044 $as_echo "$ac_cv_exeext" >&6; }
4046 rm -f conftest.$ac_ext
4047 EXEEXT=$ac_cv_exeext
4049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4050 /* end confdefs.h. */
4055 FILE *f = fopen ("conftest.out", "w");
4056 return ferror (f) || fclose (f) != 0;
4062 ac_clean_files="$ac_clean_files conftest.out"
4063 # Check that the compiler produces executables we can run. If not, either
4064 # the compiler is broken, or we cross compile.
4065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4066 $as_echo_n "checking whether we are cross compiling... " >&6; }
4067 if test "$cross_compiling" != yes; then
4068 { { ac_try="$ac_link"
4070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4071 *) ac_try_echo=$ac_try;;
4073 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4074 $as_echo "$ac_try_echo"; } >&5
4075 (eval "$ac_link") 2>&5
4077 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4078 test $ac_status = 0; }
4079 if { ac_try='./conftest$ac_cv_exeext'
4080 { { case "(($ac_try" in
4081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4082 *) ac_try_echo=$ac_try;;
4084 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4085 $as_echo "$ac_try_echo"; } >&5
4086 (eval "$ac_try") 2>&5
4088 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4089 test $ac_status = 0; }; }; then
4092 if test "$cross_compiling" = maybe; then
4095 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4096 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4097 as_fn_error $? "cannot run C compiled programs.
4098 If you meant to cross compile, use \`--host'.
4099 See \`config.log' for more details" "$LINENO" 5; }
4103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4104 $as_echo "$cross_compiling" >&6; }
4106 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4107 ac_clean_files=$ac_clean_files_save
4108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4109 $as_echo_n "checking for suffix of object files... " >&6; }
4110 if ${ac_cv_objext+:} false; then :
4111 $as_echo_n "(cached) " >&6
4113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4114 /* end confdefs.h. */
4124 rm -f conftest.o conftest.obj
4125 if { { ac_try="$ac_compile"
4127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4128 *) ac_try_echo=$ac_try;;
4130 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4131 $as_echo "$ac_try_echo"; } >&5
4132 (eval "$ac_compile") 2>&5
4134 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4135 test $ac_status = 0; }; then :
4136 for ac_file in conftest.o conftest.obj conftest.*; do
4137 test -f "$ac_file" || continue;
4139 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4140 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4145 $as_echo "$as_me: failed program was:" >&5
4146 sed 's/^/| /' conftest.$ac_ext >&5
4148 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4149 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4150 as_fn_error $? "cannot compute suffix of object files: cannot compile
4151 See \`config.log' for more details" "$LINENO" 5; }
4153 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4156 $as_echo "$ac_cv_objext" >&6; }
4157 OBJEXT=$ac_cv_objext
4159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4160 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4161 if ${ac_cv_c_compiler_gnu+:} false; then :
4162 $as_echo_n "(cached) " >&6
4164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4165 /* end confdefs.h. */
4178 if ac_fn_c_try_compile "$LINENO"; then :
4183 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4184 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4188 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4189 if test $ac_compiler_gnu = yes; then
4194 ac_test_CFLAGS=${CFLAGS+set}
4195 ac_save_CFLAGS=$CFLAGS
4196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4197 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4198 if ${ac_cv_prog_cc_g+:} false; then :
4199 $as_echo_n "(cached) " >&6
4201 ac_save_c_werror_flag=$ac_c_werror_flag
4202 ac_c_werror_flag=yes
4205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4206 /* end confdefs.h. */
4216 if ac_fn_c_try_compile "$LINENO"; then :
4220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4221 /* end confdefs.h. */
4231 if ac_fn_c_try_compile "$LINENO"; then :
4234 ac_c_werror_flag=$ac_save_c_werror_flag
4236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4237 /* end confdefs.h. */
4247 if ac_fn_c_try_compile "$LINENO"; then :
4250 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4252 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4255 ac_c_werror_flag=$ac_save_c_werror_flag
4257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4258 $as_echo "$ac_cv_prog_cc_g" >&6; }
4259 if test "$ac_test_CFLAGS" = set; then
4260 CFLAGS=$ac_save_CFLAGS
4261 elif test $ac_cv_prog_cc_g = yes; then
4262 if test "$GCC" = yes; then
4268 if test "$GCC" = yes; then
4274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4275 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4276 if ${ac_cv_prog_cc_c89+:} false; then :
4277 $as_echo_n "(cached) " >&6
4279 ac_cv_prog_cc_c89=no
4281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4282 /* end confdefs.h. */
4286 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4287 struct buf { int x; };
4288 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4289 static char *e (p, i)
4295 static char *f (char * (*g) (char **, int), char **p, ...)
4300 s = g (p, va_arg (v,int));
4305 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4306 function prototypes and stuff, but not '\xHH' hex character constants.
4307 These don't provoke an error unfortunately, instead are silently treated
4308 as 'x'. The following induces an error, until -std is added to get
4309 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4310 array size at least. It's necessary to write '\x00'==0 to get something
4311 that's true only with -std. */
4312 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4314 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4315 inside strings and character constants. */
4317 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4319 int test (int i, double x);
4320 struct s1 {int (*f) (int a);};
4321 struct s2 {int (*f) (double a);};
4322 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4328 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4333 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4334 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4336 CC="$ac_save_CC $ac_arg"
4337 if ac_fn_c_try_compile "$LINENO"; then :
4338 ac_cv_prog_cc_c89=$ac_arg
4340 rm -f core conftest.err conftest.$ac_objext
4341 test "x$ac_cv_prog_cc_c89" != "xno" && break
4343 rm -f conftest.$ac_ext
4348 case "x$ac_cv_prog_cc_c89" in
4350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4351 $as_echo "none needed" >&6; } ;;
4353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4354 $as_echo "unsupported" >&6; } ;;
4356 CC="$CC $ac_cv_prog_cc_c89"
4357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4358 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4360 if test "x$ac_cv_prog_cc_c89" != xno; then :
4365 ac_cpp='$CPP $CPPFLAGS'
4366 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4367 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4368 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4371 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4372 # but has idiosyncrasies of its own. We assume icc will define
4373 # __INTEL_COMPILER regardless of CFLAGS.
4375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4376 /* end confdefs.h. */
4381 #ifndef __INTEL_COMPILER
4388 if ac_fn_c_try_compile "$LINENO"; then :
4393 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4395 # Check if it's Sun Studio compiler. We assume that
4396 # __SUNPRO_C will be defined for Sun Studio compilers
4397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4398 /* end confdefs.h. */
4410 if ac_fn_c_try_compile "$LINENO"; then :
4415 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4424 . "$srcdir/src/template/$template" || exit
4426 # CFLAGS are selected so:
4427 # If the user specifies something in the environment, that is used.
4428 # else: If the template file set something, that is used.
4429 # else: If coverage was enabled, don't set anything.
4430 # else: If the compiler is GCC, then we use -O2.
4431 # else: If the compiler is something else, then we use -O, unless debugging.
4433 if test "$ac_env_CFLAGS_set" = set; then
4434 CFLAGS=$ac_env_CFLAGS_value
4435 elif test "${CFLAGS+set}" = set; then
4436 : # (keep what template set)
4437 elif test "$enable_coverage" = yes; then
4438 : # no optimization by default
4439 elif test "$GCC" = yes; then
4442 # if the user selected debug mode, don't use -O
4443 if test "$enable_debug" != yes; then
4448 # CFLAGS we determined above will be added back at the end
4452 # set CFLAGS_VECTOR from the environment, if available
4453 if test "$ac_env_CFLAGS_VECTOR_set" = set; then
4454 CFLAGS_VECTOR=$ac_env_CFLAGS_VECTOR_value
4457 # Some versions of GCC support some additional useful warning flags.
4458 # Check whether they are supported, and add them to CFLAGS if so.
4459 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
4460 # but has its own. Also check other compiler-specific flags here.
4462 if test "$GCC" = yes -a "$ICC" = no; then
4463 CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
4464 # These work in some but not all gcc versions
4465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wdeclaration-after-statement" >&5
4466 $as_echo_n "checking whether $CC supports -Wdeclaration-after-statement... " >&6; }
4467 if ${pgac_cv_prog_cc_cflags__Wdeclaration_after_statement+:} false; then :
4468 $as_echo_n "(cached) " >&6
4470 pgac_save_CFLAGS=$CFLAGS
4471 CFLAGS="$pgac_save_CFLAGS -Wdeclaration-after-statement"
4472 ac_save_c_werror_flag=$ac_c_werror_flag
4473 ac_c_werror_flag=yes
4474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4475 /* end confdefs.h. */
4485 if ac_fn_c_try_compile "$LINENO"; then :
4486 pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=yes
4488 pgac_cv_prog_cc_cflags__Wdeclaration_after_statement=no
4490 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4491 ac_c_werror_flag=$ac_save_c_werror_flag
4492 CFLAGS="$pgac_save_CFLAGS"
4494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&5
4495 $as_echo "$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" >&6; }
4496 if test x"$pgac_cv_prog_cc_cflags__Wdeclaration_after_statement" = x"yes"; then
4497 CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wendif-labels" >&5
4501 $as_echo_n "checking whether $CC supports -Wendif-labels... " >&6; }
4502 if ${pgac_cv_prog_cc_cflags__Wendif_labels+:} false; then :
4503 $as_echo_n "(cached) " >&6
4505 pgac_save_CFLAGS=$CFLAGS
4506 CFLAGS="$pgac_save_CFLAGS -Wendif-labels"
4507 ac_save_c_werror_flag=$ac_c_werror_flag
4508 ac_c_werror_flag=yes
4509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4510 /* end confdefs.h. */
4520 if ac_fn_c_try_compile "$LINENO"; then :
4521 pgac_cv_prog_cc_cflags__Wendif_labels=yes
4523 pgac_cv_prog_cc_cflags__Wendif_labels=no
4525 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4526 ac_c_werror_flag=$ac_save_c_werror_flag
4527 CFLAGS="$pgac_save_CFLAGS"
4529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wendif_labels" >&5
4530 $as_echo "$pgac_cv_prog_cc_cflags__Wendif_labels" >&6; }
4531 if test x"$pgac_cv_prog_cc_cflags__Wendif_labels" = x"yes"; then
4532 CFLAGS="$CFLAGS -Wendif-labels"
4535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wmissing-format-attribute" >&5
4536 $as_echo_n "checking whether $CC supports -Wmissing-format-attribute... " >&6; }
4537 if ${pgac_cv_prog_cc_cflags__Wmissing_format_attribute+:} false; then :
4538 $as_echo_n "(cached) " >&6
4540 pgac_save_CFLAGS=$CFLAGS
4541 CFLAGS="$pgac_save_CFLAGS -Wmissing-format-attribute"
4542 ac_save_c_werror_flag=$ac_c_werror_flag
4543 ac_c_werror_flag=yes
4544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4545 /* end confdefs.h. */
4555 if ac_fn_c_try_compile "$LINENO"; then :
4556 pgac_cv_prog_cc_cflags__Wmissing_format_attribute=yes
4558 pgac_cv_prog_cc_cflags__Wmissing_format_attribute=no
4560 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4561 ac_c_werror_flag=$ac_save_c_werror_flag
4562 CFLAGS="$pgac_save_CFLAGS"
4564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&5
4565 $as_echo "$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" >&6; }
4566 if test x"$pgac_cv_prog_cc_cflags__Wmissing_format_attribute" = x"yes"; then
4567 CFLAGS="$CFLAGS -Wmissing-format-attribute"
4570 # This was included in -Wall/-Wformat in older GCC versions
4571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wformat-security" >&5
4572 $as_echo_n "checking whether $CC supports -Wformat-security... " >&6; }
4573 if ${pgac_cv_prog_cc_cflags__Wformat_security+:} false; then :
4574 $as_echo_n "(cached) " >&6
4576 pgac_save_CFLAGS=$CFLAGS
4577 CFLAGS="$pgac_save_CFLAGS -Wformat-security"
4578 ac_save_c_werror_flag=$ac_c_werror_flag
4579 ac_c_werror_flag=yes
4580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4581 /* end confdefs.h. */
4591 if ac_fn_c_try_compile "$LINENO"; then :
4592 pgac_cv_prog_cc_cflags__Wformat_security=yes
4594 pgac_cv_prog_cc_cflags__Wformat_security=no
4596 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4597 ac_c_werror_flag=$ac_save_c_werror_flag
4598 CFLAGS="$pgac_save_CFLAGS"
4600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wformat_security" >&5
4601 $as_echo "$pgac_cv_prog_cc_cflags__Wformat_security" >&6; }
4602 if test x"$pgac_cv_prog_cc_cflags__Wformat_security" = x"yes"; then
4603 CFLAGS="$CFLAGS -Wformat-security"
4606 # Disable strict-aliasing rules; needed for gcc 3.3+
4607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4608 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4609 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4610 $as_echo_n "(cached) " >&6
4612 pgac_save_CFLAGS=$CFLAGS
4613 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4614 ac_save_c_werror_flag=$ac_c_werror_flag
4615 ac_c_werror_flag=yes
4616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4617 /* end confdefs.h. */
4627 if ac_fn_c_try_compile "$LINENO"; then :
4628 pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4630 pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4632 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4633 ac_c_werror_flag=$ac_save_c_werror_flag
4634 CFLAGS="$pgac_save_CFLAGS"
4636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4637 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4638 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4639 CFLAGS="$CFLAGS -fno-strict-aliasing"
4642 # Disable optimizations that assume no overflow; needed for gcc 4.3+
4643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fwrapv" >&5
4644 $as_echo_n "checking whether $CC supports -fwrapv... " >&6; }
4645 if ${pgac_cv_prog_cc_cflags__fwrapv+:} false; then :
4646 $as_echo_n "(cached) " >&6
4648 pgac_save_CFLAGS=$CFLAGS
4649 CFLAGS="$pgac_save_CFLAGS -fwrapv"
4650 ac_save_c_werror_flag=$ac_c_werror_flag
4651 ac_c_werror_flag=yes
4652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4653 /* end confdefs.h. */
4663 if ac_fn_c_try_compile "$LINENO"; then :
4664 pgac_cv_prog_cc_cflags__fwrapv=yes
4666 pgac_cv_prog_cc_cflags__fwrapv=no
4668 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4669 ac_c_werror_flag=$ac_save_c_werror_flag
4670 CFLAGS="$pgac_save_CFLAGS"
4672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fwrapv" >&5
4673 $as_echo "$pgac_cv_prog_cc_cflags__fwrapv" >&6; }
4674 if test x"$pgac_cv_prog_cc_cflags__fwrapv" = x"yes"; then
4675 CFLAGS="$CFLAGS -fwrapv"
4678 # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
4679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fexcess-precision=standard" >&5
4680 $as_echo_n "checking whether $CC supports -fexcess-precision=standard... " >&6; }
4681 if ${pgac_cv_prog_cc_cflags__fexcess_precision_standard+:} false; then :
4682 $as_echo_n "(cached) " >&6
4684 pgac_save_CFLAGS=$CFLAGS
4685 CFLAGS="$pgac_save_CFLAGS -fexcess-precision=standard"
4686 ac_save_c_werror_flag=$ac_c_werror_flag
4687 ac_c_werror_flag=yes
4688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4689 /* end confdefs.h. */
4699 if ac_fn_c_try_compile "$LINENO"; then :
4700 pgac_cv_prog_cc_cflags__fexcess_precision_standard=yes
4702 pgac_cv_prog_cc_cflags__fexcess_precision_standard=no
4704 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4705 ac_c_werror_flag=$ac_save_c_werror_flag
4706 CFLAGS="$pgac_save_CFLAGS"
4708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&5
4709 $as_echo "$pgac_cv_prog_cc_cflags__fexcess_precision_standard" >&6; }
4710 if test x"$pgac_cv_prog_cc_cflags__fexcess_precision_standard" = x"yes"; then
4711 CFLAGS="$CFLAGS -fexcess-precision=standard"
4714 # Optimization flags for specific files that benefit from vectorization
4715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -funroll-loops" >&5
4716 $as_echo_n "checking whether $CC supports -funroll-loops... " >&6; }
4717 if ${pgac_cv_prog_cc_cflags__funroll_loops+:} false; then :
4718 $as_echo_n "(cached) " >&6
4720 pgac_save_CFLAGS=$CFLAGS
4721 CFLAGS="$pgac_save_CFLAGS -funroll-loops"
4722 ac_save_c_werror_flag=$ac_c_werror_flag
4723 ac_c_werror_flag=yes
4724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4725 /* end confdefs.h. */
4735 if ac_fn_c_try_compile "$LINENO"; then :
4736 pgac_cv_prog_cc_cflags__funroll_loops=yes
4738 pgac_cv_prog_cc_cflags__funroll_loops=no
4740 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4741 ac_c_werror_flag=$ac_save_c_werror_flag
4742 CFLAGS="$pgac_save_CFLAGS"
4744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__funroll_loops" >&5
4745 $as_echo "$pgac_cv_prog_cc_cflags__funroll_loops" >&6; }
4746 if test x"$pgac_cv_prog_cc_cflags__funroll_loops" = x"yes"; then
4747 CFLAGS_VECTOR="${CFLAGS_VECTOR} -funroll-loops"
4750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -ftree-vectorize" >&5
4751 $as_echo_n "checking whether $CC supports -ftree-vectorize... " >&6; }
4752 if ${pgac_cv_prog_cc_cflags__ftree_vectorize+:} false; then :
4753 $as_echo_n "(cached) " >&6
4755 pgac_save_CFLAGS=$CFLAGS
4756 CFLAGS="$pgac_save_CFLAGS -ftree-vectorize"
4757 ac_save_c_werror_flag=$ac_c_werror_flag
4758 ac_c_werror_flag=yes
4759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4760 /* end confdefs.h. */
4770 if ac_fn_c_try_compile "$LINENO"; then :
4771 pgac_cv_prog_cc_cflags__ftree_vectorize=yes
4773 pgac_cv_prog_cc_cflags__ftree_vectorize=no
4775 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4776 ac_c_werror_flag=$ac_save_c_werror_flag
4777 CFLAGS="$pgac_save_CFLAGS"
4779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__ftree_vectorize" >&5
4780 $as_echo "$pgac_cv_prog_cc_cflags__ftree_vectorize" >&6; }
4781 if test x"$pgac_cv_prog_cc_cflags__ftree_vectorize" = x"yes"; then
4782 CFLAGS_VECTOR="${CFLAGS_VECTOR} -ftree-vectorize"
4785 # We want to suppress clang's unhelpful unused-command-line-argument warnings
4786 # but gcc won't complain about unrecognized -Wno-foo switches, so we have to
4787 # test for the positive form and if that works, add the negative form
4788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wunused-command-line-argument" >&5
4789 $as_echo_n "checking whether $CC supports -Wunused-command-line-argument... " >&6; }
4790 if ${pgac_cv_prog_cc_cflags__Wunused_command_line_argument+:} false; then :
4791 $as_echo_n "(cached) " >&6
4793 pgac_save_CFLAGS=$CFLAGS
4794 CFLAGS="$pgac_save_CFLAGS -Wunused-command-line-argument"
4795 ac_save_c_werror_flag=$ac_c_werror_flag
4796 ac_c_werror_flag=yes
4797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4798 /* end confdefs.h. */
4808 if ac_fn_c_try_compile "$LINENO"; then :
4809 pgac_cv_prog_cc_cflags__Wunused_command_line_argument=yes
4811 pgac_cv_prog_cc_cflags__Wunused_command_line_argument=no
4813 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4814 ac_c_werror_flag=$ac_save_c_werror_flag
4815 CFLAGS="$pgac_save_CFLAGS"
4817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__Wunused_command_line_argument" >&5
4818 $as_echo "$pgac_cv_prog_cc_cflags__Wunused_command_line_argument" >&6; }
4819 if test x"$pgac_cv_prog_cc_cflags__Wunused_command_line_argument" = x"yes"; then
4820 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
4823 if test -n "$NOT_THE_CFLAGS"; then
4824 CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
4826 elif test "$ICC" = yes; then
4827 # Intel's compiler has a bug/misoptimization in checking for
4828 # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
4829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mp1" >&5
4830 $as_echo_n "checking whether $CC supports -mp1... " >&6; }
4831 if ${pgac_cv_prog_cc_cflags__mp1+:} false; then :
4832 $as_echo_n "(cached) " >&6
4834 pgac_save_CFLAGS=$CFLAGS
4835 CFLAGS="$pgac_save_CFLAGS -mp1"
4836 ac_save_c_werror_flag=$ac_c_werror_flag
4837 ac_c_werror_flag=yes
4838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4839 /* end confdefs.h. */
4849 if ac_fn_c_try_compile "$LINENO"; then :
4850 pgac_cv_prog_cc_cflags__mp1=yes
4852 pgac_cv_prog_cc_cflags__mp1=no
4854 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4855 ac_c_werror_flag=$ac_save_c_werror_flag
4856 CFLAGS="$pgac_save_CFLAGS"
4858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__mp1" >&5
4859 $as_echo "$pgac_cv_prog_cc_cflags__mp1" >&6; }
4860 if test x"$pgac_cv_prog_cc_cflags__mp1" = x"yes"; then
4861 CFLAGS="$CFLAGS -mp1"
4864 # Make sure strict aliasing is off (though this is said to be the default)
4865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-strict-aliasing" >&5
4866 $as_echo_n "checking whether $CC supports -fno-strict-aliasing... " >&6; }
4867 if ${pgac_cv_prog_cc_cflags__fno_strict_aliasing+:} false; then :
4868 $as_echo_n "(cached) " >&6
4870 pgac_save_CFLAGS=$CFLAGS
4871 CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
4872 ac_save_c_werror_flag=$ac_c_werror_flag
4873 ac_c_werror_flag=yes
4874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4875 /* end confdefs.h. */
4885 if ac_fn_c_try_compile "$LINENO"; then :
4886 pgac_cv_prog_cc_cflags__fno_strict_aliasing=yes
4888 pgac_cv_prog_cc_cflags__fno_strict_aliasing=no
4890 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4891 ac_c_werror_flag=$ac_save_c_werror_flag
4892 CFLAGS="$pgac_save_CFLAGS"
4894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&5
4895 $as_echo "$pgac_cv_prog_cc_cflags__fno_strict_aliasing" >&6; }
4896 if test x"$pgac_cv_prog_cc_cflags__fno_strict_aliasing" = x"yes"; then
4897 CFLAGS="$CFLAGS -fno-strict-aliasing"
4900 elif test "$PORTNAME" = "aix"; then
4901 # AIX's xlc has to have strict aliasing turned off too
4902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qnoansialias" >&5
4903 $as_echo_n "checking whether $CC supports -qnoansialias... " >&6; }
4904 if ${pgac_cv_prog_cc_cflags__qnoansialias+:} false; then :
4905 $as_echo_n "(cached) " >&6
4907 pgac_save_CFLAGS=$CFLAGS
4908 CFLAGS="$pgac_save_CFLAGS -qnoansialias"
4909 ac_save_c_werror_flag=$ac_c_werror_flag
4910 ac_c_werror_flag=yes
4911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4912 /* end confdefs.h. */
4922 if ac_fn_c_try_compile "$LINENO"; then :
4923 pgac_cv_prog_cc_cflags__qnoansialias=yes
4925 pgac_cv_prog_cc_cflags__qnoansialias=no
4927 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4928 ac_c_werror_flag=$ac_save_c_werror_flag
4929 CFLAGS="$pgac_save_CFLAGS"
4931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qnoansialias" >&5
4932 $as_echo "$pgac_cv_prog_cc_cflags__qnoansialias" >&6; }
4933 if test x"$pgac_cv_prog_cc_cflags__qnoansialias" = x"yes"; then
4934 CFLAGS="$CFLAGS -qnoansialias"
4937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -qlonglong" >&5
4938 $as_echo_n "checking whether $CC supports -qlonglong... " >&6; }
4939 if ${pgac_cv_prog_cc_cflags__qlonglong+:} false; then :
4940 $as_echo_n "(cached) " >&6
4942 pgac_save_CFLAGS=$CFLAGS
4943 CFLAGS="$pgac_save_CFLAGS -qlonglong"
4944 ac_save_c_werror_flag=$ac_c_werror_flag
4945 ac_c_werror_flag=yes
4946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4947 /* end confdefs.h. */
4957 if ac_fn_c_try_compile "$LINENO"; then :
4958 pgac_cv_prog_cc_cflags__qlonglong=yes
4960 pgac_cv_prog_cc_cflags__qlonglong=no
4962 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4963 ac_c_werror_flag=$ac_save_c_werror_flag
4964 CFLAGS="$pgac_save_CFLAGS"
4966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags__qlonglong" >&5
4967 $as_echo "$pgac_cv_prog_cc_cflags__qlonglong" >&6; }
4968 if test x"$pgac_cv_prog_cc_cflags__qlonglong" = x"yes"; then
4969 CFLAGS="$CFLAGS -qlonglong"
4972 elif test "$PORTNAME" = "hpux"; then
4973 # On some versions of HP-UX, libm functions do not set errno by default.
4974 # Fix that by using +Olibmerrno if the compiler recognizes it.
4975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports +Olibmerrno" >&5
4976 $as_echo_n "checking whether $CC supports +Olibmerrno... " >&6; }
4977 if ${pgac_cv_prog_cc_cflags_pOlibmerrno+:} false; then :
4978 $as_echo_n "(cached) " >&6
4980 pgac_save_CFLAGS=$CFLAGS
4981 CFLAGS="$pgac_save_CFLAGS +Olibmerrno"
4982 ac_save_c_werror_flag=$ac_c_werror_flag
4983 ac_c_werror_flag=yes
4984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4985 /* end confdefs.h. */
4995 if ac_fn_c_try_compile "$LINENO"; then :
4996 pgac_cv_prog_cc_cflags_pOlibmerrno=yes
4998 pgac_cv_prog_cc_cflags_pOlibmerrno=no
5000 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5001 ac_c_werror_flag=$ac_save_c_werror_flag
5002 CFLAGS="$pgac_save_CFLAGS"
5004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_cflags_pOlibmerrno" >&5
5005 $as_echo "$pgac_cv_prog_cc_cflags_pOlibmerrno" >&6; }
5006 if test x"$pgac_cv_prog_cc_cflags_pOlibmerrno" = x"yes"; then
5007 CFLAGS="$CFLAGS +Olibmerrno"
5012 CFLAGS_VECTOR=$CFLAGS_VECTOR
5015 # supply -g if --enable-debug
5016 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
5020 # enable code coverage if --enable-coverage
5021 if test "$enable_coverage" = yes; then
5022 if test "$GCC" = yes; then
5023 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
5025 as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
5029 # enable profiling if --enable-profiling
5030 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
5031 if test "$GCC" = yes; then
5033 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
5035 CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
5037 as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
5041 # We already have this in Makefile.win32, but configure needs it too
5042 if test "$PORTNAME" = "win32"; then
5043 CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
5046 # Now that we're done automatically adding stuff to CFLAGS, put back the
5047 # user-specified flags (if any) at the end. This lets users override
5048 # the automatic additions.
5049 CFLAGS="$CFLAGS $user_CFLAGS"
5051 # Check if the compiler still works with the final flag settings
5052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
5053 $as_echo_n "checking whether the C compiler still works... " >&6; }
5054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5055 /* end confdefs.h. */
5065 if ac_fn_c_try_link "$LINENO"; then :
5066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5067 $as_echo "yes" >&6; }
5069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5070 $as_echo "no" >&6; }
5071 as_fn_error $? "cannot proceed" "$LINENO" 5
5073 rm -f core conftest.err conftest.$ac_objext \
5074 conftest$ac_exeext conftest.$ac_ext
5076 # Defend against gcc -ffast-math
5077 if test "$GCC" = yes; then
5078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5079 /* end confdefs.h. */
5084 #ifdef __FAST_MATH__
5091 if ac_fn_c_try_compile "$LINENO"; then :
5094 as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
5096 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5100 ac_cpp='$CPP $CPPFLAGS'
5101 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5102 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5103 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5105 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5106 # On Suns, sometimes $CPP names a directory.
5107 if test -n "$CPP" && test -d "$CPP"; then
5110 if test -z "$CPP"; then
5111 if ${ac_cv_prog_CPP+:} false; then :
5112 $as_echo_n "(cached) " >&6
5114 # Double quotes because CPP needs to be expanded
5115 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5118 for ac_c_preproc_warn_flag in '' yes
5120 # Use a header file that comes with gcc, so configuring glibc
5121 # with a fresh cross-compiler works.
5122 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5123 # <limits.h> exists even on freestanding compilers.
5124 # On the NeXT, cc -E runs the code through the compiler's parser,
5125 # not just through cpp. "Syntax error" is here to catch this case.
5126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5127 /* end confdefs.h. */
5129 # include <limits.h>
5131 # include <assert.h>
5135 if ac_fn_c_try_cpp "$LINENO"; then :
5138 # Broken: fails on valid input.
5141 rm -f conftest.err conftest.i conftest.$ac_ext
5143 # OK, works on sane cases. Now check whether nonexistent headers
5144 # can be detected and how.
5145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5146 /* end confdefs.h. */
5147 #include <ac_nonexistent.h>
5149 if ac_fn_c_try_cpp "$LINENO"; then :
5150 # Broken: success on invalid input.
5153 # Passes both tests.
5157 rm -f conftest.err conftest.i conftest.$ac_ext
5160 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5161 rm -f conftest.i conftest.err conftest.$ac_ext
5162 if $ac_preproc_ok; then :
5174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5175 $as_echo "$CPP" >&6; }
5177 for ac_c_preproc_warn_flag in '' yes
5179 # Use a header file that comes with gcc, so configuring glibc
5180 # with a fresh cross-compiler works.
5181 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5182 # <limits.h> exists even on freestanding compilers.
5183 # On the NeXT, cc -E runs the code through the compiler's parser,
5184 # not just through cpp. "Syntax error" is here to catch this case.
5185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5186 /* end confdefs.h. */
5188 # include <limits.h>
5190 # include <assert.h>
5194 if ac_fn_c_try_cpp "$LINENO"; then :
5197 # Broken: fails on valid input.
5200 rm -f conftest.err conftest.i conftest.$ac_ext
5202 # OK, works on sane cases. Now check whether nonexistent headers
5203 # can be detected and how.
5204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5205 /* end confdefs.h. */
5206 #include <ac_nonexistent.h>
5208 if ac_fn_c_try_cpp "$LINENO"; then :
5209 # Broken: success on invalid input.
5212 # Passes both tests.
5216 rm -f conftest.err conftest.i conftest.$ac_ext
5219 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5220 rm -f conftest.i conftest.err conftest.$ac_ext
5221 if $ac_preproc_ok; then :
5224 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5225 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5226 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5227 See \`config.log' for more details" "$LINENO" 5; }
5231 ac_cpp='$CPP $CPPFLAGS'
5232 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5233 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5234 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5240 # Set up TAS assembly code if needed; the template file has now had its
5241 # chance to request this.
5243 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
5246 if test "$need_tas" = yes ; then
5255 # Automatic dependency tracking
5259 # Check whether --enable-depend was given.
5260 if test "${enable_depend+set}" = set; then :
5261 enableval=$enable_depend;
5270 as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
5284 # Enable assert checks
5288 # Check whether --enable-cassert was given.
5289 if test "${enable_cassert+set}" = set; then :
5290 enableval=$enable_cassert;
5294 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
5301 as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
5314 # Include directories
5317 IFS="${IFS}${PATH_SEPARATOR}"
5318 # SRCH_INC comes from the template file
5319 for dir in $with_includes $SRCH_INC; do
5320 if test -d "$dir"; then
5321 INCLUDES="$INCLUDES -I$dir"
5323 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
5324 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
5332 # Library directories
5335 IFS="${IFS}${PATH_SEPARATOR}"
5336 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
5337 for dir in $LIBRARY_DIRS $SRCH_LIB; do
5338 if test -d "$dir"; then
5339 LIBDIRS="$LIBDIRS -L$dir"
5341 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
5342 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
5348 # Enable thread-safe client libraries
5350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
5351 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
5354 # Check whether --enable-thread-safety was given.
5355 if test "${enable_thread_safety+set}" = set; then :
5356 enableval=$enable_thread_safety;
5365 as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
5370 enable_thread_safety=yes
5375 if test "$enable_thread_safety" = yes; then
5377 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
5380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
5381 $as_echo "$enable_thread_safety" >&6; }
5387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
5388 $as_echo_n "checking whether to build with ICU support... " >&6; }
5392 # Check whether --with-icu was given.
5393 if test "${with_icu+set}" = set; then :
5398 $as_echo "#define USE_ICU 1" >>confdefs.h
5405 as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
5415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
5416 $as_echo "$with_icu" >&6; }
5419 if test "$with_icu" = yes; then
5427 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
5428 if test -n "$ac_tool_prefix"; then
5429 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
5430 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
5431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5432 $as_echo_n "checking for $ac_word... " >&6; }
5433 if ${ac_cv_path_PKG_CONFIG+:} false; then :
5434 $as_echo_n "(cached) " >&6
5438 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5441 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5445 test -z "$as_dir" && as_dir=.
5446 for ac_exec_ext in '' $ac_executable_extensions; do
5447 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5448 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5449 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5459 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5460 if test -n "$PKG_CONFIG"; then
5461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
5462 $as_echo "$PKG_CONFIG" >&6; }
5464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5465 $as_echo "no" >&6; }
5470 if test -z "$ac_cv_path_PKG_CONFIG"; then
5471 ac_pt_PKG_CONFIG=$PKG_CONFIG
5472 # Extract the first word of "pkg-config", so it can be a program name with args.
5473 set dummy pkg-config; ac_word=$2
5474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5475 $as_echo_n "checking for $ac_word... " >&6; }
5476 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
5477 $as_echo_n "(cached) " >&6
5479 case $ac_pt_PKG_CONFIG in
5481 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
5484 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5488 test -z "$as_dir" && as_dir=.
5489 for ac_exec_ext in '' $ac_executable_extensions; do
5490 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5491 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5492 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5502 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
5503 if test -n "$ac_pt_PKG_CONFIG"; then
5504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
5505 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
5507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5508 $as_echo "no" >&6; }
5511 if test "x$ac_pt_PKG_CONFIG" = x; then
5514 case $cross_compiling:$ac_tool_warned in
5516 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5517 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5518 ac_tool_warned=yes ;;
5520 PKG_CONFIG=$ac_pt_PKG_CONFIG
5523 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
5527 if test -n "$PKG_CONFIG"; then
5528 _pkg_min_version=0.9.0
5529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
5530 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
5531 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
5532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5533 $as_echo "yes" >&6; }
5535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5536 $as_echo "no" >&6; }
5542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
5543 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
5545 if test -n "$ICU_CFLAGS"; then
5546 pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
5547 elif test -n "$PKG_CONFIG"; then
5548 if test -n "$PKG_CONFIG" && \
5549 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
5550 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
5552 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5553 test $ac_status = 0; }; then
5554 pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
5555 test "x$?" != "x0" && pkg_failed=yes
5562 if test -n "$ICU_LIBS"; then
5563 pkg_cv_ICU_LIBS="$ICU_LIBS"
5564 elif test -n "$PKG_CONFIG"; then
5565 if test -n "$PKG_CONFIG" && \
5566 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
5567 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
5569 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5570 test $ac_status = 0; }; then
5571 pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
5572 test "x$?" != "x0" && pkg_failed=yes
5582 if test $pkg_failed = yes; then
5583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5584 $as_echo "no" >&6; }
5586 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
5587 _pkg_short_errors_supported=yes
5589 _pkg_short_errors_supported=no
5591 if test $_pkg_short_errors_supported = yes; then
5592 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
5594 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
5596 # Put the nasty error message in config.log where it belongs
5597 echo "$ICU_PKG_ERRORS" >&5
5599 as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
5603 Consider adjusting the PKG_CONFIG_PATH environment variable if you
5604 installed software in a non-standard prefix.
5606 Alternatively, you may set the environment variables ICU_CFLAGS
5607 and ICU_LIBS to avoid the need to call pkg-config.
5608 See the pkg-config man page for more details." "$LINENO" 5
5609 elif test $pkg_failed = untried; then
5610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5611 $as_echo "no" >&6; }
5612 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5613 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5614 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
5615 is in your PATH or set the PKG_CONFIG environment variable to the full
5618 Alternatively, you may set the environment variables ICU_CFLAGS
5619 and ICU_LIBS to avoid the need to call pkg-config.
5620 See the pkg-config man page for more details.
5622 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
5623 See \`config.log' for more details" "$LINENO" 5; }
5625 ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
5626 ICU_LIBS=$pkg_cv_ICU_LIBS
5627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5628 $as_echo "yes" >&6; }
5634 # Optionally build Tcl modules (PL/Tcl)
5636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
5637 $as_echo_n "checking whether to build with Tcl... " >&6; }
5641 # Check whether --with-tcl was given.
5642 if test "${with_tcl+set}" = set; then :
5652 as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
5662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
5663 $as_echo "$with_tcl" >&6; }
5666 # We see if the path to the Tcl/Tk configuration scripts is specified.
5667 # This will override the use of tclsh to find the paths to search.
5672 # Check whether --with-tclconfig was given.
5673 if test "${with_tclconfig+set}" = set; then :
5674 withval=$with_tclconfig;
5677 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5680 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
5692 # Optionally build Perl modules (PL/Perl)
5694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
5695 $as_echo_n "checking whether to build Perl modules... " >&6; }
5699 # Check whether --with-perl was given.
5700 if test "${with_perl+set}" = set; then :
5710 as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
5720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
5721 $as_echo "$with_perl" >&6; }
5725 # Optionally build Python modules (PL/Python)
5727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
5728 $as_echo_n "checking whether to build Python modules... " >&6; }
5732 # Check whether --with-python was given.
5733 if test "${with_python+set}" = set; then :
5734 withval=$with_python;
5743 as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
5753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
5754 $as_echo "$with_python" >&6; }
5760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
5761 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
5765 # Check whether --with-gssapi was given.
5766 if test "${with_gssapi+set}" = set; then :
5767 withval=$with_gssapi;
5772 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
5774 krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
5781 as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
5791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
5792 $as_echo "$with_gssapi" >&6; }
5799 # Kerberos configuration parameters
5804 # Check whether --with-krb-srvnam was given.
5805 if test "${with_krb_srvnam+set}" = set; then :
5806 withval=$with_krb_srvnam;
5809 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5812 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
5820 with_krb_srvnam="postgres"
5825 cat >>confdefs.h <<_ACEOF
5826 #define PG_KRB_SRVNAM "$with_krb_srvnam"
5834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
5835 $as_echo_n "checking whether to build with PAM support... " >&6; }
5839 # Check whether --with-pam was given.
5840 if test "${with_pam+set}" = set; then :
5845 $as_echo "#define USE_PAM 1" >>confdefs.h
5852 as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
5862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
5863 $as_echo "$with_pam" >&6; }
5869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
5870 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
5874 # Check whether --with-bsd-auth was given.
5875 if test "${with_bsd_auth+set}" = set; then :
5876 withval=$with_bsd_auth;
5880 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
5887 as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
5897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
5898 $as_echo "$with_bsd_auth" >&6; }
5904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
5905 $as_echo_n "checking whether to build with LDAP support... " >&6; }
5909 # Check whether --with-ldap was given.
5910 if test "${with_ldap+set}" = set; then :
5915 $as_echo "#define USE_LDAP 1" >>confdefs.h
5922 as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
5932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
5933 $as_echo "$with_ldap" >&6; }
5939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
5940 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
5944 # Check whether --with-bonjour was given.
5945 if test "${with_bonjour+set}" = set; then :
5946 withval=$with_bonjour;
5950 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
5957 as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
5967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
5968 $as_echo "$with_bonjour" >&6; }
5974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with OpenSSL support" >&5
5975 $as_echo_n "checking whether to build with OpenSSL support... " >&6; }
5979 # Check whether --with-openssl was given.
5980 if test "${with_openssl+set}" = set; then :
5981 withval=$with_openssl;
5985 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
5992 as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
6002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5
6003 $as_echo "$with_openssl" >&6; }
6009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
6010 $as_echo_n "checking whether to build with SELinux support... " >&6; }
6014 # Check whether --with-selinux was given.
6015 if test "${with_selinux+set}" = set; then :
6016 withval=$with_selinux;
6025 as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
6036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
6037 $as_echo "$with_selinux" >&6; }
6042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
6043 $as_echo_n "checking whether to build with systemd support... " >&6; }
6047 # Check whether --with-systemd was given.
6048 if test "${with_systemd+set}" = set; then :
6049 withval=$with_systemd;
6053 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
6060 as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
6071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
6072 $as_echo "$with_systemd" >&6; }
6080 # Check whether --with-readline was given.
6081 if test "${with_readline+set}" = set; then :
6082 withval=$with_readline;
6091 as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
6101 # readline on MinGW has problems with backslashes in psql and other bugs.
6102 # This is particularly a problem with non-US code pages.
6103 # Therefore disable its use until we understand the cause. 2004-07-20
6104 if test "$PORTNAME" = "win32"; then
6105 if test "$with_readline" = yes; then
6106 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
6107 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
6119 # Check whether --with-libedit-preferred was given.
6120 if test "${with_libedit_preferred+set}" = set; then :
6121 withval=$with_libedit_preferred;
6130 as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
6135 with_libedit_preferred=no
6145 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
6146 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
6147 # UUID library. More than one of these might be present on a given platform,
6148 # so we make the user say which one she wants.
6153 # Check whether --with-uuid was given.
6154 if test "${with_uuid+set}" = set; then :
6158 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
6161 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
6171 if test x"$with_uuid" = x"" ; then
6177 # Check whether --with-ossp-uuid was given.
6178 if test "${with_ossp_uuid+set}" = set; then :
6179 withval=$with_ossp_uuid;
6188 as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
6198 if test "$with_ossp_uuid" = yes ; then
6202 if test "$with_uuid" = bsd ; then
6204 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
6206 UUID_EXTRA_OBJS="md5.o sha1.o"
6207 elif test "$with_uuid" = e2fs ; then
6209 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
6211 UUID_EXTRA_OBJS="md5.o sha1.o"
6212 elif test "$with_uuid" = ossp ; then
6214 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
6217 elif test "$with_uuid" = no ; then
6220 as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
6232 # Check whether --with-libxml was given.
6233 if test "${with_libxml+set}" = set; then :
6234 withval=$with_libxml;
6238 $as_echo "#define USE_LIBXML 1" >>confdefs.h
6245 as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
6256 if test "$with_libxml" = yes ; then
6257 for ac_prog in xml2-config
6259 # Extract the first word of "$ac_prog", so it can be a program name with args.
6260 set dummy $ac_prog; ac_word=$2
6261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6262 $as_echo_n "checking for $ac_word... " >&6; }
6263 if ${ac_cv_prog_XML2_CONFIG+:} false; then :
6264 $as_echo_n "(cached) " >&6
6266 if test -n "$XML2_CONFIG"; then
6267 ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test.
6269 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6273 test -z "$as_dir" && as_dir=.
6274 for ac_exec_ext in '' $ac_executable_extensions; do
6275 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6276 ac_cv_prog_XML2_CONFIG="$ac_prog"
6277 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6286 XML2_CONFIG=$ac_cv_prog_XML2_CONFIG
6287 if test -n "$XML2_CONFIG"; then
6288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
6289 $as_echo "$XML2_CONFIG" >&6; }
6291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6292 $as_echo "no" >&6; }
6296 test -n "$XML2_CONFIG" && break
6299 if test -n "$XML2_CONFIG"; then
6300 for pgac_option in `$XML2_CONFIG --cflags`; do
6301 case $pgac_option in
6302 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
6305 for pgac_option in `$XML2_CONFIG --libs`; do
6306 case $pgac_option in
6307 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
6321 # Check whether --with-libxslt was given.
6322 if test "${with_libxslt+set}" = set; then :
6323 withval=$with_libxslt;
6327 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
6334 as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
6354 # Check whether --with-system-tzdata was given.
6355 if test "${with_system_tzdata+set}" = set; then :
6356 withval=$with_system_tzdata;
6359 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
6362 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
6380 # Check whether --with-zlib was given.
6381 if test "${with_zlib+set}" = set; then :
6391 as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
6407 # Assume system is ELF if it predefines __ELF__ as 1,
6408 # otherwise believe host_os based default.
6410 freebsd1*|freebsd2*) elf=no;;
6411 freebsd3*|freebsd4*) elf=yes;;
6415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6416 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6417 if ${ac_cv_path_GREP+:} false; then :
6418 $as_echo_n "(cached) " >&6
6420 if test -z "$GREP"; then
6421 ac_path_GREP_found=false
6422 # Loop through the user's path and test for each of PROGNAME-LIST
6423 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6424 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6427 test -z "$as_dir" && as_dir=.
6428 for ac_prog in grep ggrep; do
6429 for ac_exec_ext in '' $ac_executable_extensions; do
6430 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6431 as_fn_executable_p "$ac_path_GREP" || continue
6432 # Check for GNU ac_path_GREP and select it if it is found.
6433 # Check for GNU $ac_path_GREP
6434 case `"$ac_path_GREP" --version 2>&1` in
6436 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6439 $as_echo_n 0123456789 >"conftest.in"
6442 cat "conftest.in" "conftest.in" >"conftest.tmp"
6443 mv "conftest.tmp" "conftest.in"
6444 cp "conftest.in" "conftest.nl"
6445 $as_echo 'GREP' >> "conftest.nl"
6446 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6447 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6448 as_fn_arith $ac_count + 1 && ac_count=$as_val
6449 if test $ac_count -gt ${ac_path_GREP_max-0}; then
6450 # Best one so far, save it but keep looking for a better one
6451 ac_cv_path_GREP="$ac_path_GREP"
6452 ac_path_GREP_max=$ac_count
6454 # 10*(2^10) chars as input seems more than enough
6455 test $ac_count -gt 10 && break
6457 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6460 $ac_path_GREP_found && break 3
6465 if test -z "$ac_cv_path_GREP"; then
6466 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6469 ac_cv_path_GREP=$GREP
6473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6474 $as_echo "$ac_cv_path_GREP" >&6; }
6475 GREP="$ac_cv_path_GREP"
6478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6479 $as_echo_n "checking for egrep... " >&6; }
6480 if ${ac_cv_path_EGREP+:} false; then :
6481 $as_echo_n "(cached) " >&6
6483 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6484 then ac_cv_path_EGREP="$GREP -E"
6486 if test -z "$EGREP"; then
6487 ac_path_EGREP_found=false
6488 # Loop through the user's path and test for each of PROGNAME-LIST
6489 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6490 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6493 test -z "$as_dir" && as_dir=.
6494 for ac_prog in egrep; do
6495 for ac_exec_ext in '' $ac_executable_extensions; do
6496 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6497 as_fn_executable_p "$ac_path_EGREP" || continue
6498 # Check for GNU ac_path_EGREP and select it if it is found.
6499 # Check for GNU $ac_path_EGREP
6500 case `"$ac_path_EGREP" --version 2>&1` in
6502 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6505 $as_echo_n 0123456789 >"conftest.in"
6508 cat "conftest.in" "conftest.in" >"conftest.tmp"
6509 mv "conftest.tmp" "conftest.in"
6510 cp "conftest.in" "conftest.nl"
6511 $as_echo 'EGREP' >> "conftest.nl"
6512 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6513 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6514 as_fn_arith $ac_count + 1 && ac_count=$as_val
6515 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6516 # Best one so far, save it but keep looking for a better one
6517 ac_cv_path_EGREP="$ac_path_EGREP"
6518 ac_path_EGREP_max=$ac_count
6520 # 10*(2^10) chars as input seems more than enough
6521 test $ac_count -gt 10 && break
6523 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6526 $ac_path_EGREP_found && break 3
6531 if test -z "$ac_cv_path_EGREP"; then
6532 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6535 ac_cv_path_EGREP=$EGREP
6540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6541 $as_echo "$ac_cv_path_EGREP" >&6; }
6542 EGREP="$ac_cv_path_EGREP"
6545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6546 /* end confdefs.h. */
6552 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6553 $EGREP "yes" >/dev/null 2>&1; then :
6556 if test "X$elf" = "Xyes" ; then
6570 CPPFLAGS="$CPPFLAGS $INCLUDES"
6571 LDFLAGS="$LDFLAGS $LIBDIRS"
6577 # Check whether --with-gnu-ld was given.
6578 if test "${with_gnu_ld+set}" = set; then :
6579 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6585 if test "$GCC" = yes; then
6586 # Check if gcc -print-prog-name=ld gives a path.
6587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
6588 $as_echo_n "checking for ld used by GCC... " >&6; }
6591 # gcc leaves a trailing carriage return which upsets mingw
6592 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6594 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6597 # Accept absolute paths.
6598 [\\/]* | [A-Za-z]:[\\/]*)
6599 re_direlt='/[^/][^/]*/\.\./'
6600 # Canonicalize the path of ld
6601 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6602 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6603 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6605 test -z "$LD" && LD="$ac_prog"
6608 # If it fails, then pretend we aren't using GCC.
6612 # If it is relative, then search for the first ld in PATH.
6616 elif test "$with_gnu_ld" = yes; then
6617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6618 $as_echo_n "checking for GNU ld... " >&6; }
6620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6621 $as_echo_n "checking for non-GNU ld... " >&6; }
6623 if ${ac_cv_path_LD+:} false; then :
6624 $as_echo_n "(cached) " >&6
6626 if test -z "$LD"; then
6627 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6628 for ac_dir in $PATH; do
6629 test -z "$ac_dir" && ac_dir=.
6630 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6631 ac_cv_path_LD="$ac_dir/$ac_prog"
6632 # Check to see if the program is GNU ld. I'd rather use --version,
6633 # but apparently some GNU ld's only accept -v.
6634 # Break only if it was the GNU/non-GNU ld that we prefer.
6635 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
6636 test "$with_gnu_ld" != no && break
6638 test "$with_gnu_ld" != yes && break
6644 ac_cv_path_LD="$LD" # Let the user override the test with a path.
6649 if test -n "$LD"; then
6650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6651 $as_echo "$LD" >&6; }
6653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6654 $as_echo "no" >&6; }
6656 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6658 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6659 if ${ac_cv_prog_gnu_ld+:} false; then :
6660 $as_echo_n "(cached) " >&6
6662 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
6663 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
6664 ac_cv_prog_gnu_ld=yes
6666 ac_cv_prog_gnu_ld=no
6669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
6670 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
6671 with_gnu_ld=$ac_cv_prog_gnu_ld
6676 if test -n "$ac_tool_prefix"; then
6677 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6678 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6680 $as_echo_n "checking for $ac_word... " >&6; }
6681 if ${ac_cv_prog_RANLIB+:} false; then :
6682 $as_echo_n "(cached) " >&6
6684 if test -n "$RANLIB"; then
6685 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6687 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6691 test -z "$as_dir" && as_dir=.
6692 for ac_exec_ext in '' $ac_executable_extensions; do
6693 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6694 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6695 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6704 RANLIB=$ac_cv_prog_RANLIB
6705 if test -n "$RANLIB"; then
6706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6707 $as_echo "$RANLIB" >&6; }
6709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6710 $as_echo "no" >&6; }
6715 if test -z "$ac_cv_prog_RANLIB"; then
6716 ac_ct_RANLIB=$RANLIB
6717 # Extract the first word of "ranlib", so it can be a program name with args.
6718 set dummy ranlib; ac_word=$2
6719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6720 $as_echo_n "checking for $ac_word... " >&6; }
6721 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6722 $as_echo_n "(cached) " >&6
6724 if test -n "$ac_ct_RANLIB"; then
6725 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6727 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6731 test -z "$as_dir" && as_dir=.
6732 for ac_exec_ext in '' $ac_executable_extensions; do
6733 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6734 ac_cv_prog_ac_ct_RANLIB="ranlib"
6735 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6744 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6745 if test -n "$ac_ct_RANLIB"; then
6746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6747 $as_echo "$ac_ct_RANLIB" >&6; }
6749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6750 $as_echo "no" >&6; }
6753 if test "x$ac_ct_RANLIB" = x; then
6756 case $cross_compiling:$ac_tool_warned in
6758 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6759 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6760 ac_tool_warned=yes ;;
6762 RANLIB=$ac_ct_RANLIB
6765 RANLIB="$ac_cv_prog_RANLIB"
6769 if test -n "$ac_tool_prefix"; then
6770 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6771 set dummy ${ac_tool_prefix}strip; ac_word=$2
6772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6773 $as_echo_n "checking for $ac_word... " >&6; }
6774 if ${ac_cv_prog_STRIP+:} false; then :
6775 $as_echo_n "(cached) " >&6
6777 if test -n "$STRIP"; then
6778 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6780 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6784 test -z "$as_dir" && as_dir=.
6785 for ac_exec_ext in '' $ac_executable_extensions; do
6786 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6787 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6788 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6797 STRIP=$ac_cv_prog_STRIP
6798 if test -n "$STRIP"; then
6799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6800 $as_echo "$STRIP" >&6; }
6802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6803 $as_echo "no" >&6; }
6808 if test -z "$ac_cv_prog_STRIP"; then
6810 # Extract the first word of "strip", so it can be a program name with args.
6811 set dummy strip; ac_word=$2
6812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6813 $as_echo_n "checking for $ac_word... " >&6; }
6814 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6815 $as_echo_n "(cached) " >&6
6817 if test -n "$ac_ct_STRIP"; then
6818 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6820 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6824 test -z "$as_dir" && as_dir=.
6825 for ac_exec_ext in '' $ac_executable_extensions; do
6826 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6827 ac_cv_prog_ac_ct_STRIP="strip"
6828 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6837 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6838 if test -n "$ac_ct_STRIP"; then
6839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6840 $as_echo "$ac_ct_STRIP" >&6; }
6842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6843 $as_echo "no" >&6; }
6846 if test "x$ac_ct_STRIP" = x; then
6849 case $cross_compiling:$ac_tool_warned in
6851 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6852 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6853 ac_tool_warned=yes ;;
6858 STRIP="$ac_cv_prog_STRIP"
6862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
6863 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
6864 if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
6865 STRIP_STATIC_LIB="$STRIP -x"
6866 STRIP_SHARED_LIB="$STRIP --strip-unneeded"
6867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6868 $as_echo "yes" >&6; }
6873 STRIP_STATIC_LIB=$STRIP
6874 STRIP_SHARED_LIB=$STRIP
6875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6876 $as_echo "yes" >&6; }
6881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6882 $as_echo "no" >&6; }
6889 if test -n "$ac_tool_prefix"; then
6890 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6891 set dummy ${ac_tool_prefix}ar; ac_word=$2
6892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6893 $as_echo_n "checking for $ac_word... " >&6; }
6894 if ${ac_cv_prog_AR+:} false; then :
6895 $as_echo_n "(cached) " >&6
6897 if test -n "$AR"; then
6898 ac_cv_prog_AR="$AR" # Let the user override the test.
6900 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6904 test -z "$as_dir" && as_dir=.
6905 for ac_exec_ext in '' $ac_executable_extensions; do
6906 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6907 ac_cv_prog_AR="${ac_tool_prefix}ar"
6908 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6918 if test -n "$AR"; then
6919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6920 $as_echo "$AR" >&6; }
6922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6923 $as_echo "no" >&6; }
6928 if test -z "$ac_cv_prog_AR"; then
6930 # Extract the first word of "ar", so it can be a program name with args.
6931 set dummy ar; ac_word=$2
6932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6933 $as_echo_n "checking for $ac_word... " >&6; }
6934 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6935 $as_echo_n "(cached) " >&6
6937 if test -n "$ac_ct_AR"; then
6938 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6940 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6944 test -z "$as_dir" && as_dir=.
6945 for ac_exec_ext in '' $ac_executable_extensions; do
6946 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6947 ac_cv_prog_ac_ct_AR="ar"
6948 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6957 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6958 if test -n "$ac_ct_AR"; then
6959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6960 $as_echo "$ac_ct_AR" >&6; }
6962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6963 $as_echo "no" >&6; }
6966 if test "x$ac_ct_AR" = x; then
6969 case $cross_compiling:$ac_tool_warned in
6971 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6972 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6973 ac_tool_warned=yes ;;
6981 if test "$PORTNAME" = "win32"; then
6982 if test -n "$ac_tool_prefix"; then
6983 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6984 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6986 $as_echo_n "checking for $ac_word... " >&6; }
6987 if ${ac_cv_prog_DLLTOOL+:} false; then :
6988 $as_echo_n "(cached) " >&6
6990 if test -n "$DLLTOOL"; then
6991 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6993 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6997 test -z "$as_dir" && as_dir=.
6998 for ac_exec_ext in '' $ac_executable_extensions; do
6999 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7000 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7001 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7010 DLLTOOL=$ac_cv_prog_DLLTOOL
7011 if test -n "$DLLTOOL"; then
7012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7013 $as_echo "$DLLTOOL" >&6; }
7015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7016 $as_echo "no" >&6; }
7021 if test -z "$ac_cv_prog_DLLTOOL"; then
7022 ac_ct_DLLTOOL=$DLLTOOL
7023 # Extract the first word of "dlltool", so it can be a program name with args.
7024 set dummy dlltool; ac_word=$2
7025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7026 $as_echo_n "checking for $ac_word... " >&6; }
7027 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
7028 $as_echo_n "(cached) " >&6
7030 if test -n "$ac_ct_DLLTOOL"; then
7031 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7033 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7037 test -z "$as_dir" && as_dir=.
7038 for ac_exec_ext in '' $ac_executable_extensions; do
7039 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7040 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7041 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7050 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7051 if test -n "$ac_ct_DLLTOOL"; then
7052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7053 $as_echo "$ac_ct_DLLTOOL" >&6; }
7055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7056 $as_echo "no" >&6; }
7059 if test "x$ac_ct_DLLTOOL" = x; then
7062 case $cross_compiling:$ac_tool_warned in
7064 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7065 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7066 ac_tool_warned=yes ;;
7068 DLLTOOL=$ac_ct_DLLTOOL
7071 DLLTOOL="$ac_cv_prog_DLLTOOL"
7074 if test -n "$ac_tool_prefix"; then
7075 # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
7076 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
7077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7078 $as_echo_n "checking for $ac_word... " >&6; }
7079 if ${ac_cv_prog_DLLWRAP+:} false; then :
7080 $as_echo_n "(cached) " >&6
7082 if test -n "$DLLWRAP"; then
7083 ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
7085 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7089 test -z "$as_dir" && as_dir=.
7090 for ac_exec_ext in '' $ac_executable_extensions; do
7091 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7092 ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
7093 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7102 DLLWRAP=$ac_cv_prog_DLLWRAP
7103 if test -n "$DLLWRAP"; then
7104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
7105 $as_echo "$DLLWRAP" >&6; }
7107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7108 $as_echo "no" >&6; }
7113 if test -z "$ac_cv_prog_DLLWRAP"; then
7114 ac_ct_DLLWRAP=$DLLWRAP
7115 # Extract the first word of "dllwrap", so it can be a program name with args.
7116 set dummy dllwrap; ac_word=$2
7117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7118 $as_echo_n "checking for $ac_word... " >&6; }
7119 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
7120 $as_echo_n "(cached) " >&6
7122 if test -n "$ac_ct_DLLWRAP"; then
7123 ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
7125 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7129 test -z "$as_dir" && as_dir=.
7130 for ac_exec_ext in '' $ac_executable_extensions; do
7131 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7132 ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
7133 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7142 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
7143 if test -n "$ac_ct_DLLWRAP"; then
7144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
7145 $as_echo "$ac_ct_DLLWRAP" >&6; }
7147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7148 $as_echo "no" >&6; }
7151 if test "x$ac_ct_DLLWRAP" = x; then
7154 case $cross_compiling:$ac_tool_warned in
7156 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7157 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7158 ac_tool_warned=yes ;;
7160 DLLWRAP=$ac_ct_DLLWRAP
7163 DLLWRAP="$ac_cv_prog_DLLWRAP"
7166 if test -n "$ac_tool_prefix"; then
7167 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7168 set dummy ${ac_tool_prefix}windres; ac_word=$2
7169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7170 $as_echo_n "checking for $ac_word... " >&6; }
7171 if ${ac_cv_prog_WINDRES+:} false; then :
7172 $as_echo_n "(cached) " >&6
7174 if test -n "$WINDRES"; then
7175 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7177 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7181 test -z "$as_dir" && as_dir=.
7182 for ac_exec_ext in '' $ac_executable_extensions; do
7183 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7184 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
7185 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7194 WINDRES=$ac_cv_prog_WINDRES
7195 if test -n "$WINDRES"; then
7196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7197 $as_echo "$WINDRES" >&6; }
7199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7200 $as_echo "no" >&6; }
7205 if test -z "$ac_cv_prog_WINDRES"; then
7206 ac_ct_WINDRES=$WINDRES
7207 # Extract the first word of "windres", so it can be a program name with args.
7208 set dummy windres; ac_word=$2
7209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7210 $as_echo_n "checking for $ac_word... " >&6; }
7211 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
7212 $as_echo_n "(cached) " >&6
7214 if test -n "$ac_ct_WINDRES"; then
7215 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7217 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7221 test -z "$as_dir" && as_dir=.
7222 for ac_exec_ext in '' $ac_executable_extensions; do
7223 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7224 ac_cv_prog_ac_ct_WINDRES="windres"
7225 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7234 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7235 if test -n "$ac_ct_WINDRES"; then
7236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7237 $as_echo "$ac_ct_WINDRES" >&6; }
7239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7240 $as_echo "no" >&6; }
7243 if test "x$ac_ct_WINDRES" = x; then
7246 case $cross_compiling:$ac_tool_warned in
7248 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7249 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7250 ac_tool_warned=yes ;;
7252 WINDRES=$ac_ct_WINDRES
7255 WINDRES="$ac_cv_prog_WINDRES"
7260 # Find a good install program. We prefer a C program (faster),
7261 # so one script is as good as another. But avoid the broken or
7262 # incompatible versions:
7263 # SysV /etc/install, /usr/sbin/install
7264 # SunOS /usr/etc/install
7265 # IRIX /sbin/install
7267 # AmigaOS /C/install, which installs bootblocks on floppy discs
7268 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7269 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
7270 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7271 # OS/2's system install, which has a completely different semantic
7272 # ./install, which can be erroneously created by make from ./install.sh.
7273 # Reject install programs that cannot install multiple files.
7274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7275 $as_echo_n "checking for a BSD-compatible install... " >&6; }
7276 if test -z "$INSTALL"; then
7277 if ${ac_cv_path_install+:} false; then :
7278 $as_echo_n "(cached) " >&6
7280 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7284 test -z "$as_dir" && as_dir=.
7285 # Account for people who put trailing slashes in PATH elements.
7286 case $as_dir/ in #((
7287 ./ | .// | /[cC]/* | \
7288 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7289 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7292 # OSF1 and SCO ODT 3.0 have their own names for install.
7293 # Don't use installbsd from OSF since it installs stuff as root
7295 for ac_prog in ginstall scoinst install; do
7296 for ac_exec_ext in '' $ac_executable_extensions; do
7297 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
7298 if test $ac_prog = install &&
7299 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7300 # AIX install. It has an incompatible calling convention.
7302 elif test $ac_prog = install &&
7303 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7304 # program-specific install script used by HP pwplus--don't use.
7307 rm -rf conftest.one conftest.two conftest.dir
7308 echo one > conftest.one
7309 echo two > conftest.two
7311 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7312 test -s conftest.one && test -s conftest.two &&
7313 test -s conftest.dir/conftest.one &&
7314 test -s conftest.dir/conftest.two
7316 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7329 rm -rf conftest.one conftest.two conftest.dir
7332 if test "${ac_cv_path_install+set}" = set; then
7333 INSTALL=$ac_cv_path_install
7335 # As a last resort, use the slow shell script. Don't cache a
7336 # value for INSTALL within a source directory, because that will
7337 # break other packages using the cache if that directory is
7338 # removed, or if the value is a relative name.
7339 INSTALL=$ac_install_sh
7342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7343 $as_echo "$INSTALL" >&6; }
7345 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7346 # It thinks the first close brace ends the variable substitution.
7347 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7349 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7351 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7353 # When Autoconf chooses install-sh as install program it tries to generate
7354 # a relative path to it in each makefile where it substitutes it. This clashes
7355 # with our Makefile.global concept. This workaround helps.
7357 *install-sh*) install_bin='';;
7358 *) install_bin=$INSTALL;;
7362 # Extract the first word of "tar", so it can be a program name with args.
7363 set dummy tar; ac_word=$2
7364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7365 $as_echo_n "checking for $ac_word... " >&6; }
7366 if ${ac_cv_path_TAR+:} false; then :
7367 $as_echo_n "(cached) " >&6
7371 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
7374 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7378 test -z "$as_dir" && as_dir=.
7379 for ac_exec_ext in '' $ac_executable_extensions; do
7380 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7381 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
7382 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7393 if test -n "$TAR"; then
7394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
7395 $as_echo "$TAR" >&6; }
7397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7398 $as_echo "no" >&6; }
7402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7403 $as_echo_n "checking whether ln -s works... " >&6; }
7405 if test "$LN_S" = "ln -s"; then
7406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7407 $as_echo "yes" >&6; }
7409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7410 $as_echo "no, using $LN_S" >&6; }
7413 for ac_prog in gawk mawk nawk awk
7415 # Extract the first word of "$ac_prog", so it can be a program name with args.
7416 set dummy $ac_prog; ac_word=$2
7417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7418 $as_echo_n "checking for $ac_word... " >&6; }
7419 if ${ac_cv_prog_AWK+:} false; then :
7420 $as_echo_n "(cached) " >&6
7422 if test -n "$AWK"; then
7423 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7425 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7429 test -z "$as_dir" && as_dir=.
7430 for ac_exec_ext in '' $ac_executable_extensions; do
7431 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7432 ac_cv_prog_AWK="$ac_prog"
7433 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7443 if test -n "$AWK"; then
7444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7445 $as_echo "$AWK" >&6; }
7447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7448 $as_echo "no" >&6; }
7452 test -n "$AWK" && break
7455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7456 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7457 if test -z "$MKDIR_P"; then
7458 if ${ac_cv_path_mkdir+:} false; then :
7459 $as_echo_n "(cached) " >&6
7461 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7462 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
7465 test -z "$as_dir" && as_dir=.
7466 for ac_prog in mkdir gmkdir; do
7467 for ac_exec_ext in '' $ac_executable_extensions; do
7468 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
7469 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7470 'mkdir (GNU coreutils) '* | \
7471 'mkdir (coreutils) '* | \
7472 'mkdir (fileutils) '4.1*)
7473 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
7483 test -d ./--version && rmdir ./--version
7484 if test "${ac_cv_path_mkdir+set}" = set; then
7485 MKDIR_P="$ac_cv_path_mkdir -p"
7487 # As a last resort, use the slow shell script. Don't cache a
7488 # value for MKDIR_P within a source directory, because that will
7489 # break other packages using the cache if that directory is
7490 # removed, or if the value is a relative name.
7491 MKDIR_P="$ac_install_sh -d"
7494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7495 $as_echo "$MKDIR_P" >&6; }
7497 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
7498 # a relative path to it in each makefile where it substitutes it. This clashes
7499 # with our Makefile.global concept. This workaround helps.
7501 *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
7504 # Let the user override the search
7505 if test -z "$BISON"; then
7506 for ac_prog in bison
7508 # Extract the first word of "$ac_prog", so it can be a program name with args.
7509 set dummy $ac_prog; ac_word=$2
7510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7511 $as_echo_n "checking for $ac_word... " >&6; }
7512 if ${ac_cv_path_BISON+:} false; then :
7513 $as_echo_n "(cached) " >&6
7517 ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
7520 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7524 test -z "$as_dir" && as_dir=.
7525 for ac_exec_ext in '' $ac_executable_extensions; do
7526 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7527 ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
7528 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7538 BISON=$ac_cv_path_BISON
7539 if test -n "$BISON"; then
7540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
7541 $as_echo "$BISON" >&6; }
7543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7544 $as_echo "no" >&6; }
7548 test -n "$BISON" && break
7553 if test "$BISON"; then
7554 pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
7555 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
7556 $as_echo "$as_me: using $pgac_bison_version" >&6;}
7557 if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
7559 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7560 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7561 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
7562 $as_echo "$as_me: WARNING:
7563 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
7564 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
7567 # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
7568 # of the now preferred %name-prefix "base_yy", but the latter
7569 # doesn't work with Bison 2.3 or less. So for now we silence the
7570 # deprecation warnings.
7571 if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
7573 BISONFLAGS="$BISONFLAGS -Wno-deprecated"
7577 if test -z "$BISON"; then
7578 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7579 *** Without Bison you will not be able to build PostgreSQL from Git nor
7580 *** change any of the parser definition files. You can obtain Bison from
7581 *** a GNU mirror site. (If you are using the official distribution of
7582 *** PostgreSQL then you do not need to worry about this, because the Bison
7583 *** output is pre-generated.)" >&5
7584 $as_echo "$as_me: WARNING:
7585 *** Without Bison you will not be able to build PostgreSQL from Git nor
7586 *** change any of the parser definition files. You can obtain Bison from
7587 *** a GNU mirror site. (If you are using the official distribution of
7588 *** PostgreSQL then you do not need to worry about this, because the Bison
7589 *** output is pre-generated.)" >&2;}
7591 # We don't need AC_SUBST(BISON) because AC_PATH_PROG did it
7594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
7595 $as_echo_n "checking for flex... " >&6; }
7596 if ${pgac_cv_path_flex+:} false; then :
7597 $as_echo_n "(cached) " >&6
7599 # Let the user override the test
7600 if test -n "$FLEX"; then
7601 pgac_cv_path_flex=$FLEX
7605 for pgac_dir in $PATH; do
7607 if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
7610 for pgac_prog in flex lex; do
7611 pgac_candidate="$pgac_dir/$pgac_prog"
7612 if test -f "$pgac_candidate" \
7613 && $pgac_candidate --version </dev/null >/dev/null 2>&1
7615 echo '%%' > conftest.l
7616 if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
7617 pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
7618 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;}'
7620 pgac_cv_path_flex=$pgac_candidate
7623 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7624 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7625 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
7626 $as_echo "$as_me: WARNING:
7627 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
7628 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
7634 rm -f conftest.l lex.yy.c
7635 : ${pgac_cv_path_flex=no}
7639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
7640 $as_echo "$pgac_cv_path_flex" >&6; }
7641 if test x"$pgac_cv_path_flex" = x"no"; then
7642 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7643 *** Without Flex you will not be able to build PostgreSQL from Git nor
7644 *** change any of the scanner definition files. You can obtain Flex from
7645 *** a GNU mirror site. (If you are using the official distribution of
7646 *** PostgreSQL then you do not need to worry about this because the Flex
7647 *** output is pre-generated.)" >&5
7648 $as_echo "$as_me: WARNING:
7649 *** Without Flex you will not be able to build PostgreSQL from Git nor
7650 *** change any of the scanner definition files. You can obtain Flex from
7651 *** a GNU mirror site. (If you are using the official distribution of
7652 *** PostgreSQL then you do not need to worry about this because the Flex
7653 *** output is pre-generated.)" >&2;}
7657 FLEX=$pgac_cv_path_flex
7658 pgac_flex_version=`$FLEX --version 2>/dev/null`
7659 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
7660 $as_echo "$as_me: using $pgac_flex_version" >&6;}
7667 # Let the user override the search
7668 if test -z "$PERL"; then
7669 # Extract the first word of "perl", so it can be a program name with args.
7670 set dummy perl; ac_word=$2
7671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7672 $as_echo_n "checking for $ac_word... " >&6; }
7673 if ${ac_cv_path_PERL+:} false; then :
7674 $as_echo_n "(cached) " >&6
7678 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
7681 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7685 test -z "$as_dir" && as_dir=.
7686 for ac_exec_ext in '' $ac_executable_extensions; do
7687 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7688 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
7689 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7699 PERL=$ac_cv_path_PERL
7700 if test -n "$PERL"; then
7701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
7702 $as_echo "$PERL" >&6; }
7704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7705 $as_echo "no" >&6; }
7711 if test "$PERL"; then
7712 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'`
7713 { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
7714 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
7715 if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
7716 $AWK '{ if ($1 == 5 && $2 >= 8) exit 1; else exit 0;}'
7718 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7719 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7720 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&5
7721 $as_echo "$as_me: WARNING:
7722 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
7723 *** Perl version 5.8 or later is required, but this is $pgac_perl_version." >&2;}
7728 if test -z "$PERL"; then
7729 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
7730 *** Without Perl you will not be able to build PostgreSQL from Git.
7731 *** You can obtain Perl from any CPAN mirror site.
7732 *** (If you are using the official distribution of PostgreSQL then you do not
7733 *** need to worry about this, because the Perl output is pre-generated.)" >&5
7734 $as_echo "$as_me: WARNING:
7735 *** Without Perl you will not be able to build PostgreSQL from Git.
7736 *** You can obtain Perl from any CPAN mirror site.
7737 *** (If you are using the official distribution of PostgreSQL then you do not
7738 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
7741 if test "$with_perl" = yes; then
7742 if test -z "$PERL"; then
7743 as_fn_error $? "Perl not found" "$LINENO" 5
7746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
7747 $as_echo_n "checking for Perl archlibexp... " >&6; }
7748 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
7749 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
7750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
7751 $as_echo "$perl_archlibexp" >&6; }
7752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
7753 $as_echo_n "checking for Perl privlibexp... " >&6; }
7754 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
7755 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
7756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
7757 $as_echo "$perl_privlibexp" >&6; }
7758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
7759 $as_echo_n "checking for Perl useshrplib... " >&6; }
7760 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
7761 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
7762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
7763 $as_echo "$perl_useshrplib" >&6; }
7764 if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
7765 as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
7766 You might have to rebuild your Perl installation. Refer to the
7767 documentation for details. Use --without-perl to disable building
7768 PL/Perl." "$LINENO" 5
7771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
7772 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
7773 if test "$PORTNAME" = "win32" ; then
7774 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
7775 test -e "$perl_archlibexp/CORE/$perl_lib.lib" && perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
7777 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
7778 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
7779 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
7781 if test -z "$perl_embed_ldflags" ; then
7782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7783 $as_echo "no" >&6; }
7784 as_fn_error $? "could not determine flags for linking embedded Perl.
7785 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
7786 installed." "$LINENO" 5
7788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
7789 $as_echo "$perl_embed_ldflags" >&6; }
7794 if test "$with_python" = yes; then
7795 # Extract the first word of "python", so it can be a program name with args.
7796 set dummy python; ac_word=$2
7797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7798 $as_echo_n "checking for $ac_word... " >&6; }
7799 if ${ac_cv_path_PYTHON+:} false; then :
7800 $as_echo_n "(cached) " >&6
7804 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
7807 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7811 test -z "$as_dir" && as_dir=.
7812 for ac_exec_ext in '' $ac_executable_extensions; do
7813 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7814 ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
7815 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7825 PYTHON=$ac_cv_path_PYTHON
7826 if test -n "$PYTHON"; then
7827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
7828 $as_echo "$PYTHON" >&6; }
7830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7831 $as_echo "no" >&6; }
7835 if test x"$PYTHON" = x""; then
7836 as_fn_error $? "Python not found" "$LINENO" 5
7840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python distutils module" >&5
7841 $as_echo_n "checking for Python distutils module... " >&6; }
7842 if "${PYTHON}" -c 'import distutils' 2>&5
7844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7845 $as_echo "yes" >&6; }
7847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7848 $as_echo "no" >&6; }
7849 as_fn_error $? "distutils module not found" "$LINENO" 5
7851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
7852 $as_echo_n "checking Python configuration directory... " >&6; }
7853 python_majorversion=`${PYTHON} -c "import sys; print(sys.version[0])"`
7854 python_minorversion=`${PYTHON} -c "import sys; print(sys.version[2])"`
7855 python_version=`${PYTHON} -c "import sys; print(sys.version[:3])"`
7856 python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"`
7857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
7858 $as_echo "$python_configdir" >&6; }
7860 # Reject unsupported Python versions as soon as practical.
7861 if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 4; then
7862 as_fn_error $? "Python version $python_version is too old (version 2.4 or later is required)" "$LINENO" 5
7865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5
7866 $as_echo_n "checking Python include directories... " >&6; }
7867 python_includespec=`${PYTHON} -c "
7868 import distutils.sysconfig
7869 a = '-I' + distutils.sysconfig.get_python_inc(False)
7870 b = '-I' + distutils.sysconfig.get_python_inc(True)
7874 print(a + ' ' + b)"`
7875 if test "$PORTNAME" = win32 ; then
7876 python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
7878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
7879 $as_echo "$python_includespec" >&6; }
7883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
7884 $as_echo_n "checking how to link an embedded Python application... " >&6; }
7886 python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"`
7887 python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"`
7889 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
7890 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
7891 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
7893 ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
7896 # Otherwise, guess the base name of the shlib.
7897 # LDVERSION was added in Python 3.2, before that use VERSION,
7898 # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
7899 python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"`
7900 if test x"${python_ldversion}" != x""; then
7901 ldlibrary="python${python_ldversion}"
7903 python_version_var=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('VERSION'))))"`
7904 if test x"${python_version_var}" != x""; then
7905 ldlibrary="python${python_version_var}"
7907 ldlibrary="python${python_version}"
7910 # Search for a likely-looking file.
7912 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
7914 # We don't know the platform DLSUFFIX here, so check 'em all.
7915 for e in .so .dll .dylib .sl; do
7916 if test -e "$d/lib${ldlibrary}$e"; then
7923 # Some platforms (OpenBSD) require us to accept a bare versioned shlib
7924 # (".so.n.n") as well. However, check this only after failing to find
7925 # ".so" anywhere, because yet other platforms (Debian) put the .so
7926 # symlink in a different directory from the underlying versioned shlib.
7927 if test "$found_shlib" != 1; then
7928 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
7930 for f in "$d/lib${ldlibrary}.so."* ; do
7931 if test -e "$f"; then
7939 # As usual, Windows has its own ideas. Possible default library
7940 # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
7941 # and the "lib" prefix might not be there.
7942 if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
7943 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
7945 for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
7946 if test -e "$f"; then
7955 if test "$found_shlib" != 1; then
7956 as_fn_error $? "could not find shared library for Python
7957 You might have to rebuild your Python installation. Refer to the
7958 documentation for details. Use --without-python to disable building
7959 PL/Python." "$LINENO" 5
7961 python_libspec="-L${python_libdir} -l${ldlibrary}"
7963 python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
7965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
7966 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
7972 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
7973 # Extract the first word of "zic", so it can be a program name with args.
7974 set dummy zic; ac_word=$2
7975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7976 $as_echo_n "checking for $ac_word... " >&6; }
7977 if ${ac_cv_path_ZIC+:} false; then :
7978 $as_echo_n "(cached) " >&6
7982 ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
7985 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7989 test -z "$as_dir" && as_dir=.
7990 for ac_exec_ext in '' $ac_executable_extensions; do
7991 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7992 ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
7993 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8004 if test -n "$ZIC"; then
8005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
8006 $as_echo "$ZIC" >&6; }
8008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8009 $as_echo "no" >&6; }
8013 if test -z "$ZIC"; then
8015 When cross-compiling, either use the option --with-system-tzdata to use
8016 existing time-zone data, or set the environment variable ZIC to a zic
8017 program to use during the build." "$LINENO" 5
8024 # For each platform, we need to know about any special compile and link
8025 # libraries, and whether the normal C function names are thread-safe.
8026 # See the comment at the top of src/port/thread.c for more information.
8027 # WIN32 doesn't need the pthread tests; it always uses threads
8029 # These tests are run before the library-tests, because linking with the
8030 # other libraries can pull in the pthread functions as a side-effect. We
8031 # want to use the -pthread or similar flags directly, and not rely on
8032 # the side-effects of linking with some other library.
8034 # note: We have to use AS_IF here rather than plain if. The AC_CHECK_HEADER
8035 # invocation below is the first one in the script, and autoconf generates
8036 # additional code for that, which must not be inside the if-block. AS_IF
8037 # knows how to do that.
8038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
8039 $as_echo_n "checking for ANSI C header files... " >&6; }
8040 if ${ac_cv_header_stdc+:} false; then :
8041 $as_echo_n "(cached) " >&6
8043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8044 /* end confdefs.h. */
8058 if ac_fn_c_try_compile "$LINENO"; then :
8059 ac_cv_header_stdc=yes
8061 ac_cv_header_stdc=no
8063 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8065 if test $ac_cv_header_stdc = yes; then
8066 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8068 /* end confdefs.h. */
8072 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8073 $EGREP "memchr" >/dev/null 2>&1; then :
8076 ac_cv_header_stdc=no
8082 if test $ac_cv_header_stdc = yes; then
8083 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8085 /* end confdefs.h. */
8089 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8090 $EGREP "free" >/dev/null 2>&1; then :
8093 ac_cv_header_stdc=no
8099 if test $ac_cv_header_stdc = yes; then
8100 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8101 if test "$cross_compiling" = yes; then :
8104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8105 /* end confdefs.h. */
8108 #if ((' ' & 0x0FF) == 0x020)
8109 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8110 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8112 # define ISLOWER(c) \
8113 (('a' <= (c) && (c) <= 'i') \
8114 || ('j' <= (c) && (c) <= 'r') \
8115 || ('s' <= (c) && (c) <= 'z'))
8116 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8119 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8124 for (i = 0; i < 256; i++)
8125 if (XOR (islower (i), ISLOWER (i))
8126 || toupper (i) != TOUPPER (i))
8131 if ac_fn_c_try_run "$LINENO"; then :
8134 ac_cv_header_stdc=no
8136 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8137 conftest.$ac_objext conftest.beam conftest.$ac_ext
8142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8143 $as_echo "$ac_cv_header_stdc" >&6; }
8144 if test $ac_cv_header_stdc = yes; then
8146 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
8150 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8151 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8152 inttypes.h stdint.h unistd.h
8154 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8155 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
8157 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8158 cat >>confdefs.h <<_ACEOF
8159 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8167 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
8173 ac_cpp='$CPP $CPPFLAGS'
8174 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8175 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8176 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8180 # We used to check for pthread.h first, but this fails if pthread.h
8181 # requires special compiler flags (e.g. on Tru64 or Sequent).
8182 # It gets checked for in the link test anyway.
8184 # First of all, check if the user has set any of the PTHREAD_LIBS,
8185 # etcetera environment variables, and if threads linking works using
8187 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
8188 save_CFLAGS="$CFLAGS"
8189 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8191 LIBS="$PTHREAD_LIBS $LIBS"
8192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
8193 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
8194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8195 /* end confdefs.h. */
8197 /* Override any GCC internal prototype to avoid an error.
8198 Use char because int might match the return type of a GCC
8199 builtin and then its argument prototype would still apply. */
8203 char pthread_join ();
8207 return pthread_join ();
8212 if ac_fn_c_try_link "$LINENO"; then :
8215 rm -f core conftest.err conftest.$ac_objext \
8216 conftest$ac_exeext conftest.$ac_ext
8217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
8218 $as_echo "$ax_pthread_ok" >&6; }
8219 if test x"$ax_pthread_ok" = xno; then
8224 CFLAGS="$save_CFLAGS"
8227 # We must check for the threads library under a number of different
8228 # names; the ordering is very important because some systems
8229 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
8230 # libraries is broken (non-POSIX).
8232 # Create a list of thread flags to try. Items starting with a "-" are
8233 # C compiler flags, and other items are library names, except for "none"
8234 # which indicates that we try without any flags at all, and "pthread-config"
8235 # which is a program returning the flags for the Pth emulation library.
8237 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt -mthreads pthread --thread-safe pthread-config"
8239 # The ordering *is* (sometimes) important. Some notes on the
8240 # individual items follow:
8242 # pthreads: AIX (must check this before -lpthread)
8243 # none: in case threads are in libc; should be tried before -Kthread and
8244 # other compiler flags to prevent continual compiler warnings
8245 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
8246 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
8247 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
8248 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
8249 # -pthreads: Solaris/gcc
8250 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
8251 # doesn't hurt to check since this sometimes defines pthreads and
8252 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
8253 # is present but should not be used directly)
8254 # -mthreads: Mingw32/gcc, Lynx/gcc
8255 # pthread: Linux, etcetera
8256 # --thread-safe: KAI C++
8257 # pthread-config: use pthread-config program (for GNU Pth library)
8263 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
8264 # multi-threading and also sets -lpthread."
8266 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
8271 # IBM z/OS requires a feature-test macro to be defined in order to
8272 # enable POSIX threads at all, so give the user a hint if this is
8273 # not set. (We don't define these ourselves, as they can affect
8274 # other portions of the system API in unpredictable ways.)
8276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8277 /* end confdefs.h. */
8279 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
8280 AX_PTHREAD_ZOS_MISSING
8284 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8285 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
8286 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
8287 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
8295 # Newer versions of Solaris require the "-mt -lpthread" pair, and we
8296 # check that first. On some older versions, libc contains stubbed
8297 # (non-functional) versions of the pthreads routines, so link-based
8298 # tests will erroneously succeed. (We need to link with -pthreads/-mt/
8299 # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
8300 # a function called by this macro, so we could check for that, but
8301 # who knows whether they'll stub that too in a future libc.) So
8302 # we'll look for -pthreads and -lpthread shortly thereafter.
8304 ax_pthread_flags="-mt,pthread -pthreads -pthread pthread $ax_pthread_flags"
8308 # Older versions of Clang only give a warning instead of an error for an
8309 # unrecognized option, unless we specify -Werror. (We throw in some extra
8310 # Clang warning flags for good measure.)
8312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs certain flags to reject unknown flags" >&5
8313 $as_echo_n "checking if compiler needs certain flags to reject unknown flags... " >&6; }
8314 if ${ax_cv_PTHREAD_REJECT_UNKNOWN+:} false; then :
8315 $as_echo_n "(cached) " >&6
8317 ax_cv_PTHREAD_REJECT_UNKNOWN=unknown
8318 save_CFLAGS="$CFLAGS"
8319 ax_pthread_extra_flags="-Wunknown-warning-option -Wunused-command-line-argument"
8320 CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wfoobaz -foobaz"
8321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8322 /* end confdefs.h. */
8332 if ac_fn_c_try_compile "$LINENO"; then :
8333 ax_cv_PTHREAD_REJECT_UNKNOWN="-Werror $ax_pthread_extra_flags"
8335 ax_cv_PTHREAD_REJECT_UNKNOWN=no
8337 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8338 CFLAGS="$save_CFLAGS"
8341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_REJECT_UNKNOWN" >&5
8342 $as_echo "$ax_cv_PTHREAD_REJECT_UNKNOWN" >&6; }
8343 ax_pthread_extra_flags=
8344 if test "x$ax_cv_PTHREAD_REJECT_UNKNOWN" != "xno"; then :
8345 ax_pthread_extra_flags="$ax_cv_PTHREAD_REJECT_UNKNOWN"
8348 if test x"$ax_pthread_ok" = xno; then
8349 for flag in $ax_pthread_flags; do
8353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
8354 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
8358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
8359 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
8360 PTHREAD_CFLAGS="-mt"
8361 PTHREAD_LIBS="-lpthread"
8365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
8366 $as_echo_n "checking whether pthreads work with $flag... " >&6; }
8367 PTHREAD_CFLAGS="$flag"
8371 # Extract the first word of "pthread-config", so it can be a program name with args.
8372 set dummy pthread-config; ac_word=$2
8373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8374 $as_echo_n "checking for $ac_word... " >&6; }
8375 if ${ac_cv_prog_ax_pthread_config+:} false; then :
8376 $as_echo_n "(cached) " >&6
8378 if test -n "$ax_pthread_config"; then
8379 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
8381 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8385 test -z "$as_dir" && as_dir=.
8386 for ac_exec_ext in '' $ac_executable_extensions; do
8387 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8388 ac_cv_prog_ax_pthread_config="yes"
8389 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8396 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
8399 ax_pthread_config=$ac_cv_prog_ax_pthread_config
8400 if test -n "$ax_pthread_config"; then
8401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
8402 $as_echo "$ax_pthread_config" >&6; }
8404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8405 $as_echo "no" >&6; }
8409 if test x"$ax_pthread_config" = xno; then continue; fi
8410 PTHREAD_CFLAGS="`pthread-config --cflags`"
8411 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
8415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
8416 $as_echo_n "checking for the pthreads library -l$flag... " >&6; }
8417 PTHREAD_LIBS="-l$flag"
8422 save_CFLAGS="$CFLAGS"
8423 LIBS="$PTHREAD_LIBS $LIBS"
8424 CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
8426 # Check for various functions. We must include pthread.h,
8427 # since some functions may be macros. (On the Sequent, we
8428 # need a special flag -Kthread to make this header compile.)
8429 # We check for pthread_join because it is in -lpthread on IRIX
8430 # while pthread_create is in libc. We check for pthread_attr_init
8431 # due to DEC craziness with -lpthreads. We check for
8432 # pthread_cleanup_push because it is one of the few pthread
8433 # functions on Solaris that doesn't have a non-functional libc stub.
8434 # We try pthread_create on general principles.
8435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8436 /* end confdefs.h. */
8437 #include <pthread.h>
8438 static void routine(void *a) { a = 0; }
8439 static void *start_routine(void *a) { return a; }
8443 pthread_t th; pthread_attr_t attr;
8444 pthread_create(&th, 0, start_routine, 0);
8445 pthread_join(th, 0);
8446 pthread_attr_init(&attr);
8447 pthread_cleanup_push(routine, 0);
8448 pthread_cleanup_pop(0) /* ; */
8453 if ac_fn_c_try_link "$LINENO"; then :
8456 rm -f core conftest.err conftest.$ac_objext \
8457 conftest$ac_exeext conftest.$ac_ext
8460 CFLAGS="$save_CFLAGS"
8462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
8463 $as_echo "$ax_pthread_ok" >&6; }
8464 if test "x$ax_pthread_ok" = xyes; then
8473 # Various other checks:
8474 if test "x$ax_pthread_ok" = xyes; then
8476 LIBS="$PTHREAD_LIBS $LIBS"
8477 save_CFLAGS="$CFLAGS"
8478 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8480 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
8481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
8482 $as_echo_n "checking for joinable pthread attribute... " >&6; }
8483 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
8484 $as_echo_n "(cached) " >&6
8486 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
8487 for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
8488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8489 /* end confdefs.h. */
8490 #include <pthread.h>
8494 int attr = $attr; return attr /* ; */
8499 if ac_fn_c_try_link "$LINENO"; then :
8500 ax_cv_PTHREAD_JOINABLE_ATTR=$attr; break
8502 rm -f core conftest.err conftest.$ac_objext \
8503 conftest$ac_exeext conftest.$ac_ext
8507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
8508 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
8509 if test "$ax_cv_PTHREAD_JOINABLE_ATTR" != unknown && \
8510 test "$ax_cv_PTHREAD_JOINABLE_ATTR" != PTHREAD_CREATE_JOINABLE; then :
8512 cat >>confdefs.h <<_ACEOF
8513 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
8518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
8519 $as_echo_n "checking if more special flags are required for pthreads... " >&6; }
8520 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
8521 $as_echo_n "(cached) " >&6
8523 ax_cv_PTHREAD_SPECIAL_FLAGS=no
8524 ax_pthread_special_flags_added=no
8525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8526 /* end confdefs.h. */
8528 # if !defined(_REENTRANT) && !defined(_THREAD_SAFE)
8529 AX_PTHREAD_NEED_SPECIAL_FLAG
8533 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8534 $EGREP "AX_PTHREAD_NEED_SPECIAL_FLAG" >/dev/null 2>&1; then :
8537 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_THREAD_SAFE"
8539 darwin* | hpux* | osf* | solaris*)
8540 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_REENTRANT"
8549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
8550 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
8551 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
8552 test "x$ax_pthread_special_flags_added" != "xyes"; then :
8553 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
8554 ax_pthread_special_flags_added=yes
8557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
8558 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
8559 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
8560 $as_echo_n "(cached) " >&6
8562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8563 /* end confdefs.h. */
8564 #include <pthread.h>
8568 int i = PTHREAD_PRIO_INHERIT;
8573 if ac_fn_c_try_link "$LINENO"; then :
8574 ax_cv_PTHREAD_PRIO_INHERIT=yes
8576 ax_cv_PTHREAD_PRIO_INHERIT=no
8578 rm -f core conftest.err conftest.$ac_objext \
8579 conftest$ac_exeext conftest.$ac_ext
8582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
8583 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
8584 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
8586 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
8591 CFLAGS="$save_CFLAGS"
8593 # More AIX lossage: compile with *_r variant
8594 if test "x$GCC" != xyes; then
8598 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
8599 #handle absolute path differently from PATH based program lookup
8602 if as_fn_executable_p ${CC}_r; then :
8603 PTHREAD_CC="${CC}_r"
8606 for ac_prog in ${CC}_r
8608 # Extract the first word of "$ac_prog", so it can be a program name with args.
8609 set dummy $ac_prog; ac_word=$2
8610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8611 $as_echo_n "checking for $ac_word... " >&6; }
8612 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
8613 $as_echo_n "(cached) " >&6
8615 if test -n "$PTHREAD_CC"; then
8616 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
8618 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8622 test -z "$as_dir" && as_dir=.
8623 for ac_exec_ext in '' $ac_executable_extensions; do
8624 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8625 ac_cv_prog_PTHREAD_CC="$ac_prog"
8626 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8635 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
8636 if test -n "$PTHREAD_CC"; then
8637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
8638 $as_echo "$PTHREAD_CC" >&6; }
8640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8641 $as_echo "no" >&6; }
8645 test -n "$PTHREAD_CC" && break
8647 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
8658 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
8664 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
8665 if test x"$ax_pthread_ok" = xyes; then
8667 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
8675 ac_cpp='$CPP $CPPFLAGS'
8676 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8677 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8678 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8682 # Some platforms use these, so just define them. They can't hurt if they
8683 # are not supported. For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
8684 # enables 5-arg getpwuid_r, among other things.
8685 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
8687 # Check for *_r functions
8690 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8691 LIBS="$LIBS $PTHREAD_LIBS"
8693 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
8694 if test "x$ac_cv_header_pthread_h" = xyes; then :
8698 pthread.h not found; use --disable-thread-safety to disable thread safety" "$LINENO" 5
8703 for ac_func in strerror_r getpwuid_r gethostbyname_r
8705 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8706 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8707 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8708 cat >>confdefs.h <<_ACEOF
8709 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8716 # Do test here with the proper thread flags
8717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
8718 $as_echo_n "checking whether strerror_r returns int... " >&6; }
8719 if ${pgac_cv_func_strerror_r_int+:} false; then :
8720 $as_echo_n "(cached) " >&6
8722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8723 /* end confdefs.h. */
8729 int strerror_r(int, char *, size_t);
8731 /* Older AIX has 'int' for the third argument so we don't test the args. */
8738 if ac_fn_c_try_compile "$LINENO"; then :
8739 pgac_cv_func_strerror_r_int=yes
8741 pgac_cv_func_strerror_r_int=no
8743 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
8746 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
8747 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
8749 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
8760 # do not use values from template file
8773 ## Most libraries are included only if they demonstrably provide a function
8774 ## we need, but libm is an exception: always include it, because there are
8775 ## too many compilers that play cute optimization games that will break
8776 ## probes for standard functions such as pow().
8779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
8780 $as_echo_n "checking for main in -lm... " >&6; }
8781 if ${ac_cv_lib_m_main+:} false; then :
8782 $as_echo_n "(cached) " >&6
8784 ac_check_lib_save_LIBS=$LIBS
8786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8787 /* end confdefs.h. */
8798 if ac_fn_c_try_link "$LINENO"; then :
8799 ac_cv_lib_m_main=yes
8803 rm -f core conftest.err conftest.$ac_objext \
8804 conftest$ac_exeext conftest.$ac_ext
8805 LIBS=$ac_check_lib_save_LIBS
8807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
8808 $as_echo "$ac_cv_lib_m_main" >&6; }
8809 if test "x$ac_cv_lib_m_main" = xyes; then :
8810 cat >>confdefs.h <<_ACEOF
8818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
8819 $as_echo_n "checking for library containing setproctitle... " >&6; }
8820 if ${ac_cv_search_setproctitle+:} false; then :
8821 $as_echo_n "(cached) " >&6
8823 ac_func_search_save_LIBS=$LIBS
8824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8825 /* end confdefs.h. */
8827 /* Override any GCC internal prototype to avoid an error.
8828 Use char because int might match the return type of a GCC
8829 builtin and then its argument prototype would still apply. */
8833 char setproctitle ();
8837 return setproctitle ();
8842 for ac_lib in '' util; do
8843 if test -z "$ac_lib"; then
8844 ac_res="none required"
8847 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8849 if ac_fn_c_try_link "$LINENO"; then :
8850 ac_cv_search_setproctitle=$ac_res
8852 rm -f core conftest.err conftest.$ac_objext \
8854 if ${ac_cv_search_setproctitle+:} false; then :
8858 if ${ac_cv_search_setproctitle+:} false; then :
8861 ac_cv_search_setproctitle=no
8864 LIBS=$ac_func_search_save_LIBS
8866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
8867 $as_echo "$ac_cv_search_setproctitle" >&6; }
8868 ac_res=$ac_cv_search_setproctitle
8869 if test "$ac_res" != no; then :
8870 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
8875 $as_echo_n "checking for library containing dlopen... " >&6; }
8876 if ${ac_cv_search_dlopen+:} false; then :
8877 $as_echo_n "(cached) " >&6
8879 ac_func_search_save_LIBS=$LIBS
8880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8881 /* end confdefs.h. */
8883 /* Override any GCC internal prototype to avoid an error.
8884 Use char because int might match the return type of a GCC
8885 builtin and then its argument prototype would still apply. */
8898 for ac_lib in '' dl; do
8899 if test -z "$ac_lib"; then
8900 ac_res="none required"
8903 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8905 if ac_fn_c_try_link "$LINENO"; then :
8906 ac_cv_search_dlopen=$ac_res
8908 rm -f core conftest.err conftest.$ac_objext \
8910 if ${ac_cv_search_dlopen+:} false; then :
8914 if ${ac_cv_search_dlopen+:} false; then :
8917 ac_cv_search_dlopen=no
8920 LIBS=$ac_func_search_save_LIBS
8922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
8923 $as_echo "$ac_cv_search_dlopen" >&6; }
8924 ac_res=$ac_cv_search_dlopen
8925 if test "$ac_res" != no; then :
8926 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
8931 $as_echo_n "checking for library containing socket... " >&6; }
8932 if ${ac_cv_search_socket+:} false; then :
8933 $as_echo_n "(cached) " >&6
8935 ac_func_search_save_LIBS=$LIBS
8936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8937 /* end confdefs.h. */
8939 /* Override any GCC internal prototype to avoid an error.
8940 Use char because int might match the return type of a GCC
8941 builtin and then its argument prototype would still apply. */
8954 for ac_lib in '' socket ws2_32; do
8955 if test -z "$ac_lib"; then
8956 ac_res="none required"
8959 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8961 if ac_fn_c_try_link "$LINENO"; then :
8962 ac_cv_search_socket=$ac_res
8964 rm -f core conftest.err conftest.$ac_objext \
8966 if ${ac_cv_search_socket+:} false; then :
8970 if ${ac_cv_search_socket+:} false; then :
8973 ac_cv_search_socket=no
8976 LIBS=$ac_func_search_save_LIBS
8978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
8979 $as_echo "$ac_cv_search_socket" >&6; }
8980 ac_res=$ac_cv_search_socket
8981 if test "$ac_res" != no; then :
8982 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
8987 $as_echo_n "checking for library containing shl_load... " >&6; }
8988 if ${ac_cv_search_shl_load+:} false; then :
8989 $as_echo_n "(cached) " >&6
8991 ac_func_search_save_LIBS=$LIBS
8992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8993 /* end confdefs.h. */
8995 /* Override any GCC internal prototype to avoid an error.
8996 Use char because int might match the return type of a GCC
8997 builtin and then its argument prototype would still apply. */
9010 for ac_lib in '' dld; do
9011 if test -z "$ac_lib"; then
9012 ac_res="none required"
9015 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9017 if ac_fn_c_try_link "$LINENO"; then :
9018 ac_cv_search_shl_load=$ac_res
9020 rm -f core conftest.err conftest.$ac_objext \
9022 if ${ac_cv_search_shl_load+:} false; then :
9026 if ${ac_cv_search_shl_load+:} false; then :
9029 ac_cv_search_shl_load=no
9032 LIBS=$ac_func_search_save_LIBS
9034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
9035 $as_echo "$ac_cv_search_shl_load" >&6; }
9036 ac_res=$ac_cv_search_shl_load
9037 if test "$ac_res" != no; then :
9038 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9042 # We only use libld in port/dynloader/aix.c
9045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ldopen" >&5
9046 $as_echo_n "checking for library containing ldopen... " >&6; }
9047 if ${ac_cv_search_ldopen+:} false; then :
9048 $as_echo_n "(cached) " >&6
9050 ac_func_search_save_LIBS=$LIBS
9051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9052 /* end confdefs.h. */
9054 /* Override any GCC internal prototype to avoid an error.
9055 Use char because int might match the return type of a GCC
9056 builtin and then its argument prototype would still apply. */
9069 for ac_lib in '' ld; do
9070 if test -z "$ac_lib"; then
9071 ac_res="none required"
9074 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9076 if ac_fn_c_try_link "$LINENO"; then :
9077 ac_cv_search_ldopen=$ac_res
9079 rm -f core conftest.err conftest.$ac_objext \
9081 if ${ac_cv_search_ldopen+:} false; then :
9085 if ${ac_cv_search_ldopen+:} false; then :
9088 ac_cv_search_ldopen=no
9091 LIBS=$ac_func_search_save_LIBS
9093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ldopen" >&5
9094 $as_echo "$ac_cv_search_ldopen" >&6; }
9095 ac_res=$ac_cv_search_ldopen
9096 if test "$ac_res" != no; then :
9097 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
9104 $as_echo_n "checking for library containing getopt_long... " >&6; }
9105 if ${ac_cv_search_getopt_long+:} false; then :
9106 $as_echo_n "(cached) " >&6
9108 ac_func_search_save_LIBS=$LIBS
9109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9110 /* end confdefs.h. */
9112 /* Override any GCC internal prototype to avoid an error.
9113 Use char because int might match the return type of a GCC
9114 builtin and then its argument prototype would still apply. */
9118 char getopt_long ();
9122 return getopt_long ();
9127 for ac_lib in '' getopt gnugetopt; do
9128 if test -z "$ac_lib"; then
9129 ac_res="none required"
9132 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9134 if ac_fn_c_try_link "$LINENO"; then :
9135 ac_cv_search_getopt_long=$ac_res
9137 rm -f core conftest.err conftest.$ac_objext \
9139 if ${ac_cv_search_getopt_long+:} false; then :
9143 if ${ac_cv_search_getopt_long+:} false; then :
9146 ac_cv_search_getopt_long=no
9149 LIBS=$ac_func_search_save_LIBS
9151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
9152 $as_echo "$ac_cv_search_getopt_long" >&6; }
9153 ac_res=$ac_cv_search_getopt_long
9154 if test "$ac_res" != no; then :
9155 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
9160 $as_echo_n "checking for library containing crypt... " >&6; }
9161 if ${ac_cv_search_crypt+:} false; then :
9162 $as_echo_n "(cached) " >&6
9164 ac_func_search_save_LIBS=$LIBS
9165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9166 /* end confdefs.h. */
9168 /* Override any GCC internal prototype to avoid an error.
9169 Use char because int might match the return type of a GCC
9170 builtin and then its argument prototype would still apply. */
9183 for ac_lib in '' crypt; do
9184 if test -z "$ac_lib"; then
9185 ac_res="none required"
9188 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9190 if ac_fn_c_try_link "$LINENO"; then :
9191 ac_cv_search_crypt=$ac_res
9193 rm -f core conftest.err conftest.$ac_objext \
9195 if ${ac_cv_search_crypt+:} false; then :
9199 if ${ac_cv_search_crypt+:} false; then :
9202 ac_cv_search_crypt=no
9205 LIBS=$ac_func_search_save_LIBS
9207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
9208 $as_echo "$ac_cv_search_crypt" >&6; }
9209 ac_res=$ac_cv_search_crypt
9210 if test "$ac_res" != no; then :
9211 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
9216 $as_echo_n "checking for library containing shm_open... " >&6; }
9217 if ${ac_cv_search_shm_open+:} false; then :
9218 $as_echo_n "(cached) " >&6
9220 ac_func_search_save_LIBS=$LIBS
9221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9222 /* end confdefs.h. */
9224 /* Override any GCC internal prototype to avoid an error.
9225 Use char because int might match the return type of a GCC
9226 builtin and then its argument prototype would still apply. */
9239 for ac_lib in '' rt; do
9240 if test -z "$ac_lib"; then
9241 ac_res="none required"
9244 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9246 if ac_fn_c_try_link "$LINENO"; then :
9247 ac_cv_search_shm_open=$ac_res
9249 rm -f core conftest.err conftest.$ac_objext \
9251 if ${ac_cv_search_shm_open+:} false; then :
9255 if ${ac_cv_search_shm_open+:} false; then :
9258 ac_cv_search_shm_open=no
9261 LIBS=$ac_func_search_save_LIBS
9263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
9264 $as_echo "$ac_cv_search_shm_open" >&6; }
9265 ac_res=$ac_cv_search_shm_open
9266 if test "$ac_res" != no; then :
9267 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
9272 $as_echo_n "checking for library containing shm_unlink... " >&6; }
9273 if ${ac_cv_search_shm_unlink+:} false; then :
9274 $as_echo_n "(cached) " >&6
9276 ac_func_search_save_LIBS=$LIBS
9277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9278 /* end confdefs.h. */
9280 /* Override any GCC internal prototype to avoid an error.
9281 Use char because int might match the return type of a GCC
9282 builtin and then its argument prototype would still apply. */
9290 return shm_unlink ();
9295 for ac_lib in '' rt; do
9296 if test -z "$ac_lib"; then
9297 ac_res="none required"
9300 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9302 if ac_fn_c_try_link "$LINENO"; then :
9303 ac_cv_search_shm_unlink=$ac_res
9305 rm -f core conftest.err conftest.$ac_objext \
9307 if ${ac_cv_search_shm_unlink+:} false; then :
9311 if ${ac_cv_search_shm_unlink+:} false; then :
9314 ac_cv_search_shm_unlink=no
9317 LIBS=$ac_func_search_save_LIBS
9319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
9320 $as_echo "$ac_cv_search_shm_unlink" >&6; }
9321 ac_res=$ac_cv_search_shm_unlink
9322 if test "$ac_res" != no; then :
9323 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
9328 $as_echo_n "checking for library containing clock_gettime... " >&6; }
9329 if ${ac_cv_search_clock_gettime+:} false; then :
9330 $as_echo_n "(cached) " >&6
9332 ac_func_search_save_LIBS=$LIBS
9333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9334 /* end confdefs.h. */
9336 /* Override any GCC internal prototype to avoid an error.
9337 Use char because int might match the return type of a GCC
9338 builtin and then its argument prototype would still apply. */
9342 char clock_gettime ();
9346 return clock_gettime ();
9351 for ac_lib in '' rt posix4; do
9352 if test -z "$ac_lib"; then
9353 ac_res="none required"
9356 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9358 if ac_fn_c_try_link "$LINENO"; then :
9359 ac_cv_search_clock_gettime=$ac_res
9361 rm -f core conftest.err conftest.$ac_objext \
9363 if ${ac_cv_search_clock_gettime+:} false; then :
9367 if ${ac_cv_search_clock_gettime+:} false; then :
9370 ac_cv_search_clock_gettime=no
9373 LIBS=$ac_func_search_save_LIBS
9375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
9376 $as_echo "$ac_cv_search_clock_gettime" >&6; }
9377 ac_res=$ac_cv_search_clock_gettime
9378 if test "$ac_res" != no; then :
9379 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
9385 $as_echo_n "checking for library containing fdatasync... " >&6; }
9386 if ${ac_cv_search_fdatasync+:} false; then :
9387 $as_echo_n "(cached) " >&6
9389 ac_func_search_save_LIBS=$LIBS
9390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9391 /* end confdefs.h. */
9393 /* Override any GCC internal prototype to avoid an error.
9394 Use char because int might match the return type of a GCC
9395 builtin and then its argument prototype would still apply. */
9403 return fdatasync ();
9408 for ac_lib in '' rt posix4; do
9409 if test -z "$ac_lib"; then
9410 ac_res="none required"
9413 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9415 if ac_fn_c_try_link "$LINENO"; then :
9416 ac_cv_search_fdatasync=$ac_res
9418 rm -f core conftest.err conftest.$ac_objext \
9420 if ${ac_cv_search_fdatasync+:} false; then :
9424 if ${ac_cv_search_fdatasync+:} false; then :
9427 ac_cv_search_fdatasync=no
9430 LIBS=$ac_func_search_save_LIBS
9432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
9433 $as_echo "$ac_cv_search_fdatasync" >&6; }
9434 ac_res=$ac_cv_search_fdatasync
9435 if test "$ac_res" != no; then :
9436 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9440 # Required for thread_test.c on Solaris
9441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
9442 $as_echo_n "checking for library containing sched_yield... " >&6; }
9443 if ${ac_cv_search_sched_yield+:} false; then :
9444 $as_echo_n "(cached) " >&6
9446 ac_func_search_save_LIBS=$LIBS
9447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9448 /* end confdefs.h. */
9450 /* Override any GCC internal prototype to avoid an error.
9451 Use char because int might match the return type of a GCC
9452 builtin and then its argument prototype would still apply. */
9456 char sched_yield ();
9460 return sched_yield ();
9465 for ac_lib in '' rt; do
9466 if test -z "$ac_lib"; then
9467 ac_res="none required"
9470 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9472 if ac_fn_c_try_link "$LINENO"; then :
9473 ac_cv_search_sched_yield=$ac_res
9475 rm -f core conftest.err conftest.$ac_objext \
9477 if ${ac_cv_search_sched_yield+:} false; then :
9481 if ${ac_cv_search_sched_yield+:} false; then :
9484 ac_cv_search_sched_yield=no
9487 LIBS=$ac_func_search_save_LIBS
9489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
9490 $as_echo "$ac_cv_search_sched_yield" >&6; }
9491 ac_res=$ac_cv_search_sched_yield
9492 if test "$ac_res" != no; then :
9493 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9497 # Required for thread_test.c on Solaris 2.5:
9498 # Other ports use it too (HP-UX) so test unconditionally
9499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
9500 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
9501 if ${ac_cv_search_gethostbyname_r+:} false; then :
9502 $as_echo_n "(cached) " >&6
9504 ac_func_search_save_LIBS=$LIBS
9505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9506 /* end confdefs.h. */
9508 /* Override any GCC internal prototype to avoid an error.
9509 Use char because int might match the return type of a GCC
9510 builtin and then its argument prototype would still apply. */
9514 char gethostbyname_r ();
9518 return gethostbyname_r ();
9523 for ac_lib in '' nsl; do
9524 if test -z "$ac_lib"; then
9525 ac_res="none required"
9528 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9530 if ac_fn_c_try_link "$LINENO"; then :
9531 ac_cv_search_gethostbyname_r=$ac_res
9533 rm -f core conftest.err conftest.$ac_objext \
9535 if ${ac_cv_search_gethostbyname_r+:} false; then :
9539 if ${ac_cv_search_gethostbyname_r+:} false; then :
9542 ac_cv_search_gethostbyname_r=no
9545 LIBS=$ac_func_search_save_LIBS
9547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
9548 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
9549 ac_res=$ac_cv_search_gethostbyname_r
9550 if test "$ac_res" != no; then :
9551 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
9557 $as_echo_n "checking for library containing shmget... " >&6; }
9558 if ${ac_cv_search_shmget+:} false; then :
9559 $as_echo_n "(cached) " >&6
9561 ac_func_search_save_LIBS=$LIBS
9562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9563 /* end confdefs.h. */
9565 /* Override any GCC internal prototype to avoid an error.
9566 Use char because int might match the return type of a GCC
9567 builtin and then its argument prototype would still apply. */
9580 for ac_lib in '' cygipc; do
9581 if test -z "$ac_lib"; then
9582 ac_res="none required"
9585 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9587 if ac_fn_c_try_link "$LINENO"; then :
9588 ac_cv_search_shmget=$ac_res
9590 rm -f core conftest.err conftest.$ac_objext \
9592 if ${ac_cv_search_shmget+:} false; then :
9596 if ${ac_cv_search_shmget+:} false; then :
9599 ac_cv_search_shmget=no
9602 LIBS=$ac_func_search_save_LIBS
9604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
9605 $as_echo "$ac_cv_search_shmget" >&6; }
9606 ac_res=$ac_cv_search_shmget
9607 if test "$ac_res" != no; then :
9608 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9613 if test "$with_readline" = yes; then
9616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
9617 $as_echo_n "checking for library containing readline... " >&6; }
9618 if ${pgac_cv_check_readline+:} false; then :
9619 $as_echo_n "(cached) " >&6
9621 pgac_cv_check_readline=no
9622 pgac_save_LIBS=$LIBS
9623 if test x"$with_libedit_preferred" != x"yes"
9624 then READLINE_ORDER="-lreadline -ledit"
9625 else READLINE_ORDER="-ledit -lreadline"
9627 for pgac_rllib in $READLINE_ORDER ; do
9628 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
9629 LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
9630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9631 /* end confdefs.h. */
9633 /* Override any GCC internal prototype to avoid an error.
9634 Use char because int might match the return type of a GCC
9635 builtin and then its argument prototype would still apply. */
9648 if ac_fn_c_try_link "$LINENO"; then :
9650 # Older NetBSD, OpenBSD, and Irix have a broken linker that does not
9651 # recognize dependent libraries; assume curses is needed if we didn't
9652 # find any dependency.
9654 netbsd* | openbsd* | irix*)
9655 if test x"$pgac_lib" = x"" ; then
9656 pgac_lib=" -lcurses"
9660 pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
9664 rm -f core conftest.err conftest.$ac_objext \
9665 conftest$ac_exeext conftest.$ac_ext
9667 if test "$pgac_cv_check_readline" != no ; then
9671 LIBS=$pgac_save_LIBS
9674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
9675 $as_echo "$pgac_cv_check_readline" >&6; }
9676 if test "$pgac_cv_check_readline" != no ; then
9677 LIBS="$pgac_cv_check_readline $LIBS"
9679 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
9684 if test x"$pgac_cv_check_readline" = x"no"; then
9685 as_fn_error $? "readline library not found
9686 If you have readline already installed, see config.log for details on the
9687 failure. It is possible the compiler isn't looking in the proper directory.
9688 Use --without-readline to disable readline support." "$LINENO" 5
9692 if test "$with_zlib" = yes; then
9693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
9694 $as_echo_n "checking for inflate in -lz... " >&6; }
9695 if ${ac_cv_lib_z_inflate+:} false; then :
9696 $as_echo_n "(cached) " >&6
9698 ac_check_lib_save_LIBS=$LIBS
9700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9701 /* end confdefs.h. */
9703 /* Override any GCC internal prototype to avoid an error.
9704 Use char because int might match the return type of a GCC
9705 builtin and then its argument prototype would still apply. */
9718 if ac_fn_c_try_link "$LINENO"; then :
9719 ac_cv_lib_z_inflate=yes
9721 ac_cv_lib_z_inflate=no
9723 rm -f core conftest.err conftest.$ac_objext \
9724 conftest$ac_exeext conftest.$ac_ext
9725 LIBS=$ac_check_lib_save_LIBS
9727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
9728 $as_echo "$ac_cv_lib_z_inflate" >&6; }
9729 if test "x$ac_cv_lib_z_inflate" = xyes; then :
9730 cat >>confdefs.h <<_ACEOF
9737 as_fn_error $? "zlib library not found
9738 If you have zlib already installed, see config.log for details on the
9739 failure. It is possible the compiler isn't looking in the proper directory.
9740 Use --without-zlib to disable zlib support." "$LINENO" 5
9745 if test "$enable_spinlocks" = yes; then
9747 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
9750 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9751 *** Not using spinlocks will cause poor performance." >&5
9752 $as_echo "$as_me: WARNING:
9753 *** Not using spinlocks will cause poor performance." >&2;}
9756 if test "$enable_atomics" = yes; then
9758 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
9761 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
9762 *** Not using atomic operations will cause poor performance." >&5
9763 $as_echo "$as_me: WARNING:
9764 *** Not using atomic operations will cause poor performance." >&2;}
9767 if test "$with_gssapi" = yes ; then
9768 if test "$PORTNAME" != "win32"; then
9769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
9770 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
9771 if ${ac_cv_search_gss_init_sec_context+:} false; then :
9772 $as_echo_n "(cached) " >&6
9774 ac_func_search_save_LIBS=$LIBS
9775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9776 /* end confdefs.h. */
9778 /* Override any GCC internal prototype to avoid an error.
9779 Use char because int might match the return type of a GCC
9780 builtin and then its argument prototype would still apply. */
9784 char gss_init_sec_context ();
9788 return gss_init_sec_context ();
9793 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
9794 if test -z "$ac_lib"; then
9795 ac_res="none required"
9798 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9800 if ac_fn_c_try_link "$LINENO"; then :
9801 ac_cv_search_gss_init_sec_context=$ac_res
9803 rm -f core conftest.err conftest.$ac_objext \
9805 if ${ac_cv_search_gss_init_sec_context+:} false; then :
9809 if ${ac_cv_search_gss_init_sec_context+:} false; then :
9812 ac_cv_search_gss_init_sec_context=no
9815 LIBS=$ac_func_search_save_LIBS
9817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
9818 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
9819 ac_res=$ac_cv_search_gss_init_sec_context
9820 if test "$ac_res" != no; then :
9821 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9824 as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
9828 LIBS="$LIBS -lgssapi32"
9832 if test "$with_openssl" = yes ; then
9833 if test "$PORTNAME" != "win32"; then
9834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
9835 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
9836 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
9837 $as_echo_n "(cached) " >&6
9839 ac_check_lib_save_LIBS=$LIBS
9840 LIBS="-lcrypto $LIBS"
9841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9842 /* end confdefs.h. */
9844 /* Override any GCC internal prototype to avoid an error.
9845 Use char because int might match the return type of a GCC
9846 builtin and then its argument prototype would still apply. */
9850 char CRYPTO_new_ex_data ();
9854 return CRYPTO_new_ex_data ();
9859 if ac_fn_c_try_link "$LINENO"; then :
9860 ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
9862 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
9864 rm -f core conftest.err conftest.$ac_objext \
9865 conftest$ac_exeext conftest.$ac_ext
9866 LIBS=$ac_check_lib_save_LIBS
9868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
9869 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
9870 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
9871 cat >>confdefs.h <<_ACEOF
9872 #define HAVE_LIBCRYPTO 1
9875 LIBS="-lcrypto $LIBS"
9878 as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
9881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
9882 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
9883 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
9884 $as_echo_n "(cached) " >&6
9886 ac_check_lib_save_LIBS=$LIBS
9888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9889 /* end confdefs.h. */
9891 /* Override any GCC internal prototype to avoid an error.
9892 Use char because int might match the return type of a GCC
9893 builtin and then its argument prototype would still apply. */
9906 if ac_fn_c_try_link "$LINENO"; then :
9907 ac_cv_lib_ssl_SSL_new=yes
9909 ac_cv_lib_ssl_SSL_new=no
9911 rm -f core conftest.err conftest.$ac_objext \
9912 conftest$ac_exeext conftest.$ac_ext
9913 LIBS=$ac_check_lib_save_LIBS
9915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
9916 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
9917 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
9918 cat >>confdefs.h <<_ACEOF
9919 #define HAVE_LIBSSL 1
9925 as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
9929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
9930 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
9931 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
9932 $as_echo_n "(cached) " >&6
9934 ac_func_search_save_LIBS=$LIBS
9935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9936 /* end confdefs.h. */
9938 /* Override any GCC internal prototype to avoid an error.
9939 Use char because int might match the return type of a GCC
9940 builtin and then its argument prototype would still apply. */
9944 char CRYPTO_new_ex_data ();
9948 return CRYPTO_new_ex_data ();
9953 for ac_lib in '' eay32 crypto; do
9954 if test -z "$ac_lib"; then
9955 ac_res="none required"
9958 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9960 if ac_fn_c_try_link "$LINENO"; then :
9961 ac_cv_search_CRYPTO_new_ex_data=$ac_res
9963 rm -f core conftest.err conftest.$ac_objext \
9965 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
9969 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
9972 ac_cv_search_CRYPTO_new_ex_data=no
9975 LIBS=$ac_func_search_save_LIBS
9977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
9978 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
9979 ac_res=$ac_cv_search_CRYPTO_new_ex_data
9980 if test "$ac_res" != no; then :
9981 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9984 as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
9987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
9988 $as_echo_n "checking for library containing SSL_new... " >&6; }
9989 if ${ac_cv_search_SSL_new+:} false; then :
9990 $as_echo_n "(cached) " >&6
9992 ac_func_search_save_LIBS=$LIBS
9993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9994 /* end confdefs.h. */
9996 /* Override any GCC internal prototype to avoid an error.
9997 Use char because int might match the return type of a GCC
9998 builtin and then its argument prototype would still apply. */
10011 for ac_lib in '' ssleay32 ssl; do
10012 if test -z "$ac_lib"; then
10013 ac_res="none required"
10016 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10018 if ac_fn_c_try_link "$LINENO"; then :
10019 ac_cv_search_SSL_new=$ac_res
10021 rm -f core conftest.err conftest.$ac_objext \
10023 if ${ac_cv_search_SSL_new+:} false; then :
10027 if ${ac_cv_search_SSL_new+:} false; then :
10030 ac_cv_search_SSL_new=no
10032 rm conftest.$ac_ext
10033 LIBS=$ac_func_search_save_LIBS
10035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
10036 $as_echo "$ac_cv_search_SSL_new" >&6; }
10037 ac_res=$ac_cv_search_SSL_new
10038 if test "$ac_res" != no; then :
10039 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10042 as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
10046 for ac_func in SSL_get_current_compression
10048 ac_fn_c_check_func "$LINENO" "SSL_get_current_compression" "ac_cv_func_SSL_get_current_compression"
10049 if test "x$ac_cv_func_SSL_get_current_compression" = xyes; then :
10050 cat >>confdefs.h <<_ACEOF
10051 #define HAVE_SSL_GET_CURRENT_COMPRESSION 1
10057 # Functions introduced in OpenSSL 1.1.0. We used to check for
10058 # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
10059 # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
10060 # doesn't have these OpenSSL 1.1.0 functions. So check for individual
10062 for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL
10064 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10065 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10066 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10067 cat >>confdefs.h <<_ACEOF
10068 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10074 # OpenSSL versions before 1.1.0 required setting callback functions, for
10075 # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
10076 # function was removed.
10077 for ac_func in CRYPTO_lock
10079 ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
10080 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
10081 cat >>confdefs.h <<_ACEOF
10082 #define HAVE_CRYPTO_LOCK 1
10090 if test "$with_pam" = yes ; then
10091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
10092 $as_echo_n "checking for pam_start in -lpam... " >&6; }
10093 if ${ac_cv_lib_pam_pam_start+:} false; then :
10094 $as_echo_n "(cached) " >&6
10096 ac_check_lib_save_LIBS=$LIBS
10098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10099 /* end confdefs.h. */
10101 /* Override any GCC internal prototype to avoid an error.
10102 Use char because int might match the return type of a GCC
10103 builtin and then its argument prototype would still apply. */
10111 return pam_start ();
10116 if ac_fn_c_try_link "$LINENO"; then :
10117 ac_cv_lib_pam_pam_start=yes
10119 ac_cv_lib_pam_pam_start=no
10121 rm -f core conftest.err conftest.$ac_objext \
10122 conftest$ac_exeext conftest.$ac_ext
10123 LIBS=$ac_check_lib_save_LIBS
10125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
10126 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
10127 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
10128 cat >>confdefs.h <<_ACEOF
10129 #define HAVE_LIBPAM 1
10135 as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
10140 if test "$with_libxml" = yes ; then
10141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
10142 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
10143 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
10144 $as_echo_n "(cached) " >&6
10146 ac_check_lib_save_LIBS=$LIBS
10147 LIBS="-lxml2 $LIBS"
10148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10149 /* end confdefs.h. */
10151 /* Override any GCC internal prototype to avoid an error.
10152 Use char because int might match the return type of a GCC
10153 builtin and then its argument prototype would still apply. */
10157 char xmlSaveToBuffer ();
10161 return xmlSaveToBuffer ();
10166 if ac_fn_c_try_link "$LINENO"; then :
10167 ac_cv_lib_xml2_xmlSaveToBuffer=yes
10169 ac_cv_lib_xml2_xmlSaveToBuffer=no
10171 rm -f core conftest.err conftest.$ac_objext \
10172 conftest$ac_exeext conftest.$ac_ext
10173 LIBS=$ac_check_lib_save_LIBS
10175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
10176 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
10177 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
10178 cat >>confdefs.h <<_ACEOF
10179 #define HAVE_LIBXML2 1
10182 LIBS="-lxml2 $LIBS"
10185 as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
10190 if test "$with_libxslt" = yes ; then
10191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
10192 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
10193 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
10194 $as_echo_n "(cached) " >&6
10196 ac_check_lib_save_LIBS=$LIBS
10197 LIBS="-lxslt $LIBS"
10198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10199 /* end confdefs.h. */
10201 /* Override any GCC internal prototype to avoid an error.
10202 Use char because int might match the return type of a GCC
10203 builtin and then its argument prototype would still apply. */
10207 char xsltCleanupGlobals ();
10211 return xsltCleanupGlobals ();
10216 if ac_fn_c_try_link "$LINENO"; then :
10217 ac_cv_lib_xslt_xsltCleanupGlobals=yes
10219 ac_cv_lib_xslt_xsltCleanupGlobals=no
10221 rm -f core conftest.err conftest.$ac_objext \
10222 conftest$ac_exeext conftest.$ac_ext
10223 LIBS=$ac_check_lib_save_LIBS
10225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
10226 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
10227 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
10228 cat >>confdefs.h <<_ACEOF
10229 #define HAVE_LIBXSLT 1
10232 LIBS="-lxslt $LIBS"
10235 as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
10240 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
10241 if test "$with_ldap" = yes ; then
10243 if test "$PORTNAME" != "win32"; then
10244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
10245 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
10246 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
10247 $as_echo_n "(cached) " >&6
10249 ac_check_lib_save_LIBS=$LIBS
10250 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
10251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10252 /* end confdefs.h. */
10254 /* Override any GCC internal prototype to avoid an error.
10255 Use char because int might match the return type of a GCC
10256 builtin and then its argument prototype would still apply. */
10264 return ldap_bind ();
10269 if ac_fn_c_try_link "$LINENO"; then :
10270 ac_cv_lib_ldap_ldap_bind=yes
10272 ac_cv_lib_ldap_ldap_bind=no
10274 rm -f core conftest.err conftest.$ac_objext \
10275 conftest$ac_exeext conftest.$ac_ext
10276 LIBS=$ac_check_lib_save_LIBS
10278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
10279 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
10280 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
10281 cat >>confdefs.h <<_ACEOF
10282 #define HAVE_LIBLDAP 1
10285 LIBS="-lldap $LIBS"
10288 as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
10291 LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
10292 if test "$enable_thread_safety" = yes; then
10293 # on some platforms ldap_r fails to link without PTHREAD_LIBS
10294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_simple_bind in -lldap_r" >&5
10295 $as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
10296 if ${ac_cv_lib_ldap_r_ldap_simple_bind+:} false; then :
10297 $as_echo_n "(cached) " >&6
10299 ac_check_lib_save_LIBS=$LIBS
10300 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
10301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10302 /* end confdefs.h. */
10304 /* Override any GCC internal prototype to avoid an error.
10305 Use char because int might match the return type of a GCC
10306 builtin and then its argument prototype would still apply. */
10310 char ldap_simple_bind ();
10314 return ldap_simple_bind ();
10319 if ac_fn_c_try_link "$LINENO"; then :
10320 ac_cv_lib_ldap_r_ldap_simple_bind=yes
10322 ac_cv_lib_ldap_r_ldap_simple_bind=no
10324 rm -f core conftest.err conftest.$ac_objext \
10325 conftest$ac_exeext conftest.$ac_ext
10326 LIBS=$ac_check_lib_save_LIBS
10328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
10329 $as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
10330 if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = xyes; then :
10331 cat >>confdefs.h <<_ACEOF
10332 #define HAVE_LIBLDAP_R 1
10335 LIBS="-lldap_r $LIBS"
10338 as_fn_error $? "library 'ldap_r' is required for LDAP" "$LINENO" 5
10341 LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
10343 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
10346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
10347 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
10348 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
10349 $as_echo_n "(cached) " >&6
10351 ac_check_lib_save_LIBS=$LIBS
10352 LIBS="-lwldap32 $LIBS"
10353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10354 /* end confdefs.h. */
10356 /* Override any GCC internal prototype to avoid an error.
10357 Use char because int might match the return type of a GCC
10358 builtin and then its argument prototype would still apply. */
10366 return ldap_bind ();
10371 if ac_fn_c_try_link "$LINENO"; then :
10372 ac_cv_lib_wldap32_ldap_bind=yes
10374 ac_cv_lib_wldap32_ldap_bind=no
10376 rm -f core conftest.err conftest.$ac_objext \
10377 conftest$ac_exeext conftest.$ac_ext
10378 LIBS=$ac_check_lib_save_LIBS
10380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
10381 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
10382 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
10383 cat >>confdefs.h <<_ACEOF
10384 #define HAVE_LIBWLDAP32 1
10387 LIBS="-lwldap32 $LIBS"
10390 as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
10393 LDAP_LIBS_FE="-lwldap32"
10394 LDAP_LIBS_BE="-lwldap32"
10401 # for contrib/sepgsql
10402 if test "$with_selinux" = yes; then
10403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
10404 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
10405 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
10406 $as_echo_n "(cached) " >&6
10408 ac_check_lib_save_LIBS=$LIBS
10409 LIBS="-lselinux $LIBS"
10410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10411 /* end confdefs.h. */
10413 /* Override any GCC internal prototype to avoid an error.
10414 Use char because int might match the return type of a GCC
10415 builtin and then its argument prototype would still apply. */
10419 char security_compute_create_name ();
10423 return security_compute_create_name ();
10428 if ac_fn_c_try_link "$LINENO"; then :
10429 ac_cv_lib_selinux_security_compute_create_name=yes
10431 ac_cv_lib_selinux_security_compute_create_name=no
10433 rm -f core conftest.err conftest.$ac_objext \
10434 conftest$ac_exeext conftest.$ac_ext
10435 LIBS=$ac_check_lib_save_LIBS
10437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
10438 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
10439 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
10440 cat >>confdefs.h <<_ACEOF
10441 #define HAVE_LIBSELINUX 1
10444 LIBS="-lselinux $LIBS"
10447 as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
10452 # for contrib/uuid-ossp
10453 if test "$with_uuid" = bsd ; then
10454 # On BSD, the UUID functions are in libc
10455 ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
10456 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
10459 as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
10462 elif test "$with_uuid" = e2fs ; then
10463 # On macOS, the UUID functions are in libc
10464 ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
10465 if test "x$ac_cv_func_uuid_generate" = xyes; then :
10468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
10469 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
10470 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
10471 $as_echo_n "(cached) " >&6
10473 ac_check_lib_save_LIBS=$LIBS
10474 LIBS="-luuid $LIBS"
10475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10476 /* end confdefs.h. */
10478 /* Override any GCC internal prototype to avoid an error.
10479 Use char because int might match the return type of a GCC
10480 builtin and then its argument prototype would still apply. */
10484 char uuid_generate ();
10488 return uuid_generate ();
10493 if ac_fn_c_try_link "$LINENO"; then :
10494 ac_cv_lib_uuid_uuid_generate=yes
10496 ac_cv_lib_uuid_uuid_generate=no
10498 rm -f core conftest.err conftest.$ac_objext \
10499 conftest$ac_exeext conftest.$ac_ext
10500 LIBS=$ac_check_lib_save_LIBS
10502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
10503 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
10504 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
10507 as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
10512 elif test "$with_uuid" = ossp ; then
10513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
10514 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
10515 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
10516 $as_echo_n "(cached) " >&6
10518 ac_check_lib_save_LIBS=$LIBS
10519 LIBS="-lossp-uuid $LIBS"
10520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10521 /* end confdefs.h. */
10523 /* Override any GCC internal prototype to avoid an error.
10524 Use char because int might match the return type of a GCC
10525 builtin and then its argument prototype would still apply. */
10529 char uuid_export ();
10533 return uuid_export ();
10538 if ac_fn_c_try_link "$LINENO"; then :
10539 ac_cv_lib_ossp_uuid_uuid_export=yes
10541 ac_cv_lib_ossp_uuid_uuid_export=no
10543 rm -f core conftest.err conftest.$ac_objext \
10544 conftest$ac_exeext conftest.$ac_ext
10545 LIBS=$ac_check_lib_save_LIBS
10547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
10548 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
10549 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
10550 UUID_LIBS="-lossp-uuid"
10552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
10553 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
10554 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
10555 $as_echo_n "(cached) " >&6
10557 ac_check_lib_save_LIBS=$LIBS
10558 LIBS="-luuid $LIBS"
10559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10560 /* end confdefs.h. */
10562 /* Override any GCC internal prototype to avoid an error.
10563 Use char because int might match the return type of a GCC
10564 builtin and then its argument prototype would still apply. */
10568 char uuid_export ();
10572 return uuid_export ();
10577 if ac_fn_c_try_link "$LINENO"; then :
10578 ac_cv_lib_uuid_uuid_export=yes
10580 ac_cv_lib_uuid_uuid_export=no
10582 rm -f core conftest.err conftest.$ac_objext \
10583 conftest$ac_exeext conftest.$ac_ext
10584 LIBS=$ac_check_lib_save_LIBS
10586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
10587 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
10588 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
10591 as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
10604 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/poll.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
10606 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10607 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10608 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10609 cat >>confdefs.h <<_ACEOF
10610 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10618 # On BSD, test for net/if.h will fail unless sys/socket.h
10619 # is included first.
10620 for ac_header in net/if.h
10622 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
10623 #include <sys/socket.h>
10626 if test "x$ac_cv_header_net_if_h" = xyes; then :
10627 cat >>confdefs.h <<_ACEOF
10628 #define HAVE_NET_IF_H 1
10636 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
10637 # is included first.
10638 for ac_header in sys/ucred.h
10640 ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
10641 #include <sys/param.h>
10644 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
10645 cat >>confdefs.h <<_ACEOF
10646 #define HAVE_SYS_UCRED_H 1
10654 # At least on IRIX, test for netinet/tcp.h will fail unless
10655 # netinet/in.h is included first.
10656 for ac_header in netinet/tcp.h
10658 ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
10659 #include <netinet/in.h>
10662 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
10663 cat >>confdefs.h <<_ACEOF
10664 #define HAVE_NETINET_TCP_H 1
10672 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
10673 for ac_header in readline/readline.h
10675 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
10676 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
10677 cat >>confdefs.h <<_ACEOF
10678 #define HAVE_READLINE_READLINE_H 1
10682 for ac_header in readline.h
10684 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
10685 if test "x$ac_cv_header_readline_h" = xyes; then :
10686 cat >>confdefs.h <<_ACEOF
10687 #define HAVE_READLINE_H 1
10691 as_fn_error $? "readline header not found
10692 If you have readline already installed, see config.log for details on the
10693 failure. It is possible the compiler isn't looking in the proper directory.
10694 Use --without-readline to disable readline support." "$LINENO" 5
10703 for ac_header in readline/history.h
10705 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
10706 if test "x$ac_cv_header_readline_history_h" = xyes; then :
10707 cat >>confdefs.h <<_ACEOF
10708 #define HAVE_READLINE_HISTORY_H 1
10712 for ac_header in history.h
10714 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
10715 if test "x$ac_cv_header_history_h" = xyes; then :
10716 cat >>confdefs.h <<_ACEOF
10717 #define HAVE_HISTORY_H 1
10721 as_fn_error $? "history header not found
10722 If you have readline already installed, see config.log for details on the
10723 failure. It is possible the compiler isn't looking in the proper directory.
10724 Use --without-readline to disable readline support." "$LINENO" 5
10735 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
10736 # Some installations of libedit usurp /usr/include/readline/, which seems
10737 # bad practice, since in combined installations readline will have its headers
10738 # there. We might have to resort to AC_EGREP checks to make sure we found
10739 # the proper header...
10740 for ac_header in editline/readline.h
10742 ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
10743 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
10744 cat >>confdefs.h <<_ACEOF
10745 #define HAVE_EDITLINE_READLINE_H 1
10749 for ac_header in readline.h
10751 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
10752 if test "x$ac_cv_header_readline_h" = xyes; then :
10753 cat >>confdefs.h <<_ACEOF
10754 #define HAVE_READLINE_H 1
10758 for ac_header in readline/readline.h
10760 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
10761 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
10762 cat >>confdefs.h <<_ACEOF
10763 #define HAVE_READLINE_READLINE_H 1
10767 as_fn_error $? "readline header not found
10768 If you have libedit already installed, see config.log for details on the
10769 failure. It is possible the compiler isn't looking in the proper directory.
10770 Use --without-readline to disable libedit support." "$LINENO" 5
10783 # Note: in a libedit installation, history.h is sometimes a dummy, and may
10784 # not be there at all. Hence, don't complain if not found. We must check
10785 # though, since in yet other versions it is an independent header.
10786 for ac_header in editline/history.h
10788 ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
10789 if test "x$ac_cv_header_editline_history_h" = xyes; then :
10790 cat >>confdefs.h <<_ACEOF
10791 #define HAVE_EDITLINE_HISTORY_H 1
10795 for ac_header in history.h
10797 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
10798 if test "x$ac_cv_header_history_h" = xyes; then :
10799 cat >>confdefs.h <<_ACEOF
10800 #define HAVE_HISTORY_H 1
10804 for ac_header in readline/history.h
10806 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
10807 if test "x$ac_cv_header_readline_history_h" = xyes; then :
10808 cat >>confdefs.h <<_ACEOF
10809 #define HAVE_READLINE_HISTORY_H 1
10826 if test "$with_zlib" = yes; then
10827 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
10828 if test "x$ac_cv_header_zlib_h" = xyes; then :
10831 as_fn_error $? "zlib header not found
10832 If you have zlib already installed, see config.log for details on the
10833 failure. It is possible the compiler isn't looking in the proper directory.
10834 Use --without-zlib to disable zlib support." "$LINENO" 5
10840 if test "$with_gssapi" = yes ; then
10841 for ac_header in gssapi/gssapi.h
10843 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
10844 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
10845 cat >>confdefs.h <<_ACEOF
10846 #define HAVE_GSSAPI_GSSAPI_H 1
10850 for ac_header in gssapi.h
10852 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
10853 if test "x$ac_cv_header_gssapi_h" = xyes; then :
10854 cat >>confdefs.h <<_ACEOF
10855 #define HAVE_GSSAPI_H 1
10859 as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
10870 if test "$with_openssl" = yes ; then
10871 ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
10872 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
10875 as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
10879 ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
10880 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
10883 as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
10889 if test "$with_pam" = yes ; then
10890 for ac_header in security/pam_appl.h
10892 ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
10893 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
10894 cat >>confdefs.h <<_ACEOF
10895 #define HAVE_SECURITY_PAM_APPL_H 1
10899 for ac_header in pam/pam_appl.h
10901 ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
10902 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
10903 cat >>confdefs.h <<_ACEOF
10904 #define HAVE_PAM_PAM_APPL_H 1
10908 as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
10919 if test "$with_bsd_auth" = yes ; then
10920 ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
10921 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
10924 as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
10930 if test "$with_systemd" = yes ; then
10931 ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
10932 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
10935 as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
10941 if test "$with_libxml" = yes ; then
10942 ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
10943 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
10946 as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
10952 if test "$with_libxslt" = yes ; then
10953 ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
10954 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
10957 as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
10963 if test "$with_ldap" = yes ; then
10964 if test "$PORTNAME" != "win32"; then
10965 for ac_header in ldap.h
10967 ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
10968 if test "x$ac_cv_header_ldap_h" = xyes; then :
10969 cat >>confdefs.h <<_ACEOF
10970 #define HAVE_LDAP_H 1
10974 as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
10979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
10980 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
10981 if ${pgac_cv_ldap_safe+:} false; then :
10982 $as_echo_n "(cached) " >&6
10984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10985 /* end confdefs.h. */
10987 #if !defined(LDAP_VENDOR_VERSION) || \
10988 (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
10989 LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
11000 if ac_fn_c_try_compile "$LINENO"; then :
11001 pgac_cv_ldap_safe=yes
11003 pgac_cv_ldap_safe=no
11005 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
11008 $as_echo "$pgac_cv_ldap_safe" >&6; }
11010 if test "$pgac_cv_ldap_safe" != yes; then
11011 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
11012 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
11013 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
11014 *** also uses LDAP will crash on exit." >&5
11015 $as_echo "$as_me: WARNING:
11016 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
11017 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
11018 *** also uses LDAP will crash on exit." >&2;}
11021 for ac_header in winldap.h
11023 ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
11024 #include <windows.h>
11027 if test "x$ac_cv_header_winldap_h" = xyes; then :
11028 cat >>confdefs.h <<_ACEOF
11029 #define HAVE_WINLDAP_H 1
11033 as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
11041 if test "$with_bonjour" = yes ; then
11042 ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
11043 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
11046 as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
11052 # for contrib/uuid-ossp
11053 if test "$with_uuid" = bsd ; then
11054 for ac_header in uuid.h
11056 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
11057 if test "x$ac_cv_header_uuid_h" = xyes; then :
11058 cat >>confdefs.h <<_ACEOF
11059 #define HAVE_UUID_H 1
11061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11062 /* end confdefs.h. */
11066 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11067 $EGREP "uuid_to_string" >/dev/null 2>&1; then :
11070 as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
11075 as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
11080 elif test "$with_uuid" = e2fs ; then
11081 for ac_header in uuid/uuid.h
11083 ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
11084 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
11085 cat >>confdefs.h <<_ACEOF
11086 #define HAVE_UUID_UUID_H 1
11088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11089 /* end confdefs.h. */
11090 #include <uuid/uuid.h>
11093 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11094 $EGREP "uuid_generate" >/dev/null 2>&1; then :
11097 as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
11102 for ac_header in uuid.h
11104 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
11105 if test "x$ac_cv_header_uuid_h" = xyes; then :
11106 cat >>confdefs.h <<_ACEOF
11107 #define HAVE_UUID_H 1
11109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11110 /* end confdefs.h. */
11114 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11115 $EGREP "uuid_generate" >/dev/null 2>&1; then :
11118 as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
11123 as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
11132 elif test "$with_uuid" = ossp ; then
11133 for ac_header in ossp/uuid.h
11135 ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
11136 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
11137 cat >>confdefs.h <<_ACEOF
11138 #define HAVE_OSSP_UUID_H 1
11140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11141 /* end confdefs.h. */
11142 #include <ossp/uuid.h>
11145 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11146 $EGREP "uuid_export" >/dev/null 2>&1; then :
11149 as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
11154 for ac_header in uuid.h
11156 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
11157 if test "x$ac_cv_header_uuid_h" = xyes; then :
11158 cat >>confdefs.h <<_ACEOF
11159 #define HAVE_UUID_H 1
11161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11162 /* end confdefs.h. */
11166 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11167 $EGREP "uuid_export" >/dev/null 2>&1; then :
11170 as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
11175 as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
11186 if test "$PORTNAME" = "win32" ; then
11187 for ac_header in crtdefs.h
11189 ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
11190 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
11191 cat >>confdefs.h <<_ACEOF
11192 #define HAVE_CRTDEFS_H 1
11202 ## Types, structures, compiler characteristics
11205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11206 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11207 if ${ac_cv_c_bigendian+:} false; then :
11208 $as_echo_n "(cached) " >&6
11210 ac_cv_c_bigendian=unknown
11211 # See if we're dealing with a universal compiler.
11212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11213 /* end confdefs.h. */
11214 #ifndef __APPLE_CC__
11215 not a universal capable compiler
11220 if ac_fn_c_try_compile "$LINENO"; then :
11222 # Check for potential -arch flags. It is not universal unless
11223 # there are at least two -arch flags with different values.
11226 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11227 if test -n "$ac_prev"; then
11229 i?86 | x86_64 | ppc | ppc64)
11230 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11233 ac_cv_c_bigendian=universal
11239 elif test "x$ac_word" = "x-arch"; then
11244 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11245 if test $ac_cv_c_bigendian = unknown; then
11246 # See if sys/param.h defines the BYTE_ORDER macro.
11247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11248 /* end confdefs.h. */
11249 #include <sys/types.h>
11250 #include <sys/param.h>
11255 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11256 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11258 bogus endian macros
11265 if ac_fn_c_try_compile "$LINENO"; then :
11266 # It does; now see whether it defined to BIG_ENDIAN or not.
11267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11268 /* end confdefs.h. */
11269 #include <sys/types.h>
11270 #include <sys/param.h>
11275 #if BYTE_ORDER != BIG_ENDIAN
11283 if ac_fn_c_try_compile "$LINENO"; then :
11284 ac_cv_c_bigendian=yes
11286 ac_cv_c_bigendian=no
11288 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11290 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11292 if test $ac_cv_c_bigendian = unknown; then
11293 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11295 /* end confdefs.h. */
11296 #include <limits.h>
11301 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11302 bogus endian macros
11309 if ac_fn_c_try_compile "$LINENO"; then :
11310 # It does; now see whether it defined to _BIG_ENDIAN or not.
11311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11312 /* end confdefs.h. */
11313 #include <limits.h>
11318 #ifndef _BIG_ENDIAN
11326 if ac_fn_c_try_compile "$LINENO"; then :
11327 ac_cv_c_bigendian=yes
11329 ac_cv_c_bigendian=no
11331 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11333 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11335 if test $ac_cv_c_bigendian = unknown; then
11336 # Compile a test program.
11337 if test "$cross_compiling" = yes; then :
11338 # Try to guess by grepping values from an object file.
11339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11340 /* end confdefs.h. */
11341 short int ascii_mm[] =
11342 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11343 short int ascii_ii[] =
11344 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11345 int use_ascii (int i) {
11346 return ascii_mm[i] + ascii_ii[i];
11348 short int ebcdic_ii[] =
11349 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11350 short int ebcdic_mm[] =
11351 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11352 int use_ebcdic (int i) {
11353 return ebcdic_mm[i] + ebcdic_ii[i];
11360 return use_ascii (foo) == use_ebcdic (foo);
11365 if ac_fn_c_try_compile "$LINENO"; then :
11366 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11367 ac_cv_c_bigendian=yes
11369 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11370 if test "$ac_cv_c_bigendian" = unknown; then
11371 ac_cv_c_bigendian=no
11373 # finding both strings is unlikely to happen, but who knows?
11374 ac_cv_c_bigendian=unknown
11378 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11381 /* end confdefs.h. */
11382 $ac_includes_default
11387 /* Are we little or big endian? From Harbison&Steele. */
11391 char c[sizeof (long int)];
11394 return u.c[sizeof (long int) - 1] == 1;
11400 if ac_fn_c_try_run "$LINENO"; then :
11401 ac_cv_c_bigendian=no
11403 ac_cv_c_bigendian=yes
11405 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11406 conftest.$ac_objext conftest.beam conftest.$ac_ext
11411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11412 $as_echo "$ac_cv_c_bigendian" >&6; }
11413 case $ac_cv_c_bigendian in #(
11415 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11421 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11425 as_fn_error $? "unknown endianness
11426 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11430 $as_echo_n "checking for inline... " >&6; }
11431 if ${ac_cv_c_inline+:} false; then :
11432 $as_echo_n "(cached) " >&6
11435 for ac_kw in inline __inline__ __inline; do
11436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11437 /* end confdefs.h. */
11438 #ifndef __cplusplus
11440 static $ac_kw foo_t static_foo () {return 0; }
11441 $ac_kw foo_t foo () {return 0; }
11445 if ac_fn_c_try_compile "$LINENO"; then :
11446 ac_cv_c_inline=$ac_kw
11448 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11449 test "$ac_cv_c_inline" != no && break
11453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11454 $as_echo "$ac_cv_c_inline" >&6; }
11456 case $ac_cv_c_inline in
11459 case $ac_cv_c_inline in
11461 *) ac_val=$ac_cv_c_inline;;
11463 cat >>confdefs.h <<_ACEOF
11464 #ifndef __cplusplus
11465 #define inline $ac_val
11471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
11472 $as_echo_n "checking for printf format archetype... " >&6; }
11473 if ${pgac_cv_printf_archetype+:} false; then :
11474 $as_echo_n "(cached) " >&6
11476 ac_save_c_werror_flag=$ac_c_werror_flag
11477 ac_c_werror_flag=yes
11478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11479 /* end confdefs.h. */
11481 pgac_write(int ignore, const char *fmt,...)
11482 __attribute__((format(gnu_printf, 2, 3)));
11491 if ac_fn_c_try_compile "$LINENO"; then :
11492 pgac_cv_printf_archetype=gnu_printf
11494 pgac_cv_printf_archetype=printf
11496 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11497 ac_c_werror_flag=$ac_save_c_werror_flag
11499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
11500 $as_echo "$pgac_cv_printf_archetype" >&6; }
11502 cat >>confdefs.h <<_ACEOF
11503 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
11508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array members" >&5
11509 $as_echo_n "checking for flexible array members... " >&6; }
11510 if ${ac_cv_c_flexmember+:} false; then :
11511 $as_echo_n "(cached) " >&6
11513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11514 /* end confdefs.h. */
11515 #include <stdlib.h>
11517 #include <stddef.h>
11518 struct s { int n; double d[]; };
11522 int m = getchar ();
11523 struct s *p = malloc (offsetof (struct s, d)
11524 + m * sizeof (double));
11526 return p->d != (double *) NULL;
11531 if ac_fn_c_try_compile "$LINENO"; then :
11532 ac_cv_c_flexmember=yes
11534 ac_cv_c_flexmember=no
11536 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
11539 $as_echo "$ac_cv_c_flexmember" >&6; }
11540 if test $ac_cv_c_flexmember = yes; then
11542 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
11545 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
11549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed types" >&5
11550 $as_echo_n "checking for signed types... " >&6; }
11551 if ${pgac_cv_c_signed+:} false; then :
11552 $as_echo_n "(cached) " >&6
11554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11555 /* end confdefs.h. */
11560 signed char c; signed short s; signed int i;
11565 if ac_fn_c_try_compile "$LINENO"; then :
11566 pgac_cv_c_signed=yes
11568 pgac_cv_c_signed=no
11570 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_signed" >&5
11573 $as_echo "$pgac_cv_c_signed" >&6; }
11574 if test x"$pgac_cv_c_signed" = xno ; then
11576 $as_echo "#define signed /**/" >>confdefs.h
11579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
11580 $as_echo_n "checking for __func__... " >&6; }
11581 if ${pgac_cv_funcname_func_support+:} false; then :
11582 $as_echo_n "(cached) " >&6
11584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11585 /* end confdefs.h. */
11590 printf("%s\n", __func__);
11595 if ac_fn_c_try_compile "$LINENO"; then :
11596 pgac_cv_funcname_func_support=yes
11598 pgac_cv_funcname_func_support=no
11600 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
11603 $as_echo "$pgac_cv_funcname_func_support" >&6; }
11604 if test x"$pgac_cv_funcname_func_support" = xyes ; then
11606 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
11609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
11610 $as_echo_n "checking for __FUNCTION__... " >&6; }
11611 if ${pgac_cv_funcname_function_support+:} false; then :
11612 $as_echo_n "(cached) " >&6
11614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11615 /* end confdefs.h. */
11620 printf("%s\n", __FUNCTION__);
11625 if ac_fn_c_try_compile "$LINENO"; then :
11626 pgac_cv_funcname_function_support=yes
11628 pgac_cv_funcname_function_support=no
11630 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
11633 $as_echo "$pgac_cv_funcname_function_support" >&6; }
11634 if test x"$pgac_cv_funcname_function_support" = xyes ; then
11636 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
11640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
11641 $as_echo_n "checking for _Static_assert... " >&6; }
11642 if ${pgac_cv__static_assert+:} false; then :
11643 $as_echo_n "(cached) " >&6
11645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11646 /* end confdefs.h. */
11651 ({ _Static_assert(1, "foo"); })
11656 if ac_fn_c_try_link "$LINENO"; then :
11657 pgac_cv__static_assert=yes
11659 pgac_cv__static_assert=no
11661 rm -f core conftest.err conftest.$ac_objext \
11662 conftest$ac_exeext conftest.$ac_ext
11664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
11665 $as_echo "$pgac_cv__static_assert" >&6; }
11666 if test x"$pgac_cv__static_assert" = xyes ; then
11668 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
11671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
11672 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
11673 if ${pgac_cv__types_compatible+:} false; then :
11674 $as_echo_n "(cached) " >&6
11676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11677 /* end confdefs.h. */
11682 int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
11687 if ac_fn_c_try_compile "$LINENO"; then :
11688 pgac_cv__types_compatible=yes
11690 pgac_cv__types_compatible=no
11692 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
11695 $as_echo "$pgac_cv__types_compatible" >&6; }
11696 if test x"$pgac_cv__types_compatible" = xyes ; then
11698 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
11701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
11702 $as_echo_n "checking for __builtin_bswap32... " >&6; }
11703 if ${pgac_cv__builtin_bswap32+:} false; then :
11704 $as_echo_n "(cached) " >&6
11706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11707 /* end confdefs.h. */
11708 static unsigned long int x = __builtin_bswap32(0xaabbccdd);
11711 if ac_fn_c_try_compile "$LINENO"; then :
11712 pgac_cv__builtin_bswap32=yes
11714 pgac_cv__builtin_bswap32=no
11716 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
11719 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
11720 if test x"$pgac_cv__builtin_bswap32" = xyes ; then
11722 $as_echo "#define HAVE__BUILTIN_BSWAP32 1" >>confdefs.h
11725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
11726 $as_echo_n "checking for __builtin_bswap64... " >&6; }
11727 if ${pgac_cv__builtin_bswap64+:} false; then :
11728 $as_echo_n "(cached) " >&6
11730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11731 /* end confdefs.h. */
11732 static unsigned long int x = __builtin_bswap64(0xaabbccddeeff0011);
11735 if ac_fn_c_try_compile "$LINENO"; then :
11736 pgac_cv__builtin_bswap64=yes
11738 pgac_cv__builtin_bswap64=no
11740 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
11743 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
11744 if test x"$pgac_cv__builtin_bswap64" = xyes ; then
11746 $as_echo "#define HAVE__BUILTIN_BSWAP64 1" >>confdefs.h
11749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
11750 $as_echo_n "checking for __builtin_constant_p... " >&6; }
11751 if ${pgac_cv__builtin_constant_p+:} false; then :
11752 $as_echo_n "(cached) " >&6
11754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11755 /* end confdefs.h. */
11756 static int x; static int y[__builtin_constant_p(x) ? x : 1];
11759 if ac_fn_c_try_compile "$LINENO"; then :
11760 pgac_cv__builtin_constant_p=yes
11762 pgac_cv__builtin_constant_p=no
11764 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
11767 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
11768 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
11770 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
11773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
11774 $as_echo_n "checking for __builtin_unreachable... " >&6; }
11775 if ${pgac_cv__builtin_unreachable+:} false; then :
11776 $as_echo_n "(cached) " >&6
11778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11779 /* end confdefs.h. */
11784 __builtin_unreachable();
11789 if ac_fn_c_try_link "$LINENO"; then :
11790 pgac_cv__builtin_unreachable=yes
11792 pgac_cv__builtin_unreachable=no
11794 rm -f core conftest.err conftest.$ac_objext \
11795 conftest$ac_exeext conftest.$ac_ext
11797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
11798 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
11799 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
11801 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
11804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
11805 $as_echo_n "checking for computed goto support... " >&6; }
11806 if ${pgac_cv_computed_goto+:} false; then :
11807 $as_echo_n "(cached) " >&6
11809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11810 /* end confdefs.h. */
11815 void *labeladdrs[] = {&&my_label};
11816 goto *labeladdrs[0];
11824 if ac_fn_c_try_compile "$LINENO"; then :
11825 pgac_cv_computed_goto=yes
11827 pgac_cv_computed_goto=no
11829 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
11832 $as_echo "$pgac_cv_computed_goto" >&6; }
11833 if test x"$pgac_cv_computed_goto" = xyes ; then
11835 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
11838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__" >&5
11839 $as_echo_n "checking for __VA_ARGS__... " >&6; }
11840 if ${pgac_cv__va_args+:} false; then :
11841 $as_echo_n "(cached) " >&6
11843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11844 /* end confdefs.h. */
11849 #define debug(...) fprintf(stderr, __VA_ARGS__)
11850 debug("%s", "blarg");
11856 if ac_fn_c_try_compile "$LINENO"; then :
11857 pgac_cv__va_args=yes
11859 pgac_cv__va_args=no
11861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__va_args" >&5
11864 $as_echo "$pgac_cv__va_args" >&6; }
11865 if test x"$pgac_cv__va_args" = xyes ; then
11867 $as_echo "#define HAVE__VA_ARGS 1" >>confdefs.h
11870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11871 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
11872 if ${ac_cv_struct_tm+:} false; then :
11873 $as_echo_n "(cached) " >&6
11875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11876 /* end confdefs.h. */
11877 #include <sys/types.h>
11884 int *p = &tm.tm_sec;
11890 if ac_fn_c_try_compile "$LINENO"; then :
11891 ac_cv_struct_tm=time.h
11893 ac_cv_struct_tm=sys/time.h
11895 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11898 $as_echo "$ac_cv_struct_tm" >&6; }
11899 if test $ac_cv_struct_tm = sys/time.h; then
11901 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
11905 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
11906 #include <$ac_cv_struct_tm>
11909 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
11911 cat >>confdefs.h <<_ACEOF
11912 #define HAVE_STRUCT_TM_TM_ZONE 1
11918 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11920 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
11923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11924 $as_echo_n "checking for tzname... " >&6; }
11925 if ${ac_cv_var_tzname+:} false; then :
11926 $as_echo_n "(cached) " >&6
11928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11929 /* end confdefs.h. */
11930 #include <stdlib.h>
11932 #ifndef tzname /* For SGI. */
11933 extern char *tzname[]; /* RS6000 and others reject char **tzname. */
11944 if ac_fn_c_try_link "$LINENO"; then :
11945 ac_cv_var_tzname=yes
11947 ac_cv_var_tzname=no
11949 rm -f core conftest.err conftest.$ac_objext \
11950 conftest$ac_exeext conftest.$ac_ext
11952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11953 $as_echo "$ac_cv_var_tzname" >&6; }
11954 if test $ac_cv_var_tzname = yes; then
11956 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
11960 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
11961 #ifdef HAVE_SYS_IPC_H
11962 #include <sys/ipc.h>
11964 #ifdef HAVE_SYS_SEM_H
11965 #include <sys/sem.h>
11968 if test "x$ac_cv_type_union_semun" = xyes; then :
11970 cat >>confdefs.h <<_ACEOF
11971 #define HAVE_UNION_SEMUN 1
11977 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
11978 #ifdef HAVE_SYS_UN_H
11979 #include <sys/un.h>
11983 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
11985 $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h
11989 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
11990 #include <sys/socket.h>
11993 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
11995 cat >>confdefs.h <<_ACEOF
11996 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
12002 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
12003 #include <sys/socket.h>
12006 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
12008 cat >>confdefs.h <<_ACEOF
12009 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
12014 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
12015 #include <sys/socket.h>
12018 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
12020 cat >>confdefs.h <<_ACEOF
12021 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
12026 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
12027 #include <sys/socket.h>
12030 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
12032 cat >>confdefs.h <<_ACEOF
12033 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
12038 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
12039 #include <sys/socket.h>
12042 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
12044 cat >>confdefs.h <<_ACEOF
12045 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
12050 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
12051 #include <sys/socket.h>
12054 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
12056 cat >>confdefs.h <<_ACEOF
12057 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
12063 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
12064 #include <sys/socket.h>
12068 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
12070 cat >>confdefs.h <<_ACEOF
12071 #define HAVE_STRUCT_ADDRINFO 1
12078 ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
12079 if test "x$ac_cv_type_intptr_t" = xyes; then :
12081 $as_echo "#define HAVE_INTPTR_T 1" >>confdefs.h
12084 for ac_type in 'int' 'long int' 'long long int'; do
12085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12086 /* end confdefs.h. */
12087 $ac_includes_default
12091 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
12092 test_array [0] = 0;
12093 return test_array [0];
12099 if ac_fn_c_try_compile "$LINENO"; then :
12101 cat >>confdefs.h <<_ACEOF
12102 #define intptr_t $ac_type
12107 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12108 test -z "$ac_type" && break
12114 ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
12115 if test "x$ac_cv_type_uintptr_t" = xyes; then :
12117 $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
12120 for ac_type in 'unsigned int' 'unsigned long int' \
12121 'unsigned long long int'; do
12122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12123 /* end confdefs.h. */
12124 $ac_includes_default
12128 static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
12129 test_array [0] = 0;
12130 return test_array [0];
12136 if ac_fn_c_try_compile "$LINENO"; then :
12138 cat >>confdefs.h <<_ACEOF
12139 #define uintptr_t $ac_type
12144 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12145 test -z "$ac_type" && break
12151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
12152 $as_echo_n "checking for unsigned long long int... " >&6; }
12153 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
12154 $as_echo_n "(cached) " >&6
12156 ac_cv_type_unsigned_long_long_int=yes
12157 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12159 /* end confdefs.h. */
12161 /* For now, do not test the preprocessor; as of 2007 there are too many
12162 implementations with broken preprocessors. Perhaps this can
12163 be revisited in 2012. In the meantime, code should not expect
12164 #if to work with literals wider than 32 bits. */
12165 /* Test literals. */
12166 long long int ll = 9223372036854775807ll;
12167 long long int nll = -9223372036854775807LL;
12168 unsigned long long int ull = 18446744073709551615ULL;
12169 /* Test constant expressions. */
12170 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
12172 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
12178 /* Test availability of runtime routines for shift and division. */
12179 long long int llmax = 9223372036854775807ll;
12180 unsigned long long int ullmax = 18446744073709551615ull;
12181 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
12182 | (llmax / ll) | (llmax % ll)
12183 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
12184 | (ullmax / ull) | (ullmax % ull));
12190 if ac_fn_c_try_link "$LINENO"; then :
12193 ac_cv_type_unsigned_long_long_int=no
12195 rm -f core conftest.err conftest.$ac_objext \
12196 conftest$ac_exeext conftest.$ac_ext
12199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
12200 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
12201 if test $ac_cv_type_unsigned_long_long_int = yes; then
12203 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
12209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
12210 $as_echo_n "checking for long long int... " >&6; }
12211 if ${ac_cv_type_long_long_int+:} false; then :
12212 $as_echo_n "(cached) " >&6
12214 ac_cv_type_long_long_int=yes
12215 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12216 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
12217 if test $ac_cv_type_long_long_int = yes; then
12218 if test "$cross_compiling" = yes; then :
12221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12222 /* end confdefs.h. */
12223 #include <limits.h>
12226 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
12227 # define LLONG_MAX (HALF - 1 + HALF)
12232 long long int n = 1;
12236 long long int m = n << i;
12239 if (LLONG_MAX / 2 < m)
12247 if ac_fn_c_try_run "$LINENO"; then :
12250 ac_cv_type_long_long_int=no
12252 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12253 conftest.$ac_objext conftest.beam conftest.$ac_ext
12259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
12260 $as_echo "$ac_cv_type_long_long_int" >&6; }
12261 if test $ac_cv_type_long_long_int = yes; then
12263 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
12268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
12269 $as_echo_n "checking for locale_t... " >&6; }
12270 if ${pgac_cv_type_locale_t+:} false; then :
12271 $as_echo_n "(cached) " >&6
12273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12274 /* end confdefs.h. */
12275 #include <locale.h>
12285 if ac_fn_c_try_compile "$LINENO"; then :
12286 pgac_cv_type_locale_t=yes
12288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12289 /* end confdefs.h. */
12290 #include <xlocale.h>
12300 if ac_fn_c_try_compile "$LINENO"; then :
12301 pgac_cv_type_locale_t='yes (in xlocale.h)'
12303 pgac_cv_type_locale_t=no
12305 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12307 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
12310 $as_echo "$pgac_cv_type_locale_t" >&6; }
12311 if test "$pgac_cv_type_locale_t" != no; then
12313 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
12316 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
12318 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
12322 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
12323 #include <sys/param.h>
12324 #ifdef HAVE_SYS_UCRED_H
12325 #include <sys/ucred.h>
12328 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
12330 cat >>confdefs.h <<_ACEOF
12331 #define HAVE_STRUCT_CMSGCRED 1
12338 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
12339 #include <getopt.h>
12342 if test "x$ac_cv_type_struct_option" = xyes; then :
12344 cat >>confdefs.h <<_ACEOF
12345 #define HAVE_STRUCT_OPTION 1
12352 if test "$with_zlib" = yes; then
12353 # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
12354 # did not). While we could work around the lack of z_streamp, it
12355 # seems unwise to encourage people to use such old zlib versions...
12356 ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
12358 if test "x$ac_cv_type_z_streamp" = xyes; then :
12361 as_fn_error $? "zlib version is too old
12362 Use --without-zlib to disable zlib support." "$LINENO" 5
12367 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
12370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
12371 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
12372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12373 /* end confdefs.h. */
12378 int a = 0; int *p = &a; int r;
12379 __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
12384 if ac_fn_c_try_compile "$LINENO"; then :
12385 pgac_cv_have_ppc_mutex_hint=yes
12387 pgac_cv_have_ppc_mutex_hint=no
12389 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
12391 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
12392 if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
12394 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
12400 # Check largefile support. You might think this is a system service not a
12401 # compiler characteristic, but you'd be wrong. We must check this before
12402 # probing existence of related functions such as fseeko, since the largefile
12403 # defines can affect what is generated for that.
12404 if test "$PORTNAME" != "win32"; then
12405 # Check whether --enable-largefile was given.
12406 if test "${enable_largefile+set}" = set; then :
12407 enableval=$enable_largefile;
12410 if test "$enable_largefile" != no; then
12412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
12413 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
12414 if ${ac_cv_sys_largefile_CC+:} false; then :
12415 $as_echo_n "(cached) " >&6
12417 ac_cv_sys_largefile_CC=no
12418 if test "$GCC" != yes; then
12421 # IRIX 6.2 and later do not support large files by default,
12422 # so use the C compiler's -n32 option if that helps.
12423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12424 /* end confdefs.h. */
12425 #include <sys/types.h>
12426 /* Check that off_t can represent 2**63 - 1 correctly.
12427 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12428 since some C++ compilers masquerading as C compilers
12429 incorrectly reject 9223372036854775807. */
12430 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12431 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12432 && LARGE_OFF_T % 2147483647 == 1)
12442 if ac_fn_c_try_compile "$LINENO"; then :
12445 rm -f core conftest.err conftest.$ac_objext
12447 if ac_fn_c_try_compile "$LINENO"; then :
12448 ac_cv_sys_largefile_CC=' -n32'; break
12450 rm -f core conftest.err conftest.$ac_objext
12454 rm -f conftest.$ac_ext
12457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
12458 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
12459 if test "$ac_cv_sys_largefile_CC" != no; then
12460 CC=$CC$ac_cv_sys_largefile_CC
12463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12464 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
12465 if ${ac_cv_sys_file_offset_bits+:} false; then :
12466 $as_echo_n "(cached) " >&6
12469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12470 /* end confdefs.h. */
12471 #include <sys/types.h>
12472 /* Check that off_t can represent 2**63 - 1 correctly.
12473 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12474 since some C++ compilers masquerading as C compilers
12475 incorrectly reject 9223372036854775807. */
12476 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12477 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12478 && LARGE_OFF_T % 2147483647 == 1)
12488 if ac_fn_c_try_compile "$LINENO"; then :
12489 ac_cv_sys_file_offset_bits=no; break
12491 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12493 /* end confdefs.h. */
12494 #define _FILE_OFFSET_BITS 64
12495 #include <sys/types.h>
12496 /* Check that off_t can represent 2**63 - 1 correctly.
12497 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12498 since some C++ compilers masquerading as C compilers
12499 incorrectly reject 9223372036854775807. */
12500 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12501 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12502 && LARGE_OFF_T % 2147483647 == 1)
12512 if ac_fn_c_try_compile "$LINENO"; then :
12513 ac_cv_sys_file_offset_bits=64; break
12515 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12516 ac_cv_sys_file_offset_bits=unknown
12520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
12521 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
12522 case $ac_cv_sys_file_offset_bits in #(
12525 cat >>confdefs.h <<_ACEOF
12526 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12531 if test $ac_cv_sys_file_offset_bits = unknown; then
12532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
12533 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
12534 if ${ac_cv_sys_large_files+:} false; then :
12535 $as_echo_n "(cached) " >&6
12538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12539 /* end confdefs.h. */
12540 #include <sys/types.h>
12541 /* Check that off_t can represent 2**63 - 1 correctly.
12542 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12543 since some C++ compilers masquerading as C compilers
12544 incorrectly reject 9223372036854775807. */
12545 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12546 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12547 && LARGE_OFF_T % 2147483647 == 1)
12557 if ac_fn_c_try_compile "$LINENO"; then :
12558 ac_cv_sys_large_files=no; break
12560 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12562 /* end confdefs.h. */
12563 #define _LARGE_FILES 1
12564 #include <sys/types.h>
12565 /* Check that off_t can represent 2**63 - 1 correctly.
12566 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12567 since some C++ compilers masquerading as C compilers
12568 incorrectly reject 9223372036854775807. */
12569 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12570 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12571 && LARGE_OFF_T % 2147483647 == 1)
12581 if ac_fn_c_try_compile "$LINENO"; then :
12582 ac_cv_sys_large_files=1; break
12584 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12585 ac_cv_sys_large_files=unknown
12589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
12590 $as_echo "$ac_cv_sys_large_files" >&6; }
12591 case $ac_cv_sys_large_files in #(
12594 cat >>confdefs.h <<_ACEOF
12595 #define _LARGE_FILES $ac_cv_sys_large_files
12608 # Check for largefile support (must be after AC_SYS_LARGEFILE)
12609 # The cast to long int works around a bug in the HP C Compiler
12610 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12611 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12612 # This bug is HP SR number 8606223364.
12613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
12614 $as_echo_n "checking size of off_t... " >&6; }
12615 if ${ac_cv_sizeof_off_t+:} false; then :
12616 $as_echo_n "(cached) " >&6
12618 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
12621 if test "$ac_cv_type_off_t" = yes; then
12622 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12623 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12624 as_fn_error 77 "cannot compute sizeof (off_t)
12625 See \`config.log' for more details" "$LINENO" 5; }
12627 ac_cv_sizeof_off_t=0
12632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
12633 $as_echo "$ac_cv_sizeof_off_t" >&6; }
12637 cat >>confdefs.h <<_ACEOF
12638 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
12643 # If we don't have largefile support, can't handle segsize >= 2GB.
12644 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
12645 as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
12650 ## Functions, global variables
12653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
12654 $as_echo_n "checking for int timezone... " >&6; }
12655 if ${pgac_cv_var_int_timezone+:} false; then :
12656 $as_echo_n "(cached) " >&6
12658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12659 /* end confdefs.h. */
12666 res = timezone / 60;
12668 res = _timezone / 60;
12674 if ac_fn_c_try_link "$LINENO"; then :
12675 pgac_cv_var_int_timezone=yes
12677 pgac_cv_var_int_timezone=no
12679 rm -f core conftest.err conftest.$ac_objext \
12680 conftest$ac_exeext conftest.$ac_ext
12682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
12683 $as_echo "$pgac_cv_var_int_timezone" >&6; }
12684 if test x"$pgac_cv_var_int_timezone" = xyes ; then
12686 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
12689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for accept()" >&5
12690 $as_echo_n "checking types of arguments for accept()... " >&6; }
12691 if ${ac_cv_func_accept_return+:} false; then :
12692 $as_echo_n "(cached) " >&6
12694 if ${ac_cv_func_accept_arg1+:} false; then :
12695 $as_echo_n "(cached) " >&6
12697 if ${ac_cv_func_accept_arg2+:} false; then :
12698 $as_echo_n "(cached) " >&6
12700 if ${ac_cv_func_accept_arg3+:} false; then :
12701 $as_echo_n "(cached) " >&6
12703 for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL' 'SOCKET WSAAPI'; do
12704 for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
12705 for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
12706 for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
12707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12708 /* end confdefs.h. */
12709 #include <sys/types.h>
12710 #include <sys/socket.h>
12711 extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
12713 if ac_fn_c_try_compile "$LINENO"; then :
12714 ac_not_found=no; break 4
12718 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12723 if test "$ac_not_found" = yes; then
12724 as_fn_error $? "could not determine argument types" "$LINENO" 5
12726 if test "$ac_cv_func_accept_arg3" = "void"; then
12727 ac_cv_func_accept_arg3=int
12737 { $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
12738 $as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
12740 cat >>confdefs.h <<_ACEOF
12741 #define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
12745 cat >>confdefs.h <<_ACEOF
12746 #define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
12750 cat >>confdefs.h <<_ACEOF
12751 #define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
12755 cat >>confdefs.h <<_ACEOF
12756 #define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
12760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
12761 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
12762 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
12763 $as_echo_n "(cached) " >&6
12765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12766 /* end confdefs.h. */
12767 #include <sys/time.h>
12771 struct timeval *tp;
12772 struct timezone *tzp;
12773 gettimeofday(tp,tzp);
12778 if ac_fn_c_try_compile "$LINENO"; then :
12779 pgac_cv_func_gettimeofday_1arg=no
12781 pgac_cv_func_gettimeofday_1arg=yes
12783 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
12786 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
12787 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
12789 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
12793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
12794 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
12795 if ${pgac_cv_func_wcstombs_l+:} false; then :
12796 $as_echo_n "(cached) " >&6
12798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12799 /* end confdefs.h. */
12800 #include <stdlib.h>
12801 #include <locale.h>
12812 if ac_fn_c_try_compile "$LINENO"; then :
12813 pgac_cv_func_wcstombs_l='yes'
12815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12816 /* end confdefs.h. */
12817 #include <stdlib.h>
12818 #include <locale.h>
12819 #include <xlocale.h>
12830 if ac_fn_c_try_compile "$LINENO"; then :
12831 pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
12833 pgac_cv_func_wcstombs_l='no'
12835 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12837 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
12840 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
12841 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
12843 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
12847 # Some versions of libedit contain strlcpy(), setproctitle(), and other
12848 # symbols that that library has no business exposing to the world. Pending
12849 # acquisition of a clue by those developers, ignore libedit (including its
12850 # possible alias of libreadline) while checking for everything else.
12851 LIBS_including_readline="$LIBS"
12852 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
12854 for ac_func in cbrt clock_gettime dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll pstat pthread_is_threaded_np readlink setproctitle setsid shm_open symlink sync_file_range towlower utime utimes wcstombs wcstombs_l
12856 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12857 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12858 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12859 cat >>confdefs.h <<_ACEOF
12860 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12867 ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko"
12868 if test "x$ac_cv_func_fseeko" = xyes; then :
12869 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
12872 case " $LIBOBJS " in
12873 *" fseeko.$ac_objext "* ) ;;
12874 *) LIBOBJS="$LIBOBJS fseeko.$ac_objext"
12882 # NetBSD uses a custom fseeko/ftello built on fsetpos/fgetpos
12883 # Mingw uses macros to access Win32 API calls
12886 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
12888 ac_cv_func_fseeko=yes;;
12890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12891 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
12892 if ${ac_cv_sys_largefile_source+:} false; then :
12893 $as_echo_n "(cached) " >&6
12896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12897 /* end confdefs.h. */
12898 #include <sys/types.h> /* for off_t */
12903 int (*fp) (FILE *, off_t, int) = fseeko;
12904 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
12909 if ac_fn_c_try_link "$LINENO"; then :
12910 ac_cv_sys_largefile_source=no; break
12912 rm -f core conftest.err conftest.$ac_objext \
12913 conftest$ac_exeext conftest.$ac_ext
12914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12915 /* end confdefs.h. */
12916 #define _LARGEFILE_SOURCE 1
12917 #include <sys/types.h> /* for off_t */
12922 int (*fp) (FILE *, off_t, int) = fseeko;
12923 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
12928 if ac_fn_c_try_link "$LINENO"; then :
12929 ac_cv_sys_largefile_source=1; break
12931 rm -f core conftest.err conftest.$ac_objext \
12932 conftest$ac_exeext conftest.$ac_ext
12933 ac_cv_sys_largefile_source=unknown
12937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
12938 $as_echo "$ac_cv_sys_largefile_source" >&6; }
12939 case $ac_cv_sys_largefile_source in #(
12942 cat >>confdefs.h <<_ACEOF
12943 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12949 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12950 # in glibc 2.1.3, but that breaks too many other things.
12951 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12952 if test $ac_cv_sys_largefile_source != unknown; then
12954 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
12960 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
12961 # by calling it, 2009-04-02
12962 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
12963 if test "$PORTNAME" != "solaris"; then
12964 for ac_func in posix_fadvise
12966 ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
12967 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
12968 cat >>confdefs.h <<_ACEOF
12969 #define HAVE_POSIX_FADVISE 1
12975 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
12977 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
12983 cat >>confdefs.h <<_ACEOF
12984 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
12989 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
12991 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
12997 cat >>confdefs.h <<_ACEOF
12998 #define HAVE_DECL_FDATASYNC $ac_have_decl
13001 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
13002 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
13008 cat >>confdefs.h <<_ACEOF
13009 #define HAVE_DECL_STRLCAT $ac_have_decl
13011 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
13012 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
13018 cat >>confdefs.h <<_ACEOF
13019 #define HAVE_DECL_STRLCPY $ac_have_decl
13022 # This is probably only present on macOS, but may as well check always
13023 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
13025 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
13031 cat >>confdefs.h <<_ACEOF
13032 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
13037 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
13038 #include <netinet/in.h>
13040 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
13042 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
13049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
13050 $as_echo_n "checking for PS_STRINGS... " >&6; }
13051 if ${pgac_cv_var_PS_STRINGS+:} false; then :
13052 $as_echo_n "(cached) " >&6
13054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13055 /* end confdefs.h. */
13056 #include <machine/vmparam.h>
13057 #include <sys/exec.h>
13062 PS_STRINGS->ps_nargvstr = 1;
13063 PS_STRINGS->ps_argvstr = "foo";
13068 if ac_fn_c_try_link "$LINENO"; then :
13069 pgac_cv_var_PS_STRINGS=yes
13071 pgac_cv_var_PS_STRINGS=no
13073 rm -f core conftest.err conftest.$ac_objext \
13074 conftest$ac_exeext conftest.$ac_ext
13076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
13077 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
13078 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
13080 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
13085 # We use our snprintf.c emulation if either snprintf() or vsnprintf()
13086 # is missing. Yes, there are machines that have only one. We may
13087 # also decide to use snprintf.c if snprintf() is present but does not
13088 # have all the features we need --- see below.
13090 if test "$PORTNAME" = "win32"; then
13091 # Win32 gets snprintf.c built unconditionally.
13093 # To properly translate all NLS languages strings, we must support the
13094 # *printf() %$ format, which allows *printf() arguments to be selected
13095 # by position in the translated string.
13097 # libintl versions < 0.13 use the native *printf() functions, and Win32
13098 # *printf() doesn't understand %$, so we must use our /port versions,
13099 # which do understand %$. libintl versions >= 0.13 include their own
13100 # *printf versions on Win32. The libintl 0.13 release note text is:
13102 # C format strings with positions, as they arise when a translator
13103 # needs to reorder a sentence, are now supported on all platforms.
13104 # On those few platforms (NetBSD and Woe32) for which the native
13105 # printf()/fprintf()/... functions don't support such format
13106 # strings, replacements are provided through <libintl.h>.
13108 # We could use libintl >= 0.13's *printf() if we were sure that we had
13109 # a litint >= 0.13 at runtime, but seeing that there is no clean way
13110 # to guarantee that, it is best to just use our own, so we are sure to
13111 # get %$ support. In include/port.h we disable the *printf() macros
13112 # that might have been defined by libintl.
13114 # We do this unconditionally whether NLS is used or not so we are sure
13115 # that all Win32 libraries and binaries behave the same.
13116 pgac_need_repl_snprintf=yes
13118 pgac_need_repl_snprintf=no
13119 for ac_func in snprintf
13121 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
13122 if test "x$ac_cv_func_snprintf" = xyes; then :
13123 cat >>confdefs.h <<_ACEOF
13124 #define HAVE_SNPRINTF 1
13128 pgac_need_repl_snprintf=yes
13132 for ac_func in vsnprintf
13134 ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
13135 if test "x$ac_cv_func_vsnprintf" = xyes; then :
13136 cat >>confdefs.h <<_ACEOF
13137 #define HAVE_VSNPRINTF 1
13141 pgac_need_repl_snprintf=yes
13148 # Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
13149 # include/c.h will provide declarations. Note this is a separate test
13150 # from whether the functions exist in the C library --- there are
13151 # systems that have the functions but don't bother to declare them :-(
13153 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
13154 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
13160 cat >>confdefs.h <<_ACEOF
13161 #define HAVE_DECL_SNPRINTF $ac_have_decl
13163 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
13164 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
13170 cat >>confdefs.h <<_ACEOF
13171 #define HAVE_DECL_VSNPRINTF $ac_have_decl
13176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
13177 $as_echo_n "checking for isinf... " >&6; }
13178 if ${ac_cv_func_isinf+:} false; then :
13179 $as_echo_n "(cached) " >&6
13181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13182 /* end confdefs.h. */
13185 double glob_double;
13190 return isinf(glob_double) ? 0 : 1;
13195 if ac_fn_c_try_link "$LINENO"; then :
13196 ac_cv_func_isinf=yes
13198 ac_cv_func_isinf=no
13200 rm -f core conftest.err conftest.$ac_objext \
13201 conftest$ac_exeext conftest.$ac_ext
13203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_isinf" >&5
13204 $as_echo "$ac_cv_func_isinf" >&6; }
13206 if test $ac_cv_func_isinf = yes ; then
13208 $as_echo "#define HAVE_ISINF 1" >>confdefs.h
13211 case " $LIBOBJS " in
13212 *" isinf.$ac_objext "* ) ;;
13213 *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
13217 # Look for a way to implement a substitute for isinf()
13218 for ac_func in fpclass fp_class fp_class_d class
13220 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13221 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13222 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13223 cat >>confdefs.h <<_ACEOF
13224 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13232 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
13233 if test "x$ac_cv_func_crypt" = xyes; then :
13234 $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
13237 case " $LIBOBJS " in
13238 *" crypt.$ac_objext "* ) ;;
13239 *) LIBOBJS="$LIBOBJS crypt.$ac_objext"
13245 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
13246 if test "x$ac_cv_func_fls" = xyes; then :
13247 $as_echo "#define HAVE_FLS 1" >>confdefs.h
13250 case " $LIBOBJS " in
13251 *" fls.$ac_objext "* ) ;;
13252 *) LIBOBJS="$LIBOBJS fls.$ac_objext"
13258 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
13259 if test "x$ac_cv_func_getopt" = xyes; then :
13260 $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
13263 case " $LIBOBJS " in
13264 *" getopt.$ac_objext "* ) ;;
13265 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
13271 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
13272 if test "x$ac_cv_func_getrusage" = xyes; then :
13273 $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
13276 case " $LIBOBJS " in
13277 *" getrusage.$ac_objext "* ) ;;
13278 *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
13284 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
13285 if test "x$ac_cv_func_inet_aton" = xyes; then :
13286 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
13289 case " $LIBOBJS " in
13290 *" inet_aton.$ac_objext "* ) ;;
13291 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
13297 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
13298 if test "x$ac_cv_func_mkdtemp" = xyes; then :
13299 $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
13302 case " $LIBOBJS " in
13303 *" mkdtemp.$ac_objext "* ) ;;
13304 *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
13310 ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random"
13311 if test "x$ac_cv_func_random" = xyes; then :
13312 $as_echo "#define HAVE_RANDOM 1" >>confdefs.h
13315 case " $LIBOBJS " in
13316 *" random.$ac_objext "* ) ;;
13317 *) LIBOBJS="$LIBOBJS random.$ac_objext"
13323 ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint"
13324 if test "x$ac_cv_func_rint" = xyes; then :
13325 $as_echo "#define HAVE_RINT 1" >>confdefs.h
13328 case " $LIBOBJS " in
13329 *" rint.$ac_objext "* ) ;;
13330 *) LIBOBJS="$LIBOBJS rint.$ac_objext"
13336 ac_fn_c_check_func "$LINENO" "srandom" "ac_cv_func_srandom"
13337 if test "x$ac_cv_func_srandom" = xyes; then :
13338 $as_echo "#define HAVE_SRANDOM 1" >>confdefs.h
13341 case " $LIBOBJS " in
13342 *" srandom.$ac_objext "* ) ;;
13343 *) LIBOBJS="$LIBOBJS srandom.$ac_objext"
13349 ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
13350 if test "x$ac_cv_func_strerror" = xyes; then :
13351 $as_echo "#define HAVE_STRERROR 1" >>confdefs.h
13354 case " $LIBOBJS " in
13355 *" strerror.$ac_objext "* ) ;;
13356 *) LIBOBJS="$LIBOBJS strerror.$ac_objext"
13362 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
13363 if test "x$ac_cv_func_strlcat" = xyes; then :
13364 $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
13367 case " $LIBOBJS " in
13368 *" strlcat.$ac_objext "* ) ;;
13369 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
13375 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
13376 if test "x$ac_cv_func_strlcpy" = xyes; then :
13377 $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
13380 case " $LIBOBJS " in
13381 *" strlcpy.$ac_objext "* ) ;;
13382 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
13392 # Windows uses a specialised env handler
13393 # and doesn't need a replacement getpeereid because it doesn't use
13397 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
13400 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
13402 ac_cv_func_unsetenv=yes
13403 ac_cv_func_getpeereid=yes;;
13405 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
13406 if test "x$ac_cv_func_unsetenv" = xyes; then :
13407 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
13410 case " $LIBOBJS " in
13411 *" unsetenv.$ac_objext "* ) ;;
13412 *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
13418 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
13419 if test "x$ac_cv_func_getpeereid" = xyes; then :
13420 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
13423 case " $LIBOBJS " in
13424 *" getpeereid.$ac_objext "* ) ;;
13425 *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
13435 # System's version of getaddrinfo(), if any, may be used only if we found
13436 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
13437 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
13438 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
13439 test "$PORTNAME" != "win32"; then
13440 ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
13441 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
13442 $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
13445 case " $LIBOBJS " in
13446 *" getaddrinfo.$ac_objext "* ) ;;
13447 *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
13455 case " $LIBOBJS " in
13456 *" getaddrinfo.$ac_objext "* ) ;;
13457 *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
13463 # Similarly, use system's getopt_long() only if system provides struct option.
13464 if test x"$ac_cv_type_struct_option" = xyes ; then
13465 ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
13466 if test "x$ac_cv_func_getopt_long" = xyes; then :
13467 $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
13470 case " $LIBOBJS " in
13471 *" getopt_long.$ac_objext "* ) ;;
13472 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
13480 case " $LIBOBJS " in
13481 *" getopt_long.$ac_objext "* ) ;;
13482 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
13488 # Solaris' getopt() doesn't do what we want for long options, so always use
13489 # our version on that platform.
13490 if test "$PORTNAME" = "solaris"; then
13491 case " $LIBOBJS " in
13492 *" getopt.$ac_objext "* ) ;;
13493 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
13499 # mingw has adopted a GNU-centric interpretation of optind/optreset,
13500 # so always use our version on Windows.
13501 if test "$PORTNAME" = "win32"; then
13502 case " $LIBOBJS " in
13503 *" getopt.$ac_objext "* ) ;;
13504 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
13508 case " $LIBOBJS " in
13509 *" getopt_long.$ac_objext "* ) ;;
13510 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
13516 # Win32 (really MinGW) support
13517 if test "$PORTNAME" = "win32"; then
13518 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
13519 if test "x$ac_cv_func_gettimeofday" = xyes; then :
13520 $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
13523 case " $LIBOBJS " in
13524 *" gettimeofday.$ac_objext "* ) ;;
13525 *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
13532 case " $LIBOBJS " in
13533 *" dirmod.$ac_objext "* ) ;;
13534 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
13538 case " $LIBOBJS " in
13539 *" kill.$ac_objext "* ) ;;
13540 *) LIBOBJS="$LIBOBJS kill.$ac_objext"
13544 case " $LIBOBJS " in
13545 *" open.$ac_objext "* ) ;;
13546 *) LIBOBJS="$LIBOBJS open.$ac_objext"
13550 case " $LIBOBJS " in
13551 *" system.$ac_objext "* ) ;;
13552 *) LIBOBJS="$LIBOBJS system.$ac_objext"
13556 case " $LIBOBJS " in
13557 *" win32env.$ac_objext "* ) ;;
13558 *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
13562 case " $LIBOBJS " in
13563 *" win32error.$ac_objext "* ) ;;
13564 *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
13568 case " $LIBOBJS " in
13569 *" win32security.$ac_objext "* ) ;;
13570 *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
13574 case " $LIBOBJS " in
13575 *" win32setlocale.$ac_objext "* ) ;;
13576 *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
13581 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
13583 ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
13584 #define WIN32_LEAN_AND_MEAN
13585 #include <windows.h>
13586 #include <string.h>
13587 #include <dbghelp.h>
13589 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
13591 cat >>confdefs.h <<_ACEOF
13592 #define HAVE_MINIDUMP_TYPE 1
13595 pgac_minidump_type=yes
13597 pgac_minidump_type=no
13601 if test x"$pgac_minidump_type" = x"yes" ; then
13602 have_win32_dbghelp=yes
13605 have_win32_dbghelp=no
13609 # Cygwin needs only a bit of that
13610 if test "$PORTNAME" = "cygwin"; then
13611 case " $LIBOBJS " in
13612 *" dirmod.$ac_objext "* ) ;;
13613 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
13619 ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h>
13620 /* NetBSD declares sys_siglist in unistd.h. */
13621 #ifdef HAVE_UNISTD_H
13622 # include <unistd.h>
13626 if test "x$ac_cv_have_decl_sys_siglist" = xyes; then :
13632 cat >>confdefs.h <<_ACEOF
13633 #define HAVE_DECL_SYS_SIGLIST $ac_have_decl
13637 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
13638 if test "x$ac_cv_func_syslog" = xyes; then :
13639 ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
13640 if test "x$ac_cv_header_syslog_h" = xyes; then :
13642 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
13650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
13651 $as_echo_n "checking for opterr... " >&6; }
13652 if ${pgac_cv_var_int_opterr+:} false; then :
13653 $as_echo_n "(cached) " >&6
13655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13656 /* end confdefs.h. */
13657 #include <unistd.h>
13661 extern int opterr; opterr = 1;
13666 if ac_fn_c_try_link "$LINENO"; then :
13667 pgac_cv_var_int_opterr=yes
13669 pgac_cv_var_int_opterr=no
13671 rm -f core conftest.err conftest.$ac_objext \
13672 conftest$ac_exeext conftest.$ac_ext
13674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
13675 $as_echo "$pgac_cv_var_int_opterr" >&6; }
13676 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
13678 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
13682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
13683 $as_echo_n "checking for optreset... " >&6; }
13684 if ${pgac_cv_var_int_optreset+:} false; then :
13685 $as_echo_n "(cached) " >&6
13687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13688 /* end confdefs.h. */
13689 #include <unistd.h>
13693 extern int optreset; optreset = 1;
13698 if ac_fn_c_try_link "$LINENO"; then :
13699 pgac_cv_var_int_optreset=yes
13701 pgac_cv_var_int_optreset=no
13703 rm -f core conftest.err conftest.$ac_objext \
13704 conftest$ac_exeext conftest.$ac_ext
13706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
13707 $as_echo "$pgac_cv_var_int_optreset" >&6; }
13708 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
13710 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
13714 for ac_func in strtoll strtoq
13716 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13717 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13718 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13719 cat >>confdefs.h <<_ACEOF
13720 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13726 for ac_func in strtoull strtouq
13728 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13729 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13730 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13731 cat >>confdefs.h <<_ACEOF
13732 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13739 if test "$with_icu" = yes; then
13740 # ICU functions are macros, so we need to do this the long way.
13742 # ucol_strcollUTF8() appeared in ICU 50.
13743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ucol_strcollUTF8" >&5
13744 $as_echo_n "checking for ucol_strcollUTF8... " >&6; }
13745 if ${pgac_cv_func_ucol_strcollUTF8+:} false; then :
13746 $as_echo_n "(cached) " >&6
13748 ac_save_CPPFLAGS=$CPPFLAGS
13749 CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
13751 LIBS="$ICU_LIBS $LIBS"
13752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13753 /* end confdefs.h. */
13754 #include <unicode/ucol.h>
13759 ucol_strcollUTF8(NULL, NULL, 0, NULL, 0, NULL);
13764 if ac_fn_c_try_link "$LINENO"; then :
13765 pgac_cv_func_ucol_strcollUTF8=yes
13767 pgac_cv_func_ucol_strcollUTF8=no
13769 rm -f core conftest.err conftest.$ac_objext \
13770 conftest$ac_exeext conftest.$ac_ext
13771 CPPFLAGS=$ac_save_CPPFLAGS
13774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_ucol_strcollUTF8" >&5
13775 $as_echo "$pgac_cv_func_ucol_strcollUTF8" >&6; }
13776 if test "$pgac_cv_func_ucol_strcollUTF8" = yes ; then
13778 $as_echo "#define HAVE_UCOL_STRCOLLUTF8 1" >>confdefs.h
13783 # Lastly, restore full LIBS list and check for readline/libedit symbols
13784 LIBS="$LIBS_including_readline"
13786 if test "$with_readline" = yes; then
13787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_append_character" >&5
13788 $as_echo_n "checking for rl_completion_append_character... " >&6; }
13789 if ${pgac_cv_var_rl_completion_append_character+:} false; then :
13790 $as_echo_n "(cached) " >&6
13792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13793 /* end confdefs.h. */
13795 #ifdef HAVE_READLINE_READLINE_H
13796 # include <readline/readline.h>
13797 #elif defined(HAVE_READLINE_H)
13798 # include <readline.h>
13804 rl_completion_append_character = 'x';
13809 if ac_fn_c_try_link "$LINENO"; then :
13810 pgac_cv_var_rl_completion_append_character=yes
13812 pgac_cv_var_rl_completion_append_character=no
13814 rm -f core conftest.err conftest.$ac_objext \
13815 conftest$ac_exeext conftest.$ac_ext
13817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_append_character" >&5
13818 $as_echo "$pgac_cv_var_rl_completion_append_character" >&6; }
13819 if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
13821 $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
13824 for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
13826 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13827 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13828 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13829 cat >>confdefs.h <<_ACEOF
13830 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13836 for ac_func in append_history history_truncate_file
13838 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13839 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13840 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13841 cat >>confdefs.h <<_ACEOF
13842 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13851 # This test makes sure that run tests work at all. Sometimes a shared
13852 # library is found by the linker, but the runtime linker can't find it.
13853 # This check should come after all modifications of compiler or linker
13854 # variables, and before any other run tests.
13855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
13856 $as_echo_n "checking test program... " >&6; }
13857 if test "$cross_compiling" = yes; then :
13858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
13859 $as_echo "cross-compiling" >&6; }
13861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13862 /* end confdefs.h. */
13863 int main() { return 0; }
13865 if ac_fn_c_try_run "$LINENO"; then :
13866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
13867 $as_echo "ok" >&6; }
13869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
13870 $as_echo "failed" >&6; }
13872 Could not execute a simple test program. This may be a problem
13873 related to locating shared libraries. Check the file 'config.log'
13874 for the exact reason." "$LINENO" 5
13876 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13877 conftest.$ac_objext conftest.beam conftest.$ac_ext
13881 # --------------------
13882 # Run tests below here
13883 # --------------------
13885 # Force use of our snprintf if system's doesn't do arg control
13886 # See comment above at snprintf test for details.
13887 if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
13888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports argument control" >&5
13889 $as_echo_n "checking whether snprintf supports argument control... " >&6; }
13890 if ${pgac_cv_snprintf_arg_control+:} false; then :
13891 $as_echo_n "(cached) " >&6
13893 if test "$cross_compiling" = yes; then :
13894 pgac_cv_snprintf_arg_control=cross
13896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13897 /* end confdefs.h. */
13899 #include <string.h>
13905 /* can it swap arguments? */
13906 snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
13907 if (strcmp(buf, "4 3") != 0)
13912 if ac_fn_c_try_run "$LINENO"; then :
13913 pgac_cv_snprintf_arg_control=yes
13915 pgac_cv_snprintf_arg_control=no
13917 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13918 conftest.$ac_objext conftest.beam conftest.$ac_ext
13923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_arg_control" >&5
13924 $as_echo "$pgac_cv_snprintf_arg_control" >&6; }
13926 if test $pgac_cv_snprintf_arg_control != yes ; then
13927 pgac_need_repl_snprintf=yes
13934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
13935 $as_echo_n "checking whether long int is 64 bits... " >&6; }
13936 if ${pgac_cv_type_long_int_64+:} false; then :
13937 $as_echo_n "(cached) " >&6
13939 if test "$cross_compiling" = yes; then :
13940 # If cross-compiling, check the size reported by the compiler and
13941 # trust that the arithmetic works.
13942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13943 /* end confdefs.h. */
13948 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
13949 test_array [0] = 0;
13950 return test_array [0];
13956 if ac_fn_c_try_compile "$LINENO"; then :
13957 pgac_cv_type_long_int_64=yes
13959 pgac_cv_type_long_int_64=no
13961 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13964 /* end confdefs.h. */
13965 typedef long int ac_int64;
13968 * These are globals to discourage the compiler from folding all the
13969 * arithmetic tests down to compile-time constants.
13971 ac_int64 a = 20000001;
13972 ac_int64 b = 40000005;
13974 int does_int64_work()
13978 if (sizeof(ac_int64) != 8)
13979 return 0; /* definitely not the right size */
13981 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
13991 return (! does_int64_work());
13994 if ac_fn_c_try_run "$LINENO"; then :
13995 pgac_cv_type_long_int_64=yes
13997 pgac_cv_type_long_int_64=no
13999 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14000 conftest.$ac_objext conftest.beam conftest.$ac_ext
14004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
14005 $as_echo "$pgac_cv_type_long_int_64" >&6; }
14007 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
14008 if test x"$pgac_cv_type_long_int_64" = xyes ; then
14010 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
14015 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
14016 pg_int64_type="long int"
14018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
14019 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
14020 if ${pgac_cv_type_long_long_int_64+:} false; then :
14021 $as_echo_n "(cached) " >&6
14023 if test "$cross_compiling" = yes; then :
14024 # If cross-compiling, check the size reported by the compiler and
14025 # trust that the arithmetic works.
14026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14027 /* end confdefs.h. */
14032 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
14033 test_array [0] = 0;
14034 return test_array [0];
14040 if ac_fn_c_try_compile "$LINENO"; then :
14041 pgac_cv_type_long_long_int_64=yes
14043 pgac_cv_type_long_long_int_64=no
14045 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14048 /* end confdefs.h. */
14049 typedef long long int ac_int64;
14052 * These are globals to discourage the compiler from folding all the
14053 * arithmetic tests down to compile-time constants.
14055 ac_int64 a = 20000001;
14056 ac_int64 b = 40000005;
14058 int does_int64_work()
14062 if (sizeof(ac_int64) != 8)
14063 return 0; /* definitely not the right size */
14065 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
14075 return (! does_int64_work());
14078 if ac_fn_c_try_run "$LINENO"; then :
14079 pgac_cv_type_long_long_int_64=yes
14081 pgac_cv_type_long_long_int_64=no
14083 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14084 conftest.$ac_objext conftest.beam conftest.$ac_ext
14088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
14089 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
14091 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
14092 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
14094 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
14098 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
14099 pg_int64_type="long long int"
14101 as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
14106 cat >>confdefs.h <<_ACEOF
14107 #define PG_INT64_TYPE $pg_int64_type
14112 if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
14113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14114 /* end confdefs.h. */
14116 #define INT64CONST(x) x##LL
14117 long long int foo = INT64CONST(0x1234567890123456);
14120 if ac_fn_c_try_compile "$LINENO"; then :
14122 $as_echo "#define HAVE_LL_CONSTANTS 1" >>confdefs.h
14125 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14129 # If we found "long int" is 64 bits, assume snprintf handles it. If
14130 # we found we need to use "long long int", better check. We cope with
14131 # snprintfs that use %lld, %qd, or %I64d as the format. If none of these
14132 # work, fall back to our own snprintf emulation (which we know uses %lld).
14134 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
14135 if test $pgac_need_repl_snprintf = no; then
14136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking snprintf length modifier for long long int" >&5
14137 $as_echo_n "checking snprintf length modifier for long long int... " >&6; }
14138 if ${pgac_cv_snprintf_long_long_int_modifier+:} false; then :
14139 $as_echo_n "(cached) " >&6
14141 for pgac_modifier in 'll' 'q' 'I64'; do
14142 if test "$cross_compiling" = yes; then :
14143 pgac_cv_snprintf_long_long_int_modifier=cross; break
14145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14146 /* end confdefs.h. */
14148 #include <string.h>
14149 typedef long long int ac_int64;
14150 #define INT64_FORMAT "%${pgac_modifier}d"
14152 ac_int64 a = 20000001;
14153 ac_int64 b = 40000005;
14155 int does_int64_snprintf_work()
14160 if (sizeof(ac_int64) != 8)
14161 return 0; /* doesn't look like the right size */
14164 snprintf(buf, 100, INT64_FORMAT, c);
14165 if (strcmp(buf, "800000140000005") != 0)
14166 return 0; /* either multiply or snprintf is busted */
14172 return (! does_int64_snprintf_work());
14175 if ac_fn_c_try_run "$LINENO"; then :
14176 pgac_cv_snprintf_long_long_int_modifier=$pgac_modifier; break
14178 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14179 conftest.$ac_objext conftest.beam conftest.$ac_ext
14185 LONG_LONG_INT_MODIFIER=''
14187 case $pgac_cv_snprintf_long_long_int_modifier in
14188 cross) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot test (not on host machine)" >&5
14189 $as_echo "cannot test (not on host machine)" >&6; };;
14190 ?*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_long_long_int_modifier" >&5
14191 $as_echo "$pgac_cv_snprintf_long_long_int_modifier" >&6; }
14192 LONG_LONG_INT_MODIFIER=$pgac_cv_snprintf_long_long_int_modifier;;
14193 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14194 $as_echo "none" >&6; };;
14196 if test "$LONG_LONG_INT_MODIFIER" = ""; then
14197 # Force usage of our own snprintf, since system snprintf is broken
14198 pgac_need_repl_snprintf=yes
14199 LONG_LONG_INT_MODIFIER='ll'
14202 # Here if we previously decided we needed to use our own snprintf
14203 LONG_LONG_INT_MODIFIER='ll'
14206 # Here if we are not using 'long long int' at all
14207 LONG_LONG_INT_MODIFIER='l'
14210 INT64_MODIFIER="\"$LONG_LONG_INT_MODIFIER\""
14213 cat >>confdefs.h <<_ACEOF
14214 #define INT64_MODIFIER $INT64_MODIFIER
14218 # Also force use of our snprintf if the system's doesn't support the %z flag.
14219 if test "$pgac_need_repl_snprintf" = no; then
14220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf supports the %z modifier" >&5
14221 $as_echo_n "checking whether snprintf supports the %z modifier... " >&6; }
14222 if ${pgac_cv_snprintf_size_t_support+:} false; then :
14223 $as_echo_n "(cached) " >&6
14225 if test "$cross_compiling" = yes; then :
14226 pgac_cv_snprintf_size_t_support=cross
14228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14229 /* end confdefs.h. */
14231 #include <string.h>
14239 * Print the largest unsigned number fitting in a size_t using both %zu
14240 * and the previously-determined format for 64-bit integers. Note that
14241 * we don't run this code unless we know snprintf handles 64-bit ints.
14243 bufz[0] = '\0'; /* in case snprintf fails to emit anything */
14244 snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
14245 snprintf(buf64, sizeof(buf64), "%" INT64_MODIFIER "u",
14246 (unsigned PG_INT64_TYPE) ~((size_t) 0));
14247 if (strcmp(bufz, buf64) != 0)
14252 if ac_fn_c_try_run "$LINENO"; then :
14253 pgac_cv_snprintf_size_t_support=yes
14255 pgac_cv_snprintf_size_t_support=no
14257 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14258 conftest.$ac_objext conftest.beam conftest.$ac_ext
14263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_snprintf_size_t_support" >&5
14264 $as_echo "$pgac_cv_snprintf_size_t_support" >&6; }
14266 if test "$pgac_cv_snprintf_size_t_support" != yes; then
14267 pgac_need_repl_snprintf=yes
14271 # Now we have checked all the reasons to replace snprintf
14272 if test $pgac_need_repl_snprintf = yes; then
14274 $as_echo "#define USE_REPL_SNPRINTF 1" >>confdefs.h
14276 case " $LIBOBJS " in
14277 *" snprintf.$ac_objext "* ) ;;
14278 *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
14284 # Check size of void *, size_t (enables tweaks for > 32bit address space)
14285 # The cast to long int works around a bug in the HP C Compiler
14286 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14287 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14288 # This bug is HP SR number 8606223364.
14289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
14290 $as_echo_n "checking size of void *... " >&6; }
14291 if ${ac_cv_sizeof_void_p+:} false; then :
14292 $as_echo_n "(cached) " >&6
14294 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
14297 if test "$ac_cv_type_void_p" = yes; then
14298 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14299 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14300 as_fn_error 77 "cannot compute sizeof (void *)
14301 See \`config.log' for more details" "$LINENO" 5; }
14303 ac_cv_sizeof_void_p=0
14308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
14309 $as_echo "$ac_cv_sizeof_void_p" >&6; }
14313 cat >>confdefs.h <<_ACEOF
14314 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
14318 # The cast to long int works around a bug in the HP C Compiler
14319 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14320 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14321 # This bug is HP SR number 8606223364.
14322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
14323 $as_echo_n "checking size of size_t... " >&6; }
14324 if ${ac_cv_sizeof_size_t+:} false; then :
14325 $as_echo_n "(cached) " >&6
14327 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
14330 if test "$ac_cv_type_size_t" = yes; then
14331 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14332 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14333 as_fn_error 77 "cannot compute sizeof (size_t)
14334 See \`config.log' for more details" "$LINENO" 5; }
14336 ac_cv_sizeof_size_t=0
14341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
14342 $as_echo "$ac_cv_sizeof_size_t" >&6; }
14346 cat >>confdefs.h <<_ACEOF
14347 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
14351 # The cast to long int works around a bug in the HP C Compiler
14352 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14353 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14354 # This bug is HP SR number 8606223364.
14355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
14356 $as_echo_n "checking size of long... " >&6; }
14357 if ${ac_cv_sizeof_long+:} false; then :
14358 $as_echo_n "(cached) " >&6
14360 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
14363 if test "$ac_cv_type_long" = yes; then
14364 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14365 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14366 as_fn_error 77 "cannot compute sizeof (long)
14367 See \`config.log' for more details" "$LINENO" 5; }
14369 ac_cv_sizeof_long=0
14374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
14375 $as_echo "$ac_cv_sizeof_long" >&6; }
14379 cat >>confdefs.h <<_ACEOF
14380 #define SIZEOF_LONG $ac_cv_sizeof_long
14385 # Decide whether float4 is passed by value: user-selectable, enabled by default
14386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float4 passed by value" >&5
14387 $as_echo_n "checking whether to build with float4 passed by value... " >&6; }
14390 # Check whether --enable-float4-byval was given.
14391 if test "${enable_float4_byval+set}" = set; then :
14392 enableval=$enable_float4_byval;
14396 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
14398 float4passbyval=true
14401 float4passbyval=false
14404 as_fn_error $? "no argument expected for --enable-float4-byval option" "$LINENO" 5
14409 enable_float4_byval=yes
14411 $as_echo "#define USE_FLOAT4_BYVAL 1" >>confdefs.h
14413 float4passbyval=true
14417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float4_byval" >&5
14418 $as_echo "$enable_float4_byval" >&6; }
14420 cat >>confdefs.h <<_ACEOF
14421 #define FLOAT4PASSBYVAL $float4passbyval
14425 # Decide whether float8 is passed by value.
14426 # Note: this setting also controls int8 and related types such as timestamp.
14427 # If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
14428 # If not, trying to select it is an error.
14429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with float8 passed by value" >&5
14430 $as_echo_n "checking whether to build with float8 passed by value... " >&6; }
14431 if test $ac_cv_sizeof_void_p -ge 8 ; then
14434 # Check whether --enable-float8-byval was given.
14435 if test "${enable_float8_byval+set}" = set; then :
14436 enableval=$enable_float8_byval;
14445 as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
14450 enable_float8_byval=yes
14458 # Check whether --enable-float8-byval was given.
14459 if test "${enable_float8_byval+set}" = set; then :
14460 enableval=$enable_float8_byval;
14469 as_fn_error $? "no argument expected for --enable-float8-byval option" "$LINENO" 5
14474 enable_float8_byval=no
14479 if test "$enable_float8_byval" = yes ; then
14480 as_fn_error $? "--enable-float8-byval is not supported on 32-bit platforms." "$LINENO" 5
14483 if test "$enable_float8_byval" = yes ; then
14485 $as_echo "#define USE_FLOAT8_BYVAL 1" >>confdefs.h
14487 float8passbyval=true
14489 float8passbyval=false
14491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_float8_byval" >&5
14492 $as_echo "$enable_float8_byval" >&6; }
14494 cat >>confdefs.h <<_ACEOF
14495 #define FLOAT8PASSBYVAL $float8passbyval
14499 # Determine memory alignment requirements for the basic C data types.
14501 # The cast to long int works around a bug in the HP C Compiler,
14502 # see AC_CHECK_SIZEOF for more information.
14503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
14504 $as_echo_n "checking alignment of short... " >&6; }
14505 if ${ac_cv_alignof_short+:} false; then :
14506 $as_echo_n "(cached) " >&6
14508 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short" "$ac_includes_default
14510 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14512 typedef struct { char x; short y; } ac__type_alignof_;"; then :
14515 if test "$ac_cv_type_short" = yes; then
14516 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14517 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14518 as_fn_error 77 "cannot compute alignment of short
14519 See \`config.log' for more details" "$LINENO" 5; }
14521 ac_cv_alignof_short=0
14526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
14527 $as_echo "$ac_cv_alignof_short" >&6; }
14531 cat >>confdefs.h <<_ACEOF
14532 #define ALIGNOF_SHORT $ac_cv_alignof_short
14536 # The cast to long int works around a bug in the HP C Compiler,
14537 # see AC_CHECK_SIZEOF for more information.
14538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
14539 $as_echo_n "checking alignment of int... " >&6; }
14540 if ${ac_cv_alignof_int+:} false; then :
14541 $as_echo_n "(cached) " >&6
14543 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int" "$ac_includes_default
14545 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14547 typedef struct { char x; int y; } ac__type_alignof_;"; then :
14550 if test "$ac_cv_type_int" = yes; then
14551 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14552 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14553 as_fn_error 77 "cannot compute alignment of int
14554 See \`config.log' for more details" "$LINENO" 5; }
14556 ac_cv_alignof_int=0
14561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
14562 $as_echo "$ac_cv_alignof_int" >&6; }
14566 cat >>confdefs.h <<_ACEOF
14567 #define ALIGNOF_INT $ac_cv_alignof_int
14571 # The cast to long int works around a bug in the HP C Compiler,
14572 # see AC_CHECK_SIZEOF for more information.
14573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
14574 $as_echo_n "checking alignment of long... " >&6; }
14575 if ${ac_cv_alignof_long+:} false; then :
14576 $as_echo_n "(cached) " >&6
14578 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
14580 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14582 typedef struct { char x; long y; } ac__type_alignof_;"; then :
14585 if test "$ac_cv_type_long" = yes; then
14586 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14587 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14588 as_fn_error 77 "cannot compute alignment of long
14589 See \`config.log' for more details" "$LINENO" 5; }
14591 ac_cv_alignof_long=0
14596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
14597 $as_echo "$ac_cv_alignof_long" >&6; }
14601 cat >>confdefs.h <<_ACEOF
14602 #define ALIGNOF_LONG $ac_cv_alignof_long
14606 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
14607 # The cast to long int works around a bug in the HP C Compiler,
14608 # see AC_CHECK_SIZEOF for more information.
14609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
14610 $as_echo_n "checking alignment of long long int... " >&6; }
14611 if ${ac_cv_alignof_long_long_int+:} false; then :
14612 $as_echo_n "(cached) " >&6
14614 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int" "$ac_includes_default
14616 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14618 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
14621 if test "$ac_cv_type_long_long_int" = yes; then
14622 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14623 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14624 as_fn_error 77 "cannot compute alignment of long long int
14625 See \`config.log' for more details" "$LINENO" 5; }
14627 ac_cv_alignof_long_long_int=0
14632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
14633 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
14637 cat >>confdefs.h <<_ACEOF
14638 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
14643 # The cast to long int works around a bug in the HP C Compiler,
14644 # see AC_CHECK_SIZEOF for more information.
14645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
14646 $as_echo_n "checking alignment of double... " >&6; }
14647 if ${ac_cv_alignof_double+:} false; then :
14648 $as_echo_n "(cached) " >&6
14650 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double" "$ac_includes_default
14652 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
14654 typedef struct { char x; double y; } ac__type_alignof_;"; then :
14657 if test "$ac_cv_type_double" = yes; then
14658 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14659 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14660 as_fn_error 77 "cannot compute alignment of double
14661 See \`config.log' for more details" "$LINENO" 5; }
14663 ac_cv_alignof_double=0
14668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
14669 $as_echo "$ac_cv_alignof_double" >&6; }
14673 cat >>confdefs.h <<_ACEOF
14674 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
14679 # Compute maximum alignment of any basic type.
14680 # We assume long's alignment is at least as strong as char, short, or int;
14681 # but we must check long long (if it exists) and double.
14683 MAX_ALIGNOF=$ac_cv_alignof_long
14684 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
14685 MAX_ALIGNOF=$ac_cv_alignof_double
14687 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
14688 MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
14691 cat >>confdefs.h <<_ACEOF
14692 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
14697 # Some platforms predefine the types int8, int16, etc. Only check
14698 # a (hopefully) representative subset.
14699 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
14701 if test "x$ac_cv_type_int8" = xyes; then :
14703 cat >>confdefs.h <<_ACEOF
14704 #define HAVE_INT8 1
14709 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
14711 if test "x$ac_cv_type_uint8" = xyes; then :
14713 cat >>confdefs.h <<_ACEOF
14714 #define HAVE_UINT8 1
14719 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
14721 if test "x$ac_cv_type_int64" = xyes; then :
14723 cat >>confdefs.h <<_ACEOF
14724 #define HAVE_INT64 1
14729 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
14731 if test "x$ac_cv_type_uint64" = xyes; then :
14733 cat >>confdefs.h <<_ACEOF
14734 #define HAVE_UINT64 1
14741 # Check for extensions offering the integer scalar type __int128.
14742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
14743 $as_echo_n "checking for __int128... " >&6; }
14744 if ${pgac_cv__128bit_int+:} false; then :
14745 $as_echo_n "(cached) " >&6
14747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14748 /* end confdefs.h. */
14751 * These are globals to discourage the compiler from folding all the
14752 * arithmetic tests down to compile-time constants. We do not have
14753 * convenient support for 64bit literals at this point...
14755 __int128 a = 48828125;
14756 __int128 b = 97656255;
14763 a = (a << 12) + 1; /* 200000000001 */
14764 b = (b << 12) + 5; /* 400000000005 */
14765 /* use the most relevant arithmetic ops */
14768 /* return different values, to prevent optimizations */
14777 if ac_fn_c_try_link "$LINENO"; then :
14778 pgac_cv__128bit_int=yes
14780 pgac_cv__128bit_int=no
14782 rm -f core conftest.err conftest.$ac_objext \
14783 conftest$ac_exeext conftest.$ac_ext
14785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
14786 $as_echo "$pgac_cv__128bit_int" >&6; }
14787 if test x"$pgac_cv__128bit_int" = xyes ; then
14789 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
14793 # Check for various atomic operations now that we have checked how to declare
14795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
14796 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
14797 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
14798 $as_echo_n "(cached) " >&6
14800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14801 /* end confdefs.h. */
14807 __sync_lock_test_and_set(&lock, 1);
14808 __sync_lock_release(&lock);
14813 if ac_fn_c_try_link "$LINENO"; then :
14814 pgac_cv_gcc_sync_char_tas="yes"
14816 pgac_cv_gcc_sync_char_tas="no"
14818 rm -f core conftest.err conftest.$ac_objext \
14819 conftest$ac_exeext conftest.$ac_ext
14821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
14822 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
14823 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
14825 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
14828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
14829 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
14830 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
14831 $as_echo_n "(cached) " >&6
14833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14834 /* end confdefs.h. */
14840 __sync_lock_test_and_set(&lock, 1);
14841 __sync_lock_release(&lock);
14846 if ac_fn_c_try_link "$LINENO"; then :
14847 pgac_cv_gcc_sync_int32_tas="yes"
14849 pgac_cv_gcc_sync_int32_tas="no"
14851 rm -f core conftest.err conftest.$ac_objext \
14852 conftest$ac_exeext conftest.$ac_ext
14854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
14855 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
14856 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
14858 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
14861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
14862 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
14863 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
14864 $as_echo_n "(cached) " >&6
14866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14867 /* end confdefs.h. */
14873 __sync_val_compare_and_swap(&val, 0, 37);
14878 if ac_fn_c_try_link "$LINENO"; then :
14879 pgac_cv_gcc_sync_int32_cas="yes"
14881 pgac_cv_gcc_sync_int32_cas="no"
14883 rm -f core conftest.err conftest.$ac_objext \
14884 conftest$ac_exeext conftest.$ac_ext
14886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
14887 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
14888 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
14890 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
14893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
14894 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
14895 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
14896 $as_echo_n "(cached) " >&6
14898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14899 /* end confdefs.h. */
14904 PG_INT64_TYPE lock = 0;
14905 __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
14910 if ac_fn_c_try_link "$LINENO"; then :
14911 pgac_cv_gcc_sync_int64_cas="yes"
14913 pgac_cv_gcc_sync_int64_cas="no"
14915 rm -f core conftest.err conftest.$ac_objext \
14916 conftest$ac_exeext conftest.$ac_ext
14918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
14919 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
14920 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
14922 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
14925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
14926 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
14927 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
14928 $as_echo_n "(cached) " >&6
14930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14931 /* end confdefs.h. */
14938 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
14943 if ac_fn_c_try_link "$LINENO"; then :
14944 pgac_cv_gcc_atomic_int32_cas="yes"
14946 pgac_cv_gcc_atomic_int32_cas="no"
14948 rm -f core conftest.err conftest.$ac_objext \
14949 conftest$ac_exeext conftest.$ac_ext
14951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
14952 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
14953 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
14955 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
14958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
14959 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
14960 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
14961 $as_echo_n "(cached) " >&6
14963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14964 /* end confdefs.h. */
14969 PG_INT64_TYPE val = 0;
14970 PG_INT64_TYPE expect = 0;
14971 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
14976 if ac_fn_c_try_link "$LINENO"; then :
14977 pgac_cv_gcc_atomic_int64_cas="yes"
14979 pgac_cv_gcc_atomic_int64_cas="no"
14981 rm -f core conftest.err conftest.$ac_objext \
14982 conftest$ac_exeext conftest.$ac_ext
14984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
14985 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
14986 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
14988 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
14993 # Check for x86 cpuid instruction
14994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
14995 $as_echo_n "checking for __get_cpuid... " >&6; }
14996 if ${pgac_cv__get_cpuid+:} false; then :
14997 $as_echo_n "(cached) " >&6
14999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15000 /* end confdefs.h. */
15005 unsigned int exx[4] = {0, 0, 0, 0};
15006 __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
15012 if ac_fn_c_try_link "$LINENO"; then :
15013 pgac_cv__get_cpuid="yes"
15015 pgac_cv__get_cpuid="no"
15017 rm -f core conftest.err conftest.$ac_objext \
15018 conftest$ac_exeext conftest.$ac_ext
15020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
15021 $as_echo "$pgac_cv__get_cpuid" >&6; }
15022 if test x"$pgac_cv__get_cpuid" = x"yes"; then
15024 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
15028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
15029 $as_echo_n "checking for __cpuid... " >&6; }
15030 if ${pgac_cv__cpuid+:} false; then :
15031 $as_echo_n "(cached) " >&6
15033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15034 /* end confdefs.h. */
15035 #include <intrin.h>
15039 unsigned int exx[4] = {0, 0, 0, 0};
15040 __get_cpuid(exx[0], 1);
15046 if ac_fn_c_try_link "$LINENO"; then :
15047 pgac_cv__cpuid="yes"
15049 pgac_cv__cpuid="no"
15051 rm -f core conftest.err conftest.$ac_objext \
15052 conftest$ac_exeext conftest.$ac_ext
15054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
15055 $as_echo "$pgac_cv__cpuid" >&6; }
15056 if test x"$pgac_cv__cpuid" = x"yes"; then
15058 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
15062 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
15064 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
15065 # with the default compiler flags. If not, check if adding the -msse4.2
15066 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
15067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
15068 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
15069 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
15070 $as_echo_n "(cached) " >&6
15072 pgac_save_CFLAGS=$CFLAGS
15073 CFLAGS="$pgac_save_CFLAGS "
15074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15075 /* end confdefs.h. */
15076 #include <nmmintrin.h>
15080 unsigned int crc = 0;
15081 crc = _mm_crc32_u8(crc, 0);
15082 crc = _mm_crc32_u32(crc, 0);
15083 /* return computed value, to prevent the above being optimized away */
15089 if ac_fn_c_try_link "$LINENO"; then :
15090 pgac_cv_sse42_crc32_intrinsics_=yes
15092 pgac_cv_sse42_crc32_intrinsics_=no
15094 rm -f core conftest.err conftest.$ac_objext \
15095 conftest$ac_exeext conftest.$ac_ext
15096 CFLAGS="$pgac_save_CFLAGS"
15098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
15099 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
15100 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
15102 pgac_sse42_crc32_intrinsics=yes
15105 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
15106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
15107 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
15108 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
15109 $as_echo_n "(cached) " >&6
15111 pgac_save_CFLAGS=$CFLAGS
15112 CFLAGS="$pgac_save_CFLAGS -msse4.2"
15113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15114 /* end confdefs.h. */
15115 #include <nmmintrin.h>
15119 unsigned int crc = 0;
15120 crc = _mm_crc32_u8(crc, 0);
15121 crc = _mm_crc32_u32(crc, 0);
15122 /* return computed value, to prevent the above being optimized away */
15128 if ac_fn_c_try_link "$LINENO"; then :
15129 pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
15131 pgac_cv_sse42_crc32_intrinsics__msse4_2=no
15133 rm -f core conftest.err conftest.$ac_objext \
15134 conftest$ac_exeext conftest.$ac_ext
15135 CFLAGS="$pgac_save_CFLAGS"
15137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
15138 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
15139 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
15140 CFLAGS_SSE42="-msse4.2"
15141 pgac_sse42_crc32_intrinsics=yes
15147 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
15148 # define __SSE4_2__ in that case.
15149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15150 /* end confdefs.h. */
15157 #error __SSE4_2__ not defined
15164 if ac_fn_c_try_compile "$LINENO"; then :
15167 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15169 # Select CRC-32C implementation.
15171 # If we are targeting a processor that has SSE 4.2 instructions, we can use the
15172 # special CRC instructions for calculating CRC-32C. If we're not targeting such
15173 # a processor, but we can nevertheless produce code that uses the SSE
15174 # intrinsics, perhaps with some extra CFLAGS, compile both implementations and
15175 # select which one to use at runtime, depending on whether SSE 4.2 is supported
15176 # by the processor we're running on.
15178 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
15179 # in the template or configure command line.
15180 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
15181 if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
15184 # the CPUID instruction is needed for the runtime check.
15185 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
15186 USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
15188 # fall back to slicing-by-8 algorithm which doesn't require any special
15190 USE_SLICING_BY_8_CRC32C=1
15195 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
15196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
15197 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
15198 if test x"$USE_SSE42_CRC32C" = x"1"; then
15200 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
15202 PG_CRC32C_OBJS="pg_crc32c_sse42.o"
15203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
15204 $as_echo "SSE 4.2" >&6; }
15206 if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
15208 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
15210 PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_choose.o"
15211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
15212 $as_echo "SSE 4.2 with runtime check" >&6; }
15215 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
15217 PG_CRC32C_OBJS="pg_crc32c_sb8.o"
15218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
15219 $as_echo "slicing-by-8" >&6; }
15225 # Select semaphore implementation type.
15226 if test "$PORTNAME" != "win32"; then
15227 if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
15228 # Need sem_open for this
15229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
15230 $as_echo_n "checking for library containing sem_open... " >&6; }
15231 if ${ac_cv_search_sem_open+:} false; then :
15232 $as_echo_n "(cached) " >&6
15234 ac_func_search_save_LIBS=$LIBS
15235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15236 /* end confdefs.h. */
15238 /* Override any GCC internal prototype to avoid an error.
15239 Use char because int might match the return type of a GCC
15240 builtin and then its argument prototype would still apply. */
15248 return sem_open ();
15253 for ac_lib in '' rt pthread; do
15254 if test -z "$ac_lib"; then
15255 ac_res="none required"
15258 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15260 if ac_fn_c_try_link "$LINENO"; then :
15261 ac_cv_search_sem_open=$ac_res
15263 rm -f core conftest.err conftest.$ac_objext \
15265 if ${ac_cv_search_sem_open+:} false; then :
15269 if ${ac_cv_search_sem_open+:} false; then :
15272 ac_cv_search_sem_open=no
15274 rm conftest.$ac_ext
15275 LIBS=$ac_func_search_save_LIBS
15277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
15278 $as_echo "$ac_cv_search_sem_open" >&6; }
15279 ac_res=$ac_cv_search_sem_open
15280 if test "$ac_res" != no; then :
15281 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15282 USE_NAMED_POSIX_SEMAPHORES=1
15286 if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
15287 # Need sem_init for this
15288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
15289 $as_echo_n "checking for library containing sem_init... " >&6; }
15290 if ${ac_cv_search_sem_init+:} false; then :
15291 $as_echo_n "(cached) " >&6
15293 ac_func_search_save_LIBS=$LIBS
15294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15295 /* end confdefs.h. */
15297 /* Override any GCC internal prototype to avoid an error.
15298 Use char because int might match the return type of a GCC
15299 builtin and then its argument prototype would still apply. */
15307 return sem_init ();
15312 for ac_lib in '' rt pthread; do
15313 if test -z "$ac_lib"; then
15314 ac_res="none required"
15317 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15319 if ac_fn_c_try_link "$LINENO"; then :
15320 ac_cv_search_sem_init=$ac_res
15322 rm -f core conftest.err conftest.$ac_objext \
15324 if ${ac_cv_search_sem_init+:} false; then :
15328 if ${ac_cv_search_sem_init+:} false; then :
15331 ac_cv_search_sem_init=no
15333 rm conftest.$ac_ext
15334 LIBS=$ac_func_search_save_LIBS
15336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
15337 $as_echo "$ac_cv_search_sem_init" >&6; }
15338 ac_res=$ac_cv_search_sem_init
15339 if test "$ac_res" != no; then :
15340 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15341 USE_UNNAMED_POSIX_SEMAPHORES=1
15345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
15346 $as_echo_n "checking which semaphore API to use... " >&6; }
15347 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
15349 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
15351 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
15352 sematype="named POSIX"
15354 if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
15356 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
15358 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
15359 sematype="unnamed POSIX"
15362 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
15364 SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
15365 sematype="System V"
15368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
15369 $as_echo "$sematype" >&6; }
15372 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
15374 SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
15378 # Select shared-memory implementation type.
15379 if test "$PORTNAME" != "win32"; then
15381 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
15383 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
15386 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
15388 SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
15391 # Select random number source
15393 # You can override this logic by setting the appropriate USE_*RANDOM flag to 1
15394 # in the template or configure command line.
15396 # If not selected manually, try to select a source automatically.
15397 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
15398 if test x"$with_openssl" = x"yes" ; then
15399 USE_OPENSSL_RANDOM=1
15400 elif test "$PORTNAME" = "win32" ; then
15403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
15404 $as_echo_n "checking for /dev/urandom... " >&6; }
15405 if ${ac_cv_file__dev_urandom+:} false; then :
15406 $as_echo_n "(cached) " >&6
15408 test "$cross_compiling" = yes &&
15409 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15410 if test -r "/dev/urandom"; then
15411 ac_cv_file__dev_urandom=yes
15413 ac_cv_file__dev_urandom=no
15416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
15417 $as_echo "$ac_cv_file__dev_urandom" >&6; }
15418 if test "x$ac_cv_file__dev_urandom" = xyes; then :
15423 if test x"$ac_cv_file__dev_urandom" = x"yes" ; then
15429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
15430 $as_echo_n "checking which random number source to use... " >&6; }
15431 if test "$enable_strong_random" = yes ; then
15432 if test x"$USE_OPENSSL_RANDOM" = x"1" ; then
15434 $as_echo "#define USE_OPENSSL_RANDOM 1" >>confdefs.h
15436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
15437 $as_echo "OpenSSL" >&6; }
15438 elif test x"$USE_WIN32_RANDOM" = x"1" ; then
15440 $as_echo "#define USE_WIN32_RANDOM 1" >>confdefs.h
15442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
15443 $as_echo "Windows native" >&6; }
15444 elif test x"$USE_DEV_URANDOM" = x"1" ; then
15446 $as_echo "#define USE_DEV_URANDOM 1" >>confdefs.h
15448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
15449 $as_echo "/dev/urandom" >&6; }
15452 no source of strong random numbers was found
15453 PostgreSQL can use OpenSSL or /dev/urandom as a source of random numbers,
15454 for authentication protocols. You can use --disable-strong-random to use a
15455 built-in pseudo random number generator, but that may be insecure." "$LINENO" 5
15458 $as_echo "#define HAVE_STRONG_RANDOM 1" >>confdefs.h
15461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: weak builtin PRNG" >&5
15462 $as_echo "weak builtin PRNG" >&6; }
15463 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
15464 *** Not using a strong random number source may be insecure." >&5
15465 $as_echo "$as_me: WARNING:
15466 *** Not using a strong random number source may be insecure." >&2;}
15469 # If not set in template file, set bytes to use libc memset()
15470 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
15471 MEMSET_LOOP_LIMIT=1024
15474 cat >>confdefs.h <<_ACEOF
15475 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
15480 if test "$enable_nls" = yes ; then
15482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
15483 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
15484 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
15485 $as_echo_n "(cached) " >&6
15487 ac_func_search_save_LIBS=$LIBS
15488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15489 /* end confdefs.h. */
15491 /* Override any GCC internal prototype to avoid an error.
15492 Use char because int might match the return type of a GCC
15493 builtin and then its argument prototype would still apply. */
15497 char bind_textdomain_codeset ();
15501 return bind_textdomain_codeset ();
15506 for ac_lib in '' intl; do
15507 if test -z "$ac_lib"; then
15508 ac_res="none required"
15511 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15513 if ac_fn_c_try_link "$LINENO"; then :
15514 ac_cv_search_bind_textdomain_codeset=$ac_res
15516 rm -f core conftest.err conftest.$ac_objext \
15518 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
15522 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
15525 ac_cv_search_bind_textdomain_codeset=no
15527 rm conftest.$ac_ext
15528 LIBS=$ac_func_search_save_LIBS
15530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
15531 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
15532 ac_res=$ac_cv_search_bind_textdomain_codeset
15533 if test "$ac_res" != no; then :
15534 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15537 as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
15540 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
15541 if test "x$ac_cv_header_libintl_h" = xyes; then :
15544 as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
15548 for ac_prog in msgfmt
15550 # Extract the first word of "$ac_prog", so it can be a program name with args.
15551 set dummy $ac_prog; ac_word=$2
15552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15553 $as_echo_n "checking for $ac_word... " >&6; }
15554 if ${ac_cv_prog_MSGFMT+:} false; then :
15555 $as_echo_n "(cached) " >&6
15557 if test -n "$MSGFMT"; then
15558 ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
15560 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15561 for as_dir in $PATH
15564 test -z "$as_dir" && as_dir=.
15565 for ac_exec_ext in '' $ac_executable_extensions; do
15566 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15567 ac_cv_prog_MSGFMT="$ac_prog"
15568 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15577 MSGFMT=$ac_cv_prog_MSGFMT
15578 if test -n "$MSGFMT"; then
15579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
15580 $as_echo "$MSGFMT" >&6; }
15582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15583 $as_echo "no" >&6; }
15587 test -n "$MSGFMT" && break
15590 if test -z "$MSGFMT"; then
15591 as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
15593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
15594 $as_echo_n "checking for msgfmt flags... " >&6; }
15595 if ${pgac_cv_msgfmt_flags+:} false; then :
15596 $as_echo_n "(cached) " >&6
15598 if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
15599 pgac_cv_msgfmt_flags=-c
15602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
15603 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
15604 MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
15606 for ac_prog in msgmerge
15608 # Extract the first word of "$ac_prog", so it can be a program name with args.
15609 set dummy $ac_prog; ac_word=$2
15610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15611 $as_echo_n "checking for $ac_word... " >&6; }
15612 if ${ac_cv_prog_MSGMERGE+:} false; then :
15613 $as_echo_n "(cached) " >&6
15615 if test -n "$MSGMERGE"; then
15616 ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
15618 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15619 for as_dir in $PATH
15622 test -z "$as_dir" && as_dir=.
15623 for ac_exec_ext in '' $ac_executable_extensions; do
15624 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15625 ac_cv_prog_MSGMERGE="$ac_prog"
15626 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15635 MSGMERGE=$ac_cv_prog_MSGMERGE
15636 if test -n "$MSGMERGE"; then
15637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
15638 $as_echo "$MSGMERGE" >&6; }
15640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15641 $as_echo "no" >&6; }
15645 test -n "$MSGMERGE" && break
15648 for ac_prog in xgettext
15650 # Extract the first word of "$ac_prog", so it can be a program name with args.
15651 set dummy $ac_prog; ac_word=$2
15652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15653 $as_echo_n "checking for $ac_word... " >&6; }
15654 if ${ac_cv_prog_XGETTEXT+:} false; then :
15655 $as_echo_n "(cached) " >&6
15657 if test -n "$XGETTEXT"; then
15658 ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
15660 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15661 for as_dir in $PATH
15664 test -z "$as_dir" && as_dir=.
15665 for ac_exec_ext in '' $ac_executable_extensions; do
15666 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15667 ac_cv_prog_XGETTEXT="$ac_prog"
15668 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15677 XGETTEXT=$ac_cv_prog_XGETTEXT
15678 if test -n "$XGETTEXT"; then
15679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
15680 $as_echo "$XGETTEXT" >&6; }
15682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15683 $as_echo "no" >&6; }
15687 test -n "$XGETTEXT" && break
15693 # Check for Tcl configuration script tclConfig.sh
15694 if test "$with_tcl" = yes; then
15695 for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
15697 # Extract the first word of "$ac_prog", so it can be a program name with args.
15698 set dummy $ac_prog; ac_word=$2
15699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15700 $as_echo_n "checking for $ac_word... " >&6; }
15701 if ${ac_cv_path_TCLSH+:} false; then :
15702 $as_echo_n "(cached) " >&6
15706 ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
15709 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15710 for as_dir in $PATH
15713 test -z "$as_dir" && as_dir=.
15714 for ac_exec_ext in '' $ac_executable_extensions; do
15715 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15716 ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
15717 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15727 TCLSH=$ac_cv_path_TCLSH
15728 if test -n "$TCLSH"; then
15729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
15730 $as_echo "$TCLSH" >&6; }
15732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15733 $as_echo "no" >&6; }
15737 test -n "$TCLSH" && break
15740 if test x"$TCLSH" = x""; then
15741 as_fn_error $? "Tcl shell not found" "$LINENO" 5
15744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
15745 $as_echo_n "checking for tclConfig.sh... " >&6; }
15746 # Let user override test
15747 if test -z "$TCL_CONFIG_SH"; then
15748 pgac_test_dirs="$with_tclconfig"
15750 set X $pgac_test_dirs; shift
15751 if test $# -eq 0; then
15752 test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
15753 set X `echo 'puts $auto_path' | $TCLSH`; shift
15757 if test -r "$pgac_dir/tclConfig.sh"; then
15758 TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
15764 if test -z "$TCL_CONFIG_SH"; then
15765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15766 $as_echo "no" >&6; }
15767 as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
15769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
15770 $as_echo "$TCL_CONFIG_SH" >&6; }
15776 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
15777 eval TCL_LIBS=\"$TCL_LIBS\"
15778 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
15779 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
15781 if test "$TCL_SHARED_BUILD" != 1; then
15782 as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
15783 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
15785 # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
15786 ac_save_CPPFLAGS=$CPPFLAGS
15787 CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
15788 ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
15789 if test "x$ac_cv_header_tcl_h" = xyes; then :
15792 as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
15796 CPPFLAGS=$ac_save_CPPFLAGS
15799 # check for <perl.h>
15800 if test "$with_perl" = yes; then
15801 ac_save_CPPFLAGS=$CPPFLAGS
15802 CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
15803 ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
15805 if test "x$ac_cv_header_perl_h" = xyes; then :
15808 as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
15812 # While we're at it, check that we can link to libperl.
15813 # On most platforms, if perl.h is there then libperl.so will be too, but at
15814 # this writing Debian packages them separately. There is no known reason to
15815 # waste cycles on separate probes for the Tcl or Python libraries, though.
15816 pgac_save_LIBS=$LIBS
15817 LIBS="$perl_embed_ldflags"
15818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
15819 $as_echo_n "checking for libperl... " >&6; }
15820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15821 /* end confdefs.h. */
15823 #include <EXTERN.h>
15834 if ac_fn_c_try_link "$LINENO"; then :
15835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15836 $as_echo "yes" >&6; }
15838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15839 $as_echo "no" >&6; }
15840 as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
15842 rm -f core conftest.err conftest.$ac_objext \
15843 conftest$ac_exeext conftest.$ac_ext
15844 LIBS=$pgac_save_LIBS
15845 CPPFLAGS=$ac_save_CPPFLAGS
15848 # check for <Python.h>
15849 if test "$with_python" = yes; then
15850 ac_save_CPPFLAGS=$CPPFLAGS
15851 CPPFLAGS="$python_includespec $CPPFLAGS"
15852 ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
15853 if test "x$ac_cv_header_Python_h" = xyes; then :
15856 as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
15860 CPPFLAGS=$ac_save_CPPFLAGS
15864 # Check for DocBook and tools
15866 for ac_prog in onsgmls nsgmls
15868 # Extract the first word of "$ac_prog", so it can be a program name with args.
15869 set dummy $ac_prog; ac_word=$2
15870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15871 $as_echo_n "checking for $ac_word... " >&6; }
15872 if ${ac_cv_prog_NSGMLS+:} false; then :
15873 $as_echo_n "(cached) " >&6
15875 if test -n "$NSGMLS"; then
15876 ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
15878 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15879 for as_dir in $PATH
15882 test -z "$as_dir" && as_dir=.
15883 for ac_exec_ext in '' $ac_executable_extensions; do
15884 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15885 ac_cv_prog_NSGMLS="$ac_prog"
15886 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15895 NSGMLS=$ac_cv_prog_NSGMLS
15896 if test -n "$NSGMLS"; then
15897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSGMLS" >&5
15898 $as_echo "$NSGMLS" >&6; }
15900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15901 $as_echo "no" >&6; }
15905 test -n "$NSGMLS" && break
15908 for ac_prog in openjade jade
15910 # Extract the first word of "$ac_prog", so it can be a program name with args.
15911 set dummy $ac_prog; ac_word=$2
15912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15913 $as_echo_n "checking for $ac_word... " >&6; }
15914 if ${ac_cv_prog_JADE+:} false; then :
15915 $as_echo_n "(cached) " >&6
15917 if test -n "$JADE"; then
15918 ac_cv_prog_JADE="$JADE" # Let the user override the test.
15920 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15921 for as_dir in $PATH
15924 test -z "$as_dir" && as_dir=.
15925 for ac_exec_ext in '' $ac_executable_extensions; do
15926 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15927 ac_cv_prog_JADE="$ac_prog"
15928 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15937 JADE=$ac_cv_prog_JADE
15938 if test -n "$JADE"; then
15939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JADE" >&5
15940 $as_echo "$JADE" >&6; }
15942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15943 $as_echo "no" >&6; }
15947 test -n "$JADE" && break
15951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook V4.2" >&5
15952 $as_echo_n "checking for DocBook V4.2... " >&6; }
15953 if ${pgac_cv_check_docbook+:} false; then :
15954 $as_echo_n "(cached) " >&6
15956 cat >conftest.sgml <<EOF
15957 <!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
15959 <title>test</title>
15961 <title>random</title>
15963 <title>testsect</title>
15970 pgac_cv_check_docbook=no
15972 if test -n "$NSGMLS"; then
15973 $NSGMLS -s conftest.sgml 1>&5 2>&1
15974 if test $? -eq 0; then
15975 pgac_cv_check_docbook=yes
15978 rm -f conftest.sgml
15980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
15981 $as_echo "$pgac_cv_check_docbook" >&6; }
15983 have_docbook=$pgac_cv_check_docbook
15986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook stylesheets" >&5
15987 $as_echo_n "checking for DocBook stylesheets... " >&6; }
15988 if ${pgac_cv_path_stylesheets+:} false; then :
15989 $as_echo_n "(cached) " >&6
15991 if test -n "$DOCBOOKSTYLE"; then
15992 pgac_cv_path_stylesheets=$DOCBOOKSTYLE
15994 for pgac_prefix in /usr /usr/local /opt /sw; do
15995 for pgac_infix in share lib; do
15996 for pgac_postfix in \
15997 sgml/stylesheets/nwalsh-modular \
15998 sgml/stylesheets/docbook \
15999 sgml/stylesheets/dsssl/docbook \
16000 sgml/docbook-dsssl \
16001 sgml/docbook/dsssl/modular \
16002 sgml/docbook/stylesheet/dsssl/modular \
16003 sgml/docbook/dsssl-stylesheets \
16004 sgml/dsssl/docbook-dsssl-nwalsh
16006 pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
16007 if test -r "$pgac_candidate/html/docbook.dsl" \
16008 && test -r "$pgac_candidate/print/docbook.dsl"
16010 pgac_cv_path_stylesheets=$pgac_candidate
16019 DOCBOOKSTYLE=$pgac_cv_path_stylesheets
16021 if test -n "$DOCBOOKSTYLE"; then
16022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCBOOKSTYLE" >&5
16023 $as_echo "$DOCBOOKSTYLE" >&6; }
16025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16026 $as_echo "no" >&6; }
16028 if test -n "$DOCBOOKSTYLE" -a -r "$DOCBOOKSTYLE/bin/collateindex.pl"; then
16029 COLLATEINDEX="$DOCBOOKSTYLE/bin/collateindex.pl"
16032 # Extract the first word of "collateindex.pl", so it can be a program name with args.
16033 set dummy collateindex.pl; ac_word=$2
16034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16035 $as_echo_n "checking for $ac_word... " >&6; }
16036 if ${ac_cv_path_COLLATEINDEX+:} false; then :
16037 $as_echo_n "(cached) " >&6
16039 case $COLLATEINDEX in
16041 ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
16044 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16045 for as_dir in $PATH
16048 test -z "$as_dir" && as_dir=.
16049 for ac_exec_ext in '' $ac_executable_extensions; do
16050 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16051 ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
16052 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16062 COLLATEINDEX=$ac_cv_path_COLLATEINDEX
16063 if test -n "$COLLATEINDEX"; then
16064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COLLATEINDEX" >&5
16065 $as_echo "$COLLATEINDEX" >&6; }
16067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16068 $as_echo "no" >&6; }
16073 for ac_prog in dbtoepub
16075 # Extract the first word of "$ac_prog", so it can be a program name with args.
16076 set dummy $ac_prog; ac_word=$2
16077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16078 $as_echo_n "checking for $ac_word... " >&6; }
16079 if ${ac_cv_prog_DBTOEPUB+:} false; then :
16080 $as_echo_n "(cached) " >&6
16082 if test -n "$DBTOEPUB"; then
16083 ac_cv_prog_DBTOEPUB="$DBTOEPUB" # Let the user override the test.
16085 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16086 for as_dir in $PATH
16089 test -z "$as_dir" && as_dir=.
16090 for ac_exec_ext in '' $ac_executable_extensions; do
16091 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16092 ac_cv_prog_DBTOEPUB="$ac_prog"
16093 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16102 DBTOEPUB=$ac_cv_prog_DBTOEPUB
16103 if test -n "$DBTOEPUB"; then
16104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
16105 $as_echo "$DBTOEPUB" >&6; }
16107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16108 $as_echo "no" >&6; }
16112 test -n "$DBTOEPUB" && break
16115 for ac_prog in xmllint
16117 # Extract the first word of "$ac_prog", so it can be a program name with args.
16118 set dummy $ac_prog; ac_word=$2
16119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16120 $as_echo_n "checking for $ac_word... " >&6; }
16121 if ${ac_cv_prog_XMLLINT+:} false; then :
16122 $as_echo_n "(cached) " >&6
16124 if test -n "$XMLLINT"; then
16125 ac_cv_prog_XMLLINT="$XMLLINT" # Let the user override the test.
16127 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16128 for as_dir in $PATH
16131 test -z "$as_dir" && as_dir=.
16132 for ac_exec_ext in '' $ac_executable_extensions; do
16133 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16134 ac_cv_prog_XMLLINT="$ac_prog"
16135 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16144 XMLLINT=$ac_cv_prog_XMLLINT
16145 if test -n "$XMLLINT"; then
16146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
16147 $as_echo "$XMLLINT" >&6; }
16149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16150 $as_echo "no" >&6; }
16154 test -n "$XMLLINT" && break
16157 for ac_prog in xsltproc
16159 # Extract the first word of "$ac_prog", so it can be a program name with args.
16160 set dummy $ac_prog; ac_word=$2
16161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16162 $as_echo_n "checking for $ac_word... " >&6; }
16163 if ${ac_cv_prog_XSLTPROC+:} false; then :
16164 $as_echo_n "(cached) " >&6
16166 if test -n "$XSLTPROC"; then
16167 ac_cv_prog_XSLTPROC="$XSLTPROC" # Let the user override the test.
16169 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16170 for as_dir in $PATH
16173 test -z "$as_dir" && as_dir=.
16174 for ac_exec_ext in '' $ac_executable_extensions; do
16175 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16176 ac_cv_prog_XSLTPROC="$ac_prog"
16177 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16186 XSLTPROC=$ac_cv_prog_XSLTPROC
16187 if test -n "$XSLTPROC"; then
16188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
16189 $as_echo "$XSLTPROC" >&6; }
16191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16192 $as_echo "no" >&6; }
16196 test -n "$XSLTPROC" && break
16199 for ac_prog in osx sgml2xml sx
16201 # Extract the first word of "$ac_prog", so it can be a program name with args.
16202 set dummy $ac_prog; ac_word=$2
16203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16204 $as_echo_n "checking for $ac_word... " >&6; }
16205 if ${ac_cv_prog_OSX+:} false; then :
16206 $as_echo_n "(cached) " >&6
16208 if test -n "$OSX"; then
16209 ac_cv_prog_OSX="$OSX" # Let the user override the test.
16211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16212 for as_dir in $PATH
16215 test -z "$as_dir" && as_dir=.
16216 for ac_exec_ext in '' $ac_executable_extensions; do
16217 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16218 ac_cv_prog_OSX="$ac_prog"
16219 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16228 OSX=$ac_cv_prog_OSX
16229 if test -n "$OSX"; then
16230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OSX" >&5
16231 $as_echo "$OSX" >&6; }
16233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16234 $as_echo "no" >&6; }
16238 test -n "$OSX" && break
16243 # Check for test tools
16245 if test "$enable_tap_tests" = yes; then
16246 for ac_prog in prove
16248 # Extract the first word of "$ac_prog", so it can be a program name with args.
16249 set dummy $ac_prog; ac_word=$2
16250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16251 $as_echo_n "checking for $ac_word... " >&6; }
16252 if ${ac_cv_prog_PROVE+:} false; then :
16253 $as_echo_n "(cached) " >&6
16255 if test -n "$PROVE"; then
16256 ac_cv_prog_PROVE="$PROVE" # Let the user override the test.
16258 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16259 for as_dir in $PATH
16262 test -z "$as_dir" && as_dir=.
16263 for ac_exec_ext in '' $ac_executable_extensions; do
16264 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16265 ac_cv_prog_PROVE="$ac_prog"
16266 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16275 PROVE=$ac_cv_prog_PROVE
16276 if test -n "$PROVE"; then
16277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
16278 $as_echo "$PROVE" >&6; }
16280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16281 $as_echo "no" >&6; }
16285 test -n "$PROVE" && break
16288 if test -z "$PROVE"; then
16289 as_fn_error $? "prove not found" "$LINENO" 5
16291 if test -z "$PERL"; then
16292 as_fn_error $? "Perl not found" "$LINENO" 5
16298 # We have to run the thread test near the end so we have all our symbols
16299 # defined. Cross compiling throws a warning.
16301 if test "$enable_thread_safety" = yes; then
16302 if test "$PORTNAME" != "win32"
16304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
16305 $as_echo_n "checking thread safety of required library functions... " >&6; }
16309 CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
16310 LIBS="$LIBS $PTHREAD_LIBS"
16311 if test "$cross_compiling" = yes; then :
16312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
16313 $as_echo "maybe" >&6; }
16314 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
16315 *** Skipping thread test program because of cross-compile build.
16316 *** Run the program in src/test/thread on the target machine.
16318 $as_echo "$as_me: WARNING:
16319 *** Skipping thread test program because of cross-compile build.
16320 *** Run the program in src/test/thread on the target machine.
16323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16324 /* end confdefs.h. */
16325 #include "$srcdir/src/test/thread/thread_test.c"
16327 if ac_fn_c_try_run "$LINENO"; then :
16328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16329 $as_echo "yes" >&6; }
16331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16332 $as_echo "no" >&6; }
16333 as_fn_error $? "thread test program failed
16334 This platform is not thread-safe. Check the file 'config.log' or compile
16335 and run src/test/thread/thread_test for the exact reason.
16336 Use --disable-thread-safety to disable thread safety." "$LINENO" 5
16338 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16339 conftest.$ac_objext conftest.beam conftest.$ac_ext
16345 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
16346 $as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
16350 # If compiler will take -Wl,--as-needed (or various platform-specific
16351 # spellings thereof) then add that to LDFLAGS. This is much easier than
16352 # trying to filter LIBS to the minimum for each executable.
16353 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
16354 # libreadline; therefore we postpone testing it until we know what library
16355 # dependencies readline has. The test code will try to link with $LIBS.
16356 if test "$with_readline" = yes; then
16357 link_test_func=readline
16359 link_test_func=exit
16362 if test "$PORTNAME" = "darwin"; then
16363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
16364 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
16365 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
16366 $as_echo_n "(cached) " >&6
16368 pgac_save_LDFLAGS=$LDFLAGS
16369 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
16370 if test "$cross_compiling" = yes; then :
16371 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
16373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16374 /* end confdefs.h. */
16375 extern void $link_test_func (); void (*fptr) () = $link_test_func;
16384 if ac_fn_c_try_run "$LINENO"; then :
16385 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
16387 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
16389 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16390 conftest.$ac_objext conftest.beam conftest.$ac_ext
16393 LDFLAGS="$pgac_save_LDFLAGS"
16395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
16396 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
16397 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
16398 LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
16401 elif test "$PORTNAME" = "openbsd"; then
16402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
16403 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
16404 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
16405 $as_echo_n "(cached) " >&6
16407 pgac_save_LDFLAGS=$LDFLAGS
16408 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
16409 if test "$cross_compiling" = yes; then :
16410 pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
16412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16413 /* end confdefs.h. */
16414 extern void $link_test_func (); void (*fptr) () = $link_test_func;
16423 if ac_fn_c_try_run "$LINENO"; then :
16424 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
16426 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
16428 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16429 conftest.$ac_objext conftest.beam conftest.$ac_ext
16432 LDFLAGS="$pgac_save_LDFLAGS"
16434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
16435 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
16436 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
16437 LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
16441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
16442 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
16443 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
16444 $as_echo_n "(cached) " >&6
16446 pgac_save_LDFLAGS=$LDFLAGS
16447 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
16448 if test "$cross_compiling" = yes; then :
16449 pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
16451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16452 /* end confdefs.h. */
16453 extern void $link_test_func (); void (*fptr) () = $link_test_func;
16462 if ac_fn_c_try_run "$LINENO"; then :
16463 pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
16465 pgac_cv_prog_cc_ldflags__Wl___as_needed=no
16467 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16468 conftest.$ac_objext conftest.beam conftest.$ac_ext
16471 LDFLAGS="$pgac_save_LDFLAGS"
16473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
16474 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
16475 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
16476 LDFLAGS="$LDFLAGS -Wl,--as-needed"
16481 # Create compiler version string
16482 if test x"$GCC" = x"yes" ; then
16483 cc_string=`${CC} --version | sed q`
16484 case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
16485 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
16486 cc_string=`${CC} -V 2>&1 | sed q`
16492 cat >>confdefs.h <<_ACEOF
16493 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
16497 # Supply a numeric version string for use by 3rd party add-ons
16498 # awk -F is a regex on some platforms, and not on others, so make "." a tab
16499 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
16501 $AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"
16503 cat >>confdefs.h <<_ACEOF
16504 #define PG_VERSION_NUM $PG_VERSION_NUM
16510 # Begin output steps
16512 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
16513 $as_echo "$as_me: using compiler=$cc_string" >&6;}
16514 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
16515 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
16516 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
16517 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
16518 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
16519 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
16521 # prepare build tree if outside source tree
16522 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
16523 # Note 2: /bin/pwd might be better than shell's built-in at getting
16524 # a symlink-free name.
16525 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
16529 if test "$no_create" != yes; then
16530 $as_echo_n "preparing build tree... " >&6
16531 pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
16532 $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
16533 || as_fn_error $? "failed" "$LINENO" 5
16534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16535 $as_echo "done" >&6; }
16541 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
16544 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}"
16547 if test "$PORTNAME" = "win32"; then
16548 ac_config_commands="$ac_config_commands check_win32_symlinks"
16552 ac_config_headers="$ac_config_headers src/include/pg_config.h"
16555 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
16558 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
16561 cat >confcache <<\_ACEOF
16562 # This file is a shell script that caches the results of configure
16563 # tests run on this system so they can be shared between configure
16564 # scripts and configure runs, see configure's option --config-cache.
16565 # It is not useful on other systems. If it contains results you don't
16566 # want to keep, you may remove or edit it.
16568 # config.status only pays attention to the cache file if you give it
16569 # the --recheck option to rerun configure.
16571 # `ac_cv_env_foo' variables (set or unset) will be overridden when
16572 # loading this file, other *unset* `ac_cv_foo' will be assigned the
16573 # following values.
16577 # The following way of writing the cache mishandles newlines in values,
16578 # but we know of no workaround that is simple, portable, and efficient.
16579 # So, we kill variables containing newlines.
16580 # Ultrix sh set writes to stderr and can't be redirected directly,
16581 # and sets the high bit in the cache file unless we assign to the vars.
16583 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16584 eval ac_val=\$$ac_var
16588 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16589 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
16592 _ | IFS | as_nl) ;; #(
16593 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16594 *) { eval $ac_var=; unset $ac_var;} ;;
16600 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16601 *${as_nl}ac_space=\ *)
16602 # `set' does not quote correctly, so add quotes: double-quote
16603 # substitution turns \\\\ into \\, and sed turns \\ into \.
16606 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16609 # `set' quotes correctly as required by POSIX, so do not add quotes.
16610 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
16619 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16621 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16623 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16624 if test -w "$cache_file"; then
16625 if test "x$cache_file" != "x/dev/null"; then
16626 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16627 $as_echo "$as_me: updating cache $cache_file" >&6;}
16628 if test ! -f "$cache_file" || test -h "$cache_file"; then
16629 cat confcache >"$cache_file"
16631 case $cache_file in #(
16633 mv -f confcache "$cache_file"$$ &&
16634 mv -f "$cache_file"$$ "$cache_file" ;; #(
16636 mv -f confcache "$cache_file" ;;
16641 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16642 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
16647 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16648 # Let make expand exec_prefix.
16649 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16651 DEFS=-DHAVE_CONFIG_H
16656 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16657 # 1. Remove the extension, and $U if already installed.
16658 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
16659 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
16660 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16661 # will be set to the directory where LIBOBJS objects are built.
16662 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16663 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
16665 LIBOBJS=$ac_libobjs
16667 LTLIBOBJS=$ac_ltlibobjs
16672 : "${CONFIG_STATUS=./config.status}"
16674 ac_clean_files_save=$ac_clean_files
16675 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16676 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16677 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16679 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
16681 # Generated by $as_me.
16682 # Run this file to recreate the current configuration.
16683 # Compiler output produced by configure, useful for debugging
16684 # configure, is in config.log if it exists.
16687 ac_cs_recheck=false
16690 SHELL=\${CONFIG_SHELL-$SHELL}
16693 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16694 ## -------------------- ##
16695 ## M4sh Initialization. ##
16696 ## -------------------- ##
16698 # Be more Bourne compatible
16699 DUALCASE=1; export DUALCASE # for MKS sh
16700 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
16703 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
16704 # is contrary to our usage. Disable this feature.
16705 alias -g '${1+"$@"}'='"$@"'
16706 setopt NO_GLOB_SUBST
16708 case `(set -o) 2>/dev/null` in #(
16720 # Printing a long string crashes Solaris 7 /usr/bin/printf.
16721 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16722 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16723 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16724 # Prefer a ksh shell builtin over an external printf program on Solaris,
16725 # but without wasting forks for bash or zsh.
16726 if test -z "$BASH_VERSION$ZSH_VERSION" \
16727 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16728 as_echo='print -r --'
16729 as_echo_n='print -rn --'
16730 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16731 as_echo='printf %s\n'
16732 as_echo_n='printf %s'
16734 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16735 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16736 as_echo_n='/usr/ucb/echo -n'
16738 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16739 as_echo_n_body='eval
16743 expr "X$arg" : "X\\(.*\\)$as_nl";
16744 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16746 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16748 export as_echo_n_body
16749 as_echo_n='sh -c $as_echo_n_body as_echo'
16751 export as_echo_body
16752 as_echo='sh -c $as_echo_body as_echo'
16755 # The user is always right.
16756 if test "${PATH_SEPARATOR+set}" != set; then
16758 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16759 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16766 # We need space, tab and new line, in precisely that order. Quoting is
16767 # there to prevent editors from complaining about space-tab.
16768 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
16769 # splitting by setting IFS to empty value.)
16772 # Find who we are. Look in the path if we contain no directory separator.
16775 *[\\/]* ) as_myself=$0 ;;
16776 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16777 for as_dir in $PATH
16780 test -z "$as_dir" && as_dir=.
16781 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16787 # We did not find ourselves, most probably we were run as `sh COMMAND'
16788 # in which case we are not to be found in the path.
16789 if test "x$as_myself" = x; then
16792 if test ! -f "$as_myself"; then
16793 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16797 # Unset variables that we do not need and which cause bugs (e.g. in
16798 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16799 # suppresses any "Segmentation fault" message there. '((' could
16800 # trigger a bug in pdksh 5.2.14.
16801 for as_var in BASH_ENV ENV MAIL MAILPATH
16802 do eval test x\${$as_var+set} = xset \
16803 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16816 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16819 # as_fn_error STATUS ERROR [LINENO LOG_FD]
16820 # ----------------------------------------
16821 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16822 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16823 # script with STATUS, using 1 if that was 0.
16826 as_status=$1; test $as_status -eq 0 && as_status=1
16828 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16829 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
16831 $as_echo "$as_me: error: $2" >&2
16832 as_fn_exit $as_status
16836 # as_fn_set_status STATUS
16837 # -----------------------
16838 # Set $? to STATUS, without forking.
16839 as_fn_set_status ()
16842 } # as_fn_set_status
16844 # as_fn_exit STATUS
16845 # -----------------
16846 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16850 as_fn_set_status $1
16856 # Portably unset VAR.
16859 { eval $1=; unset $1;}
16861 as_unset=as_fn_unset
16862 # as_fn_append VAR VALUE
16863 # ----------------------
16864 # Append the text in VALUE to the end of the definition contained in VAR. Take
16865 # advantage of any shell optimizations that allow amortized linear growth over
16866 # repeated appends, instead of the typical quadratic growth present in naive
16868 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16869 eval 'as_fn_append ()
16880 # as_fn_arith ARG...
16881 # ------------------
16882 # Perform arithmetic evaluation on the ARGs, and store the result in the
16883 # global $as_val. Take advantage of shells that can avoid forks. The arguments
16884 # must be portable across $(()) and expr.
16885 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16886 eval 'as_fn_arith ()
16893 as_val=`expr "$@" || test $? -eq 1`
16898 if expr a : '\(a\)' >/dev/null 2>&1 &&
16899 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16905 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16906 as_basename=basename
16911 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16917 as_me=`$as_basename -- "$0" ||
16918 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16919 X"$0" : 'X\(//\)$' \| \
16920 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
16922 sed '/^.*\/\([^/][^/]*\)\/*$/{
16936 # Avoid depending upon Character Ranges.
16937 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16938 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16939 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16940 as_cr_digits='0123456789'
16941 as_cr_alnum=$as_cr_Letters$as_cr_digits
16943 ECHO_C= ECHO_N= ECHO_T=
16944 case `echo -n x` in #(((((
16946 case `echo 'xy\c'` in
16947 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
16949 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16956 rm -f conf$$ conf$$.exe conf$$.file
16957 if test -d conf$$.dir; then
16958 rm -f conf$$.dir/conf$$.file
16961 mkdir conf$$.dir 2>/dev/null
16963 if (echo >conf$$.file) 2>/dev/null; then
16964 if ln -s conf$$.file conf$$ 2>/dev/null; then
16966 # ... but there are two gotchas:
16967 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16968 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
16969 # In both cases, we have to default to `cp -pR'.
16970 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16972 elif ln conf$$.file conf$$ 2>/dev/null; then
16980 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16981 rmdir conf$$.dir 2>/dev/null
16986 # Create "$as_dir" as a directory, including parents if necessary.
16991 -*) as_dir=./$as_dir;;
16993 test -d "$as_dir" || eval $as_mkdir_p || {
16997 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16998 *) as_qdir=$as_dir;;
17000 as_dirs="'$as_qdir' $as_dirs"
17001 as_dir=`$as_dirname -- "$as_dir" ||
17002 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17003 X"$as_dir" : 'X\(//\)[^/]' \| \
17004 X"$as_dir" : 'X\(//\)$' \| \
17005 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17006 $as_echo X"$as_dir" |
17007 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17011 /^X\(\/\/\)[^/].*/{
17024 test -d "$as_dir" && break
17026 test -z "$as_dirs" || eval "mkdir $as_dirs"
17027 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
17031 if mkdir -p . 2>/dev/null; then
17032 as_mkdir_p='mkdir -p "$as_dir"'
17034 test -d ./-p && rmdir ./-p
17039 # as_fn_executable_p FILE
17040 # -----------------------
17041 # Test if FILE is an executable regular file.
17042 as_fn_executable_p ()
17044 test -f "$1" && test -x "$1"
17045 } # as_fn_executable_p
17046 as_test_x='test -x'
17047 as_executable_p=as_fn_executable_p
17049 # Sed expression to map a string onto a valid CPP name.
17050 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
17052 # Sed expression to map a string onto a valid variable name.
17053 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
17057 ## ----------------------------------- ##
17058 ## Main body of $CONFIG_STATUS script. ##
17059 ## ----------------------------------- ##
17061 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
17063 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17064 # Save the log message, to keep $0 and so on meaningful, and to
17065 # report actual input values of CONFIG_FILES etc. instead of their
17066 # values after options handling.
17068 This file was extended by PostgreSQL $as_me 10devel, which was
17069 generated by GNU Autoconf 2.69. Invocation command line was
17071 CONFIG_FILES = $CONFIG_FILES
17072 CONFIG_HEADERS = $CONFIG_HEADERS
17073 CONFIG_LINKS = $CONFIG_LINKS
17074 CONFIG_COMMANDS = $CONFIG_COMMANDS
17077 on `(hostname || uname -n) 2>/dev/null | sed 1q`
17082 case $ac_config_files in *"
17083 "*) set x $ac_config_files; shift; ac_config_files=$*;;
17086 case $ac_config_headers in *"
17087 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17091 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17092 # Files that config.status was made for.
17093 config_files="$ac_config_files"
17094 config_headers="$ac_config_headers"
17095 config_links="$ac_config_links"
17096 config_commands="$ac_config_commands"
17100 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17102 \`$as_me' instantiates files and other configuration actions
17103 from templates according to the current configuration. Unless the files
17104 and actions are specified as TAGs, all are instantiated by default.
17106 Usage: $0 [OPTION]... [TAG]...
17108 -h, --help print this help, then exit
17109 -V, --version print version number and configuration settings, then exit
17110 --config print configuration, then exit
17111 -q, --quiet, --silent
17112 do not print progress messages
17113 -d, --debug don't remove temporary files
17114 --recheck update $as_me by reconfiguring in the same conditions
17115 --file=FILE[:TEMPLATE]
17116 instantiate the configuration file FILE
17117 --header=FILE[:TEMPLATE]
17118 instantiate the configuration header FILE
17120 Configuration files:
17123 Configuration headers:
17126 Configuration links:
17129 Configuration commands:
17132 Report bugs to <pgsql-bugs@postgresql.org>."
17135 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17136 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
17138 PostgreSQL config.status 10devel
17139 configured by $0, generated by GNU Autoconf 2.69,
17140 with options \\"\$ac_cs_config\\"
17142 Copyright (C) 2012 Free Software Foundation, Inc.
17143 This config.status script is free software; the Free Software Foundation
17144 gives unlimited permission to copy, distribute and modify it."
17151 test -n "\$AWK" || AWK=awk
17154 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17155 # The default lists apply if the user does not specify any file.
17161 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17162 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
17166 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17178 # Handling of the options.
17179 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17181 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
17182 $as_echo "$ac_cs_version"; exit ;;
17183 --config | --confi | --conf | --con | --co | --c )
17184 $as_echo "$ac_cs_config"; exit ;;
17185 --debug | --debu | --deb | --de | --d | -d )
17187 --file | --fil | --fi | --f )
17190 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17191 '') as_fn_error $? "missing file argument" ;;
17193 as_fn_append CONFIG_FILES " '$ac_optarg'"
17194 ac_need_defaults=false;;
17195 --header | --heade | --head | --hea )
17198 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17200 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
17201 ac_need_defaults=false;;
17203 # Conflict between --help and --header
17204 as_fn_error $? "ambiguous option: \`$1'
17205 Try \`$0 --help' for more information.";;
17206 --help | --hel | -h )
17207 $as_echo "$ac_cs_usage"; exit ;;
17208 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17209 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17212 # This is an error.
17213 -*) as_fn_error $? "unrecognized option: \`$1'
17214 Try \`$0 --help' for more information." ;;
17216 *) as_fn_append ac_config_targets " $1"
17217 ac_need_defaults=false ;;
17223 ac_configure_extra_args=
17225 if $ac_cs_silent; then
17227 ac_configure_extra_args="$ac_configure_extra_args --silent"
17231 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17232 if \$ac_cs_recheck; then
17233 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
17235 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17236 CONFIG_SHELL='$SHELL'
17237 export CONFIG_SHELL
17242 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17246 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17247 ## Running $as_me. ##
17253 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17256 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17258 # Handling of arguments.
17259 for ac_config_target in $ac_config_targets
17261 case $ac_config_target in
17262 "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
17263 "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
17264 "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
17265 "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;;
17266 "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
17267 "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
17268 "src/include/dynloader.h") CONFIG_LINKS="$CONFIG_LINKS src/include/dynloader.h:src/backend/port/dynloader/${template}.h" ;;
17269 "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
17270 "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
17271 "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
17272 "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
17273 "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
17274 "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
17276 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
17281 # If the user did not use the arguments to specify the items to instantiate,
17282 # then the envvar interface is used. Set only those that are not.
17283 # We use the long form for the default assignment because of an extremely
17284 # bizarre bug on SunOS 4.1.3.
17285 if $ac_need_defaults; then
17286 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17287 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17288 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
17289 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17292 # Have a temporary directory for convenience. Make it in the build tree
17293 # simply because there is no reason against having it here, and in addition,
17294 # creating and moving files from /tmp can sometimes cause problems.
17295 # Hook for its removal unless debugging.
17296 # Note that there is a small window in which the directory will not be cleaned:
17297 # after its creation but before its name has been assigned to `$tmp'.
17301 trap 'exit_status=$?
17302 : "${ac_tmp:=$tmp}"
17303 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
17305 trap 'as_fn_exit 1' 1 2 13 15
17307 # Create a (secure) tmp directory for tmp files.
17310 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
17314 tmp=./conf$$-$RANDOM
17315 (umask 077 && mkdir "$tmp")
17316 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
17319 # Set up the scripts for CONFIG_FILES section.
17320 # No need to generate them if there are no CONFIG_FILES.
17321 # This happens for instance with `./config.status config.h'.
17322 if test -n "$CONFIG_FILES"; then
17325 ac_cr=`echo X | tr X '\015'`
17326 # On cygwin, bash can eat \r inside `` if the user requested igncr.
17327 # But we know of no other shell where ac_cr would be empty at this
17328 # point, so we can use a bashism as a fallback.
17329 if test "x$ac_cr" = x; then
17330 eval ac_cr=\$\'\\r\'
17332 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17333 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
17336 ac_cs_awk_cr=$ac_cr
17339 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
17344 echo "cat >conf$$subs.awk <<_ACEOF" &&
17345 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17347 } >conf$$subs.sh ||
17348 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17349 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
17351 for ac_last_try in false false false false false :; do
17352 . ./conf$$subs.sh ||
17353 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17355 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17356 if test $ac_delim_n = $ac_delim_num; then
17358 elif $ac_last_try; then
17359 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17361 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17364 rm -f conf$$subs.sh
17366 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17367 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
17371 s/^/S["/; s/!.*/"]=/
17381 s/\(.\{148\}\)..*/\1/
17383 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17388 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17395 s/\(.\{148\}\)..*/\1/
17397 s/["\\]/\\&/g; s/^/"/; s/$/"/
17401 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17406 ' <conf$$subs.awk | sed '
17411 ' >>$CONFIG_STATUS || ac_write_fail=1
17412 rm -f conf$$subs.awk
17413 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17415 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
17416 for (key in S) S_is_set[key] = 1
17422 nfields = split(line, field, "@")
17424 len = length(field[1])
17425 for (i = 2; i < nfields; i++) {
17427 keylen = length(key)
17428 if (S_is_set[key]) {
17430 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17431 len += length(value) + length(field[++i])
17442 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17443 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17444 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17447 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
17448 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
17451 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17452 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
17453 # trailing colons and then remove the whole line if VPATH becomes empty
17454 # (actually we leave an empty line to preserve line numbers).
17455 if test "x$srcdir" = x.; then
17456 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17474 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17475 fi # test -n "$CONFIG_FILES"
17477 # Set up the scripts for CONFIG_HEADERS section.
17478 # No need to generate them if there are no CONFIG_HEADERS.
17479 # This happens for instance with `./config.status Makefile'.
17480 if test -n "$CONFIG_HEADERS"; then
17481 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
17485 # Transform confdefs.h into an awk script `defines.awk', embedded as
17486 # here-document in config.status, that substitutes the proper values into
17487 # config.h.in to produce config.h.
17489 # Create a delimiter string that does not exist in confdefs.h, to ease
17490 # handling of long lines.
17492 for ac_last_try in false false :; do
17493 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17494 if test -z "$ac_tt"; then
17496 elif $ac_last_try; then
17497 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
17499 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17503 # For the awk script, D is an array of macro values keyed by name,
17504 # likewise P contains macro parameters if any. Preserve backslash
17505 # newline sequences.
17507 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17509 s/.\{148\}/&'"$ac_delim"'/g
17512 s/^[ ]*#[ ]*define[ ][ ]*/ /
17519 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17521 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17525 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17526 D["\1"]=" \3\\\\\\n"\\/p
17528 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17533 s/.\{148\}/&'"$ac_delim"'/g
17538 s/["\\]/\\&/g; s/^/"/; s/$/"/p
17541 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17543 ' <confdefs.h | sed '
17544 s/'"$ac_delim"'/"\\\
17545 "/g' >>$CONFIG_STATUS || ac_write_fail=1
17547 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17548 for (key in D) D_is_set[key] = 1
17551 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17553 split(line, arg, " ")
17554 if (arg[1] == "#") {
17558 defundef = substr(arg[1], 2)
17561 split(mac1, mac2, "(") #)
17563 prefix = substr(line, 1, index(line, defundef) - 1)
17564 if (D_is_set[macro]) {
17565 # Preserve the white space surrounding the "#".
17566 print prefix "define", macro P[macro] D[macro]
17569 # Replace #undef with comments. This is necessary, for example,
17570 # in the case of _POSIX_SOURCE, which is predefined and required
17571 # on some systems where configure will not decide to define it.
17572 if (defundef == "undef") {
17573 print "/*", prefix defundef, macro, "*/"
17581 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17582 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
17583 fi # test -n "$CONFIG_HEADERS"
17586 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
17591 :[FHLC]) ac_mode=$ac_tag; continue;;
17593 case $ac_mode$ac_tag in
17595 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
17596 :[FH]-) ac_tag=-:-;;
17597 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17614 -) ac_f="$ac_tmp/stdin";;
17615 *) # Look for the file first in the build tree, then in the source tree
17616 # (if the path is not absolute). The absolute path cannot be DOS-style,
17617 # because $ac_f cannot contain `:'.
17621 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17623 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
17625 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17626 as_fn_append ac_file_inputs " '$ac_f'"
17629 # Let's still pretend it is `configure' which instantiates (i.e., don't
17630 # use $as_me), people would be surprised to read:
17631 # /* config.h. Generated by config.status. */
17632 configure_input='Generated from '`
17633 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17635 if test x"$ac_file" != x-; then
17636 configure_input="$ac_file. $configure_input"
17637 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17638 $as_echo "$as_me: creating $ac_file" >&6;}
17640 # Neutralize special characters interpreted by sed in replacement strings.
17641 case $configure_input in #(
17642 *\&* | *\|* | *\\* )
17643 ac_sed_conf_input=`$as_echo "$configure_input" |
17644 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17645 *) ac_sed_conf_input=$configure_input;;
17649 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17650 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
17655 ac_dir=`$as_dirname -- "$ac_file" ||
17656 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17657 X"$ac_file" : 'X\(//\)[^/]' \| \
17658 X"$ac_file" : 'X\(//\)$' \| \
17659 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
17660 $as_echo X"$ac_file" |
17661 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17665 /^X\(\/\/\)[^/].*/{
17678 as_dir="$ac_dir"; as_fn_mkdir_p
17682 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17684 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
17685 # A ".." for each directory in $ac_dir_suffix.
17686 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
17687 case $ac_top_builddir_sub in
17688 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17689 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17692 ac_abs_top_builddir=$ac_pwd
17693 ac_abs_builddir=$ac_pwd$ac_dir_suffix
17694 # for backward compatibility:
17695 ac_top_builddir=$ac_top_build_prefix
17698 .) # We are building in place.
17700 ac_top_srcdir=$ac_top_builddir_sub
17701 ac_abs_top_srcdir=$ac_pwd ;;
17702 [\\/]* | ?:[\\/]* ) # Absolute name.
17703 ac_srcdir=$srcdir$ac_dir_suffix;
17704 ac_top_srcdir=$srcdir
17705 ac_abs_top_srcdir=$srcdir ;;
17706 *) # Relative name.
17707 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17708 ac_top_srcdir=$ac_top_build_prefix$srcdir
17709 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
17711 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
17721 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17722 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
17724 ac_MKDIR_P=$MKDIR_P
17726 [\\/$]* | ?:[\\/]* ) ;;
17727 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17731 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17732 # If the template does not know about datarootdir, expand it.
17733 # FIXME: This hack should be removed a few years after 2.60.
17734 ac_datarootdir_hack=; ac_datarootdir_seen=
17745 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17746 *datarootdir*) ac_datarootdir_seen=yes;;
17747 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
17748 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17749 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
17751 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17752 ac_datarootdir_hack='
17753 s&@datadir@&$datadir&g
17754 s&@docdir@&$docdir&g
17755 s&@infodir@&$infodir&g
17756 s&@localedir@&$localedir&g
17757 s&@mandir@&$mandir&g
17758 s&\\\${datarootdir}&$datarootdir&g' ;;
17762 # Neutralize VPATH when `$srcdir' = `.'.
17763 # Shell code in configure.ac might set extrasub.
17764 # FIXME: do we really want to maintain this feature?
17765 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17766 ac_sed_extra="$ac_vpsub
17769 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17771 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17772 s|@configure_input@|$ac_sed_conf_input|;t t
17773 s&@top_builddir@&$ac_top_builddir_sub&;t t
17774 s&@top_build_prefix@&$ac_top_build_prefix&;t t
17775 s&@srcdir@&$ac_srcdir&;t t
17776 s&@abs_srcdir@&$ac_abs_srcdir&;t t
17777 s&@top_srcdir@&$ac_top_srcdir&;t t
17778 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17779 s&@builddir@&$ac_builddir&;t t
17780 s&@abs_builddir@&$ac_abs_builddir&;t t
17781 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17782 s&@INSTALL@&$ac_INSTALL&;t t
17783 s&@MKDIR_P@&$ac_MKDIR_P&;t t
17784 $ac_datarootdir_hack
17786 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17787 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17789 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
17790 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17791 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17792 "$ac_tmp/out"`; test -z "$ac_out"; } &&
17793 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17794 which seems to be undefined. Please make sure it is defined" >&5
17795 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
17796 which seems to be undefined. Please make sure it is defined" >&2;}
17798 rm -f "$ac_tmp/stdin"
17800 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17801 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
17803 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17809 if test x"$ac_file" != x-; then
17811 $as_echo "/* $configure_input */" \
17812 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17813 } >"$ac_tmp/config.h" \
17814 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17815 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
17816 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17817 $as_echo "$as_me: $ac_file is unchanged" >&6;}
17820 mv "$ac_tmp/config.h" "$ac_file" \
17821 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17824 $as_echo "/* $configure_input */" \
17825 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
17826 || as_fn_error $? "could not create -" "$LINENO" 5
17834 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
17837 # Prefer the file from the source tree if names are identical.
17838 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
17839 ac_source=$srcdir/$ac_source
17842 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
17843 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
17845 if test ! -r "$ac_source"; then
17846 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
17850 # Try a relative symlink, then a hard link, then a copy.
17852 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
17853 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
17855 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
17856 ln "$ac_source" "$ac_file" 2>/dev/null ||
17857 cp -p "$ac_source" "$ac_file" ||
17858 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
17861 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
17862 $as_echo "$as_me: executing $ac_file commands" >&6;}
17867 case $ac_file$ac_mode in
17868 "check_win32_symlinks":C)
17869 # Links sometimes fail undetected on Mingw -
17870 # so here we detect it and warn the user
17871 for FILE in $CONFIG_LINKS
17873 # test -e works for symlinks in the MinGW console
17874 test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
17875 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
17878 "src/include/pg_config.h":H)
17879 # Update timestamp for pg_config.h (see Makefile.global)
17880 echo >src/include/stamp-h
17882 "src/include/pg_config_ext.h":H)
17883 # Update timestamp for pg_config_ext.h (see Makefile.global)
17884 echo >src/include/stamp-ext-h
17886 "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
17894 ac_clean_files=$ac_clean_files_save
17896 test $ac_write_fail = 0 ||
17897 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
17900 # configure is writing to config.log, and then calls config.status.
17901 # config.status does its own redirection, appending to config.log.
17902 # Unfortunately, on DOS this fails, as config.log is still kept open
17903 # by configure, so config.status won't be able to write to it; its
17904 # output is simply discarded. So we exec the FD to /dev/null,
17905 # effectively closing config.log, so it can be properly (re)opened and
17906 # appended to by config.status. When coming back to configure, we
17907 # need to make the FD available again.
17908 if test "$no_create" != yes; then
17910 ac_config_status_args=
17911 test "$silent" = yes &&
17912 ac_config_status_args="$ac_config_status_args --quiet"
17914 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17916 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17917 # would make configure fail if this is the last instruction.
17918 $ac_cs_success || as_fn_exit 1
17920 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17921 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17922 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}