]> granicus.if.org Git - postgresql/blobdiff - configure
Create a selectivity estimation function for the text search @@ operator.
[postgresql] / configure
index d4d20f0eca8dee2fcea9d3af0c3499564403e103..b214acac897b79133c7f17974d6fe2bdd9bc4399 100755 (executable)
--- a/configure
+++ b/configure
@@ -672,6 +672,10 @@ enable_shared
 enable_rpath
 enable_debug
 enable_profiling
+GCOV
+LCOV
+GENHTML
+enable_coverage
 DTRACE
 DTRACEFLAGS
 enable_dtrace
@@ -718,8 +722,8 @@ STRIP_SHARED_LIB
 TAR
 LN_S
 AWK
-YACC
-YFLAGS
+BISON
+BISONFLAGS
 FLEX
 FLEXFLAGS
 PERL
@@ -1356,8 +1360,8 @@ Optional Features:
   --disable-spinlocks     do not use spinlocks
   --enable-debug          build with debugging symbols (-g)
   --enable-profiling      build with profiling enabled
+  --enable-coverage       build with coverage testing instrumentation
   --enable-dtrace         build with DTrace support
-  --disable-segmented-files disable data file segmentation (requires largefile support)
   --enable-depend         turn on automatic dependency tracking
   --enable-cassert        enable assertion checks (for debugging)
   --enable-thread-safety  make client libraries thread-safe
@@ -1373,7 +1377,11 @@ Optional Packages:
   --with-includes=DIRS    look for additional header files in DIRS
   --with-libraries=DIRS   look for additional libraries in DIRS
   --with-libs=DIRS        alternative spelling of --with-libraries
-  --with-pgport=PORTNUM   change default port number [5432]
+  --with-pgport=PORTNUM   set default port number [5432]
+  --with-blocksize=BLOCKSIZE  set table block size in kB [8]
+  --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-tcl              build Tcl modules (PL/Tcl)
   --with-tclconfig=DIR    tclConfig.sh is in DIR
   --with-perl             build Perl modules (PL/Perl)
@@ -2465,6 +2473,177 @@ fi
 
 
 
