diff configure.ac @ 10092:02453ee20140

allow building of docs to be disabled
author John W. Eaton <jwe@octave.org>
date Wed, 13 Jan 2010 03:40:45 -0500
parents 6ece454060b3
children 8590f3c51868
line wrap: on
line diff
--- a/configure.ac	Wed Jan 13 03:00:14 2010 -0500
+++ b/configure.ac	Wed Jan 13 03:40:45 2010 -0500
@@ -152,6 +152,19 @@
   AC_DEFINE(BOUNDS_CHECKING, 1, [Define to use internal bounds checking.])
 fi
 
+### Make it possible to disable running Make in the doc directory.
+### Useful for building on systems without TeX, for example.
+DOCDIR=doc
+AC_ARG_ENABLE(docs,
+  [AS_HELP_STRING([--enable-docs], [build documentation (default is yes)])],
+  [if test "$enableval" = no; then
+     DOCDIR=
+     warn_docs="building documentation disabled; make dist will fail"
+     AC_MSG_WARN([$warn_docs])
+   fi], [])
+AC_SUBST(DOCDIR)
+AM_CONDITIONAL([AMCOND_BUILD_DOCS], [test -n "$DOCDIR"])
+
 ### If possible, use a 64-bit integer type for array dimensions and indexing.
 
 USE_64_BIT_IDX_T=false
@@ -2281,6 +2294,11 @@
   warn_msg_printed=true
 fi
 
+if test -n "$warn_docs"; then
+  AC_MSG_WARN([$warn_docs])
+  warn_msg_printed=true
+fi
+
 if test -n "$warn_64_bit"; then
   AC_MSG_WARN([$warn_64_bit])
   warn_msg_printed=true