[anjuta] build: only link plugins against necessary libraries



commit 2b76a66a9e7674b6652d18170b73d5cf46b00ad2
Author: Johannes Schmid <jhs gnome org>
Date:   Thu Nov 4 17:22:04 2010 +0100

    build: only link plugins against necessary libraries

 configure.ac                              |   36 +++++++++++++---------------
 libanjuta/Makefile.am                     |    1 +
 plugins/gbf-am/Makefile.am                |    6 ++--
 plugins/gbf-mkfile/Makefile.am            |    6 ++--
 plugins/gdb/Makefile.am                   |    6 +++-
 plugins/language-manager/Makefile.am      |    5 ++-
 plugins/snippets-manager/Makefile.am      |    4 ++-
 plugins/symbol-db/Makefile.am             |    4 +-
 plugins/symbol-db/anjuta-tags/Makefile.am |    4 +-
 plugins/terminal/Makefile.am              |    1 -
 src/Makefile.am                           |    6 ++--
 11 files changed, 41 insertions(+), 38 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 1f40614..cb19279 100644
--- a/configure.ac
+++ b/configure.ac
@@ -107,6 +107,9 @@ dnl 	DEPRECATED_FLAGS="-DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
 dnl	AC_SUBST(DEPRECATED_FLAGS)
 dnl fi
 
+dnl Check for pkg-config
+PKG_PROG_PKG_CONFIG([0.22])
+
 dnl Enable versioned user preferences directory
 AC_ARG_WITH(pref-suffix,
   AS_HELP_STRING([--with-pref-suffix=VALUE],[Suffix to add to user preferences dir.]),
@@ -133,14 +136,6 @@ dnl ***************************************************************************
 gjsdir=`pkg-config --variable=jsdir gjs-1.0`
 AC_SUBST(gjsdir)
 
-dnl ***************************************************************************
-dnl Check for pkgconfig
-dnl ***************************************************************************
-AC_PATH_PROG(PKG_CONFIG, pkg-config,no)
-if test x$PKG_CONFIG = xno; then
-  AC_MSG_ERROR(Please install the pkg-config package from http://www.freedesktop.org/software/pkgconfig/)
-fi
-
 dnl Check base modules
 
 PKG_CHECK_MODULES([ANJUTA],
@@ -149,12 +144,20 @@ PKG_CHECK_MODULES([ANJUTA],
 	glib-2.0 >= $GLIB_REQUIRED
 	gio-2.0 >= $GLIB_REQUIRED
 	gtk+-3.0 >= $GTK_REQUIRED
-	gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED
-	vte-2.90 >= $VTE_REQUIRED
-	libxml-2.0 >= $LIBXML_REQUIRED
-	gdl-3.0 >= $GDL_REQUIRED
-	libgda-4.0 >= $GDA_REQUIRED
-	libxslt])
+	gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED])
+
+PKG_CHECK_MODULES([XML],
+   [libxml-2.0 >= $LIBXML_REQUIRED])
+
+PKG_CHECK_MODULES([GDL],
+   [gdl-3.0 >= $GDL_REQUIRED])
+
+PKG_CHECK_MODULES([GDA],
+   [libgda-4.0 >= $GDA_REQUIRED])
+	
+PKG_CHECK_MODULES([VTE],
+   [vte-2.90 >= $VTE_REQUIRED])
+
 
 dnl Check for autogen
 dnl -----------------
@@ -350,11 +353,6 @@ AC_SUBST(anjuta_glade_dir)
 AC_SUBST(anjuta_image_dir)
 
 dnl ***************************************************************************
-dnl Check for old vte version
-dnl ***************************************************************************
-PKG_CHECK_MODULES(VTE, vte >= $VTE_REQUIRED)
-
-dnl ***************************************************************************
 dnl Check for marshal and enum generators
 dnl ***************************************************************************
 GLIB_GENMARSHAL="`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`"
