[Xfce4-commits] <tumbler:master> Rework build files. Fix bugs introduced in previous commits.

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


Updating branch refs/heads/master
         to d1b62a10f3d8447639430f276e04667494b35c3b (commit)
       from 292fd407ae55590a1d4ec46b0b936c80c5a03384 (commit)

commit d1b62a10f3d8447639430f276e04667494b35c3b
Author: Jannis Pohlmann <jannis at xfce.org>
Date:   Tue Oct 6 14:39:02 2009 +0200

    Rework build files. Fix bugs introduced in previous commits.
    
    The build checks for plugins were moved into acinclude.m4. autogen.sh
    now passes command line parameters to its delegates autogen-xfce.sh and
    autogen-gnome.sh. Removed the ELF visibility stuff from configure.ac and
    so on.

 acinclude.m4                                |   73 ++++++++++++++
 autogen-xfce.sh                             |    3 -
 autogen.sh                                  |   56 ++++++++---
 configure.ac                                |  144 +++++----------------------
 docs/reference/tumbler/tumbler-sections.txt |    5 +
 plugins/font-thumbnailer/Makefile.am        |    2 +-
 plugins/pixbuf-thumbnailer/Makefile.am      |    2 +-
 7 files changed, 147 insertions(+), 138 deletions(-)

diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 0000000..927cfd2
--- /dev/null
+++ b/acinclude.m4
@@ -0,0 +1,73 @@
+dnl vi:set et ai sw=2 sts=2 ts=2: */
+dnl -
+dnl Copyright (c) 2009 Jannis Pohlmann <jannis at xfce.org>
+dnl
+dnl This program is free software; you can redistribute it and/or 
+dnl modify it under the terms of the GNU General Public License as
+dnl published by the Free Software Foundation; either version 2 of 
+dnl the License, or (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public 
+dnl License along with this program; if not, write to the Free 
+dnl Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+dnl Boston, MA 02110-1301, USA.
+
+
+
+dnl TUMBLER_PIXBUF_THUMBNAILER()
+dnl
+dnl Check whether to build and install the GdkPibuxf thumbnailer
+dnl
+AC_DEFUN([TUMBLER_PIXBUF_THUMBNAILER],
+[
+AC_ARG_ENABLE([pixbuf-thumbnailer], [AC_HELP_STRING([--disable-pixbuf-thumbnailer], [Don't build the GdkPixbuf thumbnailer plugin])],
+  [ac_tumbler_pixbuf_thumbnailer=$enableval], [ac_tumbler_pixbuf_thumbnailer=yes])
+if test x"$ac_tumbler_pixbuf_thumbnailer" = x"yes"; then
+  PKG_CHECK_MODULES([GDK_PIXBUF], [gdk-pixbuf-2.0 >= 2.14], [], [ac_tumbler_pixbuf_thumbnailer=no])
+fi
+
+AC_MSG_CHECKING([whether to build the GdkPixbuf thumbnailer plugin])
+AM_CONDITIONAL([TUMBLER_PIXBUF_THUMBNAILER], [test x"$ac_tumbler_pixbuf_thumbnailer" = x"yes"])
+AC_MSG_RESULT([$ac_tumbler_pixbuf_thumbnailer])
+])
+
+
+
+dnl TUMBLER_FONT_THUMBNAILER()
+dnl
+dnl Check whether to build and install the GdkPibuxf thumbnailer
+dnl
+AC_DEFUN([TUMBLER_FONT_THUMBNAILER],
+[
+AC_ARG_ENABLE([font-thumbnailer], [AC_HELP_STRING([--disable-font-thumbnailer], [Don't build the FreeType font thumbnailer plugin])],
+  [ac_tumbler_font_thumbnailer=$enableval], [ac_tumbler_font_thumbnailer=yes])
+if test x"$ac_tumbler_font_thumbnailer" = x"yes"; then
+  dnl Check for FreeType 2.x
+  FREETYPE_LIBS=""
+  FREETYPE_CFLAGS=""
+  AC_PATH_PROG([FREETYPE_CONFIG], [freetype-config], [no])
+  if test x"$FREETYPE_CONFIG" != x"no"; then
+    AC_MSG_CHECKING([FREETYPE_CFLAGS])
+    FREETYPE_CFLAGS="`$FREETYPE_CONFIG --cflags`"
+    AC_MSG_RESULT([$FREETYPE_CFLAGS])
+  
+    AC_MSG_CHECKING([FREETYPE_LIBS])
+    FREETYPE_LIBS="`$FREETYPE_CONFIG --libs`"
+    AC_MSG_RESULT([$FREETYPE_LIBS])
+  else
+    dnl We can only build the font thumbnailer if FreeType 2.x is available
+    ac_tumbler_font_thumbnailer=no
+  fi
+  AC_SUBST([FREETYPE_CFLAGS])
+  AC_SUBST([FREETYPE_LIBS])
+fi
+
+AC_MSG_CHECKING([whether to build the FreeType thumbnailer plugin])
+AM_CONDITIONAL([TUMBLER_FONT_THUMBNAILER], [test x"$ac_tumbler_font_thumbnailer" = x"yes"])
+AC_MSG_RESULT([$ac_tumbler_font_thumbnailer])
+])
diff --git a/autogen-xfce.sh b/autogen-xfce.sh
index 21f1742..9b2486b 100755
--- a/autogen-xfce.sh
+++ b/autogen-xfce.sh
@@ -29,7 +29,4 @@ EOF
   exit 1
 }
 
-# # initialize GTK-Doc
-# gtkdocize || exit 1
-
 XDT_AUTOGEN_REQUIRED_VERSION="4.7.2" exec xdt-autogen $@
diff --git a/autogen.sh b/autogen.sh
index 51551ce..3e3c4c3 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,19 +1,51 @@
-which xdt-autogen
+#!/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.
+
+(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
+}
 
-if test x$? = x"0"; then
-  echo "Picked XFCE development environment"
-  .  ./autogen-xfce.sh
-  exit 0
+which xdt-autogen
+if test x"$?" = x"0"; then
+  echo "Building using the Xfce development environment"
+  ./autogen-xfce.sh $@
+  exit $?
 fi
 
 which gnome-autogen.sh
-
-if test x$? = x"0"; then
-  echo "Picked GNOME development environment"
-  .  ./autogen-gnome.sh
-  exit 0
+if test x"$?" = x"0"; then
+  echo "Building using the GNOME development environment"
+  ./autogen.gnome.sh $@
+  exit $?
 fi
 
-echo "You need to install either gnome-common or xfce4-dev-tools"
+cat >&2 <<EOF
+You need to have either the Xfce or the GNOME development enviroment
+installed. Check for xfce4-dev-tools or gnome-autogen.sh in your 
+package manager.
+EOF
 exit 1
-
diff --git a/configure.ac b/configure.ac
index 5ed0b1c..6279720 100644
--- a/configure.ac
+++ b/configure.ac
@@ -48,7 +48,7 @@ dnl *** Initialize automake ***
 dnl ***************************
 AM_INIT_AUTOMAKE([AC_PACKAGE_TARNAME()], [AC_PACKAGE_VERSION()])
 AC_CONFIG_MACRO_DIR([m4])
-AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS -I m4")
+AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_AMFLAGS -I m4")
 AM_CONFIG_HEADER([config.h])
 AM_MAINTAINER_MODE()
 
@@ -119,9 +119,7 @@ AC_FUNC_MMAP()
 dnl ******************************
 dnl *** Check for i18n support ***
 dnl ******************************
-
 linguas=`ls po/*.po | sed s/.po//g | sed sApo/AA | xargs`
-
 XDT_I18N([$linguas])
 
 dnl *************************
@@ -132,13 +130,15 @@ GTK_DOC_CHECK(1.9)
 dnl ***********************************
 dnl *** Check for required packages ***
 dnl ***********************************
-
 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)
 
+dnl ***************************
+dnl *** Check PNG libraries ***
+dnl ***************************
 PKG_CHECK_MODULES(PNG, libpng >= 1.2.0, [have_libpng=yes], [
   dnl libpng.pc not found, try with libpng12.pc
   PKG_CHECK_MODULES(PNG, libpng12 >= 1.2.0, 
@@ -147,59 +147,11 @@ PKG_CHECK_MODULES(PNG, libpng >= 1.2.0, [have_libpng=yes], [
 ])
 AM_CONDITIONAL([HAVE_LIBPNG], test x"$have_libpng" = x"yes")
 
-dnl ***********************************************
-dnl *** Check for the pixbuf thumbnailer plugin ***
-dnl ***********************************************
-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
-  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"$have_gdkpixbuf" = x"yes")
-
-dnl *********************************************
-dnl *** Check for the font thumbnailer plugin ***
-dnl *********************************************
-AC_ARG_ENABLE([font-thumbnailer],
-              [AC_HELP_STRING([--enable-font-thumbnailer],
-                              [Enable the font thumbnailer plugin @<:@default=yes@:>@])],,
-              [enable_font_thumbnailer=yes])
-if test x"$enable_font_thumbnailer" = x"yes"; then
-  dnl ******************************
-  dnl *** Check for FreeType 2.x ***
-  dnl ******************************
-  FREETYPE_LIBS=""
-  FREETYPE_CFLAGS=""
-  AC_PATH_PROG([FREETYPE_CONFIG], [freetype-config], [no])
-  if test x"$FREETYPE_CONFIG" != x"no"; then
-    AC_MSG_CHECKING([FREETYPE_CFLAGS])
-    FREETYPE_CFLAGS="`$FREETYPE_CONFIG --cflags`"
-    AC_MSG_RESULT([$FREETYPE_CFLAGS])
-  
-    AC_MSG_CHECKING([FREETYPE_LIBS])
-    FREETYPE_LIBS="`$FREETYPE_CONFIG --libs`"
-    AC_MSG_RESULT([$FREETYPE_LIBS])
-
-    AC_DEFINE([ENABLE_FONT_THUMBNAILER], [1], [Define if the font thumbnailer plugin is enabled])
-  fi
-  AM_CONDITIONAL([HAVE_FREETYPE], [test x"$FREETYPE_CONFIG" != x"no"])
-  AC_SUBST([FREETYPE_CFLAGS])
-  AC_SUBST([FREETYPE_LIBS])
-fi
-AM_CONDITIONAL([ENABLE_FONT_THUMBNAILER], [test x"$FREETYPE_CONFIG" != x"no"])
+dnl *************************
+dnl *** Check for plugins ***
+dnl *************************
+TUMBLER_PIXBUF_THUMBNAILER()
+TUMBLER_FONT_THUMBNAILER()
 
 dnl ************************************************************
 dnl *** Check for thumbnail flavors (normal, large, cropped) ***
@@ -228,7 +180,6 @@ if test x"$enable_cropped_thumbnails" = x"yes"; then
   AC_DEFINE([ENABLE_CROPPED_THUMBNAILS], [1], [Define if built with support for cropped thumbnails])
 fi
 
-
 dnl ***********************************
 dnl *** Check for debugging support ***
 dnl ***********************************
@@ -237,56 +188,7 @@ XDT_FEATURE_DEBUG()
 dnl **************************************
 dnl *** Check for linker optimizations ***
 dnl **************************************
-AC_MSG_CHECKING([whether $LD accepts --as-needed])
-case `$LD --as-needed -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
-  LDFLAGS="$LDFLAGS -Wl,--as-needed"
-  AC_MSG_RESULT([yes])
-  ;;
-*)
-  AC_MSG_RESULT([no])
-  ;;
-esac
-AC_MSG_CHECKING([whether $LD accepts -O1])
-case `$LD -O1 -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
-  LDFLAGS="$LDFLAGS -Wl,-O1"
-  AC_MSG_RESULT([yes])
-  ;;
-*)
-  AC_MSG_RESULT([no])
-  ;;
-esac
-
-dnl ****************************************
-dnl *** Check for ELF visibility support ***
-dnl ****************************************
-AC_ARG_ENABLE([visibility], AC_HELP_STRING([--disable-visibility], [Don't use ELF visibility attributes]), [], [enable_visibility=yes])
-have_gnuc_visibility=no
-if test x"$enable_visibility" != x"no"; then
-  dnl Check whether the compiler supports the visibility attribute
-  save_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -Wall -Werror"
-  AC_MSG_CHECKING([whether $CC supports the GNUC visibility attribute])
-  AC_COMPILE_IFELSE(AC_LANG_SOURCE(
-  [
-    void __attribute__ ((visibility("default"))) test_default (void) {}
-    void __attribute__ ((visibility("hidden"))) test_hidden (void) {}
-    int main (int argc, char **argv) { test_default (); test_hidden (); return 0; }
-  ]),
-  [
-    have_gnuc_visibility=yes
-    AC_MSG_RESULT([yes])
-  ],
-  [
-    AC_MSG_RESULT([no])
-  ])
-  CFLAGS="$save_CFLAGS"
-fi
-if test x"$have_gnuc_visibility" = x"yes"; then
-  CPPFLAGS="$CPPFLAGS -DHAVE_GNUC_VISIBILITY"
-fi
-AM_CONDITIONAL([HAVE_GNUC_VISIBILITY], [test x"$have_gnuc_visibility" = x"yes"])
+XDT_FEATURE_LINKER_OPTS()
 
 AC_OUTPUT([
 Makefile
@@ -311,33 +213,33 @@ dnl ***************************
 echo
 echo "Build Configuration:"
 echo
-echo "  * Debug:                       $enable_debug"
-if test x"$enable_pixbuf_thumbnailer" = x"yes"; then
-echo "  * Pixbuf thumbnailer plugin:   yes"
+echo "  * Debug:                            $enable_debug"
+if test x"$ac_tumbler_pixbuf_thumbnailer" = x"yes"; then
+echo "  * GdkPixbuf thumbnailer plugin:     yes"
 else
-echo "  * Pixbuf thumbnailer plugin:   no"
+echo "  * GdkPixbuf thumbnailer plugin:     no"
 fi
-if test x"$enable_font_thumbnailer" = x"yes"; then
-echo "  * Font thumbnailer plugin:     yes"
+if test x"$ac_tumbler_font_thumbnailer" = x"yes"; then
+echo "  * FreeType font thumbnailer plugin: yes"
 else
-echo "  * Font thumbnailer plugin:     no"
+echo "  * FreeType font thumbnailer plugin: no"
 fi
 echo
 echo "Supported Thumbnail Flavors:"
 echo
 if test x"$enable_normal_thumbnails" = x"yes"; then
-echo "  * Normal (128 pixels):         yes"
+echo "  * Normal (128 pixels):              yes"
 else
-echo "  * Normal (128 pixels):         no"
+echo "  * Normal (128 pixels):              no"
 fi
 if test x"$enable_large_thumbnails" = x"yes"; then
-echo "  * Large (256 pixels):          yes"
+echo "  * Large (256 pixels):               yes"
 else
-echo "  * Large (256 pixels):          no"
+echo "  * Large (256 pixels):               no"
 fi
 if test x"$enable_cropped_thumbnails" = x"yes"; then
-echo "  * Cropped (124 pixels):        yes"
+echo "  * Cropped (124 pixels):             yes"
 else
-echo "  * Cropped (124 pixels):        no"
+echo "  * Cropped (124 pixels):             no"
 fi
 echo
diff --git a/docs/reference/tumbler/tumbler-sections.txt b/docs/reference/tumbler/tumbler-sections.txt
index cf270e8..15c4f4f 100644
--- a/docs/reference/tumbler/tumbler-sections.txt
+++ b/docs/reference/tumbler/tumbler-sections.txt
@@ -183,6 +183,11 @@ TUMBLER_INSIDE_TUMBLER_H
 </SECTION>
 
 <SECTION>
+<FILE>tumbler-util</FILE>
+tumbler_util_get_supported_uri_schemes
+</SECTION>
+
+<SECTION>
 <FILE>tumbler-marshal</FILE>
 tumbler_marshal_VOID__STRING_INT_STRING
 tumbler_marshal_VOID__UINT_POINTER_INT_STRING
diff --git a/plugins/font-thumbnailer/Makefile.am b/plugins/font-thumbnailer/Makefile.am
index 9c8f855..a56c0ea 100644
--- a/plugins/font-thumbnailer/Makefile.am
+++ b/plugins/font-thumbnailer/Makefile.am
@@ -17,7 +17,7 @@
 # Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 # Boston, MA 02110-1301, USA.
 
-if ENABLE_FONT_THUMBNAILER
+if TUMBLER_FONT_THUMBNAILER
 
 tumbler_plugindir = $(libdir)/tumbler-$(TUMBLER_VERSION_API)/plugins
 tumbler_plugin_LTLIBRARIES =						\
diff --git a/plugins/pixbuf-thumbnailer/Makefile.am b/plugins/pixbuf-thumbnailer/Makefile.am
index 1eefd30..57d08ab 100644
--- a/plugins/pixbuf-thumbnailer/Makefile.am
+++ b/plugins/pixbuf-thumbnailer/Makefile.am
@@ -17,7 +17,7 @@
 # Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 # Boston, MA 02110-1301, USA.
 
-if ENABLE_PIXBUF_THUMBNAILER
+if TUMBLER_PIXBUF_THUMBNAILER
 
 tumbler_plugindir = $(libdir)/tumbler-$(TUMBLER_VERSION_API)/plugins
 tumbler_plugin_LTLIBRARIES =						\



More information about the Xfce4-commits mailing list