annotate acinclude.m4 @ 4658:763b20a53874

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