]> granicus.if.org Git - postgresql/blobdiff - configure
Fix oversight in CALL argument handling, and do some minor cleanup.
[postgresql] / configure
index 3c92cabb924de355566a8605f12e02f3d5605008..7dcca506f8b20f1a62b16246853861cd32e9a86a 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for PostgreSQL 10devel.
+# Generated by GNU Autoconf 2.69 for PostgreSQL 11devel.
 #
 # Report bugs to <pgsql-bugs@postgresql.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-2017, PostgreSQL Global Development Group
+# Copyright (c) 1996-2018, PostgreSQL Global Development Group
 ## -------------------- ##
 ## M4sh Initialization. ##
 ## -------------------- ##
@@ -582,8 +582,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='PostgreSQL'
 PACKAGE_TARNAME='postgresql'
-PACKAGE_VERSION='10devel'
-PACKAGE_STRING='PostgreSQL 10devel'
+PACKAGE_VERSION='11devel'
+PACKAGE_STRING='PostgreSQL 11devel'
 PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org'
 PACKAGE_URL=''
 
@@ -629,15 +629,11 @@ ac_subst_vars='LTLIBOBJS
 vpath_build
 PG_VERSION_NUM
 PROVE
-OSX
+FOP
 XSLTPROC
-XMLLINT
 DBTOEPUB
-COLLATEINDEX
-DOCBOOKSTYLE
 have_docbook
-JADE
-NSGMLS
+XMLLINT
 TCL_SHLIB_LD_LIBS
 TCL_SHARED_BUILD
 TCL_LIB_SPEC
@@ -670,6 +666,7 @@ python_version
 python_majorversion
 PYTHON
 perl_embed_ldflags
+perl_embed_ccflags
 perl_useshrplib
 perl_privlibexp
 perl_archlibexp
@@ -822,7 +819,6 @@ enable_tap_tests
 with_blocksize
 with_segsize
 with_wal_blocksize
-with_wal_segsize
 with_CC
 enable_depend
 enable_cassert
@@ -869,8 +865,7 @@ PKG_CONFIG_LIBDIR
 ICU_CFLAGS
 ICU_LIBS
 LDFLAGS_EX
-LDFLAGS_SL
-DOCBOOKSTYLE'
+LDFLAGS_SL'
 
 
 # Initialize some variables set by options.
