[Xfce4-commits] <tumbler:master> Prepare build environment for Maemo compatibility

Jannis Pohlmann noreply at xfce.org
Tue Oct 6 14:44:01 CEST 2009


Updating branch refs/heads/master
         to f13b573199bf3af409d1836e1e2078f97c45cc98 (commit)
       from f9053a4334e1a8642ae31284c734052d0e206347 (commit)

commit f13b573199bf3af409d1836e1e2078f97c45cc98
Author: Philip Van Hoof <philip at codeminded.be>
Date:   Wed Sep 30 15:44:38 2009 +0200

    Prepare build environment for Maemo compatibility
    
    Signed-off-by: Jannis Pohlmann <jannis at xfce.org>

 autogen.sh                      |   49 +++++++++++++++-----------------------
 configure.in.in => configure.ac |   40 +++++++++++++++++++++----------
 plugins/xdg-cache/Makefile.am   |    4 +++
 3 files changed, 50 insertions(+), 43 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index 21f1742..27dd499 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,35 +1,24 @@
 #!/bin/sh
-#
-# vi:set et ai sw=2 sts=2 ts=2: */
-# -
-# Copyright (c) 2009 Jannis Pohlmann <jannis at xfce.org>
-# 
-# This program is free software; you can redistribute it and/or 
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of 
-# the License, or (at your option) any later version.
-# 
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
-# GNU General Public License for more details.
-# 
-# You should have received a copy of the GNU General Public 
-# License along with this program; if not, write to the Free 
-# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-# Boston, MA 02110-1301, USA.
+# Run this to generate all the initial makefiles, etc.
 
-(type xdt-autogen) >/dev/null 2>&1 || {
-  cat >&2 <<EOF
-autogen.sh: You don't seem to have the Xfce development tools installed on
-            your system, which are required to build this software.
-            Please install the xfce4-dev-tools package first, it is available
-            from http://www.xfce.org/.
-EOF
-  exit 1
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+PKG_NAME="tumbler"
+REQUIRED_AUTOMAKE_VERSION=1.9
+
+(test -f $srcdir/configure.ac \
+  && test -f $srcdir/README) || {
+    echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
+    echo " top-level $PKG_NAME directory"
+    exit 1
 }
 
-# # initialize GTK-Doc
-# gtkdocize || exit 1
+# Automake requires that ChangeLog exist.
+touch ChangeLog
 
-XDT_AUTOGEN_REQUIRED_VERSION="4.7.2" exec xdt-autogen $@
+which gnome-autogen.sh || {
+    echo "You need to install gnome-common from the GNOME CVS"
+    exit 1
+}
+. gnome-autogen.sh
diff --git a/configure.in.in b/configure.ac
similarity index 91%
rename from configure.in.in
rename to configure.ac
index 5d201e5..3220a1d 100644
--- a/configure.in.in
+++ b/configure.ac
@@ -117,7 +117,7 @@ AC_FUNC_MMAP()
 dnl ******************************
 dnl *** Check for i18n support ***
 dnl ******************************
-XDT_I18N([@LINGUAS@])
+dnl XDT_I18N([@LINGUAS@])
 
 dnl *************************
 dnl *** Check for GTK-Doc ***
@@ -127,17 +127,20 @@ GTK_DOC_CHECK(1.9)
 dnl ***********************************
 dnl *** Check for required packages ***
 dnl ***********************************
-XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.16.0])
-XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.16.0])
-XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.16.0])
-XDT_CHECK_PACKAGE([DBUS], [dbus-1], [1.0.0])
-XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.72])
-XDT_CHECK_PACKAGE([GDK_PIXBUF], [gdk-pixbuf-2.0], [2.14])
-XDT_CHECK_PACKAGE([PNG], [libpng], [1.2.0], [],
-[
+
+PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16.0)
+PKG_CHECK_MODULES(GIO, gio-2.0 >= 2.16.0)
+PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16.0)
+PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.0.0)
+PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1 >= 0.72)
+
+PKG_CHECK_MODULES(PNG, libpng >= 1.2.0, [have_libpng=yes], [
   dnl libpng.pc not found, try with libpng12.pc
-  XDT_CHECK_PACKAGE([PNG], [libpng12], [1.2.0])
+  PKG_CHECK_MODULES(PNG, libpng12 >= 1.2.0, 
+                    [have_libpng=yes],
+                    [jhave_libpng=no])
 ])
+AM_CONDITIONAL([HAVE_LIBPNG], test x"$have_libpng" = x"yes")
 
 dnl ***********************************************
 dnl *** Check for the pixbuf thumbnailer plugin ***
@@ -146,10 +149,21 @@ AC_ARG_ENABLE([pixbuf-thumbnailer],
               [AC_HELP_STRING([--enable-pixbuf-thumbnailer],
                               [Enable the pixbuf thumbnailer plugin @<:@default=yes@:>@])],,
               [enable_pixbuf_thumbnailer=yes])
+
 if test x"$enable_pixbuf_thumbnailer" = x"yes"; then
-  AC_DEFINE([ENABLE_PIXBUF_THUMBNAILER], [1], [Define if the pixbuf thumbnailer plugin is enabled])
+  PKG_CHECK_MODULES(GDK_PIXBUF, 
+                    gdk-pixbuf-2.0 >= 2.14,
+                    [have_gdkpixbuf=yes], 
+                    [have_gdkpixbuf=no])
+
+  if test "x$have_gdkpixbuf" = "xyes"; then
+    AC_DEFINE([HAVE_PIXBUF], [1], [Define if the pixbuf thumbnailer plugin is enabled])
+  fi
+else
+  have_gdkpixbuf="no  (disabled)"
 fi
-AM_CONDITIONAL([ENABLE_PIXBUF_THUMBNAILER], test x"$enable_pixbuf_thumbnailer" = x"yes")
+
+AM_CONDITIONAL([ENABLE_PIXBUF_THUMBNAILER], test x"$have_gdkpixbuf" = x"yes")
 
 dnl *********************************************
 dnl *** Check for the font thumbnailer plugin ***
@@ -213,7 +227,7 @@ fi
 dnl ***********************************
 dnl *** Check for debugging support ***
 dnl ***********************************
-XDT_FEATURE_DEBUG()
+dnl XDT_FEATURE_DEBUG()
 
 dnl **************************************
 dnl *** Check for linker optimizations ***
diff --git a/plugins/xdg-cache/Makefile.am b/plugins/xdg-cache/Makefile.am
index bec65fb..b03ef21 100644
--- a/plugins/xdg-cache/Makefile.am
+++ b/plugins/xdg-cache/Makefile.am
@@ -17,6 +17,8 @@
 # Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 # Boston, MA 02110-1301, USA.
 
+if HAVE_LIBPNG
+
 tumbler_plugindir = $(libdir)/tumbler-$(TUMBLER_VERSION_API)/plugins
 tumbler_plugin_LTLIBRARIES =						\
 	tumbler-xdg-cache.la
@@ -54,3 +56,5 @@ tumbler_xdg_cache_la_LIBADD =						\
 	$(GIO_LIBS)							\
 	$(GLIB_LIBS)							\
 	$(PNG_LIBS)
+
+endif



More information about the Xfce4-commits mailing list