[anjuta] Simplified configure.ac for future gtk+-3.0 transition



commit ba3f1b66c9c3282e55d5a65d9d26751e1a8b476f
Author: Johannes Schmid <jhs gnome org>
Date:   Tue Jun 29 22:24:26 2010 +0200

    Simplified configure.ac for future gtk+-3.0 transition
    
    * Build sourceview plugin if it is not disabled - fail if gtksourceview wasn't found
    * Remove libraries that are included in gtk+-2.0 (glib, gobject, gio, etc.)
    * Only have one package for the core libraries.

 configure.in                              |  172 ++++++++---------------------
 launcher/Makefile.am                      |    4 +-
 libanjuta/Makefile.am                     |   13 +--
 libfoocanvas/Makefile.am                  |    8 +-
 plugins/symbol-db/anjuta-tags/Makefile.am |    8 +-
 5 files changed, 55 insertions(+), 150 deletions(-)
---
diff --git a/configure.in b/configure.in
index 06d4aad..fc09922 100644
--- a/configure.in
+++ b/configure.in
@@ -4,7 +4,7 @@ AC_PREREQ(2.59)
 
 m4_define(anjuta_major_version,  2)
 m4_define(anjuta_minor_version, 31)
-m4_define(anjuta_micro_version,  3)
+m4_define(anjuta_micro_version,  4)
 m4_define(anjuta_nano_version, 0)
 m4_define(anjuta_version, anjuta_major_version.anjuta_minor_version.anjuta_micro_version.anjuta_nano_version)
 
@@ -23,48 +23,42 @@ AC_SUBST(ANJUTA_VERSION)
 ANJUTA_VERSION=anjuta_version
 AC_SUBST(ANJUTA_VERSION)
 
-GLIB_REQUIRED=2.18.0
-GDK_PIXBUF_REQUIRED=2.0.0
+dnl Anjuta core
 GTK_REQUIRED=2.20.0
-PANGO_REQUIRED=0.23
+GTHREAD_REQUIRED=2.22.0
+GDK_PIXBUF_REQUIRED=2.0.0
 GCONF_REQUIRED=2.12.0
-VTE_REQUIRED=0.9.0
-VTE_NEW_REQUIRED=0.13.1
+GDA_REQUIRED=4.1.6
+VTE_REQUIRED=0.13.1
 LIBXML_REQUIRED=2.4.23
-LIBDEVHELP_REQUIRED=0.22
 GDL_REQUIRED=2.27.1
+LIBWNCK_REQUIRED=2.12
+UNIQUE_REQUIRED=1.0.0
+
+dnl GtkSourceView
+GTKSOURCEVIEW_REQUIRED=2.9.7
+
+dnl Devhelp
+LIBDEVHELP_REQUIRED=0.22
+
+dnl Glade
 GLADEUI_REQUIRED=3.7.1
+
+dnl Vala
+VALA_REQUIRED=0.7.8
+
+dnl Introspection
+GI_REQUIRED=0.6.6
+
+dnl Various
+LIBGRAPHVIZ_REQUIRED=1.0
+
+dnl Subversion plugin
 NEON_REQUIRED=0.28.2
 SVN_MAJOR=1
 SVN_MINOR=5
 SVN_PATCH=0
 SUBVERSION_REQUIRED=$SVN_MAJOR.$SVN_MINOR.$SVN_PATCH
