annotate acinclude.m4 @ 2875:9d06c6456f98

use libSAD-based converter in icecast plugin
author Andrew O. Shadoura <bugzilla@tut.by>
date Thu, 07 Aug 2008 14:00:20 +0300
parents 37f75d10f46a
children dd8b44fbfd6f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2540
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
1
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
2 dnl ** ADD_PKG_REQUIRES([requirement])
2718
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
3 dnl ** Adds a dependency to package's pkg-config file.
2540
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
4 AC_DEFUN([ADD_PC_REQUIRES], [
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
5 if test "x$PC_REQUIRES" = "x"; then
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
6 PC_REQUIRES="$1"
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
7 else
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
8 PC_REQUIRES="$PC_REQUIRES, $1"
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
9 fi
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
10 AC_SUBST([PC_REQUIRES])
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
11 ])
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
12
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
13
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
14 dnl ** AUD_CHECK_MODULE([define name], [module], [version required],
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
15 dnl ** [informational name], [additional error message])
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
16 dnl **
2718
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
17 dnl ** Works like PKG_CHECK_MODULES, but provides an informative
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
18 dnl ** error message if the package is not found. NOTICE! Unlike
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
19 dnl ** PKG_C_M, this macro ONLY supports one module name!
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
20 dnl **
2540
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
21 dnl ** AUD_CHECK_MODULE([GLIB], [gtk+-2.0], [>= 2.10.0], [Gtk+2], [See http://www.gtk.org/])
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
22 AC_DEFUN([AUD_CHECK_MODULE], [
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
23 PKG_CHECK_MODULES([$1], [$2 $3], [
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
24 ADD_PC_REQUIRES([$2 $3])
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
25 ],[
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
26 PKG_CHECK_EXISTS([$2], [
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
27 cv_pkg_version=`$PKG_CONFIG --modversion "$2" 2>/dev/null`
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
28 AC_MSG_ERROR([[
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
29 $4 version $cv_pkg_version was found, but $2 $3 is required.
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
30 $5]])
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
31 ],[
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
32 AC_MSG_ERROR([[
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
33 Cannot find $4! If you are using binary packages based system, check that you
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
34 have the corresponding -dev/devel packages installed.
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
35 $5]])
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
36 ])
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
37 ])
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
38 ])
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
39
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
40
2718
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
41 dnl ** AUD_CONDITIONAL([symbol], [variable to test][, value])
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
42 dnl ** Simplifying wrapper for AM_CONDITIONAL.
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
43 dnl **
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
44 dnl ** AUD_CONDITIONAL([FOO], [foo])
2540
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
45 AC_DEFUN([AUD_CONDITIONAL],
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
46 [if test "x${$2}" = m4_ifval([$3], ["x$3"],["xyes"]) ; then
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
47 $1="yes"
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
48 else
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
49 $1="no"
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
50 fi
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
51 AC_SUBST([$1])dnl
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
52 ])
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
53
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
54
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
55 dnl ** Simple wrapper for AC_ARG_ENABLE
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
56 dnl ** AUD_ARG_ENABLE([name], [default value], [help string], [if enabled], [if disabled])
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
57 AC_DEFUN([AUD_ARG_ENABLE], [dnl
2718
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
58 define([Name], [translit([$1], [./-], [___])])dnl
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
59 define([cBasce], [ifelse([$2],[yes],[Disable],[Enable]) $3 (def: ifelse([$2],[yes],[enabled],[disabled]))])dnl
2714
b52eee8523d5 Synchronized acinclude.m4 again.
Matti Hamalainen <ccr@tnsp.org>
parents: 2713
diff changeset
60 AC_ARG_ENABLE([$1], [AS_HELP_STRING([ifelse([$2],[yes],[--disable-$1],[--enable-$1])], cBasce)],, [enable_[]Name=$2])
2540
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
61 if test "x${enable_[]Name}" = "xyes"; then
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
62 m4_ifvaln([$4], [$4], [:])dnl
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
63 m4_ifvaln([$5], [else $5])dnl
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
64 fi
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
65 ])
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
66
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
67
2540
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
68 AC_DEFUN([AUD_ARG_SIMPLE], [dnl
2718
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
69 define([Name], [translit([$1], [./-], [___])])dnl
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
70 define([cBasce], [ifelse([$2],[yes],[Disable],[Enable]) $3 (def: ifelse([$2],[yes],[enabled],[disabled]))])dnl
2714
b52eee8523d5 Synchronized acinclude.m4 again.
Matti Hamalainen <ccr@tnsp.org>
parents: 2713
diff changeset
71 AC_ARG_ENABLE([$1], [AS_HELP_STRING([ifelse([$2],[yes],[--disable-$1],[--enable-$1])], cBasce)],, [enable_[]Name=$2])
2540
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
72 if test "x${enable_[]Name}" = "xyes"; then
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
73 AC_DEFINE([$4], [$5], [$6])
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
74 fi
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
75 AUD_CONDITIONAL([$4], [enable_$1])
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
76 AC_SUBST([$4])
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
77 ])
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
78
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
79
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
80 dnl ** Wrapper for cached compilation check
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
81 dnl ** AUD_TRY_COMPILE([message], [result variable], [includes], [body], [if ok], [if not ok])
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
82 AC_DEFUN([AUD_TRY_COMPILE], [dnl
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
83 AC_CACHE_CHECK([$1], [$2],
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
84 [AC_TRY_COMPILE([$3], [$4], [$2="yes"], [$2="no"])])
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
85 if test "x${$2}" = "xyes"; then
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
86 m4_ifvaln([$5], [$5], [:])dnl
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
87 m4_ifvaln([$6], [else $6])dnl
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
88 fi
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
89 ])
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
90
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
91
2540
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
92 dnl ** Check for GNU make
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
93 AC_DEFUN([AUD_CHECK_GNU_MAKE],[
2683
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
94 AC_CACHE_CHECK([for GNU make],cv_gnu_make_command,[
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
95 cv_gnu_make_command=""
2540
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
96 for a in "$MAKE" make gmake gnumake; do
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
97 test "x$a" = "x" && continue
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
98 if ( sh -c "$a --version" 2>/dev/null | grep "GNU Make" >/dev/null ) ; then
2683
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
99 cv_gnu_make_command="$a"
2540
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
100 break
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
101 fi
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
102 done
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
103 ])
2683
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
104 if test "x$cv_gnu_make_command" != "x" ; then
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
105 MAKE="$cv_gnu_make_command"
2540
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
106 else
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
107 AC_MSG_ERROR([** GNU make not found. If it is installed, try setting MAKE environment variable. **])
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
108 fi
2713
182dd0f45cc7 Synchronize acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2684
diff changeset
109 AC_SUBST([MAKE])dnl
182dd0f45cc7 Synchronize acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2684
diff changeset
110 ])dnl
2540
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
111
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
112
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
113 dnl *** Define plugin directories
2713
182dd0f45cc7 Synchronize acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2684
diff changeset
114 AC_DEFUN([AUD_DEFINE_PLUGIN_DIR],[dnl
2540
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
115 define([Name], [translit([$1], [a-z], [A-Z])])dnl
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
116 if test "x$enable_one_plugin_dir" = "xyes"; then
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
117 ifdef([aud_plugin_dirs_defined],[],
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
118 [ pluginsubs="\\\"Plugins\\\""
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
119 ])dnl
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
120 Name[]_PLUGIN_DIR="Plugins"
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
121 else
2684
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
122 ifdef([aud_def_plugin_dirs_defined],
2540
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
123 [pluginsubs="$pluginsubs,\\\"$1\\\""],
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
124 [pluginsubs="\\\"$1\\\""])
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
125 Name[]_PLUGIN_DIR="$1"
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
126 fi
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
127 AC_SUBST(Name[]_PLUGIN_DIR)dnl
2684
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
128 define([aud_def_plugin_dirs_defined],[1])dnl
2540
1fd4d8e5aad2 Various new helper macros added for simplifying and sanitizing configure.ac.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
129 ])dnl
2683
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
130
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
131
2684
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
132 dnl *** Get plugin directories
2713
182dd0f45cc7 Synchronize acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2684
diff changeset
133 AC_DEFUN([AUD_GET_PLUGIN_DIR],[dnl
2684
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
134 define([Name], [translit([$1_plugin_dir], [A-Z], [a-z])])dnl
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
135 define([BigName], [translit([$1], [a-z], [A-Z])])dnl
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
136 ifdef([aud_get_plugin_dirs_defined],
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
137 [pluginsubs="$pluginsubs,\\\"$1\\\""],
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
138 [pluginsubs="\\\"$1\\\""])
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
139 BigName[]_PLUGIN_DIR=`pkg-config audacious --variable=[]Name[]`
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
140 AC_SUBST(BigName[]_PLUGIN_DIR)dnl
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
141 define([aud_get_plugin_dirs_defined],[1])dnl
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
142 ])dnl
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
143
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
144
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
145
2718
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
146 dnl **
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
147 dnl ** Common checks
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
148 dnl **
2683
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
149 AC_DEFUN([AUD_COMMON_PROGS], [
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
150
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
151 dnl Check for C and C++ compilers
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
152 dnl =============================
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
153 AUD_CHECK_GNU_MAKE
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
154 AC_PROG_CC
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
155 AC_PROG_CXX
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
156 AM_PROG_AS
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
157 AC_ISC_POSIX
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
158 AC_C_BIGENDIAN
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
159
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
160 if test "x$GCC" = "xyes"; then
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
161 CFLAGS="$CFLAGS -Wall -pipe"
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
162 CXXFLAGS="$CXXFLAGS -pipe -Wall"
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
163 fi
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
164
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
165 dnl Checks for various programs
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
166 dnl ===========================
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
167 AC_PROG_LN_S
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
168 AC_PROG_MAKE_SET
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
169 AC_PATH_PROG([RM], [rm])
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
170 AC_PATH_PROG([MV], [mv])
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
171 AC_PATH_PROG([CP], [cp])
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
172 AC_PATH_PROG([AR], [ar])
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
173 AC_PATH_PROG([RANLIB], [ranlib])
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
174
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
175
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
176 dnl Check for Gtk+/GLib and pals
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
177 dnl ============================
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
178 AUD_CHECK_MODULE([GLIB], [glib-2.0], [>= 2.14.0], [Glib2])
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
179 AUD_CHECK_MODULE([GTHREAD], [gthread-2.0], [>= 2.14.0], [gthread-2.0])
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
180 AUD_CHECK_MODULE([GTK], [gtk+-2.0], [>= 2.10.0], [Gtk+2])
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
181 AUD_CHECK_MODULE([PANGO], [pango], [>= 1.8.0], [Pango])
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
182 AUD_CHECK_MODULE([CAIRO], [cairo], [>= 1.2.4], [Cairo])
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
183
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
184
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
185 dnl Check for libmowgli
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
186 dnl ===================
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
187 AUD_CHECK_MODULE([MOWGLI], [libmowgli], [>= 0.4.0], [libmowgli],
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
188 [http://www.atheme.org/projects/mowgli.shtml])
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
189
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
190
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
191 dnl Check for libmcs
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
192 dnl ================
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
193 AUD_CHECK_MODULE([LIBMCS], [libmcs], [>= 0.7], [libmcs],
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
194 [http://www.atheme.org/projects/mcs.shtml])
2684
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
195
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
196
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
197 dnl SSE2 support
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
198 dnl ============
2717
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
199 AUD_ARG_ENABLE([sse2], [yes], [SSE2 support],
2684
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
200 [
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
201 AC_MSG_CHECKING([SSE2 support])
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
202 aud_my_save_CFLAGS="$CFLAGS"
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
203 CFLAGS="-msse2"
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
204 AC_TRY_RUN([
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
205 #include <emmintrin.h>
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
206 int main()
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
207 {
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
208 _mm_setzero_pd();
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
209 return 0;
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
210 }
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
211 ],[
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
212 AC_MSG_RESULT([yes])
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
213 AC_DEFINE([HAVE_SSE2], 1, [Define to 1 if your system has SSE2 support])
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
214 SIMD_CFLAGS="-msse2"
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
215 ],[
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
216 AC_MSG_RESULT([no])
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
217 enable_sse2="no"
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
218 ])
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
219 AC_SUBST([SIMD_CFLAGS])
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
220 CFLAGS="$aud_my_save_CFLAGS"
2683
dc12b0d4d33e Synchronized acinclude.m4 from core.
Matti Hamalainen <ccr@tnsp.org>
parents: 2540
diff changeset
221 ])
2684
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
222
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
223 dnl AltiVec support
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
224 dnl ===============
2717
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
225 AUD_ARG_ENABLE([altivec], [yes], [AltiVec support],
2684
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
226 [
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
227 AC_CHECK_HEADERS([altivec.h],
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
228 [
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
229 AC_DEFINE([HAVE_ALTIVEC], 1, [Define to 1 if your system has AltiVec.])
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
230 AC_DEFINE([HAVE_ALTIVEC_H], 1, [Define to 1 if your system has an altivec.h file.])
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
231 AC_DEFINE([ARCH_POWERPC], 1, [Define to 1 if your system is a PowerPC.])
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
232 SIMD_CFLAGS="-maltivec"
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
233 AC_SUBST([SIMD_CFLAGS])
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
234 ],[
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
235 enable_altivec="no"
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
236 ])
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
237 ])
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
238
e48338bffeef Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2683
diff changeset
239 ])
2717
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
240
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
241
2718
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
242 dnl **
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
243 dnl ** Plugin helper macros
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
244 dnl **
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
245
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
246 dnl ** Unconditionally add a plugin to "build these" list
2717
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
247 AC_DEFUN([AUD_PLUGIN_ADD], [dnl
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
248 define([Name], [translit([$1], [A-Z./-], [a-z___])])dnl
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
249 have_[]Name="yes"; res_short_[]Name="$1"
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
250 res_desc_[]Name="$3"; ifdef([aud_def_plugin_$2], [$2[]_PLUGINS="${$2[]_PLUGINS} $1"], [$2[]_PLUGINS="$1"])dnl
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
251 define([aud_def_plugin_$2],[1])dnl
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
252 ])
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
253
2718
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
254
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
255 dnl ** Generic template for macros below
2717
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
256 AC_DEFUN([AUD_PLUGIN_CHK], [dnl
2718
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
257 define([cBasce], [ifelse([$3],[yes],[Disable],[Enable]) $5 (def: ifelse([$3],[yes],[enabled],[disabled]))])dnl
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
258 AC_ARG_ENABLE([$1], [AS_HELP_STRING([ifelse([$3],[yes],[--disable-$1],[--enable-$1])], cBasce)],, [enable_$2="$3"])dnl
2717
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
259 have_$2="no"
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
260 if test "x${enable_$2}" = "xyes"; then
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
261 m4_ifvaln([$6], [$6], [:])
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
262 if test "x${have_$2}" = "xyes"; then
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
263 m4_ifvaln([$7], [$7], [:])dnl
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
264 else
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
265 res_msg_$2="(not found)"
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
266 m4_ifvaln([$8], [$8], [:])dnl
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
267 fi
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
268 else
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
269 res_msg_$2="(disabled)"
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
270 m4_ifvaln([$9], [$9], [:])dnl
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
271 fi
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
272 ])
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
273
2718
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
274
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
275 dnl ** Add a plugin based on --enable/--disable options
2717
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
276 AC_DEFUN([AUD_PLUGIN_CHECK_SIMPLE], [dnl
2718
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
277 define([cBasce], [ifelse([$2],[yes],[Disable],[Enable]) $6 (def: ifelse([$2],[yes],[enabled],[disabled]))])dnl
2717
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
278 AC_ARG_ENABLE([$1], [AS_HELP_STRING([ifelse([$2],[yes],[--disable-$1],[--enable-$1])], cBasce)],, [enable_$2="$3"])dnl
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
279 have_$2="no"
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
280 if test "x${enable_$2}" = "xyes"; then
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
281 m4_ifvaln([$6], [$6], [:])
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
282 else
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
283 res_msg_$2="(disabled)"
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
284 m4_ifvaln([$7], [$7], [:])dnl
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
285 fi
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
286 ])
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
287
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
288
2718
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
289 dnl ** Check and enable a plugin with a pkg-config check
2717
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
290 AC_DEFUN([AUD_PLUGIN_CHECK_PKG], [dnl
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
291 define([Name], [translit([$1], [A-Z./-], [a-z___])])dnl
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
292 define([BigN], [translit([$1], [a-z./-], [A-Z___])])dnl
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
293 AUD_PLUGIN_CHK([$1], Name, [$2], [$4], [$6], [dnl
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
294 PKG_CHECK_MODULES([]BigN, [$7], [have_[]Name[]="yes"], [have_[]Name[]="no"])
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
295 ], [
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
296 AUD_PLUGIN_ADD([$5], [$3])
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
297 m4_ifvaln([$8], [$8])
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
298 ], [$9], [$10])
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
299 ])
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
300
2718
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
301
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
302 dnl ** Check and enable a plugin with a header files check
2717
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
303 AC_DEFUN([AUD_PLUGIN_CHECK_HEADERS], [
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
304 define([Name], [translit([$1], [A-Z./-], [a-z___])])dnl
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
305 AUD_PLUGIN_CHK([$1], Name, [$2], [$4], [$6], [
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
306 AC_CHECK_HEADERS([$7], [have_[]Name[]="yes"], [have_[]Name[]="no"])
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
307 ], [
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
308 AUD_PLUGIN_ADD([$5], [$3])
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
309 m4_ifvaln([$8], [$8])
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
310 ], [$9], [$10])
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
311 ])
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
312
2718
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
313
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
314 dnl ** Check and enable a plugin with a complex check
2717
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
315 AC_DEFUN([AUD_PLUGIN_CHECK_COMPLEX], [
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
316 # CHECK_COMPLEX #1 : $1
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
317 define([Name], [translit([$1], [A-Z./-], [a-z___])])dnl
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
318 AUD_PLUGIN_CHK([$1], Name, [$2], [$4], [$6], [
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
319 # CHECK_COMPLEX #2 BEGIN
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
320 $7
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
321 # CHECK_COMPLEX #2 END
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
322 ], [
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
323 # CHECK_COMPLEX #3 BEGIN
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
324 AUD_PLUGIN_ADD([$5], [$3])
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
325 m4_ifvaln([$8], [$8])
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
326 # CHECK_COMPLEX #3 END
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
327 ], [$9], [$10])
2718
37f75d10f46a And more updates to acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2717
diff changeset
328 # CHECK_COMPLEX #4 END
2717
1b4fcab95915 Synchronized acinclude.m4.
Matti Hamalainen <ccr@tnsp.org>
parents: 2714
diff changeset
329 ])