@@ -1411,7 +1406,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 10devel to adapt to many kinds of systems.
+\`configure' configures PostgreSQL 11devel to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1476,7 +1471,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of PostgreSQL 10devel:";;
+     short | recursive ) echo "Configuration of PostgreSQL 11devel:";;
    esac
   cat <<\_ACEOF
 
@@ -1520,8 +1515,6 @@ Optional Packages:
   --with-segsize=SEGSIZE  set table segment size in GB [1]
   --with-wal-blocksize=BLOCKSIZE
                           set WAL block size in kB [8]
-  --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)
@@ -1568,8 +1561,6 @@ Some influential environment variables:
   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.
@@ -1637,14 +1628,14 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-PostgreSQL configure 10devel
+PostgreSQL configure 11devel
 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-2017, PostgreSQL Global Development Group
+Copyright (c) 1996-2018, PostgreSQL Global Development Group
 _ACEOF
   exit
 fi
@@ -2348,7 +2339,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 10devel, which was
+It was created by PostgreSQL $as_me 11devel, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3302,26 +3293,29 @@ if test "${enable_coverage+set}" = set; then :
   enableval=$enable_coverage;
   case $enableval in
     yes)
-      for ac_prog in gcov
+      if test -z "$GCOV"; then
+  for ac_prog in gcov
 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_GCOV+:} false; then :
+if ${ac_cv_path_GCOV+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$GCOV"; then
-  ac_cv_prog_GCOV="$GCOV" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  case $GCOV in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_GCOV="$GCOV" # 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_prog_GCOV="$ac_prog"
+    ac_cv_path_GCOV="$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
@@ -3329,9 +3323,10 @@ done
   done
 IFS=$as_save_IFS
 
+  ;;
+esac
 fi
-fi
-GCOV=$ac_cv_prog_GCOV
+GCOV=$ac_cv_path_GCOV
 if test -n "$GCOV"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
 $as_echo "$GCOV" >&6; }
@@ -3344,29 +3339,40 @@ fi
   test -n "$GCOV" && break
 done
 
+else
+  # Report the value of GCOV in configure's output in all cases.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
+$as_echo_n "checking for GCOV... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
+$as_echo "$GCOV" >&6; }
+fi
+
 if test -z "$GCOV"; then
   as_fn_error $? "gcov not found" "$LINENO" 5
 fi
-for ac_prog in lcov
+if test -z "$LCOV"; then
+  for ac_prog in lcov
 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_LCOV+:} false; then :
+if ${ac_cv_path_LCOV+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$LCOV"; then
-  ac_cv_prog_LCOV="$LCOV" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  case $LCOV in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_LCOV="$LCOV" # 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_prog_LCOV="$ac_prog"
+    ac_cv_path_LCOV="$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
@@ -3374,9 +3380,10 @@ done
   done
 IFS=$as_save_IFS
 
+  ;;
+esac
 fi
-fi
-LCOV=$ac_cv_prog_LCOV
+LCOV=$ac_cv_path_LCOV
 if test -n "$LCOV"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
 $as_echo "$LCOV" >&6; }
@@ -3389,29 +3396,40 @@ fi
   test -n "$LCOV" && break
 done
 
+else
+  # Report the value of LCOV in configure's output in all cases.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
+$as_echo_n "checking for LCOV... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
+$as_echo "$LCOV" >&6; }
+fi
+
 if test -z "$LCOV"; then
   as_fn_error $? "lcov not found" "$LINENO" 5
 fi
-for ac_prog in genhtml
+if test -z "$GENHTML"; then
+  for ac_prog in genhtml
 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_GENHTML+:} false; then :
+if ${ac_cv_path_GENHTML+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$GENHTML"; then
-  ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  case $GENHTML in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_GENHTML="$GENHTML" # 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_prog_GENHTML="$ac_prog"
+    ac_cv_path_GENHTML="$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
@@ -3419,9 +3437,10 @@ done
   done
 IFS=$as_save_IFS
 
+  ;;
+esac
 fi
-fi
-GENHTML=$ac_cv_prog_GENHTML
+GENHTML=$ac_cv_path_GENHTML
 if test -n "$GENHTML"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
 $as_echo "$GENHTML" >&6; }
@@ -3434,6 +3453,14 @@ fi
   test -n "$GENHTML" && break
 done
 
+else
+  # Report the value of GENHTML in configure's output in all cases.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
+$as_echo_n "checking for GENHTML... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
+$as_echo "$GENHTML" >&6; }
+fi
+
 if test -z "$GENHTML"; then
   as_fn_error $? "genhtml not found" "$LINENO" 5
 fi
@@ -3464,26 +3491,29 @@ if test "${enable_dtrace+set}" = set; then :
   enableval=$enable_dtrace;
   case $enableval in
     yes)
-      for ac_prog in dtrace
+      if test -z "$DTRACE"; then
+  for ac_prog in dtrace
 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_DTRACE+:} false; then :
+if ${ac_cv_path_DTRACE+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$DTRACE"; then
-  ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  case $DTRACE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_DTRACE="$DTRACE" # 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_prog_DTRACE="$ac_prog"
+    ac_cv_path_DTRACE="$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
@@ -3491,9 +3521,10 @@ done
   done
 IFS=$as_save_IFS
 
+  ;;
+esac
 fi
-fi
-DTRACE=$ac_cv_prog_DTRACE
+DTRACE=$ac_cv_path_DTRACE
 if test -n "$DTRACE"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
 $as_echo "$DTRACE" >&6; }
@@ -3506,6 +3537,14 @@ fi
   test -n "$DTRACE" && break
 done
 
+else
+  # Report the value of DTRACE in configure's output in all cases.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
+$as_echo_n "checking for DTRACE... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
+$as_echo "$DTRACE" >&6; }
+fi
+
 if test -z "$DTRACE"; then
   as_fn_error $? "dtrace not found" "$LINENO" 5
 fi
@@ -3689,53 +3728,6 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
-#
-# WAL segment size
-#
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL segment size" >&5
-$as_echo_n "checking for WAL segment size... " >&6; }
-
-
-
-# Check whether --with-wal-segsize was given.
-if test "${with_wal_segsize+set}" = set; then :
-  withval=$with_wal_segsize;
-  case $withval in
-    yes)
-      as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
-      ;;
-    no)
-      as_fn_error $? "argument required for --with-wal-segsize option" "$LINENO" 5
-      ;;
-    *)
-      wal_segsize=$withval
-      ;;
-  esac
-
-else
-  wal_segsize=16
-fi
-
-
-case ${wal_segsize} in
-  1) ;;
-  2) ;;
-  4) ;;
-  8) ;;
- 16) ;;
- 32) ;;
- 64) ;;
-  *) as_fn_error $? "Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
-esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_segsize}MB" >&5
-$as_echo "${wal_segsize}MB" >&6; }
-
-
-cat >>confdefs.h <<_ACEOF
-#define XLOG_SEG_SIZE (${wal_segsize} * 1024 * 1024)
-_ACEOF
-
-
 #
 # C compiler
 #
@@ -6254,26 +6246,29 @@ fi
 
 
 if test "$with_libxml" = yes ; then
+  if test -z "$XML2_CONFIG"; then
   for ac_prog in xml2-config
 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_XML2_CONFIG+:} false; then :
+if ${ac_cv_path_XML2_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$XML2_CONFIG"; then
-  ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  case $XML2_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_XML2_CONFIG="$XML2_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_prog_XML2_CONFIG="$ac_prog"
+    ac_cv_path_XML2_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
@@ -6281,9 +6276,10 @@ done
   done
 IFS=$as_save_IFS
 
+  ;;
+esac
 fi
-fi
-XML2_CONFIG=$ac_cv_prog_XML2_CONFIG
+XML2_CONFIG=$ac_cv_path_XML2_CONFIG
 if test -n "$XML2_CONFIG"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
 $as_echo "$XML2_CONFIG" >&6; }
@@ -6296,6 +6292,14 @@ fi
   test -n "$XML2_CONFIG" && break
 done
 
+else
+  # Report the value of XML2_CONFIG in configure's output in all cases.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
+$as_echo_n "checking for XML2_CONFIG... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
+$as_echo "$XML2_CONFIG" >&6; }
+fi
+
   if test -n "$XML2_CONFIG"; then
     for pgac_option in `$XML2_CONFIG --cflags`; do
       case $pgac_option in
@@ -7359,8 +7363,11 @@ case $INSTALL in
 esac
 
 
-# Extract the first word of "tar", so it can be a program name with args.
-set dummy tar; ac_word=$2
+if test -z "$TAR"; then
+  for ac_prog in tar
+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_path_TAR+:} false; then :
@@ -7399,6 +7406,17 @@ $as_echo "no" >&6; }
 fi
 
 
+  test -n "$TAR" && break
+done
+
+else
+  # Report the value of TAR in configure's output in all cases.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
+$as_echo_n "checking for TAR... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
+$as_echo "$TAR" >&6; }
+fi
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
 $as_echo_n "checking whether ln -s works... " >&6; }
 LN_S=$as_ln_s
@@ -7501,7 +7519,6 @@ case $MKDIR_P in
   *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
 esac
 
-# Let the user override the search
 if test -z "$BISON"; then
   for ac_prog in bison
 do
@@ -7548,8 +7565,15 @@ fi
   test -n "$BISON" && break
 done
 
+else
+  # Report the value of BISON in configure's output in all cases.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
+$as_echo_n "checking for BISON... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
+$as_echo "$BISON" >&6; }
 fi
 
+
 if test "$BISON"; then
   pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
   { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
@@ -7588,7 +7612,7 @@ $as_echo "$as_me: WARNING:
 *** PostgreSQL then you do not need to worry about this, because the Bison
 *** output is pre-generated.)" >&2;}
 fi
-# We don't need AC_SUBST(BISON) because AC_PATH_PROG did it
+# We don't need AC_SUBST(BISON) because PGAC_PATH_PROGS did it
 
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
@@ -7664,10 +7688,11 @@ fi
 
 
 
-# Let the user override the search
 if test -z "$PERL"; then
-  # Extract the first word of "perl", so it can be a program name with args.
-set dummy perl; ac_word=$2
+  for ac_prog in perl
+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_path_PERL+:} false; then :
@@ -7706,8 +7731,18 @@ $as_echo "no" >&6; }
 fi
 
 
+  test -n "$PERL" && break
+done
+
+else
+  # Report the value of PERL in configure's output in all cases.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
+$as_echo_n "checking for PERL... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
+$as_echo "$PERL" >&6; }
 fi
 
+
 if test "$PERL"; then
   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'`
   { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
@@ -7768,15 +7803,34 @@ documentation for details.  Use --without-perl to disable building
 PL/Perl." "$LINENO" 5
   fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
+$as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
+perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
+$as_echo "$perl_ccflags" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
+$as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
+perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
+$as_echo "$perl_embed_ccflags" >&6; }
+
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
 if test "$PORTNAME" = "win32" ; then
-perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
-test -e "$perl_archlibexp/CORE/$perl_lib.lib" && perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
+       perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
+       if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
+               perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
+       else
+               perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
+               if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
+                       perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
+               fi
+       fi
 else
-pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
-pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
-perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
+       pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
+       pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
+       perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
 fi
 if test -z "$perl_embed_ldflags" ; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -7792,8 +7846,11 @@ fi
 fi
 
 if test "$with_python" = yes; then
-  # Extract the first word of "python", so it can be a program name with args.
-set dummy python; ac_word=$2
+  if test -z "$PYTHON"; then
+  for ac_prog in python
+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_path_PYTHON+:} false; then :
@@ -7832,6 +7889,17 @@ $as_echo "no" >&6; }
 fi
 
 
+  test -n "$PYTHON" && break
+done
+
+else
+  # Report the value of PYTHON in configure's output in all cases.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
+$as_echo_n "checking for PYTHON... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
+$as_echo "$PYTHON" >&6; }
+fi
+
 if test x"$PYTHON" = x""; then
   as_fn_error $? "Python not found" "$LINENO" 5
 fi
@@ -7970,8 +8038,11 @@ $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
 fi
 
 if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
-  # Extract the first word of "zic", so it can be a program name with args.
-set dummy zic; ac_word=$2
+  if test -z "$ZIC"; then
+  for ac_prog in zic
+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_path_ZIC+:} false; then :
@@ -8010,6 +8081,17 @@ $as_echo "no" >&6; }
 fi
 
 
