2010-09-21 04:08:53 +08:00
|
|
|
# config/docbook.m4
|
2000-11-06 05:04:07 +08:00
|
|
|
|
|
|
|
# PGAC_PROG_NSGMLS
|
|
|
|
# ----------------
|
|
|
|
AC_DEFUN([PGAC_PROG_NSGMLS],
|
Further improve consistency of configure's program searching.
Peter Eisentraut noted that commit 40b9f1921 had broken a configure
behavior that some people might rely on: AC_CHECK_PROGS(FOO,...) will
allow the search to be overridden by specifying a value for FOO on
configure's command line or in its environment, but AC_PATH_PROGS(FOO,...)
accepts such an override only if it's an absolute path. We had worked
around that behavior for some, but not all, of the pre-existing uses
of AC_PATH_PROGS by just skipping the macro altogether when FOO is
already set. Let's standardize on that workaround for all uses of
AC_PATH_PROGS, new and pre-existing, by wrapping AC_PATH_PROGS in a
new macro PGAC_PATH_PROGS. While at it, fix a deficiency of the old
workaround code by making sure we report the setting to configure's log.
Eventually I'd like to improve PGAC_PATH_PROGS so that it converts
non-absolute override inputs to absolute form, eg "PYTHON=python3"
becomes, say, PYTHON = /usr/bin/python3. But that will take some
nontrivial coding so it doesn't seem like a thing to do in late beta.
Discussion: https://postgr.es/m/90a92a7d-938e-507a-3bd7-ecd2b4004689@2ndquadrant.com
2017-08-01 23:40:00 +08:00
|
|
|
[PGAC_PATH_PROGS(NSGMLS, [onsgmls nsgmls])])
|
2000-11-06 05:04:07 +08:00
|
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2003-11-06 18:30:42 +08:00
|
|
|
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
|
2000-11-06 05:04:07 +08:00
|
|
|
fi
|
|
|
|
rm -f conftest.sgml])
|
|
|
|
|
|
|
|
have_docbook=$pgac_cv_check_docbook
|
|
|
|
AC_SUBST([have_docbook])
|
|
|
|
])# PGAC_CHECK_DOCBOOK
|