cvs: /phpdoc configure.in

From: Date: Thu, 21 Oct 1999 09:16:03 +0000
Subject: cvs: /phpdoc configure.in
Groups: php.dev 
Request: Send a blank email to php-dev+get-11804@lists.php.net to get a copy of this message
cslawi Thu Oct 21 05:16:03 1999 EDT Modified files: /phpdoc configure.in Log: OK, this time the search for the doctype is a bit smarter; if it runs into catalog files pointing to other catalog files, it recursively checks those out. I'm leaving manual.sgml and howto.sgml in the repository for the moment in case this needs to be rolled back again. If it works, they'll be overwritten anyway. If a doctype isn't found, the default is the 3.0 doctype. Index: phpdoc/configure.in diff -u phpdoc/configure.in:1.13 phpdoc/configure.in:1.14 --- phpdoc/configure.in:1.13 Thu Oct 21 04:36:39 1999 +++ phpdoc/configure.in Thu Oct 21 05:16:02 1999 @@ -1,4 +1,4 @@ -dnl $Id: configure.in,v 1.13 1999/10/21 08:36:39 cslawi Exp $ +dnl $Id: configure.in,v 1.14 1999/10/21 09:16:02 cslawi Exp $ AC_INIT(global.ent) @@ -8,6 +8,38 @@ dnl used by checkdoc AC_PATH_PROG(PERL_PATH, perl) +AC_MSG_CHECKING(for DocBook doctype) +check_catalog_files() { + for catalog in $@; do + DBDT=grep -E '^PUBLIC.*"docbook.dtd".*$' $catalog 2>/dev/null | cut -d'"' -f 2 + if test -n "$DBDT" ; then + DOCBOOK_DOCTYPE=$DBDT + return 1 + fi + MORECATS=grep -i '^catalog' $catalog 2>/dev/null | cut -d'"' -f 2 + if test -n "$MORECATS" ; then + if check_catalog_files $MORECATS ; then + return 1 + else + return 0 + fi + fi + return 0 + done + return 0 +} +if test -n "$SGML_CATALOG_FILES" ; then + CATFILES=echo $SGML_CATALOG_FILES | sed -e 's/:/ /'g + check_catalog_files $CATFILES +fi +if test -n "$DOCBOOK_DOCTYPE"; then + AC_MSG_RESULT(got $DOCBOOK_DOCTYPE) +else + DOCBOOK_DOCTYPE="-//Davenport//DTD DocBook V3.0//EN" + AC_MSG_RESULT(defaulting to $DOCBOOK_DOCTYPE) +fi +AC_SUBST(DOCBOOK_DOCTYPE) + AC_MSG_CHECKING(for docbook.dsl) for dir in /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh \ /usr/lib/dsssl/stylesheets/docbook \ @@ -53,5 +85,5 @@ AC_MSG_RESULT($PHP_SOURCE) AC_SUBST(PHP_SOURCE) -AC_OUTPUT(Makefile version.ent checkdoc howto.dsl html.dsl print.dsl phpweb.dsl php.dsl) +AC_OUTPUT(Makefile version.ent checkdoc manual.sgml howto.sgml howto.dsl html.dsl print.dsl phpweb.dsl php.dsl) chmod +x checkdoc

« previous php.dev (#11804) next »