diff --git a/libanjuta/Makefile.am b/libanjuta/Makefile.am
index 522c347..5720392 100644
--- a/libanjuta/Makefile.am
+++ b/libanjuta/Makefile.am
@@ -7,6 +7,7 @@ AM_CPPFLAGS = \
 	$(WARN_CFLAGS) \
 	$(DEPRECATED_FLAGS) \
 	$(ANJUTA_CFLAGS) \
+	$(XML_CFLAGS) \
 	-DDATADIR="\"$(datadir)\"" \
 	-DPACKAGE_PIXMAPS_DIR="\"$(datadir)/pixmaps/$(PACKAGE)\"" \
 	-DPACKAGE_DATA_DIR="\"$(datadir)/$(PACKAGE)\"" \
diff --git a/plugins/gbf-am/Makefile.am b/plugins/gbf-am/Makefile.am
index 608c846..06f3064 100644
--- a/plugins/gbf-am/Makefile.am
+++ b/plugins/gbf-am/Makefile.am
@@ -25,7 +25,7 @@ AM_CPPFLAGS = 					\
 	$(WARN_CFLAGS) \
 	$(DEPRECATED_FLAGS) \
 	$(GIO_CFLAGS) \
-	$(LIBXML_CFLAGS) \
+	$(XML_CFLAGS) \
 	$(LIBANJUTA_CFLAGS) \
 	-DSCRIPTS_DIR=\"$(scriptsdir)\"
 	-DG_LOG_DOMAIN=\"libgbf-am\"
@@ -48,7 +48,7 @@ libgbf_am_la_LDFLAGS = $(ANJUTA_PLUGIN_LDFLAGS)
 libgbf_am_la_LIBADD = \
 	$(GIO_LIBS) \
 	$(LIBANJUTA_LIBS) \
-  $(LIBXML_LIBS)
+  	$(XML_LIBS)
 
 # Test program
 
@@ -63,7 +63,7 @@ test_SOURCES = \
 
 test_LDADD = \
 	$(LIBANJUTA_LIBS) \
-	$(LIBXML_LIBS)
+	$(XML_LIBS)
 # This last line do nothing but it is needed to avoid the error
 # gbf-am-*.o created with both libtool and without
 # Need AM_PROG_CC_C_0 in configure.in too
diff --git a/plugins/gbf-mkfile/Makefile.am b/plugins/gbf-mkfile/Makefile.am
index b978990..8475cbf 100644
--- a/plugins/gbf-mkfile/Makefile.am
+++ b/plugins/gbf-mkfile/Makefile.am
@@ -25,7 +25,7 @@ AM_CPPFLAGS = 					\
 	$(WARN_CFLAGS) \
 	$(DEPRECATED_FLAGS) \
 	$(GIO_CFLAGS) \
-	$(LIBXML_CFLAGS) \
+	$(XML_CFLAGS) \
 	$(LIBANJUTA_CFLAGS) \
 	-DSCRIPTS_DIR=\"$(scriptsdir)\"
 
@@ -46,7 +46,8 @@ libgbf_mkfile_la_LDFLAGS = $(ANJUTA_PLUGIN_LDFLAGS)
 
 libgbf_mkfile_la_LIBADD = \
 	$(GIO_LIBS) \
-	$(LIBANJUTA_LIBS)
+	$(LIBANJUTA_LIBS) \
+	$(XML_LIBS)
 
 EXTRA_DIST = \
 	$(plugin_in_files) \
@@ -59,5 +60,4 @@ DISTCLEANFILES = \
 
 SUBDIRS = GBF
 
-
 -include $(top_srcdir)/git.mk
diff --git a/plugins/gdb/Makefile.am b/plugins/gdb/Makefile.am
index 22e7c5b..0de71d9 100644
--- a/plugins/gdb/Makefile.am
+++ b/plugins/gdb/Makefile.am
@@ -24,6 +24,7 @@ AM_CPPFLAGS= \
 	$(WARN_CFLAGS) \
 	$(DEPRECATED_FLAGS) \
 	$(LIBANJUTA_CFLAGS) \
