# 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. ##
## -------------------- ##
STRIP_STATIC_LIB
STRIP
RANLIB
-ld_R_works
with_gnu_ld
LD
LDFLAGS_SL
LCOV
GCOV
enable_debug
+enable_strong_random
enable_rpath
default_port
WANTED_LANGUAGES
enable_rpath
enable_spinlocks
enable_atomics
+enable_strong_random
enable_debug
enable_profiling
enable_coverage
--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
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
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
#
-# 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.
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
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; }
#
+#
+# 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
#
-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
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='';;
$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';;
{ $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 "
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
- python_libspec="-L${python_libdir} -lpython${python_ldversion}"
+ # 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
+ # 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'))))"`
-
- # 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
- # macOS does supply a .dylib even though Py_ENABLE_SHARED does
- # not get set. The file detection logic below doesn't succeed
- # on older macOS 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
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; }
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. */
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"
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"
# 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
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