-GTKSOURCEVIEW_REQUIRED=2.9.7
-LIBWNCK_REQUIRED=2.12
-GDA_REQUIRED=4.1.6
-UNIQUE_REQUIRED=1.0.0
-VALA_REQUIRED=0.7.8
-LIBGRAPHVIZ_REQUIRED=1.0
-GI_REQUIRED=0.6.6
-
-AC_SUBST(GLIB_REQUIRED)
-AC_SUBST(GDK_PIXBUF_REQUIRED)
-AC_SUBST(GTK_REQUIRED)
-AC_SUBST(PANGO_REQUIRED)
-AC_SUBST(VTE_REQUIRED)
-AC_SUBST(LIBXML_REQUIRED)
-AC_SUBST(PANGO_REQUIRED)
-AC_SUBST(VTE_NEW_REQUIRED)
-AC_SUBST(LIBDEVHELP_REQUIRED)
-AC_SUBST(GDL_REQUIRED)
-AC_SUBST(GLADEUI_REQUIRED)
-AC_SUBST(NEON_REQUIRED)
-AC_SUBST(SUBVERSION_REQUIRED)
-AC_SUBST(GTKSOURCEVIEW_REQUIRED)
-AC_SUBST(LIBWNCK_REQUIRED)
-AC_SUBST(GDA_REQUIRED)
-AC_SUBST(UNIQUE_REQUIRED)
-AC_SUBST(LIBGRAPHVIZ_REQUIRED)
 
 AM_INIT_AUTOMAKE([1.11 dist-bzip2 no-dist-gzip])
 AM_SILENT_RULES([yes])
@@ -73,7 +67,7 @@ AC_DISABLE_STATIC
 AM_MAINTAINER_MODE
 GNOME_DOC_INIT
 
-#Check for C Compiler
+dnl Check for C Compiler
 AC_PROG_CC
 AC_PROG_CPP
 AC_LANG_C
@@ -127,8 +121,8 @@ AM_GCONF_SOURCE_2
 dnl ***************************************************************************
 dnl Check for GObject-Introspection
 dnl ***************************************************************************
-m4_ifdef(GOBJECT_INTROSPECTION_CHECK, [GOBJECT_INTROSPECTION_CHECK([0.6.7])],
-AM_CONDITIONAL(HAVE_INTROSPECTION, false))
+m4_ifdef([GOBJECT_INTROSPECTION_CHECK], [GOBJECT_INTROSPECTION_CHECK([0.6.7])], 
+[AM_CONDITIONAL(HAVE_INTROSPECTION, false)])
 
 dnl ***************************************************************************
 dnl Set gjsdir
@@ -144,28 +138,19 @@ 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 pkg checks are split into separate packages instead of single package
-dnl because different plugins have different requirements.
-
-PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED gmodule-2.0 >= $GLIB_REQUIRED gthread-2.0 >= $GLIB_REQUIRED gio-2.0 >= $GLIB_REQUIRED unique-1.0 >= $UNIQUE_REQUIRED)
-
-PKG_CHECK_MODULES([DBUS_GLIB], [dbus-glib-1])
-
-PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED)
-
-PKG_CHECK_MODULES(PANGO, pango >= $PANGO_REQUIRED)
-
-PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED)
-
-PKG_CHECK_MODULES(GCONF, gconf-2.0 >= $GCONF_REQUIRED)
-
-PKG_CHECK_MODULES(VTE, vte >= $VTE_REQUIRED)
-
-PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_REQUIRED)
-
-PKG_CHECK_MODULES(GDL, gdl-1.0 >= $GDL_REQUIRED)
+dnl Check base modules
 
-PKG_CHECK_MODULES(LIBXSLT, libxslt)
+PKG_CHECK_MODULES([ANJUTA], 
+   [gthread-2.0 >= $GTHREAD_REQUIRED 
+	unique-1.0 >= $UNIQUE_REQUIRED
+	dbus-glib-1 gtk+-2.0 >= $GTK_REQUIRED
+	gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED
+	gconf-2.0 >= $GCONF_REQUIRED
+	vte >= $VTE_REQUIRED
+	libxml-2.0 >= $LIBXML_REQUIRED
+	gdl-1.0 >= $GDL_REQUIRED
+	libgda-4.0 >= $GDA_REQUIRED
+	libxslt])
 
 dnl Check for autogen
 dnl -----------------
@@ -267,11 +252,9 @@ if test "$user_disabled_sourceview" = 1; then
 	sourceview="no"
 else
 	AC_MSG_RESULT(no)
-	
+	sourceview="yes"
 	PKG_CHECK_MODULES(PLUGIN_SOURCEVIEW,
-		[gtksourceview-2.0 >= $GTKSOURCEVIEW_REQUIRED],
-		[sourceview="yes"],
-		[sourceview="no"])
+		[gtksourceview-2.0 >= $GTKSOURCEVIEW_REQUIRED])
 fi
 
 AM_CONDITIONAL(HAVE_PLUGIN_SOURCEVIEW, [test x$sourceview = xyes])
