gnome-python-extras r436 - trunk



Author: gjc
Date: Sat May 24 21:41:23 2008
New Revision: 436
URL: http://svn.gnome.org/viewvc/gnome-python-extras?rev=436&view=rev

Log:
Bug 534307 â configure script could really use the ability to select particular modules

Modified:
   trunk/ChangeLog
   trunk/Makefile.am
   trunk/configure.ac

Modified: trunk/Makefile.am
==============================================================================
--- trunk/Makefile.am	(original)
+++ trunk/Makefile.am	Sat May 24 21:41:23 2008
@@ -1,7 +1,7 @@
-SUBDIRS = egg tests
+SUBDIRS = tests
 
-if ENABLE_DOCS
-  SUBDIRS += docs/gtkmozembed docs/gtkspell
+if BUILD_EGG
+  SUBDIRS += egg
 endif
 
 if BUILD_GKSU
@@ -18,10 +18,16 @@
 
 if BUILD_GTKMOZEMBED
   SUBDIRS += gtkmozembed
+if ENABLE_DOCS
+  SUBDIRS += docs/gtkmozembed
+endif
 endif
 
 if BUILD_GTKSPELL
   SUBDIRS += gtkspell
+if ENABLE_DOCS
+  SUBDIRS += docs/gtkspell
+endif
 endif
 
 if BUILD_GDL

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Sat May 24 21:41:23 2008
@@ -1,4 +1,4 @@
--*- mode: autoconf -*-
+dnl -*- mode: autoconf -*-
 AC_PREREQ(2.52)
 
 dnl the gnome-python version number
@@ -38,6 +38,18 @@
 AC_DEFINE(GNOME_PYTHON_EXTRAS_MICRO_VERSION, gnome_python_extras_micro_version,
                                             [Gnome-Python-Extras macro version])
 
+dnl AC_ARG_BINDING(NAME, DEFAULT [, MODULENAME])
+AC_DEFUN([AC_ARG_BINDING],
+[AC_ARG_ENABLE([$1],
+             AC_HELP_STRING([--ifelse([$2], [YES], dis, en)able-[$1]],
+                            [build ifelse([$3], , [$1], [$3]) bindings (default is [$2])]),
+             [if test "$enable_[$1]" = "yes"; then 
+	     		build_[$1]=true
+			  else
+				build_[$1]=false
+			 fi])
+])
+
 GNOME_COMMON_INIT
 AC_CANONICAL_HOST
 
@@ -124,6 +136,27 @@
   GTK_LIBS=`echo $GTK_LIBS | sed -e "s/$export_dynamic//"`
 fi
 
