summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac19
1 files changed, 18 insertions, 1 deletions
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