]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
Make documentation optional.
authorSam Thursfield <sam.thursfield@codethink.co.uk>
Wed, 22 Aug 2012 12:06:31 +0000 (14:06 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Wed, 22 Aug 2012 12:06:31 +0000 (14:06 +0200)
ChangeLog
Makefile.in
configure.ac

index 88a767aa5903fdcda50c88f2f17f72d8f93cdb9b..451f4b3ca8b475f9f204c43eda7fd51dfc93e2ac 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-08-22  Niels Möller  <nisse@lysator.liu.se>
+
+       From Sam Thursfield <sam.thursfield@codethink.co.uk>:
+       * configure.ac: Make documentation optional, to avoid requiring
+       TeX. New option --disable-documentation, and Makefile substitution
+       IF_DOCUMENTATION.
+       * Makefile.in: Use IF_DOCUMENTATION.
+
 2012-07-12  Niels Möller  <nisse@lysator.liu.se>
 
        * asm.m4 (ALIGN): Use << operator rather than **, with m4 eval.
index be0de3cd3644b7b5b176e8189a9b96cc1fa1c561..cf9359398e0bac26d304e7ec1e973856d8342158 100644 (file)
@@ -35,7 +35,7 @@ TARGETS = aesdata$(EXEEXT) desdata$(EXEEXT) twofishdata$(EXEEXT) \
          $(LIBTARGETS) @IF_SHARED@ $(SHLIBTARGETS)
 IMPLICIT_TARGETS = @IF_DLL@ $(LIBNETTLE_FILE) $(LIBHOGWEED_FILE)
 
-DOCTARGETS = nettle.info nettle.html nettle.pdf
+DOCTARGETS = @IF_DOCUMENTATION@ nettle.info nettle.html nettle.pdf
 
 PKGCONFIG_FILES = nettle.pc @IF_HOGWEED@ hogweed.pc
 pkgconfigdir = $(libdir)/pkgconfig
@@ -302,7 +302,8 @@ hogweed.pc: hogweed.pc.in config.status
        ./config.status $@
 
 # Installation
-install-here: install-info install-headers install-static install-pkgconfig \
+install-doc: @IF_DOCUMENTATION@ install-info
+install-here: install-doc install-headers install-static install-pkgconfig \
        @IF_SHARED@ install-shared-nettle @IF_HOGWEED@ install-shared-hogweed
 
 install-static: $(LIBTARGETS)
index 41526764f9ab764ebcaf54eb2036dcb6e3a243bc..f6b6d83d39d3f941c2d4455afafee42e3e015348 100644 (file)
@@ -60,6 +60,10 @@ AC_ARG_ENABLE(gcov,
   AC_HELP_STRING([--enable-gcov], [Instrument for gcov (requires a modern gcc)]),,
   [enable_gcov=no])
 
+AC_ARG_ENABLE(documentation,
+  AC_HELP_STRING([--enable-documentation], [Generate TeX documentation (default=auto)]),,
+  [enable_documentation=auto])
+
 LSH_RPATH_INIT([`echo $with_lib_path | sed 's/:/ /g'` \
     `echo $exec_prefix | sed "s@^NONE@$prefix/lib@g" | sed "s@^NONE@$ac_default_prefix/lib@g"` \
     /usr/local/lib /sw/local/lib /sw/lib \
@@ -572,8 +576,31 @@ else
   IF_SHARED='#'
 fi
 
+# Documentation tools
+if test "x$enable_documentation" != "xno"; then
+  AC_PATH_PROG(MAKEINFO, makeinfo, not-found)
+
+  if test "x$MAKEINFO" != "xnot-found"; then
+    enable_documentation=yes
+    AC_SUBST(MAKEINFO)
+  else
+    if test "x$enable_documentation" == "xauto" ; then
+      enable_documentation=no
+    else
+      AC_MSG_ERROR([Cannot find 'makeinfo', required for documentation.])
+    fi
+  fi
+fi
+
+if test "x$enable_documentation" = "xyes" ; then
+  IF_DOCUMENTATION=''
+else
+  IF_DOCUMENTATION='#'
+fi
+
 AC_SUBST(IF_HOGWEED)
 AC_SUBST(IF_SHARED)
+AC_SUBST(IF_DOCUMENTATION)
 AC_SUBST(IF_DLL)
 
 OPENSSL_LIBFLAGS=''
@@ -656,4 +683,5 @@ AC_MSG_NOTICE([summary of build options:
   Compiler:          ${CC}
   Shared libraries:  ${enable_shared}
   Public key crypto: ${enable_public_key}
+  Documentation:     ${enable_documentation}
 ])