[tracker/rss-enclosures] tracker-nautilus-extension: Cleaned up CFLAGS/LIBS



commit 1f590c2d5b33a8cafc73a982d645063561ff0f24
Author: Martyn Russell <martyn lanedo com>
Date:   Mon Oct 25 12:33:23 2010 +0100

    tracker-nautilus-extension: Cleaned up CFLAGS/LIBS

 configure.ac                     |   65 +++++++++++++++++++------------------
 src/plugins/Makefile.am          |    2 +-
 src/plugins/nautilus/Makefile.am |   14 +++-----
 3 files changed, 39 insertions(+), 42 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 9d71683..0f1759f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -451,6 +451,19 @@ PKG_CHECK_MODULES(TRACKER_SEARCH_BAR, [$TRACKER_SEARCH_BAR_REQUIRED],
                   [have_tracker_search_bar=yes],
                   [have_tracker_search_bar=no])
 
+# Check requirements for Nautilus extension
+TRACKER_NAUTILUS_EXTENSION_REQUIRED="glib-2.0       >= $GLIB_REQUIRED
+                                     gio-unix-2.0   >= $GLIB_REQUIRED
+                                     gthread-2.0    >= $GLIB_REQUIRED
+                                     gtk+-2.0       >= $GTK_REQUIRED
+                                     dbus-1         >= $DBUS_REQUIRED
+                                     dbus-glib-1    >= $DBUS_GLIB_REQUIRED
+                                     libnautilus-extension"
+
+PKG_CHECK_MODULES(TRACKER_NAUTILUS_EXTENSION, [$TRACKER_NAUTILUS_EXTENSION_REQUIRED],
+                  [have_tracker_nautilus_extension=yes],
+                  [have_tracker_nautilus_extension=no])
+
 # General CFLAGS/LIBS
 BUILD_CFLAGS="${WARN_CFLAGS} ${GCOV_CFLAGS} -DG_LOG_DOMAIN=\\\"Tracker\\\" -DTRACKER_COMPILATION"
 BUILD_LIBS="${GCOV_LIBS}"
@@ -1918,49 +1931,37 @@ AM_CONDITIONAL(HAVE_MOCKUP, test "x$have_mockup" = "xyes")
 AC_ARG_ENABLE([nautilus-extension],
               AS_HELP_STRING([--enable-nautilus-extension],
                              [enable the nautilus extension [[default=auto]]]),,
-              [enable_nautilus_extension=auto])
-
-if test "x$enable_nautilus_extension" != "xno"; then
-   PKG_CHECK_MODULES([NAUTILUS_EXTENSION],
-                     [libnautilus-extension],
-                     [have_nautilus_extension=yes],
-                     [have_nautilus_extension=no])
+              [enable_tracker_nautilus=auto])
 
-   AC_SUBST(NAUTILUS_EXTENSION_CFLAGS)
-   AC_SUBST(NAUTILUS_EXTENSION_LIBS)
+if test "x$enable_tracker_nautilus_extension" = "xyes"; then
+   if test "x$have_tracker_nautilus_extension" != "xyes"; then
+      AC_MSG_ERROR([Couldn't find Tracker Nautilus extension dependencies ($TRACKER_NAUTILUS_EXTENSION_REQUIRED).])
+   fi
+else
+   if test "x$enable_tracker_nautilus_extension" = "xno"; then
+     have_tracker_nautilus_extension="no  (disabled)"
+   fi
+fi
 
-   if test "x$have_nautilus_extension" = "xyes"; then
-      AC_ARG_WITH([nautilus-extensions-dir],
+if test "x$have_tracker_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"
+   if test "x$with_nautilus_extensions_dir" = "x"; then
+      tracker_nautilus_extension_install_dir=`$PKG_CONFIG --variable=extensiondir libnautilus-extension`
    else
-      NAUTILUS_EXTENSION_INSTALL_DIR="/dev/null"
+      tracker_nautilus_extension_install_dir="$with_nautilus_extension_install_dir"
    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
+   TRACKER_NAUTILUS_EXTENSION_INSTALL_DIR="$tracker_nautilus_extension_install_dir"
 else
-   have_nautilus_extension="no  (disabled)"
+   TRACKER_NAUTILUS_EXTENSION_INSTALL_DIR="/dev/null"
 fi
 
-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
+AC_SUBST([TRACKER_NAUTILUS_EXTENSION_INSTALL_DIR])
 
-AM_CONDITIONAL(HAVE_NAUTILUS_EXTENSION, test "$have_nautilus_extension" = "yes")
+AM_CONDITIONAL(HAVE_TRACKER_NAUTILUS_EXTENSION, test "$have_tracker_nautilus_extension" = "yes")
 
 ####################################################################
 # Include/Exclude functional tests
@@ -2207,7 +2208,7 @@ Data Miners:
 
 Plugins:
 
-	Nautilus: (tagging widget)              $have_nautilus_extension
+	Nautilus: (tagging widget)              $have_tracker_nautilus_extension ($tracker_nautilus_extension_install_dir)
 
 Writeback:
 
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
index b515963..1e8abc8 100644
--- a/src/plugins/Makefile.am
+++ b/src/plugins/Makefile.am
@@ -6,6 +6,6 @@ if HAVE_MINER_EVOLUTION
 SUBDIRS += evolution
 endif
 
-if HAVE_NAUTILUS_EXTENSION
+if HAVE_TRACKER_NAUTILUS_EXTENSION
 SUBDIRS += nautilus
 endif
diff --git a/src/plugins/nautilus/Makefile.am b/src/plugins/nautilus/Makefile.am
index 9cd89fc..bf2c541 100644
--- a/src/plugins/nautilus/Makefile.am
+++ b/src/plugins/nautilus/Makefile.am
@@ -1,15 +1,12 @@
 include $(top_srcdir)/Makefile.decl
 
 INCLUDES =											\
+	$(BUILD_CFLAGS)										\
 	-I$(top_srcdir)/src									\
 	-I$(top_builddir)/src									\
-	$(GCOV_CFLAGS)										\
-	$(WARN_CFLAGS)										\
-	$(NAUTILUS_EXTENSION_CFLAGS)								\
-	$(TRACKER_APPS_CFLAGS)									\
-	$(DBUS_CFLAGS)
+	$(TRACKER_NAUTILUS_EXTENSION_CFLAGS)
 
-nautilus_extensiondir = $(NAUTILUS_EXTENSION_INSTALL_DIR)
+nautilus_extensiondir = $(TRACKER_NAUTILUS_EXTENSION_INSTALL_DIR)
 
 nautilus_extension_LTLIBRARIES = libnautilus-tracker-tags.la
 
@@ -23,6 +20,5 @@ libnautilus_tracker_tags_la_SOURCES =								\
 libnautilus_tracker_tags_la_LDFLAGS = -module -avoid-version
 libnautilus_tracker_tags_la_LIBADD =								\
 	$(top_builddir)/src/libtracker-client/libtracker-client- TRACKER_API_VERSION@.la	\
-	$(GCOV_LIBS)										\
-	$(NAUTILUS_EXTENSION_LIBS)								\
-	$(TRACKER_APPS_LIBS)
+	$(BUILD_LIBS)										\
+	$(TRACKER_NAUTILUS_EXTENSION_LIBS)



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