@@ -291,12 +274,9 @@ fi
 
 AM_CONDITIONAL(ENABLE_VALA, [test x$enable_vala = xyes])
 
-PKG_CHECK_MODULES(PLUGIN_SYMBOL_DB,
-		[libgda-4.0 >= $GDA_REQUIRED])
-
 dnl Setup Anjuta Library flags
 dnl --------------------------
-LIBANJUTA_CFLAGS='$(GLIB_CFLAGS) $(GTK_CFLAGS) $(GCONF_CFLAGS) $(GDL_CFLAGS) $(DEPRECATED_FLAGS) -I$(top_srcdir) -I$(top_builddir)/libanjuta -DPACKAGE_PIXMAPS_DIR=\""$(datadir)/pixmaps/$(PACKAGE)"\" -DPACKAGE_LIB_DIR=\""$(pkglibdir)"\" -DPACKAGE_DATA_DIR=\""$(datadir)/$(PACKAGE)"\"'
+LIBANJUTA_CFLAGS='$(ANJUTA_CFLAGS) $(DEPRECATED_FLAGS) -I$(top_srcdir) -I$(top_builddir)/libanjuta -DPACKAGE_PIXMAPS_DIR=\""$(datadir)/pixmaps/$(PACKAGE)"\" -DPACKAGE_LIB_DIR=\""$(pkglibdir)"\" -DPACKAGE_DATA_DIR=\""$(datadir)/$(PACKAGE)"\"'
 LIBANJUTA_LIBS='$(top_builddir)/libanjuta/libanjuta.la'
 AC_SUBST(LIBANJUTA_CFLAGS)
 AC_SUBST(LIBANJUTA_LIBS)
@@ -332,9 +312,7 @@ AC_SUBST(anjuta_image_dir)
 dnl ***************************************************************************
 dnl Check for old vte version
 dnl ***************************************************************************
-PKG_CHECK_MODULES(VTE, vte >= $VTE_NEW_REQUIRED, OLD_VTE=0, OLD_VTE=1)
-AC_SUBST(OLD_VTE)
-AC_DEFINE_UNQUOTED(OLD_VTE, $OLD_VTE, [Old version of vte])
+PKG_CHECK_MODULES(VTE, vte >= $VTE_REQUIRED)
 
 dnl ***************************************************************************
 dnl Check for marshal and enum generators
@@ -514,24 +492,6 @@ if test "$have_setenv" != yes ; then
     fi
 fi
 
-dnl
-dnl if test yes = "$CYGWIN"; then with_posix_regex=no; fi
-if test no != "$with_posix_regex"; then
-    AC_CHECK_FUNCS(regcomp)
-    AC_MSG_CHECKING(if regcomp works)
-    AC_TRY_RUN([
-#include <sys/types.h>
-#include <regex.h>
-main() {
-    regex_t patbuf;
-    exit (regcomp (&patbuf, "/hello/", 0) != 0);
-}],regcomp_works=yes,regcomp_works=no,AC_DEFINE(CHECK_REGCOMP,,[Check regcomp]))
-    AC_MSG_RESULT($regcomp_works)
-    if test yes != "$regcomp_works"; then
-        AC_DEFINE(REGCOMP_BROKEN,,[Regcomp is broken])
-    fi
-fi
-
 dnl -----------------------------
 dnl Checks for FreeBSD Build
 dnl -----------------------------
@@ -772,15 +732,6 @@ AC_SUBST(SYMBOL_DB_SHM)
 
 
 dnl Check for graphviz (class inheritance and profiler plugins)
