[anjuta] Make the glade catalog an optional feature



commit bd338c90dfc4948df4766bcae779e6e6d4c0e68d
Author: James Liggett <jrliggett cox net>
Date:   Sun Mar 3 18:57:31 2013 -0800

    Make the glade catalog an optional feature
    
    Add --enable-glade-catalog switch to configure so that users can install
    Anjuta without root priviliges if they don't need the glade catalog. The catalog
    is only used by people that hack on Anjuta, not regular users.

 HACKING               |    6 ++++++
 configure.ac          |   36 +++++++++++++++++++++++++++++-------
 libanjuta/Makefile.am |   11 +++--------
 3 files changed, 38 insertions(+), 15 deletions(-)
---
diff --git a/HACKING b/HACKING
index ca49c26..986eef6 100644
--- a/HACKING
+++ b/HACKING
@@ -287,6 +287,12 @@ Dialogs and Windows should be build using libglade. They should be HIG compliant
 - All dialogs should be closable by 'ESC'
 - All dialogs should have default action.
 
+Glade catalog:
+Several Anjuta plugins, including the Subversion and Git plugins, among others,
+use custom widgets with a Glade catalog. To be able to edit glade files for these
+plugins, pass --enable-glade-catalog to configure to make sure that the glade
+catalog is installed. libgladeui development files must be installed.
+
 5) Property/Config management:
 ------------------------------
 
diff --git a/configure.ac b/configure.ac
index 98ec2f4..81d172d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -234,6 +234,35 @@ fi
 
 AM_CONDITIONAL(HAVE_PLUGIN_GLADE, [test x$gladeui_found = xyes])
 
+dnl Glade catalog
+dnl ---------------------
+
+AC_ARG_ENABLE(glade-catalog,
+  AS_HELP_STRING([--enable-glade-catalog], [Enable glade catalog. Glade UI libraries must be installed]),
+  [ user_enabled_glade_catalog=1 ],
+  [ user_enabled_glade_catalog=0 ])
+
+glade_catalog_enabled="no"
+
+AC_MSG_CHECKING(if glade catalog is enabled)
+if test "$gladeui_found" = "yes"; then
+  if test "$user_enabled_glade_catalog" = 1; then
+    AC_MSG_RESULT(yes)
+    glade_catalog_enabled="yes"
+    GLADE_CATALOG_PATH=`pkg-config --variable=catalogdir gladeui-2.0`
+    GLADE_PLUGINS_PATH=`pkg-config --variable=moduledir gladeui-2.0`
+
+    AC_SUBST(GLADE_CATALOG_PATH)
+    AC_SUBST(GLADE_PLUGINS_PATH)
+  else
+    AC_MSG_RESULT(no) 
+  fi
+else
+  AC_MSG_RESULT(no)
+fi
+
+AM_CONDITIONAL(ENABLE_GLADE_CATALOG, [test x$glade_catalog_enabled = xyes])
+
 dnl Check for gtksourceview
 dnl -------------------------------------------------------------
 PKG_CHECK_MODULES(SOURCEVIEW,
@@ -360,13 +389,6 @@ AC_SUBST(GLIB_GENMARSHAL)
 GLIB_MKENUMS="`$PKG_CONFIG --variable=glib_mkenums glib-2.0`"
 AC_SUBST(GLIB_MKENUMS)
 
-dnl Set up Glade 3 catlog information
-dnl ---------------------
-GLADE_PLUGINS_PATH="`$PKG_CONFIG --variable=moduledir gladeui-1.0`"
-AC_SUBST(GLADE_PLUGINS_PATH)
-GLADE_CATALOG_PATH="`$PKG_CONFIG --variable=catalogdir gladeui-1.0`"
-AC_SUBST(GLADE_CATALOG_PATH)
-
 dnl ***************************************************************************
 dnl Internatinalization
 dnl ***************************************************************************
diff --git a/libanjuta/Makefile.am b/libanjuta/Makefile.am
index 327008d..011bf5a 100644
--- a/libanjuta/Makefile.am
+++ b/libanjuta/Makefile.am
@@ -137,12 +137,9 @@ libanjuta_3_la_SOURCES= \
        anjuta-completion.c
 
 # Glade module
-if HAVE_PLUGIN_GLADE
+if ENABLE_GLADE_CATALOG
 
-# For now install in our own prefix
-# gladeanjutadir = @GLADE_PLUGINS_PATH@
-
-gladeanjutadir = $(libdir)/glade/modules
+gladeanjutadir = @GLADE_PLUGINS_PATH@
 
 gladeanjuta_LTLIBRARIES = libgladeanjuta.la
 libgladeanjuta_la_SOURCES = anjuta-glade-catalog.c
@@ -151,10 +148,8 @@ libgladeanjuta_la_LIBADD = \
        libanjuta-3.la \
        $(GLADE_LIBS)
 
-# For now install in our own prefix
-# catalogdir = @GLADE_CATALOG_PATH@
+catalogdir = @GLADE_CATALOG_PATH@
 
-catalogdir = $(datadir)/glade/catalogs
 catalog_DATA = anjuta-glade.xml
 
 endif


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