+#
+# --enable-coverage enables generation of code coverage metrics with gcov
+#
+
+pgac_args="$pgac_args enable_coverage"
+
+# Check whether --enable-coverage was given.
+if test "${enable_coverage+set}" = set; then
+  enableval=$enable_coverage;
+  case $enableval in
+    yes)
+      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
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_GCOV+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_GCOV="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+GCOV=$ac_cv_prog_GCOV
+if test -n "$GCOV"; then
+  { echo "$as_me:$LINENO: result: $GCOV" >&5
+echo "${ECHO_T}$GCOV" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$GCOV" && break
+done
+
+if test -z "$GCOV"; then
+  { { echo "$as_me:$LINENO: error: gcov not found" >&5
+echo "$as_me: error: gcov not found" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+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
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_LCOV+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_LCOV="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+LCOV=$ac_cv_prog_LCOV
+if test -n "$LCOV"; then
+  { echo "$as_me:$LINENO: result: $LCOV" >&5
+echo "${ECHO_T}$LCOV" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$LCOV" && break
+done
+
+if test -z "$LCOV"; then
+  { { echo "$as_me:$LINENO: error: lcov not found" >&5
+echo "$as_me: error: lcov not found" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+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
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_GENHTML+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&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
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_GENHTML="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+GENHTML=$ac_cv_prog_GENHTML
+if test -n "$GENHTML"; then
+  { echo "$as_me:$LINENO: result: $GENHTML" >&5
+echo "${ECHO_T}$GENHTML" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$GENHTML" && break
+done
+
+if test -z "$GENHTML"; then
+  { { echo "$as_me:$LINENO: error: genhtml not found" >&5
+echo "$as_me: error: genhtml not found" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+      ;;
+    no)
+      :
+      ;;
+    *)
+      { { echo "$as_me:$LINENO: error: no argument expected for --enable-coverage option" >&5
+echo "$as_me: error: no argument expected for --enable-coverage option" >&2;}
+   { (exit 1); exit 1; }; }
+      ;;
+  esac
+
+else
+  enable_coverage=no
+
+fi
+
+
+
+
 #
 # DTrace
 #
 
 
 #
-# Data file segmentation
+# Block size
 #
+{ echo "$as_me:$LINENO: checking for block size" >&5
+echo $ECHO_N "checking for block size... $ECHO_C" >&6; }
 
-pgac_args="$pgac_args enable_segmented_files"
+pgac_args="$pgac_args with_blocksize"
 
-# Check whether --enable-segmented-files was given.
-if test "${enable_segmented_files+set}" = set; then
-  enableval=$enable_segmented_files;
-  case $enableval in
+
+# Check whether --with-blocksize was given.
+if test "${with_blocksize+set}" = set; then
+  withval=$with_blocksize;
+  case $withval in
     yes)
-      :
+      { { echo "$as_me:$LINENO: error: argument required for --with-blocksize option" >&5
+echo "$as_me: error: argument required for --with-blocksize option" >&2;}
+   { (exit 1); exit 1; }; }
       ;;
     no)
-      :
+      { { echo "$as_me:$LINENO: error: argument required for --with-blocksize option" >&5
+echo "$as_me: error: argument required for --with-blocksize option" >&2;}
+   { (exit 1); exit 1; }; }
       ;;
     *)
-      { { echo "$as_me:$LINENO: error: no argument expected for --enable-segmented-files option" >&5
-echo "$as_me: error: no argument expected for --enable-segmented-files option" >&2;}
+      blocksize=$withval
+      ;;
+  esac
+
+else
+  blocksize=8
+fi
+
+
+case ${blocksize} in
+  1) BLCKSZ=1024;;
+  2) BLCKSZ=2048;;
+  4) BLCKSZ=4096;;
+  8) BLCKSZ=8192;;
+ 16) BLCKSZ=16384;;
+ 32) BLCKSZ=32768;;
+  *) { { echo "$as_me:$LINENO: error: Invalid block size. Allowed values are 1,2,4,8,16,32." >&5
+echo "$as_me: error: Invalid block size. Allowed values are 1,2,4,8,16,32." >&2;}
+   { (exit 1); exit 1; }; }
+esac
+{ echo "$as_me:$LINENO: result: ${blocksize}kB" >&5
+echo "${ECHO_T}${blocksize}kB" >&6; }
+
+
+cat >>confdefs.h <<_ACEOF
+#define BLCKSZ ${BLCKSZ}
+_ACEOF
+
+
+#
+# Relation segment size
+#
+{ echo "$as_me:$LINENO: checking for segment size" >&5
+echo $ECHO_N "checking for segment size... $ECHO_C" >&6; }
+
+pgac_args="$pgac_args with_segsize"
+
+
+# Check whether --with-segsize was given.
+if test "${with_segsize+set}" = set; then
+  withval=$with_segsize;
+  case $withval in
+    yes)
+      { { echo "$as_me:$LINENO: error: argument required for --with-segsize option" >&5
+echo "$as_me: error: argument required for --with-segsize option" >&2;}
+   { (exit 1); exit 1; }; }
+      ;;
+    no)
+      { { echo "$as_me:$LINENO: error: argument required for --with-segsize option" >&5
+echo "$as_me: error: argument required for --with-segsize option" >&2;}
    { (exit 1); exit 1; }; }
       ;;
+    *)
+      segsize=$withval
+      ;;
   esac
 
 else
-  enable_segmented_files=yes
+  segsize=1
+fi
+
+
+# this expression is set up to avoid unnecessary integer overflow
+# blocksize is already guaranteed to be a factor of 1024
+RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
+test $? -eq 0 || exit 1
+{ echo "$as_me:$LINENO: result: ${segsize}GB" >&5
+echo "${ECHO_T}${segsize}GB" >&6; }
 
+
+cat >>confdefs.h <<_ACEOF
+#define RELSEG_SIZE ${RELSEG_SIZE}
+_ACEOF
+
+
+#
+# WAL block size
+#
+{ echo "$as_me:$LINENO: checking for WAL block size" >&5
+echo $ECHO_N "checking for WAL block size... $ECHO_C" >&6; }
+
+pgac_args="$pgac_args with_wal_blocksize"
+
+
+# Check whether --with-wal-blocksize was given.
+if test "${with_wal_blocksize+set}" = set; then
+  withval=$with_wal_blocksize;
+  case $withval in
+    yes)
+      { { echo "$as_me:$LINENO: error: argument required for --with-wal-blocksize option" >&5
+echo "$as_me: error: argument required for --with-wal-blocksize option" >&2;}
+   { (exit 1); exit 1; }; }
+      ;;
+    no)
+      { { echo "$as_me:$LINENO: error: argument required for --with-wal-blocksize option" >&5
+echo "$as_me: error: argument required for --with-wal-blocksize option" >&2;}
+   { (exit 1); exit 1; }; }
+      ;;
+    *)
+      wal_blocksize=$withval
+      ;;
+  esac
+
+else
+  wal_blocksize=8
 fi
 
 