-dnl --------------------------------------------------------------------------
-dnl FIXME: For some strange reason graphviz-devel rpm install the *.pc files
-dnl in /usr/lib/graphviz/pkgconfig, instead of usual /usr/lib/pkgconfig. This
-dnl makes pkgconfig check fail if we don't add the above path in
-dnl PKG_CONFIG_PATH. We have added both /usr/lib/graphviz/pkgconfig and
-dnl /usr/local/lib/pkgconfig paths. If graphviz is installed in other prefix
-dnl (other than /usr or /usr/local or the current installation prefix),
-dnl following pkgconfig check will fail.
-dnl --------------------------------------------------------------------------
 AC_ARG_ENABLE(graphviz,
 	AC_HELP_STRING([--disable-graphviz],[Disable GraphViz support in Anjuta]), 
 	[ if test "$enableval" = "no"; then
@@ -794,45 +745,14 @@ if test "$user_disabled_graphviz" = 1; then
 	libgraphviz_found="no"
 else
 	AC_MSG_RESULT(no)
-	
-	dnl Set pkgconfig path
-	ANJUTA_PKG_CONFIG_PATH_SAVE="${PKG_CONFIG_PATH}"
-	PKG_CONFIG_PATH="/usr/lib/graphviz/pkgconfig:$PKG_CONFIG_PATH"
-	PKG_CONFIG_PATH="/usr/local/lib/graphviz/pkgconfig:$PKG_CONFIG_PATH"
-	PKG_CONFIG_PATH="/usr/lib64/graphviz/pkgconfig:$PKG_CONFIG_PATH"
-	PKG_CONFIG_PATH="/usr/local/lib64/graphviz/pkgconfig:$PKG_CONFIG_PATH"
-	
-	anjuta_save_prefix="$prefix"
-	test "x$prefix" = xNONE && prefix=$ac_default_prefix
-	graphviz_pkgconfig=`eval echo ${libdir}/graphviz/pkgconfig`
-	PKG_CONFIG_PATH="$graphviz_pkgconfig:$PKG_CONFIG_PATH"
-	prefix="$anjuta_save_prefix"
-
-	export PKG_CONFIG_PATH
 	PKG_CHECK_MODULES(GRAPHVIZ,
 		[libgvc >= $LIBGRAPHVIZ_REQUIRED libgraph >= $LIBGRAPHVIZ_REQUIRED], 
 		[libgraphviz_found="yes"],
 		[libgraphviz_found="no"])
-	
-	dnl Restore pkgconfig path
-	PKG_CONFIG_PATH="${ANJUTA_PKG_CONFIG_PATH_SAVE}"
-	export PKG_CONFIG_PATH
 fi
 
 AM_CONDITIONAL(HAVE_GRAPHVIZ, [test x$libgraphviz_found = xyes])
 
-dnl --------- help outputs -----------
-dnl manuals/C/Makefile
-dnl manuals/C/anjuta-tutorial/Makefile
-dnl manuals/C/anjuta-advanced-tutorial/Makefile
-dnl manuals/C/anjuta-faqs/Makefile
-dnl manuals/C/anjuta-manual/Makefile
-dnl manuals/de/Makefile
-dnl manuals/de/anjuta-tutorial/Makefile
-dnl manuals/ja/Makefile
-dnl manuals/ja/anjuta-faqs/Makefile
-dnl manuals/ja/anjuta-manual/Makefile
-
 AC_OUTPUT([
 Makefile
 po/Makefile.in
diff --git a/launcher/Makefile.am b/launcher/Makefile.am
index c41129c..cf6f9ce 100644
--- a/launcher/Makefile.am
+++ b/launcher/Makefile.am
@@ -1,7 +1,7 @@
 
-AM_CPPFLAGS = -I. -I.. $(GLIB_CFLAGS) -g -O $(DEPRECATED_FLAGS)
+AM_CPPFLAGS = -I. -I.. $(ANJUTA_CFLAGS) -g -O $(DEPRECATED_FLAGS)
 
 bin_PROGRAMS = anjuta-launcher
-anjuta_launcher_LDADD = $(GLIB_LIBS)
+anjuta_launcher_LDADD = $(ANJUTA_LIBS)
 
 -include $(top_srcdir)/git.mk
diff --git a/libanjuta/Makefile.am b/libanjuta/Makefile.am
index 369cd33..8c31292 100644
--- a/libanjuta/Makefile.am
+++ b/libanjuta/Makefile.am
@@ -6,11 +6,7 @@ AM_CPPFLAGS = \
 	-I . \
 	$(WARN_CFLAGS) \
 	$(DEPRECATED_FLAGS) \
-	$(DBUS_GLIB_CFLAGS) \
-	$(GTK_CFLAGS) \
-	$(GCONF_CFLAGS) \
-	$(GLADE_DEPRECATED_CFLAGS) \
-	$(LIBXML_CFLAGS) \
+	$(ANJUTA_CFLAGS) \
 	-DDATADIR="\"$(datadir)\"" \
 	-DPACKAGE_PIXMAPS_DIR="\"$(datadir)/pixmaps/$(PACKAGE)\"" \
 	-DPACKAGE_DATA_DIR="\"$(datadir)/$(PACKAGE)\"" \
@@ -22,12 +18,7 @@ lib_LTLIBRARIES = libanjuta.la
 libanjuta_la_LDFLAGS = $(ANJUTA_LDFLAGS) 
 libanjuta_la_LIBADD = \
 	interfaces/libanjuta-interfaces.la \
-	$(DBUS_GLIB_LIBS) \
-	$(GTK_LIBS) \
-	$(GCONF_LIBS) \
-	$(GLADE_DEPRECATED_LIBS) \
-	$(LIBXML_LIBS) \
-	$(GLIB_LIBS)
+	$(ANJUTA_LIBS)
 
 libanjuta_la_SOURCES= \
 	anjuta-enum-types.h \
diff --git a/libfoocanvas/Makefile.am b/libfoocanvas/Makefile.am
index 25f2de1..fdac3ef 100644
--- a/libfoocanvas/Makefile.am
+++ b/libfoocanvas/Makefile.am
@@ -2,8 +2,7 @@ AM_CPPFLAGS = \
 	-I$(top_srcdir) \
 	-I$(top_builddir) \
 	$(WARN_CFLAGS) \
-	$(GTK_CFLAGS) \
-	$(PANG_CFLAGS) \
+	$(ANJUTA_CFLAGS) \
     -DFOOCANVASLIBDIR=\""$(libdir)"\" \
     -DFOOCANVASDATADIR=\""$(datadir)"\" \
     -DFOOCANVASPIXMAPDIR=\""$(datadir)/pixmaps"\" \
@@ -16,9 +15,8 @@ AM_CPPFLAGS = \
 lib_LTLIBRARIES = libanjuta-foocanvas.la
 
 libanjuta_foocanvas_la_LIBADD = \
-	$(RENDER_LIBS) \
-	$(GTK_LIBS) \
-	$(PANGO_LIBS)
+	$(ANJUTA_LIBS) \
+	$(RENDER_LIBS)
 
 libanjuta_foocanvas_la_SOURCES = \
 	foo-canvas-line.h \
diff --git a/plugins/symbol-db/anjuta-tags/Makefile.am b/plugins/symbol-db/anjuta-tags/Makefile.am
index ae9d5e6..3b9f6a1 100644
--- a/plugins/symbol-db/anjuta-tags/Makefile.am
+++ b/plugins/symbol-db/anjuta-tags/Makefile.am
@@ -10,7 +10,7 @@ AM_CPPFLAGS = \
 AM_CFLAGS =\
 	 -I$(top_srcdir)/plugins/symbol-db/anjuta-tags/js-parser \
 	 $(WARN_CFLAGS) \
-	 $(GLIB_CFLAGS) \
+	 $(ANJUTA_CFLAGS) \
 	 $(VALA_CFLAGS) \
 	 $(LIBXML_CFLAGS)
 
@@ -127,12 +127,8 @@ anjuta_tags_SOURCES = \
 	ctags-utils.c     \
 	ctags-utils.h
 
-anjuta_tags_LDFLAGS = \
-		$(GLIB_LDFLAGS) \
-		$(LIBXML_LDFLAGS)
-
 anjuta_tags_LDADD = \
-		$(GLIB_LIBS) \
+		$(ANJUTA_LIBS) \
 		$(VALA_LIBS) \
 		$(LIBXML_LIBS)
 



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