2010-09-21 04:08:53 +08:00
|
|
|
# config/docbook.m4
|
2000-11-06 05:04:07 +08:00
|
|
|
|
2017-11-23 22:39:47 +08:00
|
|
|
# PGAC_PATH_XMLLINT
|
|
|
|
# -----------------
|
|
|
|
AC_DEFUN([PGAC_PATH_XMLLINT],
|
|
|
|
[PGAC_PATH_PROGS(XMLLINT, xmllint)])
|
2000-11-06 05:04:07 +08:00
|
|
|
|
|
|
|
|
|
|
|
# PGAC_CHECK_DOCBOOK(VERSION)
|
|
|
|
# ---------------------------
|
|
|
|
AC_DEFUN([PGAC_CHECK_DOCBOOK],
|
2017-11-23 22:39:47 +08:00
|
|
|
[AC_REQUIRE([PGAC_PATH_XMLLINT])
|
|
|
|
AC_CACHE_CHECK([for DocBook XML V$1], [pgac_cv_check_docbook],
|
|
|
|
[cat >conftest.xml <<EOF
|
|
|
|
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V$1//EN" "http://www.oasis-open.org/docbook/xml/$1/docbookx.dtd">
|
2000-11-06 05:04:07 +08:00
|
|
|
<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
|
|
|
|
|
2017-11-23 22:39:47 +08:00
|
|
|
if test -n "$XMLLINT"; then
|
|
|
|
$XMLLINT --noout --valid conftest.xml 1>&AS_MESSAGE_LOG_FD 2>&1
|
2003-11-06 18:30:42 +08:00
|
|
|
if test $? -eq 0; then
|
|
|
|
pgac_cv_check_docbook=yes
|
|
|
|
fi
|
2000-11-06 05:04:07 +08:00
|
|
|
fi
|
2017-11-23 22:39:47 +08:00
|
|
|
rm -f conftest.xml])
|
2000-11-06 05:04:07 +08:00
|
|
|
|
|
|
|
have_docbook=$pgac_cv_check_docbook
|
|
|
|
AC_SUBST([have_docbook])
|
|
|
|
])# PGAC_CHECK_DOCBOOK
|