+dnl default bindings to build:
+default_bindings_on="eggtray eggrecent gda gdl gksu gksu2 gtkhtml2 gtkmozembed gtkspell"
+default_bindings_off=""
+default_bindings_all="$default_bindings_on $default_bindings_off"
+
+AC_ARG_ENABLE([allbindings],
+             AC_HELP_STRING([--disable-allbindings],
+                            [Changes all the bindings default values to be either enabled or disabled, overridden by any explicit bindings on the commandline.]),
+             [if test "$enable_allbindings" = "no"; then
+			   default_bindings_off="$default_bindings_all"
+			   default_bindings_on=""
+		  	 else
+			   default_bindings_off=""
+			   default_bindings_on="$default_bindings_all"
+		     fi])
+for binding in $default_bindings_on; do
+	eval build_$binding=true
+done
+for binding in $default_bindings_off; do
+	eval build_$binding=false
+done
 
 dnl Building documentation
 AC_ARG_ENABLE(docs,
@@ -152,9 +185,12 @@
 AC_SUBST(PYGOBJECT_PYGDOCS)
 
 dnl should we build the gtkhtml2 module?
-PKG_CHECK_MODULES(GTKHTML2, libgtkhtml-2.0 >= gtkhtml2_required_version,
-  build_gtkhtml2=true,
-  build_gtkhtml2=false)
+AC_ARG_BINDING([gtkhtml2], [ON])
+if $build_gtkhtml2; then
+  PKG_CHECK_MODULES(GTKHTML2, libgtkhtml-2.0 >= gtkhtml2_required_version,
+    build_gtkhtml2=true,
+    build_gtkhtml2=false)
+fi
 AC_SUBST(GTKHTML2_CFLAGS)
 AC_SUBST(GTKHTML2_LIBS)
 AM_CONDITIONAL(BUILD_GTKHTML2, $build_gtkhtml2)
@@ -164,35 +200,41 @@
 
 
 dnl should we build the egg.trayicon module?
-build_eggtray=false
-PKG_CHECK_MODULES(EGGTRAY, [gtk+-2.0 >= 2.2.0],
-  build_eggtray=true,
-  build_eggtray=false)
+AC_ARG_BINDING([eggtray], [ON], [egg.tray])
+if $build_eggtray; then
+  PKG_CHECK_MODULES(EGGTRAY, [gtk+-2.0 >= 2.2.0],
+    build_eggtray=true,
+    build_eggtray=false)
+fi
 AM_CONDITIONAL(BUILD_EGGTRAY, $build_eggtray)
 if test -n "$export_dynamic"; then
   EGGTRAY_LIBS=`echo $EGGTRAY_LIBS | sed -e "s/$export_dynamic//"`
 fi
 
 dnl should we build the egg.recent module?
-build_eggrecent=false
-PKG_CHECK_MODULES(EGG_RECENT, [gtk+-2.0 >= 2.0.0 gnome-vfs-2.0
-                               libbonoboui-2.0 libgnomeui-2.0
-                               gnome-python-2.0 >= gnome_python_required_version],
-  build_eggrecent=true,
-  build_eggrecent=false)
+AC_ARG_BINDING([eggrecent], [ON], [egg.recent])
+if $build_eggrecent; then
+  PKG_CHECK_MODULES(EGG_RECENT, [gtk+-2.0 >= 2.0.0 gnome-vfs-2.0
+                                 libbonoboui-2.0 libgnomeui-2.0
+                                 gnome-python-2.0 >= gnome_python_required_version],
+    build_eggrecent=true,
+    build_eggrecent=false)
+fi
 AM_CONDITIONAL(BUILD_EGGRECENT, $build_eggrecent)
 if test -n "$export_dynamic"; then
   EGGRECENT_LIBS=`echo $EGGRECENT_LIBS | sed -e "s/$export_dynamic//"`
 fi
 
+AM_CONDITIONAL(BUILD_EGG, $build_eggrecent || $build_eggtray)
 
 dnl should we build the gtkmozembed module?
-build_gtkmozembed=false
+AC_ARG_BINDING([gtkmozembed], [ON], [gtkmozembed])
 AC_ARG_WITH(gtkmozembed, AS_HELP_STRING(
                          [--with-gtkmozembed=mozilla|firefox|xulrunner],
                          [package that provides libgtkmozembed]),
             [mozpackage=$withval], [mozpackage=any])
 
+if "$build_gtkmozembed"; then
 if test $mozpackage = any ; then
 
 PKG_CHECK_MODULES(GTKMOZEMBED, [xulrunner-gtkmozembed >= xulrunner_required_version
@@ -244,35 +286,38 @@
 fi
 AC_SUBST(MOZILLA_HOME)
 
+fi # if build_gtkmozembed
 
-GTKMOZEMBED_CODEGEN_DEFINES=""
-if test "$mozpackage" = "mozilla" -a $build_gtkmozembed; then
-    PKG_CHECK_MODULES(XUL19, mozilla-gtkmozembed >= 0.21,
-                      GTKMOZEMBED_CODEGEN_DEFINES="-DHAVE_XUL19",
-                      GTKMOZEMBED_CODEGEN_DEFINES="")
+AM_CONDITIONAL(BUILD_GTKMOZEMBED, $build_gtkmozembed)
+if test -n "$export_dynamic"; then
+  GTKMOZEMBED_LIBS=`echo $GTKMOZEMBED_LIBS | sed -e "s/$export_dynamic//"`
 fi
 
 
 dnl should we build the gtkspell module?
-build_gtkspell=false
-PKG_CHECK_MODULES(GTKSPELL, [gtkspell-2.0 >= 2.0.0 pygtk-2.0 >= pygtk_required_version],
-  build_gtkspell=true,
-  build_gtkspell=false)
+AC_ARG_BINDING([gtkspell], [ON])
+if $build_gtkspell; then
+  PKG_CHECK_MODULES(GTKSPELL, [gtkspell-2.0 >= 2.0.0 pygtk-2.0 >= pygtk_required_version],
+    build_gtkspell=true,
+    build_gtkspell=false)
+fi
 AM_CONDITIONAL(BUILD_GTKSPELL, $build_gtkspell)
 if test -n "$export_dynamic"; then
   GTKSPELL_LIBS=`echo $GTKSPELL_LIBS | sed -e "s/$export_dynamic//"`
 fi
 
 dnl should we build the gdl module?
-build_gdl=false
-have_gdl07=false
-PKG_CHECK_MODULES(GDL, [gdl-1.0 >= 0.7.1 gdl-gnome-1.0 >= 0.7.1 pygtk-2.0 >= pygtk_required_version], dnl
-                  [build_gdl=true; have_gdl07=true], build_gdl=false)
-
-dnl try again with no gnome and older version
-if ! $build_gdl; then
-  PKG_CHECK_MODULES(GDL, [gdl-1.0 >= 0.6.1 pygtk-2.0 >= pygtk_required_version], dnl
-                    build_gdl=true, build_gdl=false)
+AC_ARG_BINDING([gdl], [ON])
+if $build_gdl; then
+  have_gdl07=false
+  PKG_CHECK_MODULES(GDL, [gdl-1.0 >= 0.7.1 gdl-gnome-1.0 >= 0.7.1 pygtk-2.0 >= pygtk_required_version], dnl
+                    [build_gdl=true; have_gdl07=true], build_gdl=false)
+
+  dnl try again with no gnome and older version
+  if ! $build_gdl; then
+    PKG_CHECK_MODULES(GDL, [gdl-1.0 >= 0.6.1 pygtk-2.0 >= pygtk_required_version], dnl
+                      build_gdl=true, build_gdl=false)
+  fi
 fi
 
 AM_CONDITIONAL(BUILD_GDL, $build_gdl)
@@ -291,44 +336,52 @@
 
 
 dnl should we buuild the gda module?
-build_gda=false
-PKG_CHECK_MODULES(GDA, [libgda-3.0 >= libgda_required_version pygtk-2.0 >= pygtk_required_version],
-  build_gda=true,
-  build_gda=false)
+AC_ARG_BINDING([gda], [ON])
+if $build_gda; then
+  PKG_CHECK_MODULES(GDA, [libgda-3.0 >= libgda_required_version pygtk-2.0 >= pygtk_required_version],
+    build_gda=true,
+    build_gda=false)
+fi
 AM_CONDITIONAL(BUILD_GDA, $build_gda)
 if test -n "$export_dynamic"; then
   GDA_LIBS=`echo $GDA_LIBS | sed -e "s/$export_dynamic//"`
 fi
 
 dnl should we build the gksu2 module?
-build_gksu2=false
-PKG_CHECK_MODULES(GKSU2, [libgksu2 >= gksu2_required_version
-                         pygtk-2.0 >= pygtk_required_version
-                         gtk+-2.0  >= gtk_required_version],
-  build_gksu2=true,
-  build_gksu2=false)
+AC_ARG_BINDING([gksu2], [ON])
+if $build_gksu2; then
+  PKG_CHECK_MODULES(GKSU2, [libgksu2 >= gksu2_required_version
+                           pygtk-2.0 >= pygtk_required_version
+                           gtk+-2.0  >= gtk_required_version],
+    build_gksu2=true,
+    build_gksu2=false)
+fi
 AM_CONDITIONAL(BUILD_GKSU2, $build_gksu2)
 if test -n "$export_dynamic"; then
   GKSU2_LIBS=`echo $GKSU2_LIBS | sed -e "s/$export_dynamic//"`
 fi
 
 dnl should we build the gksu module?
-build_gksu=false
-PKG_CHECK_MODULES(GKSU, [libgksu1.2 >= gksu_required_version
-                         pygtk-2.0 >= pygtk_required_version],
-  build_gksu=true,
-  build_gksu=false)
+AC_ARG_BINDING([gksu], [ON])
+if $build_gksu; then
+  PKG_CHECK_MODULES(GKSU, [libgksu1.2 >= gksu_required_version
+                           pygtk-2.0 >= pygtk_required_version],
+    build_gksu=true,
+    build_gksu=false)
+fi
 AM_CONDITIONAL(BUILD_GKSU, $build_gksu)
 if test -n "$export_dynamic"; then
   GKSU_LIBS=`echo $GKSU_LIBS | sed -e "s/$export_dynamic//"`
 fi
 
 dnl should we build the gksu.ui module?
-build_gksuui=false
-PKG_CHECK_MODULES(GKSUUI, [libgksuui1.0 >= gksuui_required_version
-                           pygtk-2.0 >= pygtk_required_version],
-  build_gksuui=true,
-  build_gksuui=false)
+AC_ARG_BINDING([gksuui], [ON], [gksu.ui])
+if $build_gksuui; then
+  PKG_CHECK_MODULES(GKSUUI, [libgksuui1.0 >= gksuui_required_version
+                             pygtk-2.0 >= pygtk_required_version],
+    build_gksuui=true,
+    build_gksuui=false)
+fi
 AM_CONDITIONAL(BUILD_GKSUUI, $build_gksuui)
 if test -n "$export_dynamic"; then
   GKSUUI_LIBS=`echo $GKSUUI_LIBS | sed -e "s/$export_dynamic//"`



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