gnome-python-desktop r488 - in trunk: . docs



Author: gjc
Date: Sat May 24 20:46:28 2008
New Revision: 488
URL: http://svn.gnome.org/viewvc/gnome-python-desktop?rev=488&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
   trunk/docs/Makefile.am

Modified: trunk/Makefile.am
==============================================================================
--- trunk/Makefile.am	(original)
+++ trunk/Makefile.am	Sat May 24 20:46:28 2008
@@ -1,5 +1,9 @@
 
-SUBDIRS =  docs
+SUBDIRS=
+
+if BUILD_DOCS
+  SUBDIRS += docs
+endif
 
 if BUILD_GNOMEPRINT
   SUBDIRS += gnomeprint

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Sat May 24 20:46:28 2008
@@ -46,6 +46,18 @@
 AC_DEFINE(GNOME_PYTHON_DESKTOP_MICRO_VERSION, gnome_python_desktop_micro_version,
                                             [Gnome-Python-Desktop 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_DISABLE_STATIC
@@ -106,12 +118,42 @@
 fi
 
 
+AC_ARG_ENABLE([gtk-doc],
+             AC_HELP_STRING([--disable-gtk-doc],
+                            [Disables gtk-doc documentation generation]),,
+		[enable_gtk_doc="yes"])
+AM_CONDITIONAL(BUILD_DOCS, [test "$enable_gtk_doc" = "yes"])
+
+dnl default bindings to build:
+default_bindings_on="applet gnomeprint gnomeprintui gtksourceview wnck totem_plparser gtop nautilusburn mediaprofiles rsvg gnomekeyring gnomedesktop bugbuddy metacity evolution evolution_ecal"
+default_bindings_off="metacity"
+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 should we build the gnome.applet module?
-build_applet=false
-PKG_CHECK_MODULES(LIBPANELAPPLET, [libpanelapplet-2.0 >= libpanelapplet_required_version
-                                   gnome-python-2.0 >= gnome_python_required_version],
-  build_applet=true,
-  build_applet=false)
+AC_ARG_BINDING([applet],[YES],[gnome.applet])
+if $build_applet; then
+	PKG_CHECK_MODULES(LIBPANELAPPLET, [libpanelapplet-2.0 >= libpanelapplet_required_version
+					   gnome-python-2.0 >= gnome_python_required_version],
+	  build_applet=true,
+	  build_applet=false)
+fi
 AC_SUBST(LIBPANELAPPLET_CFLAGS)
 AC_SUBST(LIBPANELAPPLET_LIBS)
 AM_CONDITIONAL(BUILD_APPLET, $build_applet)
@@ -123,11 +165,13 @@
 
 
 dnl should we build the gnomeprint module?
-build_gnomeprint=false
-PKG_CHECK_MODULES(LIBGNOMEPRINT, [libgnomeprint-2.2 >= libgnomeprint_required_version
-                                 gnome-python-2.0 >= gnome_python_required_version],
-  build_gnomeprint=true,
-  build_gnomeprint=false)
+AC_ARG_BINDING([gnomeprint],[YES])
+if $build_gnomeprint; then
+	PKG_CHECK_MODULES(LIBGNOMEPRINT, [libgnomeprint-2.2 >= libgnomeprint_required_version
+					 gnome-python-2.0 >= gnome_python_required_version],
+	  build_gnomeprint=true,
+	  build_gnomeprint=false)
+fi
 AC_SUBST(LIBGNOMEPRINT_CFLAGS)
 AC_SUBST(LIBGNOMEPRINT_LIBS)
 AM_CONDITIONAL(BUILD_GNOMEPRINT, $build_gnomeprint)
@@ -147,11 +191,13 @@
 AC_SUBST(PYGNOMEPRINT_DEFS)
 
 dnl should we build the gnomeprint.ui module?
-build_gnomeprintui=false
-PKG_CHECK_MODULES(LIBGNOMEPRINTUI, [libgnomeprintui-2.2 >= libgnomeprintui_required_version,
-                                   gnome-python-2.0 >= gnome_python_required_version],
-  build_gnomeprintui=true,
-  build_gnomeprintui=false)
+AC_ARG_BINDING([gnomeprintui],[YES],[gnomeprint.ui])
+if $build_gnomeprintui; then
+	PKG_CHECK_MODULES(LIBGNOMEPRINTUI, [libgnomeprintui-2.2 >= libgnomeprintui_required_version,
+					   gnome-python-2.0 >= gnome_python_required_version],
+	  build_gnomeprintui=true,
+	  build_gnomeprintui=false)
+fi
 AC_SUBST(LIBGNOMEPRINTUI_CFLAGS)
 AC_SUBST(LIBGNOMEPRINTUI_LIBS)
 AM_CONDITIONAL(BUILD_GNOMEPRINTUI, $build_gnomeprintui)
@@ -160,10 +206,12 @@
 fi
 
 dnl should we build the gtksourceview module?
-build_gtksourceview=false
-PKG_CHECK_MODULES(GTKSOURCEVIEW, gtksourceview-1.0 >= gtksourceview_required_version,
-  build_gtksourceview=true,
-  build_gtksourceview=false)
+AC_ARG_BINDING([gtksourceview],[YES])
+if $build_gtksourceview; then
+	PKG_CHECK_MODULES(GTKSOURCEVIEW, gtksourceview-1.0 >= gtksourceview_required_version,
+	  build_gtksourceview=true,
+	  build_gtksourceview=false)
+fi
 AM_CONDITIONAL(BUILD_GTKSOURCEVIEW, $build_gtksourceview)
 if test -n "$export_dynamic"; then
   GTKSOURCEVIEW_LIBS=`echo $GTKSOURCEVIEW_LIBS | sed -e "s/$export_dynamic//"`
@@ -171,10 +219,12 @@
 
 
 dnl should we build the wnck module
-build_wnck=false
-PKG_CHECK_MODULES(WNCK, libwnck-1.0 >= wnck_required_version,
-  build_wnck=true,
-  build_wnck=false)
+AC_ARG_BINDING([wnck],[YES])
+if $build_wnck; then
+	PKG_CHECK_MODULES(WNCK, libwnck-1.0 >= wnck_required_version,
+	  build_wnck=true,
+	  build_wnck=false)
+fi
 AM_CONDITIONAL(BUILD_WNCK, $build_wnck)
 if test -n "$export_dynamic"; then
   WNCK_LIBS=`echo $WNCK_LIBS | sed -e "s/$export_dynamic//"`
@@ -183,31 +233,37 @@
 
 
 dnl should we build the totem.plparser module?
-build_totem_plparser=false
-PKG_CHECK_MODULES(TOTEM_PLPARSER, [totem-plparser >= totem_required_version  pygtk-2.0 >= pygtk_required_version],
-  build_totem_plparser=true,
-  build_totem_plparser=false)
+AC_ARG_BINDING([totem_plparser],[YES],[totem.plparser])
+if $build_totem_plparser; then
+	PKG_CHECK_MODULES(TOTEM_PLPARSER, [totem-plparser >= totem_required_version  pygtk-2.0 >= pygtk_required_version],
+	  build_totem_plparser=true,
+	  build_totem_plparser=false)
+fi
 AM_CONDITIONAL(BUILD_TOTEM_PLPARSER, $build_totem_plparser)
 if test -n "$export_dynamic"; then
   TOTEM_PLPARSER_LIBS=`echo $TOTEM_PLPARSER_LIBS | sed -e "s/$export_dynamic//"`
 fi
 
 dnl should we build the gtop module?
-build_gtop=false
-PKG_CHECK_MODULES(GTOP, [libgtop-2.0 >= libgtop_required_version pygtk-2.0 >= pygtk_required_version],
-  build_gtop=true,
-  build_gtop=false)
+AC_ARG_BINDING([gtop],[YES])
+if $build_gtop; then
+	PKG_CHECK_MODULES(GTOP, [libgtop-2.0 >= libgtop_required_version pygtk-2.0 >= pygtk_required_version],
+	  build_gtop=true,
+	  build_gtop=false)
+fi
 AM_CONDITIONAL(BUILD_GTOP, $build_gtop)
 if test -n "$export_dynamic"; then
   GTOP_LIBS=`echo $GTOP_LIBS | sed -e "s/$export_dynamic//"`
 fi
 
 dnl should we build the nautilusburn module?
-build_nautilusburn=false
-PKG_CHECK_MODULES(NAUTILUSBURN, [libnautilus-burn >= libnautilus_burn_required_version
-                                 pygtk-2.0 >= pygtk_required_version],
-  build_nautilusburn=true,
-  build_nautilusburn=false)
+AC_ARG_BINDING([nautilusburn],[YES])
+if $build_nautilusburn; then
+	PKG_CHECK_MODULES(NAUTILUSBURN, [libnautilus-burn >= libnautilus_burn_required_version
+					 pygtk-2.0 >= pygtk_required_version],
+	  build_nautilusburn=true,
+	  build_nautilusburn=false)
+fi
 AM_CONDITIONAL(BUILD_NAUTILUSBURN, $build_nautilusburn)
 if test -n "$export_dynamic"; then
   NAUTILUSBURN_LIBS=`echo $NAUTILUSBURN_LIBS | sed -e "s/$export_dynamic//"`
@@ -215,24 +271,28 @@
 
 
 dnl should we build the mediaprofiles module?
-build_mediaprofiles=false
-PKG_CHECK_MODULES(MEDIAPROFILES, [gnome-media-profiles >= mediaprofiles_required_version
-                           pygtk-2.0 >= pygtk_required_version
-                           gconf-2.0 >= gconf_required_version],
-  build_mediaprofiles=true,
-  build_mediaprofiles=false)
+AC_ARG_BINDING([mediaprofiles],[YES])
+if $build_mediaprofiles; then
+	PKG_CHECK_MODULES(MEDIAPROFILES, [gnome-media-profiles >= mediaprofiles_required_version
+				   pygtk-2.0 >= pygtk_required_version
+				   gconf-2.0 >= gconf_required_version],
+	  build_mediaprofiles=true,
+	  build_mediaprofiles=false)
+fi
 AM_CONDITIONAL(BUILD_MEDIAPROFILES, $build_mediaprofiles)
 if test -n "$export_dynamic"; then
   MEDIAPROFILES_LIBS=`echo $MEDIAPROFILES_LIBS | sed -e "s/$export_dynamic//"`
 fi
 
 dnl should we build the rsvg module?
-build_rsvg=false
-PKG_CHECK_MODULES(RSVG, [librsvg-2.0 >= rsvg_required_version
-                         pycairo
-                         pygtk-2.0 >= pygtk_required_version],
-  build_rsvg=true,
-  build_rsvg=false)
+AC_ARG_BINDING([rsvg],[YES])
+if $build_rsvg; then
+	PKG_CHECK_MODULES(RSVG, [librsvg-2.0 >= rsvg_required_version
+				 pycairo
+				 pygtk-2.0 >= pygtk_required_version],
+	  build_rsvg=true,
+	  build_rsvg=false)
+fi
 AM_CONDITIONAL(BUILD_RSVG, $build_rsvg)
 if test -n "$export_dynamic"; then
   RSVG_LIBS=`echo $RSVG_LIBS | sed -e "s/$export_dynamic//"`
@@ -240,10 +300,7 @@
 
 
 dnl should we build the metacity module
-AC_ARG_ENABLE([metacity],
-             AC_HELP_STRING([--enable-metacity],
-                            [build metacity bindings (default is NO)]),
-             [build_metacity=true], [build_metacity=false])
+AC_ARG_BINDING([metacity],[NO])
 if $build_metacity; then
     PKG_CHECK_MODULES(METACITY, libmetacity-private >= metacity_required_version,
       build_metacity=true,
@@ -255,11 +312,13 @@
 AM_CONDITIONAL(BUILD_METACITY, $build_metacity)
 
 dnl should we build the gnomekeyring module
-build_gnomekeyring=false
-PKG_CHECK_MODULES(GNOMEKEYRING, [gnome-keyring-1 >= gnomekeyring_required_version
-                                 gobject-2.0 >= glib_required_version],
-  build_gnomekeyring=true,
-  build_gnomekeyring=false)
+AC_ARG_BINDING([gnomekeyring],[YES])
+if $build_gnomekeyring; then
+	PKG_CHECK_MODULES(GNOMEKEYRING, [gnome-keyring-1 >= gnomekeyring_required_version
+					 gobject-2.0 >= glib_required_version],
+	  build_gnomekeyring=true,
+	  build_gnomekeyring=false)
+fi
 AM_CONDITIONAL(BUILD_GNOMEKEYRING, $build_gnomekeyring)
 if test -n "$export_dynamic"; then
   GNOMEKEYRING_LIBS=`echo $GNOMEKEYRING_LIBS | sed -e "s/$export_dynamic//"`
@@ -270,44 +329,42 @@
 fi
 
 dnl should we build the gnomedesktop module
-build_gnomedesktop=false
-PKG_CHECK_MODULES(GNOMEDESKTOP, [gnome-desktop-2.0 >= gnomedesktop_required_version
-                                 pygobject-2.0],
-  build_gnomedesktop=true,
-  build_gnomedesktop=false)
+AC_ARG_BINDING([gnomedesktop],[YES])
+if $build_gnomedesktop; then
+	PKG_CHECK_MODULES(GNOMEDESKTOP, [gnome-desktop-2.0 >= gnomedesktop_required_version
+					 pygobject-2.0],
+	  build_gnomedesktop=true,
+	  build_gnomedesktop=false)
+fi
 AM_CONDITIONAL(BUILD_GNOMEDESKTOP, $build_gnomedesktop)
 if test -n "$export_dynamic"; then
   GNOMEDESKTOP_LIBS=`echo $GNOMEDESKTOP_LIBS | sed -e "s/$export_dynamic//"`
 fi
 
 dnl Check for bug-buddy
-build_bugbuddy=false
-AC_PATH_PROG(BUG_BUDDY, bug-buddy)
-if test "x$BUG_BUDDY" != "x"; then 
-  AC_MSG_CHECKING([whether bug-buddy >= 2.16])
-  if $BUG_BUDDY --version | $PYTHON -c ["import sys; sys.exit([int(s) for s in sys.stdin.read().split()[2].split('.')] < [2,16])"]; then
-    AC_MSG_RESULT([yes])
-    build_bugbuddy=true
-  else
-    AC_MSG_RESULT([no])
-    build_bugbuddy=false
-  fi
+AC_ARG_BINDING([bugbuddy],[YES])
+if $build_bugbuddy; then
+	AC_PATH_PROG(BUG_BUDDY, bug-buddy)
+	if test "x$BUG_BUDDY" != "x"; then 
+	  AC_MSG_CHECKING([whether bug-buddy >= 2.16])
+	  if $BUG_BUDDY --version | $PYTHON -c ["import sys; sys.exit([int(s) for s in sys.stdin.read().split()[2].split('.')] < [2,16])"]; then
+	    AC_MSG_RESULT([yes])
+	    build_bugbuddy=true
+	  else
+	    AC_MSG_RESULT([no])
+	    build_bugbuddy=false
+	  fi
+	fi
 fi
 AM_CONDITIONAL(BUILD_BUGBUDDY, $build_bugbuddy)
 
 dnl should we build the evolution module
-AC_ARG_ENABLE(evolution,
-  AC_HELP_STRING([--enable-evolution], [Enable Evolution support]),
-  enable_evolution=$enableval, enable_evolution=yes)
+AC_ARG_BINDING([evolution],[YES])
 
 dnl can also build without ecal support (desirable for maemo)
-AC_ARG_ENABLE(evolution-ecal,
-  AC_HELP_STRING([--enable-evolution-ecal], [Enable Evolution ECal support]),
-  enable_evolution_ecal=$enableval, enable_evolution_ecal=yes)
-
-build_evolution=false
-build_evolution_ecal=false
-if test "$enable_evolution" = yes; then
+AC_ARG_BINDING([evolution_ecal],[YES],[Evolution ECal])
+
+if $build_evolution; then
     PKG_CHECK_MODULES(EVOLUTION_EBOOK, [libebook-1.2 >= libebook_required_version
                                         pygobject-2.0
                                         gdk-pixbuf-2.0
@@ -318,7 +375,7 @@
         EVOLUTION_EBOOK_LIBS=`echo $EVOLUTION_EBOOK_LIBS | sed -e "s/$export_dynamic//"`
     fi
     
-    if test "$enable_evolution_ecal" = yes; then
+    if $build_evolution_ecal; then
         PKG_CHECK_MODULES(EVOLUTION_ECAL,  [libecal-1.2 >= libecal_required_version
                                             pygobject-2.0
                                             gdk-pixbuf-2.0
@@ -329,6 +386,10 @@
             EVOLUTION_ECAL_LIBS=`echo $EVOLUTION_ECAL_LIBS | sed -e "s/$export_dynamic//"`
         fi
     fi
+else
+    if $build_evolution_ecal; then
+      AC_MSG_ERROR(You must enable the Evolution module as well if you want the Evolution Cal module)
+    fi
 fi
 AM_CONDITIONAL(BUILD_EVOLUTION, $build_evolution)
 AM_CONDITIONAL(BUILD_EVOLUTION_ECAL, $build_evolution_ecal)

Modified: trunk/docs/Makefile.am
==============================================================================
--- trunk/docs/Makefile.am	(original)
+++ trunk/docs/Makefile.am	Sat May 24 20:46:28 2008
@@ -1,5 +1,16 @@
 EXTRA_DIST = common.xsl html.xsl ref-html-style.xsl tut-html-style.xsl \
 	     pdf-style.xsl pdf.xsl devhelp.xsl pygtk-ref-docs.make
 
-SUBDIRS = gtksourceview gnomeprint gnomeprintui
+SUBDIRS=
 
+if BUILD_GTKSOURCEVIEW
+  SUBDIRS += gtksourceview
+endif
+
+if BUILD_GNOMEPRINT
+  SUBDIRS += gnomeprint
+endif
+
+if BUILD_GNOMEPRINTUI
+  SUBDIRS += gnomeprintui
+endif



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