]> granicus.if.org Git - postgresql/commitdiff
configure check for docbook2man program, used in the new XML-based man
authorPeter Eisentraut <peter_e@gmx.net>
Wed, 26 Nov 2008 11:26:54 +0000 (11:26 +0000)
committerPeter Eisentraut <peter_e@gmx.net>
Wed, 26 Nov 2008 11:26:54 +0000 (11:26 +0000)
page build target.  This covers from-source, Debian, and Fedora
installation variants.

config/docbook.m4
configure
configure.in
doc/src/sgml/Makefile
src/Makefile.global.in

index f7cc67d4f50fa0309a17b29f86e352481762d362..491d329d53733339c664c963f8bc63df5b6433e8 100644 (file)
@@ -1,4 +1,4 @@
-# $PostgreSQL: pgsql/config/docbook.m4,v 1.9 2008/09/05 09:37:37 petere Exp $
+# $PostgreSQL: pgsql/config/docbook.m4,v 1.10 2008/11/26 11:26:54 petere Exp $
 
 # PGAC_PROG_JADE
 # --------------
@@ -97,3 +97,32 @@ if test -n "$DOCBOOKSTYLE"; then
 else
   AC_PATH_PROGS(COLLATEINDEX, collateindex.pl)
 fi])# PGAC_PATH_COLLATEINDEX
+
+
+# PGAC_PATH_DOCBOOK2MAN
+# ---------------------
+# Find docbook2man program from the docbook2X package.  Upstream calls
+# this program docbook2man, but there is also a different docbook2man
+# out there from the docbook-utils package.  Thus, the program we want
+# is called docbook2x-man on Debian and db2x_docbook2man on Fedora.
+#
+# (Consider rewriting this macro using AC_PATH_PROGS_FEATURE_CHECK
+# when switching to Autoconf 2.62+.)
+AC_DEFUN([PGAC_PATH_DOCBOOK2MAN],
+[AC_CACHE_CHECK([for docbook2man], [ac_cv_path_DOCBOOK2MAN],
+[if test -z "$DOCBOOK2MAN"; then
+  _AS_PATH_WALK([],
+  [for ac_prog in docbook2x-man db2x_docbook2man docbook2man; do
+    ac_path="$as_dir/$ac_prog"
+    AS_EXECUTABLE_P(["$ac_path"]) || continue
+    if "$ac_path" --version 2>/dev/null | $GREP docbook2x >/dev/null 2>&1; then
+      ac_cv_path_DOCBOOK2MAN=$ac_path
+      break
+    fi
+  done])
+else
+  ac_cv_path_DOCBOOK2MAN=$DOCBOOK2MAN
+fi])
+DOCBOOK2MAN=$ac_cv_path_DOCBOOK2MAN
+AC_SUBST(DOCBOOK2MAN)
+])# PGAC_PATH_DOCBOOK2MAN
index 425c56e17a25cf94a84f3a2d5a49389bee7aa0dc..89de116af893fc681677d8a430b8d144120066f0 100755 (executable)
--- a/configure
+++ b/configure
@@ -766,6 +766,7 @@ have_docbook
 DOCBOOKSTYLE
 COLLATEINDEX
 SGMLSPL
+DOCBOOK2MAN
 vpath_build
 LTLIBOBJS'
 ac_subst_files=''
   test -n "$SGMLSPL" && break
 done
 
+{ echo "$as_me:$LINENO: checking for docbook2man" >&5
+echo $ECHO_N "checking for docbook2man... $ECHO_C" >&6; }
+if test "${ac_cv_path_DOCBOOK2MAN+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$DOCBOOK2MAN"; then
+  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_prog in docbook2x-man db2x_docbook2man docbook2man; do
+    ac_path="$as_dir/$ac_prog"
+    { test -f "$ac_path" && $as_test_x "$ac_path"; } || continue
+    if "$ac_path" --version 2>/dev/null | $GREP docbook2x >/dev/null 2>&1; then
+      ac_cv_path_DOCBOOK2MAN=$ac_path
+      break
+    fi
+  done
+done
+IFS=$as_save_IFS
+
+else
+  ac_cv_path_DOCBOOK2MAN=$DOCBOOK2MAN
+fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_DOCBOOK2MAN" >&5
+echo "${ECHO_T}$ac_cv_path_DOCBOOK2MAN" >&6; }
+DOCBOOK2MAN=$ac_cv_path_DOCBOOK2MAN
+
+
 
 # Thread testing
 
