Introspection really doesn't depend on whether we're building setting
docs.  Split these two up.
---
 Makefile.am  | 15 +++++++++------
 configure.ac | 42 ++++++++++++++++++++++++------------------
 2 files changed, 33 insertions(+), 24 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 1daf728..405d248 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -842,7 +842,7 @@ libnm/libnm.typelib: libnm/libnm.gir
 INTROSPECTION_GIRS += libnm/NM-1.0.gir
 endif
 
-if HAVE_INTROSPECTION
+if BUILD_SETTING_DOCS
 
 libnm_noinst_data = \
        libnm/nm-property-docs.xml \
@@ -3033,7 +3033,7 @@ endif
 
 
 clients_cli_settings_doc_c = clients/cli/settings-docs.c
-if HAVE_INTROSPECTION
+if BUILD_SETTING_DOCS
 $(clients_cli_settings_doc_c): clients/cli/settings-docs.xsl libnm/nm-property-docs.xml
        $(AM_V_GEN) $(XSLTPROC) --output $@ $^
 DISTCLEANFILES += $(clients_cli_settings_doc_c)
@@ -3926,7 +3926,7 @@ xsltproc_flags = \
        --stringparam man.authors.section.enabled 0 \
        --stringparam man.copyright.section.enabled 0
 
-if HAVE_INTROSPECTION
+if BUILD_SETTING_DOCS
 
 man/%.1 man/%.5 man/%.7 man/%.8: man/%.xml man/common.ent
        $(AM_V_GEN) $(XSLTPROC) --output $@ $(xsltproc_flags) 
http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
@@ -3938,7 +3938,7 @@ man_nm_settings_xml = \
        man/nm-settings-keyfile.xml \
        man/nm-settings-ifcfg-rh.xml
 
-if HAVE_INTROSPECTION
+if BUILD_SETTING_DOCS
 
 man/nm-setting%.xml: man/nm-setting%.xsl libnm/nm-setting%-docs.xml
        $(AM_V_GEN) $(XSLTPROC) --output $@ $(xsltproc_flags) $^
@@ -3994,20 +3994,23 @@ uninstall-hook-man:
 
 uninstall_hook += uninstall-hook-man
 
-if HAVE_INTROSPECTION
+if BUILD_SETTING_DOCS
 install_manpages = true
 man_MANS += $(man_pages)
 CLEANFILES += $(man_pages)
+else
 if SETTING_DOCS_AVAILABLE
+install_manpages = true
 man_MANS += $(man_pages_autogen)
 CLEANFILES += $(man_pages_autogen)
-endif
 else
 if INSTALL_PREGEN_MANPAGES
 install_manpages = true
 man_MANS += \
        $(man_pages) \
        $(man_pages_autogen)
+
+endif
 endif
 endif
 
diff --git a/configure.ac b/configure.ac
index 0d97428..b2d9a34 100644
--- a/configure.ac
+++ b/configure.ac
@@ -305,6 +305,9 @@ AM_CONDITIONAL(WITH_LEGACY_LIBRARIES, test "$with_libnm_glib" != "no")
 PKG_CHECK_MODULES(GUDEV, gudev-1.0 >= 165)
 
 GOBJECT_INTROSPECTION_CHECK([0.9.6])
+if test -n "$INTROSPECTION_MAKEFILE"; then
+    have_introspection=yes
+fi
 
 # Qt4
 PKG_CHECK_MODULES(QT, [QtCore >= 4 QtDBus QtNetwork], [have_qt=yes],[have_qt=no])
@@ -1100,28 +1103,31 @@ 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
-build_setting_docs=no
-if test -n "$INTROSPECTION_MAKEFILE"; 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_MSG_ERROR(["--enable-introspection aims to build the settings documentation. This requires 
GObject introspection for python (pygobject)])
+# check if we can build setting property documentation.  This requires
+# python, pygobject, xsltproc, and perl
+build_setting_docs="$enable_gtk_doc"
+if test "$have_introspection" = "yes"; then
+    AM_PATH_PYTHON([2.7], [have_python=yes], [have_python=no])
+    if test "$have_python" = "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
+            PYTHON=
+        fi
     fi
 
-    AC_PATH_PROG(PERL, perl, no)
-    AC_PATH_PROG(XSLTPROC, xsltproc, no)
+    AC_PATH_PROG(PERL, perl)
+    AC_SUBST(PERL)
+    AC_PATH_PROG(XSLTPROC, xsltproc)
+    AC_SUBST(XSLTPROC)
 
-    have_introspection=yes
-    if test "$enable_gtk_doc" = "yes"; then
-        build_setting_docs=yes
+    if test ! -x "$PYTHON" -o ! -x "$PERL" -o ! -x "$XSLTPROC"; then
+        AC_MSG_WARN(["settings documentation requires pygobject, xsltproc, and perl."])
+        build_setting_docs=no
     fi
-else
-    if test "$enable_gtk_doc" = "yes"; then
-        # large parts of the documentation require introspection/pygobject to extract
-        # the documentation out of the source files. You cannot enable gtk-doc without alone.
-        AC_MSG_ERROR(["--with-gtk-doc requires --enable-introspection"])
-    fi
-    have_introspection=no
+elif test "$build_setting_docs" = "yes"; then
+    # large parts of the documentation require introspection/pygobject to extract
+    # the documentation out of the source files. You cannot enable gtk-doc without alone.
+    AC_MSG_ERROR(["--with-gtk-doc requires --enable-introspection"])
 fi
 
 # check for pre-built setting docs
-- 
2.7.4