+case ${wal_blocksize} in
+  1) XLOG_BLCKSZ=1024;;
+  2) XLOG_BLCKSZ=2048;;
+  4) XLOG_BLCKSZ=4096;;
+  8) XLOG_BLCKSZ=8192;;
+ 16) XLOG_BLCKSZ=16384;;
+ 32) XLOG_BLCKSZ=32768;;
+ 64) XLOG_BLCKSZ=65536;;
+  *) { { echo "$as_me:$LINENO: error: Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." >&5
+echo "$as_me: error: Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." >&2;}
+   { (exit 1); exit 1; }; }
+esac
+{ echo "$as_me:$LINENO: result: ${wal_blocksize}kB" >&5
+echo "${ECHO_T}${wal_blocksize}kB" >&6; }
+
+
+cat >>confdefs.h <<_ACEOF
+#define XLOG_BLCKSZ ${XLOG_BLCKSZ}
+_ACEOF
+
+
+#
+# WAL segment size
+#
+{ echo "$as_me:$LINENO: checking for WAL segment size" >&5
+echo $ECHO_N "checking for WAL segment size... $ECHO_C" >&6; }
+
+pgac_args="$pgac_args with_wal_segsize"
+
+
+# Check whether --with-wal-segsize was given.
+if test "${with_wal_segsize+set}" = set; then
+  withval=$with_wal_segsize;
+  case $withval in
+    yes)
+      { { echo "$as_me:$LINENO: error: argument required for --with-wal-segsize option" >&5
+echo "$as_me: error: argument required for --with-wal-segsize option" >&2;}
+   { (exit 1); exit 1; }; }
+      ;;
+    no)
+      { { echo "$as_me:$LINENO: error: argument required for --with-wal-segsize option" >&5
+echo "$as_me: error: argument required for --with-wal-segsize option" >&2;}
+   { (exit 1); exit 1; }; }
+      ;;
+    *)
+      wal_segsize=$withval
+      ;;
+  esac
+
+else
+  wal_segsize=16
+fi
+
+
+case ${wal_segsize} in
+  1) ;;
+  2) ;;
+  4) ;;
+  8) ;;
+ 16) ;;
+ 32) ;;
+ 64) ;;
+  *) { { echo "$as_me:$LINENO: error: Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." >&5
+echo "$as_me: error: Invalid WAL segment size. Allowed values are 1,2,4,8,16,32,64." >&2;}
+   { (exit 1); exit 1; }; }
+esac
+{ echo "$as_me:$LINENO: result: ${wal_segsize}MB" >&5
+echo "${ECHO_T}${wal_segsize}MB" >&6; }
+
+
+cat >>confdefs.h <<_ACEOF
+#define XLOG_SEG_SIZE (${wal_segsize} * 1024 * 1024)
+_ACEOF
+
 
 #
 # C compiler
@@ -3400,13 +3756,16 @@ unset CFLAGS
 # CFLAGS are selected so:
 # If the user specifies something in the environment, that is used.
 # else:  If the template file set something, that is used.
+# else:  If coverage was enabled, don't set anything.
 # else:  If the compiler is GCC, then we use -O2.
-# else:  If the compiler is something else, then we use -0.
+# else:  If the compiler is something else, then we use -O.
 
 if test "$ac_env_CFLAGS_set" = set; then
   CFLAGS=$ac_env_CFLAGS_value
 elif test "${CFLAGS+set}" = set; then
   : # (keep what template set)
+elif test "$enable_coverage" = yes; then
+  : # no optimization by default
 elif test "$GCC" = yes; then
   CFLAGS="-O2"
 else
@@ -3421,7 +3780,7 @@ fi
 # ICC pretends to be GCC but it's lying; it doesn't support these options.
 
 if test "$GCC" = yes -a "$ICC" = no; then