+	$(XML_CFLAGS)
 	-DG_LOG_DOMAIN=\"libanjuta-gdb\"
 
 plugindir = $(anjuta_plugin_dir)
@@ -33,7 +34,8 @@ libanjuta_gdb_la_LDFLAGS = $(ANJUTA_PLUGIN_LDFLAGS)
 
 libanjuta_gdb_la_LIBADD = \
 	$(GTK_LIBS) \
-	$(LIBANJUTA_LIBS)
+	$(LIBANJUTA_LIBS) \
+	$(XML_LIBS)
 
 libanjuta_gdb_la_SOURCES = \
 	gdbmi.c \
@@ -49,7 +51,7 @@ libanjuta_gdb_la_SOURCES = \
 
 noinst_PROGRAMS = gdbmi-test
 gdbmi_test_SOURCES = gdbmi-test.c gdbmi.c gdbmi.h debugger.h
-gdbmi_test_LDADD = $(GTK_LIBS) $(LIBANJUTA_LIBS) $(LIBXML_LIBS)
+gdbmi_test_LDADD = $(GTK_LIBS) $(LIBANJUTA_LIBS) $(XML_LIBS)
 # This last line do nothing but it is needed to avoid the error
 # gdbmi.o created with both libtool and without
 # Need AM_PROG_CC_C_0 in configure.in too
diff --git a/plugins/language-manager/Makefile.am b/plugins/language-manager/Makefile.am
index 791bc30..8256dfc 100644
--- a/plugins/language-manager/Makefile.am
+++ b/plugins/language-manager/Makefile.am
@@ -24,7 +24,7 @@ language_manager_plugin_DATA = $(plugin_in_files:.plugin.in=.plugin)
 
 # Include paths
 AM_CPPFLAGS = \
-	$(LIBXML_CFLAGS) \
+	$(XML_CFLAGS) \
 	$(LIBANJUTA_CFLAGS)
 
 # Where to install the plugin
@@ -38,7 +38,8 @@ liblanguage_manager_la_SOURCES = plugin.c plugin.h
 
 # Plugin dependencies
 liblanguage_manager_la_LIBADD = \
-	$(LIBANJUTA_LIBS) 
+	$(LIBANJUTA_LIBS) \
+	$(XML_LIBS) 
 
 liblanguage_manager_la_LDFLAGS = $(ANJUTA_PLUGIN_LDFLAGS)
 
diff --git a/plugins/snippets-manager/Makefile.am b/plugins/snippets-manager/Makefile.am
index 1257547..5f99cb9 100644
--- a/plugins/snippets-manager/Makefile.am
+++ b/plugins/snippets-manager/Makefile.am
@@ -34,6 +34,7 @@ AM_CPPFLAGS= \
 	$(DEPRECATED_FLAGS) \
 	$(LIBXML_CFLAGS) \
 	$(LIBANJUTA_CFLAGS) \
+	$(XML_CFLAGS) \
 	-DG_LOG_DOMAIN=\"libanjuta-snippets-manager\"
 
 plugindir = $(anjuta_plugin_dir)
@@ -43,7 +44,8 @@ libanjuta_snippets_manager_la_LDFLAGS = $(ANJUTA_PLUGIN_LDFLAGS)
 
 libanjuta_snippets_manager_la_LIBADD = \
 	$(GIO_LIBS) \
-	$(LIBANJUTA_LIBS)
+	$(LIBANJUTA_LIBS) \
+	$(XML_LIBS)
 
 libanjuta_snippets_manager_la_SOURCES = \
 	snippet.c\
diff --git a/plugins/symbol-db/Makefile.am b/plugins/symbol-db/Makefile.am
index d358dd0..6f06f49 100644
--- a/plugins/symbol-db/Makefile.am
+++ b/plugins/symbol-db/Makefile.am
@@ -37,7 +37,7 @@ symbol_db_plugin_DATA = $(plugin_in_files:.plugin.in=.plugin)
 AM_CPPFLAGS = \
 	$(WARN_CFLAGS) \
 	$(DEPRECATED_FLAGS) \
