summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am7
-rw-r--r--configure.ac67
-rw-r--r--doc/manpages/Makefile.am7
3 files changed, 53 insertions, 28 deletions
diff --git a/Makefile.am b/Makefile.am
index 3ca67f3326..9f6b199c12 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,10 +27,15 @@ if ENABLE_DANE
SUBDIRS += libdane
endif
-SUBDIRS += po src
+SUBDIRS += po
if ENABLE_DOC
SUBDIRS += doc
endif
+if ENABLE_TOOLS
+SUBDIRS += src
+else
+SUBDIRS += src/gl
+endif
if ENABLE_TESTS
SUBDIRS += tests
endif
diff --git a/configure.ac b/configure.ac
index a08d6f3102..202ad79f83 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,14 +45,27 @@ AC_PROG_CXX
AM_PROG_CC_C_O
AC_PROG_YACC
AC_PROG_SED
-AC_CHECK_PROG([AUTOGEN], [autogen], [autogen], [/bin/true])
-if test x"$AUTOGEN" = "x/bin/true"; then
- AC_MSG_WARN([[
+AC_ARG_ENABLE(doc,
+ AS_HELP_STRING([--disable-doc], [don't generate any documentation]),
+ enable_doc=$enableval, enable_doc=yes)
+AM_CONDITIONAL(ENABLE_DOC, test "$enable_doc" != "no")
+
+AC_ARG_ENABLE(tools,
+ AS_HELP_STRING([--disable-tools], [don't compile any tools]),
+ enable_tools=$enableval, enable_tools=yes)
+AM_CONDITIONAL(ENABLE_TOOLS, test "$enable_tools" != "no")
+
+if test "$enable_tools" != "no" || test "$enable_doc" != "no"; then
+ AC_CHECK_PROG([AUTOGEN], [autogen], [autogen], [/bin/true])
+
+ if test x"$AUTOGEN" = "x/bin/true"; then
+ AC_MSG_WARN([[
***
*** autogen not found. Will not link against libopts.
*** ]])
-enable_local_libopts=yes
+ enable_local_libopts=yes
+ fi
fi
# For includes/gnutls/gnutls.h.in.
@@ -174,14 +187,12 @@ dnl Try the hooks.m4
LIBGNUTLS_HOOKS
LIBGNUTLS_EXTRA_HOOKS
-AC_ARG_ENABLE(doc,
- AS_HELP_STRING([--disable-doc], [don't generate any documentation]),
- enable_doc=$enableval, enable_doc=yes)
-AM_CONDITIONAL(ENABLE_DOC, test "$enable_doc" != "no")
-
AC_ARG_ENABLE(tests,
AS_HELP_STRING([--disable-tests], [don't compile or run any tests]),
- enable_tests=$enableval, enable_tests=yes)
+ enable_tests=$enableval, enable_tests=$enable_tools)
+if test "$enable_tests" = "yes" && test "$enable_tools" = "no"; then
+ true #AC_MSG_ERROR([Cannot enable tests while disabling tools])
+fi
AM_CONDITIONAL(ENABLE_TESTS, test "$enable_tests" != "no")
GTK_DOC_CHECK(1.1)
@@ -508,24 +519,30 @@ fi
AM_CONDITIONAL(ENABLE_TROUSERS, test "$with_tpm" != "no")
-LIBOPTS_CHECK([src/libopts])
-if test "$NEED_LIBOPTS_DIR" = "true";then
- dnl replace libopts-generated files with distributed backups, if present
- missing_baks=
- for i in ${srcdir}/src/*-args.c.bak ${srcdir}/src/*-args.h.bak; do
- nam=`echo $i|sed 's/.bak//g'`
- if test -f $i;then
- cp -f $i $nam
- else
- missing_baks=true
+enable_local_libopts=no
+if test "$enable_tools" != "no" || test "$enable_doc" != "no"; then
+ LIBOPTS_CHECK([src/libopts])
+ if test "$NEED_LIBOPTS_DIR" = "true";then
+ dnl replace libopts-generated files with distributed backups, if present
+ missing_baks=
+ for i in ${srcdir}/src/*-args.c.bak ${srcdir}/src/*-args.h.bak; do
+ nam=`echo $i|sed 's/.bak//g'`
+ if test -f $i;then
+ cp -f $i $nam
+ else
+ missing_baks=true
+ fi
+ done
+ if test -z "$missing_baks"; then
+ AC_SUBST([AUTOGEN], [/bin/true])
fi
- done
- if test -z "$missing_baks"; then
- AC_SUBST([AUTOGEN], [/bin/true])
+ enable_local_libopts=yes
fi
- enable_local_libopts=yes
else
- enable_local_libopts=no
+ # Need to ensure the relevant conditionals get set
+ gl_STDNORETURN_H
+ AM_CONDITIONAL([INSTALL_LIBOPTS],[false])
+ AM_CONDITIONAL([NEED_LIBOPTS], [false])
fi
AM_CONDITIONAL(NEED_LIBOPTS, test "$enable_local_libopts" = "yes")
diff --git a/doc/manpages/Makefile.am b/doc/manpages/Makefile.am
index bba05ee103..1f5019af43 100644
--- a/doc/manpages/Makefile.am
+++ b/doc/manpages/Makefile.am
@@ -21,17 +21,20 @@
EXTRA_DIST = stamp_mans
-dist_man_MANS = gnutls-cli.1 gnutls-cli-debug.1 gnutls-serv.1 \
- certtool.1 psktool.1 p11tool.1 ocsptool.1 tpmtool.1
+dist_man_MANS =
-include $(top_srcdir)/doc/doc.mk
+if ENABLE_TOOLS
+dist_man_MANS += gnutls-cli.1 gnutls-cli-debug.1 gnutls-serv.1 \
+ certtool.1 psktool.1 p11tool.1 ocsptool.1 tpmtool.1
if ENABLE_SRP
dist_man_MANS += srptool.1
endif
if ENABLE_DANE
dist_man_MANS += danetool.1
endif
+endif
# Note that our .def files depend on autogen
# supporting the @subheading texi keyword. This