cygwin-x-doc configure.ac,1.4,1.5
Alexander Gottwald
xserver-commit at pdx.freedesktop.org
Tue Apr 13 16:00:45 PDT 2004
Committed by: ago
Update of /cvs/xserver/cygwin-x-doc
In directory pdx:/tmp/cvs-serv29706
Modified Files:
configure.ac
Log Message:
make building of hardcopy docu configurable
check for docbook.dsl in different places. make it configurable
check for jadetex. don't build hardcopy docu if not available
Index: configure.ac
===================================================================
RCS file: /cvs/xserver/cygwin-x-doc/configure.ac,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- a/configure.ac 10 Apr 2004 18:13:50 -0000 1.4
+++ b/configure.ac 13 Apr 2004 23:00:42 -0000 1.5
@@ -7,39 +7,76 @@
# Checks for programs.
dnl --with-docdir
-AC_DEFUN([DISTCC_WITH_DOCDIR],
-[AC_ARG_WITH(docdir,
- AC_HELP_STRING([--with-docdir=DIR],
- [Use DIR to store documentation files (default ${datadir}/doc/cygwin-x-doc)]),
- [with_docdir=$withval])
-if test "x$with_docdir" = "x" ; then
- docdir='${datadir}/doc/cygwin-x-doc'
-else
- docdir=$with_docdir
-fi
+AC_ARG_WITH(docdir,
+ AC_HELP_STRING(
+ [--with-docdir=DIR], [general documentation (DATADIR/doc/cygwin-x-doc)]),
+ [docdir=$withval],
+ [docdir='${datadir}/doc/cygwin-x-doc'])
AC_SUBST(docdir)
-])
-
-dnl Run the check for --with-docdir
-DISTCC_WITH_DOCDIR
# dsssl processor
-AC_CHECK_PROGS([JADE],[jade openjade])
-if test "x$JADE" = "x" ; then
- AC_MSG_ERROR([No dsssl tool found. Cannot build documentation.])
-fi
+AC_CHECK_PROGS([JADE],[jade openjade],
+ AC_MSG_ERROR([No dsssl tool found. Cannot build documentation.]))
# sgml validator
-AC_CHECK_PROGS([NSGMLS],[nsgmls onsgmls])
-if test "x$NSGMLS" = "x" ; then
- AC_MSG_WARN([No sgml validator found. Cannot validate sgml content.])
+AC_CHECK_PROGS([NSGMLS],[nsgmls onsgmls],
+ AC_MSG_WARN([No sgml validator found. Cannot validate sgml content.]))
+
+AC_ARG_ENABLE(hardcopy,
+ AC_HELP_STRING(
+ [--disable-hardcopy], [disable building of hardcopy documentation]),
+ [build_hardcopy=$enableval],[build_hardcopy=auto]
+ )
+
+if test x$build_hardcopy != xno; then
+AC_CHECK_PROGS([JADETEX],[jadetex],
+ [
+ AC_MSG_WARN([jadetex not found. Cannot build hardcopy documentation.])
+ build_hardcopy=no
+ ])
fi
+AC_SUBST(JADETEX)
-AC_CONFIG_FILES([Makefile \
- cg/Makefile \
- faq/Makefile \
- ug/Makefile \
- stylesheets/Makefile \
- ug/figures/Makefile \
+dnl get the docbook.dsl file from the commandline
+AC_ARG_WITH(docbook-dsl,
+ AC_HELP_STRING(
+ [--with-docbook-dsl=FILE], [docbook.dsl stylesheet]),
+ [docbook_dsl_files=$withval],
+ [docbook_dsl_files=" \
+ /usr/share/sgml/docbook-dsssl/print/docbook.dsl \
+ /usr/share/sgml/docbook/stylesheet/modular/dsssl/print/docbook.dsl \
+ "
+ ])
+
+dnl check for installed docbook.dsl
+if test x$build_hardcopy != xno; then
+ for file in $docbook_dsl_files; do
+ AC_CHECK_FILE($file,
+ [
+ build_hardcopy=yes
+ docbook_dsl=$file
+ break
+ ])
+ done
+ if test x$build_hardcopy != xyes; then
+ AC_MSG_WARN([stylesheet not found. Cannot build hardcopy documentation.])
+ else
+ AC_MSG_NOTICE([build of hardcopy documentation enabled.])
+ DOCBOOK_DSL="$docbook_dsl"
+ fi
+else
+ AC_MSG_NOTICE([build of hardcopy documentation disabled.])
+fi
+
+dnl export settings to makefiles
+AC_SUBST(DOCBOOK_DSL)
+AM_CONDITIONAL(BUILD_HARDCOPY, test x$build_hardcopy = xyes)
+
+AC_CONFIG_FILES([Makefile
+ cg/Makefile
+ faq/Makefile
+ ug/Makefile
+ stylesheets/Makefile
+ ug/figures/Makefile
common/Makefile])
AC_OUTPUT
More information about the xserver-commit
mailing list