diff options
author | Pavan Deolasee | 2017-06-14 05:42:18 +0000 |
---|---|---|
committer | Pavan Deolasee | 2017-06-14 05:42:18 +0000 |
commit | 15dd5274c323fb93e4e3ea9ad2185aaaec10f79c (patch) | |
tree | 9dafb4c7f735d9429ea461dc792933af87493c33 /configure | |
parent | dfbb88e3bbb526dcb204b456b9e5cfd9d10d0d0a (diff) | |
parent | d5cb3bab564e0927ffac7c8729eacf181a12dd40 (diff) |
Merge from PG master upto d5cb3bab564e0927ffac7c8729eacf181a12dd40
This is the result of the "git merge remotes/PGSQL/master" upto the said commit
point. We have done some basic analysis, fixed compilation problems etc, but
bulk of the logical problems in conflict resolution etc will be handled by
subsequent commits.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 1202 |
1 files changed, 894 insertions, 308 deletions
@@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for PostgreSQL 9.6beta4 (Postgres-XL 9.6alpha1). +# Generated by GNU Autoconf 2.69 for PostgreSQL 10beta1 (Postgres-XL 10alpha1). # # Report bugs to <bugs@postgres-xl.org>. # @@ -11,7 +11,7 @@ # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # -# Copyright (c) 1996-2016, PostgreSQL Global Development Group +# Copyright (c) 1996-2017, PostgreSQL Global Development Group ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## @@ -582,9 +582,9 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='PostgreSQL' PACKAGE_TARNAME='postgresql' -PACKAGE_VERSION='9.6beta4 (Postgres-XL 9.6alpha1)' -PACKAGE_XC_VERSION='9.6alpha1' -PACKAGE_STRING='PostgreSQL 9.6beta4 (Postgres-XL 9.6alpha1)' +PACKAGE_VERSION='10beta1 (Postgres-XL 10alpha1)' +PACKAGE_XC_VERSION='10alpha1' +PACKAGE_STRING='PostgreSQL 10beta1 (Postgres-XL 10alpha1)' PACKAGE_BUGREPORT='bugs@postgres-xl.org' PACKAGE_URL='' @@ -630,14 +630,12 @@ ac_subst_vars='LTLIBOBJS vpath_build PG_VERSION_NUM PROVE +FOP OSX XSLTPROC XMLLINT DBTOEPUB -COLLATEINDEX -DOCBOOKSTYLE have_docbook -JADE NSGMLS TCL_SHLIB_LD_LIBS TCL_SHARED_BUILD @@ -695,7 +693,6 @@ STRIP_SHARED_LIB STRIP_STATIC_LIB STRIP RANLIB -ld_R_works with_gnu_ld LD LDFLAGS_SL @@ -717,6 +714,12 @@ krb_srvtab with_python with_perl with_tcl +ICU_LIBS +ICU_CFLAGS +PKG_CONFIG_LIBDIR +PKG_CONFIG_PATH +PKG_CONFIG +with_icu enable_thread_safety INCLUDES autodepend @@ -742,6 +745,7 @@ GENHTML LCOV GCOV enable_debug +enable_strong_random enable_rpath default_port WANTED_LANGUAGES @@ -810,6 +814,7 @@ with_pgport enable_rpath enable_spinlocks enable_atomics +enable_strong_random enable_debug enable_profiling enable_coverage @@ -824,6 +829,7 @@ enable_depend enable_genmsgids enable_cassert enable_thread_safety +with_icu with_tcl with_tclconfig with_perl @@ -859,9 +865,13 @@ LDFLAGS LIBS CPPFLAGS CPP +PKG_CONFIG +PKG_CONFIG_PATH +PKG_CONFIG_LIBDIR +ICU_CFLAGS +ICU_LIBS LDFLAGS_EX -LDFLAGS_SL -DOCBOOKSTYLE' +LDFLAGS_SL' # Initialize some variables set by options. @@ -1402,7 +1412,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures PostgreSQL 9.6beta4 (Postgres-XL 9.6alpha1) to adapt to many kinds of systems. +\`configure' configures PostgreSQL 10beta1 (Postgres-XL 10alpha1) to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1467,7 +1477,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of PostgreSQL 9.6beta4 (Postgres-XL 9.6alpha1):";; + short | recursive ) echo "Configuration of PostgreSQL 10beta1 (Postgres-XL 10alpha1):";; esac cat <<\_ACEOF @@ -1476,13 +1486,14 @@ Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-integer-datetimes - disable 64-bit integer date/time support + obsolete option, no longer supported --enable-nls[=LANGUAGES] enable Native Language Support --disable-rpath do not embed shared library search path in executables --disable-spinlocks do not use spinlocks --disable-atomics do not use atomic operations + --disable-strong-random do not use a strong random number source --enable-debug build with debugging symbols (-g) --enable-profiling build with profiling enabled --enable-coverage build with coverage testing instrumentation @@ -1513,6 +1524,7 @@ Optional Packages: --with-wal-segsize=SEGSIZE set WAL segment size in MB [16] --with-CC=CMD set compiler (deprecated) + --with-icu build with ICU support --with-tcl build Tcl modules (PL/Tcl) --with-tclconfig=DIR tclConfig.sh is in DIR --with-perl build Perl modules (PL/Perl) @@ -1548,10 +1560,15 @@ Some influential environment variables: CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir> CPP C preprocessor + PKG_CONFIG path to pkg-config utility + PKG_CONFIG_PATH + directories to add to pkg-config's search path + PKG_CONFIG_LIBDIR + path overriding pkg-config's built-in search path + ICU_CFLAGS C compiler flags for ICU, overriding pkg-config + ICU_LIBS linker flags for ICU, overriding pkg-config LDFLAGS_EX extra linker flags for linking executables only LDFLAGS_SL extra linker flags for linking shared libraries only - DOCBOOKSTYLE - location of DocBook stylesheets Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1619,14 +1636,14 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -PostgreSQL configure 9.6beta4 (Postgres-XL 9.6alpha1) +PostgreSQL configure 10beta1 (Postgres-XL 10alpha1) generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. -Copyright (c) 1996-2016, PostgreSQL Global Development Group +Copyright (c) 1996-2017, PostgreSQL Global Development Group _ACEOF exit fi @@ -2330,7 +2347,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by PostgreSQL $as_me 9.6beta4 (Postgres-XL 9.6alpha1), which was +It was created by PostgreSQL $as_me 10beta1 (Postgres-XL 10alpha1), which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2720,7 +2737,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. configure_args=$ac_configure_args -PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\.[0-9][0-9]*\)'` +PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'` cat >>confdefs.h <<_ACEOF @@ -2881,9 +2898,7 @@ dragonfly*) template=netbsd ;; mingw*) template=win32 ;; netbsd*) template=netbsd ;; openbsd*) template=openbsd ;; - sco*) template=sco ;; solaris*) template=solaris ;; - sysv5*) template=unixware ;; esac if test x"$template" = x"" ; then @@ -2998,10 +3013,10 @@ fi # -# 64-bit integer date/time storage: enabled by default. +# 64-bit integer date/time storage is now the only option, but to avoid +# unnecessary breakage of build scripts, continue to accept an explicit +# "--enable-integer-datetimes" switch. # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with 64-bit integer date/time support" >&5 -$as_echo_n "checking whether to build with 64-bit integer date/time support... " >&6; } # Check whether --enable-integer-datetimes was given. @@ -3009,12 +3024,10 @@ if test "${enable_integer_datetimes+set}" = set; then : enableval=$enable_integer_datetimes; case $enableval in yes) - -$as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h - + : ;; no) - : + as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5 ;; *) as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5 @@ -3024,13 +3037,9 @@ $as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h else enable_integer_datetimes=yes -$as_echo "#define USE_INTEGER_DATETIMES 1" >>confdefs.h - fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_integer_datetimes" >&5 -$as_echo "$enable_integer_datetimes" >&6; } # @@ -3210,6 +3219,34 @@ fi # +# Random number generation +# + + +# Check whether --enable-strong-random was given. +if test "${enable_strong_random+set}" = set; then : + enableval=$enable_strong_random; + case $enableval in + yes) + : + ;; + no) + : + ;; + *) + as_fn_error $? "no argument expected for --enable-strong-random option" "$LINENO" 5 + ;; + esac + +else + enable_strong_random=yes + +fi + + + + +# # --enable-debug adds -g to compiler flags # @@ -3697,7 +3734,11 @@ case ${wal_segsize} in 16) ;; 32) ;; 64) ;; - *) as_fn_error $? "Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5 + 128) ;; + 256) ;; + 512) ;; + 1024) ;; + *) as_fn_error $? "Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64,128,256,512,1024." "$LINENO" 5 esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_segsize}MB" >&5 $as_echo "${wal_segsize}MB" >&6; } @@ -5383,6 +5424,255 @@ $as_echo "$enable_thread_safety" >&6; } # +# ICU +# +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5 +$as_echo_n "checking whether to build with ICU support... " >&6; } + + + +# Check whether --with-icu was given. +if test "${with_icu+set}" = set; then : + withval=$with_icu; + case $withval in + yes) + +$as_echo "#define USE_ICU 1" >>confdefs.h + + ;; + no) + : + ;; + *) + as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5 + ;; + esac + +else + with_icu=no + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5 +$as_echo "$with_icu" >&6; } + + +if test "$with_icu" = yes; then + + + + + + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi +fi + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5 +$as_echo_n "checking for icu-uc icu-i18n... " >&6; } + +if test -n "$ICU_CFLAGS"; then + pkg_cv_ICU_CFLAGS="$ICU_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5 + ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$ICU_LIBS"; then + pkg_cv_ICU_LIBS="$ICU_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5 + ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1` + else + ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$ICU_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met: + +$ICU_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables ICU_CFLAGS +and ICU_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables ICU_CFLAGS +and ICU_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see <http://pkg-config.freedesktop.org/>. +See \`config.log' for more details" "$LINENO" 5; } +else + ICU_CFLAGS=$pkg_cv_ICU_CFLAGS + ICU_LIBS=$pkg_cv_ICU_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi +fi + +# # Optionally build Tcl modules (PL/Tcl) # { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5 @@ -6425,40 +6715,6 @@ with_gnu_ld=$ac_cv_prog_gnu_ld -case $host_os in sysv5*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ld -R works" >&5 -$as_echo_n "checking whether ld -R works... " >&6; } -if ${pgac_cv_prog_ld_R+:} false; then : - $as_echo_n "(cached) " >&6 -else - - pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - pgac_cv_prog_ld_R=yes -else - pgac_cv_prog_ld_R=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$pgac_save_LDFLAGS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_ld_R" >&5 -$as_echo "$pgac_cv_prog_ld_R" >&6; } - ld_R_works=$pgac_cv_prog_ld_R - -esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 @@ -7137,7 +7393,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # When Autoconf chooses install-sh as install program it tries to generate -# a relative path to it in each makefile where it subsitutes it. This clashes +# a relative path to it in each makefile where it substitutes it. This clashes # with our Makefile.global concept. This workaround helps. case $INSTALL in *install-sh*) install_bin='';; @@ -7281,7 +7537,7 @@ fi $as_echo "$MKDIR_P" >&6; } # When Autoconf chooses install-sh as mkdir -p program it tries to generate -# a relative path to it in each makefile where it subsitutes it. This clashes +# a relative path to it in each makefile where it substitutes it. This clashes # with our Makefile.global concept. This workaround helps. case $MKDIR_P in *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';; @@ -7637,11 +7893,17 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5 $as_echo_n "checking Python configuration directory... " >&6; } python_majorversion=`${PYTHON} -c "import sys; print(sys.version[0])"` +python_minorversion=`${PYTHON} -c "import sys; print(sys.version[2])"` python_version=`${PYTHON} -c "import sys; print(sys.version[:3])"` python_configdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBPL'))))"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5 $as_echo "$python_configdir" >&6; } +# Reject unsupported Python versions as soon as practical. +if test "$python_majorversion" -lt 3 -a "$python_minorversion" -lt 4; then + as_fn_error $? "Python version $python_version is too old (version 2.4 or later is required)" "$LINENO" 5 +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directories" >&5 $as_echo_n "checking Python include directories... " >&6; } python_includespec=`${PYTHON} -c " @@ -7665,25 +7927,80 @@ $as_echo_n "checking how to link an embedded Python application... " >&6; } python_libdir=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBDIR'))))"` python_ldlibrary=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDLIBRARY'))))"` -python_so=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('SO'))))"` -ldlibrary=`echo "${python_ldlibrary}" | sed "s/${python_so}$//"` -python_enable_shared=`${PYTHON} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_vars().get('Py_ENABLE_SHARED',0))"` -if test x"${python_libdir}" != x"" -a x"${python_ldlibrary}" != x"" -a x"${python_ldlibrary}" != x"${ldlibrary}" +# If LDLIBRARY exists and has a shlib extension, use it verbatim. +ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'` +if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}" then - # New way: use the official shared library ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"` - python_libspec="-L${python_libdir} -l${ldlibrary}" + found_shlib=1 else - # Old way: use libpython from python_configdir - python_libdir="${python_configdir}" - # LDVERSION was introduced in Python 3.2. + # Otherwise, guess the base name of the shlib. + # LDVERSION was added in Python 3.2, before that use VERSION, + # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS. python_ldversion=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LDVERSION'))))"` - if test x"${python_ldversion}" = x""; then - python_ldversion=$python_version + if test x"${python_ldversion}" != x""; then + ldlibrary="python${python_ldversion}" + else + python_version_var=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('VERSION'))))"` + if test x"${python_version_var}" != x""; then + ldlibrary="python${python_version_var}" + else + ldlibrary="python${python_version}" + fi + fi + # Search for a likely-looking file. + found_shlib=0 + for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib + do + # We don't know the platform DLSUFFIX here, so check 'em all. + for e in .so .dll .dylib .sl; do + if test -e "$d/lib${ldlibrary}$e"; then + python_libdir="$d" + found_shlib=1 + break 2 + fi + done + done + # Some platforms (OpenBSD) require us to accept a bare versioned shlib + # (".so.n.n") as well. However, check this only after failing to find + # ".so" anywhere, because yet other platforms (Debian) put the .so + # symlink in a different directory from the underlying versioned shlib. + if test "$found_shlib" != 1; then + for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib + do + for f in "$d/lib${ldlibrary}.so."* ; do + if test -e "$f"; then + python_libdir="$d" + found_shlib=1 + break 2 + fi + done + done fi - python_libspec="-L${python_libdir} -lpython${python_ldversion}" + # As usual, Windows has its own ideas. Possible default library + # locations include c:/Windows/System32 and (for Cygwin) /usr/bin, + # and the "lib" prefix might not be there. + if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then + for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin + do + for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do + if test -e "$f"; then + python_libdir="$d" + found_shlib=1 + break 2 + fi + done + done + fi +fi +if test "$found_shlib" != 1; then + as_fn_error $? "could not find shared library for Python +You might have to rebuild your Python installation. Refer to the +documentation for details. Use --without-python to disable building +PL/Python." "$LINENO" 5 fi +python_libspec="-L${python_libdir} -l${ldlibrary}" python_additional_libs=`${PYTHON} -c "import distutils.sysconfig; print(' '.join(filter(None,distutils.sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"` @@ -7692,40 +8009,6 @@ $as_echo "${python_libspec} ${python_additional_libs}" >&6; } - - # We need libpython as a shared library. With Python >=2.5, we - # check the Py_ENABLE_SHARED setting. On Debian, the setting is not - # correct before the jessie release (http://bugs.debian.org/695979). - # We also want to support older Python versions. So as a fallback - # we see if there is a file that is named like a shared library. - - if test "$python_enable_shared" != 1; then - if test "$PORTNAME" = darwin; then - # OS X does supply a .dylib even though Py_ENABLE_SHARED does - # not get set. The file detection logic below doesn't succeed - # on older OS X versions, so make it explicit. - python_enable_shared=1 - elif test "$PORTNAME" = win32; then - # Windows also needs an explicit override. - python_enable_shared=1 - else - # We don't know the platform shared library extension here yet, - # so we try some candidates. - for dlsuffix in .so .sl; do - if ls "$python_libdir"/libpython*${dlsuffix}* >/dev/null 2>&1; then - python_enable_shared=1 - break - fi - done - fi - fi - - if test "$python_enable_shared" != 1; then - as_fn_error $? "cannot build PL/Python because libpython is not a shared library -You might have to rebuild your Python installation. Refer to the -documentation for details. Use --without-python to disable building -PL/Python." "$LINENO" 5 - fi fi if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then @@ -9083,6 +9366,62 @@ if test "$ac_res" != no; then : fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 +$as_echo_n "checking for library containing clock_gettime... " >&6; } +if ${ac_cv_search_clock_gettime+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char clock_gettime (); +int +main () +{ +return clock_gettime (); + ; + return 0; +} +_ACEOF +for ac_lib in '' rt posix4; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_clock_gettime=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_clock_gettime+:} false; then : + break +fi +done +if ${ac_cv_search_clock_gettime+:} false; then : + +else + ac_cv_search_clock_gettime=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 +$as_echo "$ac_cv_search_clock_gettime" >&6; } +ac_res=$ac_cv_search_clock_gettime +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + # Solaris: { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5 $as_echo_n "checking for library containing fdatasync... " >&6; } @@ -9581,9 +9920,9 @@ else as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5 fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5 -$as_echo_n "checking for SSL_library_init in -lssl... " >&6; } -if ${ac_cv_lib_ssl_SSL_library_init+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5 +$as_echo_n "checking for SSL_new in -lssl... " >&6; } +if ${ac_cv_lib_ssl_SSL_new+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -9597,27 +9936,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char SSL_library_init (); +char SSL_new (); int main () { -return SSL_library_init (); +return SSL_new (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ssl_SSL_library_init=yes + ac_cv_lib_ssl_SSL_new=yes else - ac_cv_lib_ssl_SSL_library_init=no + ac_cv_lib_ssl_SSL_new=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5 -$as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; } -if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5 +$as_echo "$ac_cv_lib_ssl_SSL_new" >&6; } +if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSSL 1 _ACEOF @@ -9687,9 +10026,9 @@ else as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5 fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_library_init" >&5 -$as_echo_n "checking for library containing SSL_library_init... " >&6; } -if ${ac_cv_search_SSL_library_init+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5 +$as_echo_n "checking for library containing SSL_new... " >&6; } +if ${ac_cv_search_SSL_new+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -9702,11 +10041,11 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char SSL_library_init (); +char SSL_new (); int main () { -return SSL_library_init (); +return SSL_new (); ; return 0; } @@ -9719,25 +10058,25 @@ for ac_lib in '' ssleay32 ssl; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_SSL_library_init=$ac_res + ac_cv_search_SSL_new=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if ${ac_cv_search_SSL_library_init+:} false; then : + if ${ac_cv_search_SSL_new+:} false; then : break fi done -if ${ac_cv_search_SSL_library_init+:} false; then : +if ${ac_cv_search_SSL_new+:} false; then : else - ac_cv_search_SSL_library_init=no + ac_cv_search_SSL_new=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_library_init" >&5 -$as_echo "$ac_cv_search_SSL_library_init" >&6; } -ac_res=$ac_cv_search_SSL_library_init +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5 +$as_echo "$ac_cv_search_SSL_new" >&6; } +ac_res=$ac_cv_search_SSL_new if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" @@ -9757,6 +10096,37 @@ _ACEOF fi done + # Functions introduced in OpenSSL 1.1.0. We used to check for + # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL + # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it + # doesn't have these OpenSSL 1.1.0 functions. So check for individual + # functions. + for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + # OpenSSL versions before 1.1.0 required setting callback functions, for + # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock() + # function was removed. + for ac_func in CRYPTO_lock +do : + ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock" +if test "x$ac_cv_func_CRYPTO_lock" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_CRYPTO_LOCK 1 +_ACEOF + +fi +done + fi if test "$with_pam" = yes ; then @@ -10132,7 +10502,7 @@ else fi elif test "$with_uuid" = e2fs ; then - # On OS X, the UUID functions are in libc + # On macOS, the UUID functions are in libc ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate" if test "x$ac_cv_func_uuid_generate" = xyes; then : UUID_LIBS="" @@ -10273,7 +10643,7 @@ fi ## Header files ## -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 pwd.h sys/epoll.h sys/ioctl.h sys/ipc.h sys/poll.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/socket.h sys/sockio.h sys/tas.h sys/time.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h +for ac_header in atomic.h crypt.h dld.h fp_class.h getopt.h ieeefp.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/ipc.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/sockio.h sys/tas.h sys/un.h termios.h ucred.h utime.h wchar.h wctype.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -10292,9 +10662,7 @@ done for ac_header in net/if.h do : ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default -#ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> -#endif " if test "x$ac_cv_header_net_if_h" = xyes; then : @@ -10327,24 +10695,10 @@ done # At least on IRIX, test for netinet/tcp.h will fail unless # netinet/in.h is included first. -for ac_header in netinet/in.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" -if test "x$ac_cv_header_netinet_in_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_NETINET_IN_H 1 -_ACEOF - -fi - -done - for ac_header in netinet/tcp.h do : ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default -#ifdef HAVE_NETINET_IN_H #include <netinet/in.h> -#endif " if test "x$ac_cv_header_netinet_tcp_h" = xyes; then : @@ -11356,6 +11710,48 @@ if test x"$pgac_cv__static_assert" = xyes ; then $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5 +$as_echo_n "checking for typeof... " >&6; } +if ${pgac_cv_c_typeof+:} false; then : + $as_echo_n "(cached) " >&6 +else + pgac_cv_c_typeof=no +for pgac_kw in typeof __typeof__ decltype; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +int x = 0; +$pgac_kw(x) y; +y = x; +return y; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + pgac_cv_c_typeof=$pgac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$pgac_cv_c_typeof" != no && break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5 +$as_echo "$pgac_cv_c_typeof" >&6; } +if test "$pgac_cv_c_typeof" != no; then + +$as_echo "#define HAVE_TYPEOF 1" >>confdefs.h + + if test "$pgac_cv_c_typeof" != typeof; then + +cat >>confdefs.h <<_ACEOF +#define typeof $pgac_cv_c_typeof +_ACEOF + + fi +fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; } if ${pgac_cv__types_compatible+:} false; then : @@ -11489,6 +11885,40 @@ if test x"$pgac_cv__builtin_unreachable" = xyes ; then $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5 +$as_echo_n "checking for computed goto support... " >&6; } +if ${pgac_cv_computed_goto+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +void *labeladdrs[] = {&&my_label}; + goto *labeladdrs[0]; + my_label: + return 1; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + pgac_cv_computed_goto=yes +else + pgac_cv_computed_goto=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5 +$as_echo "$pgac_cv_computed_goto" >&6; } +if test x"$pgac_cv_computed_goto" = xyes ; then + +$as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h + +fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __VA_ARGS__" >&5 $as_echo_n "checking for __VA_ARGS__... " >&6; } if ${pgac_cv__va_args+:} false; then : @@ -11581,6 +12011,7 @@ if ${ac_cv_var_tzname+:} false; then : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include <stdlib.h> #include <time.h> #ifndef tzname /* For SGI. */ extern char *tzname[]; /* RS6000 and others reject char **tzname. */ @@ -11611,8 +12042,12 @@ $as_echo "#define HAVE_TZNAME 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h> +#ifdef HAVE_SYS_IPC_H #include <sys/ipc.h> +#endif +#ifdef HAVE_SYS_SEM_H #include <sys/sem.h> +#endif " if test "x$ac_cv_type_union_semun" = xyes; then : @@ -11636,9 +12071,7 @@ $as_echo "#define HAVE_UNIX_SOCKETS 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h> -#ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> -#endif " if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then : @@ -11651,9 +12084,7 @@ _ACEOF fi ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h> -#ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> -#endif " if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then : @@ -11665,9 +12096,7 @@ _ACEOF fi ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h> -#ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> -#endif " if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then : @@ -11679,9 +12108,7 @@ _ACEOF fi ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h> -#ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> -#endif " if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then : @@ -11693,9 +12120,7 @@ _ACEOF fi ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h> -#ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> -#endif " if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then : @@ -11707,9 +12132,7 @@ _ACEOF fi ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h> -#ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> -#endif " if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then : @@ -12367,12 +12790,8 @@ else for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif -#ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> -#endif extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *); _ACEOF if ac_fn_c_try_compile "$LINENO"; then : @@ -12516,7 +12935,7 @@ fi LIBS_including_readline="$LIBS" LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'` -for ac_func in cbrt 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 +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 do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -12684,7 +13103,7 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRLCPY $ac_have_decl _ACEOF -# This is probably only present on Darwin, but may as well check always +# This is probably only present on macOS, but may as well check always ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h> " if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then : @@ -13401,6 +13820,50 @@ fi done +if test "$with_icu" = yes; then + # ICU functions are macros, so we need to do this the long way. + + # ucol_strcollUTF8() appeared in ICU 50. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ucol_strcollUTF8" >&5 +$as_echo_n "checking for ucol_strcollUTF8... " >&6; } +if ${pgac_cv_func_ucol_strcollUTF8+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_CPPFLAGS=$CPPFLAGS +CPPFLAGS="$ICU_CFLAGS $CPPFLAGS" +ac_save_LIBS=$LIBS +LIBS="$ICU_LIBS $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <unicode/ucol.h> + +int +main () +{ +ucol_strcollUTF8(NULL, NULL, 0, NULL, 0, NULL); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + pgac_cv_func_ucol_strcollUTF8=yes +else + pgac_cv_func_ucol_strcollUTF8=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +CPPFLAGS=$ac_save_CPPFLAGS +LIBS=$ac_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_ucol_strcollUTF8" >&5 +$as_echo "$pgac_cv_func_ucol_strcollUTF8" >&6; } + if test "$pgac_cv_func_ucol_strcollUTF8" = yes ; then + +$as_echo "#define HAVE_UCOL_STRCOLLUTF8 1" >>confdefs.h + + fi +fi + # Lastly, restore full LIBS list and check for readline/libedit symbols LIBS="$LIBS_including_readline" @@ -13606,8 +14069,10 @@ int does_int64_work() return 0; return 1; } + +int main() { - exit(! does_int64_work()); + return (! does_int64_work()); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : @@ -13688,8 +14153,10 @@ int does_int64_work() return 0; return 1; } + +int main() { - exit(! does_int64_work()); + return (! does_int64_work()); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : @@ -13762,6 +14229,7 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdio.h> +#include <string.h> typedef long long int ac_int64; #define INT64_FORMAT "%${pgac_modifier}d" @@ -13782,8 +14250,10 @@ int does_int64_snprintf_work() return 0; /* either multiply or snprintf is busted */ return 1; } + +int main() { - exit(! does_int64_snprintf_work()); + return (! does_int64_snprintf_work()); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : @@ -14838,24 +15308,149 @@ fi # Select semaphore implementation type. if test "$PORTNAME" != "win32"; then + if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then + # Need sem_open for this + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5 +$as_echo_n "checking for library containing sem_open... " >&6; } +if ${ac_cv_search_sem_open+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char sem_open (); +int +main () +{ +return sem_open (); + ; + return 0; +} +_ACEOF +for ac_lib in '' rt pthread; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_sem_open=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_sem_open+:} false; then : + break +fi +done +if ${ac_cv_search_sem_open+:} false; then : + +else + ac_cv_search_sem_open=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5 +$as_echo "$ac_cv_search_sem_open" >&6; } +ac_res=$ac_cv_search_sem_open +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + USE_NAMED_POSIX_SEMAPHORES=1 +fi + + fi + if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then + # Need sem_init for this + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5 +$as_echo_n "checking for library containing sem_init... " >&6; } +if ${ac_cv_search_sem_init+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char sem_init (); +int +main () +{ +return sem_init (); + ; + return 0; +} +_ACEOF +for ac_lib in '' rt pthread; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_sem_init=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_sem_init+:} false; then : + break +fi +done +if ${ac_cv_search_sem_init+:} false; then : + +else + ac_cv_search_sem_init=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5 +$as_echo "$ac_cv_search_sem_init" >&6; } +ac_res=$ac_cv_search_sem_init +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + USE_UNNAMED_POSIX_SEMAPHORES=1 +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5 +$as_echo_n "checking which semaphore API to use... " >&6; } if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c" + sematype="named POSIX" else if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c" + sematype="unnamed POSIX" else $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c" + sematype="System V" fi fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5 +$as_echo "$sematype" >&6; } else $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h @@ -14877,6 +15472,84 @@ $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c" fi +# Select random number source +# +# You can override this logic by setting the appropriate USE_*RANDOM flag to 1 +# in the template or configure command line. + +# If not selected manually, try to select a source automatically. +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 + if test x"$with_openssl" = x"yes" ; then + USE_OPENSSL_RANDOM=1 + elif test "$PORTNAME" = "win32" ; then + USE_WIN32_RANDOM=1 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5 +$as_echo_n "checking for /dev/urandom... " >&6; } +if ${ac_cv_file__dev_urandom+:} false; then : + $as_echo_n "(cached) " >&6 +else + test "$cross_compiling" = yes && + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 +if test -r "/dev/urandom"; then + ac_cv_file__dev_urandom=yes +else + ac_cv_file__dev_urandom=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5 +$as_echo "$ac_cv_file__dev_urandom" >&6; } +if test "x$ac_cv_file__dev_urandom" = xyes; then : + +fi + + + if test x"$ac_cv_file__dev_urandom" = x"yes" ; then + USE_DEV_URANDOM=1 + fi + fi +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5 +$as_echo_n "checking which random number source to use... " >&6; } +if test "$enable_strong_random" = yes ; then + if test x"$USE_OPENSSL_RANDOM" = x"1" ; then + +$as_echo "#define USE_OPENSSL_RANDOM 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5 +$as_echo "OpenSSL" >&6; } + elif test x"$USE_WIN32_RANDOM" = x"1" ; then + +$as_echo "#define USE_WIN32_RANDOM 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5 +$as_echo "Windows native" >&6; } + elif test x"$USE_DEV_URANDOM" = x"1" ; then + +$as_echo "#define USE_DEV_URANDOM 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5 +$as_echo "/dev/urandom" >&6; } + else + as_fn_error $? " +no source of strong random numbers was found +PostgreSQL can use OpenSSL or /dev/urandom as a source of random numbers, +for authentication protocols. You can use --disable-strong-random to use a +built-in pseudo random number generator, but that may be insecure." "$LINENO" 5 + fi + +$as_echo "#define HAVE_STRONG_RANDOM 1" >>confdefs.h + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: weak builtin PRNG" >&5 +$as_echo "weak builtin PRNG" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +*** Not using a strong random number source may be insecure." >&5 +$as_echo "$as_me: WARNING: +*** Not using a strong random number source may be insecure." >&2;} +fi + # If not set in template file, set bytes to use libc memset() if test x"$MEMSET_LOOP_LIMIT" = x"" ; then MEMSET_LOOP_LIMIT=1024 @@ -15316,48 +15989,6 @@ fi test -n "$NSGMLS" && break done -for ac_prog in openjade jade -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_JADE+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$JADE"; then - ac_cv_prog_JADE="$JADE" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_JADE="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -JADE=$ac_cv_prog_JADE -if test -n "$JADE"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JADE" >&5 -$as_echo "$JADE" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$JADE" && break -done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook V4.2" >&5 $as_echo_n "checking for DocBook V4.2... " >&6; } @@ -15394,93 +16025,6 @@ $as_echo "$pgac_cv_check_docbook" >&6; } have_docbook=$pgac_cv_check_docbook -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook stylesheets" >&5 -$as_echo_n "checking for DocBook stylesheets... " >&6; } -if ${pgac_cv_path_stylesheets+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DOCBOOKSTYLE"; then - pgac_cv_path_stylesheets=$DOCBOOKSTYLE -else - for pgac_prefix in /usr /usr/local /opt /sw; do - for pgac_infix in share lib; do - for pgac_postfix in \ - sgml/stylesheets/nwalsh-modular \ - sgml/stylesheets/docbook \ - sgml/stylesheets/dsssl/docbook \ - sgml/docbook-dsssl \ - sgml/docbook/dsssl/modular \ - sgml/docbook/stylesheet/dsssl/modular \ - sgml/docbook/dsssl-stylesheets \ - sgml/dsssl/docbook-dsssl-nwalsh - do - pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix - if test -r "$pgac_candidate/html/docbook.dsl" \ - && test -r "$pgac_candidate/print/docbook.dsl" - then - pgac_cv_path_stylesheets=$pgac_candidate - break 3 - fi - done - done - done -fi -fi - -DOCBOOKSTYLE=$pgac_cv_path_stylesheets - -if test -n "$DOCBOOKSTYLE"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOCBOOKSTYLE" >&5 -$as_echo "$DOCBOOKSTYLE" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -if test -n "$DOCBOOKSTYLE" -a -r "$DOCBOOKSTYLE/bin/collateindex.pl"; then - COLLATEINDEX="$DOCBOOKSTYLE/bin/collateindex.pl" - -else - # Extract the first word of "collateindex.pl", so it can be a program name with args. -set dummy collateindex.pl; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_COLLATEINDEX+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $COLLATEINDEX in - [\\/]* | ?:[\\/]*) - ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -COLLATEINDEX=$ac_cv_path_COLLATEINDEX -if test -n "$COLLATEINDEX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COLLATEINDEX" >&5 -$as_echo "$COLLATEINDEX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi for ac_prog in dbtoepub do # Extract the first word of "$ac_prog", so it can be a program name with args. @@ -15649,6 +16193,48 @@ fi test -n "$OSX" && break done +for ac_prog in fop +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_FOP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$FOP"; then + ac_cv_prog_FOP="$FOP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_FOP="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +FOP=$ac_cv_prog_FOP +if test -n "$FOP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5 +$as_echo "$FOP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$FOP" && break +done + # # Check for test tools @@ -16483,7 +17069,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by PostgreSQL $as_me 9.6beta4 (Postgres-XL 9.6alpha1), which was +This file was extended by PostgreSQL $as_me 10beta1 (Postgres-XL 10alpha1), which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16553,7 +17139,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -PostgreSQL config.status 9.6beta4 (Postgres-XL 9.6alpha1) +PostgreSQL config.status 10beta1 (Postgres-XL 10alpha1) configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" |