From 465e8fbf73bb49586db7876785dc14067b55e42d Mon Sep 17 00:00:00 2001 From: fche Date: Thu, 28 Feb 2008 04:21:15 +0000 Subject: PR5697 part 2: tutorial/langref configury 2008-02-27 Frank Ch. Eigler PR5697 * configure.ac (enable-docs): Implement. * systemtap.spec.in: Add optional docs build/install/prereqs. * Makefile.am (SUBDIRS): Add doc. * Makefile.in, configure: Regenerated. --- configure.ac | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 990245a9..93a0327f 100644 --- a/configure.ac +++ b/configure.ac @@ -121,6 +121,23 @@ AC_ARG_ENABLE([crash], [enable_crash="no"]) AM_CONDITIONAL([BUILD_CRASHMOD], [test "$enable_crash" != "no"]) +dnl Handle the option to build the documentation +AC_ARG_ENABLE([docs], + AS_HELP_STRING([--enable-docs], + [enable building documentation (default on if latex etc. found).]), + [enable_docs=$enableval], + [enable_docs="check"]) +AC_CHECK_PROG(have_latex, latex, yes, no) +AC_CHECK_PROG(have_dvips, dvips, yes, no) +AC_CHECK_PROG(have_ps2pdf, ps2pdf, yes, no) +AC_CHECK_PROG(have_latex2html, latex2html, yes, no) +if test "$enable_docs" == "yes"; then + if test "x${have_latex}${have_dvips}${have_ps2pdf}${have_latex2html}" != "xyesyesyesyes"; then + AC_MSG_ERROR([cannot find all tools for building documentation]) + fi +fi +AM_CONDITIONAL([BUILD_DOCS], [test "x${have_latex}${have_dvips}${have_ps2pdf}${have_latex2html}" == "xyesyesyesyes" -a "$enable_docs" != "no"]) + AC_CHECK_HEADERS([sys/capability.h], , [AC_MSG_ERROR([cannot find required libcap header (libcap-devel may need to be installed)])]) @@ -195,7 +212,7 @@ if test -d $srcdir/.git -a ! -f $srcdir/SNAPSHOT; then fi AC_CONFIG_HEADERS([config.h:config.in]) -AC_CONFIG_FILES(Makefile systemtap.spec stap.1 stapprobes.5 stapfuncs.5 stapex.5 staprun.8 man/stapprobes.iosched.5 man/stapprobes.netdev.5 man/stapprobes.nfs.5 man/stapprobes.nfsd.5 man/stapprobes.pagefault.5 man/stapprobes.process.5 man/stapprobes.rpc.5 man/stapprobes.scsi.5 man/stapprobes.signal.5 man/stapprobes.socket.5 man/stapprobes.tcp.5 man/stapprobes.udp.5) +AC_CONFIG_FILES(Makefile doc/Makefile systemtap.spec stap.1 stapprobes.5 stapfuncs.5 stapex.5 staprun.8 man/stapprobes.iosched.5 man/stapprobes.netdev.5 man/stapprobes.nfs.5 man/stapprobes.nfsd.5 man/stapprobes.pagefault.5 man/stapprobes.process.5 man/stapprobes.rpc.5 man/stapprobes.scsi.5 man/stapprobes.signal.5 man/stapprobes.socket.5 man/stapprobes.tcp.5 man/stapprobes.udp.5) AC_CONFIG_SUBDIRS(testsuite) AC_OUTPUT -- cgit