--enable-ifupdown \
--enable-ifnet
-if HAVE_INTROSPECTION
-dist-check-introspection:
+if BUILD_SETTING_DOCS
+dist-check-setting-docs:
else
-dist-check-introspection:
- @echo "*** gobject-introspection is needed to run 'make dist'. ***"
- @echo "*** It was not enabled when 'configure' ran. ***"
+dist-check-setting-docs:
+ @echo "*** gobject-introspection and pygobject are needed to run 'make dist'. ***"
@false
endif
-dist: dist-check-introspection
+dist: dist-check-setting-docs
DISTCLEANFILES = intltool-extract intltool-merge intltool-update
$(top_builddir)/libnm-util/libnm-util.la \
$(top_builddir)/libnm-glib/libnm-glib.la
-if HAVE_INTROSPECTION
+if BUILD_SETTING_DOCS
settings-docs.c: settings-docs.xsl $(top_builddir)/libnm-util/nm-setting-docs.xml
$(AM_V_GEN) xsltproc --output $@ $^
return NULL;
}
-#ifdef HAVE_INTROSPECTION
+#if defined (BUILD_SETTING_DOCS) || defined (HAVE_SETTING_DOCS)
#include "settings-docs.c"
#else
#define nmc_setting_get_property_doc(setting, prop) _("(not available)")
AC_SUBST(GUDEV_LIBS)
GOBJECT_INTROSPECTION_CHECK([0.9.6])
-if test -n "$INTROSPECTION_MAKEFILE"; then
- AC_DEFINE(HAVE_INTROSPECTION, [1], [Define if you have gobject-introspection])
-fi
# Qt4
PKG_CHECK_MODULES(QT, [QtCore >= 4 QtDBus QtNetwork], [have_qt=yes],[have_qt=no])
fi
AM_CONDITIONAL(INSTALL_PREGEN_MANPAGES, test "x${install_pregen_manpages}" = "xyes")
+# check if we can build setting property documentation
+if test -n "$INTROSPECTION_MAKEFILE" -a "$enable_gtk_doc" = "yes"; then
+ # If g-i is installed we know we have python, but we might not have pygobject
+ if python -c 'from gi.repository import GObject' >& /dev/null; then
+ AC_DEFINE(BUILD_SETTING_DOCS, [1], [Define if you we can build nm-setting-docs.xml])
+ build_setting_docs=yes
+ fi
+fi
+
+# check for pre-built setting docs
+if test "$build_setting_docs" != "yes" \
+ -a -f man/nm-settings.xml \
+ -a -f docs/api/settings-spec.xml \
+ -a -f cli/src/settings-docs.c; then
+ AC_DEFINE(HAVE_SETTING_DOCS, [1], [Define if you have pre-built settings docs])
+ have_setting_docs=yes
+fi
+
+AM_CONDITIONAL(BUILD_SETTING_DOCS, test "$build_setting_docs" = "yes")
+AM_CONDITIONAL(SETTING_DOCS_AVAILABLE, test "$build_setting_docs" = "yes" -o "$have_setting_docs" = "yes")
+
AC_CONFIG_FILES([
Makefile
$(top_srcdir)/tools/doc-generator.xsl \
$(top_srcdir)/introspection/generic-types.xml
-GENERATED_FILES = spec.html settings-spec.xml
+GENERATED_FILES = spec.html
+
+if SETTING_DOCS_AVAILABLE
+
+settings-spec.xml: settings-spec.xsl $(top_builddir)/libnm-util/nm-setting-docs.xml
+ $(AM_V_GEN) xsltproc --output $@ $^
+
+# Top-level SGML file includes (depends on) settings-spec.xml
+$(DOC_MAIN_SGML_FILE): settings-spec.xml
+
+GENERATED_FILES += settings-spec.xml
+
+endif
if ENABLE_GTK_DOC
mkdir -p $(builddir)/html/
cp spec.html $(builddir)/html/
-settings-spec.xml: settings-spec.xsl $(top_builddir)/libnm-util/nm-setting-docs.xml
- $(AM_V_GEN) xsltproc --output $@ $^
-
all: $(GENERATED_FILES)
endif
-# Top-level SGML file includes (depends on) settings-spec.xml
-$(DOC_MAIN_SGML_FILE): settings-spec.xml
-
####################################
# The name of the module.
setting names (like "wimax" or "bluetooth") to a dictionary of
key/value pairs that represents each itself.
</para>
- <xi:include href="settings-spec.xml" />
+ <xi:include href="settings-spec.xml">
+ <xi:fallback>
+ <section>
+ <title>Configuration Settings</title>
+ <note><para>
+ (NetworkManager was built without full introspection support. Setting
+ documentation is not available.)
+ </para></note>
+ </section>
+ </xi:fallback>
+ </xi:include>
<section id="secrets-flags">
<title>Secret flag types</title>
<para>
CLEANFILES += $(gir_DATA) $(typelib_DATA)
+endif
+
+if BUILD_SETTING_DOCS
+
noinst_DATA = nm-setting-docs.xml
nm-setting-docs.xml: generate-setting-docs.py NetworkManager-1.0.gir libnm-util.la
%.5: %.xml
$(AM_V_GEN) xsltproc $(XSLTPROC_MAN_FLAGS) $<
+endif
+
+if BUILD_SETTING_DOCS
+
nm-settings.xml: nm-settings.xsl $(top_builddir)/libnm-util/nm-setting-docs.xml
$(AM_V_GEN) xsltproc \
--output $@ \
docbook_autogenerated_man_pages = \
nm-settings.5
-generated_man_pages = \
- $(docbook_generated_man_pages) \
- $(docbook_autogenerated_man_pages)
-
EXTRA_DIST += \
nm-settings.xml \
nm-settings.xsl \
man_MANS += $(configure_generated_man_pages)
if ENABLE_GTK_DOC
-man_MANS += $(generated_man_pages)
-CLEANFILES += \
- $(docbook_autogenerated_man_pages) \
- $(docbook_generated_man_pages)
+man_MANS += $(docbook_generated_man_pages)
+CLEANFILES += $(docbook_generated_man_pages)
+if BUILD_SETTING_DOCS
+man_MANS += $(docbook_autogenerated_man_pages)
+CLEANFILES += $(docbook_autogenerated_man_pages)
+endif
else
if INSTALL_PREGEN_MANPAGES
-man_MANS += $(generated_man_pages)
+man_MANS += \
+ $(docbook_generated_man_pages) \
+ $(docbook_autogenerated_man_pages)
endif
endif