[Goodies-commits] r2847 - xfce4-cddrive-plugin/trunk

Sylvain Reynal syl at xfce.org
Fri Jun 22 09:26:09 CEST 2007


Author: syl
Date: 2007-06-22 07:26:09 +0000 (Fri, 22 Jun 2007)
New Revision: 2847

Added:
   xfce4-cddrive-plugin/trunk/acinclude.m4
Log:
- add m4 macro used to check for libcdio as required package only if cddb support is enabled (bug #3354)
- moved optimisation code from configure.in.in in a SYL_DEBUG_SUPPORT macro.

Added: xfce4-cddrive-plugin/trunk/acinclude.m4
===================================================================
--- xfce4-cddrive-plugin/trunk/acinclude.m4	                        (rev 0)
+++ xfce4-cddrive-plugin/trunk/acinclude.m4	2007-06-22 07:26:09 UTC (rev 2847)
@@ -0,0 +1,68 @@
+dnl $Id$
+dnl
+dnl Additionnal m4 macros for xfce4-cddrive-plugin configure.in.in file.
+dnl
+dnl Copyright (c) 2007
+dnl         The Xfce development team. All rights reserved.
+dnl
+dnl This program is free software; you can redistribute it and/or modify it
+dnl under the terms of the GNU General Public License as published by the Free
+dnl Software Foundation; either version 2 of the License, or (at your option)
+dnl any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but WITHOUT
+dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+dnl FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+dnl more details.
+dnl
+dnl You should have received a copy of the GNU General Public License along with
+dnl this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+dnl Place, Suite 330, Boston, MA  02111-1307  USA
+
+dnl SYL_CHECK_PACKAGE(varname, package, version, [action-if], [action-if-not])
+dnl
+dnl Same as XDT_CHECK_PACKAGE, except it store "package" and "version"
+dnl in "syl_pkg_name" and "syl_pkg_required_version" variables respectively,
+dnl so these infos can be used in "action-if-not".
+dnl
+AC_DEFUN([SYL_CHECK_PACKAGE],
+[
+  syl_pkg_name=$2
+  syl_pkg_required_version=$3
+  
+  XDT_CHECK_PACKAGE([$1], [$2], [$3], [$4], [$5])
+  AC_DEFINE([HAVE_$1], [1], [Define if $2 >= $3 present])
+])
+
+
+dnl SYL_DEBUG_SUPPORT()
+dnl
+dnl Modified BM_DEBUG_SUPPORT so that assertions are disabled when building
+dnl final version (with --enable-final configure switch), as their purpose
+dnl is debug only.
+AC_DEFUN([SYL_DEBUG_SUPPORT],
+[
+  AC_ARG_ENABLE([final], AC_HELP_STRING([--enable-final], [Build final version]),
+      [enable_final=yes], [])
+  AC_MSG_CHECKING([whether to build final version])
+  if test x"$enable_final" = x"yes"; then
+    AC_MSG_RESULT([yes])
+    CPPFLAGS="$CPPFLAGS -DG_DISABLE_CHECKS -DG_DISABLE_ASSERT"
+    CPPFLAGS="$CPPFLAGS -DG_DISABLE_CAST_CHECKS"
+    if test x"$LD" = x""; then
+      AC_PROG_LD()
+    fi
+    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
+  else
+    AC_MSG_RESULT([no])
+  fi
+])




More information about the Goodies-commits mailing list