[tracker] Cleaned up configure.ac for consistency



commit 6909572d620345240794e694f2d045b3250badf7
Author: Martyn Russell <martyn lanedo com>
Date:   Mon Dec 14 11:55:33 2009 +0000

    Cleaned up configure.ac for consistency

 configure.ac            |   47 +++++++++++++++++++++++++++--------------------
 src/plugins/Makefile.am |    2 +-
 2 files changed, 28 insertions(+), 21 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 49c8e28..9512339 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1507,17 +1507,8 @@ AM_CONDITIONAL(HAVE_EVOLUTION_PLUGIN, test "$have_evolution_plugin" = "yes")
 
 AC_ARG_ENABLE([nautilus-extension],
               AS_HELP_STRING([--enable-nautilus-extension],
-                             [Enable the nautilus extension [[default=no]]]),
-              [enable_nautilus_extension=yes],
-              [enable_nautilus_extension=no])
-
-AM_CONDITIONAL([ENABLE_NAUTILUS_EXTENSION], [test "x$enable_nautilus_extension" != "xno"])
-
-AC_ARG_WITH([nautilus-extensions-dir],
-            AS_HELP_STRING([--with-nautilus-extensions-dir],
-                           [Path to Nautilus extensions directory]))
-
-NAUTILUS_EXTENSION_INSTALL_DIR="/dev/null"
+                             [Enable the nautilus extension [[default=auto]]]),
+              [enable_nautilus_extension=auto])
 
 if test "x$enable_nautilus_extension" != "xno"; then
    PKG_CHECK_MODULES([NAUTILUS_EXTENSION],
@@ -1525,22 +1516,41 @@ if test "x$enable_nautilus_extension" != "xno"; then
                      [have_nautilus_extension=yes],
                      [have_nautilus_extension=no])
 
+   AC_SUBST(NAUTILUS_EXTENSION_CFLAGS)
+   AC_SUBST(NAUTILUS_EXTENSION_LIBS)
+
    if test "x$have_nautilus_extension" = "xyes"; then
+      AC_ARG_WITH([nautilus-extensions-dir],
+                  AS_HELP_STRING([--with-nautilus-extensions-dir],
+                                 [Path to Nautilus extensions directory]))
+
       if test "x$with_nautilus_extensions_dir" = "x"; then
          nautilus_extensions_dir=`$PKG_CONFIG --variable=extensiondir libnautilus-extension`
       else
          nautilus_extensions_dir="$with_nautilus_extensions_dir"
       fi
-      NAUTILUS_EXTENSION_INSTALL_DIR="$nautilus_extensions_dir"
 
-      AC_DEFINE([HAVE_NAUTILUS_EXTENSION], [], [Define if we have libnautilus-extension])
+      NAUTILUS_EXTENSION_INSTALL_DIR="$nautilus_extensions_dir"
    else
-      AC_MSG_ERROR([Couldn't find Nautilus extension requirements (libnautilus-extension).])
+      NAUTILUS_EXTENSION_INSTALL_DIR="/dev/null"
+   fi
+
+   AC_SUBST([NAUTILUS_EXTENSION_INSTALL_DIR])
+
+   if test "x$have_nautilus_extension" = "xyes"; then
+      AC_DEFINE(HAVE_NAUTILUS_EXTENSION, 1, [Define if we have Nautilus extension])
    fi
+else
+   have_nautilus_extension="no  (disabled)"
 fi
 
-AC_SUBST([NAUTILUS_EXTENSION_INSTALL_DIR])
+if test "x$enable_nautilus_extension" = "xyes"; then
+   if test "x$have_nautilus_extension" != "xyes"; then
+      AC_MSG_ERROR([Couldn't find Nautilus extension requirements (libnautilus-extension-dev).])
+   fi
+fi
 
+AM_CONDITIONAL(HAVE_NAUTILUS_EXTENSION, test "$have_nautilus_extension" = "yes")
 
 ####################################################################
 # Include/Exclude functional tests
@@ -1751,12 +1761,9 @@ Metadata Extractors:
 	Support MP3 album art:                  $selected_for_albumart
 	Support playlists (w/ Totem):           $have_playlist
 
-Extensions:
-
-	Nautilus extension:			$enable_nautilus_extension
-
-Plugins:
+Plugins/Extensions:
 
+	Nautilus            (tagging widget)    $have_nautilus_extension
 	Evolution plugin    (data-push):	$enable_evolution_miner
 	KMail plugin        (data-push):	$enable_kmail_miner
 
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
index 713b415..c8a0b83 100644
--- a/src/plugins/Makefile.am
+++ b/src/plugins/Makefile.am
@@ -12,6 +12,6 @@ SUBDIRS += evolution
 endif
 endif
 
-if ENABLE_NAUTILUS_EXTENSION
+if HAVE_NAUTILUS_EXTENSION
 SUBDIRS += nautilus
 endif



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