summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2013-05-10 09:55:09 -0500
committerDan Williams <dcbw@redhat.com>2013-05-14 10:53:46 -0500
commit3a5bf0517caa421efe9e3e64eeb96b0358480384 (patch)
treec3ce2121a298fc29bbd0e4ac97cca156eee823a1 /configure.ac
parentf762fa58d696959790b72a3cf6c4416cb8e92378 (diff)
downloadNetworkManager-3a5bf0517caa421efe9e3e64eeb96b0358480384.tar.gz
build: always generate docs at dist time (bgo #700093)
dist tarballs shouldn't ever be released without the documentation, and this allows us to build the tarballs with pre-generated docs that get installed on the end system, but don't need to be built there. So the end system doesn't need gtk-doc installed, only the dist system does. https://bugzilla.gnome.org/show_bug.cgi?id=700093
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac27
1 files changed, 16 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index a8096aed98..27a3717b19 100644
--- a/configure.ac
+++ b/configure.ac
@@ -603,19 +603,14 @@ VAPIGEN_CHECK(0.17.1.24)
# Tests, utilities and documentation
AC_ARG_ENABLE(tests, AS_HELP_STRING([--enable-tests=root|yes|no], [Build NetworkManager tests (default: yes)]))
AC_ARG_WITH(valgrind, AS_HELP_STRING([--with-valgrind=yes|no|path], [Use valgrind to memory-check the tests (default: yes)]))
-AC_ARG_ENABLE(doc, AS_HELP_STRING([--enable-doc], [Build NetworkManager documentation (default: no)]))
-# Fallback to --with-tests and with-docs
+# Fallback to --with-tests
AC_ARG_WITH(tests, AS_HELP_STRING([--with-tests], [Build NetworkManager tests (deprecated)]))
-AC_ARG_WITH(docs, AS_HELP_STRING([--with-docs], [Build NetworkManager documentation (deprecated)]))
AS_IF([test -n "$with_tests"], enable_tests="$with_tests")
-AS_IF([test -n "$with_docs"], enable_doc="$with_docs")
-# Default to --enable-tests --with-valgrind --disable-docs
+# Default to --enable-tests --with-valgrind
AS_IF([test -z "$enable_tests"], enable_tests="yes")
AS_IF([test -z "$with_valgrind"], with_valgrind="yes")
-AS_IF([test -z "$enable_doc"], enable_doc="no")
# Normalize values
AS_IF([test "$enable_tests" != "yes" -a "$enable_tests" != "root"], enable_tests="no")
-AS_IF([test "$enable_doc" != "yes"], enable_doc="no")
# Search for tools
AS_IF([test "$with_valgrind" == "yes"],
[AC_PATH_PROGS(with_valgrind, valgrind, no)])
@@ -625,11 +620,21 @@ AM_CONDITIONAL(RUN_ROOT_TESTS, test "$enable_tests" == "root")
AS_IF([test "$with_valgrind" != "no"],
AC_SUBST(VALGRIND_RULES, "TESTS_ENVIRONMENT = G_SLICE=always-malloc G_DEBUG=gc-friendly \$(LIBTOOL) --mode=execute $with_valgrind --quiet --error-exitcode=1 --leak-check=full --gen-suppressions=all --suppressions=\$(top_srcdir)/valgrind.suppressions"),
AC_SUBST(VALGRIND_RULES, []))
-AM_CONDITIONAL(ENABLE_DOC, test "$enable_doc" = "yes")
-# Add gtk-doc conditionals
-enable_gtk_doc="$enable_doc"
+
GTK_DOC_CHECK(1.0)
+# check for pregenerated manpages to be installed
+install_pregen_manpages=no
+if test "$enable_gtk_doc" != "yes" \
+ -a -f man/NetworkManager.conf.5 \
+ -a -f man/nm-settings.5 \
+ -a -f man/NetworkManager.8; then
+ install_pregen_manpages=yes
+fi
+AM_CONDITIONAL(INSTALL_PREGEN_MANPAGES, test "x${install_pregen_manpages}" = "xyes")
+echo " man: $install_pregen_manpages"
+
+
AC_CONFIG_FILES([
Makefile
include/Makefile
@@ -762,7 +767,7 @@ echo " dhcpcd: $with_dhcpcd"
echo
echo "Miscellaneous:"
-echo " documentation: $enable_doc"
+echo " documentation: $enable_gtk_doc"
echo " tests: $enable_tests"
echo " valgrind: $with_valgrind"
echo " code coverage: $enable_code_coverage"