+  test -n "$ZIC" && break
+done
+
+else
+  # Report the value of ZIC in configure's output in all cases.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
+$as_echo_n "checking for ZIC... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
+$as_echo "$ZIC" >&6; }
+fi
+
   if test -z "$ZIC"; then
     as_fn_error $? "
 When cross-compiling, either use the option --with-system-tzdata to use
@@ -10043,12 +10125,13 @@ else
 fi
 
   fi
-  for ac_func in SSL_get_current_compression
+  for ac_func in SSL_get_current_compression X509_get_signature_nid
 do :
-  ac_fn_c_check_func "$LINENO" "SSL_get_current_compression" "ac_cv_func_SSL_get_current_compression"
-if test "x$ac_cv_func_SSL_get_current_compression" = xyes; then :
+  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 HAVE_SSL_GET_CURRENT_COMPRESSION 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 fi
     else
       LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
     fi
+    for ac_func in ldap_initialize
+do :
+  ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
+if test "x$ac_cv_func_ldap_initialize" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LDAP_INITIALIZE 1
+_ACEOF
+
+fi
+done
+
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
@@ -10601,7 +10695,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 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
+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"
@@ -11704,7 +11798,9 @@ $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
 
   if test "$pgac_cv_c_typeof" != typeof; then
 
-$as_echo "#define typeof \$pgac_cv_c_typeof" >>confdefs.h
+cat >>confdefs.h <<_ACEOF
+#define typeof $pgac_cv_c_typeof
+_ACEOF
 
   fi
 fi
@@ -11737,6 +11833,30 @@ if test x"$pgac_cv__types_compatible" = xyes ; then
 
 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
+$as_echo_n "checking for __builtin_bswap16... " >&6; }
+if ${pgac_cv__builtin_bswap16+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+static unsigned long int x = __builtin_bswap16(0xaabb);
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  pgac_cv__builtin_bswap16=yes
+else
+  pgac_cv__builtin_bswap16=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
+$as_echo "$pgac_cv__builtin_bswap16" >&6; }
+if test x"$pgac_cv__builtin_bswap16" = xyes ; then
+
+$as_echo "#define HAVE__BUILTIN_BSWAP16 1" >>confdefs.h
+
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
 $as_echo_n "checking for __builtin_bswap32... " >&6; }
@@ -11793,7 +11913,10 @@ if ${pgac_cv__builtin_constant_p+:} false; then :
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-static int x; static int y[__builtin_constant_p(x) ? x : 1];
+static int x;
+  static int y[__builtin_constant_p(x) ? x : 1];
+  static int z[__builtin_constant_p("string literal") ? 1 : x];
+
 
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
@@ -12359,6 +12482,71 @@ $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
 
 fi
 
+# MSVC doesn't cope well with defining restrict to __restrict, the
+# spelling it understands, because it conflicts with
+# __declspec(restrict). Therefore we define pg_restrict to the
+# appropriate definition, which presumably won't conflict.
+#
+# Allow platforms with buggy compilers to force restrict to not be
+# used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
+# template.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
+$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
+if ${ac_cv_c_restrict+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_c_restrict=no
+   # The order here caters to the fact that C++ does not require restrict.
+   for ac_kw in __restrict __restrict__ _Restrict restrict; do
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+typedef int * int_ptr;
+       int foo (int_ptr $ac_kw ip) {
+       return ip[0];
+       }
+int
+main ()
+{
+int s[1];
+       int * $ac_kw t = s;
+       t[0] = 0;
+       return foo(t)
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_restrict=$ac_kw
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     test "$ac_cv_c_restrict" != no && break
+   done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
+$as_echo "$ac_cv_c_restrict" >&6; }
+
+ case $ac_cv_c_restrict in
+   restrict) ;;
+   no) $as_echo "#define restrict /**/" >>confdefs.h
+ ;;
+   *)  cat >>confdefs.h <<_ACEOF
+#define restrict $ac_cv_c_restrict
+_ACEOF
+ ;;
+ esac
+
+if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
+  pg_restrict=""
+else
+  pg_restrict="$ac_cv_c_restrict"
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define pg_restrict $pg_restrict
+_ACEOF
+
+
 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
 #include <sys/param.h>
 #ifdef HAVE_SYS_UCRED_H
@@ -12891,7 +13079,7 @@ fi
 LIBS_including_readline="$LIBS"
 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
 
-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
+for ac_func in cbrt clock_gettime dlopen fdatasync getifaddrs getpeerucred getrlimit mbstowcs_l memmove poll posix_fallocate pstat pthread_is_threaded_np readlink setproctitle setsid shm_open symlink sync_file_range utime utimes wcstombs_l
 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
 #define HAVE_DECL_STRLCPY $ac_have_decl
 _ACEOF
+ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strnlen" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRNLEN $ac_have_decl
+_ACEOF
 
 # 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>
@@ -13425,6 +13623,19 @@ esac
 
 fi
 
+ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
+if test "x$ac_cv_func_strnlen" = xyes; then :
+  $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
+
+else
+  case " $LIBOBJS " in
+  *" strnlen.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
+ ;;
+esac
+
+fi
+
 
 
 case $host_os in
@@ -13777,47 +13988,20 @@ 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>
+  CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
+
+  # Verify we have ICU's header files
+  ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
+if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
 
-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
+  as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
 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
+
+  CPPFLAGS=$ac_save_CPPFLAGS
 fi
 
 # Lastly, restore full LIBS list and check for readline/libedit symbols
@@ -14148,28 +14332,10 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
-
-if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#define INT64CONST(x)  x##LL
-long long int foo = INT64CONST(0x1234567890123456);
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-$as_echo "#define HAVE_LL_CONSTANTS 1" >>confdefs.h
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-# If we found "long int" is 64 bits, assume snprintf handles it.  If
-# we found we need to use "long long int", better check.  We cope with
-# snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
-# work, fall back to our own snprintf emulation (which we know uses %lld).
+# If we found "long int" is 64 bits, assume snprintf handles it.  If
+# we found we need to use "long long int", better check.  We cope with
+# snprintfs that use %lld, %qd, or %I64d as the format.  If none of these
+# work, fall back to our own snprintf emulation (which we know uses %lld).
 
 if test "$HAVE_LONG_LONG_INT_64" = yes ; then
   if test $pgac_need_repl_snprintf = no; then
@@ -14321,6 +14487,45 @@ esac
 
 fi
 
+# has to be down here, rather than with the other builtins, because
+# the test uses PG_INT64_TYPE.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
+$as_echo_n "checking for __builtin_mul_overflow... " >&6; }
+if ${pgac_cv__builtin_op_overflow+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+PG_INT64_TYPE a = 1;
+PG_INT64_TYPE b = 1;
+PG_INT64_TYPE result;
+int oflo;
+
+int
+main ()
+{
+oflo = __builtin_mul_overflow(a, b, &result);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  pgac_cv__builtin_op_overflow=yes
+else
+  pgac_cv__builtin_op_overflow=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
+$as_echo "$pgac_cv__builtin_op_overflow" >&6; }
+if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
+
+$as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
+
+fi
+
 # Check size of void *, size_t (enables tweaks for > 32bit address space)
 # The cast to long int works around a bug in the HP C Compiler
 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
@@ -14718,7 +14923,10 @@ _ACEOF
 
 # Compute maximum alignment of any basic type.
 # We assume long's alignment is at least as strong as char, short, or int;
-# but we must check long long (if it exists) and double.
+# but we must check long long (if it is being used for int64) and double.
+# Note that we intentionally do not consider any types wider than 64 bits,
+# as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
+# for disk and memory space.
 
 MAX_ALIGNOF=$ac_cv_alignof_long
 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
@@ -14778,7 +14986,7 @@ _ACEOF
 fi
 
 
-# Check for extensions offering the integer scalar type __int128.
+# Some compilers offer a 128-bit integer scalar type.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
 $as_echo_n "checking for __int128... " >&6; }
 if ${pgac_cv__128bit_int+:} false; then :
@@ -14788,12 +14996,15 @@ else
 /* end confdefs.h.  */
 
 /*
+ * We don't actually run this test, just link it to verify that any support
+ * functions needed for __int128 are present.
+ *
  * These are globals to discourage the compiler from folding all the
  * arithmetic tests down to compile-time constants.  We do not have
- * convenient support for 64bit literals at this point...
+ * convenient support for 128bit literals at this point...
  */
 __int128 a = 48828125;
-__int128 b = 97656255;
+__int128 b = 97656250;
 
 int
 main ()
@@ -14802,13 +15013,12 @@ main ()
 __int128 c,d;
 a = (a << 12) + 1; /* 200000000001 */
 b = (b << 12) + 5; /* 400000000005 */
-/* use the most relevant arithmetic ops */
+/* try the most relevant arithmetic ops */
 c = a * b;
 d = (c + b) / b;
-/* return different values, to prevent optimizations */
+/* must use the results, else compiler may optimize arithmetic away */
 if (d != a+1)
-  return 0;
-return 1;
+  return 1;
 
   ;
   return 0;
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
 $as_echo "$pgac_cv__128bit_int" >&6; }
 if test x"$pgac_cv__128bit_int" = xyes ; then
