[f-spot] [build] Add --disable-user-help flag



commit 3069379fe9b1faaa961aa6c803ff7fe55d0db3ca
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Thu Jun 17 17:54:41 2010 -0700

    [build] Add --disable-user-help flag

 build/m4/shamrock/gnome-doc.m4 |   20 ++++++++++++++++++--
 configure.ac                   |    2 +-
 help/Makefile.am               |    2 +-
 3 files changed, 20 insertions(+), 4 deletions(-)
---
diff --git a/build/m4/shamrock/gnome-doc.m4 b/build/m4/shamrock/gnome-doc.m4
index e8896bd..3f5f638 100644
--- a/build/m4/shamrock/gnome-doc.m4
+++ b/build/m4/shamrock/gnome-doc.m4
@@ -1,6 +1,22 @@
 AC_DEFUN([SHAMROCK_CHECK_GNOME_DOC_UTILS],
 [
-	GNOME_DOC_INIT([$1], HAVE_GNOME_DOC_UTILS=yes, HAVE_GNOME_DOC_UTILS=no)
+    AC_ARG_ENABLE([user-help],
+           AC_HELP_STRING([--enable-user-help], [Enable building the user-help [[default=auto]]]),,
+           enable_user_help=auto)
 
-	AM_CONDITIONAL(ENABLE_GNOME_DOCS, test "x$HAVE_GNOME_DOC_UTILS" = "xyes")
+	if test "x$enable_user_help" = "xauto"; then
+        PKG_CHECK_MODULES(GNOME_DOC_UTILS,
+            gnome-doc-utils,
+            enable_user_help=yes, enable_user_help=no)
+    elif test "x$enable_user_help" = "xyes"; then
+        PKG_CHECK_MODULES(GNOME_DOC_UTILS, gnome-doc-utils)
+    fi
+
+	if test "x$enable_user_help" = "xyes"; then
+        GNOME_DOC_INIT([$1], enable_user_help=yes, enable_user_help=no)
+    else
+        AM_CONDITIONAL(ENABLE_SK, false)
+    fi
+
+	AM_CONDITIONAL(HAVE_GNOME_DOC_UTILS, test "x$enable_user_help" = "xyes")
 ])
diff --git a/configure.ac b/configure.ac
index a42bb3d..146b029 100644
--- a/configure.ac
+++ b/configure.ac
@@ -400,7 +400,7 @@ ${PACKAGE}-${VERSION}
 
   Build/Development:
     Unit Tests:        ${do_tests}
-    User Help:         ${HAVE_GNOME_DOC_UTILS} (requires gnome-doc-utils >= 0.17.3)
+    User Help:         ${enable_user_help} (requires gnome-doc-utils >= 0.17.3)
 
 Run 'make' to build F-Spot.
 
diff --git a/help/Makefile.am b/help/Makefile.am
index 39cda81..fb47cf6 100644
--- a/help/Makefile.am
+++ b/help/Makefile.am
@@ -1,4 +1,4 @@
-if ENABLE_GNOME_DOCS
+if HAVE_GNOME_DOC_UTILS
 include $(top_srcdir)/gnome-doc-utils.make
 
 DOC_ID = f-spot



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]