Add configure-option to disable building docs
diff --git a/Makefile.am b/Makefile.am
index 6fb3d47..5712edd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -15,7 +15,11 @@ EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj \
libffi.xcodeproj/project.pbxproj \
libtool-ldflags
-info_TEXINFOS = doc/libffi.texi
+
+info_TEXINFOS =
+if BUILD_DOCS
+#info_TEXINFOS += doc/libffi.texi
+endif
## ################################################################
diff --git a/configure.ac b/configure.ac
index 445c589..669c9f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -282,6 +282,13 @@ if test "x$GCC" = "xyes"; then
fi
fi
+AC_ARG_ENABLE(docs,
+ AC_HELP_STRING([--disable-docs],
+ [Disable building of docs (default: no)]),
+ [enable_docs=no],
+ [enable_docs=yes])
+AM_CONDITIONAL(BUILD_DOCS, [test x$enable_docs = xyes])
+
AH_BOTTOM([
#ifdef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE
#ifdef LIBFFI_ASM