[pgpool-hackers: 1632] Re: autoconf broken
Muhammad Usama
m.usama at gmail.com
Thu Jun 16 02:55:21 JST 2016
Hi
On Wed, Jun 15, 2016 at 10:59 AM, Tatsuo Ishii <ishii at postgresql.org> wrote:
> Usama,
>
> I think current configure related files are broken since your SGML
> patch was introduced. If so, please fix it. I need to tweak version
> info toward 3.6.
>
The problem was somehow the m4 files part of the SGML patch were not
checked in the repository.
Please find the attached patch if it solves the issue at your end. I have
also altered the base Makefile.am
So that only '$make docs' will build the docs and '$make all' will not
build the documentation.
Kind regards
Muhammad Usama
> $ autoreconf
> Makefile.am:7: error: can_build_docs does not appear in AM_CONDITIONAL
> doc/src/sgml/Makefile.am:11: warning: ':='-style assignments are not
> portable
> doc/src/sgml/Makefile.am:11: warning: wildcard $(srcdir: non-POSIX
> variable name
> doc/src/sgml/Makefile.am:11: (probably a GNU make extension)
> doc/src/sgml/Makefile.am:14: warning: ':='-style assignments are not
> portable
> doc/src/sgml/Makefile.am:14: warning: filter-out
> %bookindex.sgml,$(ALLSGML: non-POSIX variable name
> doc/src/sgml/Makefile.am:14: (probably a GNU make extension)
> doc/src/sgml/Makefile.am:89: warning: '%'-style pattern rules are a GNU
> make extension
> doc/src/sgml/Makefile.am:92: warning: '%'-style pattern rules are a GNU
> make extension
> doc/src/sgml/Makefile.am:95: warning: '%'-style pattern rules are a GNU
> make extension
> doc/src/sgml/Makefile.am:98: warning: '%'-style pattern rules are a GNU
> make extension
> doc/src/sgml/Makefile.am:101: warning: '%'-style pattern rules are a GNU
> make extension
> doc/src/sgml/Makefile.am:105: warning: '%'-style pattern rules are a GNU
> make extension
> doc/src/sgml/Makefile.am:117: warning: '%'-style pattern rules are a GNU
> make extension
> doc/src/sgml/Makefile.am:120: warning: '%'-style pattern rules are a GNU
> make extension
> doc/src/sgml/Makefile.am:157: warning: '%'-style pattern rules are a GNU
> make extension
> doc/src/sgml/Makefile.am:161: warning: '%'-style pattern rules are a GNU
> make extension
> doc/src/sgml/Makefile.am:172: warning: '%'-style pattern rules are a GNU
> make extension
> doc/src/sgml/Makefile.am:187: warning: wildcard $(srcdir: non-POSIX
> variable name
> doc/src/sgml/Makefile.am:187: (probably a GNU make extension)
> autoreconf: automake failed with exit status: 1
> $ make
> /bin/bash ./config.status --recheck
> running CONFIG_SHELL=/bin/bash /bin/bash ./configure
> --prefix=/home/t-ishii/work/pgpool-II/current --no-create --no-recursion
> checking for gcc... gcc
> checking whether the C compiler works... yes
> checking for C compiler default output file name... a.out
> checking for suffix of executables...
> checking whether we are cross compiling... no
> [snip]
> checking lex output file root... lex.yy
> checking lex library... -lfl
> checking whether yytext is a pointer... yes
> checking for bison... bison -y
> ./configure: line 12045: PGAC_PROG_NSGMLS: command not found
> ./configure: line 12046: PGAC_PROG_JADE: command not found
> ./configure: line 12047: syntax error near unexpected token `4.2'
> ./configure: line 12047: `PGAC_CHECK_DOCBOOK(4.2)'
> make: *** [config.status] エラー 2
>
> Best regards,
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese:http://www.sraoss.co.jp
> _______________________________________________
> pgpool-hackers mailing list
> pgpool-hackers at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-hackers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-hackers/attachments/20160615/ee306b93/attachment-0001.html>
-------------- next part --------------
diff --git a/Makefile.am b/Makefile.am
index 4589f02..6459b58 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,10 +4,11 @@ AUTOMAKE_OPTIONS = subdir-objects
# suggested by libtoolize
ACLOCAL_AMFLAGS = -I m4
-if can_build_docs
-DOC_DIR = doc
-endif
+docs:
+ $(MAKE) -C doc all
+.PHONY: docs
-SUBDIRS = src $(DOC_DIR)
+
+SUBDIRS = src
DIST_SUBDIRS = src doc
diff --git a/Makefile.in b/Makefile.in
index 351d4c6..79c1d3e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -342,8 +342,7 @@ AUTOMAKE_OPTIONS = subdir-objects
# suggested by libtoolize
ACLOCAL_AMFLAGS = -I m4
- at can_build_docs_TRUE@DOC_DIR = doc
-SUBDIRS = src $(DOC_DIR)
+SUBDIRS = src
DIST_SUBDIRS = src doc
all: all-recursive
@@ -812,6 +811,10 @@ uninstall-am:
ps ps-am tags tags-am uninstall uninstall-am
+docs:
+ $(MAKE) -C doc all
+.PHONY: docs
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/src/Makefile.in b/src/Makefile.in
index cbcc225..fb28490 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -85,11 +85,11 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/mkinstalldirs config/pool_config.c \
$(top_srcdir)/depcomp $(top_srcdir)/ylwrap
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/c-compiler.m4 $(top_srcdir)/c-library.m4 \
- $(top_srcdir)/general.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/docbook.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/c-compiler.m4 \
+ $(top_srcdir)/c-library.m4 $(top_srcdir)/general.m4 \
$(top_srcdir)/ac_func_accept_argtypes.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -290,9 +290,11 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+CATALOG = @CATALOG@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+COLLATEINDEX = @COLLATEINDEX@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
@@ -301,6 +303,7 @@ DEFS = @DEFS@ \
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
+DOCBOOKSTYLE = @DOCBOOKSTYLE@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
@@ -315,6 +318,7 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+JADE = @JADE@
LD = @LD@
LDFLAGS = @LDFLAGS@
LEX = @LEX@
@@ -337,6 +341,7 @@ MEMCACHED_RPATH_OPT = @MEMCACHED_RPATH_OPT@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
+NSGMLS = @NSGMLS@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OSX = @OSX@
@@ -389,6 +394,7 @@ datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
+have_docbook = @have_docbook@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
diff --git a/src/libs/pcp/Makefile.in b/src/libs/pcp/Makefile.in
index eaebe48..0fc7d4e 100644
--- a/src/libs/pcp/Makefile.in
+++ b/src/libs/pcp/Makefile.in
@@ -84,11 +84,11 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp \
$(include_HEADERS)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/c-compiler.m4 $(top_srcdir)/c-library.m4 \
- $(top_srcdir)/general.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/docbook.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/c-compiler.m4 \
+ $(top_srcdir)/c-library.m4 $(top_srcdir)/general.m4 \
$(top_srcdir)/ac_func_accept_argtypes.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -209,15 +209,18 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+CATALOG = @CATALOG@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+COLLATEINDEX = @COLLATEINDEX@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
+DOCBOOKSTYLE = @DOCBOOKSTYLE@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
@@ -232,6 +235,7 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+JADE = @JADE@
LD = @LD@
LDFLAGS = @LDFLAGS@
LEX = @LEX@
@@ -254,6 +258,7 @@ MEMCACHED_RPATH_OPT = @MEMCACHED_RPATH_OPT@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
+NSGMLS = @NSGMLS@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OSX = @OSX@
@@ -306,6 +311,7 @@ datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
+have_docbook = @have_docbook@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
diff --git a/src/tools/pgmd5/Makefile.in b/src/tools/pgmd5/Makefile.in
index 3ada30c..d94949a 100644
--- a/src/tools/pgmd5/Makefile.in
+++ b/src/tools/pgmd5/Makefile.in
@@ -84,11 +84,11 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/mkinstalldirs pool_config.c \
$(top_srcdir)/depcomp $(top_srcdir)/ylwrap
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/c-compiler.m4 $(top_srcdir)/c-library.m4 \
- $(top_srcdir)/general.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/docbook.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/c-compiler.m4 \
+ $(top_srcdir)/c-library.m4 $(top_srcdir)/general.m4 \
$(top_srcdir)/ac_func_accept_argtypes.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -189,9 +189,11 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+CATALOG = @CATALOG@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+COLLATEINDEX = @COLLATEINDEX@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
@@ -200,6 +202,7 @@ DEFS = @DEFS@ \
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
+DOCBOOKSTYLE = @DOCBOOKSTYLE@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
@@ -214,6 +217,7 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+JADE = @JADE@
LD = @LD@
LDFLAGS = @LDFLAGS@
LEX = @LEX@
@@ -236,6 +240,7 @@ MEMCACHED_RPATH_OPT = @MEMCACHED_RPATH_OPT@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
+NSGMLS = @NSGMLS@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OSX = @OSX@
@@ -288,6 +293,7 @@ datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
+have_docbook = @have_docbook@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
diff --git a/m4/ax_check_docbook.m4 b/m4/ax_check_docbook.m4
new file mode 100644
index 0000000..523b981
--- /dev/null
+++ b/m4/ax_check_docbook.m4
@@ -0,0 +1,65 @@
+dnl ---------------------------------------------------------------------------
+dnl Macro: AX_CHECK_DOCBOOK
+dnl Check for availability of various DocBook utilities and perform necessary
+dnl substitutions
+dnl ---------------------------------------------------------------------------
+
+AC_DEFUN([AX_CHECK_DOCBOOK], [
+# It's just rude to go over the net to build
+XSLTPROC_FLAGS=--nonet
+DOCBOOK_ROOT=
+
+for i in /etc/xml/catalog /usr/local/etc/xml/catalog /opt/local/etc/xml/catalog ;
+do
+ if test -f $i; then
+ XML_CATALOG="$i"
+ fi
+done
+
+if test -z "$XML_CATALOG" ; then
+ for i in /usr/share/sgml/docbook/stylesheet/xsl/nwalsh /usr/share/sgml/docbook/xsl-stylesheets/ /opt/local/share/xsl/docbook-xsl/xhtml/ ;
+ do
+ if test -d "$i"; then
+ DOCBOOK_ROOT=$i
+ fi
+ done
+
+ # Last resort - try net
+ if test -z "$DOCBOOK_ROOT"; then
+ XSLTPROC_FLAGS=
+ fi
+else
+ CAT_ENTRY_START='<!--'
+ CAT_ENTRY_END='-->'
+fi
+
+AC_CHECK_PROG(XSLTPROC,xsltproc,xsltproc,)
+XSLTPROC_WORKS=no
+if test -n "$XSLTPROC"; then
+ AC_MSG_CHECKING([whether xsltproc works])
+
+ if test -n "$XML_CATALOG"; then
+ DB_FILE="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"
+ else
+ DB_FILE="$DOCBOOK_ROOT/docbook.xsl"
+ fi
+
+ $XSLTPROC $XSLTPROC_FLAGS $DB_FILE >/dev/null 2>&1 << END
+<?xml version="1.0" encoding='ISO-8859-1'?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<book id="test">
+</book>
+END
+ if test "$?" = 0; then
+ XSLTPROC_WORKS=yes
+ fi
+ AC_MSG_RESULT($XSLTPROC_WORKS)
+fi
+AM_CONDITIONAL(have_xsltproc, test "$XSLTPROC_WORKS" = "yes")
+
+AC_SUBST(XML_CATALOG)
+AC_SUBST(XSLTPROC_FLAGS)
+AC_SUBST(DOCBOOK_ROOT)
+AC_SUBST(CAT_ENTRY_START)
+AC_SUBST(CAT_ENTRY_END)
+])
diff --git a/m4/docbook.m4 b/m4/docbook.m4
new file mode 100644
index 0000000..bf6f1d7
--- /dev/null
+++ b/m4/docbook.m4
@@ -0,0 +1,107 @@
+# config/docbook.m4
+
+# PGAC_PROG_JADE
+# --------------
+AC_DEFUN([PGAC_PROG_JADE],
+[AC_CHECK_PROGS([JADE], [openjade jade])])
+
+
+# PGAC_PROG_NSGMLS
+# ----------------
+AC_DEFUN([PGAC_PROG_NSGMLS],
+[AC_CHECK_PROGS([NSGMLS], [onsgmls nsgmls])])
+
+
+# PGAC_CHECK_DOCBOOK(VERSION)
+# ---------------------------
+AC_DEFUN([PGAC_CHECK_DOCBOOK],
+[AC_REQUIRE([PGAC_PROG_NSGMLS])
+AC_CACHE_CHECK([for DocBook V$1], [pgac_cv_check_docbook],
+[cat >conftest.sgml <<EOF
+<!doctype book PUBLIC "-//OASIS//DTD DocBook V$1//EN">
+<book>
+ <title>test</title>
+ <chapter>
+ <title>random</title>
+ <sect1>
+ <title>testsect</title>
+ <para>text</para>
+ </sect1>
+ </chapter>
+</book>
+EOF
+
+pgac_cv_check_docbook=no
+
+if test -n "$NSGMLS"; then
+ $NSGMLS -s conftest.sgml 1>&AS_MESSAGE_LOG_FD 2>&1
+ if test $? -eq 0; then
+ pgac_cv_check_docbook=yes
+ fi
+fi
+rm -f conftest.sgml])
+
+have_docbook=$pgac_cv_check_docbook
+AM_CONDITIONAL(can_build_docs, test "$pgac_cv_check_docbook" = "yes")
+AC_SUBST([have_docbook])
+])# PGAC_CHECK_DOCBOOK
+
+
+# PGAC_PATH_DOCBOOK_STYLESHEETS
+# -----------------------------
+AC_DEFUN([PGAC_PATH_DOCBOOK_STYLESHEETS],
+[AC_ARG_VAR(DOCBOOKSTYLE, [location of DocBook stylesheets])dnl
+AC_MSG_CHECKING([for DocBook stylesheets])
+AC_CACHE_VAL([pgac_cv_path_stylesheets],
+[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])
+DOCBOOKSTYLE=$pgac_cv_path_stylesheets
+AC_SUBST([DOCBOOKSTYLE])
+if test -n "$DOCBOOKSTYLE"; then
+ AC_MSG_RESULT([$DOCBOOKSTYLE])
+ CATALOG=-c $(DOCBOOKSTYLE)/catalog
+else
+ AC_MSG_RESULT(no)
+ CATALOG=
+fi
+AC_SUBST([CATALOG])
+])# PGAC_PATH_DOCBOOK_STYLESHEETS
+
+
+# PGAC_PATH_COLLATEINDEX
+# ----------------------
+# Some DocBook installations provide collateindex.pl in $DOCBOOKSTYLE/bin,
+# but it's not necessarily marked executable, so we can't use AC_PATH_PROG
+# to check for it there. Other installations just put it in the PATH.
+AC_DEFUN([PGAC_PATH_COLLATEINDEX],
+[AC_REQUIRE([PGAC_PATH_DOCBOOK_STYLESHEETS])dnl
+if test -n "$DOCBOOKSTYLE" -a -r "$DOCBOOKSTYLE/bin/collateindex.pl"; then
+ COLLATEINDEX="$DOCBOOKSTYLE/bin/collateindex.pl"
+ AC_SUBST([COLLATEINDEX])
+else
+ AC_PATH_PROG(COLLATEINDEX, collateindex.pl)
+fi])# PGAC_PATH_COLLATEINDEX
More information about the pgpool-hackers
mailing list