changeset 4620:330738d3180e

Synchronized acinlude.m4 from configure cleanup branch; Moved SIMD checks to AUD_COMMON_PROGS.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 05 Jun 2008 11:10:13 +0300
parents fc1c82dd2e74
children fb56923e8206
files acinclude.m4 configure.ac
diffstat 2 files changed, 63 insertions(+), 51 deletions(-) [+]
line wrap: on
line diff
--- a/acinclude.m4	Thu Jun 05 09:30:34 2008 +0300
+++ b/acinclude.m4	Thu Jun 05 11:10:13 2008 +0300
@@ -110,16 +110,30 @@
 ])dnl
     Name[]_PLUGIN_DIR="Plugins"
 else
-    ifdef([aud_plugin_dirs_defined],
+    ifdef([aud_def_plugin_dirs_defined],
     [pluginsubs="$pluginsubs,\\\"$1\\\""],
     [pluginsubs="\\\"$1\\\""])
     Name[]_PLUGIN_DIR="$1"
 fi
 AC_SUBST(Name[]_PLUGIN_DIR)dnl
-define([aud_plugin_dirs_defined],[1])dnl
+define([aud_def_plugin_dirs_defined],[1])dnl
 ])dnl
 
 
+dnl *** Get plugin directories
+AC_DEFUN([AUD_GET_PLUGIN_DIR],[
+define([Name], [translit([$1_plugin_dir], [A-Z], [a-z])])dnl
+define([BigName], [translit([$1], [a-z], [A-Z])])dnl
+ifdef([aud_get_plugin_dirs_defined],
+[pluginsubs="$pluginsubs,\\\"$1\\\""],
+[pluginsubs="\\\"$1\\\""])
+BigName[]_PLUGIN_DIR=`pkg-config audacious --variable=[]Name[]`
+AC_SUBST(BigName[]_PLUGIN_DIR)dnl
+define([aud_get_plugin_dirs_defined],[1])dnl
+])dnl
+
+
+
 dnl ***
 dnl *** Common checks
 dnl ***
@@ -169,4 +183,50 @@
 dnl ================
 AUD_CHECK_MODULE([LIBMCS], [libmcs], [>= 0.7], [libmcs],
     [http://www.atheme.org/projects/mcs.shtml])
+
+
+dnl SSE2 support
+dnl ============
+AUD_ARG_ENABLE([sse2], [yes],
+[  --disable-sse2               Disable SSE2 support (def: enabled)],
+[
+    AC_MSG_CHECKING([SSE2 support])
+    aud_my_save_CFLAGS="$CFLAGS"
+    CFLAGS="-msse2"
+    AC_TRY_RUN([
+#include <emmintrin.h>
+int main()
+{
+  _mm_setzero_pd();
+  return 0;
+}
+    ],[
+        AC_MSG_RESULT([yes])
+        AC_DEFINE([HAVE_SSE2], 1, [Define to 1 if your system has SSE2 support])
+        SIMD_CFLAGS="-msse2"
+    ],[
+        AC_MSG_RESULT([no])
+        enable_sse2="no"
+    ])
+    AC_SUBST([SIMD_CFLAGS])
+    CFLAGS="$aud_my_save_CFLAGS"
 ])
+
+dnl AltiVec support 
+dnl ===============
+AUD_ARG_ENABLE([altivec], [yes],
+[  --disable-altivec            Disable AltiVec support (def: enabled)],
+[
+    AC_CHECK_HEADERS([altivec.h],
+    [
+        AC_DEFINE([HAVE_ALTIVEC], 1, [Define to 1 if your system has AltiVec.])
+        AC_DEFINE([HAVE_ALTIVEC_H], 1, [Define to 1 if your system has an altivec.h file.])
+        AC_DEFINE([ARCH_POWERPC], 1, [Define to 1 if your system is a PowerPC.])
+        SIMD_CFLAGS="-maltivec"
+        AC_SUBST([SIMD_CFLAGS])
+    ],[
+        enable_altivec="no"
+    ])
+])    
+
+])
--- a/configure.ac	Thu Jun 05 09:30:34 2008 +0300
+++ b/configure.ac	Thu Jun 05 11:10:13 2008 +0300
@@ -85,7 +85,7 @@
 dnl Chardet support
 dnl ===============
 AUD_ARG_ENABLE([chardet], [yes],
-[  --disable-chardet             Disable charset detection support (def: enabled)],
+[  --disable-chardet            Disable charset detection support (def: enabled)],
 [
     AC_DEFINE([USE_CHARDET], 1, [Define if character set detection enabled])
     AC_CHECK_LIB([udet_c], [detectCharset], [
@@ -201,54 +201,6 @@
 
 
 ### ---------------------------------------------------------------------------
-dnl SSE2 support
-dnl ============
-AUD_ARG_ENABLE([sse2], [yes],
-[  --disable-sse2               Disable SSE2 support (def: enabled)],
-[
-    AC_MSG_CHECKING([SSE2 support])
-    aud_my_save_CFLAGS="$CFLAGS"
-    CFLAGS="-msse2"
-    AC_TRY_RUN([
-#include <emmintrin.h>
-int main()
-{
-  _mm_setzero_pd();
-  return 0;
-}
-    ],[
-        AC_MSG_RESULT([yes])
-        AC_DEFINE([HAVE_SSE2], 1, [Define to 1 if your system has SSE2 support])
-        SIMD_CFLAGS="-msse2"
-    ],[
-        AC_MSG_RESULT([no])
-        enable_sse2="no"
-    ])
-    AC_SUBST([SIMD_CFLAGS])
-    CFLAGS="$aud_my_save_CFLAGS"
-])
-
-
-### ---------------------------------------------------------------------------
-dnl AltiVec support 
-dnl ===============
-AUD_ARG_ENABLE([altivec], [yes],
-[  --disable-altivec            Disable AltiVec support (def: enabled)],
-[
-    AC_CHECK_HEADERS([altivec.h],
-    [
-        AC_DEFINE([HAVE_ALTIVEC], 1, [Define to 1 if your system has AltiVec.])
-        AC_DEFINE([HAVE_ALTIVEC_H], 1, [Define to 1 if your system has an altivec.h file.])
-        AC_DEFINE([ARCH_POWERPC], 1, [Define to 1 if your system is a PowerPC.])
-        SIMD_CFLAGS="-maltivec"
-        AC_SUBST([SIMD_CFLAGS])
-    ],[
-        enable_altivec="no"
-    ])
-])    
-
-
-### ---------------------------------------------------------------------------
 dnl Session management support
 dnl ==========================
 AS_AC_EXPAND([desktop_file], "${datadir}/applications/audacious.desktop")