+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.
$(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
./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)
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 \
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=''
Compiler: ${CC}
Shared libraries: ${enable_shared}
Public key crypto: ${enable_public_key}
+ Documentation: ${enable_documentation}
])