@@ -27004,11 +27036,12 @@ have_docbook!$have_docbook$ac_delim
 DOCBOOKSTYLE!$DOCBOOKSTYLE$ac_delim
 COLLATEINDEX!$COLLATEINDEX$ac_delim
 SGMLSPL!$SGMLSPL$ac_delim
+DOCBOOK2MAN!$DOCBOOK2MAN$ac_delim
 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` = 53; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 54; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
index f8f507cd0c31c0fd5486eabb4126274156831fc8..e006a97a5b43dcc35888349b92ae2ab119bddf97 100644 (file)
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-dnl $PostgreSQL: pgsql/configure.in,v 1.573 2008/11/24 09:15:15 mha Exp $
+dnl $PostgreSQL: pgsql/configure.in,v 1.574 2008/11/26 11:26:54 petere Exp $
 dnl
 dnl Developers, please strive to achieve this order:
 dnl
@@ -1693,6 +1693,7 @@ PGAC_CHECK_DOCBOOK(4.2)
 PGAC_PATH_DOCBOOK_STYLESHEETS
 PGAC_PATH_COLLATEINDEX
 AC_CHECK_PROGS(SGMLSPL, sgmlspl)
+PGAC_PATH_DOCBOOK2MAN
 
 # Thread testing
 
index 033fd7bbb7eb41b4d5154a6fb8734cef9e52b7ef..abf681144219dabea3fc0eb7363e465add814985 100644 (file)
@@ -2,7 +2,7 @@
 #
 # PostgreSQL documentation makefile
 #
-# $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.112 2008/11/14 10:22:45 petere Exp $
+# $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.113 2008/11/26 11:26:54 petere Exp $
 #
 #----------------------------------------------------------------------------
 
@@ -37,6 +37,10 @@ ifndef SGMLSPL
 SGMLSPL = sgmlspl
 endif
 
+ifndef DOCBOOK2MAN
+DOCBOOK2MAN = docbook2man_is_missing
+endif
+
 # docbook2man generates man pages from docbook refentry source code.
 D2MSCRIPT= $(D2MDIR)/docbook2man-spec.pl
 D2MLINKS = $(D2MDIR)/docbook2man-spec_makelinks
@@ -276,9 +280,6 @@ MAKEINFO = makeinfo
 ## Experimental man page building through docbook2x
 ##
 
-# called docbook2man on non-Debian
-DOCBOOK2MAN = docbook2x-man
-
 manx: postgres.xml stylesheet-man.xsl
        $(DOCBOOK2MAN) --solinks -s $(srcdir)/stylesheet-man.xsl --string-param default-manpage-section=$(DEFAULTSECTION)  $<
        $(mkinstalldirs) man1 man7
index 02fab8c84c8fcb561b00ac30a97d9295e58992d1..6789e182f46b07884becd8287d49ac7f644a3ba1 100644 (file)
@@ -1,5 +1,5 @@
 # -*-makefile-*-
-# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.246 2008/11/14 10:22:47 petere Exp $
+# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.247 2008/11/26 11:26:54 petere Exp $
 
 #------------------------------------------------------------------------------
 # All PostgreSQL makefiles include this file and use the variables it sets,
@@ -189,6 +189,7 @@ PTHREAD_LIBS                = @PTHREAD_LIBS@
 have_docbook   = @have_docbook@
 DOCBOOKSTYLE   = @DOCBOOKSTYLE@
 COLLATEINDEX   = @COLLATEINDEX@
+DOCBOOK2MAN    = @DOCBOOK2MAN@
 
 
 ##########################################################################