-	$(GDL_CFLAGS) \
+	$(GDA_CFLAGS) \
 	$(LIBANJUTA_CFLAGS) \
 	$(PLUGIN_SYMBOL_DB_CFLAGS) \
 	-DSYMBOL_DB_SHM=\"$(SYMBOL_DB_SHM)\" \
@@ -86,7 +86,7 @@ libanjuta_symbol_db_la_LDFLAGS = $(ANJUTA_PLUGIN_LDFLAGS)
 
 # Plugin dependencies
 libanjuta_symbol_db_la_LIBADD = \
-	$(GDL_LIBS) \
+	$(GDA_LIBS) \
 	$(LIBANJUTA_LIBS) \
 	$(PLUGIN_SYMBOL_DB_LIBS)
 
diff --git a/plugins/symbol-db/anjuta-tags/Makefile.am b/plugins/symbol-db/anjuta-tags/Makefile.am
index 43c946e..159483b 100644
--- a/plugins/symbol-db/anjuta-tags/Makefile.am
+++ b/plugins/symbol-db/anjuta-tags/Makefile.am
@@ -12,7 +12,7 @@ AM_CFLAGS =\
 	 $(WARN_CFLAGS) \
 	 $(ANJUTA_CFLAGS) \
 	 $(VALA_CFLAGS) \
-	 $(LIBXML_CFLAGS)
+	 $(XML_CFLAGS)
 
 bin_PROGRAMS = anjuta-tags
 
@@ -130,7 +130,7 @@ anjuta_tags_SOURCES = \
 anjuta_tags_LDADD = \
 		$(ANJUTA_LIBS) \
 		$(VALA_LIBS) \
-		$(LIBXML_LIBS)
+		$(XML_LIBS)
 
 EXTRA_DIST = ${YACCFILE} ${LEXFILE} ctags-visitor.vala ctags-visitor.c ctags-vala.h
 
diff --git a/plugins/terminal/Makefile.am b/plugins/terminal/Makefile.am
index 531e6c5..27a16b5 100644
--- a/plugins/terminal/Makefile.am
+++ b/plugins/terminal/Makefile.am
@@ -39,7 +39,6 @@ libanjuta_terminal_la_LDFLAGS = $(ANJUTA_PLUGIN_LDFLAGS)
 
 # Plugin dependencies
 libanjuta_terminal_la_LIBADD = \
-	$(GCONF_LIBS) \
 	$(VTE_LIBS) \
 	$(LIBANJUTA_LIBS)
 	
diff --git a/src/Makefile.am b/src/Makefile.am
index 9374a8e..2f3f226 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -19,6 +19,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir)\
 	-I.. -I. \
 	$(LIBANJUTA_CFLAGS) \
+	$(GDL_CFLAGS) \
 	-DPACKAGE_BIN_DIR=\"$(bindir)\" \
 	-DPACKAGE_DATA_DIR="\"$(datadir)/$(PACKAGE)\"" \
 	-DPACKAGE_DOC_DIR=\"$(docdir)\" \
@@ -43,8 +44,6 @@ anjuta_SOURCES = \
 
 anjuta_LDADD =  \
 	$(GDL_LIBS) \
-	$(GLADE_LIBS)\
-	$(GLIB_LIBS) \
 	$(LIBANJUTA_LIBS)
 
 anjuta_LDFLAGS = $(ANJUTA_LDFLAGS)
@@ -58,7 +57,8 @@ noinst_PROGRAMS =  anjuta-shell
 
 anjuta_shell_SOURCES = shell.c shell.h
 anjuta_shell_LDADD =  \
-	$(LIBANJUTA_LIBS)
+	$(LIBANJUTA_LIBS) \
+	$(GDL_LIBS)
 
 EXTRA_DIST = \
 	$(anjuta_ui_DATA) \



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