-  CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith -Winline"
+  CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith"
   # These work in some but not all gcc versions
   { echo "$as_me:$LINENO: checking if $CC supports -Wdeclaration-after-statement" >&5
 echo $ECHO_N "checking if $CC supports -Wdeclaration-after-statement... $ECHO_C" >&6; }
@@ -3781,6 +4140,17 @@ if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
   CFLAGS="$CFLAGS -g"
 fi
 
+# enable code coverage if --enable-coverage
+if test "$enable_coverage" = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
+  else
+    { { echo "$as_me:$LINENO: error: --enable-coverage is supported only when using GCC" >&5
+echo "$as_me: error: --enable-coverage is supported only when using GCC" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+fi
+
 # enable profiling if --enable-profiling
 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
   if test "$GCC" = yes; then
@@ -3797,9 +4167,6 @@ echo "$as_me: error: --enable-profiling is supported only when using GCC" >&2;}
   fi
 fi
 
-{ echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
-echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
-
 # We already have this in Makefile.win32, but configure needs it too
 if test "$PORTNAME" = "win32"; then
   CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
@@ -5306,11 +5673,6 @@ rm -f conftest*
 CPPFLAGS="$CPPFLAGS $INCLUDES"
 LDFLAGS="$LDFLAGS $LIBDIRS"
 
-{ echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
-echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
-{ echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
-echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
-
 
 
 
@@ -5780,18 +6142,18 @@ done
 
 
 # Let the user override the search
-if test -z "$YACC"; then
-  for ac_prog in 'bison -y'
+if test -z "$BISON"; then
+  for ac_prog in bison
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 { echo "$as_me:$LINENO: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_YACC+set}" = set; then
+if test "${ac_cv_prog_BISON+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  if test -n "$YACC"; then
-  ac_cv_prog_YACC="$YACC" # Let the user override the test.
+  if test -n "$BISON"; then
+  ac_cv_prog_BISON="$BISON" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -5800,7 +6162,7 @@ do
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_YACC="$ac_prog"
+    ac_cv_prog_BISON="$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -5810,26 +6172,26 @@ IFS=$as_save_IFS
 
 fi
 fi
-YACC=$ac_cv_prog_YACC
-if test -n "$YACC"; then
-  { echo "$as_me:$LINENO: result: $YACC" >&5
-echo "${ECHO_T}$YACC" >&6; }
+BISON=$ac_cv_prog_BISON
+if test -n "$BISON"; then
+  { echo "$as_me:$LINENO: result: $BISON" >&5
+echo "${ECHO_T}$BISON" >&6; }
 else
   { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
 fi
 
 
-  test -n "$YACC" && break
+  test -n "$BISON" && break
 done
 
 fi
 
-if test "$YACC"; then
-  pgac_yacc_version=`$YACC --version 2>/dev/null | sed q`
-  { echo "$as_me:$LINENO: using $pgac_yacc_version" >&5
-echo "$as_me: using $pgac_yacc_version" >&6;}
-  if echo "$pgac_yacc_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
+if test "$BISON"; then
+  pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
+  { echo "$as_me:$LINENO: using $pgac_bison_version" >&5
+echo "$as_me: using $pgac_bison_version" >&6;}
+  if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
   then
     { echo "$as_me:$LINENO: WARNING:
 *** The installed version of Bison is too old to use with PostgreSQL.
@@ -5837,29 +6199,25 @@ echo "$as_me: using $pgac_yacc_version" >&6;}
 echo "$as_me: WARNING:
 *** The installed version of Bison is too old to use with PostgreSQL.
 *** Bison version 1.875 or later is required." >&2;}
-    YACC=""
+    BISON=""
   fi
 fi
 
-if test -z "$YACC"; then
+if test -z "$BISON"; then
   { echo "$as_me:$LINENO: WARNING:
 *** Without Bison you will not be able to build PostgreSQL from CVS nor
 *** change any of the parser definition files.  You can obtain Bison from
 *** a GNU mirror site.  (If you are using the official distribution of
 *** PostgreSQL then you do not need to worry about this, because the Bison
-*** output is pre-generated.)  To use a different yacc program (possible,
-*** but not recommended), set the environment variable YACC before running
-*** 'configure'." >&5
+*** output is pre-generated.)" >&5
 echo "$as_me: WARNING:
 *** Without Bison you will not be able to build PostgreSQL from CVS nor
 *** change any of the parser definition files.  You can obtain Bison from
 *** a GNU mirror site.  (If you are using the official distribution of
 *** PostgreSQL then you do not need to worry about this, because the Bison
-*** output is pre-generated.)  To use a different yacc program (possible,
-*** but not recommended), set the environment variable YACC before running
-*** 'configure'." >&2;}
+*** output is pre-generated.)" >&2;}
 fi
-# We don't need AC_SUBST(YACC) because AC_PATH_PROG did it
+# We don't need AC_SUBST(BISON) because AC_PATH_PROG did it
 
 
 { echo "$as_me:$LINENO: checking for flex" >&5
@@ -8003,9 +8361,9 @@ fi
 
 if test "$with_libxslt" = yes ; then
 
-{ echo "$as_me:$LINENO: checking for xsltLibxmlVersion in -lxslt" >&5
-echo $ECHO_N "checking for xsltLibxmlVersion in -lxslt... $ECHO_C" >&6; }
-if test "${ac_cv_lib_xslt_xsltLibxmlVersion+set}" = set; then
+{ echo "$as_me:$LINENO: checking for xsltCleanupGlobals in -lxslt" >&5
+echo $ECHO_N "checking for xsltCleanupGlobals in -lxslt... $ECHO_C" >&6; }
+if test "${ac_cv_lib_xslt_xsltCleanupGlobals+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -8023,11 +8381,11 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char xsltLibxmlVersion ();
+char xsltCleanupGlobals ();
 int
 main ()
 {
-return xsltLibxmlVersion ();
+return xsltCleanupGlobals ();
   ;
   return 0;
 }
@@ -8050,21 +8408,21 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  ac_cv_lib_xslt_xsltLibxmlVersion=yes
+  ac_cv_lib_xslt_xsltCleanupGlobals=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_xslt_xsltLibxmlVersion=no
+       ac_cv_lib_xslt_xsltCleanupGlobals=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_xslt_xsltLibxmlVersion" >&5
-echo "${ECHO_T}$ac_cv_lib_xslt_xsltLibxmlVersion" >&6; }
-if test $ac_cv_lib_xslt_xsltLibxmlVersion = yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
+echo "${ECHO_T}$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
+if test $ac_cv_lib_xslt_xsltCleanupGlobals = yes; then
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBXSLT 1
 _ACEOF
@@ -19043,7 +19401,7 @@ done
 # Do test here with the proper thread flags
 { echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
 echo $ECHO_N "checking whether getpwuid_r takes a fifth argument... $ECHO_C" >&6; }
-if test "${pgac_func_getpwuid_r_5arg+set}" = set; then
+if test "${pgac_cv_func_getpwuid_r_5arg+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -19084,19 +19442,19 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  pgac_func_getpwuid_r_5arg=yes
+  pgac_cv_func_getpwuid_r_5arg=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       pgac_func_getpwuid_r_5arg=no
+       pgac_cv_func_getpwuid_r_5arg=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $pgac_func_getpwuid_r_5arg" >&5
-echo "${ECHO_T}$pgac_func_getpwuid_r_5arg" >&6; }
-if test x"$pgac_func_getpwuid_r_5arg" = xyes ; then
+{ echo "$as_me:$LINENO: result: $pgac_cv_func_getpwuid_r_5arg" >&5
+echo "${ECHO_T}$pgac_cv_func_getpwuid_r_5arg" >&6; }
+if test x"$pgac_cv_func_getpwuid_r_5arg" = xyes ; then
 
 cat >>confdefs.h <<\_ACEOF
 #define GETPWUID_R_5ARG
@@ -19106,7 +19464,7 @@ fi
 
 { echo "$as_me:$LINENO: checking whether strerror_r returns int" >&5
 echo $ECHO_N "checking whether strerror_r returns int... $ECHO_C" >&6; }
-if test "${pgac_func_strerror_r_int+set}" = set; then
+if test "${pgac_cv_func_strerror_r_int+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -19146,19 +19504,19 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
-  pgac_func_strerror_r_int=yes
+  pgac_cv_func_strerror_r_int=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       pgac_func_strerror_r_int=no
+       pgac_cv_func_strerror_r_int=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $pgac_func_strerror_r_int" >&5
-echo "${ECHO_T}$pgac_func_strerror_r_int" >&6; }
-if test x"$pgac_func_strerror_r_int" = xyes ; then
+{ echo "$as_me:$LINENO: result: $pgac_cv_func_strerror_r_int" >&5
+echo "${ECHO_T}$pgac_cv_func_strerror_r_int" >&6; }
+if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
 
 cat >>confdefs.h <<\_ACEOF
 #define STRERROR_R_INT
@@ -24287,12 +24645,11 @@ _ACEOF
 
 
 
-if test "$ac_cv_sizeof_off_t" -lt 8 -o "$enable_segmented_files" = "yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define USE_SEGMENTED_FILES 1
-_ACEOF
-
+# If we don't have largefile support, can't handle segsize >= 2GB.
+if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
+   { { echo "$as_me:$LINENO: error: Large file support is not enabled. Segment size cannot be larger than 1GB." >&5
+echo "$as_me: error: Large file support is not enabled. Segment size cannot be larger than 1GB." >&2;}
+   { (exit 1); exit 1; }; }
 fi
 
 # SunOS doesn't handle negative byte comparisons properly with +/- return
@@ -24454,9 +24811,9 @@ _ACEOF
 
 if test "$enable_nls" = yes ; then
 
-  { echo "$as_me:$LINENO: checking for library containing gettext" >&5
-echo $ECHO_N "checking for library containing gettext... $ECHO_C" >&6; }
-if test "${ac_cv_search_gettext+set}" = set; then
+  { echo "$as_me:$LINENO: checking for library containing bind_textdomain_codeset" >&5
+echo $ECHO_N "checking for library containing bind_textdomain_codeset... $ECHO_C" >&6; }
+if test "${ac_cv_search_bind_textdomain_codeset+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_func_search_save_LIBS=$LIBS
@@ -24473,11 +24830,11 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char gettext ();
+char bind_textdomain_codeset ();
 int
 main ()
 {
-return gettext ();
+return bind_textdomain_codeset ();
   ;
   return 0;
 }
@@ -24507,7 +24864,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext &&
        $as_test_x conftest$ac_exeext; then
-  ac_cv_search_gettext=$ac_res
+  ac_cv_search_bind_textdomain_codeset=$ac_res
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext
-  if test "${ac_cv_search_gettext+set}" = set; then
+  if test "${ac_cv_search_bind_textdomain_codeset+set}" = set; then
   break
 fi
 done
-if test "${ac_cv_search_gettext+set}" = set; then
+if test "${ac_cv_search_bind_textdomain_codeset+set}" = set; then
   :
 else
-  ac_cv_search_gettext=no
+  ac_cv_search_bind_textdomain_codeset=no
 fi
 rm conftest.$ac_ext
 LIBS=$ac_func_search_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_gettext" >&5
-echo "${ECHO_T}$ac_cv_search_gettext" >&6; }
-ac_res=$ac_cv_search_gettext
+{ echo "$as_me:$LINENO: result: $ac_cv_search_bind_textdomain_codeset" >&5
+echo "${ECHO_T}$ac_cv_search_bind_textdomain_codeset" >&6; }
+ac_res=$ac_cv_search_bind_textdomain_codeset
 if test "$ac_res" != no; then
   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
@@ -24816,7 +25173,7 @@ fi
 
 # Check for Tcl configuration script tclConfig.sh
 if test "$with_tcl" = yes; then
-    for ac_prog in tclsh tcl
+    for ac_prog in tclsh tcl tclsh8.5 tclsh8.4 tclsh8.3
 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
 
+if test x"$TCLSH" = x""; then
+  { { echo "$as_me:$LINENO: error: Tcl shell not found" >&5
+echo "$as_me: error: Tcl shell not found" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
 { echo "$as_me:$LINENO: checking for tclConfig.sh" >&5
 echo $ECHO_N "checking for tclConfig.sh... $ECHO_C" >&6; }
 # Let user override test
@@ -25179,7 +25542,7 @@ else
   if test -n "$DOCBOOKSTYLE"; then
   pgac_cv_path_stylesheets=$DOCBOOKSTYLE
 else
-  for pgac_prefix in /usr /usr/local /opt; do
+  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 \
@@ -25188,7 +25551,8 @@ else
         sgml/docbook-dsssl \
         sgml/docbook/dsssl/modular \
         sgml/docbook/stylesheet/dsssl/modular \
-        sgml/docbook/dsssl-stylesheets
+        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" \
@@ -25460,6 +25824,154 @@ echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
 fi
 fi
 
+# If compiler will take -Wl,--as-needed then add that to LDFLAGS.
+# This is much easier than trying to filter LIBS to the minimum for each
+# executable.  (Note that shared library links won't use this switch, though.)
+# On (at least) some Red-Hat-derived systems, this switch breaks linking to
+# libreadline; therefore we postpone testing it until we know what library
+# dependencies readline has.  The test code will try to link with $LIBS.
+if test "$with_readline" = yes; then
+  link_test_func=readline
+else
+  link_test_func=exit
+fi
+if test "$PORTNAME" != "darwin"; then
+  { echo "$as_me:$LINENO: checking if $CC supports -Wl,--as-needed" >&5
+echo $ECHO_N "checking if $CC supports -Wl,--as-needed... $ECHO_C" >&6; }
+pgac_save_LDFLAGS=$LDFLAGS
+LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
+if test "$cross_compiling" = yes; then
+  LDFLAGS="$pgac_save_LDFLAGS"
+               { echo "$as_me:$LINENO: result: assuming no" >&5
+echo "${ECHO_T}assuming no" >&6; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+extern void $link_test_func (); void (*fptr) () = $link_test_func;
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+LDFLAGS="$pgac_save_LDFLAGS"
+               { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+else
+  # On Darwin it's spelled -Wl,-dead_strip_dylibs, but don't try that elsewhere
+  { echo "$as_me:$LINENO: checking if $CC supports -Wl,-dead_strip_dylibs" >&5
+echo $ECHO_N "checking if $CC supports -Wl,-dead_strip_dylibs... $ECHO_C" >&6; }
+pgac_save_LDFLAGS=$LDFLAGS
+LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
+if test "$cross_compiling" = yes; then
+  LDFLAGS="$pgac_save_LDFLAGS"
+               { echo "$as_me:$LINENO: result: assuming no" >&5
+echo "${ECHO_T}assuming no" >&6; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+extern void $link_test_func (); void (*fptr) () = $link_test_func;
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+LDFLAGS="$pgac_save_LDFLAGS"
+               { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+fi
+
+
+# Begin output steps
+
+{ echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
+echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
+{ echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
+echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
+{ echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
+echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
+
 # prepare build tree if outside source tree
 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
 # Note 2: /bin/pwd might be better than shell's built-in at getting
@@ -26188,6 +26700,10 @@ enable_shared!$enable_shared$ac_delim
 enable_rpath!$enable_rpath$ac_delim
 enable_debug!$enable_debug$ac_delim
 enable_profiling!$enable_profiling$ac_delim
+GCOV!$GCOV$ac_delim
+LCOV!$LCOV$ac_delim
+GENHTML!$GENHTML$ac_delim
+enable_coverage!$enable_coverage$ac_delim
 DTRACE!$DTRACE$ac_delim
 DTRACEFLAGS!$DTRACEFLAGS$ac_delim
 enable_dtrace!$enable_dtrace$ac_delim
@@ -26227,10 +26743,6 @@ LDFLAGS_SL!$LDFLAGS_SL$ac_delim
 LD!$LD$ac_delim
 with_gnu_ld!$with_gnu_ld$ac_delim
 ld_R_works!$ld_R_works$ac_delim
-RANLIB!$RANLIB$ac_delim
-STRIP!$STRIP$ac_delim
-STRIP_STATIC_LIB!$STRIP_STATIC_LIB$ac_delim
-STRIP_SHARED_LIB!$STRIP_SHARED_LIB$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -26272,11 +26784,15 @@ _ACEOF
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+RANLIB!$RANLIB$ac_delim
+STRIP!$STRIP$ac_delim
+STRIP_STATIC_LIB!$STRIP_STATIC_LIB$ac_delim
+STRIP_SHARED_LIB!$STRIP_SHARED_LIB$ac_delim
 TAR!$TAR$ac_delim
 LN_S!$LN_S$ac_delim
 AWK!$AWK$ac_delim
-YACC!$YACC$ac_delim
-YFLAGS!$YFLAGS$ac_delim
+BISON!$BISON$ac_delim
+BISONFLAGS!$BISONFLAGS$ac_delim
 FLEX!$FLEX$ac_delim
 FLEXFLAGS!$FLEXFLAGS$ac_delim
 PERL!$PERL$ac_delim
@@ -26322,7 +26838,7 @@ vpath_build!$vpath_build$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 48; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 52; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5