changeset 4540:956272f5935d

Synchronized acinclude common macros with upcoming audacious-plugins autoconf cleanup.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 12 May 2008 00:14:27 +0300
parents 8c2a166168dd
children d8920be7275a
files acinclude.m4 configure.ac
diffstat 2 files changed, 55 insertions(+), 47 deletions(-) [+]
line wrap: on
line diff
--- a/acinclude.m4	Sun May 11 01:40:50 2008 +0300
+++ b/acinclude.m4	Mon May 12 00:14:27 2008 +0300
@@ -36,7 +36,6 @@
 
 dnl ** Simplifying wrapper
 AC_DEFUN([AUD_CONDITIONAL],
-dnl [AM_CONDITIONAL([$1],[test "x${$2}" = m4_ifval([$3], ["x$3"],["xyes"])])
 [if test "x${$2}" = m4_ifval([$3], ["x$3"],["xyes"]) ; then
     $1="yes"
 else
@@ -119,3 +118,55 @@
 AC_SUBST(Name[]_PLUGIN_DIR)dnl
 define([aud_plugin_dirs_defined],[1])dnl
 ])dnl
+
+
+dnl ***
+dnl *** Common checks
+dnl ***
+AC_DEFUN([AUD_COMMON_PROGS], [
+
+dnl Check for C and C++ compilers
+dnl =============================
+AUD_CHECK_GNU_MAKE
+AC_PROG_CC
+AC_PROG_CXX
+AM_PROG_AS
+AC_ISC_POSIX
+AC_C_BIGENDIAN
+
+if test "x$GCC" = "xyes"; then
+    CFLAGS="$CFLAGS -Wall -pipe"
+    CXXFLAGS="$CXXFLAGS -pipe -Wall"
+fi
+
+dnl Checks for various programs
+dnl ===========================
+AC_PROG_LN_S
+AC_PROG_MAKE_SET
+AC_PATH_PROG([RM], [rm])
+AC_PATH_PROG([MV], [mv])
+AC_PATH_PROG([CP], [cp])
+AC_PATH_PROG([AR], [ar])
+AC_PATH_PROG([RANLIB], [ranlib])
+
+
+dnl Check for Gtk+/GLib and pals
+dnl ============================
+AUD_CHECK_MODULE([GLIB], [glib-2.0], [>= 2.14.0], [Glib2])
+AUD_CHECK_MODULE([GTHREAD], [gthread-2.0], [>= 2.14.0], [gthread-2.0])
+AUD_CHECK_MODULE([GTK], [gtk+-2.0], [>= 2.10.0], [Gtk+2])
+AUD_CHECK_MODULE([PANGO], [pango], [>= 1.8.0], [Pango])
+AUD_CHECK_MODULE([CAIRO], [cairo], [>= 1.2.4], [Cairo])
+
+
+dnl Check for libmowgli
+dnl ===================
+AUD_CHECK_MODULE([MOWGLI], [libmowgli], [>= 0.4.0], [libmowgli],
+    [http://www.atheme.org/projects/mowgli.shtml])
+
+
+dnl Check for libmcs
+dnl ================
+AUD_CHECK_MODULE([LIBMCS], [libmcs >= 0.7], [libmcs],
+    [http://www.atheme.org/projects/mcs.shtml])
+])
--- a/configure.ac	Sun May 11 01:40:50 2008 +0300
+++ b/configure.ac	Mon May 12 00:14:27 2008 +0300
@@ -57,30 +57,9 @@
 AM_GNU_GETTEXT
 AM_GNU_GETTEXT_VERSION([0.14.0])
 
-
-dnl Check for C and C++ compilers
-dnl =============================
-AUD_CHECK_GNU_MAKE
-AC_PROG_CC
-AC_PROG_CXX
-AM_PROG_AS
-AC_ISC_POSIX
-AC_C_BIGENDIAN
-
-if test "x$GCC" = "xyes"; then
-    CFLAGS="$CFLAGS -Wall -pipe"
-fi
-
-
-dnl Checks for various programs
-dnl ===========================
-AC_PROG_LN_S
-AC_PROG_MAKE_SET
-AC_PATH_PROG([RM], [rm])
-AC_PATH_PROG([MV], [mv])
-AC_PATH_PROG([CP], [cp])
-AC_PATH_PROG([AR], [ar])
-AC_PATH_PROG([RANLIB], [ranlib])
+dnl Checks common for core and plugins
+dnl ==================================
+AUD_COMMON_PROGS
 
 
 dnl Check for headers and functions
@@ -107,28 +86,6 @@
 
 
 ### ---------------------------------------------------------------------------
-dnl Check for Gtk+/GLib and pals
-dnl ============================
-AUD_CHECK_MODULE([GLIB], [glib-2.0], [>= 2.14.0], [Glib2])
-AUD_CHECK_MODULE([GTHREAD], [gthread-2.0], [>= 2.14.0], [gthread-2.0])
-AUD_CHECK_MODULE([GTK], [gtk+-2.0], [>= 2.10.0], [Gtk+2])
-AUD_CHECK_MODULE([PANGO], [pango], [>= 1.8.0], [Pango])
-AUD_CHECK_MODULE([CAIRO], [cairo], [>= 1.2.4], [Cairo])
-
-
-dnl Check for libmowgli
-dnl ===================
-AUD_CHECK_MODULE([MOWGLI], [libmowgli], [>= 0.4.0], [libmowgli],
-    [http://www.atheme.org/projects/mowgli.shtml])
-
-
-dnl Check for libmcs
-dnl ================
-AUD_CHECK_MODULE([LIBMCS], [libmcs >= 0.7], [libmcs],
-    [http://www.atheme.org/projects/mcs.shtml])
-
-
-### ---------------------------------------------------------------------------
 dnl Chardet support
 dnl ===============
 AUD_ARG_ENABLE([chardet], [yes],