summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2014-06-27 12:25:54 -0400
committerDan Winship <danw@gnome.org>2014-06-27 17:24:57 -0400
commit377f72a66f0f3794780da77aa3090fd575639b43 (patch)
tree026f394f7aa27d0424f18bfa197ff2db4d7fcb0f /configure.ac
parent87c48023f149d70d031def5150c1093f07e33178 (diff)
downloadNetworkManager-377f72a66f0f3794780da77aa3090fd575639b43.tar.gz
build: fix nm-setting-docs build in various configurations
Certain build configurations (like --enable-gtk-doc --disable-introspection) were broken with respect to nm-setting-docs. Fix this. Also, we don't require just gobject-introspection, we need pygobject specifically as well.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac24
1 files changed, 21 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index e152fa0e0d..e3102d15da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -267,9 +267,6 @@ AC_SUBST(GUDEV_CFLAGS)
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])
@@ -772,6 +769,27 @@ if test "$enable_gtk_doc" != "yes" \
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