+  # Use of non-default alignment with __int128 tickles bugs in some compilers.
+  # If not cross-compiling, we can test for bugs and disable use of __int128
+  # with buggy compilers.  If cross-compiling, hope for the best.
+  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
+$as_echo_n "checking for __int128 alignment bug... " >&6; }
+if ${pgac_cv__128bit_int_bug+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  pgac_cv__128bit_int_bug="assuming ok"
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* This must match the corresponding code in c.h: */
+#if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
+#define pg_attribute_aligned(a) __attribute__((aligned(a)))
+#endif
+typedef __int128 int128a
+#if defined(pg_attribute_aligned)
+pg_attribute_aligned(8)
+#endif
+;
+int128a holder;
+void pass_by_val(void *buffer, int128a par) { holder = par; }
+
+int
+main ()
+{
+
+long int i64 = 97656225L << 12;
+int128a q;
+pass_by_val(main, (int128a) i64);
+q = (int128a) i64;
+if (q != holder)
+  return 1;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  pgac_cv__128bit_int_bug=ok
+else
+  pgac_cv__128bit_int_bug=broken
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
+$as_echo "$pgac_cv__128bit_int_bug" >&6; }
+  if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
 
 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
 
+    # The cast to long int works around a bug in the HP C Compiler,
+# see AC_CHECK_SIZEOF for more information.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
+$as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
+if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE"        "$ac_includes_default
+#ifndef offsetof
+# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
+#endif
+typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
+
+else
+  if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
+See \`config.log' for more details" "$LINENO" 5; }
+   else
+     ac_cv_alignof_PG_INT128_TYPE=0
+   fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
+$as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
+_ACEOF
+
+
+  fi
 fi
 
 # Check for various atomic operations now that we have checked how to declare
@@ -15585,26 +15886,29 @@ else
 fi
 
 
+  if test -z "$MSGFMT"; then
   for ac_prog in msgfmt
 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_MSGFMT+:} false; then :
+if ${ac_cv_path_MSGFMT+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$MSGFMT"; then
-  ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  case $MSGFMT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_MSGFMT="$MSGFMT" # 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_prog_MSGFMT="$ac_prog"
+    ac_cv_path_MSGFMT="$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
@@ -15612,9 +15916,10 @@ done
   done
 IFS=$as_save_IFS
 
+  ;;
+esac
 fi
-fi
-MSGFMT=$ac_cv_prog_MSGFMT
+MSGFMT=$ac_cv_path_MSGFMT
 if test -n "$MSGFMT"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
 $as_echo "$MSGFMT" >&6; }
   test -n "$MSGFMT" && break
 done
 
+else
+  # Report the value of MSGFMT in configure's output in all cases.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
+$as_echo_n "checking for MSGFMT... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
+$as_echo "$MSGFMT" >&6; }
+fi
+
   if test -z "$MSGFMT"; then
     as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
   fi
 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
   MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
 
+  if test -z "$MSGMERGE"; then
   for ac_prog in msgmerge
 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_MSGMERGE+:} false; then :
+if ${ac_cv_path_MSGMERGE+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$MSGMERGE"; then
-  ac_cv_prog_MSGMERGE="$MSGMERGE" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  case $MSGMERGE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_MSGMERGE="$MSGMERGE" # 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_prog_MSGMERGE="$ac_prog"
+    ac_cv_path_MSGMERGE="$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
@@ -15670,9 +15986,10 @@ done
   done
 IFS=$as_save_IFS
 
+  ;;
+esac
 fi
-fi
-MSGMERGE=$ac_cv_prog_MSGMERGE
+MSGMERGE=$ac_cv_path_MSGMERGE
 if test -n "$MSGMERGE"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
 $as_echo "$MSGMERGE" >&6; }
   test -n "$MSGMERGE" && break
 done
 
+else
+  # Report the value of MSGMERGE in configure's output in all cases.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
+$as_echo_n "checking for MSGMERGE... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
+$as_echo "$MSGMERGE" >&6; }
+fi
+
+  if test -z "$XGETTEXT"; then
   for ac_prog in xgettext
 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_XGETTEXT+:} false; then :
+if ${ac_cv_path_XGETTEXT+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$XGETTEXT"; then
-  ac_cv_prog_XGETTEXT="$XGETTEXT" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  case $XGETTEXT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_XGETTEXT="$XGETTEXT" # 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_prog_XGETTEXT="$ac_prog"
+    ac_cv_path_XGETTEXT="$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
@@ -15712,9 +16040,10 @@ done
   done
 IFS=$as_save_IFS
 
+  ;;
+esac
 fi
-fi
-XGETTEXT=$ac_cv_prog_XGETTEXT
+XGETTEXT=$ac_cv_path_XGETTEXT
 if test -n "$XGETTEXT"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
 $as_echo "$XGETTEXT" >&6; }
   test -n "$XGETTEXT" && break
 done
 
+else
+  # Report the value of XGETTEXT in configure's output in all cases.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
+$as_echo_n "checking for XGETTEXT... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
+$as_echo "$XGETTEXT" >&6; }
+fi
+
 
 fi
 
 # Check for Tcl configuration script tclConfig.sh
 if test "$with_tcl" = yes; then
-    for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
+    if test -z "$TCLSH"; then
+  for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
   test -n "$TCLSH" && break
 done
 
+else
+  # Report the value of TCLSH in configure's output in all cases.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
+$as_echo_n "checking for TCLSH... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
+$as_echo "$TCLSH" >&6; }
+fi
+
 if test x"$TCLSH" = x""; then
   as_fn_error $? "Tcl shell not found" "$LINENO" 5
 fi
 #
 # Check for DocBook and tools
 #
-for ac_prog in onsgmls nsgmls
+if test -z "$XMLLINT"; then
+  for ac_prog in xmllint
 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_NSGMLS+:} false; then :
+if ${ac_cv_path_XMLLINT+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$NSGMLS"; then
-  ac_cv_prog_NSGMLS="$NSGMLS" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  case $XMLLINT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_XMLLINT="$XMLLINT" # 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_prog_NSGMLS="$ac_prog"
+    ac_cv_path_XMLLINT="$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
@@ -15930,71 +16279,38 @@ done
   done
 IFS=$as_save_IFS
 
+  ;;
+esac
 fi
-fi
-NSGMLS=$ac_cv_prog_NSGMLS
-if test -n "$NSGMLS"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSGMLS" >&5
-$as_echo "$NSGMLS" >&6; }
+XMLLINT=$ac_cv_path_XMLLINT
+if test -n "$XMLLINT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
+$as_echo "$XMLLINT" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&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
+  test -n "$XMLLINT" && break
 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; }
+  # Report the value of XMLLINT in configure's output in all cases.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
+$as_echo_n "checking for XMLLINT... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
+$as_echo "$XMLLINT" >&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; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DocBook XML V4.2" >&5
+$as_echo_n "checking for DocBook XML V4.2... " >&6; }
 if ${pgac_cv_check_docbook+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  cat >conftest.sgml <<EOF
-<!doctype book PUBLIC "-//OASIS//DTD DocBook V4.2//EN">
+  cat >conftest.xml <<EOF
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 <book>
  <title>test</title>
  <chapter>
@@ -16009,13 +16325,13 @@ EOF
 
 pgac_cv_check_docbook=no
 
-if test -n "$NSGMLS"; then
-  $NSGMLS -s conftest.sgml 1>&5 2>&1
+if test -n "$XMLLINT"; then
+  $XMLLINT --noout --valid conftest.xml 1>&5 2>&1
   if test $? -eq 0; then
     pgac_cv_check_docbook=yes
   fi
 fi
-rm -f conftest.sgml
+rm -f conftest.xml
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_docbook" >&5
 $as_echo "$pgac_cv_check_docbook" >&6; }
@@ -16023,62 +16339,19 @@ $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
+if test -z "$DBTOEPUB"; then
+  for ac_prog in dbtoepub
+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_path_COLLATEINDEX+:} false; then :
+if ${ac_cv_path_DBTOEPUB+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  case $COLLATEINDEX in
+  case $DBTOEPUB in
   [\\/]* | ?:[\\/]*)
-  ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
+  ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
   ;;
   *)
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -16088,7 +16361,7 @@ do
   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"
+    ac_cv_path_DBTOEPUB="$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
@@ -16099,47 +16372,7 @@ 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.
-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_DBTOEPUB+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$DBTOEPUB"; then
-  ac_cv_prog_DBTOEPUB="$DBTOEPUB" # 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_DBTOEPUB="$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
-DBTOEPUB=$ac_cv_prog_DBTOEPUB
+DBTOEPUB=$ac_cv_path_DBTOEPUB
 if test -n "$DBTOEPUB"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
 $as_echo "$DBTOEPUB" >&6; }
   test -n "$DBTOEPUB" && break
 done
 
-for ac_prog in xmllint
+else
+  # Report the value of DBTOEPUB in configure's output in all cases.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
+$as_echo_n "checking for DBTOEPUB... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
+$as_echo "$DBTOEPUB" >&6; }
+fi
+
+if test -z "$XSLTPROC"; then
+  for ac_prog in xsltproc
 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_XMLLINT+:} false; then :
+if ${ac_cv_path_XSLTPROC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$XMLLINT"; then
-  ac_cv_prog_XMLLINT="$XMLLINT" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  case $XSLTPROC in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_XSLTPROC="$XSLTPROC" # 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_prog_XMLLINT="$ac_prog"
+    ac_cv_path_XSLTPROC="$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
@@ -16179,41 +16423,53 @@ done
   done
 IFS=$as_save_IFS
 
+  ;;
+esac
 fi
-fi
-XMLLINT=$ac_cv_prog_XMLLINT
-if test -n "$XMLLINT"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
-$as_echo "$XMLLINT" >&6; }
+XSLTPROC=$ac_cv_path_XSLTPROC
+if test -n "$XSLTPROC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
+$as_echo "$XSLTPROC" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
 
-  test -n "$XMLLINT" && break
+  test -n "$XSLTPROC" && break
 done
 
-for ac_prog in xsltproc
+else
+  # Report the value of XSLTPROC in configure's output in all cases.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
+$as_echo_n "checking for XSLTPROC... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
+$as_echo "$XSLTPROC" >&6; }
+fi
+
+if test -z "$FOP"; then
+  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_XSLTPROC+:} false; then :
+if ${ac_cv_path_FOP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$XSLTPROC"; then
-  ac_cv_prog_XSLTPROC="$XSLTPROC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  case $FOP in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_FOP="$FOP" # 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_prog_XSLTPROC="$ac_prog"
+    ac_cv_path_FOP="$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
@@ -16221,32 +16477,57 @@ done
   done
 IFS=$as_save_IFS
 
+  ;;
+esac
 fi
-fi
-XSLTPROC=$ac_cv_prog_XSLTPROC
-if test -n "$XSLTPROC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
-$as_echo "$XSLTPROC" >&6; }
+FOP=$ac_cv_path_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 "$XSLTPROC" && break
+  test -n "$FOP" && break
 done
 
-for ac_prog in osx sgml2xml sx
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
+else
+  # Report the value of FOP in configure's output in all cases.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
+$as_echo_n "checking for FOP... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
+$as_echo "$FOP" >&6; }
+fi
+
+
+#
+# Check for test tools
+#
+if test "$enable_tap_tests" = yes; then
+  # Check for necessary modules, unless user has specified the "prove" to use;
+  # in that case it's her responsibility to have a working configuration.
+  # (prove might be part of a different Perl installation than perl, eg on
+  # MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)
+  if test -z "$PROVE"; then
+
+
+
+
+
+
+# Make sure we have perl
+if test -z "$PERL"; then
+# Extract the first word of "perl", so it can be a program name with args.
+set dummy perl; 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_OSX+:} false; then :
+if ${ac_cv_prog_PERL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$OSX"; then
-  ac_cv_prog_OSX="$OSX" # Let the user override the test.
+  if test -n "$PERL"; then
+  ac_cv_prog_PERL="$PERL" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -16255,7 +16536,7 @@ do
   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_OSX="$ac_prog"
+    ac_cv_prog_PERL="perl"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -16265,44 +16546,73 @@ IFS=$as_save_IFS
 
 fi
 fi
-OSX=$ac_cv_prog_OSX
-if test -n "$OSX"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OSX" >&5
-$as_echo "$OSX" >&6; }
+PERL=$ac_cv_prog_PERL
+if test -n "$PERL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
+$as_echo "$PERL" >&6; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
 
 
-  test -n "$OSX" && break
-done
+fi
 
+if test "x$PERL" != x; then
+  ax_perl_modules_failed=0
+  for ax_perl_module in 'IPC::Run' ; do
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl module $ax_perl_module" >&5
+$as_echo_n "checking for perl module $ax_perl_module... " >&6; }
 
-#
-# Check for test tools
-#
-if test "$enable_tap_tests" = yes; then
+    # Would be nice to log result here, but can't rely on autoconf internals
+    $PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1
+    if test $? -ne 0; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; };
+      ax_perl_modules_failed=1
+   else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; };
+    fi
+  done
+
+  # Run optional shell commands
+  if test "$ax_perl_modules_failed" = 0; then
+    :
+
+  else
+    :
+    as_fn_error $? "Perl module IPC::Run is required to run TAP tests" "$LINENO" 5
+  fi
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find perl" >&5
+$as_echo "$as_me: WARNING: could not find perl" >&2;}
+fi
+  fi
+  # Now make sure we know where prove is
+  if test -z "$PROVE"; then
   for ac_prog in prove
 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_PROVE+:} false; then :
+if ${ac_cv_path_PROVE+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test -n "$PROVE"; then
-  ac_cv_prog_PROVE="$PROVE" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  case $PROVE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PROVE="$PROVE" # 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_prog_PROVE="$ac_prog"
+    ac_cv_path_PROVE="$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
@@ -16310,9 +16620,10 @@ done
   done
 IFS=$as_save_IFS
 
+  ;;
+esac
 fi
-fi
-PROVE=$ac_cv_prog_PROVE
+PROVE=$ac_cv_path_PROVE
 if test -n "$PROVE"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
 $as_echo "$PROVE" >&6; }
   test -n "$PROVE" && break
 done
 
+else
+  # Report the value of PROVE in configure's output in all cases.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
+$as_echo_n "checking for PROVE... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
+$as_echo "$PROVE" >&6; }
+fi
+
   if test -z "$PROVE"; then
     as_fn_error $? "prove not found" "$LINENO" 5
   fi
-  if test -z "$PERL"; then
-    as_fn_error $? "Perl not found" "$LINENO" 5
-  fi
 fi
 
 # Thread testing
@@ -16538,7 +16854,7 @@ _ACEOF
 # awk -F is a regex on some platforms, and not on others, so make "." a tab
 PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
 tr '.' '       ' |
-$AWK '{printf "%d%02d%02d", $1, $2, (NF >= 3) ? $3 : 0}'`"
+$AWK '{printf "%d%04d", $1, $2}'`"
 
 cat >>confdefs.h <<_ACEOF
 #define PG_VERSION_NUM $PG_VERSION_NUM
@@ -17105,7 +17421,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 10devel, which was
+This file was extended by PostgreSQL $as_me 11devel, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -17175,7 +17491,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 10devel
+PostgreSQL config.status 11devel
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"